aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-11-19 10:09:58 +0100
committerSpp <spp@jorge.gr>2012-11-19 10:09:58 +0100
commit7f061fc57fac4b48417d25579e833e9b66364237 (patch)
treecdbe2ff223967034dd9f236da4ca38cc73c30a7b
parent09ab26ac946bc7b5458d92fbadfb66e442744098 (diff)
parentd42212b595ad01be0a839405d853f7db2b9f88de (diff)
Merge branch 'master' into 4.3.4
Conflicts: src/server/game/AI/EventAI/CreatureEventAI.cpp src/server/game/AI/EventAI/CreatureEventAIMgr.cpp src/server/game/AI/EventAI/CreatureEventAIMgr.h src/server/game/Battlegrounds/Battleground.h src/server/game/Chat/Chat.h src/server/game/Entities/Player/Player.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Globals/ObjectMgr.h src/server/game/Guilds/Guild.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Miscellaneous/SharedDefines.h src/server/game/Server/Protocol/Opcodes.cpp src/server/game/Spells/SpellInfo.cpp src/server/game/World/World.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_reload.cpp src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp src/server/shared/Database/Implementation/CharacterDatabase.cpp
-rw-r--r--sql/base/characters_database.sql41
-rw-r--r--sql/old/2.4.3/00011_characters.sql2
-rw-r--r--sql/old/2.4.3/00045_characters.sql2
-rw-r--r--sql/old/2.4.3/00117_world_scripts.sql4
-rw-r--r--sql/old/2.4.3/00123_world_scripts.sql16
-rw-r--r--sql/old/2.4.3/00247_world.sql4
-rw-r--r--sql/old/2.4.3/00262_world.sql10
-rw-r--r--sql/old/2.4.3/00329_world.sql2
-rw-r--r--sql/old/2.4.3/00542_characters.sql114
-rw-r--r--sql/old/2.4.3/00566_world.sql2
-rw-r--r--sql/old/2.4.3/00608_world.sql6
-rw-r--r--sql/old/2.4.3/00645_world_scripts.sql2
-rw-r--r--sql/old/2.4.3/00676_world.sql2
-rw-r--r--sql/old/2.4.3/00725_characters.sql6
-rw-r--r--sql/old/2.4.3/00725_world.sql38
-rw-r--r--sql/old/2.4.3/00871_world.sql2
-rw-r--r--sql/old/2.4.3/00905_world_scripts.sql2
-rw-r--r--sql/old/2.4.3/00955_world_scripts.sql8
-rw-r--r--sql/old/2.4.3/01069_world_scripts.sql2
-rw-r--r--sql/old/3.0.9/00000_3.0.9_old.sql34
-rw-r--r--sql/old/3.0.9/01426_mangos_7292_01_world_points_of_interest.sql2
-rw-r--r--sql/old/3.0.9/01426_mangos_7292_02_world_locales_points_of_interest.sql2
-rw-r--r--sql/old/3.0.9/01693_world.sql4
-rw-r--r--sql/old/3.0.9/02131_world.sql2
-rw-r--r--sql/old/3.0.9/02254_world.sql2
-rw-r--r--sql/old/3.0.9/02339_world.sql2
-rw-r--r--sql/old/3.0.9/02343_world.sql2
-rw-r--r--sql/old/3.0.9/02686_world_command.sql2
-rw-r--r--sql/old/3.0.9/02907_mangos_7705_01_world_command.sql2
-rw-r--r--sql/old/3.0.9/02986_TC1_world.sql2
-rw-r--r--sql/old/3.0.9/03070_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.0.9/03257_world_waypoint_data_converter.sql2
-rw-r--r--sql/old/3.0.9/03320_worldspell_enchant_proc_data.sql2
-rw-r--r--sql/old/3.0.9/03392_world_spell_proc_event.sql4
-rw-r--r--sql/old/3.0.9/03609_mangos_7902_01_world_pool_creature.sql2
-rw-r--r--sql/old/3.0.9/03609_mangos_7902_02_world_pool_gameobject.sql2
-rw-r--r--sql/old/3.0.9/03810_world_spell_bonus_data.sql20
-rw-r--r--sql/old/3.0.9/03851_world_spell.sql2
-rw-r--r--sql/old/3.0.9/03877_world_spell_script_target.sql2
-rw-r--r--sql/old/3.0.9/03886_world_script_nexus.sql2
-rw-r--r--sql/old/3.1.3/03954_world_spell_bonus_data.sql2
-rw-r--r--sql/old/3.1.3/03991_world_spell_proc_event.sql8
-rw-r--r--sql/old/3.1.3/04222_world.sql2
-rw-r--r--sql/old/3.1.3/04320_world_.sql2
-rw-r--r--sql/old/3.1.3/04321_world.sql2
-rw-r--r--sql/old/3.1.3/04356_world_spell_proc_event.sql4
-rw-r--r--sql/old/3.1.3/04360_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.1.3/04367_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.1.3/04397_world_playercreateinfo_spell_TDB.sql2
-rw-r--r--sql/old/3.1.3/04409_world_spell_proc_event.sql10
-rw-r--r--sql/old/3.1.3/04423_world.sql2
-rw-r--r--sql/old/3.1.3/04426_world.sql42
-rw-r--r--sql/old/3.1.3/04428_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.1.3/04536_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.1.3/04597_world_command.sql2
-rw-r--r--sql/old/3.1.3/04602_world_spell_bonus_data.sql4
-rw-r--r--sql/old/3.1.3/04696_world_spell_proc_event.sql4
-rw-r--r--sql/old/3.1.3/04762_8294_01_mangos_playercreateinfo_action.sql2
-rw-r--r--sql/old/3.1.3/04862_world_linked_spell.sql2
-rw-r--r--sql/old/3.1.3/04872_world_scripts.sql2
-rw-r--r--sql/old/3.1.3/04968_world_8361_spell_bonus_data.sql2
-rw-r--r--sql/old/3.1.3/05036_character_updates_dual_spec.sql4
-rw-r--r--sql/old/3.1.3/05155_world_scripts_dk.sql20
-rw-r--r--sql/old/3.1.3/05185_world_scripts_dk.sql4
-rw-r--r--sql/old/3.1.3/05354_characters_guild_bank_eventlog.sql2
-rw-r--r--sql/old/3.1.3/05354_characters_guild_eventlog.sql2
-rw-r--r--sql/old/3.1.3/05416_world_spell_dbc.sql2
-rw-r--r--sql/old/3.1.3/05445_world_spell_enchant_proc_data.sql2
-rw-r--r--sql/old/3.1.3/06420_world_script_waypoint.sql2
-rw-r--r--sql/old/3.1.3/06518_world_spell_proc_event.sql8
-rw-r--r--sql/old/3.1.3/06549_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.2.2a/06589_world_battleground_template.sql4
-rw-r--r--sql/old/3.2.2a/06665_world_creature_classlevelstats.sql2
-rw-r--r--sql/old/3.2.2a/06710_world_command.sql2
-rw-r--r--sql/old/3.2.2a/06710_world_trinity_string.sql2
-rw-r--r--sql/old/3.2.2a/06751_world_creature_classlevelstats.sql2
-rw-r--r--sql/old/3.2.2a/06859_world_script_texts.sql2
-rw-r--r--sql/old/3.2.2a/06932_characters_character_aura.sql2
-rw-r--r--sql/old/3.2.2a/06964_world_creature_classlevelstats.sql4
-rw-r--r--sql/old/3.2.2a/07040_world_spell_linked_spell.sql2
-rw-r--r--sql/old/3.3.2/07394_world_spell_bonus_data.sql2
-rw-r--r--sql/old/3.3.2/07465_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.2/07547_world_vehicle_accessory.sql6
-rw-r--r--sql/old/3.3.2/07604_characters_item_refund_instance.sql32
-rw-r--r--sql/old/3.3.2/07609_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.2/07611_characters_item_refund_instance.sql2
-rw-r--r--sql/old/3.3.2/07721_world_script_texts.sql4
-rw-r--r--sql/old/3.3.2/07748_world_scriptname.sql2
-rw-r--r--sql/old/3.3.2/07760_world_spell_group_stack_rules.sql2
-rw-r--r--sql/old/3.3.2/07797_world_scriptname.sql2
-rw-r--r--sql/old/3.3.3a/07906_characters_character_stats.sql2
-rw-r--r--sql/old/3.3.3a/07919_characters_worldstates.sql2
-rw-r--r--sql/old/3.3.3a/07982_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.3a/08052_world_script_texts.sql4
-rw-r--r--sql/old/3.3.3a/08197_world_spell_bonus_data.sql2
-rw-r--r--sql/old/3.3.3a/08214_world_command.sql2
-rw-r--r--sql/old/3.3.3a/08244_world_spell_dbc.sql2
-rw-r--r--sql/old/3.3.3a/08263_world_script_texts.sql2
-rw-r--r--sql/old/3.3.3a/08293_world_spell_dbc.sql2
-rw-r--r--sql/old/3.3.3a/08300_characters_worldstates.sql2
-rw-r--r--sql/old/3.3.3a/08348_world_script_texts.sql2
-rw-r--r--sql/old/3.3.3a/08358_world_spell_linked_spell.sql2
-rw-r--r--sql/old/3.3.3a/08373_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.3a/08397_world_command.sql2
-rw-r--r--sql/old/3.3.3a/08512_world_command.sql2
-rw-r--r--sql/old/3.3.3a/08586_world_command.sql2
-rw-r--r--sql/old/3.3.5a/09043_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09059_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09122_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09144_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09149_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09162_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09205_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09554_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/09555_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/09560_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/09712_world_spell_threat.sql2
-rw-r--r--sql/old/3.3.5a/09715_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/09722_world_exploration_basexp.sql2
-rw-r--r--sql/old/3.3.5a/09762_world_script_texts.sql14
-rw-r--r--sql/old/3.3.5a/09791_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/09835_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/09840_world_spell_linked_spell.sql2
-rw-r--r--sql/old/3.3.5a/09948_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/10029_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/10105_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/10213_world_script_texts.sql2
-rw-r--r--sql/old/3.3.5a/10215_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/10282_world_script_texts.sql2
-rw-r--r--sql/old/3.3.5a/10431_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.5a/10470_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.5a/10548_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.5a/10570_world_disables.sql2
-rw-r--r--sql/old/3.3.5a/10654_characters_item_instance.sql2
-rw-r--r--sql/old/3.3.5a/10903_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_08_02_world_scriptname.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_account_data.sql6
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_addons.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_arena_team.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_channels.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_character_battleground_data.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_character_equipmentsets.sql36
-rw-r--r--sql/old/3.3.5a/2011_01_19_00_characters_character_tutorial.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_20_00_characters_pet_aura.sql10
-rw-r--r--sql/old/3.3.5a/2011_01_22_01_characters_character_inventory.sql2
-rw-r--r--sql/old/3.3.5a/2011_01_24_00_world_scriptname.sql4
-rw-r--r--sql/old/3.3.5a/2011_02_04_00_world_battleground_isle_of_conquest.sql10
-rw-r--r--sql/old/3.3.5a/2011_02_04_00_world_mail_loot_template.sql10
-rw-r--r--sql/old/3.3.5a/2011_02_04_03_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_05_04_world_game_event.sql4
-rw-r--r--sql/old/3.3.5a/2011_02_05_05_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_05_07_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_05_08_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2011_02_07_01_world_creature_questrelation.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_07_02_world_sai.sql12
-rw-r--r--sql/old/3.3.5a/2011_02_10_02_world_instance_oculus.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_11_00_world_coredevdata.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_11_01_world_coredevdata.sql4
-rw-r--r--sql/old/3.3.5a/2011_02_15_00_world_sai.sql10
-rw-r--r--sql/old/3.3.5a/2011_02_15_01_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2011_02_15_02_world_game_event_liita.sql14
-rw-r--r--sql/old/3.3.5a/2011_02_18_05_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_19_01_world_instance_icecrown_citadel.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_22_01_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_22_03_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_23_06_world_creatures.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_26_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_26_05_world_npc_spellclick_spells.sql2
-rw-r--r--sql/old/3.3.5a/2011_02_27_01_world_creature_template.sql10
-rw-r--r--sql/old/3.3.5a/2011_02_28_04_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2011_02_28_05_world_vehicles.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_02_06_world_sai.sql88
-rw-r--r--sql/old/3.3.5a/2011_03_05_04_world_creatures.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_06_01_world_loot_template.sql4
-rw-r--r--sql/old/3.3.5a/2011_03_06_05_world_vehicle_accessory.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_08_00_world_sai.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_10_05_world_creature_questrelation.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_12_00_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_17_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_17_10_world_sai.sql42
-rw-r--r--sql/old/3.3.5a/2011_03_18_00_world_game_event_misc.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_18_01_world_instance_pit_of_saron.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_21_03_world_achievement_criteria_data.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_21_06_world_creature.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_22_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_22_01_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2011_03_23_00_world_conditions.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_24_00_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_24_01_world_loot_template.sql4
-rw-r--r--sql/old/3.3.5a/2011_03_24_03_world_sai.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_24_04_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2011_03_26_00_world_conditions.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_26_00_world_gameobject.sql4
-rw-r--r--sql/old/3.3.5a/2011_03_26_00_world_npc_spellclick_spells.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_26_00_world_smart_scripts.sql4
-rw-r--r--sql/old/3.3.5a/2011_03_26_00_world_vehicle_template_accessory.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_27_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_27_02_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_03_28_00_world_misc.sql6
-rw-r--r--sql/old/3.3.5a/2011_03_29_00_world_creature.sql8
-rw-r--r--sql/old/3.3.5a/2011_04_03_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_03_05_world_sai.sql36
-rw-r--r--sql/old/3.3.5a/2011_04_03_06_world_waypoint.sql4
-rw-r--r--sql/old/3.3.5a/2011_04_03_09_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_03_10_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_03_11_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_11_01_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_11_02_world_spell_area.sql4
-rw-r--r--sql/old/3.3.5a/2011_04_11_03_world_arena_season_5.sql6
-rw-r--r--sql/old/3.3.5a/2011_04_14_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_14_01_world_quest_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_17_00_world_achievement_criteria_data.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_17_06_world_creature.sql10
-rw-r--r--sql/old/3.3.5a/2011_04_22_03_world_creatures.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_22_07_world_smart_scripts.sql24
-rw-r--r--sql/old/3.3.5a/2011_04_23_01_world_gameobjects.sql2
-rw-r--r--sql/old/3.3.5a/2011_04_23_02_world_creatures.sql8
-rw-r--r--sql/old/3.3.5a/2011_04_29_00_world_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_07_02_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_07_04_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_07_05_world_sai.sql6
-rw-r--r--sql/old/3.3.5a/2011_05_07_06_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_08_01_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_18_07_world_sai.sql6
-rw-r--r--sql/old/3.3.5a/2011_05_18_09_world_waypoints.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_19_01_world_instance_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_20_02_world_pool_template.sql8
-rw-r--r--sql/old/3.3.5a/2011_05_20_03_world_pool_template.sql10
-rw-r--r--sql/old/3.3.5a/2011_05_20_04_world_pool_template.sql8
-rw-r--r--sql/old/3.3.5a/2011_05_22_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_22_08_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_24_03_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2011_05_24_09_world_sai.sql22
-rw-r--r--sql/old/3.3.5a/2011_05_24_10_world_sai.sql12
-rw-r--r--sql/old/3.3.5a/2011_05_28_02_world_creature_text.sql4
-rw-r--r--sql/old/3.3.5a/2011_05_30_01_world_creature.sql4
-rw-r--r--sql/old/3.3.5a/2011_06_04_00_world_creature_template.sql4
-rw-r--r--sql/old/3.3.5a/2011_06_08_00_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_06_09_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_06_09_03_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_06_12_01_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_06_17_05_world_conditions.sql4
-rw-r--r--sql/old/3.3.5a/2011_06_17_16_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_06_17_19_world_misc.sql30
-rw-r--r--sql/old/3.3.5a/2011_06_19_07_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_06_25_16_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/2011_07_06_00_world_sai.sql18
-rw-r--r--sql/old/3.3.5a/2011_07_07_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_07_27_01_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_01_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_01_01_world_waypoints.sql6
-rw-r--r--sql/old/3.3.5a/2011_08_06_01_world_misc.sql18
-rw-r--r--sql/old/3.3.5a/2011_08_06_04_world_misc.sql16
-rw-r--r--sql/old/3.3.5a/2011_08_07_01_world_reference_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_07_02_world_spawns.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_07_03_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_09_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_13_00_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.5a/2011_08_24_00_world_game_event.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_07_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_11_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql4
-rw-r--r--sql/old/3.3.5a/2011_09_11_05_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_12_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_12_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_12_03_world_conditions.sql16
-rw-r--r--sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql4
-rw-r--r--sql/old/3.3.5a/2011_09_12_05_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_13_00_world_spells.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_14_01_world_quest.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_15_00_world_creature.sql4
-rw-r--r--sql/old/3.3.5a/2011_09_15_02_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_09_15_04_world_misc.sql16
-rw-r--r--sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_01_05_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_01_06_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_01_07_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_01_11_world_loot.sql8
-rw-r--r--sql/old/3.3.5a/2011_10_01_12_world_creatures.sql6
-rw-r--r--sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql4
-rw-r--r--sql/old/3.3.5a/2011_10_02_04_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_02_08_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_02_12_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_07_01_world_command.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_22_07_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2011_10_23_00_world_sai.sql14
-rw-r--r--sql/old/3.3.5a/2011_10_23_05_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql4
-rw-r--r--sql/old/3.3.5a/2011_10_23_07_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_10_23_08_world_sai.sql30
-rw-r--r--sql/old/3.3.5a/2011_10_29_05_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_07_00_world_player_factionchange_items.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_11_01_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_13_02_world_pool_template.sql4
-rw-r--r--sql/old/3.3.5a/2011_11_13_05_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_13_06_world_reference_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_13_07_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_13_11_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_11_13_12_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql6
-rw-r--r--sql/old/3.3.5a/2011_12_17_00_world_creature.sql48
-rw-r--r--sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql2
-rw-r--r--sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql2
-rw-r--r--sql/old/3.3.5a/2011_12_18_04_world_misc.sql6
-rw-r--r--sql/old/3.3.5a/2011_12_18_06_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql14
-rw-r--r--sql/old/3.3.5a/2012_01_03_02_world_sai.sql8
-rw-r--r--sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql754
-rw-r--r--sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql4
-rw-r--r--sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_06_07_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_08_01_world_sai.sql14
-rw-r--r--sql/old/3.3.5a/2012_01_08_16_world_misc.sql8
-rw-r--r--sql/old/3.3.5a/2012_01_13_00_world_creature.sql4
-rw-r--r--sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql6
-rw-r--r--sql/old/3.3.5a/2012_01_13_02_world_sai.sql6
-rw-r--r--sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql10
-rw-r--r--sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql4
-rw-r--r--sql/old/3.3.5a/2012_01_19_08_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_21_00_world_creature.sql4
-rw-r--r--sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_24_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql2
-rw-r--r--sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_05_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_05_02_world_creature.sql6
-rw-r--r--sql/old/3.3.5a/2012_02_08_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_08_11_world_pool.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_08_14_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_08_16_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_11_06_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql4
-rw-r--r--sql/old/3.3.5a/2012_02_15_08_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_16_00_world_conditions.sql28
-rw-r--r--sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql8
-rw-r--r--sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_18_06_world_gossip.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_20_02_world_conditons.sql12
-rw-r--r--sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql4
-rw-r--r--sql/old/3.3.5a/2012_02_21_01_world_conditions.sql20
-rw-r--r--sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_25_02_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql4
-rw-r--r--sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql4
-rw-r--r--sql/old/3.3.5a/2012_03_10_00_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_03_11_00_world_sai.sql10
-rw-r--r--sql/old/3.3.5a/2012_03_20_00_world_gossip.sql22
-rw-r--r--sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql18
-rw-r--r--sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql2
-rw-r--r--sql/old/3.3.5a/2012_03_27_00_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql8
-rw-r--r--sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql4
-rw-r--r--sql/old/3.3.5a/2012_04_01_00_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_01_01_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_01_03_world_trainers.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql8
-rw-r--r--sql/old/3.3.5a/2012_04_13_01_world_misc.sql8
-rw-r--r--sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql24
-rw-r--r--sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql4
-rw-r--r--sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql6
-rw-r--r--sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_22_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql16
-rw-r--r--sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql2
-rw-r--r--sql/old/3.3.5a/2012_04_24_06_world_misc.sql4
-rw-r--r--sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql10
-rw-r--r--sql/old/3.3.5a/2012_05_01_00_world_creature.sql4
-rw-r--r--sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql6
-rw-r--r--sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_08_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_10_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_10_03_world_misc.sql6
-rw-r--r--sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_20_00_world_misc.sql4
-rw-r--r--sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql4
-rw-r--r--sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql4
-rw-r--r--sql/old/3.3.5a/2012_05_23_05_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_26_00_world_scripts.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_27_02_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_27_06_world_creature.sql6
-rw-r--r--sql/old/3.3.5a/2012_05_28_05_world_creature.sql6
-rw-r--r--sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_31_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_31_11_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_05_31_12_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql18
-rw-r--r--sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql8
-rw-r--r--sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql18
-rw-r--r--sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql214
-rw-r--r--sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql28
-rw-r--r--sql/old/3.3.5a/2012_06_03_01_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql20
-rw-r--r--sql/old/3.3.5a/2012_06_04_01_world_gossip.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_04_03_world_conditions.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_05_01_world_gossip.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_06_00_world_script.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_07_00_world_gossip.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_07_05_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_12_00_world_transport.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql14
-rw-r--r--sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql14
-rw-r--r--sql/old/3.3.5a/2012_06_16_01_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_17_02_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/2012_06_19_02_world_misc.sql4
-rw-r--r--sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql2
-rw-r--r--sql/old/3.3.5a/2012_07_14_01_world_creature_loot_template.sql4
-rw-r--r--sql/old/3.3.5a/2012_07_29_08_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2012_07_29_09_world_gossip_menu_option.sql12
-rw-r--r--sql/old/3.3.5a/2012_08_04_00_world_disables.sql2
-rw-r--r--sql/old/3.3.5a/2012_08_04_01_world_disables.sql70
-rw-r--r--sql/old/3.3.5a/2012_08_04_02_world_disables.sql40
-rw-r--r--sql/old/3.3.5a/2012_08_04_03_world_disables.sql72
-rw-r--r--sql/old/3.3.5a/2012_08_04_04_world_disables.sql62
-rw-r--r--sql/old/3.3.5a/2012_08_04_05_world_disables.sql52
-rw-r--r--sql/old/3.3.5a/2012_08_04_10_world_disables.sql4
-rw-r--r--sql/old/3.3.5a/2012_08_10_05_world_quest_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_08_10_06_world_creature.sql4
-rw-r--r--sql/old/3.3.5a/2012_08_20_02_world_wintergrasp_creatures.sql2
-rw-r--r--sql/old/3.3.5a/2012_08_20_06_world_wintergrasp_spells.sql4
-rw-r--r--sql/old/3.3.5a/2012_08_20_07_world_wintergrasp_texts.sql2
-rw-r--r--sql/old/3.3.5a/2012_08_27_06_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2012_08_27_08_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_08_29_00_world_blood_furnace.sql2
-rw-r--r--sql/old/3.3.5a/2012_08_31_00_world_command.sql2
-rw-r--r--sql/old/3.3.5a/2012_09_10_00_world_game_event.sql4
-rw-r--r--sql/old/3.3.5a/2012_09_13_01_world_fires_over_skettis.sql2
-rw-r--r--sql/updates/characters/2012_11_18_00_character_calendar.sql26
-rw-r--r--sql/updates/world/2012_09_16_01_world_creature_template_addon.sql2
-rw-r--r--sql/updates/world/2012_09_17_02_world_misc.sql2
-rw-r--r--sql/updates/world/2012_09_22_01_world_i_was_a_lot_of_things.sql4
-rw-r--r--sql/updates/world/2012_09_24_02_world_misc.sql2
-rw-r--r--sql/updates/world/2012_09_24_03_world_misc.sql4
-rw-r--r--sql/updates/world/2012_09_26_00_world_misc.sql20
-rw-r--r--sql/updates/world/2012_09_27_01_world_custodian_of_time.sql4
-rw-r--r--sql/updates/world/2012_10_02_00_world_oculus.sql2
-rw-r--r--sql/updates/world/2012_10_04_00_world_spelldifficulty_dbc.sql2
-rw-r--r--sql/updates/world/2012_10_11_00_world_gameobject.sql88
-rw-r--r--sql/updates/world/2012_10_25_00_world_childrens_week.sql8
-rw-r--r--sql/updates/world/2012_11_11_00_world_sai.sql2
-rw-r--r--sql/updates/world/2012_11_13_00_world_waypoints.sql52
-rw-r--r--sql/updates/world/2012_11_14_00_world_various_fixes.sql52
-rw-r--r--sql/updates/world/2012_11_16_00_world_utgarde.sql (renamed from sql/updates/world/2012_09_22_00_world_utgarde.sql)14
-rw-r--r--sql/updates/world/2012_11_16_01_world_utgarde.sql39
-rw-r--r--sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql1
-rw-r--r--sql/updates/world/2012_11_17_00_world_various_fixes.sql834
-rw-r--r--sql/updates/world/2012_11_18_00_world_ormorok.sql56
-rw-r--r--sql/updates/world/2012_11_18_01_world_creature_text.sql15
-rw-r--r--sql/updates/world/2012_11_18_01_world_gameobject.sql3
-rw-r--r--sql/updates/world/2012_11_18_02_world_toc.sql150
-rwxr-xr-xsrc/server/game/AI/CoreAI/CombatAI.cpp1
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp76
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp1
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp1
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGossip.h1
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp19
-rw-r--r--src/server/game/Battlefield/BattlefieldHandler.cpp1
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp1
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.cpp18
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.h2
-rw-r--r--src/server/game/Battlegrounds/ArenaTeamMgr.cpp1
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp19
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.h52
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundQueue.cpp3
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.cpp19
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAV.cpp13
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAV.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.cpp10
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundIC.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundWS.cpp9
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundWS.h2
-rwxr-xr-xsrc/server/game/Calendar/Calendar.cpp99
-rwxr-xr-xsrc/server/game/Calendar/Calendar.h189
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp895
-rw-r--r--src/server/game/Calendar/CalendarMgr.h317
-rwxr-xr-xsrc/server/game/Chat/Channels/Channel.cpp3
-rwxr-xr-xsrc/server/game/Chat/Channels/Channel.h3
-rwxr-xr-xsrc/server/game/Chat/Channels/ChannelMgr.cpp2
-rwxr-xr-xsrc/server/game/Chat/Chat.cpp5
-rw-r--r--src/server/game/Chat/Chat.h11
-rw-r--r--src/server/game/Chat/ChatLink.cpp2
-rwxr-xr-xsrc/server/game/Conditions/DisableMgr.cpp1
-rwxr-xr-xsrc/server/game/Entities/Creature/TemporarySummon.cpp2
-rwxr-xr-xsrc/server/game/Entities/Item/Container/Bag.cpp1
-rwxr-xr-xsrc/server/game/Entities/Item/Item.cpp1
-rwxr-xr-xsrc/server/game/Entities/Item/ItemEnchantmentMgr.cpp1
-rw-r--r--src/server/game/Entities/Object/Object.cpp2
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.h20
-rw-r--r--src/server/game/Entities/Player/Player.cpp10
-rw-r--r--src/server/game/Entities/Player/Player.h31
-rwxr-xr-xsrc/server/game/Entities/Transport/Transport.cpp1
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp1
-rwxr-xr-xsrc/server/game/Globals/ObjectAccessor.cpp6
-rwxr-xr-xsrc/server/game/Globals/ObjectAccessor.h7
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp206
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h22
-rwxr-xr-xsrc/server/game/Groups/Group.h6
-rw-r--r--src/server/game/Groups/GroupMgr.cpp2
-rw-r--r--src/server/game/Guilds/Guild.cpp36
-rwxr-xr-xsrc/server/game/Guilds/Guild.h2
-rwxr-xr-xsrc/server/game/Handlers/CalendarHandler.cpp886
-rwxr-xr-xsrc/server/game/Handlers/ChannelHandler.cpp1
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp4
-rwxr-xr-xsrc/server/game/Handlers/CombatHandler.cpp1
-rw-r--r--src/server/game/Handlers/MailHandler.cpp6
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp2
-rw-r--r--src/server/game/Handlers/PetHandler.cpp1
-rwxr-xr-xsrc/server/game/Handlers/SpellHandler.cpp1
-rwxr-xr-xsrc/server/game/Loot/LootMgr.cpp1
-rwxr-xr-xsrc/server/game/Mails/Mail.cpp10
-rwxr-xr-xsrc/server/game/Mails/Mail.h4
-rwxr-xr-xsrc/server/game/Maps/Map.cpp37
-rwxr-xr-xsrc/server/game/Maps/Map.h1
-rwxr-xr-xsrc/server/game/Maps/MapInstanced.cpp3
-rwxr-xr-xsrc/server/game/Maps/MapManager.cpp3
-rw-r--r--src/server/game/Maps/PhaseMgr.cpp15
-rwxr-xr-xsrc/server/game/Miscellaneous/Formulas.h1
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h176
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp1
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp1
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.h1
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp2
-rwxr-xr-xsrc/server/game/Server/WorldSession.h14
-rw-r--r--src/server/game/Server/WorldSocket.cpp2
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellInfo.cpp3
-rw-r--r--src/server/game/Spells/SpellInfo.h1
-rw-r--r--src/server/game/Spells/SpellMgr.cpp12
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp1
-rwxr-xr-xsrc/server/game/Weather/WeatherMgr.cpp1
-rw-r--r--src/server/scripts/Commands/cs_account.cpp1
-rw-r--r--src/server/scripts/Commands/cs_achievement.cpp1
-rw-r--r--src/server/scripts/Commands/cs_ban.cpp1
-rw-r--r--src/server/scripts/Commands/cs_cast.cpp1
-rw-r--r--src/server/scripts/Commands/cs_character.cpp7
-rw-r--r--src/server/scripts/Commands/cs_cheat.cpp9
-rw-r--r--src/server/scripts/Commands/cs_disable.cpp2
-rw-r--r--src/server/scripts/Commands/cs_event.cpp1
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp1
-rw-r--r--src/server/scripts/Commands/cs_go.cpp1
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp1
-rw-r--r--src/server/scripts/Commands/cs_honor.cpp1
-rw-r--r--src/server/scripts/Commands/cs_instance.cpp1
-rw-r--r--src/server/scripts/Commands/cs_learn.cpp1
-rw-r--r--src/server/scripts/Commands/cs_lfg.cpp1
-rw-r--r--src/server/scripts/Commands/cs_list.cpp1
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp1
-rw-r--r--src/server/scripts/Commands/cs_message.cpp1
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp11
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp35
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp1
-rw-r--r--src/server/scripts/Commands/cs_quest.cpp1
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp7
-rw-r--r--src/server/scripts/Commands/cs_server.cpp1
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp5
-rw-r--r--src/server/scripts/Commands/cs_ticket.cpp1
-rw-r--r--src/server/scripts/Commands/cs_titles.cpp1
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp70
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h42
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/arathi_highlands.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/blasted_lands.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/burning_steppes.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/duskwood.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ghostlands.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/hinterlands.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ironforge.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/loch_modan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/redridge_mountains.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/silvermoon_city.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/silverpine_forest.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/stormwind_city.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/tirisfal_glades.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/undercity.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/western_plaguelands.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/westfall.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/wetlands.cpp1
-rw-r--r--src/server/scripts/Events/childrens_week.cpp1
-rw-r--r--src/server/scripts/Examples/example_creature.cpp1
-rw-r--r--src/server/scripts/Examples/example_escort.cpp1
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp1
-rw-r--r--src/server/scripts/Examples/example_misc.cpp1
-rw-r--r--src/server/scripts/Examples/example_spell.cpp1
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp1
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp1
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp1
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp1
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp1
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp1
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp15
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp284
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp16
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h23
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp1
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp1
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp1
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp1
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp1
-rw-r--r--src/server/scripts/Kalimdor/ashenvale.cpp1
-rw-r--r--src/server/scripts/Kalimdor/azshara.cpp1
-rw-r--r--src/server/scripts/Kalimdor/bloodmyst_isle.cpp1
-rw-r--r--src/server/scripts/Kalimdor/darkshore.cpp1
-rw-r--r--src/server/scripts/Kalimdor/desolace.cpp1
-rw-r--r--src/server/scripts/Kalimdor/durotar.cpp1
-rw-r--r--src/server/scripts/Kalimdor/dustwallow_marsh.cpp1
-rw-r--r--src/server/scripts/Kalimdor/felwood.cpp1
-rw-r--r--src/server/scripts/Kalimdor/feralas.cpp1
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp1
-rw-r--r--src/server/scripts/Kalimdor/mulgore.cpp1
-rw-r--r--src/server/scripts/Kalimdor/orgrimmar.cpp1
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp1
-rw-r--r--src/server/scripts/Kalimdor/stonetalon_mountains.cpp1
-rw-r--r--src/server/scripts/Kalimdor/tanaris.cpp1
-rw-r--r--src/server/scripts/Kalimdor/teldrassil.cpp1
-rw-r--r--src/server/scripts/Kalimdor/the_barrens.cpp1
-rw-r--r--src/server/scripts/Kalimdor/thousand_needles.cpp1
-rw-r--r--src/server/scripts/Kalimdor/thunder_bluff.cpp1
-rw-r--r--src/server/scripts/Kalimdor/ungoro_crater.cpp1
-rw-r--r--src/server/scripts/Kalimdor/winterspring.cpp1
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp1
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp104
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp1
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp1
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp1
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp1011
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp3414
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp772
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp1530
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp624
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp341
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp678
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h48
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp1
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp3
-rw-r--r--src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp1
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp1
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp1
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp1
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp1
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp1
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp1
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp1
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp376
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp1
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp1
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp1
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp1
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp1
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp117
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp1
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp1
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp1
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp1
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp1
-rw-r--r--src/server/scripts/Northrend/crystalsong_forest.cpp3
-rw-r--r--src/server/scripts/Northrend/dalaran.cpp1
-rw-r--r--src/server/scripts/Northrend/dragonblight.cpp1
-rw-r--r--src/server/scripts/Northrend/grizzly_hills.cpp1
-rw-r--r--src/server/scripts/Northrend/howling_fjord.cpp1
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp1
-rw-r--r--src/server/scripts/Northrend/isle_of_conquest.cpp1
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp1
-rw-r--r--src/server/scripts/Northrend/storm_peaks.cpp1
-rw-r--r--src/server/scripts/Northrend/wintergrasp.cpp1
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp1
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp1
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp1
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp3
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp1
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp1
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp1
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp1
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp1
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp1
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp1
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp1
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp1
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp1
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp1
-rw-r--r--src/server/scripts/Outland/hellfire_peninsula.cpp1
-rw-r--r--src/server/scripts/Outland/nagrand.cpp1
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp1
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp1
-rw-r--r--src/server/scripts/Outland/shattrath_city.cpp1
-rw-r--r--src/server/scripts/Outland/terokkar_forest.cpp1
-rw-r--r--src/server/scripts/Outland/zangarmarsh.cpp1
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp1
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp1
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp1
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp1
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp1
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp4
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp2
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp1
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp1
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp1
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp1
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp1
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp1
-rwxr-xr-xsrc/server/scripts/World/achievement_scripts.cpp1
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp1
-rw-r--r--src/server/scripts/World/go_scripts.cpp1
-rw-r--r--src/server/scripts/World/guards.cpp1
-rw-r--r--src/server/scripts/World/item_scripts.cpp1
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp1
-rw-r--r--src/server/scripts/World/npc_professions.cpp1
-rw-r--r--src/server/scripts/World/npc_taxi.cpp1
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp6
-rwxr-xr-xsrc/server/shared/Database/Implementation/CharacterDatabase.h5
-rwxr-xr-xsrc/server/shared/Packets/ByteBuffer.h2
825 files changed, 10296 insertions, 7913 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 89bc1f13d18..eb7a7b9f503 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -238,6 +238,47 @@ LOCK TABLES `bugreport` WRITE;
UNLOCK TABLES;
--
+-- Table structure for table `calendar_events`
+--
+
+DROP TABLE IF EXISTS `calendar_events`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `calendar_events` (
+ `id` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `creator` int(10) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `description` varchar(255) NOT NULL DEFAULT '',
+ `type` tinyint(1) unsigned NOT NULL DEFAULT '4',
+ `dungeon` int(10) NOT NULL DEFAULT '-1',
+ `eventtime` int(10) unsigned NOT NULL DEFAULT '0',
+ `flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `time2` int(10) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `calendar_invites`
+--
+
+DROP TABLE IF EXISTS `calendar_invites`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE IF NOT EXISTS `calendar_invites` (
+ `id` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `event` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `invitee` int(10) unsigned NOT NULL DEFAULT '0',
+ `sender` int(10) unsigned NOT NULL DEFAULT '0',
+ `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `statustime` int(10) unsigned NOT NULL DEFAULT '0',
+ `rank` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `text` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
-- Table structure for table `channels`
--
diff --git a/sql/old/2.4.3/00011_characters.sql b/sql/old/2.4.3/00011_characters.sql
index 23776801a66..6108f2e69c4 100644
--- a/sql/old/2.4.3/00011_characters.sql
+++ b/sql/old/2.4.3/00011_characters.sql
@@ -1,5 +1,5 @@
ALTER TABLE `arena_team_member` ADD COLUMN `points_to_add` int(10) UNSIGNED NOT NULL DEFAULT '0';
DROP TABLE IF EXISTS `saved_variables`;
-CREATE TABLE `saved_variables` (
+CREATE TABLE `saved_variables` (
`NextArenaPointDistributionTime` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves';
diff --git a/sql/old/2.4.3/00045_characters.sql b/sql/old/2.4.3/00045_characters.sql
index 9f370ba909c..b5cf28e2f88 100644
--- a/sql/old/2.4.3/00045_characters.sql
+++ b/sql/old/2.4.3/00045_characters.sql
@@ -5,7 +5,7 @@ CREATE TABLE `game_event_save` (
PRIMARY KEY (`event_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE `game_event_condition_save` (
+CREATE TABLE `game_event_condition_save` (
`event_id` mediumint(8) unsigned NOT NULL,
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`done` float default '0',
diff --git a/sql/old/2.4.3/00117_world_scripts.sql b/sql/old/2.4.3/00117_world_scripts.sql
index 794258ba710..e584345b239 100644
--- a/sql/old/2.4.3/00117_world_scripts.sql
+++ b/sql/old/2.4.3/00117_world_scripts.sql
@@ -1,8 +1,8 @@
---
+--
-- NOTE: If you have temporary stored data in table `eventai_localized_texts` make sure to make backup of this before running this update!
-- NOTE: If you have any texts in current eventai_texts and they are not using entries valid for *_texts table, you _will_ get error messages on startup.
-- NOTE: Do not run this update twice, it may create bad data if you choose to do so.
---
+--
-- drop obsolete table
DROP TABLE eventai_localized_texts;
diff --git a/sql/old/2.4.3/00123_world_scripts.sql b/sql/old/2.4.3/00123_world_scripts.sql
index b5f9305e30e..08345f19f2e 100644
--- a/sql/old/2.4.3/00123_world_scripts.sql
+++ b/sql/old/2.4.3/00123_world_scripts.sql
@@ -1,20 +1,20 @@
---
+--
-- trinity_script_texts.sql Contains data for table `script_texts` mainly used in C++ parts.
-- valid entries for table are between -1000000 and -1999999
---
+--
TRUNCATE `script_texts`;
---
+--
-- -1 000 000 First 100 entries are reserved for special use, do not add regular text here.
---
+--
INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES
(-1000000,'<TrinityScript Text Entry Missing!>',0,0,0,'DEFAULT_TEXT');
---
+--
-- Normal text entries. Say/Yell/Whisper/Emote for any regular world object.
---
+--
-- -1 000 100 GENERAL MAPS (not typical instance maps)
@@ -208,8 +208,8 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,
-- -1 585 000 MAGISTER'S TERRACE
---
+--
-- Below just for beautiful view in table, run at own desire
---
+--
-- ALTER TABLE `script_texts` ORDER BY `entry` desc;
diff --git a/sql/old/2.4.3/00247_world.sql b/sql/old/2.4.3/00247_world.sql
index e8fb49e0c29..2c5b137072e 100644
--- a/sql/old/2.4.3/00247_world.sql
+++ b/sql/old/2.4.3/00247_world.sql
@@ -7,8 +7,8 @@ UPDATE creature_template SET minhealth = 2018275, maxhealth = minhealth = 201827
UPDATE creature_template SET minlevel = 73, maxlevel = 73, minhealth = 828555, maxhealth = 828555, armor = 5000, mindmg = 1000, maxdmg = 2000 WHERE entry = 24891;
UPDATE gameobject_template SET scriptname = 'kalocegos_teleporter' WHERE entry = 187055;
-INSERT INTO creature_template_addon (entry) SELECT 24891 FROM creature_template_addon WHERE NOT EXISTS(SELECT * FROM creature_template_addon WHERE entry = 24891) LIMIT 1;
-INSERT INTO creature_template_addon (entry) SELECT 24892 FROM creature_template_addon WHERE NOT EXISTS(SELECT * FROM creature_template_addon WHERE entry = 24892) LIMIT 1;
+INSERT INTO creature_template_addon (entry) SELECT 24891 FROM creature_template_addon WHERE NOT EXISTS(SELECT * FROM creature_template_addon WHERE entry = 24891) LIMIT 1;
+INSERT INTO creature_template_addon (entry) SELECT 24892 FROM creature_template_addon WHERE NOT EXISTS(SELECT * FROM creature_template_addon WHERE entry = 24892) LIMIT 1;
UPDATE creature_template_addon SET auras = '45769 0 45769 1' WHERE entry = 24850;
UPDATE creature_template_addon SET auras = '45769 0 45769 1 44801 0 44801 1 44801 2' WHERE entry = 24891;
UPDATE creature_template_addon SET auras = '45769 0 45769 1 44801 0 44801 1 44801 2 44800 0' WHERE entry = 24892;
diff --git a/sql/old/2.4.3/00262_world.sql b/sql/old/2.4.3/00262_world.sql
index a10ddd7cd28..c48a1a57e87 100644
--- a/sql/old/2.4.3/00262_world.sql
+++ b/sql/old/2.4.3/00262_world.sql
@@ -70,23 +70,23 @@ INSERT INTO trinity_string VALUES
(251,'Text%d (ID: %i): %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
ALTER TABLE event_scripts
DROP datatext,
- ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
+ ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE gameobject_scripts
DROP datatext,
- ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
+ ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE quest_end_scripts
DROP datatext,
- ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
+ ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE quest_start_scripts
DROP datatext,
- ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
+ ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE spell_scripts
DROP datatext,
- ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
+ ADD COLUMN dataint int(11) NOT NULL default '0' AFTER datalong2;
ALTER TABLE creature_movement
DROP `text1`,
diff --git a/sql/old/2.4.3/00329_world.sql b/sql/old/2.4.3/00329_world.sql
index 33f61416fb1..a0ce16529af 100644
--- a/sql/old/2.4.3/00329_world.sql
+++ b/sql/old/2.4.3/00329_world.sql
@@ -18,7 +18,7 @@ CREATE TABLE `spell_proc_event` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
--- Records
+-- Records
-- ----------------------------
INSERT INTO `spell_proc_event` VALUES ('9452', '0', '0', '0', '0', '0', '3', '0', '0');
INSERT INTO `spell_proc_event` VALUES ('34917', '32', '6', '0', '0', '0', '0', '0', '0');
diff --git a/sql/old/2.4.3/00542_characters.sql b/sql/old/2.4.3/00542_characters.sql
index f03c03f900f..9a9703bd122 100644
--- a/sql/old/2.4.3/00542_characters.sql
+++ b/sql/old/2.4.3/00542_characters.sql
@@ -1,74 +1,74 @@
-UPDATE
- `arena_team_member` AS `a`,
+UPDATE
+ `arena_team_member` AS `a`,
(SELECT
`attq1`.`guid` AS `b_guid`,
`atid`, `atpr`
- FROM
- (SELECT
- `guid`,
- `name`,
+ FROM
+ (SELECT
+ `guid`,
+ `name`,
SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1545),' ',-1) AS `atid`,
- SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1550),' ',-1) AS `atpr`
- FROM
- `characters`) AS `attq1`
- INNER JOIN
- `arena_team_member` ON `arenateamid` = `atid` AND
- `arena_team_member`.`guid` = `attq1`.`guid`
- WHERE
- `atid` <> 0)
- AS `b`
-SET
- `a`.`personal_rating` = `b`.`atpr`
-WHERE
- `a`.`arenateamid` = `b`.`atid` AND
+ SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1550),' ',-1) AS `atpr`
+ FROM
+ `characters`) AS `attq1`
+ INNER JOIN
+ `arena_team_member` ON `arenateamid` = `atid` AND
+ `arena_team_member`.`guid` = `attq1`.`guid`
+ WHERE
+ `atid` <> 0)
+ AS `b`
+SET
+ `a`.`personal_rating` = `b`.`atpr`
+WHERE
+ `a`.`arenateamid` = `b`.`atid` AND
`a`.`guid` = `b`.`b_guid`;
-UPDATE
- `arena_team_member` AS `a`,
+UPDATE
+ `arena_team_member` AS `a`,
(SELECT
`attq1`.`guid` AS `b_guid`,
`atid`, `atpr`
- FROM
- (SELECT
- `guid`,
- `name`,
+ FROM
+ (SELECT
+ `guid`,
+ `name`,
SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1551),' ',-1) AS `atid`,
- SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1556),' ',-1) AS `atpr`
- FROM
- `characters`) AS `attq1`
- INNER JOIN
- `arena_team_member` ON `arenateamid` = `atid` AND
- `arena_team_member`.`guid` = `attq1`.`guid`
- WHERE
- `atid` <> 0)
- AS `b`
-SET
- `a`.`personal_rating` = `b`.`atpr`
-WHERE
- `a`.`arenateamid` = `b`.`atid` AND
+ SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1556),' ',-1) AS `atpr`
+ FROM
+ `characters`) AS `attq1`
+ INNER JOIN
+ `arena_team_member` ON `arenateamid` = `atid` AND
+ `arena_team_member`.`guid` = `attq1`.`guid`
+ WHERE
+ `atid` <> 0)
+ AS `b`
+SET
+ `a`.`personal_rating` = `b`.`atpr`
+WHERE
+ `a`.`arenateamid` = `b`.`atid` AND
`a`.`guid` = `b`.`b_guid`;
-UPDATE
- `arena_team_member` AS `a`,
+UPDATE
+ `arena_team_member` AS `a`,
(SELECT
`attq1`.`guid` AS `b_guid`,
`atid`, `atpr`
- FROM
- (SELECT
- `guid`,
- `name`,
+ FROM
+ (SELECT
+ `guid`,
+ `name`,
SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1557),' ',-1) AS `atid`,
- SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1562),' ',-1) AS `atpr`
- FROM
- `characters`) AS `attq1`
- INNER JOIN
- `arena_team_member` ON `arenateamid` = `atid` AND
- `arena_team_member`.`guid` = `attq1`.`guid`
- WHERE
- `atid` <> 0)
- AS `b`
-SET
- `a`.`personal_rating` = `b`.`atpr`
-WHERE
- `a`.`arenateamid` = `b`.`atid` AND
+ SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1562),' ',-1) AS `atpr`
+ FROM
+ `characters`) AS `attq1`
+ INNER JOIN
+ `arena_team_member` ON `arenateamid` = `atid` AND
+ `arena_team_member`.`guid` = `attq1`.`guid`
+ WHERE
+ `atid` <> 0)
+ AS `b`
+SET
+ `a`.`personal_rating` = `b`.`atpr`
+WHERE
+ `a`.`arenateamid` = `b`.`atid` AND
`a`.`guid` = `b`.`b_guid`;
diff --git a/sql/old/2.4.3/00566_world.sql b/sql/old/2.4.3/00566_world.sql
index 6c176e1ad89..39191b2e0d6 100644
--- a/sql/old/2.4.3/00566_world.sql
+++ b/sql/old/2.4.3/00566_world.sql
@@ -1,4 +1,4 @@
-INSERT INTO spell_script_target VALUES
+INSERT INTO spell_script_target VALUES
(8913,1,1200),
(9095,1,6492),
(33655,0,183351),
diff --git a/sql/old/2.4.3/00608_world.sql b/sql/old/2.4.3/00608_world.sql
index 5c052ecd078..b63b063639d 100644
--- a/sql/old/2.4.3/00608_world.sql
+++ b/sql/old/2.4.3/00608_world.sql
@@ -1,4 +1,4 @@
-INSERT INTO `spell_script_target` VALUES
+INSERT INTO `spell_script_target` VALUES
(3730,1,15263),
(6955,1,4946),
(7022,1,4945),
@@ -22,7 +22,7 @@ INSERT INTO `spell_script_target` VALUES
(19749,1,12352), -- used by creature script to check if all troopers are presents, NYI
(19773,1,12018), -- used by Ragnaros to kill Majordomo
(21556,1,13378), -- no longer in game, but still could be used for some FUN-so why not fix it ? ;)
-(21566,1,13416),
+(21566,1,13416),
(22710,1,14349),
(23168,1,14020),
(24062,1,15010),
@@ -45,7 +45,7 @@ INSERT INTO `spell_script_target` VALUES
(30221,1,620),
(30232,1,15691),
(30460,1,17404),
-(30951,1,17533),
+(30951,1,17533),
(31326,1,15608),
(31611,1,17979),
(31727,1,17536),
diff --git a/sql/old/2.4.3/00645_world_scripts.sql b/sql/old/2.4.3/00645_world_scripts.sql
index a4243582180..7e2e078d5bc 100644
--- a/sql/old/2.4.3/00645_world_scripts.sql
+++ b/sql/old/2.4.3/00645_world_scripts.sql
@@ -1,5 +1,5 @@
delete from creature where id=17318;
update creature_template set scriptname='npc_geezle' where entry=17318;
delete from event_scripts where id=10675;
-insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554),
+insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554),
(10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0);
diff --git a/sql/old/2.4.3/00676_world.sql b/sql/old/2.4.3/00676_world.sql
index 2e46f6480f9..393325a727a 100644
--- a/sql/old/2.4.3/00676_world.sql
+++ b/sql/old/2.4.3/00676_world.sql
@@ -1,2 +1,2 @@
-UPDATE `trinity_string` SET `content_default`='Player |cffff0000%s|r kicked by |cffff0000%s|r. Reason: |cffff0000%s|r.' WHERE (`entry`='282');
+UPDATE `trinity_string` SET `content_default`='Player |cffff0000%s|r kicked by |cffff0000%s|r. Reason: |cffff0000%s|r.' WHERE (`entry`='282');
UPDATE `command` SET `help`='Syntax: .kick [$charactername] [$reason]\r\n\r\nKick the given character name from the world with or without reason. If no character name is provided then the selected player (except for yourself) will be kicked. If no reason is provided, default is \"No Reason\".' WHERE (`name`='kick');
diff --git a/sql/old/2.4.3/00725_characters.sql b/sql/old/2.4.3/00725_characters.sql
index 60555c7414c..da7e9cade96 100644
--- a/sql/old/2.4.3/00725_characters.sql
+++ b/sql/old/2.4.3/00725_characters.sql
@@ -1,5 +1,5 @@
-ALTER TABLE `character_ticket` RENAME TO `gm_tickets`;
-ALTER TABLE `gm_tickets` CHANGE `guid` `playerGuid` int(11) unsigned NOT NULL default '0';
-ALTER TABLE `gm_tickets` CHANGE `ticket_id` `guid` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `character_ticket` RENAME TO `gm_tickets`;
+ALTER TABLE `gm_tickets` CHANGE `guid` `playerGuid` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `gm_tickets` CHANGE `ticket_id` `guid` int(11) unsigned NOT NULL default '0';
ALTER TABLE `gm_tickets` CHANGE `ticket_text` `message` text(0) NOT NULL;
ALTER TABLE `gm_tickets` CHANGE `ticket_lastchange` `timestamp` int(10) NOT NULL default '0';
diff --git a/sql/old/2.4.3/00725_world.sql b/sql/old/2.4.3/00725_world.sql
index 38eeead03cb..d5f3ab8a33b 100644
--- a/sql/old/2.4.3/00725_world.sql
+++ b/sql/old/2.4.3/00725_world.sql
@@ -1,24 +1,24 @@
-DELETE FROM `trinity_string` WHERE `entry` IN (290,296,289);
+DELETE FROM `trinity_string` WHERE `entry` IN (290,296,289);
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 2000 AND 2016;
-INSERT INTO trinity_string (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
-(2000, '|cff00ff00New ticket from|r|cffff00ff %s.|r |cff00ff00Ticket entry:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
-(2001, '|cff00ff00Character|r|cffff00ff %s |r|cff00ff00edited his/her ticket:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
-(2002, '|cff00ff00Character|r|cffff00ff %s |r|cff00ff00abandoned ticket entry:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
-(2003, '|cffff00ff %s|r |cff00ff00closed ticket|r |cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
-(2004, 'Ticket %d permanently deleted by %s.', '', '', '', '', '', '', '', ''),
-(2005, 'Ticket not found.', '', '', '', '', '', '', '', ''),
-(2007, 'Please close ticket before deleting it permanently.', '', '', '', '', '', '', '', ''),
-(2008, 'Ticket %d is already assigned to GM %s.', '', '', '', '', '', '', '', ''),
-(2009, '%u Tickets succesfully reloaded from the database.', '', '', '', '', '', '', '', ''),
-(2010, 'Showing list of open tickets.', '', '', '', '', '', '', '', ''),
-(2011, 'Showing list of open tickets whose creator is online.', '', '', '', '', '', '', '', ''),
-(2012, 'Invalid name specified. Name should be that of an online Gamemaster.', '', '', '', '', '', '', '', ''),
-(2013, 'This ticket is already assigned to yourself. To unassign use .ticket unassign %d and then reassign.', '', '', '', '', '', '', '', ''),
-(2014, 'Ticket %d is not assigned, you cannot unassign it.', '', '', '', '', '', '', '', ''),
-(2015, 'You cannot unassign tickets from staffmembers with a higher security level than yourself.', '', '', '', '', '', '', '', ''),
-(2016, 'Cannot close ticket %d, it is assigned to another GM.', '', '', '', '', '', '', '', '');
+INSERT INTO trinity_string (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
+(2000, '|cff00ff00New ticket from|r|cffff00ff %s.|r |cff00ff00Ticket entry:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
+(2001, '|cff00ff00Character|r|cffff00ff %s |r|cff00ff00edited his/her ticket:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
+(2002, '|cff00ff00Character|r|cffff00ff %s |r|cff00ff00abandoned ticket entry:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
+(2003, '|cffff00ff %s|r |cff00ff00closed ticket|r |cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
+(2004, 'Ticket %d permanently deleted by %s.', '', '', '', '', '', '', '', ''),
+(2005, 'Ticket not found.', '', '', '', '', '', '', '', ''),
+(2007, 'Please close ticket before deleting it permanently.', '', '', '', '', '', '', '', ''),
+(2008, 'Ticket %d is already assigned to GM %s.', '', '', '', '', '', '', '', ''),
+(2009, '%u Tickets succesfully reloaded from the database.', '', '', '', '', '', '', '', ''),
+(2010, 'Showing list of open tickets.', '', '', '', '', '', '', '', ''),
+(2011, 'Showing list of open tickets whose creator is online.', '', '', '', '', '', '', '', ''),
+(2012, 'Invalid name specified. Name should be that of an online Gamemaster.', '', '', '', '', '', '', '', ''),
+(2013, 'This ticket is already assigned to yourself. To unassign use .ticket unassign %d and then reassign.', '', '', '', '', '', '', '', ''),
+(2014, 'Ticket %d is not assigned, you cannot unassign it.', '', '', '', '', '', '', '', ''),
+(2015, 'You cannot unassign tickets from staffmembers with a higher security level than yourself.', '', '', '', '', '', '', '', ''),
+(2016, 'Cannot close ticket %d, it is assigned to another GM.', '', '', '', '', '', '', '', '');
DELETE FROM `command` WHERE (`name` LIKE '%ticket%');
-INSERT INTO `command` (`name`,`security`,`help`) VALUES
+INSERT INTO `command` (`name`,`security`,`help`) VALUES
('ticket list','1','Displays a list of open GM tickets.'),
('ticket onlinelist','1','Displays a list of open GM tickets whose owner is online.'),
('ticket viewname','1','Usage: .ticket viewname $creatorname. \r\nReturns details about specified ticket. Ticket must be open and not deleted.'),
diff --git a/sql/old/2.4.3/00871_world.sql b/sql/old/2.4.3/00871_world.sql
index 2ef2e65b763..9b76cd67777 100644
--- a/sql/old/2.4.3/00871_world.sql
+++ b/sql/old/2.4.3/00871_world.sql
@@ -1,6 +1,6 @@
DELETE FROM `trinity_string` WHERE `entry` BETWEEN '288' AND '295';
DELETE FROM `trinity_string` WHERE `entry` BETWEEN '2000' AND '2029';
-INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
+INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
(2000, '|cff00ff00New ticket from|r|cffff00ff %s.|r |cff00ff00Ticket entry:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
(2001, '|cff00ff00Character|r|cffff00ff %s |r|cff00ff00edited his/her ticket:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
(2002, '|cff00ff00Character|r|cffff00ff %s |r|cff00ff00abandoned ticket entry:|r|cffff00ff %d.|r', '', '', '', '', '', '', '', ''),
diff --git a/sql/old/2.4.3/00905_world_scripts.sql b/sql/old/2.4.3/00905_world_scripts.sql
index 5bb26d18baf..211397f5594 100644
--- a/sql/old/2.4.3/00905_world_scripts.sql
+++ b/sql/old/2.4.3/00905_world_scripts.sql
@@ -1,7 +1,7 @@
UPDATE `creature_template` SET `ScriptName`='npc_grimstone' WHERE `entry`=10096;
UPDATE `creature_template` SET `ScriptName`='mob_phalanx' WHERE `entry`=9502;
UPDATE `creature_template` SET `ScriptName`='npc_rocknot' WHERE `entry`=9503;
-
+
DELETE FROM `areatrigger_scripts` WHERE `entry`=1526;
INSERT INTO `areatrigger_scripts` VALUES (1526,'at_ring_of_law');
diff --git a/sql/old/2.4.3/00955_world_scripts.sql b/sql/old/2.4.3/00955_world_scripts.sql
index b1c80e8736c..2c10c54e310 100644
--- a/sql/old/2.4.3/00955_world_scripts.sql
+++ b/sql/old/2.4.3/00955_world_scripts.sql
@@ -37,21 +37,21 @@ INSERT INTO `script_texts` (entry, content_default, type, language, comment) VAL
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000349 and -1000335;
INSERT INTO `script_texts` (entry, content_default, type, comment) VALUES
-(-1000335, 'Let\'s get to the others, and keep an eye open for those wolves cutside...', 0, 'npc_deathstalker_erland
+(-1000335, 'Let\'s get to the others, and keep an eye open for those wolves cutside...', 0, 'npc_deathstalker_erland
- SAY_QUESTACCEPT'),
(-1000336, 'Be careful, $N. Those wolves like to hide among the trees.', 0, 'npc_deathstalker_erland - SAY_START'),
(-1000337, 'A $C attacks!', 0, 'npc_deathstalker_erland - SAY_AGGRO_1'),
(-1000338, 'Beware! I am under attack!', 0, 'npc_deathstalker_erland - SAY_AGGRO_2'),
(-1000339, 'We\'re almost there!', 0, 'npc_deathstalker_erland - SAY_LAST'),
-(-1000340, 'We made it! Thanks, $N. I couldn\'t have gotten without you.', 0, 'npc_deathstalker_erland -
+(-1000340, 'We made it! Thanks, $N. I couldn\'t have gotten without you.', 0, 'npc_deathstalker_erland -
SAY_THANKS'),
(-1000341, 'It\'s good to see you again, Erland. What is your report?', 0, 'npc_deathstalker_erland - SAY_RANE'),
-(-1000342, 'Masses of wolves are to the east, and whoever lived at Malden\'s Orchard is gone.', 0,
+(-1000342, 'Masses of wolves are to the east, and whoever lived at Malden\'s Orchard is gone.', 0,
'npc_deathstalker_erland - SAY_ANSWER'),
(-1000343, 'If I am excused, then I\'d like to check on Quinn...', 0, 'npc_deathstalker_erland - SAY_MOVE_QUINN'),
(-1000344, 'Hello, Quinn. How are you faring?', 0, 'npc_deathstalker_erland - SAY_GREETINGS'),
(-1000345, 'I\'ve been better. Ivar the Foul got the better of me...', 0, 'npc_deathstalker_erland - SAY_QUINN'),
-(-1000346, 'Try to take better care of yourself, Quinn. You were lucky this time.', 0, 'npc_deathstalker_erland -
+(-1000346, 'Try to take better care of yourself, Quinn. You were lucky this time.', 0, 'npc_deathstalker_erland -
SAY_ON_BYE'),
(-1000347, 'Let\'s go before they find out I\'m free!', 0, 'npc_kaya_flathoof - SAY_START'),
diff --git a/sql/old/2.4.3/01069_world_scripts.sql b/sql/old/2.4.3/01069_world_scripts.sql
index 569a1be866a..d337cfa8a7a 100644
--- a/sql/old/2.4.3/01069_world_scripts.sql
+++ b/sql/old/2.4.3/01069_world_scripts.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_script_target` WHERE `entry` IN ('44807', '32307', '32314');
INSERT INTO `spell_script_target` (`entry`,`type`,`targetEntry`) VALUES
-('44807', '1', '24850'),
+('44807', '1', '24850'),
('44807', '1', '24892'),
('32307', '2', '17146'),
('32307', '2', '17147'),
diff --git a/sql/old/3.0.9/00000_3.0.9_old.sql b/sql/old/3.0.9/00000_3.0.9_old.sql
index fa57faa3778..d1ca5e5ae35 100644
--- a/sql/old/3.0.9/00000_3.0.9_old.sql
+++ b/sql/old/3.0.9/00000_3.0.9_old.sql
@@ -402,11 +402,11 @@ INSERT INTO `spell_bonus_data` VALUES
-- 1135_mangos_7207_01_world_creature
ALTER TABLE creature
ADD COLUMN `phaseMask` smallint(5) unsigned NOT NULL default '1' AFTER `spawnMask`;
-
+
-- 1135_mangos_7207_02_world_gameobject
ALTER TABLE gameobject
ADD COLUMN `phaseMask` smallint(5) unsigned NOT NULL default '1' AFTER `spawnMask`;
-
+
-- 1140_mangos_7209_01_world_spell_bonus_data
DELETE FROM `spell_bonus_data` WHERE `entry` IN (53595);
INSERT INTO `spell_bonus_data` VALUES
@@ -1319,7 +1319,7 @@ INSERT INTO spell_bonus_data VALUES
(34913, 0, 0, 0, 'Mage - Molten Armor Triggered Rank 1'),
(43043, 0, 0, 0, 'Mage - Molten Armor Triggered Rank 2'),
(43044, 0, 0, 0, 'Mage - Molten Armor Triggered Rank 3');
-
+
-- 1293_mangos_7249_01_world_spell_proc_event
DELETE FROM `spell_proc_event` WHERE `entry`='60200';
@@ -2267,7 +2267,7 @@ INSERT INTO `command` VALUES
('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.');
-- 1426_mangos_7292_01_world_points_of_interest
-DROP TABLE IF EXISTS `points_of_interest`;
+DROP TABLE IF EXISTS `points_of_interest`;
CREATE TABLE `points_of_interest` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`x` float NOT NULL default '0',
@@ -2280,7 +2280,7 @@ CREATE TABLE `points_of_interest` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- 1426_mangos_7292_02_world_locales_points_of_interest
-DROP TABLE IF EXISTS `locales_points_of_interest`;
+DROP TABLE IF EXISTS `locales_points_of_interest`;
CREATE TABLE `locales_points_of_interest` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`icon_name_loc1` text,
@@ -2489,16 +2489,16 @@ ALTER TABLE spell_area
ALTER TABLE creature_template
ADD COLUMN unk16 float NOT NULL default '1' AFTER InhabitType,
ADD COLUMN unk17 float NOT NULL default '1' AFTER unk16;
-
+
-- 1693_world
-- Update Proc Rate
-INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
('60442', '0', '0', '0', '0', '0', '0', '0', '0', '0', '45'),
('57345', '0', '0', '0', '0', '0', '0', '0', '0', '0', '45'),
('61356', '0', '0', '0', '0', '0', '0', '0', '0', '0', '45'),
('54707', '0', '0', '0', '0', '0', '0', '0', '0', '0', '60'),
('54808', '0', '0', '0', '0', '0', '0', '0', '0', '0', '60');
--- Update Spell Coefficients
+-- Update Spell Coefficients
DELETE FROM `spell_bonus_data` WHERE `entry` IN ('689', '18790', '172', '42223', '42224', '42225', '42226', '42218', '47817', '47818', '1949', '5857', '11681', '11682', '27214', '47822', '27243', '30108', '17962', '6789', '48181', '29722', '5676', '686', '17877', '30283', '1120', '30294', '44425', '42208', '42209', '42210', '42211', '42212', '42213', '42198', '42937', '42938', '11113', '31661', '120', '19750', '635', '25914', '25913', '25903', '27175', '33074', '48820', '48821', '58597', '31803', '53742', '31893', '32221', '53719', '53718', '20167', '20424', '31804', '53733', '31898', '32220', '53726', '53725', '20267', '20187', '20467', '53600', '596', '2944', '8092', '27813', '27817', '27818', '33619');
INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES
('689', '0', '0.143', '0', 'Warlock - Drain Life'),
@@ -2743,7 +2743,7 @@ UPDATE `areatrigger_teleport` SET `access_id` = '52' WHERE `id` IN ('4352','4354
-- 1709_mangos_7393_01_world_game_event
ALTER TABLE `game_event`
ADD COLUMN `holiday` mediumint(8) unsigned NOT NULL default '0' COMMENT 'Client side holiday id' AFTER `length`;
-
+
-- 1724_mangos_7399_01_world_trinity_string
DELETE FROM `trinity_string` WHERE `entry` IN (753, 754, 755);
INSERT INTO `trinity_string` VALUES
@@ -2998,7 +2998,7 @@ UPDATE `command` SET `name`="ahbotoption" WHERE `name`="ahbotoptions";
DELETE FROM `command` WHERE `name` IN ('reload tickets');
DELETE FROM `command` WHERE `name` LIKE "path%";
DELETE FROM `command` WHERE `name` LIKE "wp%";
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('wp load',2,'Syntax: .path load $pathid\nLoad pathid number for selected creature. Creature must have no waypoint data.'),
('wp event',2,'Syntax: .path event $subcommand\nType .path event to see the list of possible subcommands or .help path event $subcommand to see info on subcommands.'),
('wp event add',2,'Syntax: .path event add $subcommand\nAdd new waypoint action in DB.'),
@@ -3110,7 +3110,7 @@ INSERT INTO `command` VALUES
UPDATE `command` SET `name`="ahbotoption" WHERE `name`="ahbotoptions";
DELETE FROM `command` WHERE `name` LIKE "path%";
DELETE FROM `command` WHERE `name` LIKE "wp%";
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('wp load',2,'Syntax: .wp load $pathid\nLoad pathid number for selected creature. Creature must have no waypoint data.'),
('wp event',2,'Syntax: .wp event $subcommand\nType .path event to see the list of possible subcommands or .help path event $subcommand to see info on subcommands.'),
('wp unload',2,'Syntax: .wp unload\nUnload path for selected creature.'),
@@ -3134,7 +3134,7 @@ INSERT INTO `command` VALUES
-- 2276_mangos_7560_01_world_gameobject_template
ALTER TABLE gameobject_template
ADD COLUMN IconName varchar(100) NOT NULL default '' AFTER name;
-
+
-- 2280_mangos_7565_01_world_trinity_string
DELETE FROM `trinity_string` WHERE `entry` IN (1010,1011,1012,1013,1014);
INSERT INTO `trinity_string` VALUES
@@ -3185,7 +3185,7 @@ INSERT INTO `spell_proc_event` VALUES (24905, 0x00, 0, 0x00000000, 0x00000000, 0
-- 2296_world
ALTER TABLE creature_template
ADD COLUMN `VehicleId` mediumint(8) unsigned NOT NULL default '0' AFTER `PetSpellDataId`;
-
+
-- 2339_world - 2346_world
DELETE FROM `command` WHERE `name` LIKE "ahbotoption %";
DELETE FROM `command` WHERE `name` LIKE "ahbotoptions %";
@@ -3338,7 +3338,7 @@ CREATE TABLE `achievement_criteria_data` (
ALTER TABLE `achievement_criteria_data`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`criteria_id`,`type`);
-
+
-- 2551_world_spell_bonus_data
-- Judgement
DELETE FROM `spell_bonus_data` WHERE `entry` = 54158;
@@ -3785,7 +3785,7 @@ INSERT INTO `spell_proc_event` VALUES
-- 2686_world_command
DELETE FROM `command` WHERE `name` IN ('go ticket');
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('go ticket','1','Syntax: .go ticket #ticketid\r\nTeleports the user to the location where $ticketid was created.');
-- 2687_world_spell_proc_event
@@ -4058,7 +4058,7 @@ INSERT INTO `spell_proc_event` VALUES
INSERT INTO trinity_string (entry, content_default)VALUES (6616 , "Pet spells will reset for all players at login. Strongly recommend re-login!");
-- 2907_mangos_7705_01_world_command
-DELETE FROM `command` WHERE `name` IN
+DELETE FROM `command` WHERE `name` IN
('account lock','account password','chardelete','character customize','character delete','character rename','customize','lockaccount','password','rename');
INSERT INTO `command` VALUES
('account lock',0,'Syntax: .account lock [on|off]\r\n\r\nAllow login from account only from current used IP or remove this requirement.'),
@@ -4127,7 +4127,7 @@ INSERT INTO `spell_script_target` () VALUES (46589, 1, 30614);
INSERT INTO `spell_script_target` () VALUES (45839, 1, 25653);
DELETE FROM `creature_template` WHERE entry in (30598, 30614);
-INSERT INTO `creature_template` () VALUES
+INSERT INTO `creature_template` () VALUES
(30598, 0, 4449, 0, 4449, 0, 'Spike Target', '', '', 70, 70, 1, 1, 0, 0, 0, 14, 14, 0, 1, 1, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 0, 1, 0, 0, 128, ''),
(30614, 0, 4449, 0, 4449, 0, 'Spike Target 2', '', '', 70, 70, 1, 1, 0, 0, 0, 14, 14, 0, 1, 1, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 0, 1, 0, 0, 128, '');
diff --git a/sql/old/3.0.9/01426_mangos_7292_01_world_points_of_interest.sql b/sql/old/3.0.9/01426_mangos_7292_01_world_points_of_interest.sql
index 0dcd481bafe..4048df0f99c 100644
--- a/sql/old/3.0.9/01426_mangos_7292_01_world_points_of_interest.sql
+++ b/sql/old/3.0.9/01426_mangos_7292_01_world_points_of_interest.sql
@@ -1,6 +1,6 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7290_01_mangos_command required_7292_01_mangos_points_of_interest bit;*/
-DROP TABLE IF EXISTS `points_of_interest`;
+DROP TABLE IF EXISTS `points_of_interest`;
CREATE TABLE `points_of_interest` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`x` float NOT NULL default '0',
diff --git a/sql/old/3.0.9/01426_mangos_7292_02_world_locales_points_of_interest.sql b/sql/old/3.0.9/01426_mangos_7292_02_world_locales_points_of_interest.sql
index 2a1989ef0be..4240df090f8 100644
--- a/sql/old/3.0.9/01426_mangos_7292_02_world_locales_points_of_interest.sql
+++ b/sql/old/3.0.9/01426_mangos_7292_02_world_locales_points_of_interest.sql
@@ -1,6 +1,6 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7292_01_mangos_points_of_interest required_7292_02_mangos_locales_points_of_interest bit;*/
-DROP TABLE IF EXISTS `locales_points_of_interest`;
+DROP TABLE IF EXISTS `locales_points_of_interest`;
CREATE TABLE `locales_points_of_interest` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`icon_name_loc1` text,
diff --git a/sql/old/3.0.9/01693_world.sql b/sql/old/3.0.9/01693_world.sql
index d3b167561dd..3366e1e7a60 100644
--- a/sql/old/3.0.9/01693_world.sql
+++ b/sql/old/3.0.9/01693_world.sql
@@ -1,12 +1,12 @@
-- Update Proc Rate
-INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
('60442', '0', '0', '0', '0', '0', '0', '0', '0', '0', '45'),
('57345', '0', '0', '0', '0', '0', '0', '0', '0', '0', '45'),
('61356', '0', '0', '0', '0', '0', '0', '0', '0', '0', '45'),
('54707', '0', '0', '0', '0', '0', '0', '0', '0', '0', '60'),
('54808', '0', '0', '0', '0', '0', '0', '0', '0', '0', '60');
--- Update Spell Coefficients
+-- Update Spell Coefficients
DELETE FROM `spell_bonus_data` WHERE `entry` IN ('689', '18790', '172', '42223', '42224', '42225', '42226', '42218', '47817', '47818', '1949', '5857', '11681', '11682', '27214', '47822', '27243', '30108', '17962', '6789', '48181', '29722', '5676', '686', '17877', '30283', '1120', '30294', '44425', '42208', '42209', '42210', '42211', '42212', '42213', '42198', '42937', '42938', '11113', '31661', '120', '19750', '635', '25914', '25913', '25903', '27175', '33074', '48820', '48821', '58597', '31803', '53742', '31893', '32221', '53719', '53718', '20167', '20424', '31804', '53733', '31898', '32220', '53726', '53725', '20267', '20187', '20467', '53600', '596', '2944', '8092', '27813', '27817', '27818', '33619');
INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES
('689', '0', '0.143', '0', 'Warlock - Drain Life'),
diff --git a/sql/old/3.0.9/02131_world.sql b/sql/old/3.0.9/02131_world.sql
index 60b56178bdd..fdf14b88bf4 100644
--- a/sql/old/3.0.9/02131_world.sql
+++ b/sql/old/3.0.9/02131_world.sql
@@ -6,7 +6,7 @@ UPDATE `command` SET `name`="ahbotoption" WHERE `name`="ahbotoptions";
DELETE FROM `command` WHERE `name` IN ('reload tickets');
DELETE FROM `command` WHERE `name` LIKE "path%";
DELETE FROM `command` WHERE `name` LIKE "wp%";
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('wp load',2,'Syntax: .wp load $pathid\nLoad pathid number for selected creature. Creature must have no waypoint data.'),
('wp event',2,'Syntax: .wp event $subcommand\nType .path event to see the list of possible subcommands or .help path event $subcommand to see info on subcommands.'),
('wp event add',2,'Syntax: .wp event add $subcommand\nAdd new waypoint action in DB.'),
diff --git a/sql/old/3.0.9/02254_world.sql b/sql/old/3.0.9/02254_world.sql
index fef5b79a9f6..b7708ebd12f 100644
--- a/sql/old/3.0.9/02254_world.sql
+++ b/sql/old/3.0.9/02254_world.sql
@@ -5,7 +5,7 @@ INSERT INTO `command` VALUES
UPDATE `command` SET `name`="ahbotoption" WHERE `name`="ahbotoptions";
DELETE FROM `command` WHERE `name` LIKE "path%";
DELETE FROM `command` WHERE `name` LIKE "wp%";
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('wp load',2,'Syntax: .wp load $pathid\nLoad pathid number for selected creature. Creature must have no waypoint data.'),
('wp event',2,'Syntax: .wp event $subcommand\nType .path event to see the list of possible subcommands or .help path event $subcommand to see info on subcommands.'),
('wp unload',2,'Syntax: .wp unload\nUnload path for selected creature.'),
diff --git a/sql/old/3.0.9/02339_world.sql b/sql/old/3.0.9/02339_world.sql
index 106de7326fb..28efdf33ed7 100644
--- a/sql/old/3.0.9/02339_world.sql
+++ b/sql/old/3.0.9/02339_world.sql
@@ -1,5 +1,5 @@
DELETE FROM `command` WHERE `name` LIKE "ahbotoption %";
-INSERT INTO `command`(`name`,`security`,`help`) VALUES
+INSERT INTO `command`(`name`,`security`,`help`) VALUES
('ahbotoption ahexpire', '3', '.Syntax: .ahbotoption ahexpire $ahMapID Expire all auctions started by AHbot.'),
('ahbotoption minitems', '3', '.Syntax: .ahbotoption minitems $ahMapID $parameter Set minimum number of items to be sold in the auctionhouse. If value is 0 then minitems=maxitems. If minitems>maxitems then it will be set equal to maxitems.'),
('ahbotoption maxitems', '3', '.Syntax: .ahbotoption maxitems $ahMapID $parameter Set maximum number of items to be sold in the auctionhouse.'),
diff --git a/sql/old/3.0.9/02343_world.sql b/sql/old/3.0.9/02343_world.sql
index 4b2b5e68953..7f92fc27bd1 100644
--- a/sql/old/3.0.9/02343_world.sql
+++ b/sql/old/3.0.9/02343_world.sql
@@ -1,6 +1,6 @@
DELETE FROM `command` WHERE `name` LIKE "ahbotoption %";
DELETE FROM `command` WHERE `name` LIKE "ahbotoptions %";
-INSERT INTO `command`(`name`,`security`,`help`) VALUES
+INSERT INTO `command`(`name`,`security`,`help`) VALUES
('ahbotoptions ahexpire', '3', '.Syntax: .ahbotoptions ahexpire $ahMapID Expire all auctions started by AHbot.'),
('ahbotoptions minitems', '3', '.Syntax: .ahbotoptions minitems $ahMapID $parameter Set minimum number of items to be sold in the auctionhouse. If value is 0 then minitems=maxitems. If minitems>maxitems then it will be set equal to maxitems.'),
('ahbotoptions maxitems', '3', '.Syntax: .ahbotoptions maxitems $ahMapID $parameter Set maximum number of items to be sold in the auctionhouse.'),
diff --git a/sql/old/3.0.9/02686_world_command.sql b/sql/old/3.0.9/02686_world_command.sql
index 4abdd7becf3..c306e4cb548 100644
--- a/sql/old/3.0.9/02686_world_command.sql
+++ b/sql/old/3.0.9/02686_world_command.sql
@@ -1,3 +1,3 @@
DELETE FROM `command` WHERE `name` IN ('go ticket');
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('go ticket','1','Syntax: .go ticket #ticketid\r\nTeleports the user to the location where $ticketid was created.');
diff --git a/sql/old/3.0.9/02907_mangos_7705_01_world_command.sql b/sql/old/3.0.9/02907_mangos_7705_01_world_command.sql
index d1b40e1ba4c..0e34b95d183 100644
--- a/sql/old/3.0.9/02907_mangos_7705_01_world_command.sql
+++ b/sql/old/3.0.9/02907_mangos_7705_01_world_command.sql
@@ -1,6 +1,6 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7662_02_mangos_spell_bonus_data required_7705_01_mangos_command bit;*/
-DELETE FROM `command` WHERE `name` IN
+DELETE FROM `command` WHERE `name` IN
('account lock','account password','chardelete','character customize','character delete','character rename','customize','lockaccount','password','rename');
INSERT INTO `command` VALUES
diff --git a/sql/old/3.0.9/02986_TC1_world.sql b/sql/old/3.0.9/02986_TC1_world.sql
index fd0d6b310ae..8f96656168c 100644
--- a/sql/old/3.0.9/02986_TC1_world.sql
+++ b/sql/old/3.0.9/02986_TC1_world.sql
@@ -6,7 +6,7 @@ INSERT INTO `spell_script_target` () VALUES (46589, 1, 30614);
INSERT INTO `spell_script_target` () VALUES (45839, 1, 25653);
DELETE FROM `creature_template` WHERE entry in (30598, 30614);
-INSERT INTO `creature_template` () VALUES
+INSERT INTO `creature_template` () VALUES
(30598, 0, 4449, 0, 4449, 0, 'Spike Target', '', '', 70, 70, 1, 1, 0, 0, 0, 14, 14, 0, 1, 1, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 0, 1, 0, 0, 128, ''),
(30614, 0, 4449, 0, 4449, 0, 'Spike Target 2', '', '', 70, 70, 1, 1, 0, 0, 0, 14, 14, 0, 1, 1, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 0, 1, 0, 0, 128, '');
diff --git a/sql/old/3.0.9/03070_world_spell_proc_event.sql b/sql/old/3.0.9/03070_world_spell_proc_event.sql
index c382b00429c..c3f88cbba0b 100644
--- a/sql/old/3.0.9/03070_world_spell_proc_event.sql
+++ b/sql/old/3.0.9/03070_world_spell_proc_event.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (20166, 32385, 32392, 32387, 32393, 32394,
13046, 13045, 12317, 13048, 13047, -- Enrage
29724, 29725, 29723); -- Sudden Death
-
+
-- Seal of wisdom
INSERT INTO `spell_proc_event` VALUES
(20166, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 12.000000, 0.000000, 0);
diff --git a/sql/old/3.0.9/03257_world_waypoint_data_converter.sql b/sql/old/3.0.9/03257_world_waypoint_data_converter.sql
index 7da23dcd962..9a2b099f453 100644
--- a/sql/old/3.0.9/03257_world_waypoint_data_converter.sql
+++ b/sql/old/3.0.9/03257_world_waypoint_data_converter.sql
@@ -1,6 +1,6 @@
ALTER TABLE creature_addon ADD INDEX ( `path_id` );
ALTER TABLE waypoint_data ADD INDEX ( `id` );
-
+
ALTER TABLE waypoint_data ADD COLUMN id_old int(10) unsigned NOT NULL default '0' COMMENT 'Creature GUID' AFTER wpguid;
UPDATE waypoint_data SET id_old=id;
diff --git a/sql/old/3.0.9/03320_worldspell_enchant_proc_data.sql b/sql/old/3.0.9/03320_worldspell_enchant_proc_data.sql
index 7f5df5edf14..01598fde244 100644
--- a/sql/old/3.0.9/03320_worldspell_enchant_proc_data.sql
+++ b/sql/old/3.0.9/03320_worldspell_enchant_proc_data.sql
@@ -1,7 +1,7 @@
CREATE TABLE `spell_enchant_proc_data` (
`entry` INT(10) UNSIGNED NOT NULL,
`customChance` INT(10) UNSIGNED NOT NULL DEFAULT '0',
- `PPMChance` FLOAT UNSIGNED NOT NULL DEFAULT '0',
+ `PPMChance` FLOAT UNSIGNED NOT NULL DEFAULT '0',
`procEx` FLOAT UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Spell enchant proc data';
diff --git a/sql/old/3.0.9/03392_world_spell_proc_event.sql b/sql/old/3.0.9/03392_world_spell_proc_event.sql
index d0965c1a7ab..4227cdd9a06 100644
--- a/sql/old/3.0.9/03392_world_spell_proc_event.sql
+++ b/sql/old/3.0.9/03392_world_spell_proc_event.sql
@@ -1,6 +1,6 @@
-DELETE FROM `spell_proc_event` WHERE `entry` IN
+DELETE FROM `spell_proc_event` WHERE `entry` IN
(27521, 55381, 62459, 60176, 60529, 60717, 62147, 57907, 51528, 51529, 51530, 51531, 51532);
-INSERT INTO `spell_proc_event`
+INSERT INTO `spell_proc_event`
(`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`)
VALUES
-- malestorm weapon
diff --git a/sql/old/3.0.9/03609_mangos_7902_01_world_pool_creature.sql b/sql/old/3.0.9/03609_mangos_7902_01_world_pool_creature.sql
index ec1d63a48b0..db680c23985 100644
--- a/sql/old/3.0.9/03609_mangos_7902_01_world_pool_creature.sql
+++ b/sql/old/3.0.9/03609_mangos_7902_01_world_pool_creature.sql
@@ -1,4 +1,4 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7896_01_mangos_creature_template required_7902_01_mangos_pool_creature bit;*/
-ALTER TABLE `pool_creature`
+ALTER TABLE `pool_creature`
ADD INDEX `idx_guid`(`guid`);
diff --git a/sql/old/3.0.9/03609_mangos_7902_02_world_pool_gameobject.sql b/sql/old/3.0.9/03609_mangos_7902_02_world_pool_gameobject.sql
index 3935a14bc23..265000f8dae 100644
--- a/sql/old/3.0.9/03609_mangos_7902_02_world_pool_gameobject.sql
+++ b/sql/old/3.0.9/03609_mangos_7902_02_world_pool_gameobject.sql
@@ -1,4 +1,4 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7902_01_mangos_pool_creature required_7902_02_mangos_pool_gameobject bit;*/
-ALTER TABLE `pool_gameobject`
+ALTER TABLE `pool_gameobject`
ADD INDEX `idx_guid`(`guid`);
diff --git a/sql/old/3.0.9/03810_world_spell_bonus_data.sql b/sql/old/3.0.9/03810_world_spell_bonus_data.sql
index 1803687d6a4..3fd41e02223 100644
--- a/sql/old/3.0.9/03810_world_spell_bonus_data.sql
+++ b/sql/old/3.0.9/03810_world_spell_bonus_data.sql
@@ -29,14 +29,14 @@ UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=27214;
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1427' WHERE `entry`=47822;
UPDATE `spell_bonus_data` SET `dot_bonus` = '0.0949' WHERE `entry`=1949;
UPDATE `spell_bonus_data` SET `ap_bonus` = '0.025' WHERE `entry`=31803;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42208;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42209;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42210;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42211;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42212;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42213;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42198;
-UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42937;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42208;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42209;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42210;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42211;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42212;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42213;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42198;
+UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42937;
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.1437' WHERE `entry`= 42938;
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.2861' WHERE `entry` =49821;
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.2861' WHERE `entry` =53022;
@@ -56,7 +56,7 @@ UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=33074;
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.81' WHERE `entry`=48821;
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.6453' WHERE `entry`=33763;
DELETE FROM `spell_bonus_data` WHERE `entry` IN (53742,61391,47897,50796,50590,58597,974,47757,52986,52987,52988);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES
('53742', '0.013', '0', '0.025', 'Paladin - Blood Corruption'),
('61391', '0.193', '0', '0', 'Druid - Typhoon'),
('47897', '0.1064', '0.0667', '0', 'Warlock - Shadowflame'),
@@ -80,7 +80,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- by nesocip
DELETE FROM `spell_bonus_data` WHERE `entry` IN (48721, 55078, 52212, 47632, 55095, 49184, 45477, 50536, 51373, 51374, 51375);
-INSERT INTO spell_bonus_data( entry, ap_bonus, comments ) VALUES
+INSERT INTO spell_bonus_data( entry, ap_bonus, comments ) VALUES
('48721', '0.04', 'DK - Blood Boil'),
('55078', '0.055', 'DK - Blood Plague'),
('52212', '0.0475', 'DK - Death and Decay'),
diff --git a/sql/old/3.0.9/03851_world_spell.sql b/sql/old/3.0.9/03851_world_spell.sql
index ed10e84808c..2b843c5bdd4 100644
--- a/sql/old/3.0.9/03851_world_spell.sql
+++ b/sql/old/3.0.9/03851_world_spell.sql
@@ -1,6 +1,6 @@
UPDATE `spell_bonus_data` SET `direct_bonus` = '0.6453' WHERE `entry`=33763;
DELETE FROM `spell_script_target` WHERE `entry` IN (48714,57806);
-INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
+INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
('48714', '2', '27237'),
('48714', '2', '27235'),
('48714', '2', '27234'),
diff --git a/sql/old/3.0.9/03877_world_spell_script_target.sql b/sql/old/3.0.9/03877_world_spell_script_target.sql
index 57392c547d3..343d9475cf9 100644
--- a/sql/old/3.0.9/03877_world_spell_script_target.sql
+++ b/sql/old/3.0.9/03877_world_spell_script_target.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_target` WHERE `entry` IN (48743);
-INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
+INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
('48743', '1', '26125');
diff --git a/sql/old/3.0.9/03886_world_script_nexus.sql b/sql/old/3.0.9/03886_world_script_nexus.sql
index eba67418eef..a2413fc0116 100644
--- a/sql/old/3.0.9/03886_world_script_nexus.sql
+++ b/sql/old/3.0.9/03886_world_script_nexus.sql
@@ -18,7 +18,7 @@ UPDATE `instance_template` SET `script`='instance_nexus' WHERE `map`=576;
UPDATE `creature_template` SET `AIName` = 'EventAI' WHERE entry IN (26796, 26798, 26929, 26928, 26930);
DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (26796, 26798, 26929, 26928, 26930);
-INSERT INTO `creature_ai_scripts` VALUES
+INSERT INTO `creature_ai_scripts` VALUES
-- Commander Stoutbeard
( 2679600, 26796, 4, 0, 100, 4, 0, 0, 0, 0, 28, 0, 47543, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Commander Stoutbeard - crystal prison remove'),
( 2679601, 26796, 4, 0, 100, 4, 0, 0, 0, 0, 11, 31403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Commander Stoutbeard - cast battle shout'),
diff --git a/sql/old/3.1.3/03954_world_spell_bonus_data.sql b/sql/old/3.1.3/03954_world_spell_bonus_data.sql
index 6e35ce41a4a..b834f31c9d2 100644
--- a/sql/old/3.1.3/03954_world_spell_bonus_data.sql
+++ b/sql/old/3.1.3/03954_world_spell_bonus_data.sql
@@ -2,7 +2,7 @@ DELETE FROM `spell_bonus_data` WHERE entry IN (31893, 32221, 31898, 32220, 53719
INSERT INTO `spell_bonus_data` VALUES
(31893, 0, 0, 0, "Paladin - Seal of Blood Proc Enemy"),
(32221, 0, 0, 0, "Paladin - Seal of Blood Proc Self"),
-(31898, 0.25, 0, 0.16, "Paladin - Judgement of Blood Enemy"),
+(31898, 0.25, 0, 0.16, "Paladin - Judgement of Blood Enemy"),
(32220, 0.0833, 0, 0.0533, "Paladin - Judgement of Blood Self"),
(53719, 0, 0, 0, "Paladin - Seal of the Martyr Proc Enemy"),
(53718, 0, 0, 0, "Paladin - Seal of the Martyr Proc Self"),
diff --git a/sql/old/3.1.3/03991_world_spell_proc_event.sql b/sql/old/3.1.3/03991_world_spell_proc_event.sql
index 95f9edf6232..4be407b5a53 100644
--- a/sql/old/3.1.3/03991_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/03991_world_spell_proc_event.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (28716, 31221, 31222, 31223, 31571, 31572, 31871, 31872, 44745, 61257, 59089, 59088, 58426, 57352, 57318, 56374, 56372, 56337, 56336, 56333, 54787, 53375, 53376, 47570, 47569, 47537, 47536, 47535, 63108);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
-( 28716, 0x00, 7, 0x00000010, 0x00000000, 0x00000000, 0x00044000, 0x00000000, 0, 0, 0), -- Rejuvenation
+( 28716, 0x00, 7, 0x00000010, 0x00000000, 0x00000000, 0x00044000, 0x00000000, 0, 0, 0), -- Rejuvenation
( 31221, 0x00, 8, 0x00400000, 0x00000000, 0x00000000, 0x00000400, 0x00006001, 0, 0, 0), -- Master of Subtlety (Rank 1)
( 31222, 0x00, 8, 0x00400000, 0x00000000, 0x00000000, 0x00000400, 0x00006001, 0, 0, 0), -- Master of Subtlety (Rank 2)
( 31223, 0x00, 8, 0x00400000, 0x00000000, 0x00000000, 0x00000400, 0x00006001, 0, 0, 0), -- Master of Subtlety (Rank 3)
@@ -11,9 +11,9 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 44745, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00000400, 0x00002000, 0, 0, 0), -- Shattered Barrier (Rank 1)
( 59088, 0x00, 4, 0x00000000, 0x00000002, 0x00000000, 0x00000400, 0x00000000, 0, 0, 0), -- Improved Spell Reflection (Rank 1)
( 59089, 0x00, 4, 0x00000000, 0x00000002, 0x00000000, 0x00000400, 0x00000000, 0, 0, 0), -- Improved Spell Reflection (Rank 2)
-( 58426, 0x00, 8, 0x00400000, 0x00000000, 0x00000000, 0x00000400, 0x00006001, 0, 0, 0), -- Overkill
-( 57352, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Darkmoon Card: Death
-( 56374, 0x00, 3, 0x00000000, 0x00004000, 0x00000000, 0x00000400, 0x00000000, 0, 0, 0), -- Glyph of Icy Veins
+( 58426, 0x00, 8, 0x00400000, 0x00000000, 0x00000000, 0x00000400, 0x00006001, 0, 0, 0), -- Overkill
+( 57352, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Darkmoon Card: Death
+( 56374, 0x00, 3, 0x00000000, 0x00004000, 0x00000000, 0x00000400, 0x00000000, 0, 0, 0), -- Glyph of Icy Veins
( 56372, 0x00, 3, 0x00000000, 0x00000080, 0x00000000, 0x00000400, 0x00000000, 0, 0, 0), -- Glyph of Ice Block
( 54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00000400, 0x00002000, 0, 0, 0), -- Shattered Barrier (Rank 2)
( 53375, 0x00, 10, 0x00000000, 0x00002000, 0x00000000, 0x00000400, 0x00000000, 0, 0, 6), -- Sanctified Wrath (Rank 1)
diff --git a/sql/old/3.1.3/04222_world.sql b/sql/old/3.1.3/04222_world.sql
index 88cba6a134b..7f7f4bf6719 100644
--- a/sql/old/3.1.3/04222_world.sql
+++ b/sql/old/3.1.3/04222_world.sql
@@ -1,4 +1,4 @@
-DELETE FROM spell_pet_auras where `spell` in (56314,56315,56316, 56317, 56318);
+DELETE FROM spell_pet_auras where `spell` in (56314,56315,56316, 56317, 56318);
INSERT INTO spell_pet_auras VALUES
(56314, 0, 0, 57447),
(56314, 1, 0, 57485),
diff --git a/sql/old/3.1.3/04320_world_.sql b/sql/old/3.1.3/04320_world_.sql
index a89e44b88b2..82ad74c2a7c 100644
--- a/sql/old/3.1.3/04320_world_.sql
+++ b/sql/old/3.1.3/04320_world_.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_enchant_proc_data` WHERE `entry` IN (703, 704, 705, 706, 2644, 3772, 3773, 323, 324, 325, 623, 624, 625, 2641, 3768, 3769);
-INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES
+INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES
-- Wound Poison
(703, 0, 21.43,0),
(704, 0, 21.43,0),
diff --git a/sql/old/3.1.3/04321_world.sql b/sql/old/3.1.3/04321_world.sql
index 33365e7aa43..78bd0cf41ca 100644
--- a/sql/old/3.1.3/04321_world.sql
+++ b/sql/old/3.1.3/04321_world.sql
@@ -18,7 +18,7 @@ DELETE FROM `creature_involvedrelation` WHERE `quest`=12727;
INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28913, 12727);
DELETE FROM `spell_script_target` WHERE `entry` IN (48714,57806);
-INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
+INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
('48714', '2', '27237'),
('48714', '2', '27235'),
('48714', '2', '27234'),
diff --git a/sql/old/3.1.3/04356_world_spell_proc_event.sql b/sql/old/3.1.3/04356_world_spell_proc_event.sql
index 1cfa00e989e..d01852a64b8 100644
--- a/sql/old/3.1.3/04356_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04356_world_spell_proc_event.sql
@@ -6,7 +6,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 31871, 0x00, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Divine Purpose (Rank 1)
( 31872, 0x00, 10, 0x00000010, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Divine Purpose (Rank 2)
( 33076, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A22A8, 0x00000000, 0, 0, 0), -- Prayer of Mending (Rank 1)
-( 33953, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00044000, 0x00000000, 0, 0, 45), -- Essence of Life
+( 33953, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00044000, 0x00000000, 0, 0, 45), -- Essence of Life
( 48110, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A22A8, 0x00000000, 0, 0, 0), -- Prayer of Mending (Rank 2)
( 48111, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A22A8, 0x00000000, 0, 0, 0), -- Prayer of Mending (Rank 3)
( 48112, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A22A8, 0x00000000, 0, 0, 0), -- Prayer of Mending (Rank 2)
@@ -21,5 +21,5 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
(51485, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0),
(51486, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0),
( 56372, 0x00, 3, 0x00000000, 0x00000080, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Glyph of Ice Block
-( 56374, 0x00, 3, 0x00000000, 0x00004000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Glyph of Icy Veins
+( 56374, 0x00, 3, 0x00000000, 0x00004000, 0x00000000, 0x00004000, 0x00000000, 0, 0, 0), -- Glyph of Icy Veins
( 61356, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 90); -- Invigorating Earthsiege Diamond Passive
diff --git a/sql/old/3.1.3/04360_world_spell_proc_event.sql b/sql/old/3.1.3/04360_world_spell_proc_event.sql
index eef5674f6fd..b3292e46775 100644
--- a/sql/old/3.1.3/04360_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04360_world_spell_proc_event.sql
@@ -15,7 +15,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 46949, 0x00, 4, 0x00000000, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Safeguard
( 46945, 0x00, 4, 0x00000000, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Safeguard
( 64415, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Val'anyr Hammer of Ancient Kings - Equip Effect
-( 60066, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Rage of the Unraveller
+( 60066, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 45), -- Rage of the Unraveller
( 62115, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Strength of the Titans
( 62114, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Flow of Knowledge
( 62600, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Savage Defense
diff --git a/sql/old/3.1.3/04367_world_spell_proc_event.sql b/sql/old/3.1.3/04367_world_spell_proc_event.sql
index 5eeacab4de3..6f870132611 100644
--- a/sql/old/3.1.3/04367_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04367_world_spell_proc_event.sql
@@ -1,4 +1,4 @@
-DELETE FROM `spell_proc_event` WHERE `entry` IN (51483, 51485, 51486);
+DELETE FROM `spell_proc_event` WHERE `entry` IN (51483, 51485, 51486);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(51483, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0),
(51485, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0),
diff --git a/sql/old/3.1.3/04397_world_playercreateinfo_spell_TDB.sql b/sql/old/3.1.3/04397_world_playercreateinfo_spell_TDB.sql
index 5bc5689bbf1..a648c06fd4d 100644
--- a/sql/old/3.1.3/04397_world_playercreateinfo_spell_TDB.sql
+++ b/sql/old/3.1.3/04397_world_playercreateinfo_spell_TDB.sql
@@ -1,5 +1,5 @@
DELETE FROM `playercreateinfo_spell` WHERE `spell` = 60091;
-INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES
+INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES
(1, 2, 60091, 'Judgement Anti-Parry/Dodge Passive'),
(3, 2, 60091, 'Judgement Anti-Parry/Dodge Passive'),
(10, 2, 60091, 'Judgement Anti-Parry/Dodge Passive'),
diff --git a/sql/old/3.1.3/04409_world_spell_proc_event.sql b/sql/old/3.1.3/04409_world_spell_proc_event.sql
index 76184c6b0c0..012a5020c84 100644
--- a/sql/old/3.1.3/04409_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04409_world_spell_proc_event.sql
@@ -3,11 +3,11 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 31876, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Wise (Rank 1)
( 31877, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Wise (Rank 2)
( 31878, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgements of the Wise (Rank 3)
-( 34258, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Justice
-( 34262, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Mercy
-( 37195, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgement Group Heal
-( 40470, 0x00, 10, 0xC0800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Paladin Tier 6 Trinket
-( 48835, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Justice
+( 34258, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Justice
+( 34262, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Mercy
+( 37195, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Judgement Group Heal
+( 40470, 0x00, 10, 0xC0800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Paladin Tier 6 Trinket
+( 48835, 0x00, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0, 0, 0), -- Justice
( 53380, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- Righteous Vengeance (Rank 1)
( 53381, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- Righteous Vengeance (Rank 2)
( 53382, 0x00, 10, 0x00800000, 0x00020000, 0x00000000, 0x00000000, 0x00040002, 0, 0, 0), -- Righteous Vengeance (Rank 3)
diff --git a/sql/old/3.1.3/04423_world.sql b/sql/old/3.1.3/04423_world.sql
index 638d0d3c9d9..dc11d8f1c7e 100644
--- a/sql/old/3.1.3/04423_world.sql
+++ b/sql/old/3.1.3/04423_world.sql
@@ -1,6 +1,6 @@
UPDATE `creature_template` SET `ScriptName`='EventAI', `modelid_A` = 16925,`modelid_H` = 16925, `minmana` = 1000000,`maxmana` = 1000000, `unit_flags` = 33554434 WHERE `entry` IN(29998, 33753, 33752, 33751, 33750);
DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (29998, 33753, 33752, 33751, 33750);
-INSERT INTO `creature_ai_scripts` VALUES
+INSERT INTO `creature_ai_scripts` VALUES
-- Desecration
( 2999801, 29998, 11, 0, 100, 0, 0, 0, 0, 0, 11, 55741, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Desecration'),
( 2999800, 29998, 1, 0, 100, 0, 1, 1, 0, 0, 11, 55671, 0, 2, 11, 55710, 0, 2, 0, 0, 0, 0, 'Desecration'),
diff --git a/sql/old/3.1.3/04426_world.sql b/sql/old/3.1.3/04426_world.sql
index 0db361d93bf..387886b3359 100644
--- a/sql/old/3.1.3/04426_world.sql
+++ b/sql/old/3.1.3/04426_world.sql
@@ -1,24 +1,24 @@
-DELETE FROM `creature_questrelation` WHERE `quest` = 12754;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12754);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12754;
-INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12754);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12757;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12757);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12754;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12754);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12754;
-INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12754);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12755;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12755);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12756;
-INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12756);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12757;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12757);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12800;
-INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (31082, 12800);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12801;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (31082, 12801);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12801;
+DELETE FROM `creature_questrelation` WHERE `quest` = 12754;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12754);
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12754;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12754);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12757;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12757);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12754;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12754);
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12754;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12754);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12755;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12755);
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12756;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12756);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12757;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12757);
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12800;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (31082, 12800);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12801;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (31082, 12801);
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12801;
INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (29173, 12801);
UPDATE `quest_template` SET `PrevQuestId`=13166 WHERE `entry`=13188;
UPDATE `quest_template` SET `PrevQuestId`=13166 WHERE `entry`=13189;
diff --git a/sql/old/3.1.3/04428_world_spell_proc_event.sql b/sql/old/3.1.3/04428_world_spell_proc_event.sql
index bedb7cabe28..378dabd07b2 100644
--- a/sql/old/3.1.3/04428_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04428_world_spell_proc_event.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (56342, 56343, 56344, 59725);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
-( 59725, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0, 0, 0), -- Improved Spell Reflection
+( 59725, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0, 0, 0), -- Improved Spell Reflection
( 56342, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
( 56343, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0); -- Lock and Load
diff --git a/sql/old/3.1.3/04536_world_spell_proc_event.sql b/sql/old/3.1.3/04536_world_spell_proc_event.sql
index 875313c3e85..b129541d2bf 100644
--- a/sql/old/3.1.3/04536_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04536_world_spell_proc_event.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (53234, 53237, 53238);
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
(53234, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -- Piercing Shots (Rank 1)
(53237, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -- Piercing Shots (Rank 2)
(53238, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0.000000, 0.000000, 0); -- Piercing Shots (Rank 3)
diff --git a/sql/old/3.1.3/04597_world_command.sql b/sql/old/3.1.3/04597_world_command.sql
index 374cbb2c632..e0ac7d06ce7 100644
--- a/sql/old/3.1.3/04597_world_command.sql
+++ b/sql/old/3.1.3/04597_world_command.sql
@@ -1,4 +1,4 @@
DELETE FROM `command` WHERE `name` IN ('reload creature_linked_respawn', 'npc setlink');
-INSERT INTO `command` (`name`,`security`,`help`) VALUES
+INSERT INTO `command` (`name`,`security`,`help`) VALUES
('reload creature_linked_respawn',2,'Syntax: .reload creature_linked_respawn\r\nReload creature_linked_respawn table.'),
('npc setlink',2,'Syntax: .npc setlink $creatureGUID\r\n\r\nLinks respawn of selected creature to the condition that $creatureGUID defined is alive.');
diff --git a/sql/old/3.1.3/04602_world_spell_bonus_data.sql b/sql/old/3.1.3/04602_world_spell_bonus_data.sql
index c10cd0a9df0..3f593f84699 100644
--- a/sql/old/3.1.3/04602_world_spell_bonus_data.sql
+++ b/sql/old/3.1.3/04602_world_spell_bonus_data.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_bonus_data` WHERE `entry`=779;
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
('779', '-1', '-1', '0.063', '-1', 'Druid - Swipe (Bear)');
DELETE FROM `spell_bonus_data` WHERE `entry`=50256;
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(50256, -1, -1, 0.08, -1, 'Pet Skills - Bear (Swipe)');
diff --git a/sql/old/3.1.3/04696_world_spell_proc_event.sql b/sql/old/3.1.3/04696_world_spell_proc_event.sql
index 2fa4a8bf52d..ced445175d2 100644
--- a/sql/old/3.1.3/04696_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/04696_world_spell_proc_event.sql
@@ -1,5 +1,5 @@
-DELETE FROM `spell_proc_event` WHERE `entry` IN (56636,56637,56638);
+DELETE FROM `spell_proc_event` WHERE `entry` IN (56636,56637,56638);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
( 56636, 0x00, 4, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 6), -- Taste for Blood (Rank 1)
( 56637, 0x00, 4, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 6), -- Taste for Blood (Rank 2)
-( 56638, 0x00, 4, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 6); -- Taste for Blood (Rank 3)
+( 56638, 0x00, 4, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 6); -- Taste for Blood (Rank 3)
diff --git a/sql/old/3.1.3/04762_8294_01_mangos_playercreateinfo_action.sql b/sql/old/3.1.3/04762_8294_01_mangos_playercreateinfo_action.sql
index 8a600ddbbe1..4ff157269c1 100644
--- a/sql/old/3.1.3/04762_8294_01_mangos_playercreateinfo_action.sql
+++ b/sql/old/3.1.3/04762_8294_01_mangos_playercreateinfo_action.sql
@@ -41,7 +41,7 @@ INSERT INTO playercreateinfo_action VALUES
DELETE FROM playercreateinfo_action WHERE race=2 AND class=3 AND button IN (4,9);
INSERT INTO playercreateinfo_action VALUES (2,3,9,20572,0);
--- Moved Berserking to correct action bar location for Non-Heroic Troll classes
+-- Moved Berserking to correct action bar location for Non-Heroic Troll classes
DELETE FROM playercreateinfo_action WHERE race=8 AND class IN (3,5,7,8) AND button IN (3,76);
INSERT INTO playercreateinfo_action VALUES
(8,3,3,20554,0),
diff --git a/sql/old/3.1.3/04862_world_linked_spell.sql b/sql/old/3.1.3/04862_world_linked_spell.sql
index a892d0a8490..a4b849483bc 100644
--- a/sql/old/3.1.3/04862_world_linked_spell.sql
+++ b/sql/old/3.1.3/04862_world_linked_spell.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (19574,34471);
-INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`)
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`)
VALUES
( 19574, 24395, 2, 'Beast Within'),
( 19574, 24396, 2, 'Beast Within'),
diff --git a/sql/old/3.1.3/04872_world_scripts.sql b/sql/old/3.1.3/04872_world_scripts.sql
index 0b264f2b8b7..8e178cfc7eb 100644
--- a/sql/old/3.1.3/04872_world_scripts.sql
+++ b/sql/old/3.1.3/04872_world_scripts.sql
@@ -1,5 +1,5 @@
UPDATE `creature_template` SET `ScriptName` = 'npc_skywing' WHERE `entry` = 22424;
-
+
replace into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','0','-3605.719971','4175.580078','-0.031817','0','START_SKYWING');
replace into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','1','-3602.311279','4253.213867','0.562436','0','');
replace into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','2','-3529.151367','4263.524414','-7.871151','0','');
diff --git a/sql/old/3.1.3/04968_world_8361_spell_bonus_data.sql b/sql/old/3.1.3/04968_world_8361_spell_bonus_data.sql
index da386bc870d..5c55fdc826f 100644
--- a/sql/old/3.1.3/04968_world_8361_spell_bonus_data.sql
+++ b/sql/old/3.1.3/04968_world_8361_spell_bonus_data.sql
@@ -1,3 +1,3 @@
-DELETE FROM `spell_bonus_data` WHERE `entry`=40293;
+DELETE FROM `spell_bonus_data` WHERE `entry`=40293;
INSERT INTO `spell_bonus_data` VALUES
(40293, 0, 0, 0, 0, 'Item - Siphon Essence');
diff --git a/sql/old/3.1.3/05036_character_updates_dual_spec.sql b/sql/old/3.1.3/05036_character_updates_dual_spec.sql
index 545420407fe..42cc603c63a 100644
--- a/sql/old/3.1.3/05036_character_updates_dual_spec.sql
+++ b/sql/old/3.1.3/05036_character_updates_dual_spec.sql
@@ -14,14 +14,14 @@ CREATE TABLE `character_glyphs` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Get glyphs from correct field in data blob and insert into character_glyphs as spec = 0
-INSERT INTO `character_glyphs`
+INSERT INTO `character_glyphs`
SELECT `guid`, 0,
(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1288), ' ', -1) AS UNSIGNED)) AS `glyph1`,
(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1289), ' ', -1) AS UNSIGNED)) AS `glyph2`,
(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1290), ' ', -1) AS UNSIGNED)) AS `glyph3`,
(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1291), ' ', -1) AS UNSIGNED)) AS `glyph4`,
(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1292), ' ', -1) AS UNSIGNED)) AS `glyph5`,
-(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1293), ' ', -1) AS UNSIGNED)) AS `glyph6`
+(CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1293), ' ', -1) AS UNSIGNED)) AS `glyph6`
FROM `characters`;
CREATE TABLE `character_talent` (
diff --git a/sql/old/3.1.3/05155_world_scripts_dk.sql b/sql/old/3.1.3/05155_world_scripts_dk.sql
index 341caa75626..37ff93666a0 100644
--- a/sql/old/3.1.3/05155_world_scripts_dk.sql
+++ b/sql/old/3.1.3/05155_world_scripts_dk.sql
@@ -1,16 +1,16 @@
-DELETE FROM `creature_questrelation` WHERE `quest` = 12754;
-INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12754);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12754;
-INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12754);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12755;
+DELETE FROM `creature_questrelation` WHERE `quest` = 12754;
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12754);
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12754;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12754);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12755;
INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12755);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12755;
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12755;
INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (29077, 12755);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12756;
+DELETE FROM `creature_questrelation` WHERE `quest` = 12756;
INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (29077, 12756);
-DELETE FROM `creature_involvedrelation` WHERE `quest` = 12756;
-INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12756);
-DELETE FROM `creature_questrelation` WHERE `quest` = 12757;
+DELETE FROM `creature_involvedrelation` WHERE `quest` = 12756;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES (28914, 12756);
+DELETE FROM `creature_questrelation` WHERE `quest` = 12757;
INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES (28914, 12757);
UPDATE `quest_template` SET `PrevQuestId`=12751 WHERE `entry`=12754;
diff --git a/sql/old/3.1.3/05185_world_scripts_dk.sql b/sql/old/3.1.3/05185_world_scripts_dk.sql
index b13f3315250..e3e36e36fa9 100644
--- a/sql/old/3.1.3/05185_world_scripts_dk.sql
+++ b/sql/old/3.1.3/05185_world_scripts_dk.sql
@@ -49,8 +49,8 @@ INSERT INTO `creature_ai_scripts` VALUES ('2918103', '29181', '0', '0', '100', '
INSERT INTO `creature_ai_scripts` VALUES ('2918104', '29181', '0', '0', '100', '3', '10000', '20000', '10000', '20000', '11', '21807', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Rayne - SPELL_WRATH');
-
-
+
+
DELETE FROM script_texts WHERE entry BETWEEN -1609286 AND -1609201;
INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
-- The Light of Dawn
diff --git a/sql/old/3.1.3/05354_characters_guild_bank_eventlog.sql b/sql/old/3.1.3/05354_characters_guild_bank_eventlog.sql
index 8263b053fab..ac70677d05a 100644
--- a/sql/old/3.1.3/05354_characters_guild_bank_eventlog.sql
+++ b/sql/old/3.1.3/05354_characters_guild_bank_eventlog.sql
@@ -19,6 +19,6 @@ CREATE TABLE `guild_bank_eventlog` (
KEY `guildid_key` (`guildid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--- The reason i decided for such dramatic change is that old guild_bank_eventlog table used `TabId` = 0 for Money events and
+-- The reason i decided for such dramatic change is that old guild_bank_eventlog table used `TabId` = 0 for Money events and
-- used `LogGuid` from 0 to infinity
-- New system uses `LogGuid` from 0 to number defined in config.
diff --git a/sql/old/3.1.3/05354_characters_guild_eventlog.sql b/sql/old/3.1.3/05354_characters_guild_eventlog.sql
index 65cfcf142a5..62e8806aedd 100644
--- a/sql/old/3.1.3/05354_characters_guild_eventlog.sql
+++ b/sql/old/3.1.3/05354_characters_guild_eventlog.sql
@@ -16,6 +16,6 @@ CREATE TABLE `guild_eventlog` (
PRIMARY KEY (`guildid`, `LogGuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'Guild Eventlog';
--- The reason i decided for such dramatic change is that old guild_eventlog table didn't have Primary key and
+-- The reason i decided for such dramatic change is that old guild_eventlog table didn't have Primary key and
-- used LogGuids from 0 to infinity
-- New system uses LogGuids from 0 to number defined in config.
diff --git a/sql/old/3.1.3/05416_world_spell_dbc.sql b/sql/old/3.1.3/05416_world_spell_dbc.sql
index 15af83e4c05..c7ce7c86d41 100644
--- a/sql/old/3.1.3/05416_world_spell_dbc.sql
+++ b/sql/old/3.1.3/05416_world_spell_dbc.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_dbc` WHERE `Id` IN(65142);
-INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `AttributesEx3`, `DurationIndex`, `RangeIndex`, `Effect1`, `EffectImplicitTargetA1`, `EffectApplyAuraName1`, `EffectMiscValue1`, `SpellFamilyName`, `SchoolMask`, `Comment`) VALUES
+INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `AttributesEx3`, `DurationIndex`, `RangeIndex`, `Effect1`, `EffectImplicitTargetA1`, `EffectApplyAuraName1`, `EffectMiscValue1`, `SpellFamilyName`, `SchoolMask`, `Comment`) VALUES
(65142, 3, 22, 0x00000080, 21, 13, 6, 6, 255, 22, 15, 8, 'Crypt Fever - SPELL_AURA_LINKED');
diff --git a/sql/old/3.1.3/05445_world_spell_enchant_proc_data.sql b/sql/old/3.1.3/05445_world_spell_enchant_proc_data.sql
index a4d885a690d..54f79066a97 100644
--- a/sql/old/3.1.3/05445_world_spell_enchant_proc_data.sql
+++ b/sql/old/3.1.3/05445_world_spell_enchant_proc_data.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_enchant_proc_data` WHERE `entry` IN(803, 912, 1894, 1898, 1899, 1900, 2673, 2675, 3225, 3239, 3241, 3273, 3368, 3369, 3789, 3869);
-INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES
+INSERT INTO spell_enchant_proc_data (`entry`, `customChance`, `PPMChance`,`procEx`) VALUES
-- Fiery Weapon
(803, 0, 6.0,0),
-- Demonslaying
diff --git a/sql/old/3.1.3/06420_world_script_waypoint.sql b/sql/old/3.1.3/06420_world_script_waypoint.sql
index b9f989ceb26..9e99b4dafdf 100644
--- a/sql/old/3.1.3/06420_world_script_waypoint.sql
+++ b/sql/old/3.1.3/06420_world_script_waypoint.sql
@@ -37,4 +37,4 @@ INSERT INTO `script_waypoint` VALUES
(8856, 15, -8356.65, 385.247, 122.275, 0, ''),
(8856, 16, -8352.99, 379.932, 122.275, 0, ''),
(8856, 17, -8335.58, 393.519, 122.275, 0, ''),
- (8856, 18, -8334.89, 394.13, 122.274, 0, '');
+ (8856, 18, -8334.89, 394.13, 122.274, 0, '');
diff --git a/sql/old/3.1.3/06518_world_spell_proc_event.sql b/sql/old/3.1.3/06518_world_spell_proc_event.sql
index 70e560d67a9..07814f73609 100644
--- a/sql/old/3.1.3/06518_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/06518_world_spell_proc_event.sql
@@ -1,7 +1,7 @@
-- Add 20 second cooldown for Bloodworms
-DELETE FROM `spell_proc_event` WHERE `entry` IN (49027, 49542, 49543);
-INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
-(49027, 0, 0, 0, 0, 0, 0, 0, 0, 3, 20), -- Bloodworms rank 1
-(49542, 0, 0, 0, 0, 0, 0, 0, 0, 6, 20), -- Bloodworms rank 2
+DELETE FROM `spell_proc_event` WHERE `entry` IN (49027, 49542, 49543);
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(49027, 0, 0, 0, 0, 0, 0, 0, 0, 3, 20), -- Bloodworms rank 1
+(49542, 0, 0, 0, 0, 0, 0, 0, 0, 6, 20), -- Bloodworms rank 2
(49543, 0, 0, 0, 0, 0, 0, 0, 0, 9, 20); -- Bloodworms rank 3
diff --git a/sql/old/3.1.3/06549_world_spell_proc_event.sql b/sql/old/3.1.3/06549_world_spell_proc_event.sql
index a7cae2b1c09..6731935e522 100644
--- a/sql/old/3.1.3/06549_world_spell_proc_event.sql
+++ b/sql/old/3.1.3/06549_world_spell_proc_event.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (16086,16544);
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
( 16086, 0x04, 11, 0x00000000, 0x00040000, 0x00000000, 0x00030000, 0x00000000, 0, 0, 0), -- Improved Fire Nova Totem (Rank 1)
( 16544, 0x04, 11, 0x00000000, 0x00040000, 0x00000000, 0x00030000, 0x00000000, 0, 0, 0); -- Improved Fire Nova Totem (Rank 2)
diff --git a/sql/old/3.2.2a/06589_world_battleground_template.sql b/sql/old/3.2.2a/06589_world_battleground_template.sql
index e636898f200..e0c5e69ec1d 100644
--- a/sql/old/3.2.2a/06589_world_battleground_template.sql
+++ b/sql/old/3.2.2a/06589_world_battleground_template.sql
@@ -1,4 +1,4 @@
-INSERT INTO `battleground_template` ( `id` , `MinPlayersPerTeam` , `MaxPlayersPerTeam` , `MinLvl` , `MaxLvl` , `AllianceStartLoc` , `AllianceStartO` , `HordeStartLoc` , `HordeStartO` )
+INSERT INTO `battleground_template` ( `id` , `MinPlayersPerTeam` , `MaxPlayersPerTeam` , `MinLvl` , `MaxLvl` , `AllianceStartLoc` , `AllianceStartO` , `HordeStartLoc` , `HordeStartO` )
VALUES ( 30, 20, 40, 71, 80, 1485, 0, 1486, 0 ) ;
-INSERT INTO `battleground_template` ( `id` , `MinPlayersPerTeam` , `MaxPlayersPerTeam` , `MinLvl` , `MaxLvl` , `AllianceStartLoc` , `AllianceStartO` , `HordeStartLoc` , `HordeStartO` )
+INSERT INTO `battleground_template` ( `id` , `MinPlayersPerTeam` , `MaxPlayersPerTeam` , `MinLvl` , `MaxLvl` , `AllianceStartLoc` , `AllianceStartO` , `HordeStartLoc` , `HordeStartO` )
VALUES ( 32, 0, 40, 0, 80, 0, 0, 0, 0 ) ;
diff --git a/sql/old/3.2.2a/06665_world_creature_classlevelstats.sql b/sql/old/3.2.2a/06665_world_creature_classlevelstats.sql
index 7d10467a1d4..39645bdbc5e 100644
--- a/sql/old/3.2.2a/06665_world_creature_classlevelstats.sql
+++ b/sql/old/3.2.2a/06665_world_creature_classlevelstats.sql
@@ -148,7 +148,7 @@ INSERT INTO `creature_classlevelstats` (`exp`,`class`,`level`,`basehp`,`basemana
(0,2,20,433,490),
(0,2,21,464,510),
(0,2,22,498,544),
-(0,2,23,533,581),
+(0,2,23,533,581),
(0,2,24,571,618),
(0,2,25,610,655),
(0,2,26,651,693),
diff --git a/sql/old/3.2.2a/06710_world_command.sql b/sql/old/3.2.2a/06710_world_command.sql
index cd489316cc0..40eb82f1146 100644
--- a/sql/old/3.2.2a/06710_world_command.sql
+++ b/sql/old/3.2.2a/06710_world_command.sql
@@ -1,3 +1,3 @@
-UPDATE command
+UPDATE command
SET help = 'Syntax: .account set gmlevel [$account] #level [#realmid]\r\n\r\nSet the security level for targeted player (can\'t be used at self) or for account $name to a level of #level on the realm #realmID.\r\n\r\n#level may range from 0 to 3.\r\n\r\n#reamID may be -1 for all realms.'
WHERE name = 'account set gmlevel';
diff --git a/sql/old/3.2.2a/06710_world_trinity_string.sql b/sql/old/3.2.2a/06710_world_trinity_string.sql
index 6fac607e13b..743c67168e5 100644
--- a/sql/old/3.2.2a/06710_world_trinity_string.sql
+++ b/sql/old/3.2.2a/06710_world_trinity_string.sql
@@ -1,3 +1,3 @@
DELETE FROM `trinity_string` WHERE `entry`=11001;
-INSERT INTO trinity_string (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) VALUES
+INSERT INTO trinity_string (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) VALUES
(11001, 'You have not chosen -1 or the current realmID that you are on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
diff --git a/sql/old/3.2.2a/06751_world_creature_classlevelstats.sql b/sql/old/3.2.2a/06751_world_creature_classlevelstats.sql
index 97ec2dcd6c4..dbc53bb019e 100644
--- a/sql/old/3.2.2a/06751_world_creature_classlevelstats.sql
+++ b/sql/old/3.2.2a/06751_world_creature_classlevelstats.sql
@@ -137,7 +137,7 @@ INSERT INTO `creature_classlevelstats` (`exp`,`class`,`level`,`basehp`,`basemana
(0,2,20,433,490),
(0,2,21,464,510),
(0,2,22,498,544),
-(0,2,23,533,581),
+(0,2,23,533,581),
(0,2,24,571,618),
(0,2,25,610,655),
(0,2,26,651,693),
diff --git a/sql/old/3.2.2a/06859_world_script_texts.sql b/sql/old/3.2.2a/06859_world_script_texts.sql
index 2029fb79915..becafab3006 100644
--- a/sql/old/3.2.2a/06859_world_script_texts.sql
+++ b/sql/old/3.2.2a/06859_world_script_texts.sql
@@ -1,5 +1,5 @@
DELETE FROM `script_texts` WHERE `npc_entry` IN (25504, 25589);
-INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
+INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
(25504, -1750040, 'My father''s aura is quite strong, he cannot be far. Could you be a doll and fight off the monsters wandering throught the mist?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'),
(25504, -1750041, 'Watch out for the monsters!Which way should we go first? Let''s try this way...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'),
(25504, -1750042, 'What could this be?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_mootoo_the_younger'),
diff --git a/sql/old/3.2.2a/06932_characters_character_aura.sql b/sql/old/3.2.2a/06932_characters_character_aura.sql
index 0629d89ffa8..74333daaf82 100644
--- a/sql/old/3.2.2a/06932_characters_character_aura.sql
+++ b/sql/old/3.2.2a/06932_characters_character_aura.sql
@@ -1,4 +1,4 @@
-ALTER TABLE `character_aura`
+ALTER TABLE `character_aura`
ADD COLUMN `base_amount0` INT(11) NOT NULL DEFAULT '0' AFTER `amount2`,
ADD COLUMN `base_amount1` INT(11) NOT NULL DEFAULT '0' AFTER `base_amount0`,
ADD COLUMN `base_amount2` INT(11) NOT NULL DEFAULT '0' AFTER `base_amount1`,
diff --git a/sql/old/3.2.2a/06964_world_creature_classlevelstats.sql b/sql/old/3.2.2a/06964_world_creature_classlevelstats.sql
index 328019077e4..18e05926538 100644
--- a/sql/old/3.2.2a/06964_world_creature_classlevelstats.sql
+++ b/sql/old/3.2.2a/06964_world_creature_classlevelstats.sql
@@ -7,8 +7,8 @@ CREATE TABLE `creature_classlevelstats` (
`level` tinyint(1) NOT NULL,
`class` tinyint(1) NOT NULL,
`basehp0` smallint(2) NOT NULL,
- `basehp1` smallint(2) NOT NULL,
- `basehp2` smallint(2) NOT NULL,
+ `basehp1` smallint(2) NOT NULL,
+ `basehp2` smallint(2) NOT NULL,
`basemana` smallint(2) NOT NULL,
`basearmor` smallint(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/sql/old/3.2.2a/07040_world_spell_linked_spell.sql b/sql/old/3.2.2a/07040_world_spell_linked_spell.sql
index 1c857f08963..e0ceddd76c2 100644
--- a/sql/old/3.2.2a/07040_world_spell_linked_spell.sql
+++ b/sql/old/3.2.2a/07040_world_spell_linked_spell.sql
@@ -1,4 +1,4 @@
-- cast s66747 (Totem of the Earthen Ring) after completing q14100 or q14111 (Relic of the Earthen Ring)
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66744 AND `spell_effect`=66747;
-INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
(66744,66747,0, 'totem of the earthen ring');
diff --git a/sql/old/3.3.2/07394_world_spell_bonus_data.sql b/sql/old/3.3.2/07394_world_spell_bonus_data.sql
index a6f7717201c..9d5cc434d6c 100644
--- a/sql/old/3.3.2/07394_world_spell_bonus_data.sql
+++ b/sql/old/3.3.2/07394_world_spell_bonus_data.sql
@@ -1,6 +1,6 @@
-- Some spell bonus data mostly for DK spells and trinket spells
DELETE FROM `spell_bonus_data` WHERE `entry` IN (63544,54181,55078,55095,50536,52212,51460,48721,45477,54757,45055,60203,60488,45429);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(63544, 0, -1, -1, -1, 'Priest - Empowered Renew'),
(54181, 0, -1, -1, -1, 'Warlock - Fel Synergy'),
(55078, 0, 0, -1, 0.06325, 'Death Knight - Blood Plague'),
diff --git a/sql/old/3.3.2/07465_world_trinity_string.sql b/sql/old/3.3.2/07465_world_trinity_string.sql
index 10ff8de31e7..3e7cb423144 100644
--- a/sql/old/3.3.2/07465_world_trinity_string.sql
+++ b/sql/old/3.3.2/07465_world_trinity_string.sql
@@ -1,5 +1,5 @@
DELETE FROM `trinity_string` WHERE `entry` IN (5024,5025,5026,5027);
-INSERT INTO trinity_string (`entry`, `content_default`) VALUES
+INSERT INTO trinity_string (`entry`, `content_default`) VALUES
(5024, 'Entry: %u'),
(5025, 'Type: %u'),
(5026, 'DisplayID: %u'),
diff --git a/sql/old/3.3.2/07547_world_vehicle_accessory.sql b/sql/old/3.3.2/07547_world_vehicle_accessory.sql
index e929114ed0f..1137d2827aa 100644
--- a/sql/old/3.3.2/07547_world_vehicle_accessory.sql
+++ b/sql/old/3.3.2/07547_world_vehicle_accessory.sql
@@ -25,9 +25,9 @@ INSERT INTO `vehicle_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`d
(33113,33114,2,1, 'Flame Leviathan'),
(33113,33114,3,1, 'Flame Leviathan'),
(33113,33139,7,1, 'Flame Leviathan'),
-(33114,33142,1,1, 'Overload Control Device'),
-(33114,33143,2,1, 'Leviathan Defense Turret'),
-(33214,33218,1,1, 'Mechanolift 304-A'),
+(33114,33142,1,1, 'Overload Control Device'),
+(33114,33143,2,1, 'Leviathan Defense Turret'),
+(33214,33218,1,1, 'Mechanolift 304-A'),
(35637,34705,0,0, 'Marshal Jacob Alerius'' Mount'),
(35633,34702,0,0, 'Ambrose Boltspark''s Mount'),
(35768,34701,0,0, 'Colosos'' Mount'),
diff --git a/sql/old/3.3.2/07604_characters_item_refund_instance.sql b/sql/old/3.3.2/07604_characters_item_refund_instance.sql
index 810d2fa98b4..1b89c17f2e5 100644
--- a/sql/old/3.3.2/07604_characters_item_refund_instance.sql
+++ b/sql/old/3.3.2/07604_characters_item_refund_instance.sql
@@ -1,19 +1,19 @@
DROP TABLE IF EXISTS `item_refund_instance`;
-CREATE TABLE `item_refund_instance` (
-`item_guid` int(11) unsigned NOT NULL COMMENT 'Item GUID',
+CREATE TABLE `item_refund_instance` (
+`item_guid` int(11) unsigned NOT NULL COMMENT 'Item GUID',
`player_guid` int(11) unsigned NOT NULL COMMENT 'Player GUID',
-`paidMoney` int(11) unsigned NOT NULL DEFAULT '0',
-`paidHonor` int(11) unsigned NOT NULL DEFAULT '0',
-`paidArena` int(11) unsigned NOT NULL DEFAULT '0',
-`paidItem_1` mediumint(6) unsigned NOT NULL DEFAULT '0' COMMENT 'item_template.entry',
-`paidItemCount_1` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItem_2` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItemCount_2` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItem_3` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItemCount_3` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItem_4` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItemCount_4` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItem_5` mediumint(6) unsigned NOT NULL DEFAULT '0',
-`paidItemCount_5` mediumint(6) unsigned NOT NULL DEFAULT '0',
-PRIMARY KEY (`item_guid`, `player_guid`)
+`paidMoney` int(11) unsigned NOT NULL DEFAULT '0',
+`paidHonor` int(11) unsigned NOT NULL DEFAULT '0',
+`paidArena` int(11) unsigned NOT NULL DEFAULT '0',
+`paidItem_1` mediumint(6) unsigned NOT NULL DEFAULT '0' COMMENT 'item_template.entry',
+`paidItemCount_1` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItem_2` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItemCount_2` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItem_3` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItemCount_3` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItem_4` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItemCount_4` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItem_5` mediumint(6) unsigned NOT NULL DEFAULT '0',
+`paidItemCount_5` mediumint(6) unsigned NOT NULL DEFAULT '0',
+PRIMARY KEY (`item_guid`, `player_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/sql/old/3.3.2/07609_world_spell_proc_event.sql b/sql/old/3.3.2/07609_world_spell_proc_event.sql
index 2111d9b3f85..78e5377996d 100644
--- a/sql/old/3.3.2/07609_world_spell_proc_event.sql
+++ b/sql/old/3.3.2/07609_world_spell_proc_event.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (42370);
INSERT INTO `spell_proc_event`
-(`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`)
+(`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`)
VALUES ( 42370, 0x00, 11, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Merciless Totem of the Third Wind
diff --git a/sql/old/3.3.2/07611_characters_item_refund_instance.sql b/sql/old/3.3.2/07611_characters_item_refund_instance.sql
index cd859a47ee0..86e397946ef 100644
--- a/sql/old/3.3.2/07611_characters_item_refund_instance.sql
+++ b/sql/old/3.3.2/07611_characters_item_refund_instance.sql
@@ -3,7 +3,7 @@ DROP COLUMN `paidHonor`,
DROP COLUMN `paidArena`,
DROP COLUMN `paidItem_1`,
DROP COLUMN `paidItemCount_1`,
-DROP COLUMN `paidItem_2`,
+DROP COLUMN `paidItem_2`,
DROP COLUMN `paidItemCount_2`,
DROP COLUMN `paidItem_3`,
DROP COLUMN `paidItemCount_3`,
diff --git a/sql/old/3.3.2/07721_world_script_texts.sql b/sql/old/3.3.2/07721_world_script_texts.sql
index 5b349bbb14f..ba3bdfc99c9 100644
--- a/sql/old/3.3.2/07721_world_script_texts.sql
+++ b/sql/old/3.3.2/07721_world_script_texts.sql
@@ -35,7 +35,7 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(26529,-1595029,'Get up! Me not done!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13432,1,0,0,'meathook SAY_SLAY_3'),
(26529,-1595030,'New toys!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13429,1,0,0,'meathook SAY_SPAWN'),
(26529,-1595031,'This... not fun...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13433,1,0,0,'meathook SAY_DEATH'),
--- Salramm the Fleshcrafter
+-- Salramm the Fleshcrafter
(26530,-1595032,'Ah, the entertainment has arrived!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13472,1,0,0,'salramm SAY_AGGRO'),
(26530,-1595033,'You are too late, champion of Lordaeron. The dead shall have their day.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13471,1,0,0,'salramm SAY_SPAWN'),
(26530,-1595034,'The fun is just beginning!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13473,1,0,0,'salramm SAY_SLAY_1'),
@@ -49,7 +49,7 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(26530,-1595042,'Your flesh betrays you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13482,1,0,0,'salramm SAY_STEAL_FLESH_3'),
(26530,-1595043,'Say hello to some friends of mine.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13476,1,0,0,'salramm SAY_SUMMON_GHOULS_1'),
(26530,-1595044,'Come, citizen of Stratholme! Meet your saviors.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13477,1,0,0,'salramm SAY_SUMMON_GHOULS_2'),
--- The Infinite Corruptor
+-- The Infinite Corruptor
-- Couldn't find the value from the audios for `sound` column, not added.
(32273,-1595045,'How dare you interfere with our work here!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'infinite SAY_AGGRO'),
(32273,-1595046,'My work here is finished!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'infinite SAY_FAIL'),
diff --git a/sql/old/3.3.2/07748_world_scriptname.sql b/sql/old/3.3.2/07748_world_scriptname.sql
index 55649c12668..4a7110cc24c 100644
--- a/sql/old/3.3.2/07748_world_scriptname.sql
+++ b/sql/old/3.3.2/07748_world_scriptname.sql
@@ -1,5 +1,5 @@
DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5284,5285,5286,5287,4871,4872,4873,5108);
-INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
+INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5284, 'at_aldurthar_gate'),
(5285, 'at_aldurthar_gate'),
(5286, 'at_aldurthar_gate'),
diff --git a/sql/old/3.3.2/07760_world_spell_group_stack_rules.sql b/sql/old/3.3.2/07760_world_spell_group_stack_rules.sql
index d5c38078e81..3ee3d5a4b4f 100644
--- a/sql/old/3.3.2/07760_world_spell_group_stack_rules.sql
+++ b/sql/old/3.3.2/07760_world_spell_group_stack_rules.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_group_stack_rules` WHERE `group_id` IN (1015,1016,1019,1022,1025,1029,1033,1036,1043,1048,1051,1054,1057,1059,1064,1068,1074,1079,1082,1085,1088,1090,1093,1096,1099,1103,1046);
-INSERT INTO `spell_group_stack_rules` (`group_id`,`stack_rule`) VALUES
+INSERT INTO `spell_group_stack_rules` (`group_id`,`stack_rule`) VALUES
(1015,1),
(1016,1),
(1019,1),
diff --git a/sql/old/3.3.2/07797_world_scriptname.sql b/sql/old/3.3.2/07797_world_scriptname.sql
index a68aaa4f164..3c58563bc5d 100644
--- a/sql/old/3.3.2/07797_world_scriptname.sql
+++ b/sql/old/3.3.2/07797_world_scriptname.sql
@@ -1,3 +1,3 @@
-UPDATE `instance_template` SET `script`='instance_blackrock_spire' WHERE `map`=229;
+UPDATE `instance_template` SET `script`='instance_blackrock_spire' WHERE `map`=229;
UPDATE `creature_template` SET `ScriptName`='npc_rookey_whelp' WHERE `entry`=10161;
UPDATE `gameobject_template` SET `ScriptName`='go_rookey_egg' WHERE `entry`=175124;
diff --git a/sql/old/3.3.3a/07906_characters_character_stats.sql b/sql/old/3.3.3a/07906_characters_character_stats.sql
index 82aebbbaf51..35094c8fe2a 100644
--- a/sql/old/3.3.3a/07906_characters_character_stats.sql
+++ b/sql/old/3.3.3a/07906_characters_character_stats.sql
@@ -24,7 +24,7 @@ CREATE TABLE `character_stats` (
`blockPct` float UNSIGNED NOT NULL default '0',
`dodgePct` float UNSIGNED NOT NULL default '0',
`parryPct` float UNSIGNED NOT NULL default '0',
- `critPct` float UNSIGNED NOT NULL default '0',
+ `critPct` float UNSIGNED NOT NULL default '0',
`rangedCritPct` float UNSIGNED NOT NULL default '0',
`spellCritPct` float UNSIGNED NOT NULL default '0',
`attackPower` int(10) UNSIGNED NOT NULL default '0',
diff --git a/sql/old/3.3.3a/07919_characters_worldstates.sql b/sql/old/3.3.3a/07919_characters_worldstates.sql
index b265aebb92e..7605db55536 100644
--- a/sql/old/3.3.3a/07919_characters_worldstates.sql
+++ b/sql/old/3.3.3a/07919_characters_worldstates.sql
@@ -1,4 +1,4 @@
DELETE FROM `worldstates` WHERE `entry` IN (20001,20002);
-INSERT INTO `worldstates` (`entry`,`value`, `comment`) VALUES
+INSERT INTO `worldstates` (`entry`,`value`, `comment`) VALUES
(20001, 0, 'NextArenaPointDistributionTime'),
(20002, 0, 'NextWeeklyQuestResetTime');
diff --git a/sql/old/3.3.3a/07982_world_spell_proc_event.sql b/sql/old/3.3.3a/07982_world_spell_proc_event.sql
index 0f21c884c75..3b92abc6dd9 100644
--- a/sql/old/3.3.3a/07982_world_spell_proc_event.sql
+++ b/sql/old/3.3.3a/07982_world_spell_proc_event.sql
@@ -1,4 +1,4 @@
-- Make Divine Guardian proc on Divine Sacrifice only
DELETE FROM `spell_proc_event` WHERE `entry`=53530;
-INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
(53530,1,10,0x0000,0x0000,0x0004,0x0400,0x0001,0,100,0);
diff --git a/sql/old/3.3.3a/08052_world_script_texts.sql b/sql/old/3.3.3a/08052_world_script_texts.sql
index 986e3852a33..69c4bd80818 100644
--- a/sql/old/3.3.3a/08052_world_script_texts.sql
+++ b/sql/old/3.3.3a/08052_world_script_texts.sql
@@ -1,4 +1,4 @@
DELETE FROM `script_texts` WHERE `npc_entry`= 29434;
-INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
-('29434', '-1800042', 'Let me know when you''re ready. I''d prefer sooner than later... what with the slowly dying from poison and all. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '0', '0', '0', 'injured goblin SAY_QUEST_START'),
+INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
+('29434', '-1800042', 'Let me know when you''re ready. I''d prefer sooner than later... what with the slowly dying from poison and all. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '0', '0', '0', 'injured goblin SAY_QUEST_START'),
('29434', '-1800043', 'I''m going to bring the venom sack to Ricket... and then... you know... collapse. Thank you for helping me! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '0', '0', '0', 'injured goblin SAY_END_WP_REACHED');
diff --git a/sql/old/3.3.3a/08197_world_spell_bonus_data.sql b/sql/old/3.3.3a/08197_world_spell_bonus_data.sql
index 2a6deb43a30..f746fb69ed8 100644
--- a/sql/old/3.3.3a/08197_world_spell_bonus_data.sql
+++ b/sql/old/3.3.3a/08197_world_spell_bonus_data.sql
@@ -1,3 +1,3 @@
DELETE FROM spell_bonus_data WHERE entry = 52042;
-INSERT INTO spell_bonus_data (entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus, comments) VALUES
+INSERT INTO spell_bonus_data (entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus, comments) VALUES
(52042, 0.0445, 0.0445, -1, -1, 'Shaman - Healing Stream Totem Triggered Heal');
diff --git a/sql/old/3.3.3a/08214_world_command.sql b/sql/old/3.3.3a/08214_world_command.sql
index 91fe023ce4d..d3a1d453e43 100644
--- a/sql/old/3.3.3a/08214_world_command.sql
+++ b/sql/old/3.3.3a/08214_world_command.sql
@@ -1,3 +1,3 @@
DELETE FROM `command` WHERE `name` IN ('reload creature_template');
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('reload creature_template','3','Syntax: .reload creature_template $entry\r\nReload the specified creature''s template.');
diff --git a/sql/old/3.3.3a/08244_world_spell_dbc.sql b/sql/old/3.3.3a/08244_world_spell_dbc.sql
index b0b812301c1..52f4d8dd6b1 100644
--- a/sql/old/3.3.3a/08244_world_spell_dbc.sql
+++ b/sql/old/3.3.3a/08244_world_spell_dbc.sql
@@ -1,4 +1,4 @@
DELETE FROM spell_dbc WHERE Id IN (24899, 24900);
-INSERT INTO spell_dbc (Id, Dispel, Mechanic, Attributes, AttributesEx, AttributesEx2, AttributesEx3, AttributesEx4, AttributesEx5, Targets, CastingTimeIndex, AuraInterruptFlags, ProcFlags, ProcChance, ProcCharges, MaxLevel, BaseLevel, SpellLevel, DurationIndex, RangeIndex, StackAmount, EquippedItemClass, EquippedItemSubClassMask, EquippedItemInventoryTypeMask, Effect1, Effect2, Effect3, EffectDieSides1, EffectDieSides2, EffectDieSides3, EffectRealPointsPerLevel1, EffectRealPointsPerLevel2, EffectRealPointsPerLevel3, EffectBasePoints1, EffectBasePoints2, EffectBasePoints3, EffectMechanic1, EffectMechanic2, EffectMechanic3, EffectImplicitTargetA1, EffectImplicitTargetA2, EffectImplicitTargetA3, EffectImplicitTargetB1, EffectImplicitTargetB2, EffectImplicitTargetB3, EffectRadiusIndex1, EffectRadiusIndex2, EffectRadiusIndex3, EffectApplyAuraName1, EffectApplyAuraName2, EffectApplyAuraName3, EffectAmplitude1, EffectAmplitude2, EffectAmplitude3, EffectMultipleValue1, EffectMultipleValue2, EffectMultipleValue3, EffectMiscValue1, EffectMiscValue2, EffectMiscValue3, EffectMiscValueB1, EffectMiscValueB2, EffectMiscValueB3, EffectTriggerSpell1, EffectTriggerSpell2, EffectTriggerSpell3, EffectSpellClassMaskA1, EffectSpellClassMaskA2, EffectSpellClassMaskA3, EffectSpellClassMaskB1, EffectSpellClassMaskB2, EffectSpellClassMaskB3, EffectSpellClassMaskC1, EffectSpellClassMaskC2, EffectSpellClassMaskC3, MaxTargetLevel, SpellFamilyName, SpellFamilyFlags1, SpellFamilyFlags2, SpellFamilyFlags3, MaxAffectedTargets, DmgClass, PreventionType, DmgMultiplier1, DmgMultiplier2, DmgMultiplier3, AreaGroupId, SchoolMask, Comment) VALUES
+INSERT INTO spell_dbc (Id, Dispel, Mechanic, Attributes, AttributesEx, AttributesEx2, AttributesEx3, AttributesEx4, AttributesEx5, Targets, CastingTimeIndex, AuraInterruptFlags, ProcFlags, ProcChance, ProcCharges, MaxLevel, BaseLevel, SpellLevel, DurationIndex, RangeIndex, StackAmount, EquippedItemClass, EquippedItemSubClassMask, EquippedItemInventoryTypeMask, Effect1, Effect2, Effect3, EffectDieSides1, EffectDieSides2, EffectDieSides3, EffectRealPointsPerLevel1, EffectRealPointsPerLevel2, EffectRealPointsPerLevel3, EffectBasePoints1, EffectBasePoints2, EffectBasePoints3, EffectMechanic1, EffectMechanic2, EffectMechanic3, EffectImplicitTargetA1, EffectImplicitTargetA2, EffectImplicitTargetA3, EffectImplicitTargetB1, EffectImplicitTargetB2, EffectImplicitTargetB3, EffectRadiusIndex1, EffectRadiusIndex2, EffectRadiusIndex3, EffectApplyAuraName1, EffectApplyAuraName2, EffectApplyAuraName3, EffectAmplitude1, EffectAmplitude2, EffectAmplitude3, EffectMultipleValue1, EffectMultipleValue2, EffectMultipleValue3, EffectMiscValue1, EffectMiscValue2, EffectMiscValue3, EffectMiscValueB1, EffectMiscValueB2, EffectMiscValueB3, EffectTriggerSpell1, EffectTriggerSpell2, EffectTriggerSpell3, EffectSpellClassMaskA1, EffectSpellClassMaskA2, EffectSpellClassMaskA3, EffectSpellClassMaskB1, EffectSpellClassMaskB2, EffectSpellClassMaskB3, EffectSpellClassMaskC1, EffectSpellClassMaskC2, EffectSpellClassMaskC3, MaxTargetLevel, SpellFamilyName, SpellFamilyFlags1, SpellFamilyFlags2, SpellFamilyFlags3, MaxAffectedTargets, DmgClass, PreventionType, DmgMultiplier1, DmgMultiplier2, DmgMultiplier3, AreaGroupId, SchoolMask, Comment) VALUES
(24899, 0, 0, 400, 1024, 0, 0, 2097152, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Bear Effect'),
(24900, 0, 0, 400, 1024, 0, 0, 2097152, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 21, 1, 0, -1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Heart of the Wild Cat Effect');
diff --git a/sql/old/3.3.3a/08263_world_script_texts.sql b/sql/old/3.3.3a/08263_world_script_texts.sql
index 3eb5328aff1..31be0564a10 100644
--- a/sql/old/3.3.3a/08263_world_script_texts.sql
+++ b/sql/old/3.3.3a/08263_world_script_texts.sql
@@ -1,6 +1,6 @@
-- King Ymiron voice by SnakeIce
DELETE FROM `script_texts` WHERE `npc_entry`=26861;
-INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(26861,-1575028, 'You invade my home and then dare to challenge me? I will tear the hearts from your chests and offer them as gifts to the death god! Rualg nja gaborr!' ,13609,1,0,0, 'King Ymirom - SAY_AGGRO'),
(26861,-1575029, 'Your death is only the beginning!' ,13614,1,0,0, 'King Ymirom - SAY_SLAY_1'),
(26861,-1575030, 'You have failed your people!' ,13615,1,0,0, 'King Ymirom - SAY_SLAY_2'),
diff --git a/sql/old/3.3.3a/08293_world_spell_dbc.sql b/sql/old/3.3.3a/08293_world_spell_dbc.sql
index 8bfabc46696..1c35a95da4e 100644
--- a/sql/old/3.3.3a/08293_world_spell_dbc.sql
+++ b/sql/old/3.3.3a/08293_world_spell_dbc.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_dbc` WHERE `id`IN (34448,34452);
-INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
(34448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Serverside spell orb of translocation (gobjid=180911)' ),
(34452,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Serverside spell orb of translocation (gobjid=180912)' );
diff --git a/sql/old/3.3.3a/08300_characters_worldstates.sql b/sql/old/3.3.3a/08300_characters_worldstates.sql
index 764fadbee71..1909b1432bd 100644
--- a/sql/old/3.3.3a/08300_characters_worldstates.sql
+++ b/sql/old/3.3.3a/08300_characters_worldstates.sql
@@ -1,3 +1,3 @@
DELETE FROM `worldstates` WHERE `entry` IN (20003);
-INSERT INTO `worldstates` (`entry`,`value`, `comment`) VALUES
+INSERT INTO `worldstates` (`entry`,`value`, `comment`) VALUES
(20003, 0, 'NextBGRandomDailyResetTime');
diff --git a/sql/old/3.3.3a/08348_world_script_texts.sql b/sql/old/3.3.3a/08348_world_script_texts.sql
index af3d17c700b..bd572845474 100644
--- a/sql/old/3.3.3a/08348_world_script_texts.sql
+++ b/sql/old/3.3.3a/08348_world_script_texts.sql
@@ -1,6 +1,6 @@
-- Skadi the Ruthless voice
DELETE FROM `script_texts` WHERE `npc_entry`=26693;
-INSERT INTO `script_texts` VALUES
+INSERT INTO `script_texts` VALUES
(26693,-1575004, "What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13497,1,0,0, "Skadi - SAY_AGGRO"),
(26693,-1575005, "Not so brash now, are you?" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13504,1,0,0, "Skadi - SAY_KILL_1"),
(26693,-1575006, "I'll mount your skull from the highest tower!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13505,1,0,0, "Skadi - SAY_KILL_2"),
diff --git a/sql/old/3.3.3a/08358_world_spell_linked_spell.sql b/sql/old/3.3.3a/08358_world_spell_linked_spell.sql
index f86328d30e0..ab69f62acf8 100644
--- a/sql/old/3.3.3a/08358_world_spell_linked_spell.sql
+++ b/sql/old/3.3.3a/08358_world_spell_linked_spell.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (69381,69378,69377);
-INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(69381, 72588, 1, 'Drums of the Wild'),
(69378, 72586, 1, 'Drums of the Forgotten Kings'),
(69377, 72590, 1, 'Runescroll of Fortitude');
diff --git a/sql/old/3.3.3a/08373_world_spell_proc_event.sql b/sql/old/3.3.3a/08373_world_spell_proc_event.sql
index 20f87b3f1f9..5cda0493132 100644
--- a/sql/old/3.3.3a/08373_world_spell_proc_event.sql
+++ b/sql/old/3.3.3a/08373_world_spell_proc_event.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (70807);
-INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
( 70807, 0, 11, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0, 100, 0); -- Item - Shaman T10 Restoration 2P Bonus
diff --git a/sql/old/3.3.3a/08397_world_command.sql b/sql/old/3.3.3a/08397_world_command.sql
index f90f37e7eab..a993193e25d 100644
--- a/sql/old/3.3.3a/08397_world_command.sql
+++ b/sql/old/3.3.3a/08397_world_command.sql
@@ -1,4 +1,4 @@
DELETE FROM `command` WHERE `name` IN ('instance open','instance close');
-INSERT INTO `command` (`name`, `security`, `help`) VALUES
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
('instance open', 3, 'Syntax: .instance open mapid [normal|heroic|10normal|10heroic|25normal|25heroic]'),
('instance close', 3, 'Syntax: .instance close mapid [normal|heroic|10normal|10heroic|25normal|25heroic]');
diff --git a/sql/old/3.3.3a/08512_world_command.sql b/sql/old/3.3.3a/08512_world_command.sql
index 6293503d492..b093e60ad9a 100644
--- a/sql/old/3.3.3a/08512_world_command.sql
+++ b/sql/old/3.3.3a/08512_world_command.sql
@@ -1,3 +1,3 @@
DELETE FROM `command` WHERE `name`='reload creature_onkill_reputation';
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('reload creature_onkill_reputation','3','Syntax: .reload creature_onkill_reputation\r\nReload creature_onkill_reputation table.');
diff --git a/sql/old/3.3.3a/08586_world_command.sql b/sql/old/3.3.3a/08586_world_command.sql
index b554755df08..7c668b77581 100644
--- a/sql/old/3.3.3a/08586_world_command.sql
+++ b/sql/old/3.3.3a/08586_world_command.sql
@@ -1,4 +1,4 @@
DELETE FROM `command` WHERE `name` IN ('reload item_set_names','reload locales_item_set_name');
-INSERT INTO `command` VALUES
+INSERT INTO `command` VALUES
('reload item_set_names',3,'Syntax: .reload item_set_names\nReload item_set_names table.'),
('reload locales_item_set_name',3,'Syntax: .reload locales_item_set_name\nReload locales_item_set_name table.');
diff --git a/sql/old/3.3.5a/09043_world_spell_script_names.sql b/sql/old/3.3.5a/09043_world_spell_script_names.sql
index d3664d02652..a5b0c75c830 100644
--- a/sql/old/3.3.5a/09043_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09043_world_spell_script_names.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=11958 AND `ScriptName`='spell_mage_cold_snap';
DELETE FROM `spell_script_names` WHERE `spell_id`=32826 AND `ScriptName`='spell_mage_polymorph_visual';
DELETE FROM `spell_script_names` WHERE `spell_id`=31687 AND `ScriptName`='spell_mage_summon_water_elemental';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(11958,'spell_mage_cold_snap'),
(32826,'spell_mage_polymorph_visual'),
(31687,'spell_mage_summon_water_elemental');
diff --git a/sql/old/3.3.5a/09059_world_spell_script_names.sql b/sql/old/3.3.5a/09059_world_spell_script_names.sql
index 1bbc34cc6aa..131af872e0b 100644
--- a/sql/old/3.3.5a/09059_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09059_world_spell_script_names.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=53271 AND `ScriptName`='spell_hun_masters_call';
DELETE FROM `spell_script_names` WHERE `spell_id`=53478 AND `ScriptName`='spell_hun_last_stand_pet';
DELETE FROM `spell_script_names` WHERE `spell_id`=23989 AND `ScriptName`='spell_hun_readiness';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(53271,'spell_hun_masters_call'),
(53478,'spell_hun_last_stand_pet'),
(23989,'spell_hun_readiness');
diff --git a/sql/old/3.3.5a/09122_world_spell_script_names.sql b/sql/old/3.3.5a/09122_world_spell_script_names.sql
index 068b1c34815..38b888ed797 100644
--- a/sql/old/3.3.5a/09122_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09122_world_spell_script_names.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=37877 AND `ScriptName`='spell_pal_blessing_of_faith';
DELETE FROM `spell_script_names` WHERE `spell_id`=-20473 AND `ScriptName`='spell_pal_holy_shock';
DELETE FROM `spell_script_names` WHERE `spell_id`=20425 AND `ScriptName`='spell_pal_judgement_of_command';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(37877,'spell_pal_blessing_of_faith'),
(-20473,'spell_pal_holy_shock'),
(20425,'spell_pal_judgement_of_command');
diff --git a/sql/old/3.3.5a/09144_world_spell_script_names.sql b/sql/old/3.3.5a/09144_world_spell_script_names.sql
index ef3c4179713..afd5ffb2e3c 100644
--- a/sql/old/3.3.5a/09144_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09144_world_spell_script_names.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=21977 AND `ScriptName`='spell_warr_warriors_wrath';
DELETE FROM `spell_script_names` WHERE `spell_id`=12975 AND `ScriptName`='spell_warr_last_stand';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(12975,'spell_warr_last_stand'),
(21977,'spell_warr_warriors_wrath');
diff --git a/sql/old/3.3.5a/09149_world_spell_script_names.sql b/sql/old/3.3.5a/09149_world_spell_script_names.sql
index 5ca5b8c2f5a..b2cb32d6160 100644
--- a/sql/old/3.3.5a/09149_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09149_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=55709 AND `ScriptName`='spell_hun_pet_heart_of_the_phoenix';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(55709, 'spell_hun_pet_heart_of_the_phoenix');
diff --git a/sql/old/3.3.5a/09162_world_spell_script_names.sql b/sql/old/3.3.5a/09162_world_spell_script_names.sql
index 47f46b6d0dc..9d445ab663a 100644
--- a/sql/old/3.3.5a/09162_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09162_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=54044 AND `ScriptName`='spell_hun_pet_carrion_feeder';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(54044, 'spell_hun_pet_carrion_feeder');
diff --git a/sql/old/3.3.5a/09205_world_spell_script_names.sql b/sql/old/3.3.5a/09205_world_spell_script_names.sql
index 15ec8063c06..76a4a463d73 100644
--- a/sql/old/3.3.5a/09205_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09205_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=58601 AND `ScriptName`='spell_gen_remove_flight_auras';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(58601, 'spell_gen_remove_flight_auras');
diff --git a/sql/old/3.3.5a/09554_world_spell_proc_event.sql b/sql/old/3.3.5a/09554_world_spell_proc_event.sql
index b85f7f9d5f2..7ce7fedb783 100644
--- a/sql/old/3.3.5a/09554_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/09554_world_spell_proc_event.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (70727,70730,70803,70805,70841);
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
( 70727, 0x00, 9, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0, 0, 0), -- Item - Hunter T10 2P Bonus
( 70730, 0x00, 9, 0x00004000, 0x00001000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Item - Hunter T10 4P Bonus
( 70803, 0x00, 8, 0x003E0000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Item - Rogue T10 4P Bonus
diff --git a/sql/old/3.3.5a/09555_world_spell_proc_event.sql b/sql/old/3.3.5a/09555_world_spell_proc_event.sql
index fc276812d54..88b1901ffc6 100644
--- a/sql/old/3.3.5a/09555_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/09555_world_spell_proc_event.sql
@@ -3,7 +3,7 @@
-- Totems
-- Sigils
DELETE FROM `spell_proc_event` WHERE `entry` IN (71214, 71217, 67389, 67386, 67392, 71178, 67361, 71176, 71191, 71194, 71186, 67379, 67365, 67363, 64955, 71228, 71226, 67381, 67384);
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
( 64955, 0x00, 10, 0x00000000, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Item - Paladin T8 Protection Relic
( 67361, 0x00, 7, 0x00000002, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Item - Druid T9 Balance Relic (Moonfire)
( 67363, 0x00, 10, 0x00000000, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 10), -- Item - Paladin T9 Holy Relic (Judgement)
diff --git a/sql/old/3.3.5a/09560_world_spell_proc_event.sql b/sql/old/3.3.5a/09560_world_spell_proc_event.sql
index cc9ca570d4f..9852cdb5b50 100644
--- a/sql/old/3.3.5a/09560_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/09560_world_spell_proc_event.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_proc_event` WHERE `entry`=70854;
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
(70854, 0x00, 4, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Item - Warrior T10 Melee 2P Bonus
diff --git a/sql/old/3.3.5a/09712_world_spell_threat.sql b/sql/old/3.3.5a/09712_world_spell_threat.sql
index 06c5892fb40..50e8f5bc26f 100644
--- a/sql/old/3.3.5a/09712_world_spell_threat.sql
+++ b/sql/old/3.3.5a/09712_world_spell_threat.sql
@@ -62,7 +62,7 @@ INSERT INTO `spell_threat`(`entry`,`Threat`) VALUES
DELETE FROM `spell_threat` WHERE `entry` IN (47487,47488);
INSERT INTO `spell_threat`(`entry`,`Threat`) VALUES
(47487,546), -- Rank 7
-(47488,770); -- Rank 8
+(47488,770); -- Rank 8
-- Sunder Armor (rank 7)
DELETE FROM `spell_threat` WHERE `entry`=47467;
diff --git a/sql/old/3.3.5a/09715_world_spell_proc_event.sql b/sql/old/3.3.5a/09715_world_spell_proc_event.sql
index f214fdf9b49..c2e2019122e 100644
--- a/sql/old/3.3.5a/09715_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/09715_world_spell_proc_event.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (51692, 51696);
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
( 51692, 0x00, 8, 0x00000204, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Waylay (Rank 1)
( 51696, 0x00, 8, 0x00000204, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Waylay (Rank 2)
diff --git a/sql/old/3.3.5a/09722_world_exploration_basexp.sql b/sql/old/3.3.5a/09722_world_exploration_basexp.sql
index 8baadf9e215..84a044f7458 100644
--- a/sql/old/3.3.5a/09722_world_exploration_basexp.sql
+++ b/sql/old/3.3.5a/09722_world_exploration_basexp.sql
@@ -1,6 +1,6 @@
-- Base XP for Levels 71 to 79
DELETE FROM `exploration_basexp` WHERE `level` IN (71,72,73,74,75,76,77,78,79);
-INSERT INTO `exploration_basexp` (`level`,`basexp`) VALUES
+INSERT INTO `exploration_basexp` (`level`,`basexp`) VALUES
(71,1330),
(72,1370),
(73,1410),
diff --git a/sql/old/3.3.5a/09762_world_script_texts.sql b/sql/old/3.3.5a/09762_world_script_texts.sql
index db7106b0bf4..1408f657906 100644
--- a/sql/old/3.3.5a/09762_world_script_texts.sql
+++ b/sql/old/3.3.5a/09762_world_script_texts.sql
@@ -1,5 +1,5 @@
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000522 AND -1000517;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000517,'A-Me good. Good, A-Me. Follow... follow A-Me. Home. A-Me go home.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_ame - SAY_READY'),
(0,-1000518,'$c, no hurt A-Me. A-Me good.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_ame - SAY_AGGRO1'),
(0,-1000519,'Good... good, A-Me. A-Me good. Home. Find home.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_ame - SAY_SEARCH'),
@@ -8,20 +8,20 @@ INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,
(0,-1000522,'A-Me home! A-Me good! Good A-Me. Home. Home. Home.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_ame - SAY_FINISH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000525 AND -1000523;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000523,'Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,4,0,0,'npc_professor_dabiri - WHISPER_DABIRI'),
(0,-1000524,'Bessy, is that you?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_bessy - SAY_THADELL_1'),
(0,-1000525,'Thank you for bringing back my Bessy, $N. I couldn''t live without her!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_bessy - SAY_THADELL_2');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000574 AND -1000571;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000571,'Ok let''s get out of here!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_isla_starmane - SAY_PROGRESS_1'),
(0,-1000572,'You sure you''re ready? Take a moment.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_isla_starmane - SAY_PROGRESS_2'),
(0,-1000573,'Alright, let''s do this!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_isla_starmane - SAY_PROGRESS_3'),
(0,-1000574,'Ok, I think I can make it on my own from here. Thank you so much for breaking me out of there!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'npc_isla_starmane - SAY_PROGRESS_4');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000621 AND -1000606;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000606,'Come, $N. Lord Stormrage awaits.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'OVERLORD_SAY_1'),
(0,-1000607,'Lord Illidan will be here shortly.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'OVERLORD_SAY_2'),
(0,-1000609,'But... My lord, I do not understand. $N... He is the orc that has...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,1,'OVERLORD_SAY_4'),
@@ -39,7 +39,7 @@ INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,
(0,-1000621,'You will not harm the boy, Mor''ghor! Quickly, $N, climb on my back!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,22,'YARZILL_THE_MERC_SAY');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000636 AND -1000629;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000629,'What''s the big idea, Spark?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'geezle - GEEZLE_SAY_1'),
(0,-1000630,'What''s the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,4,'geezle - SPARK_SAY_2'),
(0,-1000631,'The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,'geezle - SPARK_SAY_3'),
@@ -50,7 +50,7 @@ INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,
(0,-1000636,'picks up the naga flag.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,2,0,0,'geezle - EMOTE_SPARK');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1800070 AND -1800064;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1800064,'Beware! We are attacked!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,11,1,'npc_anchorite_truuen - SAY_WP_0'),
(0,-1800065,'It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,11,1,'npc_anchorite_truuen - SAY_WP_1'),
(0,-1800066,'This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn''t far now...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,11,1,'npc_anchorite_truuen - SAY_WP_2'),
@@ -60,5 +60,5 @@ INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,
(0,-1800070,'Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she''ll be keenly interested to know of what has transpired here.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,11,1,'npc_anchorite_truuen - SAY_WP_6');
DELETE FROM `script_texts` WHERE `entry`=-1000600;
-INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+INSERT INTO `script_texts`(`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000600,'Ow! OK, I''ll get back to work, $N!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,11,1,'npc_lazy_peon - SAY_WP_0');
diff --git a/sql/old/3.3.5a/09791_world_spell_proc_event.sql b/sql/old/3.3.5a/09791_world_spell_proc_event.sql
index c30c6c7974e..ed222cf944d 100644
--- a/sql/old/3.3.5a/09791_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/09791_world_spell_proc_event.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_proc_event` WHERE `entry`=63280;
-INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
(63280,0x00,11,0x20000000,0x00000000,0x00000000,0x00000000,0x00000000,0,0,0); -- Glyph ofTotem of Wrath
diff --git a/sql/old/3.3.5a/09835_world_spell_script_names.sql b/sql/old/3.3.5a/09835_world_spell_script_names.sql
index cce026188f1..298e6c0ae4f 100644
--- a/sql/old/3.3.5a/09835_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09835_world_spell_script_names.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN(29266,57685,58951,70592,70628,74490) AND `ScriptName`='spell_creature_permanent_feign_death';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(29266, 'spell_creature_permanent_feign_death'),
(57685, 'spell_creature_permanent_feign_death'),
(58951, 'spell_creature_permanent_feign_death'),
diff --git a/sql/old/3.3.5a/09840_world_spell_linked_spell.sql b/sql/old/3.3.5a/09840_world_spell_linked_spell.sql
index fab11165a0d..932af4e1a5c 100644
--- a/sql/old/3.3.5a/09840_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/09840_world_spell_linked_spell.sql
@@ -1,5 +1,5 @@
DELETE FROM spell_linked_spell WHERE spell_trigger IN(7744,42292,59752);
-INSERT INTO spell_linked_spell (spell_trigger, spell_effect, type, comment) VALUES
+INSERT INTO spell_linked_spell (spell_trigger, spell_effect, type, comment) VALUES
(7744, 72757, 0, 'Will of the Forsaken Cooldown Trigger (WOTF)'),
(42292, 72752, 0, 'Will of the Forsaken Cooldown Trigger'),
(59752, 72752, 0, 'Will of the Forsaken Cooldown Trigger');
diff --git a/sql/old/3.3.5a/09948_world_spell_script_names.sql b/sql/old/3.3.5a/09948_world_spell_script_names.sql
index 38ccd4aa8b1..eec8b7e6768 100644
--- a/sql/old/3.3.5a/09948_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/09948_world_spell_script_names.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=51840 AND `ScriptName`='spell_q12634_despawn_fruit_tosser';
DELETE FROM `spell_script_names` WHERE `spell_id`=49587 AND `ScriptName`='spell_q12459_seeds_of_natures_wrath';
DELETE FROM `spell_script_names` WHERE `spell_id`=19512 AND `ScriptName`='spell_q6124_6129_apply_salve';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(51840,'spell_q12634_despawn_fruit_tosser'),
(49587,'spell_q12459_seeds_of_natures_wrath'),
(19512,'spell_q6124_6129_apply_salve'); \ No newline at end of file
diff --git a/sql/old/3.3.5a/10029_world_spell_script_names.sql b/sql/old/3.3.5a/10029_world_spell_script_names.sql
index d49fbb41f8b..b99128e82fe 100644
--- a/sql/old/3.3.5a/10029_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/10029_world_spell_script_names.sql
@@ -6,7 +6,7 @@ DELETE FROM `spell_script_names` WHERE `spell_id`=-51685 AND `ScriptName`='spell
DELETE FROM `spell_script_names` WHERE `spell_id`=66118 AND `ScriptName`='spell_gen_leeching_swarm';
DELETE FROM `spell_script_names` WHERE `spell_id` IN (20911,25899) AND `ScriptName`='spell_pal_blessing_of_sanctuary';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(41337,'spell_gen_aura_of_anger'),
(46394,'spell_gen_burn_brutallus'),
(-53302,'spell_hun_sniper_training'),
diff --git a/sql/old/3.3.5a/10105_world_spell_script_names.sql b/sql/old/3.3.5a/10105_world_spell_script_names.sql
index c1d7835a7b1..3c9c0718e3b 100644
--- a/sql/old/3.3.5a/10105_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/10105_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=71905 AND `ScriptName`='spell_item_shadowmourne';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(71905,'spell_item_shadowmourne'); -- Item - Shadowmourne Legendary
diff --git a/sql/old/3.3.5a/10213_world_script_texts.sql b/sql/old/3.3.5a/10213_world_script_texts.sql
index e50d9a49085..d8d60ca6041 100644
--- a/sql/old/3.3.5a/10213_world_script_texts.sql
+++ b/sql/old/3.3.5a/10213_world_script_texts.sql
@@ -2,7 +2,7 @@ DELETE FROM `script_texts` WHERE `entry` IN (-1000002,-1000003);
INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(0,-1000002,'%s goes into a frenzy!',0,2,0,0,'EMOTE_GENERIC_FRENZY'),
(0,-1000003,'%s becomes enraged!',0,2,0,0,'EMOTE_GENERIC_ENRAGED');
-
+
DELETE FROM `script_texts` WHERE `entry` IN (-1575023,-1575024,-1575025,-1575026,-1575027);
INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(26668,-1575023,'Your death approaches.',13850,1,0,0,'svala SAY_SACRIFICE_1'),
diff --git a/sql/old/3.3.5a/10215_world_spell_script_names.sql b/sql/old/3.3.5a/10215_world_spell_script_names.sql
index cebd92c2aae..4058346f882 100644
--- a/sql/old/3.3.5a/10215_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/10215_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id` = 31261 AND `ScriptName`='spell_creature_permanent_feign_death';
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(31261, 'spell_creature_permanent_feign_death');
diff --git a/sql/old/3.3.5a/10282_world_script_texts.sql b/sql/old/3.3.5a/10282_world_script_texts.sql
index b821dad26dc..57bd30d9a9d 100644
--- a/sql/old/3.3.5a/10282_world_script_texts.sql
+++ b/sql/old/3.3.5a/10282_world_script_texts.sql
@@ -7,7 +7,7 @@ INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `comment`)
(29309,-1619016,'For the Lich King!','Elder Nadox SAY_SLAY_2');
DELETE FROM `script_texts` WHERE `entry` IN (-1000637,-1000638,-1000639,-1000640);
-INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `comment`) VALUES
+INSERT INTO `script_texts` (`npc_entry`, `entry`, `content_default`, `comment`) VALUES
('17807', '-1000637', 'Let the trial begin, Bloodwrath, attack!', 'npc_second_trial_controller TEXT_SECOND_TRIAL_1'),
('17807', '-1000638', 'Champion Lightrend, make me proud!', 'npc_second_trial_controller TEXT_SECOND_TRIAL_2'),
('17807', '-1000639', 'Show this upstart how a real Blood Knight fights, Swiftblade!', 'npc_second_trial_controller TEXT_SECOND_TRIAL_3'),
diff --git a/sql/old/3.3.5a/10431_world_trinity_string.sql b/sql/old/3.3.5a/10431_world_trinity_string.sql
index 227fb43fd4d..11c777f561c 100644
--- a/sql/old/3.3.5a/10431_world_trinity_string.sql
+++ b/sql/old/3.3.5a/10431_world_trinity_string.sql
@@ -1,4 +1,4 @@
DELETE FROM `trinity_string` WHERE `entry` IN (1134, 1135);
-INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
+INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
(1134, 'Sending tickets is allowed.'),
(1135, 'Sending tickets is not allowed.');
diff --git a/sql/old/3.3.5a/10470_world_trinity_string.sql b/sql/old/3.3.5a/10470_world_trinity_string.sql
index c6cac6daaa0..976151656d2 100644
--- a/sql/old/3.3.5a/10470_world_trinity_string.sql
+++ b/sql/old/3.3.5a/10470_world_trinity_string.sql
@@ -1,4 +1,4 @@
DELETE FROM `trinity_string` WHERE `entry` IN (1027, 1028);
-INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
+INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
(1027, 'SQL driver query logging enabled.'),
(1028, 'SQL driver query logging disabled.'); \ No newline at end of file
diff --git a/sql/old/3.3.5a/10548_world_trinity_string.sql b/sql/old/3.3.5a/10548_world_trinity_string.sql
index 2bc5147133b..f59a412174a 100644
--- a/sql/old/3.3.5a/10548_world_trinity_string.sql
+++ b/sql/old/3.3.5a/10548_world_trinity_string.sql
@@ -1,4 +1,4 @@
DELETE FROM `trinity_string` WHERE `entry` IN (5022, 5023);
-INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
+INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
(5022, 'Granting ownership to first person that joins the channel \"%s\": Enabled.'),
(5023, 'Granting ownership to first person that joins the channel \"%s\": Disabled.');
diff --git a/sql/old/3.3.5a/10570_world_disables.sql b/sql/old/3.3.5a/10570_world_disables.sql
index a7e1a961d4a..afafcbbd756 100644
--- a/sql/old/3.3.5a/10570_world_disables.sql
+++ b/sql/old/3.3.5a/10570_world_disables.sql
@@ -1,3 +1,3 @@
-ALTER TABLE `disables`
+ALTER TABLE `disables`
ADD COLUMN params_0 varchar (255) NOT NULL default '' AFTER flags,
ADD COLUMN params_1 VARCHAR (255) NOT NULL default '' AFTER params_0;
diff --git a/sql/old/3.3.5a/10654_characters_item_instance.sql b/sql/old/3.3.5a/10654_characters_item_instance.sql
index 297250201cd..3445fa173ec 100644
--- a/sql/old/3.3.5a/10654_characters_item_instance.sql
+++ b/sql/old/3.3.5a/10654_characters_item_instance.sql
@@ -25,4 +25,4 @@ ALTER TABLE `guild_bank_item` DROP COLUMN `item_entry`;
ALTER TABLE `mail_items` DROP COLUMN `item_template`;
-- Delete orphan records (use at your own risk)
--- DELETE FROM item_instance WHERE itemEntry = 0;
+-- DELETE FROM item_instance WHERE itemEntry = 0;
diff --git a/sql/old/3.3.5a/10903_world_spell_script_names.sql b/sql/old/3.3.5a/10903_world_spell_script_names.sql
index 46e1ff570e0..a316380109b 100644
--- a/sql/old/3.3.5a/10903_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/10903_world_spell_script_names.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN ( 66118, 67630, 68646, 68647 );
-INSERT INTO `spell_script_names` VALUES
+INSERT INTO `spell_script_names` VALUES
(66118, 'spell_gen_leeching_swarm'),
(67630, 'spell_gen_leeching_swarm'),
(68646, 'spell_gen_leeching_swarm'),
diff --git a/sql/old/3.3.5a/2011_01_08_02_world_scriptname.sql b/sql/old/3.3.5a/2011_01_08_02_world_scriptname.sql
index 8c35e0d3712..08ecb3787a6 100644
--- a/sql/old/3.3.5a/2011_01_08_02_world_scriptname.sql
+++ b/sql/old/3.3.5a/2011_01_08_02_world_scriptname.sql
@@ -1,5 +1,5 @@
DELETE FROM spell_script_names WHERE spell_id IN (66630,66637,66656);
-INSERT INTO spell_script_names (spell_id,ScriptName) VALUES
+INSERT INTO spell_script_names (spell_id,ScriptName) VALUES
(66630,'spell_gen_gunship_portal'),
(66637,'spell_gen_gunship_portal'),
(66656,'spell_gen_parachute_ic');
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_account_data.sql b/sql/old/3.3.5a/2011_01_19_00_characters_account_data.sql
index 26e465268d6..0d0ba276ff5 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_account_data.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_account_data.sql
@@ -1,5 +1,5 @@
-ALTER TABLE `account_data`
-CHANGE `account` `account` INT(10) UNSIGNED DEFAULT '0' NOT NULL,
-CHANGE `type` `type` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL,
+ALTER TABLE `account_data`
+CHANGE `account` `account` INT(10) UNSIGNED DEFAULT '0' NOT NULL,
+CHANGE `type` `type` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE `time` `time` INT(10) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE `data` `data` BLOB NOT NULL; \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_addons.sql b/sql/old/3.3.5a/2011_01_19_00_characters_addons.sql
index 90ebbce5613..3019cdcc8f7 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_addons.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_addons.sql
@@ -1,3 +1,3 @@
-ALTER TABLE `addons`
+ALTER TABLE `addons`
ROW_FORMAT=DEFAULT,
CHANGE `crc` `crc` INT(10) UNSIGNED DEFAULT '0' NOT NULL; \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_arena_team.sql b/sql/old/3.3.5a/2011_01_19_00_characters_arena_team.sql
index 5942e008bb5..3dfe9c2a7a5 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_arena_team.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_arena_team.sql
@@ -1,4 +1,4 @@
-ALTER TABLE `arena_team`
+ALTER TABLE `arena_team`
CHANGE `name` `name` VARCHAR(24) NOT NULL,
CHANGE `EmblemStyle` `EmblemStyle` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE `BorderStyle` `BorderStyle` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL; \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_channels.sql b/sql/old/3.3.5a/2011_01_19_00_characters_channels.sql
index cd70f39e30f..1c0b4a927fc 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_channels.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_channels.sql
@@ -1,5 +1,5 @@
ALTER TABLE `channels`
ROW_FORMAT=DEFAULT,
CHANGE `BannedList` `BannedList` TEXT,
-DROP PRIMARY KEY,
+DROP PRIMARY KEY,
ADD PRIMARY KEY (`m_name`, `m_team`); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_character_battleground_data.sql b/sql/old/3.3.5a/2011_01_19_00_characters_character_battleground_data.sql
index 09f24ed8bf9..9247a180b48 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_character_battleground_data.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_character_battleground_data.sql
@@ -1,7 +1,7 @@
ALTER TABLE `character_battleground_data`
ROW_FORMAT=DEFAULT,
CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier',
-CHANGE `instance_id` `instance_id` INT(10) UNSIGNED NOT NULL,
+CHANGE `instance_id` `instance_id` INT(10) UNSIGNED NOT NULL,
CHANGE `team` `team` SMALLINT(5) UNSIGNED NOT NULL,
CHANGE `join_map` `join_map` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE `taxi_start` `taxi_start` INT(10) UNSIGNED DEFAULT '0' NOT NULL,
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_character_equipmentsets.sql b/sql/old/3.3.5a/2011_01_19_00_characters_character_equipmentsets.sql
index 3f4fe76d189..abdcbede5d0 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_character_equipmentsets.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_character_equipmentsets.sql
@@ -2,22 +2,22 @@ ALTER TABLE `character_equipmentsets`
CHANGE `guid` `guid` INT(10) DEFAULT '0' NOT NULL,
CHANGE `setindex` `setindex` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL,
CHANGE `name` `name` VARCHAR(31) NOT NULL,
-CHANGE `item0` `item0` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item1` `item1` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item2` `item2` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item3` `item3` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item4` `item4` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item5` `item5` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item6` `item6` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item7` `item7` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item8` `item8` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item9` `item9` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item10` `item10` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item11` `item11` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item12` `item12` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item13` `item13` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item14` `item14` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item15` `item15` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item16` `item16` INT(10) UNSIGNED NOT NULL DEFAULT '0',
-CHANGE `item17` `item17` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item0` `item0` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item1` `item1` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item2` `item2` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item3` `item3` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item4` `item4` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item5` `item5` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item6` `item6` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item7` `item7` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item8` `item8` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item9` `item9` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item10` `item10` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item11` `item11` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item12` `item12` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item13` `item13` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item14` `item14` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item15` `item15` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item16` `item16` INT(10) UNSIGNED NOT NULL DEFAULT '0',
+CHANGE `item17` `item17` INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE `item18` `item18` INT(10) UNSIGNED NOT NULL DEFAULT '0'; \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_01_19_00_characters_character_tutorial.sql b/sql/old/3.3.5a/2011_01_19_00_characters_character_tutorial.sql
index 17e54576050..83c85f8ebe7 100644
--- a/sql/old/3.3.5a/2011_01_19_00_characters_character_tutorial.sql
+++ b/sql/old/3.3.5a/2011_01_19_00_characters_character_tutorial.sql
@@ -1,7 +1,7 @@
ALTER TABLE `character_tutorial`
ROW_FORMAT=DEFAULT,
CHANGE `account` `account` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Account Identifier',
-DROP PRIMARY KEY,
+DROP PRIMARY KEY,
ADD PRIMARY KEY (`account`),
DROP `realmid`,
CHANGE `tut0` `tut0` INT(10) UNSIGNED DEFAULT '0' NOT NULL,
diff --git a/sql/old/3.3.5a/2011_01_20_00_characters_pet_aura.sql b/sql/old/3.3.5a/2011_01_20_00_characters_pet_aura.sql
index 38b3b82c0f1..7455b626c2c 100644
--- a/sql/old/3.3.5a/2011_01_20_00_characters_pet_aura.sql
+++ b/sql/old/3.3.5a/2011_01_20_00_characters_pet_aura.sql
@@ -2,9 +2,9 @@ ALTER TABLE `pet_aura`
ROW_FORMAT=DEFAULT,
CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier',
CHANGE `spell` `spell` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL,
-CHANGE `amount0` `amount0` MEDIUMINT(8) NOT NULL,
-CHANGE `amount1` `amount1` MEDIUMINT(8) NOT NULL,
-CHANGE `amount2` `amount2` MEDIUMINT(8) NOT NULL,
-CHANGE `base_amount0` `base_amount0` MEDIUMINT(8) NOT NULL,
-CHANGE `base_amount1` `base_amount1` MEDIUMINT(8) NOT NULL,
+CHANGE `amount0` `amount0` MEDIUMINT(8) NOT NULL,
+CHANGE `amount1` `amount1` MEDIUMINT(8) NOT NULL,
+CHANGE `amount2` `amount2` MEDIUMINT(8) NOT NULL,
+CHANGE `base_amount0` `base_amount0` MEDIUMINT(8) NOT NULL,
+CHANGE `base_amount1` `base_amount1` MEDIUMINT(8) NOT NULL,
CHANGE `base_amount2` `base_amount2` MEDIUMINT(8) NOT NULL; \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_01_22_01_characters_character_inventory.sql b/sql/old/3.3.5a/2011_01_22_01_characters_character_inventory.sql
index 624f6dbc582..647ea85f8c9 100644
--- a/sql/old/3.3.5a/2011_01_22_01_characters_character_inventory.sql
+++ b/sql/old/3.3.5a/2011_01_22_01_characters_character_inventory.sql
@@ -1,2 +1,2 @@
-ALTER TABLE `character_inventory`
+ALTER TABLE `character_inventory`
ADD UNIQUE KEY (`guid`,`bag`,`slot`);
diff --git a/sql/old/3.3.5a/2011_01_24_00_world_scriptname.sql b/sql/old/3.3.5a/2011_01_24_00_world_scriptname.sql
index 6e4233c5431..043e95b026d 100644
--- a/sql/old/3.3.5a/2011_01_24_00_world_scriptname.sql
+++ b/sql/old/3.3.5a/2011_01_24_00_world_scriptname.sql
@@ -1,8 +1,8 @@
UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=27638;
UPDATE `creature_template` SET `ScriptName`='npc_azure_ring_captain' WHERE `entry`=28236;
-
+
DELETE FROM `spell_script_names` WHERE `spell_id` IN (61407,62136,54069,56251,50785,59372);
-INSERT INTO `spell_script_names` (spell_id,ScriptName) VALUES
+INSERT INTO `spell_script_names` (spell_id,ScriptName) VALUES
(61407,'spell_varos_energize_core_area_entry'),
(62136,'spell_varos_energize_core_area_entry'),
(54069,'spell_varos_energize_core_area_entry'),
diff --git a/sql/old/3.3.5a/2011_02_04_00_world_battleground_isle_of_conquest.sql b/sql/old/3.3.5a/2011_02_04_00_world_battleground_isle_of_conquest.sql
index 368f2db97c3..d28eec73111 100644
--- a/sql/old/3.3.5a/2011_02_04_00_world_battleground_isle_of_conquest.sql
+++ b/sql/old/3.3.5a/2011_02_04_00_world_battleground_isle_of_conquest.sql
@@ -27,13 +27,13 @@ UPDATE `creature_template` SET `spell1`=67462,`spell2`=69505 WHERE `entry`=36355
-- Catapult speed
UPDATE `creature_template` SET `speed_run`=2.428571,`speed_walk`=2.8 WHERE `entry`=34793;
--- Update alliance boss faction
+-- Update alliance boss faction
UPDATE `creature_template` SET `faction_A`=84, `faction_H`=84 WHERE `entry`=34924;
--- Update horde boss faction
+-- Update horde boss faction
UPDATE `creature_template` SET `faction_A`=83, `faction_H`=83 WHERE `entry`=34922;
--- Update Kor Kron Guard faction
+-- Update Kor Kron Guard faction
UPDATE `creature_template` SET `faction_A`=83, `faction_H`=83 WHERE `entry`=34918;
--- Update Npc Seven TH Legion Infantry faction
+-- Update Npc Seven TH Legion Infantry faction
UPDATE `creature_template` SET `faction_A`=84, `faction_H`=84 WHERE `entry`=34919;
-- those doors are not selectables
@@ -57,7 +57,7 @@ DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (12068,12114);
-- Refinery's and Quarry's spells.
DELETE FROM `spell_area` WHERE `spell` IN (68719,68720);
-INSERT INTO `spell_area` (`spell`,`area`) VALUES
+INSERT INTO `spell_area` (`spell`,`area`) VALUES
(68719,4741),
(68719,4747),
(68719,4748),
diff --git a/sql/old/3.3.5a/2011_02_04_00_world_mail_loot_template.sql b/sql/old/3.3.5a/2011_02_04_00_world_mail_loot_template.sql
index 2e07a483473..25747bd3049 100644
--- a/sql/old/3.3.5a/2011_02_04_00_world_mail_loot_template.sql
+++ b/sql/old/3.3.5a/2011_02_04_00_world_mail_loot_template.sql
@@ -2,33 +2,33 @@
SET @MAIL:=118; -- Set in DBC
UPDATE `quest_template` SET `RewMailTemplateId`=@MAIL, `RewMailDelaySecs`=86400 WHERE `entry` IN (6962); -- Set mail delivery
DELETE FROM `mail_loot_template` WHERE `entry`=@MAIL;
-INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@MAIL,17685,100,1,0,1,1); -- Attach item to mail
-- Reward from Treats for Greatfather Winter (alliance)
SET @MAIL:=102; -- Set in DBC
UPDATE `quest_template` SET `RewMailTemplateId`=@MAIL, `RewMailDelaySecs`=86400 WHERE `entry` IN (7025); -- Set mail delivery
DELETE FROM `mail_loot_template` WHERE `entry`=@MAIL;
-INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@MAIL,17685,100,1,0,1,1); -- Attach item to mail
-- Reward from Stolen Winter Veil Treats (alliance)
SET @MAIL:=117; -- Set in DBC
UPDATE `quest_template` SET `RewMailTemplateId`=@MAIL, `RewMailDelaySecs`=86400 WHERE `entry` IN (7042); -- Set mail delivery
DELETE FROM `mail_loot_template` WHERE `entry`=@MAIL;
-INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@MAIL,17712,100,1,0,1,1); -- Attach item to mail
-- Reward from Metzen the Reindeer (alliance)
SET @MAIL:=161; -- Set in DBC
UPDATE `quest_template` SET `RewMailTemplateId`=@MAIL, `RewMailDelaySecs`=86400 WHERE `entry` IN (8762); -- Set mail delivery
DELETE FROM `mail_loot_template` WHERE `entry`=@MAIL;
-INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@MAIL,21216,100,1,0,1,1); -- Attach item to mail
-- Reward from Metzen the Reindeer (horde)
SET @MAIL:=122; -- Set in DBC
UPDATE `quest_template` SET `RewMailTemplateId`=@MAIL, `RewMailDelaySecs`=86400 WHERE `entry` IN (8746); -- Set mail delivery
DELETE FROM `mail_loot_template` WHERE `entry`=@MAIL;
-INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `mail_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@MAIL,21216,100,1,0,1,1); -- Attach item to mail }}}
diff --git a/sql/old/3.3.5a/2011_02_04_03_world_sai.sql b/sql/old/3.3.5a/2011_02_04_03_world_sai.sql
index be51bfd4c70..f1ad69dbbff 100644
--- a/sql/old/3.3.5a/2011_02_04_03_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_04_03_world_sai.sql
@@ -1,4 +1,4 @@
--- Honor Hold Archer fixup (tested)
+-- Honor Hold Archer fixup (tested)
-- Console no longer spamming waypoint script errors in Honor Hold
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=16896;
-- Honor Hold Archer "guid 58449 shoot at Honor Hold Target Dummy Right" SAI "Tested"
diff --git a/sql/old/3.3.5a/2011_02_05_04_world_game_event.sql b/sql/old/3.3.5a/2011_02_05_04_world_game_event.sql
index eb8db804358..0ac99d37265 100644
--- a/sql/old/3.3.5a/2011_02_05_04_world_game_event.sql
+++ b/sql/old/3.3.5a/2011_02_05_04_world_game_event.sql
@@ -1,6 +1,6 @@
-- Update Quest_conditions for Quest: The Lunar Festival
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry`IN(8870,8871,8872,8873,8874,8875);
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
-- Alliance
(19,0,8871,0,4,1519,0,0,0,0,'The Lunar Festival: Stormwind'),
(19,0,8872,0,4,1657,0,0,0,0,'The Lunar Festival: Darnassus'),
@@ -13,7 +13,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (15872,15873,15874,15879,15880,15882);
DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (15872,15873,15874,15879,15880,15882); -- Cleanup
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (15872,15873,15874,15879,15880,15882);
-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
+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
-- small fireworks
-- blue firework
(15879,0,0,0,1,0,100,1,0,0,0,0,11,26344,2,0,0,0,0,1,0,0,0,0,0,0,0, 'cast fireworks'),
diff --git a/sql/old/3.3.5a/2011_02_05_05_world_sai.sql b/sql/old/3.3.5a/2011_02_05_05_world_sai.sql
index 24278716679..e166c16c71d 100644
--- a/sql/old/3.3.5a/2011_02_05_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_05_05_world_sai.sql
@@ -1,4 +1,4 @@
--- Scourge Flamespitter SAI
+-- Scourge Flamespitter SAI
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25582;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-118407,-118408,-118425,-118421,-118422,-118426,-118427,-118375,-118405,-118409,-118423,-118428,-118429);
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
diff --git a/sql/old/3.3.5a/2011_02_05_07_world_sai.sql b/sql/old/3.3.5a/2011_02_05_07_world_sai.sql
index b746893890b..79c6ea941bd 100644
--- a/sql/old/3.3.5a/2011_02_05_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_05_07_world_sai.sql
@@ -36,7 +36,7 @@ UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,75,45776,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Apply aura on spawn'),
(@ENTRY,0,1,0,8,0,100,0,62767,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit run script'),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,28,45776,0,0,0,0,0,1,0,0,0,0,0,0,0,'Remove aura'),
diff --git a/sql/old/3.3.5a/2011_02_05_08_world_sai.sql b/sql/old/3.3.5a/2011_02_05_08_world_sai.sql
index be2e11b4178..7ea0426e9c1 100644
--- a/sql/old/3.3.5a/2011_02_05_08_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_05_08_world_sai.sql
@@ -36,7 +36,7 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr
(@Zierhut,0,0, 'Renounce the Scarlet Onslaught! Don''t listen to the lies of the high general and the grand admiral any longer!',1,0,100,5,0,0, 'Lead Cannoneer Zierhut'),
(@Mercer,0,0, 'Abbendis is nothing but a harlot and Grand Admiral Westwind is selling her cheap like he sold us out!',1,0,100,5,0,0, 'Stable Master Mercer');
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@Goodman,@Zierhut,@Mercer,@Jordan);
-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
+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
(@Goodman,0,0,0,8,0,100,0,@Compelled,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Denouncement/Goodman: On spellhit set phase 2'),
(@Goodman,0,1,0,6,2,100,0,0,0,0,0,85,@DeathGoodman,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Denouncement/Goodman: On death in phase 2 cast spell'),
(@Goodman,0,2,0,25,0,100,0,0,0,0,0,28,@Compelled,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Denouncement/Goodman: On reset remove Compelled aura'),
@@ -58,7 +58,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@Jordan,0,3,0,25,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Denouncement/Jordan: On reset set phase 0'),
(@Jordan,0,4,0,6,2,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Denouncement/Jordan: On death in phase 2 yell');
--- Kill a unrelated console DB error
+-- Kill a unrelated console DB error
DELETE FROM `creature_addon` WHERE `guid`=88103;
-- Valiance Keep Footman SAI (by Malcrom)
diff --git a/sql/old/3.3.5a/2011_02_07_01_world_creature_questrelation.sql b/sql/old/3.3.5a/2011_02_07_01_world_creature_questrelation.sql
index 4aeb7a70775..940d175a7dd 100644
--- a/sql/old/3.3.5a/2011_02_07_01_world_creature_questrelation.sql
+++ b/sql/old/3.3.5a/2011_02_07_01_world_creature_questrelation.sql
@@ -6,7 +6,7 @@ INSERT INTO `creature_involvedrelation`(`id`,`quest`) VALUES (36296,14488);
-- Missing loot form Standard Apothecary Serving Kit request for quest You've Been Served
DELETE FROM `item_loot_template` WHERE `entry`=49631 AND `item` IN (49352,49351,49635);
-INSERT INTO `item_loot_template`(`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `item_loot_template`(`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(49631,49352,100,1,0,1,1),
(49631,49351,100,1,0,1,1),
(49631,49635,100,1,0,1,1);
diff --git a/sql/old/3.3.5a/2011_02_07_02_world_sai.sql b/sql/old/3.3.5a/2011_02_07_02_world_sai.sql
index 1af21f5d048..f36ad4e4156 100644
--- a/sql/old/3.3.5a/2011_02_07_02_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_07_02_world_sai.sql
@@ -1,5 +1,5 @@
-- SAI for quest 10345 "The Flesh Lies..."
--- Spell script target for Protectorate Igniter (quest The Flesh Lies...)
+-- Spell script target for Protectorate Igniter (quest The Flesh Lies...)
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=35372;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,35372,1,18,1,20561,0,0,'', 'Protectorate Igniter');
@@ -10,7 +10,7 @@ UPDATE `creature_template` SET `unit_flags`=`unit_flags`|256 WHERE `entry`=@ENTR
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,22,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'On spawn set phase 1'),
(@ENTRY,0,1,0,8,1,100,0,35372,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit run script'),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'set phase 0'),
@@ -23,7 +23,7 @@ SET @ENTRY:=25321;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,22,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'On spawn set phase 1'),
(@ENTRY,0,1,0,8,1,100,0,45504,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit run script'),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'set phase 0'),
@@ -32,7 +32,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY*100,9,3,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'despawn');
-- Add texts for this NPC.
DELETE FROM `creature_text` WHERE `entry`=25321;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(25321,0,0, 'Thank you for freeing me! May the tides always favor you.',0,0,100,1,0,0, 'Kaskala Craftman'),
(25321,0,1, 'Do not allow Kaskala to forget what has happened here.',0,0,100,1,0,0, 'Kaskala Craftman');
-- Kaskala Shaman SAI.
@@ -40,7 +40,7 @@ SET @ENTRY:=25322;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,22,1,0,0,0,0,0,0,0,0,0,0,0,0,0, 'On spawn set phase 1'),
(@ENTRY,0,1,0,8,1,100,0,45504,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'On spell hit run script'),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 'set phase 0'),
@@ -49,7 +49,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY*100,9,3,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'despawn');
-- Add texts for this NPC.
DELETE FROM `creature_text` WHERE `entry`=25322;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(25322,0,0, 'May the ancestors always aid you, $n, as you have aided me.',0,0,100,1,0,0, 'Kaskala Shaman'),
(25322,0,1, 'Thank you, $n. May the winds and seas always deliver you safely.',0,0,100,1,0,0, 'Kaskala Shaman');
-- Delete the old EAI script.
diff --git a/sql/old/3.3.5a/2011_02_10_02_world_instance_oculus.sql b/sql/old/3.3.5a/2011_02_10_02_world_instance_oculus.sql
index db52b3310fa..e3ebb34c839 100644
--- a/sql/old/3.3.5a/2011_02_10_02_world_instance_oculus.sql
+++ b/sql/old/3.3.5a/2011_02_10_02_world_instance_oculus.sql
@@ -5,7 +5,7 @@ UPDATE `creature_template` SET `InhabitType`=5 WHERE `entry`=30879;
-- spell script target
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=57963;
-INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, COMMENT) VALUES
+INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, COMMENT) VALUES
(13,0,57963,0,18,1,27656,0,0,'',NULL);
-- not sure about this, execute at your own risk
diff --git a/sql/old/3.3.5a/2011_02_11_00_world_coredevdata.sql b/sql/old/3.3.5a/2011_02_11_00_world_coredevdata.sql
index 70d360c1689..a5f562fe517 100644
--- a/sql/old/3.3.5a/2011_02_11_00_world_coredevdata.sql
+++ b/sql/old/3.3.5a/2011_02_11_00_world_coredevdata.sql
@@ -9,7 +9,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionType
-- Not the Blizzlike waypoints, Malcrom has those, but these are temporary
DELETE FROM `script_waypoint` WHERE `entry`=29602;
-INSERT INTO `script_waypoint` (entry,pointid,location_x,location_y,location_z,waittime) VALUES
+INSERT INTO `script_waypoint` (entry,pointid,location_x,location_y,location_z,waittime) VALUES
(29602,1,7085.374,-1938.052,773.318,0),
(29602,2,7085.374,-1938.052,773.318,0),
(29602,3,7065.382,-1988.499,768.9483,0),
diff --git a/sql/old/3.3.5a/2011_02_11_01_world_coredevdata.sql b/sql/old/3.3.5a/2011_02_11_01_world_coredevdata.sql
index 4f225d8c984..29c25302199 100644
--- a/sql/old/3.3.5a/2011_02_11_01_world_coredevdata.sql
+++ b/sql/old/3.3.5a/2011_02_11_01_world_coredevdata.sql
@@ -21,7 +21,7 @@ INSERT INTO `creature` (guid, id, map, spawnMask, phaseMask, modelid, equipment_
(100234, 28183, 578, 3, 1, 0, 0, 1328.00171, 1061.15283, 439.232849, 2.8972466, 120, 0, 0, 1, 0, 0, 0);
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (54069,56251);
-INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, COMMENT) VALUES
+INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, COMMENT) VALUES
(13,0,54069,0,18,1,28183,0,0,'',NULL),
(13,0,56251,0,18,1,28183,0,0,'',NULL);
@@ -29,7 +29,7 @@ DELETE FROM `creature_template_addon` WHERE `entry`=28183;
INSERT INTO `creature_template_addon` (entry,auras) VALUE (28183,'50798 0');
DELETE FROM `creature_text` WHERE `entry`=27447;
-INSERT INTO `creature_text` (entry,groupid,id,TEXT,TYPE,LANGUAGE,sound) VALUES
+INSERT INTO `creature_text` (entry,groupid,id,TEXT,TYPE,LANGUAGE,sound) VALUES
(27447,0,0,'There will be no mercy!',1,0,13649),
(27447,1,1,'Blast them! Destroy them!',1,0,13650),
(27447,2,2,'%s calls an Azure Ring Captain!',3,0,0),
diff --git a/sql/old/3.3.5a/2011_02_15_00_world_sai.sql b/sql/old/3.3.5a/2011_02_15_00_world_sai.sql
index e23f3d31f61..d12b6ef44ae 100644
--- a/sql/old/3.3.5a/2011_02_15_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_15_00_world_sai.sql
@@ -1,6 +1,6 @@
-- Conditions for Writhing Choker and Unliving Choker
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceEntry` IN (38673,38660);
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(1,28519,38660,0,14,12238,0,0,0,'',NULL),
(1,28519,38673,0,8,12238,0,0,0,'',NULL);
@@ -18,14 +18,14 @@ SET @ENTRY := 23859;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'Greer Orehammer - Script on Aggro'),
(@ENTRY,0,1,0,62,0,100,0,9546,1,0,0,52,745,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Plague This Taxi Start'),
(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say text 0'),
(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,7,0,0,0,0,0,0,0,'Summon Enraged Gryphon'),
(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,12,9526,4,30000,0,0,0,7,0,0,0,0,0,0,0,'Summon Enraged Gryphon');
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0,'Guards!',0,0,100,0,0,0,'Greer Orehammer');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9546 AND `SourceEntry`=1;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
@@ -60,7 +60,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(3027400,9,4,0,0,0,100,0,0,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Freed Crusader Despawn');
-- create path point location to send Freed Crusaders to
DELETE FROM `waypoints` WHERE `entry`=30274;
-INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
(30274,1,6296.25,92.9397,390.701, 'send Freed Crusader here');
DELETE FROM `creature_text` WHERE `entry`=30274;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
@@ -73,7 +73,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
-- Spawns for Ambusher Verion
SET @GUID :=151826;
DELETE FROM `creature` WHERE `id`=30268;
-INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
(@GUID+0,30268,571,1,2,0,0,6244.78,190.194,383.08,1.50098,0,0,0,0,0,0,0,0,0,0),
(@GUID+1,30268,571,1,2,0,0,6249.75,126.806,382.534,2.47837,0,0,0,0,0,0,0,0,0,0),
(@GUID+2,30268,571,1,2,0,0,6277.33,155.167,383.491,0.43643,0,0,0,0,0,0,0,0,0,0),
diff --git a/sql/old/3.3.5a/2011_02_15_01_world_sai.sql b/sql/old/3.3.5a/2011_02_15_01_world_sai.sql
index 64473eaf30d..6484e494c65 100644
--- a/sql/old/3.3.5a/2011_02_15_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_15_01_world_sai.sql
@@ -1,4 +1,4 @@
--- Cult Plaguebringer <Cult of the Damned> SAI (tested)
+-- Cult Plaguebringer <Cult of the Damned> SAI (tested)
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=24957;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=24957;
DELETE FROM `smart_scripts` WHERE `entryorguid`=24957;
@@ -6,7 +6,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(24957,0,0,0,1,0,100,0,1000,900000,500000,700000,11,45850,2,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Ghoul Summons OOC'),
(24957,0,2,0,0,0,30,0,1100,6300,8800,13800,11,50356,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Inject Plague on victim');
--- Cultist Necrolyte SAI (tested)
+-- Cultist Necrolyte SAI (tested)
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25651;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25651);
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
diff --git a/sql/old/3.3.5a/2011_02_15_02_world_game_event_liita.sql b/sql/old/3.3.5a/2011_02_15_02_world_game_event_liita.sql
index 4ca381b59d7..9f8328351e6 100644
--- a/sql/old/3.3.5a/2011_02_15_02_world_game_event_liita.sql
+++ b/sql/old/3.3.5a/2011_02_15_02_world_game_event_liita.sql
@@ -145,7 +145,7 @@ INSERT INTO `game_event_creature` (`guid`,`event`) VALUES
(@GUID+108,8),(@GUID+109,8),(@GUID+110,8),(@GUID+111,8);
DELETE FROM `creature_addon` WHERE `guid` IN (@GUID+56,@GUID+57);
-INSERT INTO `creature_addon`(`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+INSERT INTO `creature_addon`(`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(@GUID+56,0,0,0,0,0, '68946 0'),
(@GUID+57,0,0,0,0,0, '68589 0');
@@ -219,7 +219,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
(36296,2,15,1,0,-50011,1), -- 1 from reference_blues
(36296,50320,10,1,0,1,1), -- Faded Lovely Greeting Card Ally
(36296,49641,10,1,0,1,1), -- Faded Lovely Greeting Card Horde
-(36296,50250,0.1,1,0,1,1); -- Big Love Rocket
+(36296,50250,0.1,1,0,1,1); -- Big Love Rocket
DELETE FROM `reference_loot_template` WHERE `entry` IN (50010,50011,50012);
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(50010,51806,0,1,1,1,1), -- Shard of Pirouetting Happiness
@@ -227,7 +227,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(50010,51805,0,1,1,1,1), -- Heartbreak Charm
(50010,51807,0,1,1,1,1), -- Sweet Perfume Broach
(50010,51804,0,1,1,1,1), -- Winking Eye of Love
-(50011,50471,0,1,1,1,1), -- The Heartbreaker
+(50011,50471,0,1,1,1,1), -- The Heartbreaker
(50011,50741,0,1,1,1,1), -- Vile Fumigator's Mask
(50011,50446,0,1,1,1,1), -- Toxic Wasteling
(50011,49715,0,1,1,1,1), -- Forever-Lovely Rose
@@ -237,10 +237,10 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(50012,22238,0,1,1,1,1), -- Very Berry Cream
(50012,22236,0,1,1,1,1); -- Buttermilk Delight
-DELETE FROM `item_loot_template` WHERE `entry` IN (49631,49909,50160,50161);
-INSERT INTO `item_loot_template`(`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+DELETE FROM `item_loot_template` WHERE `entry` IN (49631,49909,50160,50161);
+INSERT INTO `item_loot_template`(`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- Standard Apothecary Serving Kit
-(49631,49352,100,1,0,1,1),
+(49631,49352,100,1,0,1,1),
(49631,49351,100,1,0,1,1),
(49631,49635,100,1,0,1,1),
-- Box of Chocolates
@@ -262,7 +262,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=12846 AND `type` in (16,18);
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=12859 AND `type` in (5,15,18);
-INSERT INTO `achievement_criteria_data`(`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+INSERT INTO `achievement_criteria_data`(`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
-- Set correct data for achievement Charming
(12846,16,335,0, ''),
-- Set correct data for achievement Flirt With Disaster (alliance)
diff --git a/sql/old/3.3.5a/2011_02_18_05_world_sai.sql b/sql/old/3.3.5a/2011_02_18_05_world_sai.sql
index e06f5a067c0..1447c18e35a 100644
--- a/sql/old/3.3.5a/2011_02_18_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_18_05_world_sai.sql
@@ -1,7 +1,7 @@
-- Bonesunder SAI (Converted from EAI)
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=27006;
DELETE FROM `smart_scripts` WHERE `entryorguid`=27006;
-DELETE FROM `creature_ai_scripts` WHERE `creature_id`=27006;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=27006;
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
(27006,0,0,0,0,0,100,0,5000,11000,16000,25000,11,52080,1,0,0,0,0,2,0,0,0,0,0,0,0,'Bonesunder - Cast Bonecrack');
diff --git a/sql/old/3.3.5a/2011_02_19_01_world_instance_icecrown_citadel.sql b/sql/old/3.3.5a/2011_02_19_01_world_instance_icecrown_citadel.sql
index 1c42bfdb544..bbdf4f4010c 100644
--- a/sql/old/3.3.5a/2011_02_19_01_world_instance_icecrown_citadel.sql
+++ b/sql/old/3.3.5a/2011_02_19_01_world_instance_icecrown_citadel.sql
@@ -46,7 +46,7 @@ DELETE FROM `gameobject` WHERE `id`=202178;
-- Mode specific objects (instance portal) reused deleted guids
DELETE FROM `gameobject` WHERE `id` IN (202315,202316,202317,202318);
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(150308,202318,631,5,1,82.1685,2211.82,33.0959,3.14159,0,0,1,0,6000,100,1),
(150310,202316,631,10,1,82.1685,2211.82,33.0959,3.14159,0,0,1,0,6000,100,1),
(150321,202317,631,5,1,82.1685,2211.82,33.0959,3.14159,0,0,1,0,6000,100,1),
diff --git a/sql/old/3.3.5a/2011_02_22_01_world_spell_script_names.sql b/sql/old/3.3.5a/2011_02_22_01_world_spell_script_names.sql
index d0b20794f96..99bef8f59da 100644
--- a/sql/old/3.3.5a/2011_02_22_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_02_22_01_world_spell_script_names.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN(63633,65594,62056,63985,64224,64225);
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(63633,'spell_ulduar_rubble_summon'),
(65594,'spell_ulduar_cancel_stone_grip'),
(62056,'spell_ulduar_stone_grip'),
diff --git a/sql/old/3.3.5a/2011_02_22_03_world_creature_template.sql b/sql/old/3.3.5a/2011_02_22_03_world_creature_template.sql
index 38064813aa1..0febb076241 100644
--- a/sql/old/3.3.5a/2011_02_22_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_02_22_03_world_creature_template.sql
@@ -1 +1 @@
-UPDATE `creature_template` SET `flags_extra`= `flags_extra`&~1 WHERE `entry` IN(32933,32934);
+UPDATE `creature_template` SET `flags_extra`= `flags_extra`&~1 WHERE `entry` IN(32933,32934);
diff --git a/sql/old/3.3.5a/2011_02_23_06_world_creatures.sql b/sql/old/3.3.5a/2011_02_23_06_world_creatures.sql
index 16a9947afe6..8ef6df59802 100644
--- a/sql/old/3.3.5a/2011_02_23_06_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_02_23_06_world_creatures.sql
@@ -8,7 +8,7 @@ UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `id`=21719;
UPDATE `creature_template` SET `InhabitType`=1 WHERE `entry`=21719;
-- fix walk speed for several npc's
-UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry` IN
+UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry` IN
(19449, -- Thunderlord Grunt
17855); -- Expedition Warden
diff --git a/sql/old/3.3.5a/2011_02_26_01_world_sai.sql b/sql/old/3.3.5a/2011_02_26_01_world_sai.sql
index 6735f217dd1..5e8519f68d9 100644
--- a/sql/old/3.3.5a/2011_02_26_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_26_01_world_sai.sql
@@ -1,7 +1,7 @@
SET @Fairmount = 3393; -- Captain Fairmount
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Fairmount; -- three scripts
DELETE FROM `smart_scripts` WHERE (`entryorguid`=@Fairmount 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
+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
(@Fairmount,0,0,0,4,0,100,0,0,0,0,0,11,9128,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captain Fairmount: On aggro cast Battle Shout self'),
(@Fairmount,0,1,0,2,0,100,1,0,30,0,0,11,19134,0,0,0,0,0,2,0,0,0,0,0,0,0,'Captain Fairmount: At 30% hp cast Frightening Shout'),
(@Fairmount,0,2,0,13,0,100,0,5000,5000,0,0,11,12555,0,0,0,0,0,2,0,0,0,0,0,0,0,'Captain Fairmount: On enemy casting cast Pummel');
diff --git a/sql/old/3.3.5a/2011_02_26_05_world_npc_spellclick_spells.sql b/sql/old/3.3.5a/2011_02_26_05_world_npc_spellclick_spells.sql
index f19aca71b24..76fb0749cdb 100644
--- a/sql/old/3.3.5a/2011_02_26_05_world_npc_spellclick_spells.sql
+++ b/sql/old/3.3.5a/2011_02_26_05_world_npc_spellclick_spells.sql
@@ -1,4 +1,4 @@
-UPDATE `creature_template` SET `npcflag`=`npcflag`|16777216 WHERE `entry` IN (SELECT `npc_entry` FROM `npc_spellclick_spells`);
+UPDATE `creature_template` SET `npcflag`=`npcflag`|16777216 WHERE `entry` IN (SELECT `npc_entry` FROM `npc_spellclick_spells`);
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (32640,32633,31861,31862,25743,27661,27258,27755,27756,27692,40725,32286,29929,29602,29709,27626,28851,
34120,30403,26813,26523,27496,27714,27996,28605,28606,28607,28833,30066,32930,28312,32627,33060,33067,33062,33109,34994,30234,27629,27924,28061,28192,28669,
diff --git a/sql/old/3.3.5a/2011_02_27_01_world_creature_template.sql b/sql/old/3.3.5a/2011_02_27_01_world_creature_template.sql
index 6813dd8d014..e1669e5940a 100644
--- a/sql/old/3.3.5a/2011_02_27_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_02_27_01_world_creature_template.sql
@@ -1,4 +1,4 @@
--- Template updates
+-- Template updates
UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`|32 WHERE `entry`=33063; -- Wrecked Siege Engine
UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`|32 WHERE `entry`=33059; -- Wrecked Demolisher
UPDATE `creature_template` SET `exp`=1 WHERE `entry`=33662; -- Kirin Tor Battle-Mage
@@ -9,7 +9,7 @@ UPDATE `creature_template` SET `exp`=1 WHERE `entry`=33627; -- Hired Demolitioni
UPDATE `creature_template` SET `npcflag`=`npcflag`|1 WHERE `entry`=33624; -- Archmage Pentarus
UPDATE `creature_template` SET `exp`=0 WHERE `entry`=33571; -- Ulduar Gauntlet Generator
--- Model data
+-- Model data
UPDATE `creature_model_info` SET `bounding_radius`=3,`combat_reach`=2.25,`gender`=2 WHERE `modelid`=27658; -- Wrecked Demolisher
UPDATE `creature_model_info` SET `bounding_radius`=0.5,`combat_reach`=1,`gender`=2 WHERE `modelid`=11686; -- Mortar Targetting Device
UPDATE `creature_model_info` SET `bounding_radius`=0.5,`combat_reach`=1,`gender`=2 WHERE `modelid`=11686; -- Mortar Targetting Device
@@ -22,9 +22,9 @@ UPDATE `creature_model_info` SET `bounding_radius`=0.372,`combat_reach`=1.2,`gen
UPDATE `creature_model_info` SET `bounding_radius`=0.3,`combat_reach`=1,`gender`=0 WHERE `modelid`=28581; -- Steelforged Defender
UPDATE `creature_model_info` SET `bounding_radius`=0.3,`combat_reach`=1,`gender`=0 WHERE `modelid`=28580; -- Steelforged Defender
UPDATE `creature_model_info` SET `bounding_radius`=0.5,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=5233; -- Spirit Healer
-
--- Addon data
-DELETE FROM `creature_template_addon` WHERE `entry` IN
+
+-- Addon data
+DELETE FROM `creature_template_addon` WHERE `entry` IN
(33059,33063,33662,33672,33167,33626,33060,33377,33062,33067,33579,33669,33214,33109,33666,33701,33686,33696,33622,33627,33779,33620
,32780,33624,33218,33629,33721,34234,33236,33571);
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
diff --git a/sql/old/3.3.5a/2011_02_28_04_world_sai.sql b/sql/old/3.3.5a/2011_02_28_04_world_sai.sql
index fda69483394..489ab0a3c59 100644
--- a/sql/old/3.3.5a/2011_02_28_04_world_sai.sql
+++ b/sql/old/3.3.5a/2011_02_28_04_world_sai.sql
@@ -8,7 +8,7 @@ SET @SCRIPT2 := 2784202;
UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid`=114186;
-- * create text into the DB
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0, 'Bat gizzards again for the gnomes tonight...',0,0,100,1,0,0, 'Fenrick Barlowe text'),
(@ENTRY,0,1, 'What do they expect, making the bats come in at that angle? Broken necks and gamey bat stew, that''s what they get.',0,0,100,1,0,0, 'Fenrick Barlowe text'),
(@ENTRY,0,2, '''We like trees, Fenrick. They provide cover.'' They won''t let me chop them down, either.',0,0,100,1,0,0, 'Fenrick Barlowe text'),
@@ -31,7 +31,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-- create scripts for random text, emotes, and pathing
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@SCRIPT1,@SCRIPT2);
-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
+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
-- AI
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'on spawn start path'),
(@ENTRY,0,1,0,40,0,100,0,5,@ENTRY,0,0,80,@SCRIPT1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'at wp 5 run script1'),
diff --git a/sql/old/3.3.5a/2011_02_28_05_world_vehicles.sql b/sql/old/3.3.5a/2011_02_28_05_world_vehicles.sql
index 9ef6e21cb3b..81305c06c1a 100644
--- a/sql/old/3.3.5a/2011_02_28_05_world_vehicles.sql
+++ b/sql/old/3.3.5a/2011_02_28_05_world_vehicles.sql
@@ -93,7 +93,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(16,0,33845,0,1,64373,0,0,0,'', 'Vehicle Quel''dorei Steed requires aura Armistice'),
(16,0,33844,0,1,64373,0,0,0,'', 'Vehicle Sunreaver Hawkstrider requires aura Armistice'),
(16,0,33217,0,1,64373,0,0,0,'', 'Vehicle Stormwind Steed requires aura Armistice');
--- race conditions
+-- race conditions
DELETE FROM `creature_template_addon` WHERE `entry` IN (33782,33318,33323,33322,33317,33319,33316,33321,33324,33320,33845,33844,33217);
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
diff --git a/sql/old/3.3.5a/2011_03_02_06_world_sai.sql b/sql/old/3.3.5a/2011_03_02_06_world_sai.sql
index ed81ade61a9..c66f8b1f608 100644
--- a/sql/old/3.3.5a/2011_03_02_06_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_02_06_world_sai.sql
@@ -1,47 +1,47 @@
--- SAI for Crust Burster
-SET @ENTRY := 16844;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-UPDATE `creature` SET `spawndist`=20,`MovementType`=1 WHERE `id`=@ENTRY;
-DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
-(@ENTRY,0,0,1,1,0,100,1,0,0,0,0,11,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Cast Submerge Visual'),
-(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,18,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Set Unselectable and Unattackable Flags'),
-(@ENTRY,0,2,3,0,0,100,1,0,0,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Submerge Visual'),
-(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Unselectable and Unattackable Flags'),
-(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Prevent Combat Movement'),
-(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Set Phase 1'),
-(@ENTRY,0,6,7,0,1,100,0,1000,1000,2100,4500,11,31747,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Poison (Phase 1)'),
-(@ENTRY,0,7,0,61,1,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 1)'),
-(@ENTRY,0,8,0,0,1,100,0,20400,20400,45000,50000,11,32738,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Bore (Phase 1)'),
+-- SAI for Crust Burster
+SET @ENTRY := 16844;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `spawndist`=20,`MovementType`=1 WHERE `id`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,1,0,100,1,0,0,0,0,11,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Cast Submerge Visual'),
+(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,18,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Set Unselectable and Unattackable Flags'),
+(@ENTRY,0,2,3,0,0,100,1,0,0,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Submerge Visual'),
+(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Unselectable and Unattackable Flags'),
+(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Prevent Combat Movement'),
+(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Set Phase 1'),
+(@ENTRY,0,6,7,0,1,100,0,1000,1000,2100,4500,11,31747,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Poison (Phase 1)'),
+(@ENTRY,0,7,0,61,1,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 1)'),
+(@ENTRY,0,8,0,0,1,100,0,20400,20400,45000,50000,11,32738,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Bore (Phase 1)'),
(@ENTRY,0,9,10,9,1,100,0,20,60,0,0,11,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Cast Submerge Visual (Phase 1)'),
-(@ENTRY,0,10,11,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Allow Combat Movement (Phase 1)'),
-(@ENTRY,0,11,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 2 (Phase 1)'),
-(@ENTRY,0,12,13,9,2,100,0,0,8,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Submerge Visual (Phase 2)'),
-(@ENTRY,0,13,14,61,2,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 2)'),
-(@ENTRY,0,14,15,61,2,100,0,0,8,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Unselectable and Unattackable Flags (Phase 2)'),
-(@ENTRY,0,15,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 1 (Phase 2)');
-
--- SAI for Marading Crust Burster
-SET @ENTRY := 16857;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-UPDATE `creature` SET `spawndist`=20,`MovementType`=1 WHERE `id`=@ENTRY;
-DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
-(@ENTRY,0,0,1,1,0,100,1,0,0,0,0,11,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Cast Submerge Visual'),
-(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,18,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Set Unselectable and Unattackable Flags'),
-(@ENTRY,0,2,3,0,0,100,1,0,0,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Submerge Visual'),
-(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Unselectable and Unattackable Flags'),
-(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Prevent Combat Movement'),
-(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Set Phase 1'),
-(@ENTRY,0,6,7,0,1,100,0,1000,1000,2100,4500,11,31747,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Poison (Phase 1)'),
-(@ENTRY,0,7,0,61,1,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 1)'),
-(@ENTRY,0,8,0,0,1,100,0,20400,20400,45000,50000,11,32738,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Bore (Phase 1)'),
+(@ENTRY,0,10,11,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Allow Combat Movement (Phase 1)'),
+(@ENTRY,0,11,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 2 (Phase 1)'),
+(@ENTRY,0,12,13,9,2,100,0,0,8,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Submerge Visual (Phase 2)'),
+(@ENTRY,0,13,14,61,2,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 2)'),
+(@ENTRY,0,14,15,61,2,100,0,0,8,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Unselectable and Unattackable Flags (Phase 2)'),
+(@ENTRY,0,15,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 1 (Phase 2)');
+
+-- SAI for Marading Crust Burster
+SET @ENTRY := 16857;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `spawndist`=20,`MovementType`=1 WHERE `id`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,1,0,100,1,0,0,0,0,11,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Cast Submerge Visual'),
+(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,18,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - OOC - Set Unselectable and Unattackable Flags'),
+(@ENTRY,0,2,3,0,0,100,1,0,0,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Submerge Visual'),
+(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Remove Unselectable and Unattackable Flags'),
+(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Prevent Combat Movement'),
+(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - On Aggro - Set Phase 1'),
+(@ENTRY,0,6,7,0,1,100,0,1000,1000,2100,4500,11,31747,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Poison (Phase 1)'),
+(@ENTRY,0,7,0,61,1,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 1)'),
+(@ENTRY,0,8,0,0,1,100,0,20400,20400,45000,50000,11,32738,1,0,0,0,0,2,0,0,0,0,0,0,0,'Crust Burster - Combat - Cast Bore (Phase 1)'),
(@ENTRY,0,9,10,9,1,100,0,20,60,0,0,11,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Cast Submerge Visual (Phase 1)'),
-(@ENTRY,0,10,11,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Allow Combat Movement (Phase 1)'),
-(@ENTRY,0,11,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 2 (Phase 1)'),
-(@ENTRY,0,12,13,9,2,100,0,0,8,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Submerge Visual (Phase 2)'),
-(@ENTRY,0,13,14,61,2,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 2)'),
-(@ENTRY,0,14,15,61,2,100,0,0,8,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Unselectable and Unattackable Flags (Phase 2)'),
+(@ENTRY,0,10,11,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Allow Combat Movement (Phase 1)'),
+(@ENTRY,0,11,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 2 (Phase 1)'),
+(@ENTRY,0,12,13,9,2,100,0,0,8,0,0,28,34038,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Submerge Visual (Phase 2)'),
+(@ENTRY,0,13,14,61,2,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - Combat - Prevent Combat Movement (Phase 2)'),
+(@ENTRY,0,14,15,61,2,100,0,0,8,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 0 - 8 Yards - Remove Unselectable and Unattackable Flags (Phase 2)'),
(@ENTRY,0,15,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Crust Burster - At 20 - 60 Yards Range - Set Phase 1 (Phase 2)');
diff --git a/sql/old/3.3.5a/2011_03_05_04_world_creatures.sql b/sql/old/3.3.5a/2011_03_05_04_world_creatures.sql
index 1ee645a097e..4a13823bf2e 100644
--- a/sql/old/3.3.5a/2011_03_05_04_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_03_05_04_world_creatures.sql
@@ -1,5 +1,5 @@
-- Some Dalran and Area Updates (sniff)
--- Template updates
+-- Template updates
UPDATE `creature_template` SET `exp`=0,`npcflag`=`npcflag`|640 WHERE `entry`=32415; -- Hamaka
UPDATE `creature_template` SET `exp`=0,`npcflag`=`npcflag`|130 WHERE `entry`=31031; -- Misensi
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|768 WHERE `entry`=35826; -- Kaye Toogie
@@ -16,7 +16,7 @@ UPDATE `creature_template` SET `baseattacktime`=2000,`unit_flags`=`unit_flags`|3
UPDATE `creature_template` SET `exp`=0 WHERE `entry`=32322; -- Gold Warrior
UPDATE `creature_template` SET `exp`=0 WHERE `entry`=32325; -- Gold Priest
--- Model data
+-- Model data
UPDATE `creature_model_info` SET `bounding_radius`=1.05,`combat_reach`=1.05,`gender`=0 WHERE `modelid`=10957; -- Dappled Stag
UPDATE `creature_model_info` SET `bounding_radius`=0.236,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=27957; -- Hamaka
UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=1,`gender`=2 WHERE `modelid`=1141; -- Underbelly Rat
@@ -129,5 +129,5 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
(28742,0,0,257,0, NULL), -- Marcia Chase
(29496,0,0,257,0, NULL); -- Kerta the Bold
--- Template updates for gameobject
+-- Template updates for gameobject
UPDATE `gameobject_template` SET `faction`=0 WHERE `entry`=35591; -- Fishing Bobber
diff --git a/sql/old/3.3.5a/2011_03_06_01_world_loot_template.sql b/sql/old/3.3.5a/2011_03_06_01_world_loot_template.sql
index 4681bd9ca96..deeb34c1744 100644
--- a/sql/old/3.3.5a/2011_03_06_01_world_loot_template.sql
+++ b/sql/old/3.3.5a/2011_03_06_01_world_loot_template.sql
@@ -12,7 +12,7 @@ SET @ICC_TrashDungeonNFinal := @ICC_TrashGenericGrey+8;
SET @ICC_TrashGenericPurpleDUNH := @ICC_TrashGenericGrey+9;
SET @ICC_TrashDungeonHFinal := @ICC_TrashGenericGrey+10;
-DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @ICC_TrashGenericGrey AND @ICC_TrashGenericGrey+10;
+DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @ICC_TrashGenericGrey AND @ICC_TrashGenericGrey+10;
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN 35063 AND 35076; -- cleanup OLD loot
INSERT INTO reference_loot_template (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- grey items (45)
@@ -351,7 +351,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- --------------------------------
-- -- Apply Trash Loot Dungeon_H --
--- --------------------------------
+-- --------------------------------
SET @LootDUNGEON_H := 100001; -- needs official entry designated
UPDATE `creature_template` SET `lootid`=@LootDUNGEON_H WHERE `entry` IN (37569,37568,37567,37565,38193,37566,37563); -- FoS
UPDATE `creature_template` SET `lootid`=@LootDUNGEON_H WHERE `entry` IN (37609,37638,37637,37635,37636,38249,38025,38026); -- PoS
diff --git a/sql/old/3.3.5a/2011_03_06_05_world_vehicle_accessory.sql b/sql/old/3.3.5a/2011_03_06_05_world_vehicle_accessory.sql
index 5e896d98412..d9ef666aa06 100644
--- a/sql/old/3.3.5a/2011_03_06_05_world_vehicle_accessory.sql
+++ b/sql/old/3.3.5a/2011_03_06_05_world_vehicle_accessory.sql
@@ -1,5 +1,5 @@
RENAME TABLE `vehicle_accessory` TO `vehicle_template_accessory`;
-
+
CREATE TABLE IF NOT EXISTS `vehicle_accessory` (
`guid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0,
`accessory_entry` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0,
diff --git a/sql/old/3.3.5a/2011_03_08_00_world_sai.sql b/sql/old/3.3.5a/2011_03_08_00_world_sai.sql
index 0bb809d42b2..679822be74e 100644
--- a/sql/old/3.3.5a/2011_03_08_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_08_00_world_sai.sql
@@ -1,8 +1,8 @@
--- Fix for quests:
+-- Fix for quests:
-- From Sniff:
SET @guid := 78; -- Set by TDB
DELETE FROM `creature` WHERE `id` IN (25664,25665,25666);
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
(@guid ,25664,571,1,1,0,0,3487.67456,4516.643,11.441596,2.18166161,120,0,0,1,0,0,0), -- South Killcredit
(@guid+1,25665,571,1,1,0,0,3645.95483,4551.105,12.4051342,0.715585,120,0,0,1,0,0,0), -- Northeast Killcredit
(@guid+2,25666,571,1,1,0,0,3649.16748,4744.338,12.3212109,0.8901179,120,0,0,1,0,0,0); -- Northwest Killcredit
@@ -14,7 +14,7 @@ UPDATE `creature_template` SET `baseattacktime`=2000,`faction_A`=35,`faction_H`=
-- SAI for the Killcredits:
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (25664,25665,25666);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25664,25665,25666);
-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
+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
(25664,0,0,0,8,0,100,0,45853,1,0,0,33,25664,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Mark Sinkhole Killcredit: South'),
(25665,0,0,0,8,0,100,0,45853,1,0,0,33,25665,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Mark Sinkhole Killcredit: NorthEast'),
(25666,0,0,0,8,0,100,0,45853,1,0,0,33,25666,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Mark Sinkhole Killcredit: NorthWest');
diff --git a/sql/old/3.3.5a/2011_03_10_05_world_creature_questrelation.sql b/sql/old/3.3.5a/2011_03_10_05_world_creature_questrelation.sql
index 21f73f30752..761fea2ec23 100644
--- a/sql/old/3.3.5a/2011_03_10_05_world_creature_questrelation.sql
+++ b/sql/old/3.3.5a/2011_03_10_05_world_creature_questrelation.sql
@@ -1,4 +1,4 @@
-- Wrong start/end NPCs for Caverns of Time Chain:
-- Andormu(man) should be Andormu(child)
-UPDATE `creature_involvedrelation` SET `id`=20130 WHERE `quest`IN(10285,10298);
+UPDATE `creature_involvedrelation` SET `id`=20130 WHERE `quest`IN(10285,10298);
UPDATE `creature_questrelation` SET `id`=20130 WHERE `quest`=10296;
diff --git a/sql/old/3.3.5a/2011_03_12_00_world_creature_template.sql b/sql/old/3.3.5a/2011_03_12_00_world_creature_template.sql
index a2d3d5d44a0..91bb5c164d4 100644
--- a/sql/old/3.3.5a/2011_03_12_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_03_12_00_world_creature_template.sql
@@ -29,7 +29,7 @@ UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2
37226,-- Wrath of the Lich King
-- Pit of Saron:
36494,-- Forgemaster Garfrost
-37613,-- Forgemaster Garfrost (1)
+37613,-- Forgemaster Garfrost (1)
36476,-- Ick
37627,-- Ick (1)
36477,-- Krick
diff --git a/sql/old/3.3.5a/2011_03_17_00_world_sai.sql b/sql/old/3.3.5a/2011_03_17_00_world_sai.sql
index 3fb85bbd2ac..8f46ff60a4f 100644
--- a/sql/old/3.3.5a/2011_03_17_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_17_00_world_sai.sql
@@ -291,7 +291,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,3,3808.239,3432.998,82.97262,0,0,0,100,0),
(@PATH,4,3812.432,3443.979,82.97263,0,0,0,100,0);
--- Remove 2 over spawns
+-- Remove 2 over spawns
DELETE FROM `creature` WHERE `guid` IN (99859,99858);
DELETE FROM `creature_addon` WHERE `guid` IN (99859,99858);
diff --git a/sql/old/3.3.5a/2011_03_17_10_world_sai.sql b/sql/old/3.3.5a/2011_03_17_10_world_sai.sql
index 6979ddb472d..fde9cc7ceff 100644
--- a/sql/old/3.3.5a/2011_03_17_10_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_17_10_world_sai.sql
@@ -1,24 +1,24 @@
--- SAI for Nethermine Burster
-SET @ENTRY := 23285;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-UPDATE `creature` SET `spawndist`=20,`MovementType`=1 WHERE `id`=@ENTRY;
-DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
-(@ENTRY,0,0,1,1,0,100,1,0,0,0,0,11,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - OOC - Cast Submerge Visual'),
-(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,18,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - OOC - Set Unselectable and Unattackable Flags'),
-(@ENTRY,0,2,3,0,0,100,1,0,0,0,0,28,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Remove Submerge Visual'),
-(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Remove Unselectable and Unattackable Flags'),
-(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Prevent Combat Movement'),
-(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Set Phase 1'),
-(@ENTRY,0,6,7,0,1,100,0,1000,1000,2100,4500,11,31747,1,0,0,0,0,2,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Cast Poison (Phase 1)'),
-(@ENTRY,0,7,0,61,1,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Prevent Combat Movement (Phase 1)'),
-(@ENTRY,0,8,0,0,1,100,0,20400,20400,45000,50000,11,32738,1,0,0,0,0,2,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Cast Bore (Phase 1)'),
+-- SAI for Nethermine Burster
+SET @ENTRY := 23285;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `spawndist`=20,`MovementType`=1 WHERE `id`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,1,0,100,1,0,0,0,0,11,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - OOC - Cast Submerge Visual'),
+(@ENTRY,0,1,0,61,0,100,1,0,0,0,0,18,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - OOC - Set Unselectable and Unattackable Flags'),
+(@ENTRY,0,2,3,0,0,100,1,0,0,0,0,28,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Remove Submerge Visual'),
+(@ENTRY,0,3,4,61,0,100,0,0,0,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Remove Unselectable and Unattackable Flags'),
+(@ENTRY,0,4,5,61,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Prevent Combat Movement'),
+(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - On Aggro - Set Phase 1'),
+(@ENTRY,0,6,7,0,1,100,0,1000,1000,2100,4500,11,31747,1,0,0,0,0,2,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Cast Poison (Phase 1)'),
+(@ENTRY,0,7,0,61,1,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Prevent Combat Movement (Phase 1)'),
+(@ENTRY,0,8,0,0,1,100,0,20400,20400,45000,50000,11,32738,1,0,0,0,0,2,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Cast Bore (Phase 1)'),
(@ENTRY,0,9,10,9,1,100,0,20,60,0,0,11,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 20 - 60 Yards Range - Cast Submerge Visual (Phase 1)'),
-(@ENTRY,0,10,11,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 20 - 60 Yards Range - Allow Combat Movement (Phase 1)'),
-(@ENTRY,0,11,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 20 - 60 Yards Range - Set Phase 2 (Phase 1)'),
-(@ENTRY,0,12,13,9,2,100,0,0,8,0,0,28,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 0 - 8 Yards - Remove Submerge Visual (Phase 2)'),
-(@ENTRY,0,13,14,61,2,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Prevent Combat Movement (Phase 2)'),
-(@ENTRY,0,14,15,61,2,100,0,0,8,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 0 - 8 Yards - Remove Unselectable and Unattackable Flags (Phase 2)'),
+(@ENTRY,0,10,11,61,1,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 20 - 60 Yards Range - Allow Combat Movement (Phase 1)'),
+(@ENTRY,0,11,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 20 - 60 Yards Range - Set Phase 2 (Phase 1)'),
+(@ENTRY,0,12,13,9,2,100,0,0,8,0,0,28,29147,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 0 - 8 Yards - Remove Submerge Visual (Phase 2)'),
+(@ENTRY,0,13,14,61,2,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - Combat - Prevent Combat Movement (Phase 2)'),
+(@ENTRY,0,14,15,61,2,100,0,0,8,0,0,19,33554434,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 0 - 8 Yards - Remove Unselectable and Unattackable Flags (Phase 2)'),
(@ENTRY,0,15,0,61,2,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - At 20 - 60 Yards Range - Set Phase 1 (Phase 2)'),
(@ENTRY,0,16,0,2,0,100,1,0,10,0,0,11,32714,3,0,0,0,0,1,0,0,0,0,0,0,0,'Nethermine Burster - Health level - Cast Enrage self');
diff --git a/sql/old/3.3.5a/2011_03_18_00_world_game_event_misc.sql b/sql/old/3.3.5a/2011_03_18_00_world_game_event_misc.sql
index 3856bb0c3db..42cebab6dd6 100644
--- a/sql/old/3.3.5a/2011_03_18_00_world_game_event_misc.sql
+++ b/sql/old/3.3.5a/2011_03_18_00_world_game_event_misc.sql
@@ -14,7 +14,7 @@ INSERT INTO `game_event_temp` (`entryOld`,`entryNew`) VALUES
-- Update game_event
ALTER TABLE `game_event` DROP PRIMARY KEY;
UPDATE `game_event`, `game_event_temp` SET `game_event`.`entry` = `game_event_temp`.`entryNew` WHERE `game_event`.`entry` = `game_event_temp`.`entryOld`;
-ALTER TABLE `game_event`
+ALTER TABLE `game_event`
CHANGE `entry` `eventEntry` TINYINT(3) UNSIGNED NOT NULL COMMENT 'Entry of the game event',
ADD PRIMARY KEY (`eventEntry`);
@@ -47,7 +47,7 @@ ALTER TABLE `game_event_gameobject` CHANGE `event` `eventEntry` TINYINT(3) NOT N
-- Update game_event_gameobject_quest
ALTER TABLE `game_event_gameobject_quest` DROP PRIMARY KEY;
UPDATE `game_event_gameobject_quest`, `game_event_temp` SET `game_event_gameobject_quest`.`event` = `game_event_temp`.`entryNew` WHERE `game_event_gameobject_quest`.`event` = `game_event_temp`.`entryOld`;
-ALTER TABLE `game_event_gameobject_quest`
+ALTER TABLE `game_event_gameobject_quest`
CHANGE `event` `eventEntry` TINYINT(3) UNSIGNED NOT NULL COMMENT 'Entry of the game event' FIRST,
ADD PRIMARY KEY (`id`, `quest`, `eventEntry`);
@@ -62,7 +62,7 @@ ALTER TABLE `game_event_npc_vendor` CHANGE `event` `eventEntry` TINYINT(3) NOT N
-- Update game_event_npcflag
ALTER TABLE `game_event_npcflag` DROP PRIMARY KEY;
UPDATE `game_event_npcflag`, `game_event_temp` SET `game_event_npcflag`.`event_id` = `game_event_temp`.`entryNew` WHERE `game_event_npcflag`.`event_id` = `game_event_temp`.`entryOld`;
-ALTER TABLE `game_event_npcflag`
+ALTER TABLE `game_event_npcflag`
CHANGE `event_id` `eventEntry` TINYINT(3) UNSIGNED NOT NULL COMMENT 'Entry of the game event' FIRST,
ADD PRIMARY KEY (`guid`, `eventEntry`);
diff --git a/sql/old/3.3.5a/2011_03_18_01_world_instance_pit_of_saron.sql b/sql/old/3.3.5a/2011_03_18_01_world_instance_pit_of_saron.sql
index 64ec58fc315..6110799c6b0 100644
--- a/sql/old/3.3.5a/2011_03_18_01_world_instance_pit_of_saron.sql
+++ b/sql/old/3.3.5a/2011_03_18_01_world_instance_pit_of_saron.sql
@@ -1,6 +1,6 @@
DELETE FROM `creature_questrelation` WHERE `quest` IN (24510,24499,24498,24710,24711,24506,24511,24682,24507,24712,24713);
DELETE FROM `creature_involvedrelation` WHERE `quest` IN (24510,24499,24498,24710,24711,24506,24511,24682,24507,24712,24713);
-INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
+INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
-- alliance
(37776,24510),
(37597,24499),
@@ -15,7 +15,7 @@ INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
(36990,24507),
(37592,24712),
(38189,24713);
-INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
+INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
-- alliance
(37597,24510),
(38160,24499),
@@ -34,6 +34,6 @@ INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
SET @GOBJ := 201969; -- ball and chain
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GOBJ;
DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@GOBJ;
-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
+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
(@GOBJ,1,0,0,64,0,100,0,0,0,0,0,33,36764,0,0,0,0,0,7,0,0,0,0,0,0,0, 'credit on gossip hello - alliance'),
(@GOBJ,1,1,0,64,0,100,0,0,0,0,0,33,36770,0,0,0,0,0,7,0,0,0,0,0,0,0, 'credit on gossip hello - horde');
diff --git a/sql/old/3.3.5a/2011_03_21_03_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_03_21_03_world_achievement_criteria_data.sql
index 2a95cb57206..31e4421bc1d 100644
--- a/sql/old/3.3.5a/2011_03_21_03_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2011_03_21_03_world_achievement_criteria_data.sql
@@ -5,7 +5,7 @@ DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (
11689,11690,11691,11692,11693, -- 10 Player
11542,11546,11547,11549,11678 -- 25 Player
) AND `type` IN (0,12);
-INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
-- Call of the Crusade (10 player)
(11684,12,0,0, ''),
(11685,12,0,0, ''),
diff --git a/sql/old/3.3.5a/2011_03_21_06_world_creature.sql b/sql/old/3.3.5a/2011_03_21_06_world_creature.sql
index 22de14493b3..1d9e87de3ea 100644
--- a/sql/old/3.3.5a/2011_03_21_06_world_creature.sql
+++ b/sql/old/3.3.5a/2011_03_21_06_world_creature.sql
@@ -2,11 +2,11 @@ SET @GUID := 95035 ; -- set guid by TDB
-- Spawn for Rotting Frost Giant in 25 man instances
DELETE FROM `creature` WHERE `id`=38494;
-INSERT INTO `creature`
-(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`)
+INSERT INTO `creature`
+(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`)
VALUES
(@GUID,38494,631,10,1,0,0,-452.366,2354.51,191.242,0.778178,86400,0,0,1,0,0,2,0,0,0);
-
+
-- Correct spawn mask for Rotting Frost Giant in 10 man instances (10/10 Heroic)
UPDATE `creature` SET `spawnmask`=5 WHERE `id`=38490;
diff --git a/sql/old/3.3.5a/2011_03_22_00_world_sai.sql b/sql/old/3.3.5a/2011_03_22_00_world_sai.sql
index 8b6ac8d9fe9..46ff0490324 100644
--- a/sql/old/3.3.5a/2011_03_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_22_00_world_sai.sql
@@ -15,7 +15,7 @@ DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,43151,0,18,1,24021,0,0,'','Spell 43151 targets only ELM General Purpose Bunny (scale x0.01)');
-- Add missing ELM General Purpose Bunny (scale x0.01)
-DELETE FROM `creature` WHERE `guid`=@GUID;
+DELETE FROM `creature` WHERE `guid`=@GUID;
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
(@GUID,24021,571,1,1,0,0,2597.148,-3735.499,261.9468,0.2094395,120,0,0,1,0,0,0);
-- ELM General Purpose Bunny (scale x0.01) fix InhabitType
diff --git a/sql/old/3.3.5a/2011_03_22_01_world_sai.sql b/sql/old/3.3.5a/2011_03_22_01_world_sai.sql
index 974b24f8cbd..43477be8004 100644
--- a/sql/old/3.3.5a/2011_03_22_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_22_01_world_sai.sql
@@ -1,6 +1,6 @@
-- Add missing Invisible Stalker (Floating)
SET @GUID := 85175; -- 2 Required
-DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+1;
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+1;
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
(@GUID,23033,571,1,1,0,0,3799.331,3428.748,92.80447,3.804818,120,0,0,1,0,0,0),
(@GUID+1,23033,571,1,1,0,0,3789.681,3434.306,92.37619,4.764749,120,0,0,1,0,0,0);
@@ -8,7 +8,7 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
SET @ENTRY := 26073; -- NPC entry
SET @SPELL1 := 45492; -- Shadow Nova
SET @SPELL2 := 11640; -- Renew cast once below 45%
-SET @SPELL3 := 15587; -- Mind Blast cast below 45% after renew
+SET @SPELL3 := 15587; -- Mind Blast cast below 45% after renew
UPDATE `creature` SET `modelid`=0,`spawndist`=0,`MovementType`=0 WHERE `id`=@ENTRY;
DELETE FROM `creature_addon` WHERE `guid`=85240;
DELETE FROM `creature_template_addon` WHERE `entry`=26073;
diff --git a/sql/old/3.3.5a/2011_03_23_00_world_conditions.sql b/sql/old/3.3.5a/2011_03_23_00_world_conditions.sql
index e8817974939..e3a260dece4 100644
--- a/sql/old/3.3.5a/2011_03_23_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_03_23_00_world_conditions.sql
@@ -1,3 +1,3 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=33581;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceEntry`,`ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceEntry`,`ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES
(18,33581,24,1,24238, 'Only use Insult on Bjorn Halgurdsson');
diff --git a/sql/old/3.3.5a/2011_03_24_00_world_creature_template.sql b/sql/old/3.3.5a/2011_03_24_00_world_creature_template.sql
index d1dd1653f33..2456fd1dd5b 100644
--- a/sql/old/3.3.5a/2011_03_24_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_03_24_00_world_creature_template.sql
@@ -1,4 +1,4 @@
-UPDATE `creature_template` SET `difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=10404; -- Pustulating Horror
+UPDATE `creature_template` SET `difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=10404; -- Pustulating Horror
UPDATE `creature_template` SET `difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=34606; -- Frost Sphere
UPDATE `creature_template` SET `difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=36724; -- Servant of the Throne
UPDATE `creature_template` SET `difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=36725; -- Nerub'ar Broodkeeper
diff --git a/sql/old/3.3.5a/2011_03_24_01_world_loot_template.sql b/sql/old/3.3.5a/2011_03_24_01_world_loot_template.sql
index a039b5d1933..613ff9171ad 100644
--- a/sql/old/3.3.5a/2011_03_24_01_world_loot_template.sql
+++ b/sql/old/3.3.5a/2011_03_24_01_world_loot_template.sql
@@ -13,7 +13,7 @@ SET @ICC_TrashGenericPurpleDUNH := @ICC_TrashGenericGrey+9;
SET @ICC_TrashDungeonHFinal := @ICC_TrashGenericGrey+10;
SET @ICC_TrashGenericPurple := @ICC_TrashGenericGrey+11;
-DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @ICC_TrashGenericGrey AND @ICC_TrashGenericGrey+11;
+DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @ICC_TrashGenericGrey AND @ICC_TrashGenericGrey+11;
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN 35063 AND 35076; -- cleanup OLD loot
INSERT INTO reference_loot_template (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- grey items (45)
@@ -341,7 +341,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- --------------------------------
-- -- Apply Trash Loot Dungeon_H --
--- --------------------------------
+-- --------------------------------
SET @LootDUNGEON_H := 100001; -- needs official entry designated
UPDATE `creature_template` SET `lootid`=@LootDUNGEON_H WHERE `entry` IN (37569,37568,37567,37565,38193,37566,37563); -- FoS
UPDATE `creature_template` SET `lootid`=@LootDUNGEON_H WHERE `entry` IN (37609,37638,37637,37635,37636,38249,38025,38026); -- PoS
diff --git a/sql/old/3.3.5a/2011_03_24_03_world_sai.sql b/sql/old/3.3.5a/2011_03_24_03_world_sai.sql
index fa560592d06..6093bf3c1fc 100644
--- a/sql/old/3.3.5a/2011_03_24_03_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_24_03_world_sai.sql
@@ -1,4 +1,4 @@
--- Scourge Deathspeaker SAI
+-- Scourge Deathspeaker SAI
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=27615;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=27615;
DELETE FROM `smart_scripts` WHERE `entryorguid`=27615;
@@ -35,7 +35,7 @@ DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
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
(@ENTRY,0,0,0,1,0,100,1,1000,1000,1000,1000,11,38469,0,0,0,0,0,19,22139,0,0,0,0,0,0,'Dark Conclave Ritualist - OOC - Dark Conclave Ritualist Channel');
--- Shattered Sun Marksman fixup (tested)
+-- Shattered Sun Marksman fixup (tested)
-- Console no longer spamming waypoint script errors in The Dawning Square
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=24938;
-- Shattered Sun Marksman shoot at Bridge Marksman Target Dummy SAI
@@ -55,7 +55,7 @@ DELETE FROM `waypoint_scripts` WHERE `id` BETWEEN 80 AND 111;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `guid` IN (65694,65695,65696,65697,65698,65699,65700,65702);
UPDATE `creature_addon` SET `path_id`=0 WHERE `guid` IN (65694,65695,65696,65697,65698,65699,65700,65702);
--- Fix Spell condition for Spell 45223 to target Bridge Marksman Target Dummy 25192
+-- Fix Spell condition for Spell 45223 to target Bridge Marksman Target Dummy 25192
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=45223;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,45223,0,18,1,25192,0,0,'','Spell 45223 targets Bridge Marksman Target Dummy');
diff --git a/sql/old/3.3.5a/2011_03_24_04_world_sai.sql b/sql/old/3.3.5a/2011_03_24_04_world_sai.sql
index e0c281fa559..ae06dffd675 100644
--- a/sql/old/3.3.5a/2011_03_24_04_world_sai.sql
+++ b/sql/old/3.3.5a/2011_03_24_04_world_sai.sql
@@ -8,12 +8,12 @@ UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (21173,21170,224
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|2048 WHERE `entry` IN (21170,22404,22405,22406);
-- Add missing Zeth'Gor Quest Credit Marker, They Must Burn
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
(78738,21173,530,1,1,0,0,-1162.911377,2248.195313,152.24733,4.815845,120,0,0,1,0,0,0);
-- Add missing Go
DELETE FROM `gameobject_template` WHERE `entry`=183929;
-INSERT INTO `gameobject_template` (`entry`,`type`,`displayId`,`name`,`castBarCaption`,`unk1`,`faction`,`flags`,`size`,`data0`,`data1`,`data2`,`data3`,`data4`,`data5`,`data6`,`data7`,`data8`,`data9`,`data10`,`data11`,`data12`,`data13`,`data14`,`data15`,`data16`,`data17`,`data18`,`data19`,`data20`,`data21`,`data22`,`data23`,`ScriptName`,`WDBVerified`) VALUES
+INSERT INTO `gameobject_template` (`entry`,`type`,`displayId`,`name`,`castBarCaption`,`unk1`,`faction`,`flags`,`size`,`data0`,`data1`,`data2`,`data3`,`data4`,`data5`,`data6`,`data7`,`data8`,`data9`,`data10`,`data11`,`data12`,`data13`,`data14`,`data15`,`data16`,`data17`,`data18`,`data19`,`data20`,`data21`,`data22`,`data23`,`ScriptName`,`WDBVerified`) VALUES
(183929,6,0, '', '', '',35,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, '',1);
-- SAI add animation to GameObject Smoke Beacon
diff --git a/sql/old/3.3.5a/2011_03_26_00_world_conditions.sql b/sql/old/3.3.5a/2011_03_26_00_world_conditions.sql
index f276a0f24b2..44c793dd0cd 100644
--- a/sql/old/3.3.5a/2011_03_26_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_03_26_00_world_conditions.sql
@@ -1,6 +1,6 @@
-- conditions for spells used by Malygos
DELETE FROM `conditions` WHERE `SourceGroup`=0 AND `SourceEntry` IN (56263,55853,56505,56429,56152) AND `ConditionTypeOrReference`=18;
-INSERT INTO `conditions` (SourceTypeOrReferenceId,ConditionTypeOrReference,SourceGroup,SourceEntry,ConditionValue1,ConditionValue2) VALUES
+INSERT INTO `conditions` (SourceTypeOrReferenceId,ConditionTypeOrReference,SourceGroup,SourceEntry,ConditionValue1,ConditionValue2) VALUES
(13,18,0,55853,1,30090),
(13,18,0,56263,1,30090),
(13,18,0,56505,1,30334),
diff --git a/sql/old/3.3.5a/2011_03_26_00_world_gameobject.sql b/sql/old/3.3.5a/2011_03_26_00_world_gameobject.sql
index 1d587b199a8..523426f3a7b 100644
--- a/sql/old/3.3.5a/2011_03_26_00_world_gameobject.sql
+++ b/sql/old/3.3.5a/2011_03_26_00_world_gameobject.sql
@@ -1,9 +1,9 @@
-- Spawning Focusing Iris
DELETE FROM `gameobject` WHERE `id`=193958;
-INSERT INTO `gameobject` (guid,id,map,spawnMask,phaseMask,position_x,position_y,position_z,orientation,rotation0,rotation1,rotation2,rotation3,spawntimesecs,animprogress,state) VALUES
+INSERT INTO `gameobject` (guid,id,map,spawnMask,phaseMask,position_x,position_y,position_z,orientation,rotation0,rotation1,rotation2,rotation3,spawntimesecs,animprogress,state) VALUES
(151791,193958,616,1,1,754.2546,1301.71973,266.170319,-1.60570168,0,0,0,0,120,0,1);
-- Spawning chests
DELETE FROM `gameobject` WHERE `id` IN (193967,193905);
INSERT INTO `gameobject` (guid,id,map,spawnMask,phaseMask,position_x,position_y,position_z,orientation,spawntimesecs,animprogress,state) VALUES
-(151792,193905,616,1,1,764.56,1284.63,269,1.82,-604800,100,1),
+(151792,193905,616,1,1,764.56,1284.63,269,1.82,-604800,100,1),
(151793,193967,616,2,1,764.56,1284.63,269,1.82,-604800,100,1); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_03_26_00_world_npc_spellclick_spells.sql b/sql/old/3.3.5a/2011_03_26_00_world_npc_spellclick_spells.sql
index 61ace8c0877..b5be7525576 100644
--- a/sql/old/3.3.5a/2011_03_26_00_world_npc_spellclick_spells.sql
+++ b/sql/old/3.3.5a/2011_03_26_00_world_npc_spellclick_spells.sql
@@ -1,5 +1,5 @@
-- Hover Disk
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (30248,30234);
-INSERT INTO `npc_spellclick_spells` (npc_entry,spell_id,quest_start,quest_end,cast_flags) VALUES
+INSERT INTO `npc_spellclick_spells` (npc_entry,spell_id,quest_start,quest_end,cast_flags) VALUES
(30234,61421,0,0,0),
(30248,61421,0,0,0);
diff --git a/sql/old/3.3.5a/2011_03_26_00_world_smart_scripts.sql b/sql/old/3.3.5a/2011_03_26_00_world_smart_scripts.sql
index 3f5431cd39a..4f595cffb9f 100644
--- a/sql/old/3.3.5a/2011_03_26_00_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2011_03_26_00_world_smart_scripts.sql
@@ -1,11 +1,11 @@
-- Scripts for Nexus Lord and Scion of Eternity
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (30249,30245);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30249 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
+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
(30249, 0, 0, 0, 0, 0, 100, 6, 3000, 5000, 4000, 6000, 11, 56397, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Scion of Eternity - Cast Arcane Barrage (Random)'),
(30249, 0, 1, 0, 7, 0, 100, 6, 1, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Scion of Eternity - Despawn in EvadeMode');
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30245 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
+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
(30245, 0, 0, 0, 0, 0, 100, 6, 7000, 10000, 10000, 15000, 11, 57060, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nexus Lord - Cast Haste (Self)'),
(30245, 0, 1, 0, 0, 0, 100, 6, 5000, 8000, 9000, 12000, 11, 57058, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Nexus Lord - Cast Arcane Shock (Random)'),
(30245, 0, 2, 0, 7, 0, 100, 6, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nexus Lord - Despawn in EvadeMode');
diff --git a/sql/old/3.3.5a/2011_03_26_00_world_vehicle_template_accessory.sql b/sql/old/3.3.5a/2011_03_26_00_world_vehicle_template_accessory.sql
index a5b0963181a..4dcdb0c6515 100644
--- a/sql/old/3.3.5a/2011_03_26_00_world_vehicle_template_accessory.sql
+++ b/sql/old/3.3.5a/2011_03_26_00_world_vehicle_template_accessory.sql
@@ -1,5 +1,5 @@
-- Hover Disk
DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (30234,30248);
-INSERT INTO `vehicle_template_accessory` (entry,accessory_entry,seat_id,minion,description) VALUES
+INSERT INTO `vehicle_template_accessory` (entry,accessory_entry,seat_id,minion,description) VALUES
(30234,30245,0,0,'Hover Disk - Nexus Lord'),
(30248,30249,0,0,'Hover Disk - Scion of Eternity'); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_03_27_01_world_misc.sql b/sql/old/3.3.5a/2011_03_27_01_world_misc.sql
index 74a001be493..bd8eecf7237 100644
--- a/sql/old/3.3.5a/2011_03_27_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_03_27_01_world_misc.sql
@@ -137,7 +137,7 @@ INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes
(32643,0,0,0,3,0,'61478 0'); -- companion pet aura (arcane explosions)
DELETE FROM `smart_scripts` WHERE `entryorguid`=-98174 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
+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
(-98174,0,0,0,62,0,100,0,@Gossip+1,0,0,0,11,61457,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Archmage Vargoth (Dalaran) - On gossip select cast Kirin Tor Familiar on invoker');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=@Gossip+0 AND `SourceEntry`=14192;
diff --git a/sql/old/3.3.5a/2011_03_27_02_world_misc.sql b/sql/old/3.3.5a/2011_03_27_02_world_misc.sql
index 383de94a629..fbbaff1e0da 100644
--- a/sql/old/3.3.5a/2011_03_27_02_world_misc.sql
+++ b/sql/old/3.3.5a/2011_03_27_02_world_misc.sql
@@ -359,7 +359,7 @@ INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`
(@GGuid+2,@G_BatFence,1,1,1,-827.066,-4983.64063,15.518714,-3.07176614,0,0,0,0,120,0,1), -- Sen'jin Bat Roost Fence
(@GGuid+3,@G_BatFence,1,1,1,-829.5955,-4978.009,15.6437654,-2.44346023,0,0,0,0,120,0,1), -- Sen'jin Bat Roost Fence
(@GGuid+4,@G_BatPost,1,1,1,-831.7917,-4975.60938,15.85345,-2.40855432,0,0,0,0,120,0,1), -- Sen'jin Bat Roost Fence Post
-(@GGuid+5,@G_RDrum,1,1,1,-797.4774,-4972.70166,17.8050346,-2.12930059,0,0,0,0,120,0,1), -- Ritual Drum
+(@GGuid+5,@G_RDrum,1,1,1,-797.4774,-4972.70166,17.8050346,-2.12930059,0,0,0,0,120,0,1), -- Ritual Drum
(@GGuid+6,@G_RGong,1,1,1,-789.6094,-4979.12842,18.0358353,-2.54817939,0,0,0,0,120,0,1), -- Ritual Gong
(@GGuid+7,@G_RBrazier,1,1,1,-806.4583,-4993.28125,16.5453663,0,0,0,0,0,120,0,1), -- Ritual Brazier
(@GGuid+8,@G_SRDrum,1,1,1,-799.1007,-4987.36475,17.63783,0.2792516,0,0,0,0,120,0,1), -- Small Ritual Drum
diff --git a/sql/old/3.3.5a/2011_03_28_00_world_misc.sql b/sql/old/3.3.5a/2011_03_28_00_world_misc.sql
index ee74787d6ac..2d0f683bfda 100644
--- a/sql/old/3.3.5a/2011_03_28_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_03_28_00_world_misc.sql
@@ -1,11 +1,11 @@
UPDATE `creature_template` SET `npcflag`=`npcflag`|16777216 WHERE `entry`=40176; -- Sen'jin Frog
-- Add missing table at Steelgrill's Depot
DELETE FROM `gameobject` WHERE `guid`=151888 AND `id`=202564;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(151888,202564,0,1,1,-5463.98975,-626.967041,393.528717,0,0,0,0,0,120,0,1);
-- Add non-existing equipment
DELETE FROM `creature_equip_template` WHERE `entry`=2432;
-INSERT INTO `creature_equip_template` (`entry`,`equipentry1`,`equipentry2`,`equipentry3`) VALUES
+INSERT INTO `creature_equip_template` (`entry`,`equipentry1`,`equipentry2`,`equipentry3`) VALUES
(2432,53056,0,0);
UPDATE `creature_template` SET `equipment_id`=2432 WHERE `entry`=39368; -- Set equipment to Drill Sergeant Steamcrank
UPDATE `creature_template` SET `equipment_id`=2432 WHERE `entry`=39675; -- Set equipment to Captain Tread Sparknozzle
@@ -16,7 +16,7 @@ UPDATE `creature_template` SET `AIName`= '' WHERE `entry`=30037;
-- Fix and add spawns
DELETE FROM `creature` WHERE `id` IN (23289,23345,23346,23348,23291,23340,23342,23344,23370,23376,23427,23489);
DELETE FROM `creature` WHERE `guid` BETWEEN 52334 AND 52347;
-INSERT INTO `creature` (guid,id,map,spawnMask,phaseMask,modelid,equipment_id,position_x,position_y,position_z,orientation,spawntimesecs,spawndist,currentwaypoint,curhealth,curmana,DeathState,MovementType) VALUES
+INSERT INTO `creature` (guid,id,map,spawnMask,phaseMask,modelid,equipment_id,position_x,position_y,position_z,orientation,spawntimesecs,spawndist,currentwaypoint,curhealth,curmana,DeathState,MovementType) VALUES
(52334,23289,530,1,1,0,0,-5155.48975,696.2224,42.196106,4.90454865,120,0,0,1,0,0,0), -- Mine Car
(52335,23289,530,1,1,0,0,-5195.42334,620.3688,44.1691132,6.20430231,120,0,0,1,0,0,0), -- Mine Car
(52336,23345,530,1,1,0,0,-5066.307,640.2136,86.49668,1.553343,120,0,0,1,0,0,0), -- Wing Commander Ichman
diff --git a/sql/old/3.3.5a/2011_03_29_00_world_creature.sql b/sql/old/3.3.5a/2011_03_29_00_world_creature.sql
index dbe2f3e052d..9226d1c2277 100644
--- a/sql/old/3.3.5a/2011_03_29_00_world_creature.sql
+++ b/sql/old/3.3.5a/2011_03_29_00_world_creature.sql
@@ -30,13 +30,13 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
-- -- Equipment data --
-- --------------------
DELETE FROM `creature_equip_template` WHERE `entry`=@EQUIP;
-INSERT INTO `creature_equip_template` (`entry`,`equipentry1`,`equipentry2`,`equipentry3`) VALUES
+INSERT INTO `creature_equip_template` (`entry`,`equipentry1`,`equipentry2`,`equipentry3`) VALUES
(@EQUIP,38175,12932,0);
-- ---------------------
-- -- Creature Spawns --
-- ---------------------
-DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+86;
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+86;
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
-- Old Crystalbark
(@GUID,32357,571,1,1,0,0,3550.59,7169.73,220.75,0.130042,28800,0,0,13936,3231,0,2),
@@ -1364,7 +1364,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,49,4913.710,-1698.930,248.3080,0,0,0,100,0),
(@PATH,50,4914.310,-1661.770,248.3090,0,0,0,100,0);
--- Pathing for Fumblub Gearwind Entry: 32358
+-- Pathing for Fumblub Gearwind Entry: 32358
SET @NPC := @GUID+4;
SET @PATH := @NPC * 10;
UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4107.777,`position_y`=4981.302,`position_z`=4.601125 WHERE `guid`=@NPC;
@@ -1395,7 +1395,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
SET @GUID := 250006;
UPDATE `creature_template` SET `faction_a`=14, `faction_h`=14 WHERE entry IN (32630);
-DELETE FROM `creature` WHERE `guid`=@GUID;
+DELETE FROM `creature` WHERE `guid`=@GUID;
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
-- Vyragosa
(@GUID,32630,571,1,1,0,0,7090.247,-1566.583,958.0051,0.7234184,28800,0,0,1,0,0,2);
diff --git a/sql/old/3.3.5a/2011_04_03_00_world_misc.sql b/sql/old/3.3.5a/2011_04_03_00_world_misc.sql
index ee23fbd4a85..a40b15e7a2a 100644
--- a/sql/old/3.3.5a/2011_04_03_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_04_03_00_world_misc.sql
@@ -50,6 +50,6 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
-- SAI
DELETE FROM `smart_scripts` WHERE `entryorguid`=25171 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
+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
(25171,0,0,0,1,0,100,1,500,500,0,0,11,63413,0,0,0,0,0,11,35469,10,0,0,0,0,0, 'Invisible Stalker (Scale x0.5) - OOC cast Rope Beam in Gormok the Impaler (not repeteable)'),
(25171,0,1,0,1,0,100,1,500,500,0,0,11,63413,0,0,0,0,0,11,35470,10,0,0,0,0,0, 'Invisible Stalker (Scale x0.5) - OOC cast Rope Beam in Icehowl (not repeteable)');
diff --git a/sql/old/3.3.5a/2011_04_03_05_world_sai.sql b/sql/old/3.3.5a/2011_04_03_05_world_sai.sql
index b1b5d97c4f1..435116e2b1b 100644
--- a/sql/old/3.3.5a/2011_04_03_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_04_03_05_world_sai.sql
@@ -5,9 +5,9 @@ UPDATE `creature_template` SET `AIName`= '' WHERE `entry` IN (23069,23259,23336,
-- SAI for Gavin Gnarltree
SET @ENTRY := 225;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=-10617.34,`position_y`=-1153.902,`position_z`=27.11271 WHERE `guid`=4086;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Gavin Gnarltree - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,1,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Gavin Gnarltree - Reach wp 1 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Gavin Gnarltree - Reach wp 1 - ONESHOT_POINT'),
@@ -32,10 +32,10 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Joseph Wilson
SET @ENTRY := 33589;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=8489.46,`position_y`=964.667,`position_z`=547.293 WHERE `guid`=75904;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Joseph Wilson - On spawn - Start WP movement'),
(@ENTRY,0,1,0,40,0,100,0,1,@ENTRY,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Joseph Wilson - Reach wp 1 - run script'),
(@ENTRY,0,2,3,40,0,100,0,4,@ENTRY,0,0,54,60000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Joseph Wilson - Reach wp 4 - pause path'),
@@ -58,10 +58,10 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Thomas Partridge
SET @ENTRY := 33854;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=8480.21,`position_y`=937.883,`position_z`=547.293 WHERE `guid`=76735;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Thomas Partridge - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,1,@ENTRY,0,0,54,60000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thomas Partridge - Reach wp 1 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.01942, 'Thomas Partridge - Reach wp 1 - turn to'),
@@ -101,9 +101,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Brammold Deepmine
SET @ENTRY := 32509;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5771.88,`position_y`=632.803,`position_z`=661.075 WHERE `guid`=120355;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Brammold Deepmine - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,2,@ENTRY,0,0,54,480000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Brammold Deepmine - Reach wp 2 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.321288, 'Brammold Deepmine - Reach wp 2 - turm to'),
@@ -128,9 +128,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Emi
SET @ENTRY := 32668;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5805.625,`position_y`=692.3191,`position_z`=647.0484 WHERE `guid`=110543;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Emi - On spawn - Start WP movement'),
(@ENTRY,0,1,0,40,0,100,0,1,@ENTRY,0,0,54,18000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Emi - Reach wp 1 - pause path'),
(@ENTRY,0,2,3,40,0,100,0,2,@ENTRY,0,0,54,25000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Emi - Reach wp 2 - pause path'),
@@ -145,9 +145,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Colin
SET @ENTRY := 32669;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5807.146,`position_y`=683.3826,`position_z`=647.0484 WHERE `guid`=110586;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Colin - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,1,@ENTRY,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Colin - Reach wp 1 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.427974, 'Colin - Reach wp 1 - turm to'),
diff --git a/sql/old/3.3.5a/2011_04_03_06_world_waypoint.sql b/sql/old/3.3.5a/2011_04_03_06_world_waypoint.sql
index 46ae5dc202c..f38f690666c 100644
--- a/sql/old/3.3.5a/2011_04_03_06_world_waypoint.sql
+++ b/sql/old/3.3.5a/2011_04_03_06_world_waypoint.sql
@@ -613,7 +613,7 @@ DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
-(@PATH,1,-10596.3,-1164.096,30.05967,0,0,0,100,0),
+(@PATH,1,-10596.3,-1164.096,30.05967,0,0,0,100,0),
(@PATH,2,-10590.63,-1156.783,30.05967,0,0,0,100,0),
(@PATH,3,-10590.52,-1155.93,30.05967,55000,0,0,100,0),
(@PATH,4,-10590.21,-1156.136,30.05967,0,0,0,100,0),
@@ -627,7 +627,7 @@ DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
-(@PATH,1,-10494.12,-1160.191,28.37647,45000,0,0,100,0),
+(@PATH,1,-10494.12,-1160.191,28.37647,45000,0,0,100,0),
(@PATH,2,-10498.6,-1160.361,28.08655,0,0,0,100,0),
(@PATH,3,-10498.77,-1161.604,28.08655,9000,0,0,100,0),
(@PATH,4,-10498.77,-1161.249,28.08655,0,0,0,100,0),
diff --git a/sql/old/3.3.5a/2011_04_03_09_world_misc.sql b/sql/old/3.3.5a/2011_04_03_09_world_misc.sql
index f82822bfd17..74d63effc3a 100644
--- a/sql/old/3.3.5a/2011_04_03_09_world_misc.sql
+++ b/sql/old/3.3.5a/2011_04_03_09_world_misc.sql
@@ -1,5 +1,5 @@
DELETE FROM `smart_scripts` WHERE (`entryorguid`=25171 OR `entryorguid` BETWEEN -209026 AND -209019) 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
+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
(-209019,0,0,0,1,0,100,1,500,500,0,0,11,63413,0,0,0,0,0,11,35469,10,0,0,0,0,0, 'Invisible Stalker (Scale x0.5) - OOC cast Rope Beam in Gormok the Impaler'),
(-209020,0,0,0,1,0,100,1,500,500,0,0,11,63413,0,0,0,0,0,11,35469,10,0,0,0,0,0, 'Invisible Stalker (Scale x0.5) - OOC cast Rope Beam in Gormok the Impaler'),
(-209022,0,0,0,1,0,100,1,500,500,0,0,11,63413,0,0,0,0,0,11,35469,10,0,0,0,0,0, 'Invisible Stalker (Scale x0.5) - OOC cast Rope Beam in Gormok the Impaler'),
diff --git a/sql/old/3.3.5a/2011_04_03_10_world_spell_script_names.sql b/sql/old/3.3.5a/2011_04_03_10_world_spell_script_names.sql
index c522d73ac8b..e32d3579379 100644
--- a/sql/old/3.3.5a/2011_04_03_10_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_04_03_10_world_spell_script_names.sql
@@ -1,4 +1,4 @@
-- Add spell script
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_symbol_of_life_dummy';
-INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(8593, 'spell_symbol_of_life_dummy');
diff --git a/sql/old/3.3.5a/2011_04_03_11_world_spell_script_names.sql b/sql/old/3.3.5a/2011_04_03_11_world_spell_script_names.sql
index 49cf539b922..be60a58d0cb 100644
--- a/sql/old/3.3.5a/2011_04_03_11_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_04_03_11_world_spell_script_names.sql
@@ -1,4 +1,4 @@
-- Add spell script
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_ulduar_proximity_mines';
-INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(63027, 'spell_ulduar_proximity_mines');
diff --git a/sql/old/3.3.5a/2011_04_11_01_world_creature_loot_template.sql b/sql/old/3.3.5a/2011_04_11_01_world_creature_loot_template.sql
index 5d7a0f4687e..d789178c40c 100644
--- a/sql/old/3.3.5a/2011_04_11_01_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2011_04_11_01_world_creature_loot_template.sql
@@ -4,7 +4,7 @@ DELETE FROM `creature_loot_template` WHERE `entry`=@lasher;
INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@lasher,37704,100,1,0,1,3), -- Crystalised Life
(@lasher,43324,-75,1,0,1,1), -- Alliance Herb Pouch
-(@lasher,44809,-75,1,0,1,1), -- Horde Herb Pouch
+(@lasher,44809,-75,1,0,1,1), -- Horde Herb Pouch
(@lasher,44774,80,1,0,1,1), -- Ice-Piercing Thorn
(@lasher,44775,20,1,0,1,1); -- Revolting Flower
diff --git a/sql/old/3.3.5a/2011_04_11_02_world_spell_area.sql b/sql/old/3.3.5a/2011_04_11_02_world_spell_area.sql
index 672ac1ca913..4b85908910d 100644
--- a/sql/old/3.3.5a/2011_04_11_02_world_spell_area.sql
+++ b/sql/old/3.3.5a/2011_04_11_02_world_spell_area.sql
@@ -1,6 +1,6 @@
-- Add Spectral Gyphron to Wintergrasp
DELETE FROM `spell_area` WHERE `spell`=55164 AND `area`=4197;
-INSERT INTO `spell_area`
-(`spell`,`area`,`quest_start`,`quest_start_active`,`aura_spell`,`racemask`,`gender`,`autocast`)
+INSERT INTO `spell_area`
+(`spell`,`area`,`quest_start`,`quest_start_active`,`aura_spell`,`racemask`,`gender`,`autocast`)
VALUES
(55164,4197,0,0,8326,65527,2,1);
diff --git a/sql/old/3.3.5a/2011_04_11_03_world_arena_season_5.sql b/sql/old/3.3.5a/2011_04_11_03_world_arena_season_5.sql
index 2336f3974fe..2cb150105e3 100644
--- a/sql/old/3.3.5a/2011_04_11_03_world_arena_season_5.sql
+++ b/sql/old/3.3.5a/2011_04_11_03_world_arena_season_5.sql
@@ -43,7 +43,7 @@ INSERT INTO `game_event_creature` (`guid`,`eventEntry`) VALUES
(@GUID+10,57); -- Captain Dirgehammer (32381)
-- ----------------------
-- -- Vendor Templates --
--- ----------------------
+-- ----------------------
SET @31600HP := 2560;
SET @38000HP := 2561;
SET @1660RT_39400HP := 2564;
@@ -87,9 +87,9 @@ SET @Doris := 32385; -- (most likely) (34058/34059/34060) as s6/s7/s8?
SET @Tristia := 32380; -- (most likely) (34076,34077,34078) as s6/s7/s8?
DELETE FROM `npc_vendor` WHERE `entry` IN (@BG_Zar,@Moonstrike,@ZomBocom,@Xazi,@Nargle,@Kezzik,@Argex,@Thunderhorn,@Doris,@Tristia);
-INSERT INTO `npc_vendor`
+INSERT INTO `npc_vendor`
(`entry`,`slot`,`item`,`maxcount`,`incrtime`,`ExtendedCost`)
-VALUES
+VALUES
-- Spacer
(@BG_Zar,0,40779,0,0,@60000HP), -- Savage Gladiator Chest DK
(@BG_Zar,0,40799,0,0,@50000HP), -- Savage Gladiator Gloves DK
diff --git a/sql/old/3.3.5a/2011_04_14_00_world_sai.sql b/sql/old/3.3.5a/2011_04_14_00_world_sai.sql
index 9252f451a83..0918b001bf7 100644
--- a/sql/old/3.3.5a/2011_04_14_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_04_14_00_world_sai.sql
@@ -5,5 +5,5 @@ DELETE FROM `creature_ai_scripts` WHERE `creature_id`=732;
-- Timers were got from eventAI script (ACID)
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=732;
DELETE FROM `smart_scripts` WHERE (`entryorguid`=732 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
+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
(732, 0, 0, 0, 67, 0, 100, 0, 3900, 6900, 0, 0, 11, 7159, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Murloc Lurker - Casts Backstab'); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_04_14_01_world_quest_template.sql b/sql/old/3.3.5a/2011_04_14_01_world_quest_template.sql
index 0602d814fe8..2ae1a62d4b7 100644
--- a/sql/old/3.3.5a/2011_04_14_01_world_quest_template.sql
+++ b/sql/old/3.3.5a/2011_04_14_01_world_quest_template.sql
@@ -14,4 +14,4 @@ UPDATE `quest_template` SET `PrevQuestId`=13664 WHERE `entry`=13788; -- Thread f
UPDATE `quest_template` SET `PrevQuestId`=13664 WHERE `entry`=13809; -- Thread from Above only after The Black Knights Fall
UPDATE `quest_template` SET `PrevQuestId`=13664 WHERE `entry`=13812; -- Thread from Above only after The Black Knights Fall
-- Fix some startuperrors:
-UPDATE `creature_template` SET `npcflag`=`npcflag`|128 WHERE `entry` IN (32405,32407);
+UPDATE `creature_template` SET `npcflag`=`npcflag`|128 WHERE `entry` IN (32405,32407);
diff --git a/sql/old/3.3.5a/2011_04_17_00_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_04_17_00_world_achievement_criteria_data.sql
index d75764507e7..af58365089a 100644
--- a/sql/old/3.3.5a/2011_04_17_00_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2011_04_17_00_world_achievement_criteria_data.sql
@@ -1,7 +1,7 @@
DELETE FROM `disables` WHERE `sourceType` = 4 AND `entry` IN (7625,6446,7628);
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (6446,7625) AND `type`=11;
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7628 AND `type`!=0;
-INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
(6446,11,0,0,'achievement_bg_sa_drop_it'),
(7625,11,0,0,'achievement_bg_sa_artillery_veteran'),
(7628,11,0,0,'achievement_bg_sa_artillery_expert'),
diff --git a/sql/old/3.3.5a/2011_04_17_06_world_creature.sql b/sql/old/3.3.5a/2011_04_17_06_world_creature.sql
index 76ac9c62d5a..844cd416cfa 100644
--- a/sql/old/3.3.5a/2011_04_17_06_world_creature.sql
+++ b/sql/old/3.3.5a/2011_04_17_06_world_creature.sql
@@ -1,7 +1,7 @@
-SET @GUID := 152098;
+SET @GUID := 152098;
DELETE FROM `creature` WHERE `id` IN (33211,33499,24495,28602,26266,29563,29695,29719,29720,29747,29790,24910);
-INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
-- Lake Frog
(@GUID ,33211,571,1,1,0,0,3714.916,-4303.659,182.632217,5.098984,120,0,0,1,0,0,0),
(@GUID+1,33211,571,1,1,0,0,3727.9043,-4302.23926,182.257217,3.08221,120,0,0,1,0,0,0),
@@ -38,7 +38,7 @@ INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equip
-- Tracker Thulin
(@GUID+27,29695,571,1,1,0,0,7313.95752,-1611.87976,944.595459,1.79768908,120,0,0,1,0,0,0),
-- Morbid Carcass PHASEMASK '0x00000002'
-(@GUID+28,29719,571,1,2,0,0,8249.877,2766.00684,641.9236,2.84488654,120,0,0,1,0,0,0),
+(@GUID+28,29719,571,1,2,0,0,8249.877,2766.00684,641.9236,2.84488654,120,0,0,1,0,0,0),
(@GUID+29,29719,571,1,2,0,0,8251.455,2788.82275,641.9236,3.159046,120,0,0,1,0,0,0),
(@GUID+30,29719,571,1,2,0,0,8277.752,2676.89429,689.776733,2.5395987,120,0,0,1,0,0,0),
(@GUID+31,29719,571,1,2,0,0,8312.651,2687.84644,689.776733,1.71902692,120,0,0,1,0,0,0),
@@ -81,8 +81,8 @@ INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equip
-- The Ocular (Phase='0x00000002')
(@GUID+67,29747,571,1,2,0,0,8526.228,2665.08521,1045.03979,2.67035365,120,0,0,1,0,0,0),
-- The Ocular - Eye of Acherus Exterior Shell
-(@GUID+68,29790,571,1,2,0,0,8526.228,2665.08521,1037.08838,2.67035365,120,0,0,1,0,0,0),
--- Captain Ellis
+(@GUID+68,29790,571,1,2,0,0,8526.228,2665.08521,1037.08838,2.67035365,120,0,0,1,0,0,0),
+-- Captain Ellis
(@GUID+69,24910,571,1,1,0,0,101.368256,-3645.39087,21.6450329,4.067803,120,0,0,1,0,0,0);
diff --git a/sql/old/3.3.5a/2011_04_22_03_world_creatures.sql b/sql/old/3.3.5a/2011_04_22_03_world_creatures.sql
index 4b02962b93e..24b6fbc5a88 100644
--- a/sql/old/3.3.5a/2011_04_22_03_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_04_22_03_world_creatures.sql
@@ -5,7 +5,7 @@ INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equip
-- Tome
DELETE FROM `gameobject` WHERE `id`=187987; -- South Point Station Valve
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(151895,187987,571,1,1,3791.704,4808.966,-11.5618,1.483528,0,0,0.6755896,0.7372779,0,0,0);
-- Nay
diff --git a/sql/old/3.3.5a/2011_04_22_07_world_smart_scripts.sql b/sql/old/3.3.5a/2011_04_22_07_world_smart_scripts.sql
index fa7ebba48ad..dfba5bb323f 100644
--- a/sql/old/3.3.5a/2011_04_22_07_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2011_04_22_07_world_smart_scripts.sql
@@ -1,9 +1,9 @@
-- SAI for Henze Faulk
SET @ENTRY := 6172;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@ENTRY*100);
-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
+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
-- AI
(@ENTRY,0,0,1,11,0,100,0,0,0,0,0,11,29266,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Henze Faulk - On spawn - add aura'),
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Henze Faulk - Script - set npcflags'),
@@ -16,7 +16,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY*100,9,3,0,0,0,100,0,1500,1500,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Henze Faulk - Script - set npcflags'),
(@ENTRY*100,9,4,0,0,0,100,0,120000,120000,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Henze Faulk - Script - evade (reset script)');
-- NPC talk text insert
-DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
+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, 'Thank you, dear $C, you just saved my life.',0,7,100,1,0,0, 'Henze Faulk');
-- Scripting cleanup
@@ -25,10 +25,10 @@ UPDATE `creature_template_addon` SET `auras`='' WHERE `entry`=@ENTRY;
-- SAI for Narm Faulk
SET @ENTRY := 6177;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@ENTRY*100);
-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
+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
-- AI
(@ENTRY,0,0,1,11,0,100,0,0,0,0,0,11,29266,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Narm Faulk - On spawn - add aura'),
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Narm Faulk - Script - set npcflags'),
@@ -41,7 +41,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY*100,9,3,0,0,0,100,0,1500,1500,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Narm Faulk - Script - set npcflags'),
(@ENTRY*100,9,4,0,0,0,100,0,120000,120000,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Narm Faulk - Script - evade (reset script)');
-- NPC talk text insert
-DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
+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, 'Thank you, dear $C, you just saved my life.',0,7,100,1,0,0, 'Narm Faulk');
-- Scripting cleanup
@@ -51,10 +51,10 @@ UPDATE `creature_template_addon` SET `auras`='' WHERE `entry`=@ENTRY;
-- SAI for Fhyron Shadesong
SET @ENTRY := 33788;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=8570.943,`position_y`=1008.467,`position_z`=548.2927 WHERE `guid`=85201;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Fhyron Shadesong - On spawn - Start WP movement'),
(@ENTRY,0,1,0,40,0,100,0,8,@ENTRY,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Fhyron Shadesong - Reach wp 8 - run script'),
(@ENTRY,0,2,0,40,0,100,0,10,@ENTRY,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Fhyron Shadesong - Reach wp 10 - run script'),
@@ -75,7 +75,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY*100,9,2,0,0,0,100,0,100,100,0,0,11,63678,0,0,0,0,0,19,33787,0,0,0,0,0,0, 'Fhyron Shadesong - Script - Cast Earthliving Visual on Tournament Druid Spell Target'),
(@ENTRY*100,9,3,0,0,0,50,0,4000,4000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Fhyron Shadesong - Script - say text 0');
-- NPC talk text insert from sniff
-DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
+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, 'Help shield us from these cutting winds, little sapling.',0,7,100,2,0,0, 'Fhyron Shadesong'),
(@ENTRY,0,1, 'There you are',0,7,100,273,0,0, 'Fhyron Shadesong'),
diff --git a/sql/old/3.3.5a/2011_04_23_01_world_gameobjects.sql b/sql/old/3.3.5a/2011_04_23_01_world_gameobjects.sql
index a31c3ffb807..c4a26a0b297 100644
--- a/sql/old/3.3.5a/2011_04_23_01_world_gameobjects.sql
+++ b/sql/old/3.3.5a/2011_04_23_01_world_gameobjects.sql
@@ -222,7 +222,7 @@ INSERT INTO `game_event_gameobject` (`eventEntry`,`guid`) VALUES
(@EVENT,@GUID+210),(@EVENT,@GUID+211),(@EVENT,@GUID+212),
(@EVENT,@GUID+213),(@EVENT,@GUID+214),(@EVENT,@GUID+215),
(@EVENT,@GUID+216),(@EVENT,@GUID+217),(@EVENT,@GUID+218),
-(@EVENT,@GUID+219);
+(@EVENT,@GUID+219);
DELETE FROM `gameobject` WHERE `id` BETWEEN 113768 AND 113772;
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
diff --git a/sql/old/3.3.5a/2011_04_23_02_world_creatures.sql b/sql/old/3.3.5a/2011_04_23_02_world_creatures.sql
index 88e0df6a9da..6ab83f48f51 100644
--- a/sql/old/3.3.5a/2011_04_23_02_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_04_23_02_world_creatures.sql
@@ -28,10 +28,10 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
(@GUID+05,32799,1,1,1,0,0,9837.29,969.65,1308.21,0.383221,300,0,0,0,0,0,0,0,0,0), -- Spring Collector
(@GUID+06,32799,0,1,1,0,0,-9453.86,44.7409,56.7139,1.45433,300,0,0,0,0,0,0,0,0,0), -- Spring Collector
(@GUID+07,32799,530,1,1,0,0,-4150.79,-12492.3,44.6553,3.75029,300,0,0,0,0,0,0,0,0,0), -- Spring Collector
-(@GUID+08,32836,0,1,1,0,0,-5601.03,-512.86,401.492,1.56166,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
-(@GUID+09,32836,1,1,1,0,0,9839.27,961.92,1308.29,0.271694,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
-(@GUID+10,32836,0,1,1,0,0,-9451.26,42.2403,57.173,0.641447,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
-(@GUID+11,32836,530,1,1,0,0,-4155.63,-12486.1,44.7758,3.96234,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
+(@GUID+08,32836,0,1,1,0,0,-5601.03,-512.86,401.492,1.56166,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
+(@GUID+09,32836,1,1,1,0,0,9839.27,961.92,1308.29,0.271694,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
+(@GUID+10,32836,0,1,1,0,0,-9451.26,42.2403,57.173,0.641447,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
+(@GUID+11,32836,530,1,1,0,0,-4155.63,-12486.1,44.7758,3.96234,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Vendor
(@GUID+12,32837,0,1,1,0,0,2244.84,262.273,34.148,2.9156,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Merchant
(@GUID+13,32837,1,1,1,0,0,333.091,-4707.97,15.6644,4.12487,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Merchant
(@GUID+14,32837,530,1,1,0,0,9487.64,-6833.65,16.986,0.819677,300,0,0,0,0,0,0,0,0,0), -- Noblegarden Merchant
diff --git a/sql/old/3.3.5a/2011_04_29_00_world_loot_template.sql b/sql/old/3.3.5a/2011_04_29_00_world_loot_template.sql
index f690f082c35..acbdb4f779b 100644
--- a/sql/old/3.3.5a/2011_04_29_00_world_loot_template.sql
+++ b/sql/old/3.3.5a/2011_04_29_00_world_loot_template.sql
@@ -2,7 +2,7 @@
SET @REF:= 34348; -- (found by StoredProc)
-- Delete all so we can also renumber the itemids on refs for old loot
-DELETE FROM `creature_loot_template` WHERE `entry`=11583;
+DELETE FROM `creature_loot_template` WHERE `entry`=11583;
INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(11583,19002,100,1,0,1,1),
(11583,19003,100,1,0,1,1),
diff --git a/sql/old/3.3.5a/2011_05_07_02_world_sai.sql b/sql/old/3.3.5a/2011_05_07_02_world_sai.sql
index 3ac4a75057a..f01e8491d69 100644
--- a/sql/old/3.3.5a/2011_05_07_02_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_07_02_world_sai.sql
@@ -7,5 +7,5 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(25596,0,1,0,31,0,100,0,45877,0,0,0,41,0,0,0,0,0,0,22,0,0,0,0,0,0,0, 'Infected Kodo Beast - On Spell Hit despawn');
DELETE FROM `npc_spellclick_spells` where `npc_entry`=25596;
-INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) values
+INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) values
(25596,45875,11690,1,11690,0,0,0,0);
diff --git a/sql/old/3.3.5a/2011_05_07_04_world_sai.sql b/sql/old/3.3.5a/2011_05_07_04_world_sai.sql
index 7cab160ce48..b18b5fa10bd 100644
--- a/sql/old/3.3.5a/2011_05_07_04_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_07_04_world_sai.sql
@@ -5,7 +5,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(28379,0,0,0,31,0,100,0,51660,0,0,0,41,0,0,0,0,0,0,22,0,0,0,0,0,0,0, 'Shattertusk Mammoth - On Spell Hit - Despawn');
DELETE FROM `npc_spellclick_spells` where `npc_entry`=28379;
-INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) values
+INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) values
(28379,51658,12607,1,12607,0,0,0,0);
DELETE FROM `creature_template_addon` WHERE `entry`=28379;
diff --git a/sql/old/3.3.5a/2011_05_07_05_world_sai.sql b/sql/old/3.3.5a/2011_05_07_05_world_sai.sql
index 8584f4beb10..d03c1238f51 100644
--- a/sql/old/3.3.5a/2011_05_07_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_07_05_world_sai.sql
@@ -2,14 +2,14 @@
SET @ENTRY := 23861;
UPDATE `creature_template` SET `ScriptName`='',`AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Restless Apparition - On spawn - Run script'),
(@ENTRY*100,9,0,0,0,0,100,0,2000,2000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Restless Apparition - Script - Say text 0'),
(@ENTRY*100,9,1,0,0,0,100,0,8000,8000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Restless Apparition - Script - Despawn');
-DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
+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, 'The darkness... the corruption... they came too quickly for anyone to know...',0,0,15,25,0,0, 'Restless Apparition'),
(@ENTRY,0,1, 'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',0,0,15,25,0,0, 'Restless Apparition'),
diff --git a/sql/old/3.3.5a/2011_05_07_06_world_sai.sql b/sql/old/3.3.5a/2011_05_07_06_world_sai.sql
index 6face4a4fd1..12beaa431db 100644
--- a/sql/old/3.3.5a/2011_05_07_06_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_07_06_world_sai.sql
@@ -13,7 +13,7 @@ UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `id`=@ENTRY;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
(@ENTRY,0,0,0,1,0,100,0,1000,60000,90000,120000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zeppelin Power Core - OOC - Load script every 1.5-2 min'),
(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,0,0,11,42491,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Zeppelin Power Core - Script - Cast Energized Periodic on self'),
(@ENTRY*100,9,1,0,0,0,100,0,60000,90000,0,0,28,42491,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zeppelin Power Core - Script - After 1 - 1.5 min, remove Energized Periodic on self');
diff --git a/sql/old/3.3.5a/2011_05_08_01_world_spell_script_names.sql b/sql/old/3.3.5a/2011_05_08_01_world_spell_script_names.sql
index 3a1558a7c39..1d9d31fab97 100644
--- a/sql/old/3.3.5a/2011_05_08_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_05_08_01_world_spell_script_names.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (63489,62274);
-INSERT INTO `spell_script_names`
+INSERT INTO `spell_script_names`
VALUES
(63489, 'spell_shield_of_runes'),
(62274, 'spell_shield_of_runes');
diff --git a/sql/old/3.3.5a/2011_05_18_07_world_sai.sql b/sql/old/3.3.5a/2011_05_18_07_world_sai.sql
index 6e599bd43fb..cb33d02f7cd 100644
--- a/sql/old/3.3.5a/2011_05_18_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_18_07_world_sai.sql
@@ -21,8 +21,8 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(27224,0,13,0,61,1,100,0,0,0,0,0,20,0,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Forgotten Knight - Prevent Melee at 15 Yards (Phase 1)'),
(27224,0,14,0,7,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Knight - Set Melee Weapon Model on Evade'),
-- Forgotten Rifleman
-(27225,0,0,1,62,0,100,0,9543,0,0,0,11,48830,3,0,0,0,0,7,0,0,0,0,0,0,0, 'Forgotten Rifleman - On gossip option select quest credit'),
-(27225,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Forgotten Rifleman - Close Gossip'),
+(27225,0,0,1,62,0,100,0,9543,0,0,0,11,48830,3,0,0,0,0,7,0,0,0,0,0,0,0, 'Forgotten Rifleman - On gossip option select quest credit'),
+(27225,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Forgotten Rifleman - Close Gossip'),
(27225,0,2,3,11,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Rifleman - Prevent Combat Movement on Spawn'),
(27225,0,3,0,61,0,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Rifleman - Prevent Melee on Spawn'),
(27225,0,4,0,23,0,100,0,48143,0,0,0,11,48143,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Rifleman - Add Forgotten Aura if missing'),
@@ -43,7 +43,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(27225,0,19,20,61,2,100,0,0,0,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Rifleman - Flee at 15% HP (Phase 2)'),
(27225,0,20,21,61,2,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Rifleman - Say text0 at 15% HP (Phase 2)'),
(27225,0,21,0,61,2,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Rifleman - set phase 1 at 15% HP (Phase 2)'),
-(27225,0,22,0,7,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Knight - Set Melee Weapon Model on Evade'),
+(27225,0,22,0,7,0,100,0,0,0,0,0,40,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Knight - Set Melee Weapon Model on Evade'),
-- Forgotten Peasant
(27226,0,0,1,62,0,100,0,9541,0,0,0,11,48829,3,0,0,0,0,7,0,0,0,0,0,0,0, 'Forgotten Peasant - On gossip option select quest credit'),
(27226,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Forgotten Peasant - Close Gossip'),
diff --git a/sql/old/3.3.5a/2011_05_18_09_world_waypoints.sql b/sql/old/3.3.5a/2011_05_18_09_world_waypoints.sql
index fb8adf5888e..a04b688d2a9 100644
--- a/sql/old/3.3.5a/2011_05_18_09_world_waypoints.sql
+++ b/sql/old/3.3.5a/2011_05_18_09_world_waypoints.sql
@@ -1563,7 +1563,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
-- Add random movement to other 6 Niffelem Forefathers
UPDATE `creature` SET `spawndist`=25,`MovementType`=1 WHERE `id`=29974 AND `MovementType`=0;
--- Add random movement to Frostborn Ghost & Frostborn Warriors
+-- Add random movement to Frostborn Ghost & Frostborn Warriors
UPDATE `creature` SET `spawndist`=25,`MovementType`=1 WHERE `id` IN (30144,30135);
-- Pathing for Forgotten Footman Entry: 27229
diff --git a/sql/old/3.3.5a/2011_05_19_01_world_instance_misc.sql b/sql/old/3.3.5a/2011_05_19_01_world_instance_misc.sql
index 1e3d1d9475b..ab243945eea 100644
--- a/sql/old/3.3.5a/2011_05_19_01_world_instance_misc.sql
+++ b/sql/old/3.3.5a/2011_05_19_01_world_instance_misc.sql
@@ -28,7 +28,7 @@ UPDATE `gameobject_template` SET `flags`=4 WHERE `entry`=194173;
-- Spell Linked Spell
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (61990,61969,65280);
INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`)
-VALUES
+VALUES
(61990,-62457,2,'Hodir - Ice Shards Immunity'),
(61990,-65370,2,'Hodir - Ice Shards Immunity'),
(65280,-62469,2,'Toasty fire - Freeze imunity'),
diff --git a/sql/old/3.3.5a/2011_05_20_02_world_pool_template.sql b/sql/old/3.3.5a/2011_05_20_02_world_pool_template.sql
index f3ff348c64d..93a64fe2cab 100644
--- a/sql/old/3.3.5a/2011_05_20_02_world_pool_template.sql
+++ b/sql/old/3.3.5a/2011_05_20_02_world_pool_template.sql
@@ -13,8 +13,8 @@ SET @AREA1699 := @REST+11; -- Area 1699 (21 nodes)
SET @AREA1700 := @REST+12; -- Area 1700 (28 nodes)
SET @AREA1701 := @REST+13; -- Area 1701 (39 nodes)
-DELETE FROM `pool_template` WHERE `entry` BETWEEN @REST AND @REST+17 ;
-INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @REST AND @REST+17 ;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@REST,18, 'Master Zone 17 Leftover Areas (18 out of 88 nodes)'),
(@AREA17,60, 'Master Zone 17 Area 17 (60 out of 305 nodes'),
(@AREA383,8, 'Master Zone 17 Area 383 (8 out of 41 nodes'),
@@ -30,8 +30,8 @@ INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@AREA1700,10, 'Master Zone 17 Area 1700 (6 out of 28 nodes'),
(@AREA1701,10, 'Master Zone 17 Area 1701 (8 out of 39 nodes');
-DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @REST AND @REST+17 ;
-INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @REST AND @REST+17 ;
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
-- Nodes are numbered based on GUID, comment shows area and type
-- Pooled per area for more randomness
(462,@AREA17,0, 'Silverleaf,Zone 17,Area 17,node 1'),
diff --git a/sql/old/3.3.5a/2011_05_20_03_world_pool_template.sql b/sql/old/3.3.5a/2011_05_20_03_world_pool_template.sql
index 77a3545d16a..2ad977c9f32 100644
--- a/sql/old/3.3.5a/2011_05_20_03_world_pool_template.sql
+++ b/sql/old/3.3.5a/2011_05_20_03_world_pool_template.sql
@@ -6,8 +6,8 @@ SET @Area1767 := @Rest+4; -- Area 1767 (45 nodes)
SET @Area2481 := @Rest+5; -- Area 2481 (13 nodes)
SET @Area2618 := @Rest+6; -- Area 2618 (14 nodes)
-DELETE FROM `pool_template` WHERE `entry` BETWEEN @Rest AND @Rest+6 ;
-INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @Rest AND @Rest+6 ;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@Rest ,10, 'Master Herbs Zone 361 Leftover Areas (10 out of 49 nodes)'),
(@Area361,17, 'Master Herbs Zone 361 Area 361 (17 out of 85 nodes)'),
(@Area1763,4, 'Master Herbs Zone 361 Area 1763 (4 out of 19 nodes)'),
@@ -16,8 +16,8 @@ INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@Area2481,9, 'Master Herbs Zone 361 Area 2481 (3 out of 13 nodes)'),
(@Area2618,9, 'Master Herbs Zone 361 Area 2618 (3 out of 14 nodes)');
-DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @REST AND @REST+6 ;
-INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @REST AND @REST+6 ;
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
-- Nodes are numbered based on GUID, comment shows area and type
-- Pooled per area for more randomness
(15955,@Area361,0,'Arthas Tears,Zone 361,Area 361,node 3'),
@@ -261,4 +261,4 @@ INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUE
(19488,@Area2618,0,'Dreamfoil,Zone 361,Area 2618,node 156'),
(19557,@Area2618,0,'Dreamfoil,Zone 361,Area 2618,node 164'),
(19888,@Area2618,0,'Plaguebloom,Zone 361,Area 2618,node 182'),
-(20061,@Area2618,0,'Plaguebloom,Zone 361,Area 2618,node 229');
+(20061,@Area2618,0,'Plaguebloom,Zone 361,Area 2618,node 229');
diff --git a/sql/old/3.3.5a/2011_05_20_04_world_pool_template.sql b/sql/old/3.3.5a/2011_05_20_04_world_pool_template.sql
index 58e62767263..761ace00b16 100644
--- a/sql/old/3.3.5a/2011_05_20_04_world_pool_template.sql
+++ b/sql/old/3.3.5a/2011_05_20_04_world_pool_template.sql
@@ -5,8 +5,8 @@ SET @Area598 := @Rest+3; -- Area 598 (20 nodes)
SET @Area602 := @Rest+4; -- Area 602 (27 nodes)
SET @Area607 := @Rest+5; -- Area 607 (22 nodes)
-DELETE FROM `pool_template` WHERE `entry` BETWEEN @Rest AND @Rest+6 ;
-INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @Rest AND @Rest+6 ;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@Rest ,10, 'Master Herbs Zone 405 Leftover Areas (10 out of 41 nodes)'),
(@Area405,8, 'Master Herbs Zone 405 Leftover Areas (8 out of 40 nodes)'),
(@Area596,4, 'Master Herbs Zone 405 Leftover Areas (4 out of 18 nodes)'),
@@ -14,8 +14,8 @@ INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
(@Area602,5, 'Master Herbs Zone 405 Leftover Areas (5 out of 27 nodes)'),
(@Area607,5, 'Master Herbs Zone 405 Leftover Areas (5 out of 22 nodes)');
-DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @REST AND @REST+5 ;
-INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @REST AND @REST+5 ;
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
-- node s are numbered based on GUID, comment shows area and type
-- Pooled per area for more randomness
(3126,@Area405,0,'Bruiseweed,Zone 405,405,node 14'),
diff --git a/sql/old/3.3.5a/2011_05_22_01_world_misc.sql b/sql/old/3.3.5a/2011_05_22_01_world_misc.sql
index b33e39433d7..e354997f836 100644
--- a/sql/old/3.3.5a/2011_05_22_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_05_22_01_world_misc.sql
@@ -34,7 +34,7 @@ UPDATE `creature_template` SET `exp`=2,`unit_flags`=`unit_flags`|0x22040300 WHER
-- Equips
DELETE FROM `creature_equip_template` WHERE `entry` BETWEEN @EquiEntry AND @EquiEntry+6;
-INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
+INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
(@EquiEntry+0,43111,0,0),
(@EquiEntry+1,28365,0,0),
(@EquiEntry+2,19355,0,0),
diff --git a/sql/old/3.3.5a/2011_05_22_08_world_spell_proc_event.sql b/sql/old/3.3.5a/2011_05_22_08_world_spell_proc_event.sql
index 7ff1d90e5e2..da02941c85f 100644
--- a/sql/old/3.3.5a/2011_05_22_08_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2011_05_22_08_world_spell_proc_event.sql
@@ -1,2 +1,2 @@
-- Eradication should not have internal cooldown
-UPDATE `spell_proc_event` SET `Cooldown`=0 WHERE `entry` IN (47195,47196,47197);
+UPDATE `spell_proc_event` SET `Cooldown`=0 WHERE `entry` IN (47195,47196,47197);
diff --git a/sql/old/3.3.5a/2011_05_24_03_world_creature.sql b/sql/old/3.3.5a/2011_05_24_03_world_creature.sql
index 76a7978f847..11621f51bea 100644
--- a/sql/old/3.3.5a/2011_05_24_03_world_creature.sql
+++ b/sql/old/3.3.5a/2011_05_24_03_world_creature.sql
@@ -1,7 +1,7 @@
-- Add Missing Black Blood of Draenor Spawns to db
SET @GUID := 209032;
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+36;
-INSERT IGNORE INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
+INSERT IGNORE INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES
(@GUID+0,23286,530,1,1,0,0,-4989.68945,533.267,-6.23201227,2.588225,120,5,0,1,0,0,1),
(@GUID+1,23286,530,1,1,0,0,-5008.07764,445.799774,-7.687496,4.848184,120,5,0,1,0,0,1),
(@GUID+2,23286,530,1,1,0,0,-5012.0127,514.3434,-5.042469,5.13465834,120,5,0,1,0,0,1),
diff --git a/sql/old/3.3.5a/2011_05_24_09_world_sai.sql b/sql/old/3.3.5a/2011_05_24_09_world_sai.sql
index d1a5de6af62..65d6e94d4cf 100644
--- a/sql/old/3.3.5a/2011_05_24_09_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_24_09_world_sai.sql
@@ -1,11 +1,11 @@
-- Quest 12321 "A Righteous Sermon"
--- SAI for Inquisitor Hallard
+-- SAI for Inquisitor Hallard
SET @ENTRY := 27316;
-UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
UPDATE `creature` SET `position_x`=3797.918,`position_y`=-677.4138,`position_z`=213.7526 WHERE id=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@ENTRY*100);
-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
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@ENTRY*100);
+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
-- AI
(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Inquisitor Hallard - on reset - load path 0'),
(@ENTRY,0,1,0,19,0,100,0,12321,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Inquisitor Hallard - on quest accept 12321 - run script'),
@@ -51,16 +51,16 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY*100,9,38,0,0,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Inquisitor Hallard - script - reset creature');
-- waypoints for Inquisitor Hallard
-DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY);
-INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
-(@ENTRY,1,3804.538,-679.7090,213.7526, 'Inquisitor Hallard'),
+DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY);
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@ENTRY,1,3804.538,-679.7090,213.7526, 'Inquisitor Hallard'),
(@ENTRY,2,3802.979,-678.8114,214.2526, 'Inquisitor Hallard'),
(@ENTRY,3,3800.479,-678.0614,214.2526, 'Inquisitor Hallard'),
(@ENTRY,4,3797.918,-677.4138,213.7526, 'Inquisitor Hallard');
--- NPC talk text insert from sniff
-DELETE FROM `creature_text` WHERE `entry` IN (27316,27577);
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+-- NPC talk text insert from sniff
+DELETE FROM `creature_text` WHERE `entry` IN (27316,27577);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(27316,0,0, 'Stand back, $N, the beast might lash out and harm you.',12,7,100,396,0,0, 'Inquisitor Hallard'),
(27316,1,0, 'GODFREY! Hear me, fiend! Hear me, for I am the Light, here to deliver you from evil!',12,7,100,5,0,0, 'Inquisitor Hallard'),
(27577,0,0, '%s growls.',16,0,100,0,0,409, 'Mayor Godfrey'),
diff --git a/sql/old/3.3.5a/2011_05_24_10_world_sai.sql b/sql/old/3.3.5a/2011_05_24_10_world_sai.sql
index ab0e6659d68..4715ea65419 100644
--- a/sql/old/3.3.5a/2011_05_24_10_world_sai.sql
+++ b/sql/old/3.3.5a/2011_05_24_10_world_sai.sql
@@ -1,10 +1,10 @@
-- SAI for Grom'tor, Son of Oronok & Coilskar Commander (Shadowmoon Valley)
SET @ENTRY := 21291;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=-2815.424,`position_y`=1771.031,`position_z`=59.10168,`orientation`=4.967079 WHERE `guid`=74574;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@ENTRY*100;
-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
+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
-- AI
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Grom''tor, Son of Oronok - On spawn - Start WP movement'),
(@ENTRY,0,1,0,1,0,100,0,10000,30000,240000,240000,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grom''tor, Son of Oronok - OOC - Run Script'),
@@ -48,9 +48,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
(@ENTRY,2,-2815.424,1771.031,59.10168, 'Grom''tor, Son of Oronok');
-- SAI for Coilskar Commander
SET @ENTRY := 21295;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,1,8,0,100,0,36539,0,0,0,11,36542,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Coilskar Commander - On Spellhit 36539 - cast 36542 on self'),
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Coilskar Commander - On Spellhit 36539 - set bytes1 7'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Coilskar Commander - On Spellhit 36539 - set phase 1'),
diff --git a/sql/old/3.3.5a/2011_05_28_02_world_creature_text.sql b/sql/old/3.3.5a/2011_05_28_02_world_creature_text.sql
index 8db0b085d27..99656387163 100644
--- a/sql/old/3.3.5a/2011_05_28_02_world_creature_text.sql
+++ b/sql/old/3.3.5a/2011_05_28_02_world_creature_text.sql
@@ -1,5 +1,5 @@
-DELETE FROM `creature_text` WHERE `entry` IN (39751,40429);
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+DELETE FROM `creature_text` WHERE `entry` IN (39751,40429);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(39751,0,0, 'Your power wanes, ancient one.... Soon you will join your friends.',14,0,100,0,0,17525, 'Baltharus the Warborn'),
(39751,1,0, 'Ah, the entertainment has arrived.',14,0,100,0,0,17520, 'Baltharus the Warborn'),
(39751,2,0, 'Baltharus leaves no survivors!',14,0,100,0,0,17521, 'Baltharus the Warborn'),
diff --git a/sql/old/3.3.5a/2011_05_30_01_world_creature.sql b/sql/old/3.3.5a/2011_05_30_01_world_creature.sql
index 898c7609909..466b6a3729c 100644
--- a/sql/old/3.3.5a/2011_05_30_01_world_creature.sql
+++ b/sql/old/3.3.5a/2011_05_30_01_world_creature.sql
@@ -1,7 +1,7 @@
-- Saviana Ragefire
UPDATE `creature_template` SET `InhabitType`=3,`mechanic_immune_mask`=`mechanic_immune_mask`|8388624,`ScriptName`= 'boss_saviana_ragefire' WHERE `entry`=39747;
-DELETE FROM `creature_text` WHERE `entry`=39747;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+DELETE FROM `creature_text` WHERE `entry`=39747;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(39747,0,0, 'You will sssuffer for this intrusion!',14,0,100,0,0,17528, 'Saviana Ragefire'),
(39747,1,0, 'Burn in the master''s flame!',14,0,100,0,0,17532, 'Saviana Ragefire'),
(39747,2,0, '%s becomes enraged!',16,0,100,0,0,0, 'Saviana Ragefire'),
diff --git a/sql/old/3.3.5a/2011_06_04_00_world_creature_template.sql b/sql/old/3.3.5a/2011_06_04_00_world_creature_template.sql
index 1155ac4b7e3..1e5d60bdf43 100644
--- a/sql/old/3.3.5a/2011_06_04_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_06_04_00_world_creature_template.sql
@@ -1,5 +1,5 @@
-DELETE FROM `creature_text` WHERE `entry`=39746;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+DELETE FROM `creature_text` WHERE `entry`=39746;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(39746,0,0, 'Alexstrasza has chosen capable allies.... A pity that I must END YOU!',14,0,100,0,0,17512, 'Baltharus the Warborn'),
(39746,1,0, 'You thought you stood a chance?',14,0,50,0,0,17513, 'General Zarithrian'),
(39746,1,1, 'It''s for the best.',14,0,50,0,0,17514, 'General Zarithrian'),
diff --git a/sql/old/3.3.5a/2011_06_08_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_06_08_00_world_spell_script_names.sql
index 76ea8478109..2c51d841505 100644
--- a/sql/old/3.3.5a/2011_06_08_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_06_08_00_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=62775;
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(62775, 'spell_xt002_tympanic_tantrum');
diff --git a/sql/old/3.3.5a/2011_06_09_00_world_misc.sql b/sql/old/3.3.5a/2011_06_09_00_world_misc.sql
index 0c56d63520f..71706377563 100644
--- a/sql/old/3.3.5a/2011_06_09_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_06_09_00_world_misc.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_dbc` WHERE `id`=65037;
-INSERT INTO `spell_dbc` (`Id`,`Effect1`,`EffectImplicitTargetA1`,`comment`)VALUES
+INSERT INTO `spell_dbc` (`Id`,`Effect1`,`EffectImplicitTargetA1`,`comment`)VALUES
(65037,3,1,'Nerf the Scrapbots Achievement Criteria Marker');
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN(10401,10402) AND `type`=18;
diff --git a/sql/old/3.3.5a/2011_06_09_03_world_spell_script_names.sql b/sql/old/3.3.5a/2011_06_09_03_world_spell_script_names.sql
index 1ce1d7a9fb2..4d03236e7cb 100644
--- a/sql/old/3.3.5a/2011_06_09_03_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_06_09_03_world_spell_script_names.sql
@@ -1,4 +1,4 @@
-DELETE FROM `spell_scripts` WHERE `id` IN(37751,37752); -- Remove redundant data from spell_scripts
+DELETE FROM `spell_scripts` WHERE `id` IN(37751,37752); -- Remove redundant data from spell_scripts
DELETE FROM `spell_script_names` WHERE `spell_id` IN(37751,37752);
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(37751,'spell_xt002_submerged'),
diff --git a/sql/old/3.3.5a/2011_06_12_01_world_spell_script_names.sql b/sql/old/3.3.5a/2011_06_12_01_world_spell_script_names.sql
index e2dbeceb417..6728cd82756 100644
--- a/sql/old/3.3.5a/2011_06_12_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_06_12_01_world_spell_script_names.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=52090;
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(52090, 'spell_q12659_ahunaes_knife');
diff --git a/sql/old/3.3.5a/2011_06_17_05_world_conditions.sql b/sql/old/3.3.5a/2011_06_17_05_world_conditions.sql
index f79a0c6f8f8..c2428e346f9 100644
--- a/sql/old/3.3.5a/2011_06_17_05_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_06_17_05_world_conditions.sql
@@ -1,4 +1,4 @@
-DELETE FROM `conditions` WHERE `SourceEntry`=64449;
+DELETE FROM `conditions` WHERE `SourceEntry`=64449;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`)
-VALUES
+VALUES
(13,0,64449,0,18,1,34096,0,0,'','Auriaya Feral Defender Stalker spell script target');
diff --git a/sql/old/3.3.5a/2011_06_17_16_world_sai.sql b/sql/old/3.3.5a/2011_06_17_16_world_sai.sql
index 5a79325bd00..670cc7ce322 100644
--- a/sql/old/3.3.5a/2011_06_17_16_world_sai.sql
+++ b/sql/old/3.3.5a/2011_06_17_16_world_sai.sql
@@ -9,7 +9,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(26816,0,1,0,4,0,100,0,0,0,0,0,11,51777,3,0,0,0,0,1,0,0,0,0,0,0,0,'Focus Wizard - On aggro - Aura Arcane Focus'),
(26816,0,2,0,0,0,100,0,0,0,3000,3000,11,51779,0,0,0,0,0,2,0,0,0,0,0,0,0,'Focus Wizard - Combat - Cast Frostfire Bolt on victim');
--- Rotting Storm Giant SAI
+-- Rotting Storm Giant SAI
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=27270;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-108034,-108035,-108036,-108037,-203372,-203373);
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
diff --git a/sql/old/3.3.5a/2011_06_17_19_world_misc.sql b/sql/old/3.3.5a/2011_06_17_19_world_misc.sql
index 47c72cd6945..579f163f960 100644
--- a/sql/old/3.3.5a/2011_06_17_19_world_misc.sql
+++ b/sql/old/3.3.5a/2011_06_17_19_world_misc.sql
@@ -1,9 +1,9 @@
-- SAI for Marcella Bloom
SET @ENTRY := 32421;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5717.51,`position_y`=688.2948,`position_z`=645.7512 WHERE `guid`=111385;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Marcella Bloom - On spawn - Start WP movement'),
(@ENTRY,0,1,0,40,0,100,0,1,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Marcella Bloom - Reach wp 1 - pause path'),
(@ENTRY,0,2,0,40,0,100,0,6,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Marcella Bloom - Reach wp 6 - pause path'),
@@ -53,9 +53,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Inzi Charmlight
SET @ENTRY := 28682;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5715.564,`position_y`=678.4122,`position_z`=645.7512 WHERE `guid`=97343;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Marcella Bloom - On spawn - Start WP movement'),
(@ENTRY,0,1,0,40,0,100,0,6,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Marcella Bloom - Reach wp 6 - pause path'),
(@ENTRY,0,2,0,40,0,100,0,18,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Marcella Bloom - Reach wp 18 - pause path'),
@@ -103,9 +103,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Katherine Lee
SET @ENTRY := 28705;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5707.611,`position_y`=715.5347,`position_z`=642.4725 WHERE `guid`=98952;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Katherine Lee - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,5,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Katherine Lee - Reach wp 5 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.8377581, 'Katherine Lee - Reach wp 5 - turm to'),
@@ -128,9 +128,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Laire Brewgold
SET @ENTRY := 32424;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5639.154,`position_y`=728.4048,`position_z`=641.61 WHERE `guid`=111730;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Laire Brewgold - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,1,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Laire Brewgold - Reach wp 1 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.8377581, 'Laire Brewgold - Reach wp 1 - turm to'),
@@ -163,9 +163,9 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- SAI for Coira Longrifle
SET @ENTRY := 32426;
UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=5644.824,`position_y`=730.5149,`position_z`=641.6822 WHERE `guid`=111940;
-UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
-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
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Coira Longrifle - On spawn - Start WP movement'),
(@ENTRY,0,1,2,40,0,100,0,5,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Coira Longrifle - Reach wp 5 - pause path'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.740167, 'Coira Longrifle - Reach wp 5 - turm to'),
diff --git a/sql/old/3.3.5a/2011_06_19_07_world_misc.sql b/sql/old/3.3.5a/2011_06_19_07_world_misc.sql
index 17e90d4196b..f06d7c912b3 100644
--- a/sql/old/3.3.5a/2011_06_19_07_world_misc.sql
+++ b/sql/old/3.3.5a/2011_06_19_07_world_misc.sql
@@ -4,7 +4,7 @@ SET @EquiEntry = 2473; -- (creature_equip_template.entry - need 2)
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|32768,`equipment_id`=@EquiEntry+0 WHERE `entry`=29333; -- Onslaught Gryphon Rider
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|32768,`equipment_id`=@EquiEntry+1 WHERE `entry`=29329; -- Onslaught Paladin
DELETE FROM `creature_equip_template` WHERE `entry` IN (@EquiEntry,@EquiEntry+1);
-INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
+INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
(@EquiEntry+0,38488,0,0),
(@EquiEntry+1,40452,12932,0);
UPDATE `creature_model_info` SET `bounding_radius`=0.3366,`combat_reach`=1.65,`gender`=0 WHERE `modelid`=26179; -- Onslaught Gryphon Rider
diff --git a/sql/old/3.3.5a/2011_06_25_16_world_spell_proc_event.sql b/sql/old/3.3.5a/2011_06_25_16_world_spell_proc_event.sql
index d7ee64c667c..e7fae8f6835 100644
--- a/sql/old/3.3.5a/2011_06_25_16_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2011_06_25_16_world_spell_proc_event.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_proc_event` WHERE `entry` = 63086;
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
(63086, 0x00, 9, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0x00000000, 0, 0, 0);
diff --git a/sql/old/3.3.5a/2011_07_06_00_world_sai.sql b/sql/old/3.3.5a/2011_07_06_00_world_sai.sql
index cc70fe77cec..4eb41801126 100644
--- a/sql/old/3.3.5a/2011_07_06_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_07_06_00_world_sai.sql
@@ -2,7 +2,7 @@ SET @ENTRY := 18716;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,62,0,100,0,7759,0,0,0,11,47068,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Who Are They - Shadowy Initiate - On Gossip option - Cast spell 47068 on player'),
(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,58,1,9613,2400,3800,30,30,1,0,0,0,0,0,0,0, 'Shadowy Initiate - On spawn install caster template');
@@ -10,7 +10,7 @@ SET @ENTRY := 18719;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,62,0,100,0,7760,0,0,0,11,47070,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Who Are They - Shadowy Advisor - On Gossip option - Cast spell 47070 on player'),
(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,58,1,9613,2400,3800,30,30,1,0,0,0,0,0,0,0, 'Shadowy Advisor - On spawn install caster template');
@@ -18,14 +18,14 @@ SET @ENTRY := 18930;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,62,0,100,0,7938,1,0,0,11,34924,2,0,0,0,0,7,0,0,0,0,0,0,0, 'Vlagga Freyfeather - On gossip option 1 select - Cast Stair of Destiny to Thrallmar'),
(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0, 'Vlagga Freyfeather - Vlagga Freyfeather - Summon Enraged Wyverns on Aggro'),
(@ENTRY,0,2,0,4,0,100,0,0,0,0,0,12,9297,4,30000,0,0,0,1,0,0,0,0,0,0,0, 'Vlagga Freyfeather - Vlagga Freyfeather - Summon Enraged Wyverns on Aggro'),
(@ENTRY,0,3,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Vlagga Freyfeather - Say text on Aggro');
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0, 'Arrrhhh...Guards!',14,7,100,0,0,0, 'Common Horde Flight Master');
-- some cleanup
@@ -39,7 +39,7 @@ SET @ENTRY := 25596;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,11,32423,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Infected Kodo Beast - Blue Radiation on spawn'),
(@ENTRY,0,1,0,27,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Infected Kodo Beast - remove death state on passager boarded'),
(@ENTRY,0,2,0,31,0,100,0,45877,0,0,0,41,0,0,0,0,0,0,22,0,0,0,0,0,0,0, 'Infected Kodo Beast - On Spell Hit despawn');
@@ -48,14 +48,14 @@ SET @ENTRY := 26257;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,58,1,51797,3400,4800,30,7,1,0,0,0,0,0,0,0, 'Surge Needle Sorcerer - On spawn install caster template');
SET @ENTRY := 26343;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,11,32423,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Indu''le Fisherman - On spawn - Cast Blue Radiation on self'),
(@ENTRY,0,1,0,9,0,100,0,0,20,15000,18000,11,11820,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Indu''le Fisherman - Cast Electrified Net');
@@ -63,7 +63,7 @@ SET @ENTRY := 27842;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0, 'Fenrick Barlowe - Summon Enraged Felbat on Aggro'),
(@ENTRY,0,2,0,4,0,100,0,0,0,0,0,12,9521,4,30000,0,0,0,1,0,0,0,0,0,0,0, 'Fenrick Barlowe - Summon Enraged Felbat on Aggro'),
(@ENTRY,0,3,0,4,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Fenrick Barlowe - Say text on Aggro'),
@@ -72,7 +72,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY,0,6,0,40,0,100,0,8,27842,0,0,80,2784202,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Fenrick Barlowe - at wp 8 run script2');
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY, 0, 0, 'Bat gizzards again for the gnomes tonight...', 12, 0, 100, 1, 0, 0, 'Fenrick Barlowe text'),
(@ENTRY, 0, 1, 'What do they expect, making the bats come in at that angle? Broken necks and gamey bat stew, that''s what they get.', 12, 0, 100, 1, 0, 0, 'Fenrick Barlowe text'),
(@ENTRY, 0, 2, 'We like trees, Fenrick. They provide cover. They won''t let me chop them down, either.', 12, 0, 100, 1, 0, 0, 'Fenrick Barlowe text'),
diff --git a/sql/old/3.3.5a/2011_07_07_01_world_misc.sql b/sql/old/3.3.5a/2011_07_07_01_world_misc.sql
index 066656343c7..4dc0388c55a 100644
--- a/sql/old/3.3.5a/2011_07_07_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_07_07_01_world_misc.sql
@@ -17,7 +17,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI',`MovementType`=1 WHERE `entry`
DELETE FROM `smart_scripts` WHERE (`entryorguid`=10578 AND `source_type`=0);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=1057800 AND `source_type`=9);
-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
+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
(10578, 0, 0, 0, 62, 0, 100, 0, 3062, 0, 0, 0, 80, 10578*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bom''bay - On gossip select 0 run timed action list'),
(10578, 0, 1, 0, 62, 0, 100, 0, 3062, 1, 0, 0, 80, 10578*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bom''bay - On gossip select 1 run timed action list'),
(10578, 0, 2, 0, 62, 0, 100, 0, 3062, 2, 0, 0, 80, 10578*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bom''bay - On gossip select 2 run timed action list'),
diff --git a/sql/old/3.3.5a/2011_07_27_01_world_trinity_string.sql b/sql/old/3.3.5a/2011_07_27_01_world_trinity_string.sql
index 3e4d9c3d662..753e17249f2 100644
--- a/sql/old/3.3.5a/2011_07_27_01_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_07_27_01_world_trinity_string.sql
@@ -1,3 +1,3 @@
DELETE FROM `trinity_string` WHERE `entry` = 283;
-INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES
+INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES
(283,'You have disabled %s\'s chat for %u minutes, effective at the player\'s next login. Reason: %s.');
diff --git a/sql/old/3.3.5a/2011_08_01_01_world_misc.sql b/sql/old/3.3.5a/2011_08_01_01_world_misc.sql
index b9f99ff7fd9..147f8fcf5af 100644
--- a/sql/old/3.3.5a/2011_08_01_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_08_01_01_world_misc.sql
@@ -15,7 +15,7 @@ UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `guid` IN (285,283,28
-- One missing Zandalar Headhsrinker spawn
-- This was the best guid I could find which was not in use
DELETE FROM `creature` WHERE `guid`=200615 AND `id`=14876;
-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
+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
(200615,14876,0,1,1,14998,0,-11775.231445,1358.505981,0.776265,1.409376,1800,0,0,7326,2434,2,0,0,0);
-- Set Zandalar Enforcer's home position next to cage
diff --git a/sql/old/3.3.5a/2011_08_01_01_world_waypoints.sql b/sql/old/3.3.5a/2011_08_01_01_world_waypoints.sql
index 8b44e18d983..d12c91bded5 100644
--- a/sql/old/3.3.5a/2011_08_01_01_world_waypoints.sql
+++ b/sql/old/3.3.5a/2011_08_01_01_world_waypoints.sql
@@ -1,6 +1,6 @@
-- All emotes, mostly ONESHOT_TALK
DELETE FROM `creature_addon` WHERE `guid` IN (49115,49114,49742,49741,49754,49120,49121,49122,49738,49105,49104,49737,91479,91478,91511,91512,91465,91464,49702,49701,91477,91476,91495,91496,49703,49704,91491,91490,91442,91443,49753,49314,49313,49310,49784,49785,49778,49779,49780,51459,51456,51457,51966,51965,49273,49272,49786,49787,49280,49281,49279,49799,49798,49797,49796,49795,49793,49794);
-INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(49115,0,0,0,0,1,''),(49114,0,0,0,0,1,''),(49742,0,0,0,0,1,''),(49741,0,0,0,0,1,''),(49754,0,0,0,0,1,''),(49120,0,0,0,0,1,''),
(49121,0,0,0,0,1,''),(49122,0,0,0,0,1,''),(49738,0,0,0,0,1,''),(49105,0,0,0,0,1,''),(49104,0,0,0,0,1,''),(49737,0,0,0,0,1,''),
(91479,0,0,0,0,1,''),(91478,0,0,0,0,1,''),(91511,0,0,0,0,1,''),(91512,0,0,0,0,1,''),(91465,0,0,0,0,1,''),(91464,0,0,0,0,1,''),
@@ -33,7 +33,7 @@ UPDATE `creature` SET `MovementType`=0,`spawndist`=0,`orientation`=5.284594 WHER
UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `guid` IN (51382,51375,51381,51383,51372,51370,51369,49359,49361,49362,49218,49219,49234,49235,49259,49260,91463,91462,91461,91459,91460,91439,49140,49139);
-- Double spawned creatures. Removing addon data to prevent errors
-DELETE FROM `creature` WHERE `guid`=49806 AND `id`=11360;
+DELETE FROM `creature` WHERE `guid`=49806 AND `id`=11360;
DELETE FROM `creature_addon` WHERE `guid`=49806;
DELETE FROM `creature` WHERE `guid`=49056 AND `id`=15111;
DELETE FROM `creature_addon` WHERE `guid` IN (15111,49056);
@@ -47,7 +47,7 @@ DELETE FROM `creature_addon` WHERE `guid` IN (49138,49137);
-- Missing spawns
-- Hakkari Priest
DELETE FROM `creature` WHERE `guid`=200616 AND `id`=11830;
-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
+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
(200616,11830,309,1,1,11758,0,-11942.391602,-1640.220825,42.506130,2.932328,7200,0,0,17094,12170,0,0,0,0);
-- Razzashi Adder
DELETE FROM `creature` WHERE `guid` IN (200617,200618) AND `id` IN (11372);
diff --git a/sql/old/3.3.5a/2011_08_06_01_world_misc.sql b/sql/old/3.3.5a/2011_08_06_01_world_misc.sql
index 01e4828c67e..dc11dd27c23 100644
--- a/sql/old/3.3.5a/2011_08_06_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_08_06_01_world_misc.sql
@@ -1,15 +1,15 @@
/* NPC entries:
-14902 - Jin'rokh the Breaker - 6321 - Warriors and paladins
-14903 - Al'tabim the All-Seeing - 6322 - Mages, warlocks and priests
-14904 - Maywiki of Zuldazar - 6341 - Shamans and druids
-14905 - Falthir the Sightless - @GOSSIP - Rogues and hunters
+14902 - Jin'rokh the Breaker - 6321 - Warriors and paladins
+14903 - Al'tabim the All-Seeing - 6322 - Mages, warlocks and priests
+14904 - Maywiki of Zuldazar - 6341 - Shamans and druids
+14905 - Falthir the Sightless - @GOSSIP - Rogues and hunters
*/
-
+
/* TO DO:
* There is one missing condition. When you get an upgrade of one of the necklaces, you lose the necklace of the previous quest. (the quest always takes it) But that also makes the conditions meet and it will show the gossip that you lost a necklace.
* There is currently no way to do this through conditions, so whenever you read this and think it's possible, feel free to!
*/
-
+
-- Vars
SET @GOSSIP = 21262; -- gossip_menu.entry - need 10
SET @SUB_PALADIN := @GOSSIP+1; -- Menu id for Paladins
@@ -21,7 +21,7 @@ SET @SUB_SHAMAN := @GOSSIP+6; -- Menu id for Shamans
SET @SUB_DRUID := @GOSSIP+7; -- Menu id for Druids
SET @SUB_ROGUE := @GOSSIP+8; -- Menu id for Rogues
SET @SUB_HUNTER := @GOSSIP+9; -- Menu id for Hunters
-
+
-- Insert gossip options itself
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+0 AND `text_id`=7556;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
@@ -682,7 +682,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
-- Make the six Hakkari Oracle and Gurubashi Warrior emote to talk
DELETE FROM `creature_addon` WHERE `guid` IN (739,740,741,742,743,744);
-INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(739,0,0,0,0,1,''),(740,0,0,0,0,1,''),(741,0,0,0,0,1,''),(742,0,0,0,0,1,''),(743,0,0,0,0,1,''),(744,0,0,0,0,1,'');
-- Son of Hakkar pathing: 11357
@@ -847,7 +847,7 @@ INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`gro
-- Insert missing Hooktooth Frenzy
DELETE FROM `creature` WHERE `guid`=49673;
-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
+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
(49673,11374,309,1,1,15101,0,-11673.693359,-1623.402710,8.929444,4.587632,7200,0,0,9156,0,0,0,0,0);
-- Hooktooth Frenzy pathing: 11359
diff --git a/sql/old/3.3.5a/2011_08_06_04_world_misc.sql b/sql/old/3.3.5a/2011_08_06_04_world_misc.sql
index c1ce37fc6c7..d979fbe39f5 100644
--- a/sql/old/3.3.5a/2011_08_06_04_world_misc.sql
+++ b/sql/old/3.3.5a/2011_08_06_04_world_misc.sql
@@ -1,14 +1,14 @@
-- honor challenge
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=30037;
DELETE FROM `smart_scripts` WHERE `entryorguid`=30037 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
+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
(30037,0,0,0,8,0,100,0,21855,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mjordin Combatant - set to phase 1 when aggroed by spell'),
(30037,0,1,0,6,1,100,0,0,0,0,0,33,30038,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Mjordin Combatant - give credit only when it has buff');
-- forgotten depths ambusher
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=30204;
DELETE FROM `smart_scripts` WHERE `entryorguid`=30204 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
+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
(30204,0,0,0,4,0,100,0,0,0,0,0,19,33554432,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Depths Ambusher - change flags when aggroed'),
(30204,0,1,0,4,0,100,0,0,0,0,0,28,56422,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Forgotten Depths Ambusher - remove submerge');
@@ -17,27 +17,27 @@ UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33555200 WHERE `entry`=
UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`|8, `unit_flags`=`unit_flags`|4, `InhabitType`=7 WHERE `entry` IN (29747,29790);
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=29747;
DELETE FROM `smart_scripts` WHERE `entryorguid`=29747 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
+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
(29747,0,0,0,0,0,100,0,1500,1500,4000,4000,11,55269,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Ocular - cast Deathly Stare every 3 secs'),
-- (29747,0,1,0,6,0,100,0,0,0,0,0,11,55288,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Ocular - cast It''s All Fun and Games: The Ocular On Death'),
(29747,0,1,0,6,0,100,0,0,0,0,0,33,29803,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Ocular - cast It''s All Fun and Games: The Ocular On Death'), -- temporary hack
(29747,0,2,0,25,0,100,0,0,0,0,0,75,55162,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Ocular - cast Transform on Spawn');
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=55288;
-INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(55288,55289,0, 'Ocular on script cast killcredit');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=55288;
-INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, Comment) VALUES
+INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, Comment) VALUES
(17,0,55288,0,18,1,0,0,0, 'It''s All Fun and Games: The Ocular On Death');
-- shadow vault auras
DELETE FROM `spell_area` WHERE `spell`=30181 AND `area`=4477;
-INSERT INTO `spell_area` VALUES
+INSERT INTO `spell_area` VALUES
(30181,4477,0,0,12896,0,1101,2,1),
(30181,4477,0,0,12897,0,690,2,1);
-- quests
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry` IN (12897,12896);
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ScriptName`, `Comment`) VALUES
(19,0,12897,0,8,12893,0,0,'', 'If he cannot be turned - horde'),
(19,0,12896,0,8,12893,0,0,'', 'If he cannot be turned - alliance');
@@ -53,7 +53,7 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_
-- vereth quests
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry` IN (13146,13147,13160,13161,13162,13163,13164);
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ScriptName`, `Comment`) VALUES
(19,0,13146,0,8,13145,0,0,'', 'Generosity Abounds'),
(19,0,13160,0,8,13145,0,0,'', 'Stunning View'),
(19,0,13147,0,8,13145,0,0,'', 'Matchmaker'),
diff --git a/sql/old/3.3.5a/2011_08_07_01_world_reference_loot_template.sql b/sql/old/3.3.5a/2011_08_07_01_world_reference_loot_template.sql
index 4b48fff1143..51b1dd41dab 100644
--- a/sql/old/3.3.5a/2011_08_07_01_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2011_08_07_01_world_reference_loot_template.sql
@@ -1,5 +1,5 @@
-- Dual-Blade Butcher loot fix
DELETE FROM `reference_loot_template` WHERE `item` IN (47285,47446);
-INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(34332,47285,0,1,1,1,1), -- normal
(34346,47446,0,1,1,1,1); -- heroic
diff --git a/sql/old/3.3.5a/2011_08_07_02_world_spawns.sql b/sql/old/3.3.5a/2011_08_07_02_world_spawns.sql
index 76a898b92b6..c11b1d42f96 100644
--- a/sql/old/3.3.5a/2011_08_07_02_world_spawns.sql
+++ b/sql/old/3.3.5a/2011_08_07_02_world_spawns.sql
@@ -73,6 +73,6 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
(152165,29747,571,1,2,0,0,8526.228,2665.085,1045.04,2.670354,120,0,0,126000,0,0);
DELETE FROM `gameobject` WHERE `id` IN (191778,191779);
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(152116,191778,571,1,2,8600.93,2639.53,652.353,-3.12412,0,0,-0.999962,0.00873622,300,100,1),
(152117,191779,571,1,2,8594.72,2627.14,652.353,1.15192,0,0,0.54464,0.83867,300,100,1);
diff --git a/sql/old/3.3.5a/2011_08_07_03_world_sai.sql b/sql/old/3.3.5a/2011_08_07_03_world_sai.sql
index 7e64ae3de32..b4c5c6813f8 100644
--- a/sql/old/3.3.5a/2011_08_07_03_world_sai.sql
+++ b/sql/old/3.3.5a/2011_08_07_03_world_sai.sql
@@ -13,7 +13,7 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Ithania;
DELETE FROM `smart_scripts` WHERE (`entryorguid`=@Ithania AND `source_type`=0);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=@Ithania*100 AND `source_type` IN (0,9));
-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
+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
(@Ithania, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 80, @Ithania*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ithania - On gossip hello run timed action list'),
(@Ithania*100, 9, 0, 0, 0, 0, 0, 0, 500, 500, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ithania - 0 - Remove kneeling'),
(@Ithania*100, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ithania - 1 - Remove gossip flag'),
diff --git a/sql/old/3.3.5a/2011_08_09_01_world_misc.sql b/sql/old/3.3.5a/2011_08_09_01_world_misc.sql
index 8099e91f6f7..9669b482bf2 100644
--- a/sql/old/3.3.5a/2011_08_09_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_08_09_01_world_misc.sql
@@ -1,4 +1,4 @@
-UPDATE `creature` SET `position_z`=-6.03356 WHERE `guid`=46069 AND `id`=11741; -- Dredge Crusher
+UPDATE `creature` SET `position_z`=-6.03356 WHERE `guid`=46069 AND `id`=11741; -- Dredge Crusher
UPDATE `creature` SET `position_z`=8.638660 WHERE `guid`=49069 AND `id`=11374; -- Hooktooth Frenzies
UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` = 37231; -- Robe Beam Stalker
UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` = 38008; -- Blood Orb Controller
diff --git a/sql/old/3.3.5a/2011_08_13_00_world_trinity_string.sql b/sql/old/3.3.5a/2011_08_13_00_world_trinity_string.sql
index 7d6f8f465ad..09875ee9527 100644
--- a/sql/old/3.3.5a/2011_08_13_00_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_08_13_00_world_trinity_string.sql
@@ -1,5 +1,5 @@
DELETE FROM `trinity_string` WHERE `entry` IN (453, 550, 714, 716);
-INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES
+INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES
(453,'Ban time remaining: %s, Banned by: %s, Reason: %s'),
(550,'Mute time remaining: %s'),
(716,'Map: %s, Area: %s'),
diff --git a/sql/old/3.3.5a/2011_08_24_00_world_game_event.sql b/sql/old/3.3.5a/2011_08_24_00_world_game_event.sql
index e8a12ce8f6c..bc47a2f35f8 100644
--- a/sql/old/3.3.5a/2011_08_24_00_world_game_event.sql
+++ b/sql/old/3.3.5a/2011_08_24_00_world_game_event.sql
@@ -1,3 +1,3 @@
-- Resync Darkmoon Faerie
-UPDATE `game_event` SET `start_time`='2011-10-02 00:01:00' WHERE `eventEntry`=5;
+UPDATE `game_event` SET `start_time`='2011-10-02 00:01:00' WHERE `eventEntry`=5;
UPDATE `game_event` SET `start_time`='2011-11-06 00:01:00' WHERE `eventEntry`=3;
diff --git a/sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql b/sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql
index 53bc3104c50..b7f897f0314 100644
--- a/sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql
+++ b/sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql
@@ -1,4 +1,4 @@
-DELETE FROM `gossip_menu_option` WHERE `menu_id`=1293 AND `id`=1;
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=1293 AND `id`=1;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=1293 AND `id`=2;
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
(1293,1,0, 'Make this inn my home!',8,66179,0,0,0,0,NULL),
diff --git a/sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql b/sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql
index a59a7739350..5f40420ebd4 100644
--- a/sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql
+++ b/sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql
@@ -48,7 +48,7 @@ INSERT INTO `spell_threat` VALUES
(50181, 0, 0.00, 0.0), -- Vendetta - Proc
-- Druid
-- Src: http://www.tankspot.com/showthread.php?47813-WOTLK-Bear-Threat-Values&p=200948#post200948
- (17057, 0, 0.00, 0.0), -- Furor - Proc
+ (17057, 0, 0.00, 0.0), -- Furor - Proc
(5211, 53, 1.00, 0.0), -- Bash (Rank 3)
(6798, 105, 1.00, 0.0), -- Bash (Rank 2)
(8983, 158, 1.00, 0.0), -- Bash (Rank 1)
diff --git a/sql/old/3.3.5a/2011_09_07_01_world_sai.sql b/sql/old/3.3.5a/2011_09_07_01_world_sai.sql
index aba3bdfe578..5052ce40059 100644
--- a/sql/old/3.3.5a/2011_09_07_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_07_01_world_sai.sql
@@ -5,6 +5,6 @@ INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=160445;
DELETE FROM `smart_scripts` WHERE `entryorguid`=160445 AND `source_type`=1;
-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
+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
(160445, 1, 0, 0, 64, 0, 100, 0, 0, 0, 0, 0, 12, 9136, 1, 60*1000, 0, 0, 0, 8, 0, 0, 0, -7917.378906, -2610.533936, 221.123123, 5.040257, 'Sha''ni Proudtusk''s Remains - On gossip hello summon Sha''ni Proudtusk');
-- Need a way to prevent spamming this action.
diff --git a/sql/old/3.3.5a/2011_09_11_01_world_sai.sql b/sql/old/3.3.5a/2011_09_11_01_world_sai.sql
index 453acf60dd9..074f6e2a880 100644
--- a/sql/old/3.3.5a/2011_09_11_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_11_01_world_sai.sql
@@ -9,7 +9,7 @@ INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language
(25814,1,3, 'We can decurse you, we have the technology.',12,0,0,0,0,0, '');
-- Mechagnome SAI
--- NOTE: Mechagnome SAI required for Horde quest Souls of the Decursed
+-- NOTE: Mechagnome SAI required for Horde quest Souls of the Decursed
DELETE FROM `smart_scripts` WHERE `entryorguid`=25814 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
(25814,0,0,0,4,0,100,0,0,0,0,0,1,1,10000,0,0,0,0,0,0,0,0,0,0,0,0, 'Fizzcrank Mechagnome - Chance Say on Aggro'),
diff --git a/sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql b/sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql
index 120378bd3e2..9b2fdabe08f 100644
--- a/sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`IN (65686, 65684, 67222, 67176, 67223, 67177, 67224, 67178);
-INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
-(65686, -65684, 2, 'Remove Dark Essence 10M'),
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(65686, -65684, 2, 'Remove Dark Essence 10M'),
(65684, -65686, 2, 'Remove Light Essence 10M'),
(67222, -67176, 2, 'Remove Dark essence 10M H'),
(67176, -67222, 2, 'Remove Light essence 10M H'),
diff --git a/sql/old/3.3.5a/2011_09_11_05_world_misc.sql b/sql/old/3.3.5a/2011_09_11_05_world_misc.sql
index 7357d9acda6..099585fefd1 100644
--- a/sql/old/3.3.5a/2011_09_11_05_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_11_05_world_misc.sql
@@ -17,7 +17,7 @@ INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`op
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=3216; -- Neeru Fireblade
DELETE FROM `smart_scripts` WHERE `entryorguid`=3216 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
+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
(3216, 0, 0, 0, 62, 0, 100, 0, @Gossip+2, 0, 0, 0, 15, 5727, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Neeru Fireblade - On gossip select give Hidden Enemies quest completed');
UPDATE `quest_template` SET `SpecialFlags`=`SpecialFlags`|2 WHERE `entry`=5727; -- Hidden Enemies (quest completable by external event)
diff --git a/sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql b/sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql
index a4608599452..7b0d237dd65 100644
--- a/sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql
+++ b/sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql
@@ -1,7 +1,7 @@
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66512;
INSERT INTO `spell_linked_spell` VALUES
(66512, 66510, 0, 'Summon Deep Jormungar on Pound Drum');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=0 AND `SourceEntry`=66512;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 0, 66512, 0, 18, 0, 195308, 0, 0, '', 'Pound Drum: Target Mysterious Snow Mound'),
diff --git a/sql/old/3.3.5a/2011_09_12_00_world_misc.sql b/sql/old/3.3.5a/2011_09_12_00_world_misc.sql
index 18ead48b821..30fd344376b 100644
--- a/sql/old/3.3.5a/2011_09_12_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_12_00_world_misc.sql
@@ -52,7 +52,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(15,@Gossip+0,0,0,8,8555,0, 'Spirit of Azuregos - show gossip option if player has quest The Charge of the Dragonflights rewarded');
DELETE FROM `smart_scripts` WHERE `entryorguid`=@Azuregos 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
+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
(@Azuregos, 0, 0, 0, 62, 0, 100, 0, @Gossip+11, 0, 0, 0, 56, @Item, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Azuregos - On gossip select 11 give item'),
(@Azuregos, 0, 1, 2, 62, 0, 100, 0, @Gossip+12, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Azuregos - On gossip select 12 close gossip'),
(@Azuregos, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Azuregos - Link 2 say');
diff --git a/sql/old/3.3.5a/2011_09_12_01_world_misc.sql b/sql/old/3.3.5a/2011_09_12_01_world_misc.sql
index f2fa54b1b17..402b460d1e9 100644
--- a/sql/old/3.3.5a/2011_09_12_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_12_01_world_misc.sql
@@ -17,7 +17,7 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `positi
-- add weapons to creatures
DELETE FROM `creature_equip_template` WHERE `entry`=2476;
-INSERT INTO `creature_equip_template` VALUES
+INSERT INTO `creature_equip_template` VALUES
(2476, 7714, 0, 0);
-- correct creature_template
diff --git a/sql/old/3.3.5a/2011_09_12_03_world_conditions.sql b/sql/old/3.3.5a/2011_09_12_03_world_conditions.sql
index 757bdbf255e..32f134b9811 100644
--- a/sql/old/3.3.5a/2011_09_12_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_09_12_03_world_conditions.sql
@@ -4,7 +4,7 @@ DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,62343,0,18,1,33121,0,0, '', 'Heat to Iron Construct'),
(13,0,62488,0,18,1,33121,0,0, '', 'Activate Construct to iron Construct');
-
+
-- Burn Secondary Effect from Vehicles
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=65044;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
@@ -15,7 +15,7 @@ INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`
(13,0,65044,5,18,1,33189,0,0, '', 'Flames to Liquid pyrite'),
(13,0,65044,6,18,1,33090,0,0, '', 'Flames to Pool of Tar'),
(13,0,65044,7,18,1,34161,0,0, '', 'Flames to Mechanostriker 54-A');
-
+
-- Burn Secondary Effect from Vehicles
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=65045;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
@@ -26,15 +26,15 @@ INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`
(13,0,65045,5,18,1,33189,0,0, '', 'Flames to Liquid pyrite'),
(13,0,65045,6,18,1,33090,0,0, '', 'Flames to Pool of Tar'),
(13,0,65045,7,18,1,34161,0,0, '', 'Flames to Mechanostriker 54-A');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62911;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,62911,0,18,1,33365,0,0, '', 'Thorim\'s Hammer to Thorim\'s Hammer');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62906;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,62906,0,18,1,33367,0,0, '', 'Freya\'s Ward to Freya\'s Ward');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62705;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,62705,1,18,1,33060,0,0, '', 'Auto-repair to Salvaged Siege Engine'),
@@ -42,15 +42,15 @@ INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`
(13,0,62705,3,18,1,33062,0,0, '', 'Auto-repair to Salvaged Chopper'),
(13,0,62705,4,18,1,33109,0,0, '', 'Auto-repair to Salvaged Demolisher'),
(13,0,62705,5,18,1,33167,0,0, '', 'Auto-repair to Salvaged Demolisher Mechanic Seat');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=63294;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,63294,0,18,1,33367,0,0, '', 'Freya Dummy Blue to Freya\'s Ward');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=63295;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,63295,0,18,1,33367,0,0, '', 'Freya Dummy Green to Freya\'s Ward');
-
+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=63292;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,0,63292,0,18,1,33367,0,0, '', 'Freya Dummy Yellow to Freya\'s Ward');
diff --git a/sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql b/sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql
index 6b5a124540d..1dc37357f8e 100644
--- a/sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql
@@ -12,12 +12,12 @@ UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33280 WHERE `entry`=331
UPDATE `creature_template` SET `speed_run`=2.14286 WHERE `entry`=34120; -- Brann's Flying Machine
UPDATE `creature_template` SET `speed_walk`=1.6,`speed_run`=1.42857 WHERE `entry`=33118; -- Ignis the Furnace Master
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554688 WHERE `entry`=33121; -- Iron Construct
-
+
-- Model data
UPDATE `creature_model_info` SET `bounding_radius`=5,`combat_reach`=1,`gender`=2 WHERE `modelid`=25870; -- Salvaged Chopper
UPDATE `creature_model_info` SET `bounding_radius`=0.6,`combat_reach`=1,`gender`=1 WHERE `modelid`=28787; -- Razorscale
UPDATE `creature_model_info` SET `bounding_radius`=0.62,`combat_reach`=1,`gender`=0 WHERE `modelid`=29185; -- Ignis the Furnace Master
-
+
-- Addon data
DELETE FROM `creature_template_addon` WHERE `entry` IN (33114,33142,33143,33139,33189,33216,33572,33090,33186,33287,33259,34120,
23033,34086,33118,33210,33121,34085,33816);
diff --git a/sql/old/3.3.5a/2011_09_12_05_world_misc.sql b/sql/old/3.3.5a/2011_09_12_05_world_misc.sql
index ffb183b31e4..29967ced760 100644
--- a/sql/old/3.3.5a/2011_09_12_05_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_12_05_world_misc.sql
@@ -8,5 +8,5 @@ UPDATE `creature_model_info` SET `bounding_radius`=1.3545,`combat_reach`=3,`gend
UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=1,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry`=21419; -- Infernal Attacker
DELETE FROM `smart_scripts` WHERE `entryorguid`=21419 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
+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
(21419, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 11, 37794, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Infernal Attacker - On spawn cast Transform Infernal on self');
diff --git a/sql/old/3.3.5a/2011_09_13_00_world_spells.sql b/sql/old/3.3.5a/2011_09_13_00_world_spells.sql
index 63e7b295831..3d563e116dd 100644
--- a/sql/old/3.3.5a/2011_09_13_00_world_spells.sql
+++ b/sql/old/3.3.5a/2011_09_13_00_world_spells.sql
@@ -4,7 +4,7 @@ DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (33139,34111);
INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`quest_start`,`quest_start_active`,`quest_end`,`cast_flags`,`aura_required`,`aura_forbidden`,`user_type`) VALUES
(34111,46598,0,0,0,1,0,0,0),
(33139,46598,0,0,0,1,0,0,0);
-
+
-- Added Burn to Vehicles for Hard mode Mechanics
-- Thanks to horn for the reminder
-- Burn Secondary Effect from Vehicles
diff --git a/sql/old/3.3.5a/2011_09_14_01_world_quest.sql b/sql/old/3.3.5a/2011_09_14_01_world_quest.sql
index 1b6c53f7d9d..1155275af8c 100644
--- a/sql/old/3.3.5a/2011_09_14_01_world_quest.sql
+++ b/sql/old/3.3.5a/2011_09_14_01_world_quest.sql
@@ -71,7 +71,7 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- Phasing Spell
DELETE FROM `spell_area` WHERE `spell`=55857 AND `area`=4455;
-INSERT INTO `spell_area`(`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
+INSERT INTO `spell_area`(`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
(55857,4455,12983,1,12983,0,0,2,1);
-- From Nay:
diff --git a/sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql b/sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql
index 4c7474895ad..7f589988631 100644
--- a/sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql
@@ -34,7 +34,7 @@ WHERE `entry` IN
37972,38399,38769,38770, -- Prince Keseleth
37973,38400,38771,38772); -- Prince Taldaram
-UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`&~2097152 /* INFECTED */ WHERE `entry` IN
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`&~2097152 /* INFECTED */ WHERE `entry` IN
(36626,37504,37505,37506,-- Festergut
36627,38390,38549,38550, -- Rotface
36678,38431,38585,38586); -- Professor Putricide
diff --git a/sql/old/3.3.5a/2011_09_15_00_world_creature.sql b/sql/old/3.3.5a/2011_09_15_00_world_creature.sql
index 12269e4744d..56edc6893b2 100644
--- a/sql/old/3.3.5a/2011_09_15_00_world_creature.sql
+++ b/sql/old/3.3.5a/2011_09_15_00_world_creature.sql
@@ -1,2 +1,2 @@
--- Remove spawns of Perimeter Bunny - they are spawned by spell 54355 used by GO 191502 (Land Mine)
-DELETE FROM `creature` WHERE `id`=29397;
+-- Remove spawns of Perimeter Bunny - they are spawned by spell 54355 used by GO 191502 (Land Mine)
+DELETE FROM `creature` WHERE `id`=29397;
diff --git a/sql/old/3.3.5a/2011_09_15_02_world_misc.sql b/sql/old/3.3.5a/2011_09_15_02_world_misc.sql
index 5d482feba80..893c7db23a0 100644
--- a/sql/old/3.3.5a/2011_09_15_02_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_15_02_world_misc.sql
@@ -18,7 +18,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry
UPDATE `creature_template` SET `gossip_menu_id`=@Gossip,`minlevel`=80,`maxlevel`=80,`npcflag`=`npcflag`|1,`AIName`='SmartAI' WHERE `entry`=@NElf;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@NElf 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
+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
(@NElf, 0, 0, 1, 62, 0, 100, 0, @Gossip, 0, 0, 0, 11, 69243, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Night Elf Mohawk - On gossip select cast Create Mohawk Grenade'),
(@NElf, 0, 1, 0, 61, 0, 100, 0, @Gossip, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Night Elf Mohawk - Link - close gossip');
diff --git a/sql/old/3.3.5a/2011_09_15_04_world_misc.sql b/sql/old/3.3.5a/2011_09_15_04_world_misc.sql
index 125bd7626f0..674893a91f7 100644
--- a/sql/old/3.3.5a/2011_09_15_04_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_15_04_world_misc.sql
@@ -5,16 +5,16 @@ SET @PATH := @NPC_DEATHS_HAND_ACOLYTE * 10;
SET @OMEGA_RUNE := 38708;
DELETE FROM `creature` WHERE `id` IN (@NPC_HERENN,@NPC_DEATHS_HAND_ACOLYTE);
--- add High Cultist Herenn (28601)
+-- add High Cultist Herenn (28601)
INSERT INTO `creature` (`guid`,`id`,`map`,`position_x`,`position_y`,`position_z`,`orientation`) VALUES
(@GUID+10,@NPC_HERENN,1,-6028.08,-1249.02,-146.7644,3.054326);
-- add Death's Hand Acolyte (28602), genders are random (25342,25343)
INSERT INTO `creature`(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID, @NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6163.63,-1249.54,-159.7329,3.11264,120,0,0,1,0,2), -- wandering
-(@GUID+1,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6083.673,-1249.462,-143.4821,0.01435,120,0,0,1,0,2), -- wandering
-(@GUID+2,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6037.476,-1243.375,-146.8277,5.98647,120,0,0,1,0,0), -- kneeled
-(@GUID+3,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6036.1,-1255.38,-146.8277,1.15191,120,0,0,1,0,0), -- kneeled
+(@GUID+1,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6083.673,-1249.462,-143.4821,0.01435,120,0,0,1,0,2), -- wandering
+(@GUID+2,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6037.476,-1243.375,-146.8277,5.98647,120,0,0,1,0,0), -- kneeled
+(@GUID+3,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6036.1,-1255.38,-146.8277,1.15191,120,0,0,1,0,0), -- kneeled
(@GUID+4,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6065.16,-1256.21,-143.3607,3.10668,120,0,0,1,0,0),
(@GUID+5,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6118.18,-1241.33,-143.281,3.12169,120,0,0,1,0,0),
(@GUID+6,@NPC_DEATHS_HAND_ACOLYTE,1,1,1,0,0,-6104.965,-1243.601,-143.1921,3.12413,120,0,0,1,0,0),
@@ -28,8 +28,8 @@ UPDATE `creature_template` SET `equipment_id`=815 WHERE `entry`=@NPC_DEATHS_HAND
-- set waypoint id's and visual effects
DELETE FROM `creature_addon` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@GUID+3);
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
-(@GUID ,@PATH,0,1,0,''),
-(@GUID+1,@PATH+20,0,1,0,''),
+(@GUID ,@PATH,0,1,0,''),
+(@GUID+1,@PATH+20,0,1,0,''),
(@GUID+2,0,8,0,0,''), -- kneeling
(@GUID+3,0,8,0,0,''); -- kneeling
@@ -59,10 +59,10 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
-- SAI for High Cultist Herenn, also add loot and equipment
UPDATE `creature_template` SET `AIName`='SmartAI',`equipment_id`=1803 WHERE `entry`=@NPC_HERENN;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_HERENN;
-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
+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
(@NPC_HERENN,0,0,0,0,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Cultist Herenn - in Combat - Say Text 0');
--- High Cultist Herenn talk text
+-- High Cultist Herenn talk text
DELETE FROM `creature_text` WHERE `entry`=@NPC_HERENN;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@NPC_HERENN,0,0,'Fool! You led us to the only being that could stand up to our armies! You will never bring the Etymidian back to Northrend!',12,0,100,25,0,0,'High Cultist Herenn');
diff --git a/sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql
index 4896990bb5b..c25e2c7129c 100644
--- a/sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (62374,62475);
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(62374,'spell_pursue'),
(62475,'spell_systems_shutdown');
diff --git a/sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql b/sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql
index 9c332ccc3b2..b03642f04d7 100644
--- a/sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql
+++ b/sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql
@@ -1,6 +1,6 @@
UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128|2 WHERE `entry` IN (19871); -- World Trigger (World Trigger (Not Immune NPC))
DELETE FROM `game_event_creature` WHERE `guid` IN (62848,62849) AND `eventEntry`=11;
-INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
+INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
(11, 62848),
(11, 62849);
diff --git a/sql/old/3.3.5a/2011_10_01_05_world_sai.sql b/sql/old/3.3.5a/2011_10_01_05_world_sai.sql
index a6380f6c991..f1a9ff1472f 100644
--- a/sql/old/3.3.5a/2011_10_01_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_01_05_world_sai.sql
@@ -8,7 +8,7 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
(24062,0,1,257,0, NULL), -- Wildervar Miner
(24178,0,3,1,0, '6606'); -- Shatterhorn, Self Visual - Sleep Until Cancelled (DND)
DELETE FROM `creature_addon` WHERE `guid` IN (120419,120422,106573);
-INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(120419,0,0,0,0,1,''), -- Wildervar Miner, talk
(120422,0,0,0,0,1,''); -- Wildervar Miner, talk
diff --git a/sql/old/3.3.5a/2011_10_01_06_world_misc.sql b/sql/old/3.3.5a/2011_10_01_06_world_misc.sql
index 8bc5e09605e..24d10cbff2c 100644
--- a/sql/old/3.3.5a/2011_10_01_06_world_misc.sql
+++ b/sql/old/3.3.5a/2011_10_01_06_world_misc.sql
@@ -1,7 +1,7 @@
-- Fix quest What Illidan Wants, Illidan Gets...
-- Make the npc_text entries work properly
DELETE FROM `gossip_menu` WHERE `entry` IN (8336,8342,8341,8340,8339,8338) AND `text_id` IN (10401,10405,10406,10407,10408,10409);
-INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
(8336,10401),
(8342,10405),
(8341,10406),
diff --git a/sql/old/3.3.5a/2011_10_01_07_world_sai.sql b/sql/old/3.3.5a/2011_10_01_07_world_sai.sql
index 59ab0e98d1b..c852ff32bc4 100644
--- a/sql/old/3.3.5a/2011_10_01_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_01_07_world_sai.sql
@@ -14,7 +14,7 @@ INSERT INTO `quest_start_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_FIRJUS,@ENTRY_JLARBORN,@ENTRY_YORUS,@ENTRY_OLUF);
DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@ENTRY_FIRJUS,@ENTRY_JLARBORN,@ENTRY_YORUS,@ENTRY_OLUF);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_FIRJUS,@ENTRY_JLARBORN,@ENTRY_YORUS,@ENTRY_OLUF) 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
+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
(@ENTRY_FIRJUS,0,0,0,0,0,100,0,3000,6000,12000,15000,11,15284,0,0,0,0,0,2,0,0,0,0,0,0,0,'Firjus - In Combat - Cleave'),
(@ENTRY_FIRJUS,0,1,0,0,0,100,0,10000,10000,10000,10000,11,43348,0,0,0,0,0,2,0,0,0,0,0,0,0,'Firjus - In Combat - Head Crush'),
(@ENTRY_FIRJUS,0,2,0,6,0,100,1,0,0,0,0,12,@ENTRY_JLARBORN,1,300000,0,0,0,8,0,0,0,799.653931,-4718.678711,-96.236053,4.992353,'Firjus - On Death - Summon Jlarborn'),
diff --git a/sql/old/3.3.5a/2011_10_01_11_world_loot.sql b/sql/old/3.3.5a/2011_10_01_11_world_loot.sql
index 533d6714cf8..bd34d39ff3d 100644
--- a/sql/old/3.3.5a/2011_10_01_11_world_loot.sql
+++ b/sql/old/3.3.5a/2011_10_01_11_world_loot.sql
@@ -12,9 +12,9 @@ SET @AirStripRef := 50013+1;
SET @HallsofStoneRef := 50013+2;
SET @ReavandDispoRef := 50013+3;
SET @LibraryLaborerRef := 50013+4;
--- Add loot to the skinning table
+-- Add loot to the skinning table
DELETE FROM `skinning_loot_template` WHERE `entry` IN (@Recovery,@Dirkee,@LibraryLaborer,@ReavandDispo,@HallsofStone,@AirStrip,@UldarBoss);
-INSERT INTO `skinning_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+INSERT INTO `skinning_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@Recovery, 41338, 42, 1, 0, 1, 3), -- Sprung Whirlygig
(@Recovery, 41337, 44, 1, 0, 1, 3), -- Whizzed out Gizmo
(@Recovery, 39690, 9, 1, 0, 1, 3), -- Volatile Blasting trigger
@@ -31,9 +31,9 @@ INSERT INTO `skinning_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `l
(@HallsofStone, 1, 100, 1, 0, -@HallsofStoneRef, 1),
(@AirStrip, 1, 100, 1, 0, -@AirStripRef, 1),
(@UldarBoss, 1, 100, 1, 0, -@UldarBossRef, 1);
--- Add loot to the reference table
+-- Add loot to the reference table
DELETE FROM `reference_loot_template` WHERE `entry` IN (@AirStripRef,@ReavandDispoRef,@LibraryLaborerRef,@HallsofStoneRef,@UldarBossRef);
-INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@AirStripRef, 41338, 33, 1, 0, 1, 1), -- Sprung Whirlygig
(@AirStripRef, 41337, 42, 1, 0, 1, 1), -- Whizzed out Gizmo
(@AirStripRef, 39690, 13, 1, 0, 1, 3), -- Volatile Blasting trigger
diff --git a/sql/old/3.3.5a/2011_10_01_12_world_creatures.sql b/sql/old/3.3.5a/2011_10_01_12_world_creatures.sql
index c6e63c19595..7ac66fd95b3 100644
--- a/sql/old/3.3.5a/2011_10_01_12_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_10_01_12_world_creatures.sql
@@ -1,10 +1,10 @@
-- Jormunger Control Orb
DELETE FROM `gameobject` WHERE `id`=192262;
-INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(173, 192262, 571, 1, 0x8, 8497.219, -90.90104, 789.2875, 0.1396245, 0, 0, 0.06975555, 0.9975641, 0, 0, 0);
DELETE FROM `creature` WHERE `id` IN (30301,30322,30300);
-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
+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
(4089, 30301, 571, 1, 0x8, 0, 0, 8497.78, -99.0251, 786.528, 3.01942, 120, 0, 0, 1, 0, 0, 0, 0, 0), -- Tamed Jormungar
(4090, 30322, 571, 1, 0x8, 0, 0, 8505.47, -86.2532, 787.339, 3.28122, 120, 0, 0, 1, 0, 0, 0, 0, 0), -- Earthen Jormungar Handler
(4765, 30322, 571, 1, 0x8, 0, 0, 8502.62, -111.308, 790.176, 3.05433, 120, 0, 0, 1, 0, 0, 0, 0, 0),
@@ -30,6 +30,6 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
(30301,0,0,1,0, NULL); -- Tamed Jormungar
DELETE FROM `spell_area` WHERE spell=56526;
-INSERT INTO `spell_area`(`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
+INSERT INTO `spell_area`(`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
(56526,4436,13007,1,13007,0,0,2,1), -- Snowdrift Plains
(56526,4435,13007,1,13007,0,0,2,1); -- Navirs Cradle
diff --git a/sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql b/sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql
index b25622e1441..f3266c37357 100644
--- a/sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql
+++ b/sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql
@@ -1,5 +1,5 @@
DELETE FROM `player_factionchange_items` WHERE `alliance_id`=48356; -- Wrong entry
-
+
DELETE FROM `player_factionchange_spells` WHERE `alliance_id` IN (67093,67091,67095,67096,67092,67085,67080,67082,67087,67083,67084,67086,60867,67065,67064,67079,67066);
INSERT INTO `player_factionchange_spells` (`alliance_id`,`horde_id`) VALUES
(67093,67132),
@@ -19,7 +19,7 @@ INSERT INTO `player_factionchange_spells` (`alliance_id`,`horde_id`) VALUES
(67064,67144),
(67079,67145),
(67066,67146);
-
+
DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (47003,47626,44503,47654);
INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES
(0,47003,'Dawnbreaker Greaves',0,47430,'Dawnbreaker Sabatons'),
diff --git a/sql/old/3.3.5a/2011_10_02_04_world_sai.sql b/sql/old/3.3.5a/2011_10_02_04_world_sai.sql
index fbec8e12b55..1c123d2ae2a 100644
--- a/sql/old/3.3.5a/2011_10_02_04_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_04_world_sai.sql
@@ -9,5 +9,5 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_typ
-- Fix an older sql guid
DELETE FROM `gameobject` WHERE `id`=192262; -- Jormunger Control Orb
-INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(173, 192262, 571, 1, 0x8, 8497.219, -90.90104, 789.2875, 0.1396245, 0, 0, 0.06975555, 0.9975641, 0, 0, 0);
diff --git a/sql/old/3.3.5a/2011_10_02_08_world_sai.sql b/sql/old/3.3.5a/2011_10_02_08_world_sai.sql
index fc49cd24425..f0df16b7be4 100644
--- a/sql/old/3.3.5a/2011_10_02_08_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_08_world_sai.sql
@@ -15,7 +15,7 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_
(@GRIZZLY,0,1,0,61,0,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rabid Grizzly - Despawn after 5 seconds'),
(@ELK,0,0,1,8,0,100,0x01,@SPELL,0,0,0,33,@ELKDUMMY,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Blighted Elk - On spell hit - Give kill credit for quest 12166'),
(@ELK,0,1,0,61,0,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blighted Elk - Despawn after 5 secondes');
-
+
-- Fix the quest item to allow it to only target the two quest NPCs
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=@ITEM;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
diff --git a/sql/old/3.3.5a/2011_10_02_12_world_sai.sql b/sql/old/3.3.5a/2011_10_02_12_world_sai.sql
index 93779a01172..8fd77e5ed8d 100644
--- a/sql/old/3.3.5a/2011_10_02_12_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_12_world_sai.sql
@@ -27,7 +27,7 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
-- 1) Can't have more than one 54324 in the same target. 2) That aura gets removed when target enters in combat and it shouldn't
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=24921;
DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN -104008 AND -103996 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
+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
(-103996, 0, 0, 0, 1, 0, 0, 1, 500, 500, 0, 0, 11, 54324, 0, 0, 0, 0, 0, 11, @ENTRY, 60, 0, 0, 0, 0, 0, 'Cosmetic Trigger - LAB (Brunnhildar Village) - Cast Cosmetic Chains at Kirgaraak'),
(-103997, 0, 0, 0, 1, 0, 0, 1, 500, 500, 0, 0, 11, 54324, 0, 0, 0, 0, 0, 11, @ENTRY, 60, 0, 0, 0, 0, 0, 'Cosmetic Trigger - LAB (Brunnhildar Village) - Cast Cosmetic Chains at Kirgaraak'),
(-103998, 0, 0, 0, 1, 0, 0, 1, 500, 500, 0, 0, 11, 54324, 0, 0, 0, 0, 0, 11, @ENTRY, 60, 0, 0, 0, 0, 0, 'Cosmetic Trigger - LAB (Brunnhildar Village) - Cast Cosmetic Chains at Kirgaraak'),
diff --git a/sql/old/3.3.5a/2011_10_07_01_world_command.sql b/sql/old/3.3.5a/2011_10_07_01_world_command.sql
index c3767c7dc00..13336fa6b2f 100644
--- a/sql/old/3.3.5a/2011_10_07_01_world_command.sql
+++ b/sql/old/3.3.5a/2011_10_07_01_world_command.sql
@@ -1,3 +1,3 @@
DELETE FROM `command` WHERE `name` = 'ticket reset';
-INSERT INTO `command` (`name`, `security`, `help`) VALUES
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
('ticket reset', 3, 'Syntax: .ticket reset\nRemoves all closed tickets and resets the counter, if no pending open tickets are existing.'); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql b/sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql
index 2dff16050e4..1ada6589e54 100644
--- a/sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql
@@ -1,4 +1,4 @@
DELETE FROM `trinity_string` WHERE `entry` IN(2027,2028);
-INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
+INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
('2027', 'There are pending open tickets, please close them first!'),
('2028', 'All closed tickets were deleted and counter is reseted to |cffff00ff 1|r'); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2011_10_22_07_world_sai.sql b/sql/old/3.3.5a/2011_10_22_07_world_sai.sql
index 8e85d719cf8..e867f43d527 100644
--- a/sql/old/3.3.5a/2011_10_22_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_22_07_world_sai.sql
@@ -9,7 +9,7 @@ SET @SPELL_BACKSTAB := 71410;
UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|2,`unit_class`=4 WHERE `entry`=@ENTRY; -- Civilian according to video
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
-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
+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
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sunreaver Agent - On Aggro - Say Line 0 (random)"),
(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,11,@SPELL_HOOKED_NET,0,0,0,0,0,2,0,0,0,0,0,0,0,"Sunreaver Agent - On Aggro - Cast Hooked Net"),
(@ENTRY,0,2,0,67,0,100,0,1000,3000,0,0,11,@SPELL_BACKSTAB,0,0,0,0,0,2,0,0,0,0,0,0,0,"Sunreaver Agent - Behind Target - Cast Backstab"),
@@ -33,7 +33,7 @@ SET @SPELL_BACKSTAB := 71410;
UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|2,`unit_class`=4 WHERE `entry`=@ENTRY; -- Civilian according to video
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
-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
+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
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Silver Covenant Agent - On Aggro - Say Line 0 (random)"),
(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,11,@SPELL_HOOKED_NET,0,0,0,0,0,2,0,0,0,0,0,0,0,"Silver Covenant Agent - On Aggro - Cast Hooked Net"),
(@ENTRY,0,2,0,67,0,100,0,1000,3000,0,0,11,@SPELL_BACKSTAB,0,0,0,0,0,2,0,0,0,0,0,0,0,"Silver Covenant Agent - Behind Target - Cast Backstab"),
diff --git a/sql/old/3.3.5a/2011_10_23_00_world_sai.sql b/sql/old/3.3.5a/2011_10_23_00_world_sai.sql
index 0d90c2ac9ce..5a9848da021 100644
--- a/sql/old/3.3.5a/2011_10_23_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_23_00_world_sai.sql
@@ -2,7 +2,7 @@
-- Fix quest 8359 "Flexing for Nougat"
DELETE FROM `smart_scripts` WHERE `entryorguid`=6929 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
+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
(6929,0,0,1,62,0,100,0,441,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Gryshka - On gossip option 0 select - Close gossip'),
(6929,0,1,0,61,0,100,0,0,0,0,0,85,24751,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Gryshka - On gossip option 0 select - Player cast Trick or Treat on self'),
(6929,0,2,0,22,0,100,0,41,0,0,0,33,6929,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Gryshka - On flex emote - Give kill credit');
@@ -10,7 +10,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
-- Fix quest 8358 "Incoming Gundrop"
UPDATE creature_template SET `AIName`= 'SmartAI' WHERE `entry`=11814;
DELETE FROM `smart_scripts` WHERE `entryorguid`=11814 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
+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
(11814,0,1,0,22,0,100,0,264,0,0,0,33,11814,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Kali Remik - On train emote - Give kill credit');
-- Fix quest 8354 "Chicken Clucking for a Mint"
@@ -23,14 +23,14 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
-- Fix quest 8360 "Dancing for Marzipan"
UPDATE creature_template SET `AIName`= 'SmartAI' WHERE `entry`=6746;
DELETE FROM `smart_scripts` WHERE `entryorguid`=6746 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
+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
(6746,0,1,0,22,0,100,0,34,0,0,0,33,6746,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Pala - On dance emote - Give kill credit');
-- Alliance
-- Fix quest 8356 "Flexing for Nougat"
DELETE FROM `smart_scripts` WHERE `entryorguid`=6740 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
+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
(6740,0,0,1,62,0,100,0,342,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Allison - On gossip option 0 select - Close gossip'),
(6740,0,1,0,61,0,100,0,0,0,0,0,85,24751,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Innkeeper Allison - On gossip option 0 select - Player cast Trick or Treat on self'),
(6740,0,2,0,22,0,100,0,41,0,0,0,33,6740,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Allison - On flex emote - Give kill credit');
@@ -38,20 +38,20 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
-- Fix quest 8358 "Incoming Gundrop"
UPDATE creature_template SET `AIName`= 'SmartAI' WHERE `entry`=6826;
DELETE FROM `smart_scripts` WHERE `entryorguid`=6826 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
+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
(6826,0,1,0,22,0,100,0,264,0,0,0,33,6826,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Talvash del Kissel - On train emote - Give kill credit');
-- Fix quest 8360 "Dancing for Marzipan"
UPDATE creature_template SET `AIName`= 'SmartAI' WHERE `entry`=6735;
DELETE FROM `smart_scripts` WHERE `entryorguid`=6735 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
+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
(6735,0,0,1,62,0,100,0,1581,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Saelienne - On gossip option 0 select - Close gossip'),
(6735,0,1,0,61,0,100,0,0,0,0,0,85,24751,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Saelienne - On gossip option 0 select - Player cast Trick or Treat on self'),
(6735,0,2,0,22,0,100,0,34,0,0,0,33,6735,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Saelienne - On dance emote - Give kill credit');
-- Fix quest 8353 "Chicken Clucking for a Mint"
DELETE FROM `smart_scripts` WHERE `entryorguid`=5111 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
+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
(5111,0,0,1,62,0,100,0,345,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Firebrew - On gossip option 0 select - Close gossip'),
(5111,0,1,0,61,0,100,0,0,0,0,0,85,24751,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Firebrew - On gossip option 0 select - Player cast Trick or Treat on self'),
(5111,0,2,0,22,0,100,0,22,0,0,0,33,5111,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Firebrew - On chicken emote - Give kill credit');
diff --git a/sql/old/3.3.5a/2011_10_23_05_world_misc.sql b/sql/old/3.3.5a/2011_10_23_05_world_misc.sql
index 5c730c8cd18..5f0cc4f6d2e 100644
--- a/sql/old/3.3.5a/2011_10_23_05_world_misc.sql
+++ b/sql/old/3.3.5a/2011_10_23_05_world_misc.sql
@@ -5,7 +5,7 @@ SET @SPELL_ETHEREUM_RELAY := 39596;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
-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
+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
(@ENTRY,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_SHADOWFORM,1,0,0,0,0,1,0,0,0,0,0,0,0,"Ethereum Relay - Out of Combat - Cast Shadowform"),
(@ENTRY,0,1,0,1,0,100,1,0,0,0,0,11,@SPELL_ETHEREUM_RELAY,1,0,0,0,0,1,0,0,0,0,0,0,0,"Ethereum Relay - Out of Combat - Cast Ethereum Relay");
diff --git a/sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql b/sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql
index 08d1d0a0ec1..297634d4ac8 100644
--- a/sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql
+++ b/sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql
@@ -50,7 +50,7 @@ UPDATE `creature_model_info` SET `bounding_radius`=0.25,`combat_reach`=0,`gender
UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=0,`gender`=2 WHERE `modelid` IN (1141,1418); -- Rat
UPDATE `creature_model_info` SET `bounding_radius`=0.075,`combat_reach`=0,`gender`=2 WHERE `modelid`=24719; -- [DND] Shaker - Small
-- Addon data
-UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=257,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry` IN
+UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=257,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry` IN
(2456 -- Newton Burnside
,2457 -- John Burnside
,1285 -- Thurman Mullby
@@ -89,7 +89,7 @@ UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=257,`mount`=0,`emote`=0
-- Frederick Stover
-- Lina Stover
-UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=258,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry` IN (1297,1298);
+UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=258,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry` IN (1297,1298);
DELETE FROM `creature_template_addon` WHERE `entry` IN (37574,37543,29093,25058);
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(37574,0,0,1,0, NULL), -- [DND] Shaker - Small
diff --git a/sql/old/3.3.5a/2011_10_23_07_world_sai.sql b/sql/old/3.3.5a/2011_10_23_07_world_sai.sql
index 7853b6eb411..baf9936566e 100644
--- a/sql/old/3.3.5a/2011_10_23_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_23_07_world_sai.sql
@@ -17,7 +17,7 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
-- Prospector Anvilward SAI
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='',`gossip_menu_id`=@GOSSIP WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
-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
+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
(@ENTRY,0,0,1,62,0,100,0,@GOSSIP+1,0,0,0,53,0,@ENTRY,0,0,0,2,1,0,0,0,0,0,0,0,'Prospector Anvilward - On Gossip Select - Start WP'),
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Prospector Anvilward - On Gossip Select - Start WP'),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Anvilward - On Gossip Select - Remove npcflag'),
diff --git a/sql/old/3.3.5a/2011_10_23_08_world_sai.sql b/sql/old/3.3.5a/2011_10_23_08_world_sai.sql
index 911168102ba..e2e8cfd73f4 100644
--- a/sql/old/3.3.5a/2011_10_23_08_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_23_08_world_sai.sql
@@ -1,9 +1,9 @@
-SET @ENTRY := 14354; -- the little bugger Pusillin
+SET @ENTRY := 14354; -- the little bugger Pusillin
SET @SPELL_1 := 14145; -- Fire Blast
SET @SPELL_2 := 15228; -- Fireball
SET @SPELL_3 := 22424; -- Blast Wave
-SET @SPELL_4 := 22735; -- Spirit of Runn Tum (reflect magic)
+SET @SPELL_4 := 22735; -- Spirit of Runn Tum (reflect magic)
SET @NPC_WILDSPAWN_IMP := 13276; -- 5 of them summoned by Pusillin during fight
-- Gossip menu's from npc_text
@@ -18,7 +18,7 @@ SET @GOSSIP_OPTION_1 := 6877;
SET @GOSSIP_OPTION_2 := 6878;
SET @GOSSIP_OPTION_3 := 6879;
SET @GOSSIP_OPTION_4 := 6880;
-SET @GOSSIP_OPTION_5 := 6881;
+SET @GOSSIP_OPTION_5 := 6881;
SET @SCRIPT_1 := 1435400; -- gossip
SET @SCRIPT_2 := 1435401; -- gossip
@@ -41,7 +41,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY,0,2,0,64,1,100,0,0,0,0,0,@SA_SEND_GOSSIP,@GOSSIP_2,@GOSSIP_OPTION_2,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Gossip Hello & Phase 2 - Send Gossip'),
(@ENTRY,0,3,0,64,2,100,0,0,0,0,0,@SA_SEND_GOSSIP,@GOSSIP_3,@GOSSIP_OPTION_3,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Gossip Hello & Phase 3 - Send Gossip'),
(@ENTRY,0,4,0,64,4,100,0,0,0,0,0,@SA_SEND_GOSSIP,@GOSSIP_4,@GOSSIP_OPTION_4,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Gossip Hello & Phase 4 - Send Gossip'),
- (@ENTRY,0,5,0,64,8,100,0,0,0,0,0,@SA_SEND_GOSSIP,@GOSSIP_5,@GOSSIP_OPTION_5,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Gossip Hello & Phase 5 - Send Gossip'),
+ (@ENTRY,0,5,0,64,8,100,0,0,0,0,0,@SA_SEND_GOSSIP,@GOSSIP_5,@GOSSIP_OPTION_5,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Gossip Hello & Phase 5 - Send Gossip'),
-- run script depending on phase
(@ENTRY,0,6,0,62,0,100,0,@GOSSIP_OPTION_1,0,0,0,80,@SCRIPT_1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Gossip Select - Run Script 1'),
@@ -52,31 +52,31 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
-- Waypoint 3 (chit-chat 1)
(@ENTRY,0,11,12,40,0,100,0,3,@ENTRY,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP3 - stop'),
-(@ENTRY,0,12,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP3 - Turn on Gossip flag'),
+(@ENTRY,0,12,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP3 - Turn on Gossip flag'),
-- Waypoint 14 (chit-chat 2)
(@ENTRY,0,13,14,40,0,100,0,14,@ENTRY*10,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP14 - stop'),
-(@ENTRY,0,14,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP14 - Turn on Gossip flag'),
+(@ENTRY,0,14,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP14 - Turn on Gossip flag'),
-- Waypoint 12 (chit-chat 3)
(@ENTRY,0,15,16,40,0,100,0,12,@ENTRY*20,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP12 - stop'),
-(@ENTRY,0,16,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP12 - Turn on Gossip flag'),
+(@ENTRY,0,16,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP12 - Turn on Gossip flag'),
-- Waypoint 7 (chit-chat 4)
(@ENTRY,0,17,18,40,0,100,0,7,@ENTRY*30,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP7 - stop'),
-(@ENTRY,0,18,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP7 - Turn on Gossip flag'),
+(@ENTRY,0,18,0,61,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - At WP7 - Turn on Gossip flag'),
-- casts during fight
(@ENTRY,0,19,0,0,0,100,0,1000,4250,8000,8000,11,@SPELL_1,0,0,0,0,0,2,0,0,0,0,0,0,0,'Pusillin - In Combat - Cast Fire Blast'),
(@ENTRY,0,20,0,0,0,100,0,1000,1000,4000,4000,11,@SPELL_2,0,0,0,0,0,2,0,0,0,0,0,0,0,'Pusillin - In Combat - Cast Fireball'),
-(@ENTRY,0,21,0,0,0,100,0,2000,10000,10000,17500,11,@SPELL_3,0,0,0,0,0,2,0,0,0,0,0,0,0,'Pusillin - In Combat - Cast Blast Wave'),
+(@ENTRY,0,21,0,0,0,100,0,2000,10000,10000,17500,11,@SPELL_3,0,0,0,0,0,2,0,0,0,0,0,0,0,'Pusillin - In Combat - Cast Blast Wave'),
-- Script 1
(@SCRIPT_1,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Script 1 - Close Gossip'),
(@SCRIPT_1,9,1,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 1 - Turn Off Gossip Flags'),
(@SCRIPT_1,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 1 - Say Text 0'),
(@SCRIPT_1,9,3,0,0,0,100,0,0,0,0,0,23,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Pusillin - On Script 1 - Set Phase to 2'),
-(@SCRIPT_1,9,4,0,0,0,100,0,0,0,0,0,53,1,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 1 - Start Waypoint Movement'),
+(@SCRIPT_1,9,4,0,0,0,100,0,0,0,0,0,53,1,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 1 - Start Waypoint Movement'),
-- Script 2
(@SCRIPT_2,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Script 2 - Close Gossip'),
@@ -90,7 +90,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@SCRIPT_3,9,1,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 3 - Turn Off Gossip Flags'),
(@SCRIPT_3,9,2,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 3 - Say Text 2'),
(@SCRIPT_3,9,3,0,0,0,100,0,0,0,0,0,23,1,0,0,0,0,0,0,0,0,0,0,0,0,0,'Pusillin - On Script 3 - Set Phase to 4'),
-(@SCRIPT_3,9,4,0,0,0,100,0,0,0,0,0,53,1,@ENTRY*20,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 3 - Start Waypoint Movement'),
+(@SCRIPT_3,9,4,0,0,0,100,0,0,0,0,0,53,1,@ENTRY*20,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 3 - Start Waypoint Movement'),
-- Script 4
(@SCRIPT_4,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Script 4 - Close Gossip'),
@@ -118,7 +118,7 @@ DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY,@ENTRY*10,@ENTRY*20,@ENTRY*30);
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
(@ENTRY,1,82.88,-198.508,-4.1331,'Pusillin path'),
(@ENTRY,2,-159.153,-201.138,-4.15275,'Pusillin path'),
-(@ENTRY,3,-154.512,-276.2,-4.14787,'Pusillin path'),
+(@ENTRY,3,-154.512,-276.2,-4.14787,'Pusillin path'),
(@ENTRY*10,1,-159.64,-320.208,-4.14787,'Pusillin path'),
(@ENTRY*10,2,-142.923,-344.111,-4.11348,'Pusillin path'),
(@ENTRY*10,3,-84.2623,-363.37,-4.14729,'Pusillin path'),
@@ -132,7 +132,7 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
(@ENTRY*10,11,38.3357,-357.051,-4.13201,'Pusillin path'),
(@ENTRY*10,12,55.7067,-349.754,-4.07173,'Pusillin path'),
(@ENTRY*10,13,88.4046,-354.125,-4.10444,'Pusillin path'),
-(@ENTRY*10,14,113.54,-372.365,-4.08966,'Pusillin path'),
+(@ENTRY*10,14,113.54,-372.365,-4.08966,'Pusillin path'),
(@ENTRY*20,1,111.71,-468.929,-2.71837,'Pusillin path'),
(@ENTRY*20,2,111.557,-485.672,-6.88627,'Pusillin path'),
(@ENTRY*20,3,111.29,-514.931,-6.91324,'Pusillin path'),
@@ -160,7 +160,7 @@ INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`op
(@GOSSIP_OPTION_2,0,0,'Why you little...',1,1),
(@GOSSIP_OPTION_3,0,0,'Mark my words, I will catch you, imp. And when I do!',1,1),
(@GOSSIP_OPTION_4,0,0,'DIE!',1,1),
-(@GOSSIP_OPTION_5,0,0,'Prepare to meet your maker.',1,1);
+(@GOSSIP_OPTION_5,0,0,'Prepare to meet your maker.',1,1);
-- Pusillin texts
DELETE FROM `creature_text` WHERE `entry`= @ENTRY;
@@ -169,7 +169,7 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr
(@ENTRY,1,0,'Chase me if you dare! I run without a care!',12,0,0,0,0,0,'Pusillin text #2'),
(@ENTRY,2,0,'Why would you ever want to harm me!? Come. Friends we can be!',12,0,0,0,0,0,'Pusillin text #3'),
(@ENTRY,3,0,'DIE?! You make Pusillin cry!',12,0,0,0,0,0,'Pusillin text #4'),
-(@ENTRY,4,0,'Say hello to my little friends!',12,0,0,0,0,0,'Pusillin text #5');
+(@ENTRY,4,0,'Say hello to my little friends!',12,0,0,0,0,0,'Pusillin text #5');
-- remove already spawned Wildspawn Imp
DELETE FROM `creature` WHERE `guid`=56995;
diff --git a/sql/old/3.3.5a/2011_10_29_05_world_sai.sql b/sql/old/3.3.5a/2011_10_29_05_world_sai.sql
index fc17ca8a1a7..fb22020163e 100644
--- a/sql/old/3.3.5a/2011_10_29_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_29_05_world_sai.sql
@@ -15,7 +15,7 @@ INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language
(24238, 2, 1, 'The Winterskorn tribe will prevail!', 14, 0, 100, 0, 0, 0, 'Bjorn Halgurdsson - Random 2');
DELETE FROM `smart_scripts` WHERE `entryorguid`=24238 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
+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
(24238, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 11, 43371, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bjorn Halgurdsson - On death cast Bjorn Kill Credit (Quest: Adding Injury to Insult)'),
(24238, 0, 1, 0, 0, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bjorn Halgurdsson - In combat (nr) say text 0'),
(24238, 0, 2, 0, 0, 0, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bjorn Halgurdsson - In combat (nr) say text 1'),
diff --git a/sql/old/3.3.5a/2011_11_07_00_world_player_factionchange_items.sql b/sql/old/3.3.5a/2011_11_07_00_world_player_factionchange_items.sql
index 54a36473fb3..9b6ac61f2d4 100644
--- a/sql/old/3.3.5a/2011_11_07_00_world_player_factionchange_items.sql
+++ b/sql/old/3.3.5a/2011_11_07_00_world_player_factionchange_items.sql
@@ -1,5 +1,5 @@
DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (48072,48073,48074,48075,48076) AND horde_id IN (48097,48098,48099,48100,48101);
-INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES
+INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES
(0,48076, 'Velen''s Mantle of Conquest',0,48101, 'Zabra''s Mantle of Conquest'),
(0,48075, 'Velen''s Raiments of Conquest',0,48100, 'Zabra''s Raiments of Conquest'),
(0,48074, 'Velen''s Pants of Conquest',0,48099, 'Zabra''s Pants of Conquest'),
diff --git a/sql/old/3.3.5a/2011_11_11_01_world_misc.sql b/sql/old/3.3.5a/2011_11_11_01_world_misc.sql
index f48d3f8200e..bf7e7a63c87 100644
--- a/sql/old/3.3.5a/2011_11_11_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_11_11_01_world_misc.sql
@@ -4,7 +4,7 @@ UPDATE `creature_template` SET `npcflag`=`npcflag`|16777216 WHERE `entry`=30560;
DELETE FROM `creature_template_addon` WHERE `entry`=30560;
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(30560,0,0,1,0, NULL); -- The RP-GG
-
+
-- Fixing spawntime for creature 30560 (The RP-GG)
UPDATE `creature` SET `spawntimesecs`=60 WHERE `id`=30560;
diff --git a/sql/old/3.3.5a/2011_11_13_02_world_pool_template.sql b/sql/old/3.3.5a/2011_11_13_02_world_pool_template.sql
index 257398d4457..b0c7ab75b0b 100644
--- a/sql/old/3.3.5a/2011_11_13_02_world_pool_template.sql
+++ b/sql/old/3.3.5a/2011_11_13_02_world_pool_template.sql
@@ -31,7 +31,7 @@ Icecrown guid 163200 - 164399 pool 11400 - 11799
-- ----------------------------------------
-- -- Fixup ore spawns for Borean Tundra --
-- ----------------------------------------
-SET @RANGE := 150;
+SET @RANGE := 150;
SET @GUID1 := 160000;
SET @GUID2 := @GUID1 + @RANGE;
SET @POOL := 10000;
@@ -2267,7 +2267,7 @@ INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
-- -----------------------------------------
-- -- Fixup ore spawns for Sholazar Basin --
--- -----------------------------------------
+-- -----------------------------------------
SET @RANGE := 350;
SET @GUID1 := 161400;
SET @GUID2 := @GUID1 + @RANGE;
diff --git a/sql/old/3.3.5a/2011_11_13_05_world_creature_loot_template.sql b/sql/old/3.3.5a/2011_11_13_05_world_creature_loot_template.sql
index 722027bd343..ab831bc335a 100644
--- a/sql/old/3.3.5a/2011_11_13_05_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2011_11_13_05_world_creature_loot_template.sql
@@ -1,4 +1,4 @@
--- Add Jormungar Egg Sac on Deep Jormungar
+-- Add Jormungar Egg Sac on Deep Jormungar
DELETE FROM `creature_loot_template` WHERE `entry`=34920 AND `item`=46889;
INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(34920,46889,-100,1,0,1,1); -- Jormungar Egg Sac
diff --git a/sql/old/3.3.5a/2011_11_13_06_world_reference_loot_template.sql b/sql/old/3.3.5a/2011_11_13_06_world_reference_loot_template.sql
index efb2fec72f3..57bf1aca809 100644
--- a/sql/old/3.3.5a/2011_11_13_06_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2011_11_13_06_world_reference_loot_template.sql
@@ -1,6 +1,6 @@
SET @Ref = 10020;
DELETE FROM `reference_loot_template` WHERE `entry`=@Ref AND `item`IN (34000,34001,34002,34003,33292,37606);
-INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@REF,34000,0.8,1,0,1,1), -- Flimsy Female Blood Elf Mask
(@REF,34001,0.8,1,0,1,1), -- Flimsy Female Draenei Mask
(@REF,34002,0.8,1,0,1,1), -- Flimsy Male Blood Elf Mask
diff --git a/sql/old/3.3.5a/2011_11_13_07_world_creature_loot_template.sql b/sql/old/3.3.5a/2011_11_13_07_world_creature_loot_template.sql
index 728ce731313..7e5f4e36c07 100644
--- a/sql/old/3.3.5a/2011_11_13_07_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2011_11_13_07_world_creature_loot_template.sql
@@ -1,5 +1,5 @@
-- Add Formula: Enchant Cloak - Superior Arcane Resistance to Frostbrood Spawn & Cult Researcher
DELETE FROM `creature_loot_template` WHERE `entry` IN (31702,32297) AND `item`=37330;
-INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(31702,37330,1.5,1,0,1,1), -- Formula: Enchant Cloak - Superior Arcane Resistance
(32297,37330,0.8,1,0,1,1); -- Formula: Enchant Cloak - Superior Arcane Resistance
diff --git a/sql/old/3.3.5a/2011_11_13_11_world_creature_loot_template.sql b/sql/old/3.3.5a/2011_11_13_11_world_creature_loot_template.sql
index 9f753577844..4f755b1cbea 100644
--- a/sql/old/3.3.5a/2011_11_13_11_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2011_11_13_11_world_creature_loot_template.sql
@@ -1,6 +1,6 @@
-- Add Orders From Kael'thas to the following creatures
DELETE FROM `creature_loot_template` WHERE `item`=29797;
-INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(18860,29797,-80,1,0,1,1), -- Daughter of Destiny
(20285,29797,-80,1,0,1,1), -- Gan'arg Warp-Tinker
(20326,29797,-80,1,0,1,1); -- Mo'arg Warp-Master
diff --git a/sql/old/3.3.5a/2011_11_13_12_world_creature_loot_template.sql b/sql/old/3.3.5a/2011_11_13_12_world_creature_loot_template.sql
index 7982910cee6..a32f65f3aab 100644
--- a/sql/old/3.3.5a/2011_11_13_12_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2011_11_13_12_world_creature_loot_template.sql
@@ -1,4 +1,4 @@
-- Add Heavy Scorpid Vest to Shadowsworn Thug and remove from Portal Seeker
DELETE FROM `creature_loot_template` WHERE `item`=15727;
-INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(6005,15727,0.5,1,0,1,1); -- Shadowsworn Thug
diff --git a/sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql
index 9f3f22d7792..f5fa3ad48ce 100644
--- a/sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2011_12_13_01_world_achievement_criteria_data.sql
@@ -1,7 +1,7 @@
-- Experienced Drake Rider Achiev
-
+
DELETE FROM `disables` WHERE `entry` IN (7177,7178,7179);
-
+
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7177,7178,7179);
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
(7177,5,49460,1,''), -- Amber Drake
@@ -9,4 +9,4 @@ INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,
(7178,5,49346,1,''), -- Emerald Drake
(7178,12,1,0, ''), -- hc mode only
(7179,5,49464,1,''), -- Ruby Drake
-(7179,12,1,0, ''); -- hc mode only \ No newline at end of file
+(7179,12,1,0, ''); -- hc mode only
diff --git a/sql/old/3.3.5a/2011_12_17_00_world_creature.sql b/sql/old/3.3.5a/2011_12_17_00_world_creature.sql
index 0126561da01..9b830c207ef 100644
--- a/sql/old/3.3.5a/2011_12_17_00_world_creature.sql
+++ b/sql/old/3.3.5a/2011_12_17_00_world_creature.sql
@@ -319,12 +319,12 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
(@GUID+286,9257,229,1,1,0,0,75.31803,-587.21405,30.68769,2.86234,7200,0,0,1,0,0),
(@GUID+287,9257,229,1,1,0,0,-8.240628,-580.9951,29.2742,5.67232,7200,0,0,1,0,0),
(@GUID+288,9257,229,1,1,0,0,-56.70842,-586.1366,29.2742,1.2915436,7200,0,0,1,0,0);
-
+
-- Add sitting to some Scarshield Legionnaires
DELETE FROM `creature_addon` WHERE `guid` IN (209318,209333,209315,209337,209308,209312,209331,209320,209335);
INSERT INTO `creature_addon` (`guid`,`bytes1`,`bytes2`) VALUES
(209318,1,1),(209333,1,1),(209315,1,1),(209337,1,1),(209308,1,1),(209312,1,1),(209331,1,1),(209320,1,1),(209335,1,1);
-
+
-- Pathing for Blackhand Dreadweaver Entry: 9817
SET @NPC := @GUID+116;
SET @PATH := @NPC * 10;
@@ -354,7 +354,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,19,142.107,-253.858,110.808,0,0,0,100,0),
(@PATH,20,149.232,-254.785,110.835,0,0,0,100,0),
(@PATH,21,156.027,-256.98,110.873,0,0,0,100,0);
-
+
-- Pathing for Rage Talon Dragonspawn Entry: 9096
SET @NPC := @GUID+13;
SET @PATH := @NPC * 10;
@@ -385,7 +385,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,20,157.819,-330.472,70.9563,0,0,0,100,0),
(@PATH,21,151.347,-332.406,70.9563,0,0,0,100,0),
(@PATH,22,141.415,-328.32,70.9563,0,0,0,100,0);
-
+
-- Pathing for Rage Talon Dragonspawn Entry: 9096
SET @NPC := @GUID+3;
SET @PATH := @NPC * 10;
@@ -398,7 +398,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,2,103.388,-312.501,106.436,0,0,0,100,0),
(@PATH,3,102.492,-284.08,106.436,0,0,0,100,0),
(@PATH,4,102.111,-255.036,106.436,0,0,0,100,0);
-
+
-- Pathing for Rage Talon Flamescale Entry: 10083
SET @NPC := @GUID+25;
SET @PATH := @NPC * 10;
@@ -411,7 +411,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,2,151.43,-299.848,110.655,0,0,0,100,0),
(@PATH,3,151.826,-337.478,110.948,0,0,0,100,0),
(@PATH,4,151.43,-299.848,110.655,0,0,0,100,0);
-
+
-- Pathing for Rage Talon Flamescale Entry: 10083
SET @NPC := @GUID+26;
SET @PATH := @NPC * 10;
@@ -426,7 +426,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,4,113.681,-366.227,116.844,0,0,0,100,0),
(@PATH,5,134.314,-365.853,116.844,0,0,0,100,0),
(@PATH,6,159.69,-366.065,116.844,0,0,0,100,0);
-
+
-- Pathing for Blackhand Veteran Entry: 9819
SET @NPC := @GUID+77;
SET @PATH := @NPC * 10;
@@ -455,7 +455,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,18,141.56,-328.348,110.948,0,0,0,100,0),
(@PATH,19,145.867,-339.175,110.95,0,0,0,100,0),
(@PATH,20,151.986,-343.381,110.952,0,0,0,100,0);
-
+
-- Pathing for Blackhand Veteran Entry: 9819
SET @NPC := @GUID+68;
SET @PATH := @NPC * 10;
@@ -488,7 +488,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,22,137.621,-374.032,116.807,0,0,0,100,0),
(@PATH,23,138.003,-383.829,121.975,0,0,0,100,0),
(@PATH,24,137.681,-374.135,116.807,0,0,0,100,0);
-
+
-- Pathing for Rage Talon Dragon Guard Entry: 10366
SET @NPC := @GUID+32;
SET @PATH := @NPC * 10;
@@ -515,7 +515,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,16,106.258,-474.643,116.842,0,0,0,100,0),
(@PATH,17,120.161,-474.673,116.842,0,0,0,100,0),
(@PATH,18,137.109,-474.652,116.842,0,0,0,100,0);
-
+
-- Pathing for Jed Runewatcher Entry: 10509 "RARE"
SET @NPC := @GUID+153;
SET @PATH := @NPC * 10;
@@ -545,7 +545,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,19,160.079,-280.562,110.652,0,0,0,100,0),
(@PATH,20,144.032,-280.615,110.653,0,0,0,100,0),
(@PATH,21,142.987,-312.006,110.658,0,0,0,100,0);
-
+
-- Pathing for Blackhand Assassin Entry: 10318
SET @NPC := @GUID+173;
SET @PATH := @NPC * 10;
@@ -583,7 +583,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,27,60.60706,-474.3578,112.1393,0,0,0,100,0),
(@PATH,28,70.90186,-474.6028,115.4964,0,0,0,100,0);
-- 0xF13000284E0957D1 .go 83.54216 -474.6622 116.8424
-
+
-- Pathing for Blackhand Assassin Entry: 10318
SET @NPC := @GUID+155;
SET @PATH := @NPC * 10;
@@ -609,7 +609,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,15,112.9668,-557.6212,107.6628,0,0,0,100,0),
(@PATH,16,117.2911,-562.6133,107.403,0,0,0,100,0);
-- 0xF13000284E0957CB .go 117.5151 -567.9547 107.125
-
+
-- Pathing for Blackhand Iron Guard Entry: 10319
SET @NPC := @GUID+185;
SET @PATH := @NPC * 10;
@@ -625,7 +625,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,5,10.9487,-465.839,110.938,0,0,0,100,0),
(@PATH,6,12.0295,-481.36,110.935,0,0,0,100,0),
(@PATH,7,27.209,-487.106,110.949,0,0,0,100,0);
-
+
-- Pathing for Blackhand Iron Guard Entry: 10319
SET @NPC := @GUID+187;
SET @PATH := @NPC * 10;
@@ -644,7 +644,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,32.9856,-441.198,110.948,0,0,0,100,0),
(@PATH,9,33.2187,-432.523,110.949,0,0,0,100,0),
(@PATH,10,32.9856,-441.198,110.948,0,0,0,100,0);
-
+
-- Pathing for Blackhand Iron Guard Entry: 10319
SET @NPC := @GUID+180;
SET @PATH := @NPC * 10;
@@ -684,7 +684,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,29,137.726,-471.057,116.836,0,0,0,100,0),
(@PATH,30,137.759,-466.307,116.807,0,0,0,100,0),
(@PATH,31,137.438,-458.164,121.874,0,0,0,100,0);
-
+
-- Pathing for Goraluk Anvilcrack Entry: 10899
SET @NPC := @GUID+39;
SET @PATH := @NPC * 10;
@@ -725,7 +725,7 @@ INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`o
(@PATH+3,0,30,0,0,1.801312,94),
(@PATH+3,1,1,28,1,0,95),
(@PATH+3,22,1,0,1,0,96);
-
+
-- Pathing for Rage Talon Captain Entry: 10371
SET @NPC := @GUID+42;
SET @PATH := @NPC * 10;
@@ -746,7 +746,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,10,-0.199047,-320.916,110.942,0,0,0,100,0),
(@PATH,11,0.073367,-274.516,110.929,0,0,0,100,0),
(@PATH,12,17.7263,-263.467,110.943,0,0,0,100,0);
-
+
-- Pathing for Blackrock Drake Entry: 8964
SET @NPC := 3343;
SET @PATH := @NPC * 10;
@@ -776,7 +776,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,19,-7502.939,-1142.821,286.4399,0,0,0,100,0),
(@PATH,20,-7499.304,-1120.659,286.4399,0,0,0,100,0),
(@PATH,21,-7502.985,-1091.508,286.4399,0,0,0,100,0);
-
+
-- Pathing for Blackrock Drake Entry: 8964
SET @NPC := 3344;
SET @PATH := @NPC * 10;
@@ -811,7 +811,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,24,-7562.621,-1112.578,307.4555,0,0,0,100,0),
(@PATH,25,-7567.333,-1126.35,304.3445,0,0,0,100,0),
(@PATH,26,-7587.611,-1127.057,299.0391,0,0,0,100,0);
-
+
-- Pathing for Scarshield Legionnaire Entry: 9097
SET @NPC := @GUID+228;
SET @PATH := @NPC * 10;
@@ -832,7 +832,7 @@ INSERT INTO `waypoint_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`o
(@PATH+2,0,30,0,0,3.892084,100),
(@PATH+2,7,1,69,1,0,101),
(@PATH+2,16,1,0,1,0,102);
-
+
-- Pathing for Scarshield Legionnaire Entry: 9097
SET @NPC := @GUID+209;
SET @PATH := @NPC * 10;
@@ -859,7 +859,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,16,34.57693,-329.2669,53.62961,0,0,0,100,0),
(@PATH,17,41.51676,-327.2762,53.74633,0,0,0,100,0),
(@PATH,18,53.45955,-325.36,53.91605,0,0,0,100,0);
-
+
-- Pathing for Scarshield Legionnaire Entry: 9097
SET @NPC := @GUID+229;
SET @PATH := @NPC * 10;
@@ -896,7 +896,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,26,67.14284,-292.4547,60.63996,0,0,0,100,0),
(@PATH,27,74.20583,-289.4101,60.64116,0,0,0,100,0),
(@PATH,28,81.97402,-288.0753,60.66125,0,0,0,100,0);
-
+
-- Pathing for Scarshield Legionnaire Entry: 9097
SET @NPC := @GUID+230;
SET @PATH := @NPC * 10;
@@ -938,7 +938,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,31,71.19937,-288.5282,60.61031,0,0,0,100,0),
(@PATH,32,76.71995,-286.1484,60.66695,0,0,0,100,0),
(@PATH,33,83.98484,-287.0403,60.643,0,0,0,100,0);
-
+
-- Pathing for Scarshield Spellbinder Entry: 9098
SET @NPC := @GUID+252;
SET @PATH := @NPC * 10;
diff --git a/sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql b/sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql
index 98752a1b7ec..5e8a01975cf 100644
--- a/sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql
+++ b/sql/old/3.3.5a/2011_12_17_00_world_gameobject.sql
@@ -5,7 +5,7 @@ DELETE FROM `gameobject` WHERE `map`=229 AND `id` IN (153464,175124,175194,17519
136928,136929,136930,136931,136932,136933,136934,136935,136936,136937,136938,136939,136940,136941,136942,136943,136944,136945,136946,136947,136948,136949,136951,136954,136957,136959,136961,136962,136963,136964,153469,
164725,175334,175571,175584,175588,175606,175607,175608,175609,175886,175949,175950,176089,176090,176425,176426,176427,176428,176429,176430,176431,176432,176433,176434,176435,176436,176437,176438,176439,176440,176441,
176442,176443,176444,176445,176446,176454,176455,176456,176457,176458);
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(@OGUID,175124,229,1,1,100.579681,-312.488953,91.4455,0.122172989,0,0,0,0,120,0,1),
(@OGUID+1,175124,229,1,1,101.516693,-311.471344,91.4455,-1.58824873,0,0,0,0,120,0,1),
(@OGUID+2,175124,229,1,1,102.414017,-304.376343,91.4466248,0.0174524616,0,0,0,0,120,0,1),
diff --git a/sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql b/sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql
index 5df7f000b06..dc165258391 100644
--- a/sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql
+++ b/sql/old/3.3.5a/2011_12_18_00_world_creature_addon.sql
@@ -1,2 +1,2 @@
--- Delete addons for some creatures that has been removed
+-- Delete addons for some creatures that has been removed
DELETE FROM `creature_addon` WHERE `guid` IN (209318,209333,209315,209337,209308,209312,209331,209320,209335,209318,209333,209315,209337,209308,209312,209331,209320,209335);
diff --git a/sql/old/3.3.5a/2011_12_18_04_world_misc.sql b/sql/old/3.3.5a/2011_12_18_04_world_misc.sql
index 3404e4f285f..64b00eb0070 100644
--- a/sql/old/3.3.5a/2011_12_18_04_world_misc.sql
+++ b/sql/old/3.3.5a/2011_12_18_04_world_misc.sql
@@ -56,7 +56,7 @@ SET @NPC = 3144;
SET @QUEST = 4941;
-- Add gossip options for each menu id
DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN @GOSSIP AND @GOSSIP+7;
-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
+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
(@GOSSIP, 0, 0, 'Hello, Eitrigg. I bring news from Blackrock Spire.', 1, 1, @GOSSIP+1, 0, 0, 0, ''),
(@GOSSIP+1, 0, 0, 'There is only one Warchief, Eitrigg!', 1, 1, @GOSSIP+2, 0, 0, 0, ''),
(@GOSSIP+2, 0, 0, 'What do you mean?', 1, 1, @GOSSIP+3, 0, 0, 0, ''),
@@ -67,7 +67,7 @@ INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`,
(@GOSSIP+7, 0, 0, 'As you wish, Eitrigg.', 1, 1, 0, 0, 0, 0, '');
-- Add gossip menus (text values already in db)
DELETE FROM `gossip_menu` WHERE `entry`BETWEEN @GOSSIP+1 AND @GOSSIP+7;
-INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
(@GOSSIP+1, 3574),
(@GOSSIP+2, 3575),
(@GOSSIP+3, 3576),
@@ -77,7 +77,7 @@ INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
(@GOSSIP+7, 3580);
-- Add Condtion so gossip only shows when on quest
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, @GOSSIP, 0, 0, 9, 4941, 0, 0, 0, '', NULL);
-- Add SAI for quest complete and close of gossip when last option selected
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NPC;
diff --git a/sql/old/3.3.5a/2011_12_18_06_world_sai.sql b/sql/old/3.3.5a/2011_12_18_06_world_sai.sql
index 2fce176cd0f..39cde4a3b3f 100644
--- a/sql/old/3.3.5a/2011_12_18_06_world_sai.sql
+++ b/sql/old/3.3.5a/2011_12_18_06_world_sai.sql
@@ -6,7 +6,7 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@JEEVES;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@JEEVES 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
+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
(@JEEVES,0,0,0,8,0,100,0,@SPELL_GOODBYE,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jeeves - On Spellhit - Say Line 0");
DELETE FROM `creature_text` WHERE `entry`=@JEEVES;
diff --git a/sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql
index af7b0a9361b..b94b06cab82 100644
--- a/sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2011_12_19_02_world_achievement_criteria_data.sql
@@ -1,4 +1,4 @@
--- Achievement Fa-la-la-la-Ogri'la
+-- Achievement Fa-la-la-la-Ogri'la
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (3936,3937,3938);
INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
-- requires aura
diff --git a/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql b/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql
index ed95c4450fd..9d309c8aec9 100644
--- a/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_02_02_world_creature_template.sql
@@ -2,12 +2,12 @@
UPDATE `creature_template` SET `flags_extra`= `flags_extra`|64 WHERE `entry` IN (
-- NORMAL
30661, -- CREATURE_AZURE_INVADER_1
-30961, -- CREATURE_AZURE_INVADER_2
-30662, -- CREATURE_AZURE_SPELLBREAKER_1
-30962, -- CREATURE_AZURE_SPELLBREAKER_2
-30663, -- CREATURE_AZURE_BINDER_1
-30918, -- CREATURE_AZURE_BINDER_2
-30664, -- CREATURE_AZURE_MAGE_SLAYER_1
+30961, -- CREATURE_AZURE_INVADER_2
+30662, -- CREATURE_AZURE_SPELLBREAKER_1
+30962, -- CREATURE_AZURE_SPELLBREAKER_2
+30663, -- CREATURE_AZURE_BINDER_1
+30918, -- CREATURE_AZURE_BINDER_2
+30664, -- CREATURE_AZURE_MAGE_SLAYER_1
30963, -- CREATURE_AZURE_MAGE_SLAYER_2
-- HEROIC:
31487, -- Azure Invader
@@ -18,4 +18,4 @@ UPDATE `creature_template` SET `flags_extra`= `flags_extra`|64 WHERE `entry` IN
31488, -- Azure Invader
31495, -- Azure Spellbreaker
31498 -- Azure Mage Slayer
-);
+);
diff --git a/sql/old/3.3.5a/2012_01_03_02_world_sai.sql b/sql/old/3.3.5a/2012_01_03_02_world_sai.sql
index 61ae8aab575..a841c4c06c9 100644
--- a/sql/old/3.3.5a/2012_01_03_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_03_02_world_sai.sql
@@ -1,6 +1,6 @@
-- Add text for Lynn Hyal
DELETE FROM `creature_text` WHERE `entry`=23768;
-INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(23768, 1, 0, 'James? James... No, you\'re not James, but I know who you are...', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'),
(23768, 2, 0, 'You\'re the one who tracked down the brutes who did this to us.', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'),
(23768, 3, 0, 'I tried so hard to tell Jim... to tell anyone... who was behind this, but I couldn\'t find a way...', 12, 0, 100, 0, 0, 0, 'Lynn Hyal'),
@@ -8,12 +8,12 @@ INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language
(23768, 5, 0, 'I don\'t know when we\'ll see Daddy again, Jimmy, but I know he loves you and he misses you very much.', 12, 0, 100, 0, 0, 0, 'Lynn Hyal');
-- Add text for Jimmy Hyal
DELETE FROM `creature_text` WHERE `entry`=23769;
-INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(23769, 1, 0, 'Mommy, when will we see Daddy again?', 12, 0, 100, 0, 0, 0, 'Jimmy Hyal');
-- add smart ai dialog for Lynn Hyal and quest credit at end of dialog
UPDATE `creature_template` SET AIName="SmartAI" WHERE `entry`=23768;
DELETE FROM `smart_scripts` WHERE `entryorguid`=23768;
-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
+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
(23768, 0, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 84, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - on spawn - talk 1'),
(23768, 0, 1, 0, 1, 0, 100, 1, 2000, 2000, 0, 0, 84, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 2 sec - talk 2'),
(23768, 0, 2, 0, 1, 0, 100, 1, 5000, 5000, 0, 0, 84, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lynn Hyal - after 5 sec - talk 3'),
@@ -23,5 +23,5 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_
-- add smart ai dialog for Jimmy Hyal
UPDATE `creature_template` SET AIName="SmartAI" WHERE `entry`=23769;
DELETE FROM `smart_scripts` WHERE `entryorguid`=23769;
-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
+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
(23769, 0, 0, 0, 1, 0, 100, 1, 10000, 10000, 0, 0, 84, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jimmy Hyal - after 10 sec - talk 1');
diff --git a/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql b/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql
index 9746a358e8a..0619903ed42 100644
--- a/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql
+++ b/sql/old/3.3.5a/2012_01_04_01_world_game_event_seasonal_questrelation.sql
@@ -7,380 +7,380 @@ CREATE TABLE `game_event_seasonal_questrelation` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System';
INSERT INTO `game_event_seasonal_questrelation` (`quest`,`event`) VALUES
- (1657, 12),
- (1658, 12),
- (6961, 2),
- (6962, 2),
- (6963, 2),
- (6964, 2),
- (6983, 3),
- (6984, 3),
- (7021, 2),
- (7022, 2),
- (7023, 2),
- (7024, 2),
- (7025, 2),
- (7042, 2),
- (7043, 2),
- (7045, 2),
- (7061, 2),
- (7062, 2),
- (7063, 2),
- (8149, 11),
- (8150, 11),
- (8311, 12),
- (8312, 12),
- (8322, 12),
- (8353, 12),
- (8354, 12),
- (8355, 12),
- (8356, 12),
- (8357, 12),
- (8358, 12),
- (8359, 12),
- (8360, 12),
- (8373, 12),
- (8409, 12),
- (8744, 52),
- (8746, 2),
- (8762, 2),
- (8763, 2),
- (8767, 52),
- (8768, 52),
- (8769, 52),
- (8788, 52),
- (8799, 2),
- (8803, 52),
- (8827, 2),
- (8828, 2),
- (8860, 6),
- (8861, 6),
- (8868, 7),
- (8897, 8),
- (8898, 8),
- (8899, 8),
- (8900, 8),
- (8901, 8),
- (8902, 8),
- (8903, 8),
- (8904, 8),
- (8971, -1),
- (8972, -1),
- (8973, -1),
- (8974, -1),
- (8975, -1),
- (8976, -1),
- (8979, 8),
- (8980, 8),
- (8981, 8),
- (8982, 8),
- (8983, 8),
- (8984, 8),
- (8993, 8),
- (9024, 8),
- (9025, 8),
- (9026, 8),
- (9027, 8),
- (9028, 8),
- (11131, 12),
- (11135, 12),
- (11219, 12),
- (11220, 12),
- (11242, 12),
- (11356, 12),
- (11357, 12),
- (11360, 12),
- (11361, 12),
- (11392, 12),
- (11401, 12),
- (11403, 12),
- (11404, 12),
- (11405, 12),
- (11435, 12),
- (11439, 12),
- (11440, 12),
- (11449, 12),
- (11450, 12),
- (11528, 52),
- (11558, 8),
- (11580, 1),
- (11581, 1),
- (11583, 1),
- (11584, 1),
- (11696, 1),
- (11732, 1),
- (11734, 1),
- (11735, 1),
- (11736, 1),
- (11737, 1),
- (11738, 1),
- (11739, 1),
- (11740, 1),
- (11741, 1),
- (11742, 1),
- (11743, 1),
- (11744, 1),
- (11745, 1),
- (11746, 1),
- (11747, 1),
- (11748, 1),
- (11749, 1),
- (11750, 1),
- (11751, 1),
- (11752, 1),
- (11753, 1),
- (11754, 1),
- (11755, 1),
- (11756, 1),
- (11757, 1),
- (11758, 1),
- (11759, 1),
- (11760, 1),
- (11761, 1),
- (11762, 1),
- (11763, 1),
- (11764, 1),
- (11765, 1),
- (11766, 1),
- (11767, 1),
- (11768, 1),
- (11769, 1),
- (11770, 1),
- (11771, 1),
- (11772, 1),
- (11773, 1),
- (11774, 1),
- (11775, 1),
- (11776, 1),
- (11777, 1),
- (11778, 1),
- (11779, 1),
- (11780, 1),
- (11781, 1),
- (11782, 1),
- (11783, 1),
- (11784, 1),
- (11785, 1),
- (11786, 1),
- (11787, 1),
- (11799, 1),
- (11800, 1),
- (11801, 1),
- (11802, 1),
- (11803, 1),
- (11804, 1),
- (11805, 1),
- (11806, 1),
- (11807, 1),
- (11808, 1),
- (11809, 1),
- (11810, 1),
- (11811, 1),
- (11812, 1),
- (11813, 1),
- (11814, 1),
- (11815, 1),
- (11816, 1),
- (11817, 1),
- (11818, 1),
- (11819, 1),
- (11820, 1),
- (11821, 1),
- (11822, 1),
- (11823, 1),
- (11824, 1),
- (11825, 1),
- (11826, 1),
- (11827, 1),
- (11828, 1),
- (11829, 1),
- (11830, 1),
- (11831, 1),
- (11832, 1),
- (11833, 1),
- (11834, 1),
- (11835, 1),
- (11836, 1),
- (11837, 1),
- (11838, 1),
- (11839, 1),
- (11840, 1),
- (11841, 1),
- (11842, 1),
- (11843, 1),
- (11844, 1),
- (11845, 1),
- (11846, 1),
- (11847, 1),
- (11848, 1),
- (11849, 1),
- (11850, 1),
- (11851, 1),
- (11852, 1),
- (11853, 1),
- (11854, 1),
- (11855, 1),
- (11856, 1),
- (11857, 1),
- (11858, 1),
- (11859, 1),
- (11860, 1),
- (11861, 1),
- (11862, 1),
- (11863, 1),
- (11937, 1),
- (11976, 1),
- (12133, 12),
- (12135, 12),
- (12139, 12),
- (12155, 12),
- (12286, -1),
- (12313, 24),
- (12331, 12),
- (12332, 12),
- (12333, 12),
- (12334, 12),
- (12335, 12),
- (12336, 12),
- (12337, 12),
- (12338, 12),
- (12339, 12),
- (12340, 12),
- (12341, 12),
- (12342, 12),
- (12343, 12),
- (12344, 12),
- (12345, 12),
- (12346, 12),
- (12347, 12),
- (12348, 12),
- (12349, 12),
- (12350, 12),
- (12351, 12),
- (12352, 12),
- (12353, 12),
- (12354, 12),
- (12355, 12),
- (12356, 12),
- (12357, 12),
- (12358, 12),
- (12359, 12),
- (12360, 12),
- (12361, 12),
- (12362, 12),
- (12363, 12),
- (12364, 12),
- (12365, 12),
- (12366, 12),
- (12367, 12),
- (12368, 12),
- (12369, 12),
- (12370, 12),
- (12371, 12),
- (12373, 12),
- (12374, 12),
- (12375, 12),
- (12376, 12),
- (12377, 12),
- (12378, 12),
- (12379, 12),
- (12380, 12),
- (12381, 12),
- (12382, 12),
- (12383, 12),
- (12384, 12),
- (12385, 12),
- (12386, 12),
- (12387, 12),
- (12388, 12),
- (12389, 12),
- (12390, 12),
- (12391, 12),
- (12392, 12),
- (12393, 12),
- (12394, 12),
- (12395, 12),
- (12396, 12),
- (12397, 12),
- (12398, 12),
- (12399, 12),
- (12400, 12),
- (12401, 12),
- (12402, 12),
- (12403, 12),
- (12404, 12),
- (12405, 12),
- (12406, 12),
- (12407, 12),
- (12408, 12),
- (12409, 12),
- (12410, 12),
- (12940, 12),
- (12941, 12),
- (12944, 12),
- (12945, 12),
- (12946, 12),
- (12947, 12),
- (12950, 12),
- (13203, 52),
- (13433, 12),
- (13434, 12),
- (13435, 12),
- (13436, 12),
- (13437, 12),
- (13438, 12),
- (13439, 12),
- (13440, 12),
- (13441, 12),
- (13442, 12),
- (13443, 12),
- (13444, 12),
- (13445, 12),
- (13446, 12),
- (13447, 12),
- (13448, 12),
- (13449, 12),
- (13450, 12),
- (13451, 12),
- (13452, 12),
- (13453, 12),
- (13454, 12),
- (13455, 12),
- (13456, 12),
- (13457, 12),
- (13458, 12),
- (13459, 12),
- (13460, 12),
- (13461, 12),
- (13462, 12),
- (13463, 12),
- (13464, 12),
- (13465, 12),
- (13466, 12),
- (13467, 12),
- (13468, 12),
- (13469, 12),
- (13470, 12),
- (13471, 12),
- (13472, 12),
- (13473, 12),
- (13474, 12),
- (13485, 1),
- (13486, 1),
- (13487, 1),
- (13488, 1),
- (13489, 1),
- (13490, 1),
- (13491, 1),
- (13492, 1),
- (13493, 1),
- (13494, 1),
- (13495, 1),
- (13496, 1),
- (13497, 1),
- (13498, 1),
- (13499, 1),
- (13500, 1),
- (13501, 12),
- (13548, 12),
- (13966, 52);
+ (1657, 12),
+ (1658, 12),
+ (6961, 2),
+ (6962, 2),
+ (6963, 2),
+ (6964, 2),
+ (6983, 3),
+ (6984, 3),
+ (7021, 2),
+ (7022, 2),
+ (7023, 2),
+ (7024, 2),
+ (7025, 2),
+ (7042, 2),
+ (7043, 2),
+ (7045, 2),
+ (7061, 2),
+ (7062, 2),
+ (7063, 2),
+ (8149, 11),
+ (8150, 11),
+ (8311, 12),
+ (8312, 12),
+ (8322, 12),
+ (8353, 12),
+ (8354, 12),
+ (8355, 12),
+ (8356, 12),
+ (8357, 12),
+ (8358, 12),
+ (8359, 12),
+ (8360, 12),
+ (8373, 12),
+ (8409, 12),
+ (8744, 52),
+ (8746, 2),
+ (8762, 2),
+ (8763, 2),
+ (8767, 52),
+ (8768, 52),
+ (8769, 52),
+ (8788, 52),
+ (8799, 2),
+ (8803, 52),
+ (8827, 2),
+ (8828, 2),
+ (8860, 6),
+ (8861, 6),
+ (8868, 7),
+ (8897, 8),
+ (8898, 8),
+ (8899, 8),
+ (8900, 8),
+ (8901, 8),
+ (8902, 8),
+ (8903, 8),
+ (8904, 8),
+ (8971, -1),
+ (8972, -1),
+ (8973, -1),
+ (8974, -1),
+ (8975, -1),
+ (8976, -1),
+ (8979, 8),
+ (8980, 8),
+ (8981, 8),
+ (8982, 8),
+ (8983, 8),
+ (8984, 8),
+ (8993, 8),
+ (9024, 8),
+ (9025, 8),
+ (9026, 8),
+ (9027, 8),
+ (9028, 8),
+ (11131, 12),
+ (11135, 12),
+ (11219, 12),
+ (11220, 12),
+ (11242, 12),
+ (11356, 12),
+ (11357, 12),
+ (11360, 12),
+ (11361, 12),
+ (11392, 12),
+ (11401, 12),
+ (11403, 12),
+ (11404, 12),
+ (11405, 12),
+ (11435, 12),
+ (11439, 12),
+ (11440, 12),
+ (11449, 12),
+ (11450, 12),
+ (11528, 52),
+ (11558, 8),
+ (11580, 1),
+ (11581, 1),
+ (11583, 1),
+ (11584, 1),
+ (11696, 1),
+ (11732, 1),
+ (11734, 1),
+ (11735, 1),
+ (11736, 1),
+ (11737, 1),
+ (11738, 1),
+ (11739, 1),
+ (11740, 1),
+ (11741, 1),
+ (11742, 1),
+ (11743, 1),
+ (11744, 1),
+ (11745, 1),
+ (11746, 1),
+ (11747, 1),
+ (11748, 1),
+ (11749, 1),
+ (11750, 1),
+ (11751, 1),
+ (11752, 1),
+ (11753, 1),
+ (11754, 1),
+ (11755, 1),
+ (11756, 1),
+ (11757, 1),
+ (11758, 1),
+ (11759, 1),
+ (11760, 1),
+ (11761, 1),
+ (11762, 1),
+ (11763, 1),
+ (11764, 1),
+ (11765, 1),
+ (11766, 1),
+ (11767, 1),
+ (11768, 1),
+ (11769, 1),
+ (11770, 1),
+ (11771, 1),
+ (11772, 1),
+ (11773, 1),
+ (11774, 1),
+ (11775, 1),
+ (11776, 1),
+ (11777, 1),
+ (11778, 1),
+ (11779, 1),
+ (11780, 1),
+ (11781, 1),
+ (11782, 1),
+ (11783, 1),
+ (11784, 1),
+ (11785, 1),
+ (11786, 1),
+ (11787, 1),
+ (11799, 1),
+ (11800, 1),
+ (11801, 1),
+ (11802, 1),
+ (11803, 1),
+ (11804, 1),
+ (11805, 1),
+ (11806, 1),
+ (11807, 1),
+ (11808, 1),
+ (11809, 1),
+ (11810, 1),
+ (11811, 1),
+ (11812, 1),
+ (11813, 1),
+ (11814, 1),
+ (11815, 1),
+ (11816, 1),
+ (11817, 1),
+ (11818, 1),
+ (11819, 1),
+ (11820, 1),
+ (11821, 1),
+ (11822, 1),
+ (11823, 1),
+ (11824, 1),
+ (11825, 1),
+ (11826, 1),
+ (11827, 1),
+ (11828, 1),
+ (11829, 1),
+ (11830, 1),
+ (11831, 1),
+ (11832, 1),
+ (11833, 1),
+ (11834, 1),
+ (11835, 1),
+ (11836, 1),
+ (11837, 1),
+ (11838, 1),
+ (11839, 1),
+ (11840, 1),
+ (11841, 1),
+ (11842, 1),
+ (11843, 1),
+ (11844, 1),
+ (11845, 1),
+ (11846, 1),
+ (11847, 1),
+ (11848, 1),
+ (11849, 1),
+ (11850, 1),
+ (11851, 1),
+ (11852, 1),
+ (11853, 1),
+ (11854, 1),
+ (11855, 1),
+ (11856, 1),
+ (11857, 1),
+ (11858, 1),
+ (11859, 1),
+ (11860, 1),
+ (11861, 1),
+ (11862, 1),
+ (11863, 1),
+ (11937, 1),
+ (11976, 1),
+ (12133, 12),
+ (12135, 12),
+ (12139, 12),
+ (12155, 12),
+ (12286, -1),
+ (12313, 24),
+ (12331, 12),
+ (12332, 12),
+ (12333, 12),
+ (12334, 12),
+ (12335, 12),
+ (12336, 12),
+ (12337, 12),
+ (12338, 12),
+ (12339, 12),
+ (12340, 12),
+ (12341, 12),
+ (12342, 12),
+ (12343, 12),
+ (12344, 12),
+ (12345, 12),
+ (12346, 12),
+ (12347, 12),
+ (12348, 12),
+ (12349, 12),
+ (12350, 12),
+ (12351, 12),
+ (12352, 12),
+ (12353, 12),
+ (12354, 12),
+ (12355, 12),
+ (12356, 12),
+ (12357, 12),
+ (12358, 12),
+ (12359, 12),
+ (12360, 12),
+ (12361, 12),
+ (12362, 12),
+ (12363, 12),
+ (12364, 12),
+ (12365, 12),
+ (12366, 12),
+ (12367, 12),
+ (12368, 12),
+ (12369, 12),
+ (12370, 12),
+ (12371, 12),
+ (12373, 12),
+ (12374, 12),
+ (12375, 12),
+ (12376, 12),
+ (12377, 12),
+ (12378, 12),
+ (12379, 12),
+ (12380, 12),
+ (12381, 12),
+ (12382, 12),
+ (12383, 12),
+ (12384, 12),
+ (12385, 12),
+ (12386, 12),
+ (12387, 12),
+ (12388, 12),
+ (12389, 12),
+ (12390, 12),
+ (12391, 12),
+ (12392, 12),
+ (12393, 12),
+ (12394, 12),
+ (12395, 12),
+ (12396, 12),
+ (12397, 12),
+ (12398, 12),
+ (12399, 12),
+ (12400, 12),
+ (12401, 12),
+ (12402, 12),
+ (12403, 12),
+ (12404, 12),
+ (12405, 12),
+ (12406, 12),
+ (12407, 12),
+ (12408, 12),
+ (12409, 12),
+ (12410, 12),
+ (12940, 12),
+ (12941, 12),
+ (12944, 12),
+ (12945, 12),
+ (12946, 12),
+ (12947, 12),
+ (12950, 12),
+ (13203, 52),
+ (13433, 12),
+ (13434, 12),
+ (13435, 12),
+ (13436, 12),
+ (13437, 12),
+ (13438, 12),
+ (13439, 12),
+ (13440, 12),
+ (13441, 12),
+ (13442, 12),
+ (13443, 12),
+ (13444, 12),
+ (13445, 12),
+ (13446, 12),
+ (13447, 12),
+ (13448, 12),
+ (13449, 12),
+ (13450, 12),
+ (13451, 12),
+ (13452, 12),
+ (13453, 12),
+ (13454, 12),
+ (13455, 12),
+ (13456, 12),
+ (13457, 12),
+ (13458, 12),
+ (13459, 12),
+ (13460, 12),
+ (13461, 12),
+ (13462, 12),
+ (13463, 12),
+ (13464, 12),
+ (13465, 12),
+ (13466, 12),
+ (13467, 12),
+ (13468, 12),
+ (13469, 12),
+ (13470, 12),
+ (13471, 12),
+ (13472, 12),
+ (13473, 12),
+ (13474, 12),
+ (13485, 1),
+ (13486, 1),
+ (13487, 1),
+ (13488, 1),
+ (13489, 1),
+ (13490, 1),
+ (13491, 1),
+ (13492, 1),
+ (13493, 1),
+ (13494, 1),
+ (13495, 1),
+ (13496, 1),
+ (13497, 1),
+ (13498, 1),
+ (13499, 1),
+ (13500, 1),
+ (13501, 12),
+ (13548, 12),
+ (13966, 52);
diff --git a/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql b/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql
index 2ad787b36ca..f92b0392a76 100644
--- a/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql
+++ b/sql/old/3.3.5a/2012_01_04_05_world_waypoint_data.sql
@@ -355,7 +355,7 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,343.6207,-3757.014,106.9888,0,0,0,0,100,0),
(@PATH,9,318.8742,-3761.253,106.802,0,0,0,0,100,0),
(@PATH,10,312.3907,-3744.138,106.7072,0,0,0,0,100,0),
-(@PATH,11,319.9912,-3724.497,106.8615,0,0,0,0,100,0),
+(@PATH,11,319.9912,-3724.497,106.8615,0,0,0,0,100,0),
(@PATH,12,348.4052,-3720.816,105.9374,0,0,0,0,100,0),
(@PATH,13,365.8063,-3725.304,105.9001,0,0,0,0,100,0),
(@PATH,14,376.4646,-3738.252,105.2092,0,0,0,0,100,0),
diff --git a/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql b/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql
index 15b2f5dc408..aa67382e579 100644
--- a/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_01_05_01_world_gameobject.sql
@@ -1,5 +1,5 @@
-- Template updates for gameobject 186831 (Saga of the Twins)
UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=186831; -- Saga of the Twins
DELETE FROM `gameobject` WHERE `id`=186831;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
-(216,186831,571,1,1,957.1025,-5308.23,189.3529,2.600535,0,0,0.9636297,0.267241,300,100,1);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(216,186831,571,1,1,957.1025,-5308.23,189.3529,2.600535,0,0,0.9636297,0.267241,300,100,1);
diff --git a/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql b/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql
index 022c82d539d..fd0cd3406e4 100644
--- a/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/2012_01_05_02_world_gameobject_template.sql
@@ -3,5 +3,5 @@ UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=188675; -- Scar
UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=188676; -- Scarlet Onslaught Daily Orders: Abbey by sniff
UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=188677; -- Scarlet Onslaught Daily Orders: Beach by sniff
DELETE FROM `gameobject` WHERE `id`=188677;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(219,188677,571,1,1,2567.449,-388.7118,3.573463,-2.879789,0,0,-0.9914446,0.1305283,300,100,1);
diff --git a/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql b/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql
index 047c0453608..3ce642fcd2c 100644
--- a/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql
+++ b/sql/old/3.3.5a/2012_01_05_11_world_creature_onkill_reputation.sql
@@ -1,6 +1,6 @@
-- remade incorrect gain of ashen verdict reputation according to http://www.wowwiki.com/Ashen_Verdict
-- there were incorrect values for trash mobs ( before=25 for kill, must to be 15)
-- for Lich King it must to be 1500 and for Deathbound Wards and Deathspeaker High Priests 45
-UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 1500 WHERE `creature_id` IN (36597,39166,39167,39168);
+UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 1500 WHERE `creature_id` IN (36597,39166,39167,39168);
UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 45 WHERE `creature_id` IN (36829,37007);
UPDATE `creature_onkill_reputation` SET `RewOnKillRepValue1` = 15 WHERE `creature_id` IN (36619,36724,36725,36791,36805,36807,36808,36811,36880,36957,36960,36968,36982,37011,37012,37022,37029,37030,37031,37032,37033,37034,37035,37117,37125,37127,37132,37133,37134,37146,37149,37228,37229,37232,37501,37502,37531,37532,37546,37571,37595,37662,37663,37664,37665,37666,37695,37782,37886,37890,37919,37934,37949,38125,38159,38184,38369,38472,38485,38508,38711,38712);
diff --git a/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql b/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql
index c089209c16f..fdf97fda464 100644
--- a/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_06_01_world_creature_template.sql
@@ -1,2 +1,2 @@
--- spell interrupt is loaded from DBC so can be removed from mechanic_immune_mask
+-- spell interrupt is loaded from DBC so can be removed from mechanic_immune_mask
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` &~33554432;
diff --git a/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql
index 9e6dddfb949..ada306fc43e 100644
--- a/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_06_02_world_achievement_criteria_data.sql
@@ -1,5 +1,5 @@
DELETE FROM `achievement_criteria_data` WHERE criteria_id IN (5220, 5215, 5218, 5221, 5216, 5219, 5213, 5018, 5217, 5214, 5233, 5235, 5232, 5234, 5238, 5236, 5229, 5237, 5230, 5231);
-INSERT INTO `achievement_criteria_data` VALUES
+INSERT INTO `achievement_criteria_data` VALUES
-- Classes
(5220,21, 1,0,''), -- Realm First! Level 80 Warrior
(5215,21, 2,0,''), -- Realm First! Level 80 Paladin
diff --git a/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql b/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql
index e1d6cd94525..06aa7ab5687 100644
--- a/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_06_03_world_item_loot_template.sql
@@ -1,7 +1,7 @@
-- Fix Decoy! (8606) quest items drop chance from Narain's Special Kit (21042)
SET @Kit := 21042;
DELETE FROM `item_loot_template` WHERE `entry`= @Kit;
-INSERT INTO `item_loot_template` VALUES
+INSERT INTO `item_loot_template` VALUES
(@Kit, 21037, 100, 1, 0, 1, 1), -- Crude Map
(@Kit, 21039, 100, 1, 0, 1, 1), -- Narain's Turban
(@Kit, 21040, 100, 1, 0, 1, 1), -- Narain's Robe
diff --git a/sql/old/3.3.5a/2012_01_06_07_world_sai.sql b/sql/old/3.3.5a/2012_01_06_07_world_sai.sql
index 5d322367250..c78199b615a 100644
--- a/sql/old/3.3.5a/2012_01_06_07_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_06_07_world_sai.sql
@@ -1,4 +1,4 @@
--- Fix Quest 11795, 11887 'Emergency Protocol: Section 8.2, Paragraph C', 'Emergency Supplies'
+-- Fix Quest 11795, 11887 'Emergency Protocol: Section 8.2, Paragraph C', 'Emergency Supplies'
SET @NPC :=25841; -- Fizzcrank Recon Pilot
SET @Gossip :=21248;
diff --git a/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql b/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql
index fdbdfc5a689..4e12b66153e 100644
--- a/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_07_03_world_creature_template.sql
@@ -1,5 +1,5 @@
-- Set standard immunities to The Nexus bosses.
-UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|4|8|16|32|64|256|512|1024|2048|4096|8192|65536|131072|262144|524288|4194304|8388608|67108864|536870912 WHERE `entry` IN
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|4|8|16|32|64|256|512|1024|2048|4096|8192|65536|131072|262144|524288|4194304|8388608|67108864|536870912 WHERE `entry` IN
(26731,30510, -- Grand Magus Telestra
26763,30529, -- Anomalus
26794,30532, -- Ormorok the Tree-Shaper
diff --git a/sql/old/3.3.5a/2012_01_08_01_world_sai.sql b/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
index fcdc21662c0..a132a07e128 100644
--- a/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
@@ -2,19 +2,19 @@
SET @ENTRY := 17832;
SET @GOSSIPID := 7486;
SET @TEXTID := 9070;
--- Creature Gossip_menu_id Update from sniff
-UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIPID WHERE `entry`=@ENTRY;
+-- Creature Gossip_menu_id Update from sniff
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIPID WHERE `entry`=@ENTRY;
-- Gossip Menu insert from sniff
-DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIPID AND `text_id`=@TEXTID;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIPID AND `text_id`=@TEXTID;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIPID,@TEXTID);
-- Creature Gossip_menu_option Update from sniff
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIPID) AND `id` IN (0);
-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
+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
(@GOSSIPID,0,0, 'Take Blood Knight Insignia',1,1,0,0,0,0, '');
-- Gossip option Conditions
-DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIPID;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
-(15,@GOSSIPID,0,0,9,9692,0,0,0,'','Show gossip option if player has quest 9692 but not complete'),
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIPID;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIPID,0,0,9,9692,0,0,0,'','Show gossip option if player has quest 9692 but not complete'),
(15,@GOSSIPID,0,0,26,24226,1,0,0,'','Show gossip option if player does not have item 24226');
-- SAI for Blood Knight Dawnstar
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
diff --git a/sql/old/3.3.5a/2012_01_08_16_world_misc.sql b/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
index 63cd81ff869..7ac496f7edb 100644
--- a/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
@@ -54,7 +54,7 @@ WHERE `entry` IN (29281, 30809, 26668, 30810);
-- Apply Image of Arthas Visual Effect
DELETE FROM `creature_template_addon` WHERE `entry`=29280;
-INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
(29280, 0, 0, 0, 1, 0, '54134');
-- Flame Brazier triggers deletion (will spawn them after activating event 17841 called by spell Call Flames 48258)
@@ -64,7 +64,7 @@ DELETE FROM `creature_addon` WHERE `guid` IN (126121, 126122);
/* Spells */
DELETE FROM `spell_target_position` WHERE `id` IN (48267,48276, 48271, 48274, 48275);
-INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES
+INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES
(48267, 575, 296.632, -346.075, 90.5474, 4.60767), -- Svala Ritual - Player teleport position
(48276, 575, 296.651, -346.293, 108.5474, 1.58), -- Svala Ritual - Svala teleport position
(48271, 575, 296.42, -355.01, 90.94, 1.58), -- Summon Ritual Channeler positions
@@ -83,7 +83,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry
-- The Incredible Hulk achievement 2043
DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=7322;
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7322 AND `type`=11;
-INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
(7322, 11, 0, 0, 'achievement_incredible_hulk');
/* AI */
@@ -93,7 +93,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=27273; -- Flame
-- Add Send Script Event (17841) summon 3 triggers
DELETE FROM `event_scripts` WHERE `id`=17841;
-INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
+INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
(17841, 0, 10, 27273, 10000, 0, 285.6, -357.5, 91.0833, 5.75959),
(17841, 3, 10, 27273, 10000, 0, 307, -357.5, 91.0833, 6.02139),
(17841, 6, 10, 27273, 10000, 0, 285.6, -357.5, 91.0833, 5.75959);
diff --git a/sql/old/3.3.5a/2012_01_13_00_world_creature.sql b/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
index bb20ec25863..dfe531dcbc6 100644
--- a/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
@@ -1,7 +1,7 @@
-- Add missing Terokkar Triggers to db
SET @GUID :=40253;
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+12;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID+0,23102,530,1,1,0,0,-2414.89038,4436.77,163.188354,0.209439516,120,0,0,1,0,0),
(@GUID+1,23102,530,1,1,0,0,-2414.979,4458.585,165.8086,2.80998015,120,0,0,1,0,0),
(@GUID+2,23102,530,1,1,0,0,-2418.69775,4446.772,165.705322,2.18166161,120,0,0,1,0,0),
@@ -20,5 +20,5 @@ UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=231
-- Missing Go
SET @GUID :=226;
DELETE FROM `gameobject` WHERE `guid`=@GUID;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(@GUID,185863,530,1,1,-2466.60474,4700.11963,155.7146,1.81514192,0,0,0,0,120,0,1);
diff --git a/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
index 968e169ecab..5bbb77fe425 100644
--- a/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
@@ -5,14 +5,14 @@ INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (126,623);
DELETE FROM `gossip_menu` WHERE `entry`=125 AND `text_id`=624;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (125,624);
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (126,125);
-INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
(126,0,0, "You''re Astor Hadren, right?",1,1,125),
(125,0,0, "You''ve got something I need, Astor. And I''ll be taking it now.",1,1,0);
-- SAI for npc 6497 Astor Hadren
DELETE FROM `smart_scripts` WHERE `entryorguid`=6497;
-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
+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
(6497,0,0,0,62,0,100,0,125,0,0,0,2,21,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Astor Hadren - Make Hostile on Gossip Select');
-- Gossip option condition
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=126;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES
(15,126,0,0,9,14420, 'Show Gossip Option If quest The Deathstalkers(new) is Incomplete');
diff --git a/sql/old/3.3.5a/2012_01_13_02_world_sai.sql b/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
index 1a11714c5c7..7d90c649bdb 100644
--- a/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
@@ -8,7 +8,7 @@ SET @SPELL := 47978; -- Open Dun Argol Cage
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
-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
+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
(@ENTRY,0,0,0,8,0,100,0,@SPELL,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Gann - On Spellhit - Run script'),
(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,1000,1000,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Gann - Script - set run'),
(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,69,0,0,0,0,0,0,1,0,0,0,3579.263,-5125.724,167.1185,0,'Prospector Gann - Script - Moveto'),
@@ -22,7 +22,7 @@ SET @SPELL := 47978; -- Open Dun Argol Cage
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
-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
+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
(@ENTRY,0,0,0,8,0,100,0,@SPELL,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Torgan - On Spellhit - Run script'),
(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,1000,1000,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Torgan - Script - set run'),
(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,69,0,0,0,0,0,0,1,0,0,0,3467.921,-5114.096,236.9127,0,'Prospector Torgan - Script - Moveto'),
@@ -36,7 +36,7 @@ SET @SPELL := 47978; -- Open Dun Argol Cage
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
-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
+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
(@ENTRY,0,0,0,8,0,100,0,@SPELL,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Varana - On Spellhit - Run script'),
(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,1000,1000,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Varana - Script - set run'),
(@ENTRY*100,9,1,0,0,0,100,0,1000,1000,1000,1000,69,0,0,0,0,0,0,1,0,0,0,3379.451,-5100.344,326.5531,0,'Prospector Varana - Script - Moveto'),
diff --git a/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
index 98dda69bf1a..248f1adbfa4 100644
--- a/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
@@ -44,7 +44,7 @@ SET @ENTRY := 23309; -- NPC entry
SET @SPELL := 41121; -- Giving a Hand
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,62,0,100,0,8697,0,0,0,11,@SPELL,0,0,0,0,0,7,0,0,0,0,0,0,0,'Murkblood Overseer - On gossip Option select - cast spell');
-- Add item 32726 "Murkblood Escape Plans" to creature loot by Warpten
DELETE FROM `creature_loot_template` WHERE `item`=32726;
diff --git a/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql b/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
index bbe9994e897..308ec2a3691 100644
--- a/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
@@ -36,10 +36,10 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@RefC,20543,0,1,1,1,1), -- Scroll: Scepter of Beckoning
(@RefC,20544,0,1,1,1,1), -- Scroll: Scepter of Beckoning
-- Decoded Twilight Texts:
-(@RefD,20676,0,1,1,1,3),
-(@RefD,20541,0,1,1,1,3),
-(@RefD,20545,0,1,1,1,3),
-(@RefD,20679,0,1,1,1,3),
-(@RefD,20677,0,1,1,1,3),
+(@RefD,20676,0,1,1,1,3),
+(@RefD,20541,0,1,1,1,3),
+(@RefD,20545,0,1,1,1,3),
+(@RefD,20679,0,1,1,1,3),
+(@RefD,20677,0,1,1,1,3),
(@RefD,20678,0,1,1,1,3),
(@RefD,20552,0,1,1,1,3); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql b/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
index 4a5b66df7b2..c8ccaaf6d9b 100644
--- a/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
+++ b/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
@@ -1,4 +1,4 @@
--- sp_dev_reguid procedure
+-- sp_dev_reguid procedure
/*!50003 DROP PROCEDURE IF EXISTS `sp_dev_reguid` */;
DELIMITER ;;
/*!50003 CREATE*/
@@ -158,4 +158,4 @@ BEGIN
ALTER TABLE `smart_scripts` ADD PRIMARY KEY (`entryorguid`,`source_type`,`id`,`link`);
END */;;
- \ No newline at end of file
+ \ No newline at end of file
diff --git a/sql/old/3.3.5a/2012_01_19_08_world_sai.sql b/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
index 5b26998a607..1bd79302354 100644
--- a/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
@@ -16,7 +16,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
-- Add missing gossip
SET @GOSSIP := 9674;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9674 AND `id`=0;
-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
+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
(@GOSSIP,0,0,"You look safe enough... let's do this.",1,1,0,0,0,0, '');
-- [SAI] On gossip select - mount and waypoint
SET @ENTRY := 28298;
diff --git a/sql/old/3.3.5a/2012_01_21_00_world_creature.sql b/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
index b4a015380c3..00df55bca88 100644
--- a/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
@@ -1,7 +1,7 @@
-- Spawns from sniff
-SET @GUID := 40279; -- set value
+SET @GUID := 40279; -- set value
DELETE FROM `creature` WHERE `id`=27791;
-INSERT IGNORE INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
+INSERT IGNORE INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
(@GUID+0,27791,571,1,1,0,0,3653.64233,-1204.21200,102.420319,4.04458666,120,0,0),
(@GUID+1,27791,571,1,1,0,0,3673.77515,-1213.68188,102.420319,4.08126450,120,0,0),
(@GUID+2,27791,571,1,1,0,0,3674.53735,-1175.28369,102.420288,1.78801400,120,0,0),
diff --git a/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
index 4d1f4536455..f647f2c999e 100644
--- a/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
@@ -1,3 +1,3 @@
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7231;
-INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `ScriptName`) VALUES
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `ScriptName`) VALUES
(7231,11,'achievement_on_the_rocks');
diff --git a/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql b/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
index f505a86b16c..fe1d995ac9c 100644
--- a/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
@@ -1,7 +1,7 @@
DELETE FROM `script_texts` WHERE `entry` IN (-1574000,-1574001,-1574002,-1574003,-1574004);
DELETE FROM `creature_text` WHERE `entry`=23953;
-INSERT INTO `creature_text` (`entry`, `groupid`, `text`, `sound`, `emote`, `type`) VALUES
+INSERT INTO `creature_text` (`entry`, `groupid`, `text`, `sound`, `emote`, `type`) VALUES
(23953,1,'Your blood is mine!',13221,7,14),
(23953,2,'Aranal, ledel! Their fate shall be yours!',13224,0,14),
(23953,3,'Not so fast.',13222,0,14),
diff --git a/sql/old/3.3.5a/2012_01_24_00_world_misc.sql b/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
index 8703cd7aa42..e93f33dfec4 100644
--- a/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
@@ -13,6 +13,6 @@ SET @NPC_PRIEST_GRIMMIN = 36102;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN);
DELETE FROM `smart_scripts` WHERE (`entryorguid` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN) 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
+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
(@NPC_PRIESTESS_ALORAH,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_EYDIS_DARKBANE,0,0,0,0,0,0,'Priestess Alorah - Cast chain on Eydis Darkbane'),
(@NPC_PRIEST_GRIMMIN,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_FJOLA_LIGHTBANE,0,0,0,0,0,0,'Priestess Grimmin - Cast chain on Fjola Lightbane');
diff --git a/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql b/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
index 1dc2749807e..b30768ee69a 100644
--- a/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
+++ b/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
@@ -1,4 +1,4 @@
-- DB/Faction change: Add some missing items
DELETE FROM `player_factionchange_items` WHERE `alliance_id` IN (47711) AND horde_id IN (47870);
-INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES
+INSERT INTO `player_factionchange_items` (`race_A`,`alliance_id`,`commentA`,`race_H`,`horde_id`,`commentH`) VALUES
(0,47711, 'Girdle of the Nether Champion',0,47870, 'Belt of the Nether Championt');
diff --git a/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
index 3ef39fe43d2..93c61b70153 100644
--- a/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
@@ -5,7 +5,7 @@ INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lo
(28088,@ITEM,-68,1,0,1,1), -- Deathbringer Cache 25 Heroic
(28082,@ITEM,-38,1,0,1,1), -- Cache of the Dreamwalker 25 Normal
(28096,@ITEM,-68,1,0,1,1); -- Cache of the Dreamwalker 25 Heroic
--- only drop if someone is on the quest (negative ChanceOrQuestChance)
+-- only drop if someone is on the quest (negative ChanceOrQuestChance)
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`= -(ABS(`ChanceOrQuestChance`)) WHERE `item`=50274;
UPDATE `gameobject_loot_template` SET `ChanceOrQuestChance`= -(ABS(`ChanceOrQuestChance`)) WHERE `item`=50274;
diff --git a/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql b/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
index 4223835bee3..f5b141d46a6 100644
--- a/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
@@ -49,7 +49,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
-- Assign loot to the special bags
DELETE FROM `item_loot_template` WHERE `entry` IN (54516,37586);
INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
--- Loot Filled Pumpkin:
+-- Loot Filled Pumpkin:
(54516,33226,100,1,0,2,3), -- Tricky Treat
(54516,1,100,1,0,-@Ref,1), -- Referenced Specials
(54516,33808,2,1,0,1,1), -- The Horseman's Helm
diff --git a/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql b/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
index d824c35da51..d070a1083bc 100644
--- a/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
@@ -1,2 +1,2 @@
-- set correct type from sniff
-UPDATE `gameobject_template` SET `type`=33 WHERE `entry`=166872;
+UPDATE `gameobject_template` SET `type`=33 WHERE `entry`=166872;
diff --git a/sql/old/3.3.5a/2012_02_05_00_world_misc.sql b/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
index c5c4cfc43a6..3cff98dc41f 100644
--- a/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
@@ -36,7 +36,7 @@ SET @SPELL_CREDIT_VALIS := 64115;
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER) 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
+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
(@NPC_JAERAN_LOCKWOOD,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_TEXT_JERAN_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send different gossip when mounted (Requires conditions)'),
(@NPC_JAERAN_LOCKWOOD,0,1,3,62,0,100,0,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send text when option clicked'),
(@NPC_JAERAN_LOCKWOOD,0,2,3,62,0,100,0,@GOSSIP_MENU_JERAN_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send text when option clicked'),
diff --git a/sql/old/3.3.5a/2012_02_05_02_world_creature.sql b/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
index 7426b7ef8b0..84fe2cf0a31 100644
--- a/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
@@ -1,7 +1,7 @@
--- add spawn for Saragosa
-SET @GUID := 40270;
+-- add spawn for Saragosa
+SET @GUID := 40270;
DELETE FROM `creature` WHERE `id`=26231;
-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
+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
(@GUID,26231,571,1,1,0,0,3981.03687,7148.006,666.1618,1.037019,120,0,0,1,0,0,0,0,0);
-- Pathing for Saragosa Entry: 26231
diff --git a/sql/old/3.3.5a/2012_02_08_00_world_misc.sql b/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
index 40ce5629214..2ea3e0fab80 100644
--- a/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
@@ -11,7 +11,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry
(13, 0, 45114, 0, 0, 18, 1, 0, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Meal Particle - Target Players');
DELETE FROM `smart_scripts` WHERE `entryorguid`=187267 AND `source_type`=1;
-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
+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
(187267, 1, 0, 0, 60, 0, 100, 0, 3*60*1000, 3*60*1000, 0, 0, 99, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Picnic Basket - Despawn after 3 minutes');
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (1291,5787,4071);
diff --git a/sql/old/3.3.5a/2012_02_08_11_world_pool.sql b/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
index f49f5afec6a..ccae82e9689 100644
--- a/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
+++ b/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
@@ -1,4 +1,4 @@
--- Toxic Tolerance questchain for a horde specific mount requires doing
+-- Toxic Tolerance questchain for a horde specific mount requires doing
-- daily quests. However currently all of those are acceptable daily, though
-- only one (random) should be.
-- Source: http://www.wowhead.com/quest=13917/gorishi-grub#comments:id=829822
diff --git a/sql/old/3.3.5a/2012_02_08_14_world_sai.sql b/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
index 60e96a52663..4a06149b5a6 100644
--- a/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
@@ -8,6 +8,6 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionType
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
UPDATE creature_template SET AIName='SmartAI' WHERE entry=@ENTRY;
-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
+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
(@ENTRY,0,0,1,8,0,100,0,@SPELL1,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"Chemical Wagon - Spell Hit - Credit"),
(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,11,@SPELL2,2,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Chemical Wagon - Spell Hit - Cast Cosmetic - Low Poly Fire (with Sound)");
diff --git a/sql/old/3.3.5a/2012_02_08_16_world_sai.sql b/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
index 06fbb233aeb..0f739ee3fab 100644
--- a/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
@@ -2,7 +2,7 @@
SET @ENTRY := 33687;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY LIMIT 1;
-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
+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
(@ENTRY,0,0,0,0,0,100,0,10000,11000,20000,23000,11,65248,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - Combat - Cast Frost Breath"),
(@ENTRY,0,1,0,2,0,100,1,0,35,0,0,11,65260,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @35% health - Cast Wing Buffet"),
(@ENTRY,0,2,0,2,0,100,1,0,25,0,0,11,60603,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @25% health - Cast Eject Passenger 1"),
diff --git a/sql/old/3.3.5a/2012_02_11_06_world_sai.sql b/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
index 5a021bdfb3d..7b1d09e9580 100644
--- a/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
@@ -3,7 +3,7 @@ SET @NPC = 3301;
UPDATE `quest_end_scripts` SET `datalong2`=10000 WHERE `id`=231;
-- Add text for Morgan Ladimore
DELETE FROM `creature_text` WHERE `entry`=@NPC;
-INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(@NPC, 1, 0, 'My sword Archeus served me well in life, but as at last my spirit may pass from the unhappy existence, I need it no longer.', 12, 0, 100, 0, 0, 0, 'Morgan Ladimore - A Daughter''s Love'),
(@NPC, 2, 0, 'I shall cling to the love of my daugter and hope that I will find forgiveness under the Light for my sins.', 12, 0, 100, 0, 0, 0, 'Morgan Ladimore - A Daughter''s Love');
-- Add SAI to Morgan Ladimore for on spawn
diff --git a/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql b/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
index 3c49b752ee2..e3f67fac42b 100644
--- a/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
+++ b/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
@@ -46,7 +46,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
-- SmartAIs
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (23729,26471,26673,27158,29155,29158,29159,29160,29161,29162,29169);
-DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26853,26876) AND `source_type`=0 AND `id` IN (3,4); -- these npcs already had a SmartAI assigned so deleting the new ids only
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26853,26876) AND `source_type`=0 AND `id` IN (3,4); -- these npcs already had a SmartAI assigned so deleting the new ids only
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (23729,26471,26673,26924,27158,29155,29158,29159,29160,29161,29162,29169) 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
(23729,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Baron Ulrik von Stromhearth - On gossip select - Spellcast'),
diff --git a/sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql b/sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql
index 1c3d45dc490..bcd57602679 100644
--- a/sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql
+++ b/sql/old/3.3.5a/2012_02_15_01_world_areatrigger_tavern.sql
@@ -1,5 +1,5 @@
DELETE FROM `areatrigger_tavern` WHERE `id` IN (98, 4109, 4300, 4378, 4380, 4498, 4608, 5314, 5315, 5316, 5317);
-INSERT INTO `areatrigger_tavern` (`id`, `name`) VALUES
+INSERT INTO `areatrigger_tavern` (`id`, `name`) VALUES
(98, 'Nesingwary''s Expedition'),
(4109, 'Tranquillen - Upper level Inn'),
(4300, 'Cenarion Refugee - Outside Inn'),
diff --git a/sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql b/sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql
index 833d36b246c..aabde0a3085 100644
--- a/sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_02_15_03_world_quest_template.sql
@@ -1,4 +1,4 @@
--- Love is in the Air
+-- Love is in the Air
-- Quests Missing Text ... By Albis
UPDATE `quest_template` SET `RequestItemsText` ='The cologne isn''t going to give itself out, you know.$B$BGet spraying!' , `OfferRewardText` ='Nice work, $N! People will be buying Crown colognes by the crate-load now that they''ve had a chance to try them.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24635;
diff --git a/sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql b/sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql
index e7ffe54e922..046583ef0e2 100644
--- a/sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql
+++ b/sql/old/3.3.5a/2012_02_15_07_02_world_misc.sql
@@ -23,7 +23,7 @@ INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
-- Loot: Crown Chemical Co. Supplies
DELETE FROM `gameobject_loot_template` WHERE `entry`=27766;
-INSERT INTO `gameobject_loot_template` VALUES
+INSERT INTO `gameobject_loot_template` VALUES
(27766, 49867, -100, 1, 0, 1, 1); -- Crown Chemical Co. Supplies
-- GO spawns
@@ -74,7 +74,7 @@ INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`
(@OGUID+39, 201778, 1, 1, 1, 1380.96, -4429.36, 30.6772, 4.6503, 0, 0, 0.728713, -0.68482, 300, 0, 1),
(@OGUID+40, 201778, 1, 1, 1, 1383.08, -4429.42, 30.651, 4.53642, 0, 0, 0.766505, -0.642238, 300, 0, 1),
(@OGUID+41, 201778, 1, 1, 1, 1378.64, -4428.42, 30.6846, 5.23543, 0, 0, 0.500243, -0.865885, 300, 0, 1),
-(@OGUID+42, 201778, 1, 1, 1, 1377.05, -4429.39, 30.6467, 5.31397, 0, 0, 0.465863, -0.884857, 300, 0, 1);
+(@OGUID+42, 201778, 1, 1, 1, 1377.05, -4429.39, 30.6467, 5.31397, 0, 0, 0.465863, -0.884857, 300, 0, 1);
DELETE FROM `game_event_gameobject` WHERE `eventEntry`=@EVENT AND `guid` BETWEEN @OGUID AND @OGUID+42;
INSERT INTO `game_event_gameobject` (`guid`, `eventEntry`) VALUES
diff --git a/sql/old/3.3.5a/2012_02_15_08_world_sai.sql b/sql/old/3.3.5a/2012_02_15_08_world_sai.sql
index ef49ff484f3..3af2c108251 100644
--- a/sql/old/3.3.5a/2012_02_15_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_15_08_world_sai.sql
@@ -1,7 +1,7 @@
SET @Pinata := 34632;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@Pinata 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
+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
(@Pinata, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 11, 65788, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ogre Pinata - On death cast Pile of Candy'),
(@Pinata, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ogre Pinata - On reset set react state passive');
diff --git a/sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql
index 4811e5d66fe..9970d12fa72 100644
--- a/sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2012_02_15_09_world_spell_proc_event.sql
@@ -1,6 +1,6 @@
-- Corrected proc of Misery
DELETE FROM `spell_proc_event` WHERE `entry` IN (33191, 33192, 33193);
-INSERT INTO `spell_proc_event` VALUES
+INSERT INTO `spell_proc_event` VALUES
(33191, 0x00, 0x06, 0x00008000, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0, 0, 0),
(33192, 0x00, 0x06, 0x00008000, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0, 0, 0),
(33193, 0x00, 0x06, 0x00008000, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0, 0, 0);
diff --git a/sql/old/3.3.5a/2012_02_16_00_world_conditions.sql b/sql/old/3.3.5a/2012_02_16_00_world_conditions.sql
index 5bef38fc485..4634515f2cd 100644
--- a/sql/old/3.3.5a/2012_02_16_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_02_16_00_world_conditions.sql
@@ -1,7 +1,7 @@
CREATE TABLE `temp_convert_spells`
(
- `id` INT(11),
- PRIMARY KEY (`id`)
+ `id` INT(11),
+ PRIMARY KEY (`id`)
);
-- spells with EffectImplicitTarget In (6,21, 25) + spells having Targets & 1115534
@@ -12751,26 +12751,26 @@ INSERT INTO `temp_convert_spells` VALUES
(79397);
CREATE TABLE `temp_cond_vals`
(
- `spellId` INT(11),
- `elseGroup` INT(11) AUTO_INCREMENT,
- `entry` INT(11),
- `dead` INT(11),
- `errorTextId` INT(11),
- `comment` VARCHAR(255),
- PRIMARY KEY (`spellId`, `elseGroup`)
+ `spellId` INT(11),
+ `elseGroup` INT(11) AUTO_INCREMENT,
+ `entry` INT(11),
+ `dead` INT(11),
+ `errorTextId` INT(11),
+ `comment` VARCHAR(255),
+ PRIMARY KEY (`spellId`, `elseGroup`)
) ENGINE=MYISAM;
CREATE TABLE `temp_item_spell`
(
- `itemId` INT(11),
- `spellId` INT(11),
- PRIMARY KEY (`itemId`, `spellId`)
+ `itemId` INT(11),
+ `spellId` INT(11),
+ PRIMARY KEY (`itemId`, `spellId`)
);
CREATE TABLE `temp_item`
(
- `itemId` INT(11),
- PRIMARY KEY (`itemId`)
+ `itemId` INT(11),
+ PRIMARY KEY (`itemId`)
);
INSERT INTO `temp_item` SELECT DISTINCT `SourceEntry` FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18;
diff --git a/sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql b/sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql
index 1cff86f5d51..0b65ddb2d1e 100644
--- a/sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_02_17_00_world_waypoints.sql
@@ -4,7 +4,7 @@ SET @PATH :=@NPC*10;
UPDATE `creature` SET `position_x`=203.191,`position_y`=2850.286,`position_z`=160.4257,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
-DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,197.9876,2842.495,160.4257,0,0,0,100,0),
(@PATH,2,212.5493,2807.971,174.2035,0,0,0,100,0),
@@ -20,7 +20,7 @@ SET @PATH :=@NPC*10;
UPDATE `creature` SET `position_x`=210.6249,`position_y`=2809.285,`position_z`=208.7277,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
-DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,213.0469,2809.036,207.1722,0,0,0,100,0),
(@PATH,2,223.5349,2797.282,213.4777,0,0,0,100,0),
@@ -45,7 +45,7 @@ SET @PATH :=@NPC*10;
UPDATE `creature` SET `position_x`=236.1859,`position_y`=2813.747,`position_z`=200.9708,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
-DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,241.7692,2815.284,200.8042,0,0,0,100,0),
(@PATH,2,255.8273,2833.317,201.443,0,0,0,100,0),
@@ -61,7 +61,7 @@ SET @PATH :=@NPC*10;
UPDATE `creature` SET `position_x`=245.9259,`position_y`=2829.09,`position_z`=177.804,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
-DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH,1,251.6207,2841.322,177.804,0,0,0,100,0),
(@PATH,2,241.4914,2859.113,169.6652,0,0,0,100,0),
diff --git a/sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql
index 993fe3a2f38..dd2b991df7d 100644
--- a/sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_02_18_00_world_spell_script_names.sql
@@ -1,5 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` in (-100,-12162,13567,17251,23019,23448,23453,25860,28089,29200,29858,30458,30507,31225,35745,37674,39090,39093,39096,42784,43723,44875,47170,49357,50243,51582,51961,52759,52845,53808,54171,54577,55004,64385,-1464,-5308,12809,23881,-1454,-50286,8171,52041,52046,52047,52048,52049,52050,52059,52060,52061,52031,52033,52034,52035,52036,58778,58779,58780,60103,-49998,-66188,-47541,52375,59134,-62900,49560,62324,31890);
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(-100,'spell_warr_charge'),
(-12162,'spell_warr_deep_wounds'),
(13567,'spell_gen_dummy_trigger'),
diff --git a/sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql b/sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql
index b343399d7f2..638ebdd7c18 100644
--- a/sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2012_02_18_01_world_spell_dbc.sql
@@ -1,3 +1,3 @@
DELETE FROM `spell_dbc` WHERE `id`=31980;
-INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
(31980,0,0,328064,1024,4,268894208,0,0,0,0,0,0,0,1,0,0,101,0,0,14,14,0,13,0,-1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,15,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,4,0,0,0,0,1,0,0,0,1,"Righteous Defense Trigger Spell");
diff --git a/sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql
index 8fa5bc55197..1aa54740f97 100644
--- a/sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_02_18_04_world_spell_script_names.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (52059,52060,52061);
DELETE FROM `spell_script_names` WHERE `spell_id` IN (58759,58760,58761);
-INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(58759,'spell_sha_healing_stream_totem'),
(58760,'spell_sha_healing_stream_totem'),
(58761,'spell_sha_healing_stream_totem');
diff --git a/sql/old/3.3.5a/2012_02_18_06_world_gossip.sql b/sql/old/3.3.5a/2012_02_18_06_world_gossip.sql
index e3385ceb5b0..d2e9a8744db 100644
--- a/sql/old/3.3.5a/2012_02_18_06_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_02_18_06_world_gossip.sql
@@ -11,7 +11,7 @@ UPDATE `creature_template` SET `gossip_menu_id`=7563 WHERE `entry`=18074;
UPDATE `creature_template` SET `gossip_menu_id`=7592 WHERE `entry`=18200;
UPDATE `creature_template` SET `gossip_menu_id`=7579 WHERE `entry`=18180;
UPDATE `creature_template` SET `gossip_menu_id`=7607 WHERE `entry`=18218;
-UPDATE `creature_template` SET `gossip_menu_id`=7704 WHERE `entry`=18482;
+UPDATE `creature_template` SET `gossip_menu_id`=7704 WHERE `entry`=18482;
UPDATE `creature_template` SET `gossip_menu_id`=8493, `npcflag`=`npcflag`|1 WHERE `entry`=22113;
DELETE FROM `gossip_menu` WHERE `entry`=7563 AND `text_id`=9181;
diff --git a/sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql b/sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql
index 3698c461358..3c9de3743f2 100644
--- a/sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql
+++ b/sql/old/3.3.5a/2012_02_19_03_world_warden_checks.sql
@@ -13,7 +13,7 @@ CREATE TABLE `warden_checks` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-INSERT INTO `warden_checks`(`id`,`type`,`data`,`str`,`address`,`length`,`result`,`comment`) VALUES
+INSERT INTO `warden_checks`(`id`,`type`,`data`,`str`,`address`,`length`,`result`,`comment`) VALUES
(1,178,'07F223143C69271AA2A851FECF6DC883A9D3A7DBA6FE26CC','',710730,23,'',NULL),
(2,191,'C7D18F99DBC446A4B36E78B9130B6FA2E365B3D2D4199DF5','',28940,17,'',NULL),
(3,191,'AA1A8559776F873F26954F15E49E6041EDC2C3766AD87A59','',21826,11,'',NULL),
diff --git a/sql/old/3.3.5a/2012_02_20_02_world_conditons.sql b/sql/old/3.3.5a/2012_02_20_02_world_conditons.sql
index f87a95fb1c9..7fc68fc9193 100644
--- a/sql/old/3.3.5a/2012_02_20_02_world_conditons.sql
+++ b/sql/old/3.3.5a/2012_02_20_02_world_conditons.sql
@@ -169,7 +169,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(18,40176,74905,0,9,0,25444,0,0,0,'Required quest active for spellclick');
-- Below is a procedure to dynamically convert custom content to conditions table.
--- However this procedure only works for MySQL server versions >= 5.6 due to
+-- However this procedure only works for MySQL server versions >= 5.6 due to
-- a bug / missing feature in older MySQL versions.
/*
@@ -199,7 +199,7 @@ BEGIN
VALUES (18,npcEntry,spellId,1,0,aura,0,0,'Required aura for spellclick');
SET counter = counter+1;
END WHILE;
-
+
SET counter = 0;
SET recordCount = 0;
SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `aura_forbidden` !=0;
@@ -213,7 +213,7 @@ BEGIN
VALUES (18,npcEntry,spellId,1,0,aura,0,1,'Forbidden aura for spellclick');
SET counter = counter+1;
END WHILE;
-
+
SET counter = 0;
SET recordCount = 0;
SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `quest_start` !=0;
@@ -222,7 +222,7 @@ BEGIN
INTO npcEntry, spellId, quest, questStartCanActive, quest2
FROM `npc_spellclick_spells` WHERE `quest_start` !=0
LIMIT counter,1;
- IF questStartCanActive = 1 AND quest2 = 0 THEN
+ IF questStartCanActive = 1 AND quest2 = 0 THEN
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`, `ConditionTypeOrReference`,
`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
VALUES (18,npcEntry,spellId,maxElseGroupId+1,9,0,quest,0,0,'Required quest active for spellclick');
@@ -241,10 +241,10 @@ BEGIN
`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
VALUES (18,npcEntry,spellId,8,0,quest,0,0,'Required quest rewarded for spellclick');
END IF;
-
+
SET counter = counter+1;
END WHILE;
-
+
SET counter = 0;
SET recordCount = 0;
SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `quest_end` !=0;
diff --git a/sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql
index 1d05c031868..25160b97dd4 100644
--- a/sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_02_21_00_world_creature_loot_template.sql
@@ -4,10 +4,10 @@
-- Hellfire Citadel: Ramparts
SET @Lootid := 17259;
-- set all lootids to same entry (normal and heroic)
-UPDATE `creature_template` SET `lootid`=@Lootid WHERE `entry` IN
+UPDATE `creature_template` SET `lootid`=@Lootid WHERE `entry` IN
(17259,17264,17269,17270,17271,17280,17281,17309,17455,17478,17517,18048,18049,18050,18051,18052,18053,18054,18055,18057,18058,18059);
-- populate trashloot table
-DELETE FROM `creature_loot_template` WHERE `entry` IN
+DELETE FROM `creature_loot_template` WHERE `entry` IN
(17259,17264,17269,17270,17271,17280,17281,17309,17455,17478,17517,18048,18049,18050,18051,18052,18053,18054,18055,18057,18058,18059);
DELETE FROM `creature_loot_template` WHERE `entry`=@Lootid;
INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
diff --git a/sql/old/3.3.5a/2012_02_21_01_world_conditions.sql b/sql/old/3.3.5a/2012_02_21_01_world_conditions.sql
index 95c32703ea4..deeec299744 100644
--- a/sql/old/3.3.5a/2012_02_21_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_02_21_01_world_conditions.sql
@@ -1,9 +1,9 @@
CREATE TABLE `temp_convert_spells`
(
- `id` INT(11),
- `effMask` INT(11),
- `onlyPlayers` TINYINT(3),
- PRIMARY KEY (`id`)
+ `id` INT(11),
+ `effMask` INT(11),
+ `onlyPlayers` TINYINT(3),
+ PRIMARY KEY (`id`)
);
INSERT INTO `temp_convert_spells` VALUES
@@ -3554,12 +3554,12 @@ UPDATE `conditions` SET `SourceGroup` = (SELECT `effMask` FROM `temp_convert_spe
CREATE TABLE `temp_cond_vals`
(
- `sourceGroup` INT(11),
- `sourceEntry` INT(11),
- `conditionValue1` INT(11),
- `conditionValue2` INT(11),
- `elseGroup` INT(11) AUTO_INCREMENT,
- PRIMARY KEY (`sourceGroup`, `sourceEntry`, `elseGroup`)
+ `sourceGroup` INT(11),
+ `sourceEntry` INT(11),
+ `conditionValue1` INT(11),
+ `conditionValue2` INT(11),
+ `elseGroup` INT(11) AUTO_INCREMENT,
+ PRIMARY KEY (`sourceGroup`, `sourceEntry`, `elseGroup`)
) ENGINE=MYISAM;
INSERT INTO `temp_cond_vals` (`sourceGroup`, `sourceEntry`, `conditionValue1`, `conditionValue2`) SELECT `SourceGroup`, `SourceEntry`, `ConditionValue1`, `ConditionValue2` FROM `conditions` WHERE `ConditionTypeOrReference` = 18;
diff --git a/sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql b/sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql
index a59d330c6a3..77b8ee0f819 100644
--- a/sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql
+++ b/sql/old/3.3.5a/2012_02_21_06_world_Gossip.sql
@@ -132,7 +132,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(15,7692,0,0,1,8,10005,0,0,0,0,'','Show gossip option if player has rewarded quest 10005');
-- Gossip Update from Malcrom
-DELETE FROM `gossip_menu` WHERE `entry` IN (1042,1043,1044,1045,1046,1047,1048,1049,1050,1052,1053);
+DELETE FROM `gossip_menu` WHERE `entry` IN (1042,1043,1044,1045,1046,1047,1048,1049,1050,1052,1053);
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
(1042,1635),(1043,1640),(1044,1644),(1045,1643),(1045,1753),
(1046,1648),(1047,1754),(1048,1650),(1049,1755),
diff --git a/sql/old/3.3.5a/2012_02_25_02_world_sai.sql b/sql/old/3.3.5a/2012_02_25_02_world_sai.sql
index e2ff99534b4..3af5ac583ff 100644
--- a/sql/old/3.3.5a/2012_02_25_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_02_25_02_world_sai.sql
@@ -1,4 +1,4 @@
--- Fix for Quest: 12843 "They Took Our Men!"
+-- Fix for Quest: 12843 "They Took Our Men!"
-- SAI for Rusty Cage
SET @ENTRY=191544;
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI',`ScriptName`='' WHERE `entry`=@ENTRY;
diff --git a/sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql
index 7bb38d5f2e0..eb599e2cf2d 100644
--- a/sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_02_26_01_world_spell_script_names.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (48018, 48020);
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
-(48018,'spell_warl_demonic_circle_summon'),
+(48018,'spell_warl_demonic_circle_summon'),
(48020,'spell_warl_demonic_circle_teleport');
diff --git a/sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql b/sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql
index 9c07709246f..38ba3e5c719 100644
--- a/sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql
+++ b/sql/old/3.3.5a/2012_02_28_00_world_wintergrasp_spawns.sql
@@ -212,8 +212,8 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
SET @OGUID := 75939;
DELETE FROM `gameobject` WHERE `id` IN (192254,192255,192269,192284,192285,192286,192287,192292,192299,192304,192305,192306,192307,192308,192309,192310,192312,192313,192314,192316,192317,192318,192319,192320,192321,
192322,192323,192324,192325,192326,192327,192328,192329,192330,192331,192332,192333,192334,192335,192336,192338,192339,192349,192350,192351,192352,192353,192354,192355,192356,
- 192357,192358,192359,192360,192361,192362,192363,192364,192366,192367,192368,192369,192370,192371,192372,192373,192374,192375,192376,192377,192378,192379,192487,192488,192501,
- 192502);
+ 192357,192358,192359,192360,192361,192362,192363,192364,192366,192367,192368,192369,192370,192371,192372,192373,192374,192375,192376,192377,192378,192379,192487,192488,192501,
+ 192502);
DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+115;
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
-- Fortress Banners "Alliance"
diff --git a/sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql b/sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql
index 34eb1261ed1..689be859a65 100644
--- a/sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql
+++ b/sql/old/3.3.5a/2012_02_29_00_world_conditions_misc.sql
@@ -78,9 +78,9 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(18,28161,39996,2,9,0,12702,0,0,0,'Required quest active for spellclick'),
(18,28161,51037,0,8,0,12532,0,0,1,'Forbidden rewarded quest for spellclick'),
(18,28161,51037,0,8,0,12702,0,0,1,'Forbidden rewarded quest for spellclick'),
-(18,28161,51037,1,9,0,12532,0,0,0,'Required quest active for spellclick'),
+(18,28161,51037,1,9,0,12532,0,0,0,'Required quest active for spellclick'),
(18,28161,51037,2,9,0,12702,0,0,0,'Required quest active for spellclick'),
-(18,28161,51961,0,8,0,12532,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,51961,0,8,0,12532,0,0,1,'Forbidden rewarded quest for spellclick'),
(18,28161,51961,0,8,0,12702,0,0,1,'Forbidden rewarded quest for spellclick'),
(18,28161,51961,1,9,0,12532,0,0,0,'Required quest active for spellclick'),
(18,28161,51961,2,9,0,12702,0,0,0,'Required quest active for spellclick'),
diff --git a/sql/old/3.3.5a/2012_03_10_00_world_creature.sql b/sql/old/3.3.5a/2012_03_10_00_world_creature.sql
index a0143af73c7..9beb1827ade 100644
--- a/sql/old/3.3.5a/2012_03_10_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_03_10_00_world_creature.sql
@@ -1,7 +1,7 @@
-- Add some missing guids
SET @GUID := 42153;
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+4;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,32666,530,1,1,0,0,9830.201,-7389.711,13.68803,5.532694,120,0,0,1,0,0),
(@GUID+1,32667,530,1,1,0,0,9859.044,-7406.975,13.7113,1.658063,120,0,0,1,0,0),
(@GUID+2,31144,530,1,1,0,0,9869.401,-7389.657,13.69022,3.90953755,120,0,0,1,0,0),
diff --git a/sql/old/3.3.5a/2012_03_11_00_world_sai.sql b/sql/old/3.3.5a/2012_03_11_00_world_sai.sql
index a8cab265ac0..107a79ba7fb 100644
--- a/sql/old/3.3.5a/2012_03_11_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_03_11_00_world_sai.sql
@@ -1,7 +1,7 @@
-- Coilfang Guardian
DELETE FROM `smart_scripts` WHERE `entryorguid`=21873 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
+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
(21873, 0, 0, 0, 0, 0, 0, 0, 5000, 5000, 15000, 15000, 11, 28168, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - IC - Cast Arcing Smash'),
(21873, 0, 1, 0, 0, 0, 0, 0, 2000, 2000, 10000, 10000, 11, 9080, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - IC - Cast Harmstring'),
(21873, 0, 2, 0, 0, 0, 50, 0, 3000, 4000, 10000, 20000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Guardian - IC - Say 0'); -- randomly guessed timers
@@ -19,7 +19,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`
-- Coilfang Strider
DELETE FROM `smart_scripts` WHERE `entryorguid`=22056 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
+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
(22056, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 11, 38257, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - On Reset - Cast Panic Periodic'),
(22056, 0, 1, 0, 0, 0, 0, 0, 8000, 8000, 30000, 40000, 11, 38259, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Strider - IC - Cast Mind Blast');
@@ -28,7 +28,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`
-- Coilfang Elite
DELETE FROM `smart_scripts` WHERE `entryorguid`=22055 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
+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
(22055, 0, 0, 0, 0, 0, 0, 0, 5000, 5000, 15000, 20000, 11, 38260, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - IC - Cast Cleave'),
(22055, 0, 1, 0, 0, 0, 0, 0, 2000, 2000, 10000, 10000, 11, 38262, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Elite - IC - Cast Harmstring');
@@ -38,7 +38,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`
DELETE FROM `smart_scripts` WHERE `entryorguid`=11673 AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 11673*100+0 AND 11673*100+5 AND `source_type`=9;
-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
+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
(11673, 0, 0, 0, 0, 0, 0, 0, 10000, 10000, 7000, 7000, 11, 19272, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Core Hound - IC - Cast Lava Breath'),
(11673, 0, 1, 0, 0, 0, 0, 0, 4000, 4000, 6000, 6000, 11, 19319, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Core Hound - IC - Cast Vicious Bite'),
(11673, 0, 2, 0, 0, 0, 0, 0, 15000, 15000, 24000, 24000, 88, 11673*100+0, 11673*100+5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Core Hound - IC - Call random script'),
@@ -54,7 +54,7 @@ UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`
-- Shadow of Aran
DELETE FROM `smart_scripts` WHERE `entryorguid`=18254 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
+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
(18254, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 5000, 5000, 11, 29978, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Aran - IC - Cast Pyro Blast');
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=18254;
diff --git a/sql/old/3.3.5a/2012_03_20_00_world_gossip.sql b/sql/old/3.3.5a/2012_03_20_00_world_gossip.sql
index 00214d805e7..6f5c159642b 100644
--- a/sql/old/3.3.5a/2012_03_20_00_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_03_20_00_world_gossip.sql
@@ -1,13 +1,13 @@
-- Creature Gossip_menu_id Update from sniff
-UPDATE `creature_template` SET `gossip_menu_id`=9052 WHERE `entry`=24965; -- Vindicator Xayann
-UPDATE `creature_template` SET `gossip_menu_id`=9050 WHERE `entry`=24975; -- Mar'nah
-UPDATE `creature_template` SET `gossip_menu_id`=9126 WHERE `entry`=25032; -- Eldara Dawnrunner
-UPDATE `creature_template` SET `gossip_menu_id`=9087 WHERE `entry`=25046; -- Smith Hauthaa
-UPDATE `creature_template` SET `gossip_menu_id`=9064 WHERE `entry`=25057; -- Battlemage Arynna
-UPDATE `creature_template` SET `gossip_menu_id`=9062, `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=25059; -- Ayren Cloudbreaker
-UPDATE `creature_template` SET `gossip_menu_id`=9063 WHERE `entry`=25061; -- Harbinger Inuuro
-UPDATE `creature_template` SET `gossip_menu_id`=9127 WHERE `entry`=25069; -- Magister Ilastar
-UPDATE `creature_template` SET `gossip_menu_id`=9115 WHERE `entry`=25112; -- Anchorite Ayuri
+UPDATE `creature_template` SET `gossip_menu_id`=9052 WHERE `entry`=24965; -- Vindicator Xayann
+UPDATE `creature_template` SET `gossip_menu_id`=9050 WHERE `entry`=24975; -- Mar'nah
+UPDATE `creature_template` SET `gossip_menu_id`=9126 WHERE `entry`=25032; -- Eldara Dawnrunner
+UPDATE `creature_template` SET `gossip_menu_id`=9087 WHERE `entry`=25046; -- Smith Hauthaa
+UPDATE `creature_template` SET `gossip_menu_id`=9064 WHERE `entry`=25057; -- Battlemage Arynna
+UPDATE `creature_template` SET `gossip_menu_id`=9062, `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=25059; -- Ayren Cloudbreaker
+UPDATE `creature_template` SET `gossip_menu_id`=9063 WHERE `entry`=25061; -- Harbinger Inuuro
+UPDATE `creature_template` SET `gossip_menu_id`=9127 WHERE `entry`=25069; -- Magister Ilastar
+UPDATE `creature_template` SET `gossip_menu_id`=9115 WHERE `entry`=25112; -- Anchorite Ayuri
UPDATE `creature_template` SET `gossip_menu_id`=9105 WHERE `entry`=25169; -- Archmage Ne'thul
UPDATE `creature_template` SET `gossip_menu_id`=9286 WHERE `entry`=25632; -- Vindicator Moorba
UPDATE `creature_template` SET `gossip_menu_id`=9285 WHERE `entry`=25638; -- Captain Selana
@@ -56,13 +56,13 @@ DELETE FROM `gossip_menu_option` WHERE `menu_id`=9062 AND `id` IN (0,1);
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9286 AND `id`=2;
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
(9050,0,1,'Let me browse your goods.',3,128,0,0,0,0,''),
-(9062,0,0,'Speaking of action, I''ve been ordered to undertake an air strike.',1,1,0,0,0,0,''),
+(9062,0,0,'Speaking of action, I''ve been ordered to undertake an air strike.',1,1,0,0,0,0,''),
(9062,1,0,'I need to intercept the Dawnblade reinforcements.',1,1,0,0,0,0,''),
(9087,0,1,'Let me browse your goods.',3,128,0,0,0,0,''),
(9126,0,1,'Let me browse your goods.',3,128,0,0,0,0,''),
(9198,0,1,'Let me browse your goods.',3,128,0,0,0,0,''),
(9285,0,0,'Give me a situation report, Captain.',1,1,9287,0,0,0,''),
-(9286,2,0,'What is the current state of the Sunwell''s Gates?',1,1,9293,0,0,0,''),
+(9286,2,0,'What is the current state of the Sunwell''s Gates?',1,1,9293,0,0,0,''),
(9287,0,0,'What went wrong?',1,1,9288,0,0,0,''),
(9288,0,0,'Why did they stop?',1,1,9289,0,0,0,''),
(9289,0,0,'Your insight is appreciated.',1,1,9290,0,0,0,'');
diff --git a/sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql
index 078c48a47b7..8bd438c1aec 100644
--- a/sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_03_24_01_world_creature_loot_template.sql
@@ -1,5 +1,5 @@
-- -----------------------------------
--- -- Loot for The Siege of Ulduar --
+-- -- Loot for The Siege of Ulduar --
-- -----------------------------------
-- Old Cleanups:
@@ -122,7 +122,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@Razor25Ref,45150,0,1,1,1,1), -- Collar of the Wyrmhunter
(@Razor25Ref,45151,0,1,1,1,1), -- Belt of the Fallen Wyrm
(@Razor25Ref,45510,0,1,1,1,1), -- Libram of Discord
-
+
-- XT-002 Deconstructor 10man
(@XT002_10Ref,45675,0,1,1,1,1), -- Power Enchancing Loop
(@XT002_10Ref,45676,0,1,1,1,1), -- Chestplate of Vicious Potency
@@ -156,7 +156,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@XT002_25Ref,45259,0,1,1,1,1), -- Quartz-studded Harness
(@XT002_25Ref,45255,0,1,1,1,1); -- Thunderfall Totem
-- -----------------------------------------------------------------------------------------------
--- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES --
+-- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES --
-- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES --
-- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES -- -- END OF REFERENCES --
-- -----------------------------------------------------------------------------------------------
@@ -177,7 +177,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
DELETE FROM `creature_loot_template` WHERE `entry` IN (@FlameLevi10,@FlameLevi25,@IgnisFM10,@IgnisFM25,@Razorscale10,@Razorscale25,@XT002_10,@XT002_25);
INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- ---------------------------
--- -- Flame Levithian 10man --
+-- -- Flame Levithian 10man --
-- ---------------------------
(@FlameLevi10,1,100,1,0,-@EmblemRef,1), -- 1x emblem
(@FlameLevi10,2,100,1,0,-@Flame10Ref,2), -- 2 from 10man reference
@@ -200,14 +200,14 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
(@FlameLevi10,45300,0,16,1,1,1), -- Mantle of Fiery Vengeance
(@FlameLevi10,45297,0,16,1,1,1), -- Shimmering Seal
-- Shared Loot over the modes (masked)
--- Non-Normal (Modes 2|4|8|16)
-(@FlameLevi10,11,5,30,0,-34154,1), -- 1 from recepies (chanced)
+-- Non-Normal (Modes 2|4|8|16)
+(@FlameLevi10,11,5,30,0,-34154,1), -- 1 from recepies (chanced)
-- More then 1 tower up (Modes 4|8|16)
(@FlameLevi10,@Orb,100,28,0,1,3), -- Runed Orb (1-3)
-- More then 2 towers up (Modes 8|16)
(@FlameLevi10,12,100,24,0,-34154,1), -- 1 from recepies
-- ---------------------------
--- -- Flame Levithian 25man --
+-- -- Flame Levithian 25man --
-- ---------------------------
(@FlameLevi25,1,100,1,0,-@EmblemRef,1), -- 1x emblem
(@FlameLevi25,2,100,1,0,-@Flame25Ref,3), -- 3 from 25man reference
@@ -235,7 +235,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- All Modes (1|2|4|8|16):
(@FlameLevi25,11,5,31,0,-@OrbRef,1), -- Runed Orb (1x Chanced)
(@FlameLevi25,45038,8,1,0,1,1), -- Fragment of Val'anyr (quest only!?)
-(@FlameLevi25,12,5,31,0,-34154,1), -- 1 from recepies (chanced)
+(@FlameLevi25,12,5,31,0,-34154,1), -- 1 from recepies (chanced)
-- More then 1 tower up (Modes 4|8|16)
(@FlameLevi25,13,100,28,0,-@OrbRef,2), -- Runed Orb (2x garanteed)
-- More then 2 towers up (Modes 8|16)
@@ -269,7 +269,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- -------------------------
-- X002 Deconstructor 10man (and hardmode)
(@XT002_10,1,100,3,0,-@XT002_10Ref,2), -- 2items from Ref loot
-(@XT002_10,@Emblem,100,3,0,1,1), -- 1x Emblem
+(@XT002_10,@Emblem,100,3,0,1,1), -- 1x Emblem
-- Hard mode 10man only:
(@XT002_10,45442,0,2,1,1,1), -- Sorthalis,Hammer of the Watchers
(@XT002_10,45443,0,2,1,1,1), -- Charm of Meticulous Timing
diff --git a/sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql
index 0a5c90f798f..8b885c3c5f0 100644
--- a/sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_03_26_01_world_spell_script_names.sql
@@ -1,4 +1,4 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (34477, 35079);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
-(34477,'spell_hun_misdirection'),
+(34477,'spell_hun_misdirection'),
(35079,'spell_hun_misdirection_proc');
diff --git a/sql/old/3.3.5a/2012_03_27_00_world_misc.sql b/sql/old/3.3.5a/2012_03_27_00_world_misc.sql
index 132c91b81d7..e7cdb15a240 100644
--- a/sql/old/3.3.5a/2012_03_27_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_03_27_00_world_misc.sql
@@ -45,5 +45,5 @@ ALTER TABLE `creature_transport` CHANGE `guid` `guid` int(11) NOT NULL AUTO_INCR
ALTER TABLE `creature_transport` CHANGE `transport_entry` `transport_entry` int(11) NOT NULL COMMENT 'Transport entry';
ALTER TABLE `creature_transport` CHANGE `npc_entry` `npc_entry` int(11) NOT NULL COMMENT 'NPC entry';
ALTER TABLE `creature_transport` CHANGE `emote` `emote` int(11) NOT NULL;
-ALTER TABLE `db_script_string` CHANGE `entry` `entry` int(10) unsigned NOT NULL DEFAULT '0';
+ALTER TABLE `db_script_string` CHANGE `entry` `entry` int(10) unsigned NOT NULL DEFAULT '0';
\ No newline at end of file
diff --git a/sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql b/sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql
index 3ec709d76c1..263af0eb549 100644
--- a/sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_03_30_00_world_smart_scripts.sql
@@ -1,7 +1,7 @@
-- revised from Unholys original works
-- quest 12702 chicken party!
-- quest 12532 flown the coop!
---
+--
SET @ENTRY := 28161; -- the chicken
SET @PARTY := 12702; -- chicken party quest
SET @COOP := 12532; -- flown the coop quest
@@ -9,7 +9,7 @@ SET @LIFE := 900000; -- minutes
-- set up required spells for the spells to work as they should
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@ENTRY;
-INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES
+INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES
(@ENTRY,39996,1,0), -- cover spell (dummy)
(@ENTRY,51037,2,0); -- creates item in players back pack
@@ -29,7 +29,7 @@ DELETE FROM `quest_start_scripts` WHERE `id` IN (@PARTY,@COOP);
-- start script for quest chicken party (they do not all spawn at same time)
UPDATE `quest_template` SET `StartScript`=@PARTY WHERE `id`=@PARTY; -- 12072
-INSERT INTO `quest_start_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+INSERT INTO `quest_start_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(@PARTY,1,10,@ENTRY,@LIFE, 0,5251.09,4413.76,-96.086,4.8714),
(@PARTY,2,10,@ENTRY,@LIFE, 0,5251.22,4419.74,-95.8995,3.58335),
(@PARTY,23,10,@ENTRY,@LIFE, 0,5257.58,4421.77,-95.9072,2.62124),
@@ -63,7 +63,7 @@ INSERT INTO `quest_start_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`
-- start script for quest flown the coop (they do not all spawn at same time)
UPDATE `quest_template` SET `StartScript`=@COOP WHERE `id`=@COOP; -- 12532
-INSERT INTO `quest_start_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+INSERT INTO `quest_start_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(@COOP,23,10,@ENTRY,@LIFE,0, 5257.58,4421.77,-95.9072,2.62124),
(@COOP,4,10,@ENTRY,@LIFE,0, 5255.97,4420.37,-95.9999,0.0451326),
(@COOP,5,10,@ENTRY,@LIFE,0, 5256.78,4420.63,-95.9957,0.320021),
diff --git a/sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql
index a817cdccf50..56885eb6b0f 100644
--- a/sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_03_31_00_world_creature_loot_template.sql
@@ -114,7 +114,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@Auriaya25Ref,45436,0,1,1,1,1); -- Libram of the Resolute
-- ---------------------------
--- -- ASSIGN CREATURE LOOTS --
+-- -- ASSIGN CREATURE LOOTS --
-- ---------------------------
UPDATE `creature_template` SET `lootid`=`entry` WHERE `entry` IN (@Brundir10,@Molgeim10,@Steelbreaker10,@Brundir25,@Molgeim25,@Steelbreaker25,@Auriaya10,@Auriaya25);
DELETE FROM `creature_loot_template` WHERE `entry` IN (@Brundir10,@Molgeim10,@Steelbreaker10,@Brundir25,@Molgeim25,@Steelbreaker25);
@@ -132,7 +132,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
(@Steelbreaker10,1,100,1,0,-@Assembly10Ref,2), -- 2 items from reference loot
(@Steelbreaker10,47241,100,1,0,2,2), -- 2 Emblem of Triumph
(@Steelbreaker10,45087,75,1,0,1,1), -- Runed Orb
-(@Steelbreaker10,45506,100,1,0,1,1), -- Archivum Data Disc for Quest
+(@Steelbreaker10,45506,100,1,0,1,1), -- Archivum Data Disc for Quest
(@Steelbreaker10,25455,0,1,1,1,1), -- Belt fo the Crystal Tree
(@Steelbreaker10,45447,0,1,1,1,1), -- Watchful Eye of Fate
(@Steelbreaker10,45456,0,1,1,1,1), -- Loop of the Agile
diff --git a/sql/old/3.3.5a/2012_04_01_00_world_creature.sql b/sql/old/3.3.5a/2012_04_01_00_world_creature.sql
index f6a42a6ef08..46af7db5dc7 100644
--- a/sql/old/3.3.5a/2012_04_01_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_04_01_00_world_creature.sql
@@ -1,6 +1,6 @@
-- Add missing spawns to db
DELETE FROM `creature` WHERE `guid` IN (4764,28648,40266,40267,40470,40471,40510,40516,40517,40518,40601,40602,40603,41320);
-INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `curhealth`) VALUES
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `curhealth`) VALUES
(4764,33608,530,1,1,-2263.63,5559.49,67.0918,5.91667,180,0,9156), -- Alchemy
(28648,33609,530,1,1,-2262.64,5561.96,67.0948,5.89921,180,0,9156), -- Blacksmithing
(40266,33610,530,1,1,-2261.59,5564.54,67.095,5.93412,180,0,9156), -- Enchanting
diff --git a/sql/old/3.3.5a/2012_04_01_01_world_creature.sql b/sql/old/3.3.5a/2012_04_01_01_world_creature.sql
index f6dff34cfa9..3755eb6e6be 100644
--- a/sql/old/3.3.5a/2012_04_01_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_04_01_01_world_creature.sql
@@ -9,7 +9,7 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
-- Add missing spawns to db (trainers)
DELETE FROM `creature` WHERE `guid` IN (40266,40510,40516,40517,40518,40601,40602,40603,41320,41674,41723,41775,41779,41780);
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`curhealth`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`curhealth`) VALUES
(40266,33608,530,1,1,-2263.63,5559.49,67.0918,5.91667,180,0,1), -- Alchemy
(40510,33609,530,1,1,-2262.64,5561.96,67.0948,5.89921,180,0,1), -- Blacksmithing
(40516,33610,530,1,1,-2261.59,5564.54,67.095,5.93412,180,0,1), -- Enchanting
diff --git a/sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql b/sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql
index d42afd1d955..4f2488d1c18 100644
--- a/sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql
+++ b/sql/old/3.3.5a/2012_04_01_02_world_spell_group_stack_rules.sql
@@ -5,5 +5,5 @@ INSERT INTO `spell_group`(`id`,`spell_id`) VALUES
(@GROUP,25894), -- Greater Blessing of Wisdom
(@GROUP,5677); -- Mana Spring (cast by Mana Spring Totem)
DELETE FROM `spell_group_stack_rules` WHERE `group_id`=@GROUP;
-INSERT INTO `spell_group_stack_rules`(`group_id`,`stack_rule`) VALUES
+INSERT INTO `spell_group_stack_rules`(`group_id`,`stack_rule`) VALUES
(@GROUP,3); -- Make them SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT
diff --git a/sql/old/3.3.5a/2012_04_01_03_world_trainers.sql b/sql/old/3.3.5a/2012_04_01_03_world_trainers.sql
index 1edc9ae09af..343b68c4b61 100644
--- a/sql/old/3.3.5a/2012_04_01_03_world_trainers.sql
+++ b/sql/old/3.3.5a/2012_04_01_03_world_trainers.sql
@@ -38,7 +38,7 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
-- Trainer spells
DELETE FROM `npc_trainer` WHERE `entry` IN (33608,33609,33610,33611,33612,33613,33614,33616,33618,33617,33619,33621,33615,33623);
-INSERT INTO `npc_trainer` (`entry`, `spell`, `spellcost`, `reqskill`, `reqskillvalue`, `reqlevel`) VALUES
+INSERT INTO `npc_trainer` (`entry`, `spell`, `spellcost`, `reqskill`, `reqskillvalue`, `reqlevel`) VALUES
(33608, -201001, 0, 0, 0, 0), -- Alchemy
(33608, -201002, 0, 0, 0, 0), -- Alchemy
(33608, -201003, 0, 0, 0, 0), -- Alchemy
diff --git a/sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql
index 43f6760e8d6..222fb42ea60 100644
--- a/sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_04_05_00_world_spell_script_names.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_script_names` WHERE `spell_id` in (7384,7887,11584,11585);
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
-(7384, 'spell_warr_overpower'),
-(7887, 'spell_warr_overpower'),
-(11584, 'spell_warr_overpower'),
-(11585, 'spell_warr_overpower');
+(7384, 'spell_warr_overpower'),
+(7887, 'spell_warr_overpower'),
+(11584, 'spell_warr_overpower'),
+(11585, 'spell_warr_overpower');
diff --git a/sql/old/3.3.5a/2012_04_13_01_world_misc.sql b/sql/old/3.3.5a/2012_04_13_01_world_misc.sql
index e4d04449a3f..9de05732570 100644
--- a/sql/old/3.3.5a/2012_04_13_01_world_misc.sql
+++ b/sql/old/3.3.5a/2012_04_13_01_world_misc.sql
@@ -6,7 +6,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry
(17, 0, 74222, 3, 31, 3, 6119, 0, 63, '', 'Gnomish Playback Device on Tog Rustsprocket');
-- fix revenge ap coeff -- by ric101 closes #3344
-UPDATE `spell_bonus_data` SET `ap_bonus` = 0.310 WHERE `entry` = 6572;
+UPDATE `spell_bonus_data` SET `ap_bonus` = 0.310 WHERE `entry` = 6572;
-- fix life seed sp coeff -- by warpten closes #4162
DELETE FROM `spell_bonus_data` WHERE `entry`=48503;
@@ -28,7 +28,7 @@ UPDATE `gameobject` SET `guid` = 10714 WHERE `guid` = 61895 AND `id` = 2157;
-- update npc texts. by helias closes #6098
DELETE FROM `npc_text` WHERE `ID` IN (10719,10782,10783,10787,10788,2838,9072,9110,10310,13293,13641,14089,15077,15155,15240,15412,15866,15873,15877,8663,8244,8254,8255,8282,8291,8296,8298,11093,3464,4776,4713,12130,13002,9984,12977,12978,10918,10999,10986,10991);
-INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`) VALUES
+INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`) VALUES
(10719, '<The chime of A"dal"s voice echoes reassuringly through your mind.>$B$BWorry not, child. Look in your pack and you will find it once more.', NULL, 0, 1, 0, 0, 0, 0, 0, 0),
(10782, 'Sayoc, da ugly orc here, teach you daggers. You want teaching in other places, you talk to Ileda in da Farstrider Square of Silvermoon or Archibald in the War Quarter of Undercity, hokay?', 'Sayoc, da ugly orc here, teach you daggers. You want teaching in other places, you talk to Ileda in da Farstrider Square of Silvermoon or Archibald in the War Quarter of Undercity, hokay?', 1, 1, 0, 0, 0, 0, 0, 0),
(10783, 'You want to punch things, yah? Talk to Sayoc right here. He teach you.', 'You want to punch things, yah? Talk to Sayoc right here. He teach you.', 1, 1, 0, 0, 0, 0, 0, 0),
@@ -133,7 +133,7 @@ UPDATE `areatrigger_teleport` SET `target_position_x`=-248.149292, `target_posit
-- Add pamphlets to mail loot by gecko32 closes #5408
DELETE FROM `mail_loot_template` WHERE `entry` BETWEEN 224 AND 233;
-INSERT INTO `mail_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+INSERT INTO `mail_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(224, 46875, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Elwynn Forest
(225, 46876, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Darnassus
(226, 46877, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Dun Morogh drawf
@@ -193,7 +193,7 @@ INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`,
(38480, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Noble
(38481, 1156, 0, 7, 0, 15, 0, 0, 0, 0); -- Spire Gargoyle
--- fix procs by warpten closes #4467 for
+-- fix procs by warpten closes #4467 for
-- Needle-Encrusted Scorpion
DELETE FROM `spell_proc_event` WHERE `entry`=71404;
INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
diff --git a/sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql
index a3dd0c39865..87539b83478 100644
--- a/sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_14_01_world_gameobject_loot_template.sql
@@ -1,6 +1,6 @@
-- Add missing gameobject_loot_templates to prevent startup errors
DELETE FROM `gameobject_loot_template` WHERE `entry` IN (3458,3459,3460,3461,15920,16841,26878,27725);
-INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(3458,4594,100,0,0,1,1), -- Rockscale Cod on Feast Fish
(3459,3771,100,0,0,1,1), -- Wild Hog Shank On Feast Boar
(3460,4538,100,0,0,1,1), -- Snapvine Watermelon on Feast Fruit
diff --git a/sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql
index 4ed922060d9..6a614857077 100644
--- a/sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_18_02_world_reference_loot_template.sql
@@ -1,13 +1,13 @@
-- ----------------------
-- -- Various Cleanups --
-- ----------------------
-DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup`=34105;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup`=34105;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup` IN (27081,27085,27073,26963,26955);
DELETE FROM `reference_loot_template` WHERE `entry` IN (12020,12021,12022,34105,34125,34126,34127,34128,34129,34130);
DELETE FROM `gameobject_loot_template` WHERE `entry`=10961; -- Bad Bogblossom fix was bad
UPDATE `gameobject_template` SET `data1`=26956 WHERE `entry`=194315;
-- -------------------------------
--- -- Variables and definitions --
+-- -- Variables and definitions --
-- -------------------------------
-- Freya 10 man
SET @Freya10k0ID := 194324; -- Freyas Gift 10man ALL elders alive
@@ -63,15 +63,15 @@ CALL `sp_get_go_lootid`(@Thorim10hID,@Thorim10h);
CALL `sp_get_go_lootid`(@Thorim25nID,@Thorim25n);
CALL `sp_get_go_lootid`(@Thorim25hID,@Thorim25h);
-- Set References
-SET @Freya10Ref := 34365;
+SET @Freya10Ref := 34365;
SET @Freya25Ref := @Freya10Ref+1;
-SET @Hodir10Ref := @Freya10Ref+2;
+SET @Hodir10Ref := @Freya10Ref+2;
SET @Hodir25Ref := @Freya10Ref+3;
SET @Mimiron10Ref := @Freya10Ref+4;
SET @Mimiron25Ref := @Freya10Ref+5;
SET @Thorim10Ref := @Freya10Ref+6;
SET @Thorim25Ref := @Freya10Ref+7;
-SET @HandToken := 12026;
+SET @HandToken := 12026;
SET @LegToken := @HandToken+1;
SET @LegsToken := @HandToken+2;
SET @ChestToken := @HandToken+3;
@@ -88,7 +88,7 @@ DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @Freya10Ref AND @Fre
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @HandToken AND @HandToken+7;
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- Freya 10 man
-(@Freya10Ref,45934,0,1,1,1,1), -- Unraveling Reach
+(@Freya10Ref,45934,0,1,1,1,1), -- Unraveling Reach
(@Freya10Ref,45935,0,1,1,1,1), -- Ironbark Faceguard
(@Freya10Ref,45941,0,1,1,1,1), -- Chestguard of the Lasher
(@Freya10Ref,45936,0,1,1,1,1), -- Legplates of Flourishing Resolve
@@ -207,8 +207,8 @@ INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lo
(@Freya10k0,45945,0,1,1,1,1), -- Seed of Budding Carnage
(@Freya10k0,45947,0,1,1,1,1), -- Serilas, Blood Blade of Invar One-Arm
(@Freya10k0,45294,0,1,1,1,1), -- Petrified Ivy Sprig
--- ------------------
--- -- Freya 25 man --
+-- ------------------
+-- -- Freya 25 man --
-- ------------------
-- Normal Mode:
(@Freya25k3,1,100,1,0,-@Freya25Ref,1), -- 1 from normal loot
@@ -259,7 +259,7 @@ INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lo
(@Freya25k0,45613,0,1,1,1,1), -- Dreambinder
(@Freya25k0,45485,0,1,1,1,1), -- Bronze Pendant of the Vanir
-- ------------------
--- -- Hodir 10 man --
+-- -- Hodir 10 man --
-- ------------------
(@Hodir10n,1,100,1,0,-@Hodir10Ref,1), -- 1x Normal Loot Item
(@Hodir10n,2,100,1,0,-@LegsToken,1), -- 1x Token
@@ -276,7 +276,7 @@ INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lo
(@Hodir10h,45876,0,1,1,1,1), -- Shiver
(@Hodir10h,45877,0,1,1,1,1), -- The Boreal Guard
-- ------------------
--- -- Hodir 25 man --
+-- -- Hodir 25 man --
-- ------------------
(@Hodir25n,1,100,1,0,-@Hodir25Ref,1), -- 1x Normal Loot Item
(@Hodir25n,2,100,1,0,-@ChestToken,1), -- 1x Token
@@ -334,7 +334,7 @@ INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lo
(@Mimiron25h,45495,0,1,1,1,1), -- Conductive Seal
(@Mimiron25h,45497,0,1,1,1,1), -- Crown of Luminescence
-- -------------------
--- -- Thorim 10 man --
+-- -- Thorim 10 man --
-- -------------------
(@Thorim10n,1,100,1,0,-@Thorim10Ref,1), -- 1x Normal Loot Item
(@Thorim10n,2,100,1,0,-@ShoulderToken,1), -- 1x Token
@@ -351,7 +351,7 @@ INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lo
(@Thorim10h,45931,0,2,1,1,1), -- Mjolnir Runestone
(@Thorim10h,45930,0,2,1,1,1), -- Combatant's Bootblade
-- -------------------
--- -- Thorim 25 man --
+-- -- Thorim 25 man --
-- -------------------
(@Thorim25n,1,100,3,0,-@Thorim25Ref,1), -- 1x Normal Loot Item
(@Thorim25n,2,100,3,0,-@HelmToken,2), -- 2x Token
diff --git a/sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql b/sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql
index e9abd40095e..a3034c05e41 100644
--- a/sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_04_19_00_world_creature_template.sql
@@ -1,7 +1,7 @@
-- update Plague Slime & Marauding Geist to naxx25 trash lootid
-UPDATE `creature_template` SET `lootid`=100005 WHERE `entry` IN(29575,30424);
+UPDATE `creature_template` SET `lootid`=100005 WHERE `entry` IN(29575,30424);
-- update Plague Slime & Marauding Geist to naxx10 trash lootid
-UPDATE `creature_template` SET `lootid`=100003 WHERE `entry` IN(16243,30083);
+UPDATE `creature_template` SET `lootid`=100003 WHERE `entry` IN(16243,30083);
DELETE FROM `creature_loot_template` WHERE `entry` IN(30424,29575,16243,30083);
-- Remove scraps for naxx10 from creature creature_loot_template
DELETE FROM `creature_loot_template` WHERE `item` IN (22373,22374,22375,22376);
diff --git a/sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql b/sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql
index 997b16ff65d..e3e81b787ec 100644
--- a/sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_19_01_world_pickpocketing_loot_template.sql
@@ -9,7 +9,7 @@ SET @CLAXREF := @GORLOCREF+6;
SET @MAGMOTHREF := @GORLOCREF+7;
-- Create reference templates
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @GORLOCREF AND @GORLOCREF+7;
-INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@GORLOCREF,29576,57,1,0,1,1), -- Shark Bait
(@GORLOCREF,29569,30,1,0,1,1), -- Strong Junkbox
(@GORLOCREF,27858,8,1,0,1,1), -- Sunspring Carp
@@ -137,7 +137,7 @@ SET @NPC52 := 25523;
-- ----------------------
UPDATE `creature_template` SET `pickpocketloot`=`entry` WHERE `entry` IN (@NPC,@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6,@NPC7,@NPC8,@NPC9,@NPC10,@NPC11,@NPC12,@NPC13,@NPC14,@NPC15,@NPC16,@NPC17,@NPC18,@NPC19,@NPC20,@NPC21,@NPC22,@NPC23,@NPC24,@NPC25,@NPC26,@NPC27,@NPC28,@NPC29,@NPC30,@NPC31,@NPC32,@NPC33,@NPC34,@NPC35,@NPC36,@NPC37,@NPC38,@NPC39,@NPC40,@NPC41,@NPC42,@NPC43,@NPC44,@NPC45,@NPC46,@NPC47,@NPC48,@NPC49,@NPC50,@NPC51,@NPC52);
DELETE FROM `pickpocketing_loot_template` WHERE `entry` IN (@NPC,@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6,@NPC7,@NPC8,@NPC9,@NPC10,@NPC11,@NPC12,@NPC13,@NPC14,@NPC15,@NPC16,@NPC17,@NPC18,@NPC19,@NPC20,@NPC21,@NPC22,@NPC23,@NPC24,@NPC25,@NPC26,@NPC27,@NPC28,@NPC29,@NPC30,@NPC31,@NPC32,@NPC33,@NPC34,@NPC35,@NPC36,@NPC37,@NPC38,@NPC39,@NPC40,@NPC41,@NPC42,@NPC43,@NPC44,@NPC45,@NPC46,@NPC47,@NPC48,@NPC49,@NPC50,@NPC51,@NPC52);
-INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- -----------------------------------------------------------------------------------------------
(@NPC,1,100,1,0,-@GORLOCREF,1), -- Gorloc ref loot template on Gorloc Gibberer
(@NPC1,1,100,1,0,-@GORLOCREF,1), -- Gorloc ref loot template on Gorloc Hunter
@@ -182,7 +182,7 @@ INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,
(@NPC35,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Kvaldir Raider
(@NPC36,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Heigarr the Horrible
(@NPC37,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Ragnar Drakkarlund
-(@NPC37,35774,-100,1,0,1,1), -- Trident of Naz'jan on Ragnar Drakkarlund
+(@NPC37,35774,-100,1,0,1,1), -- Trident of Naz'jan on Ragnar Drakkarlund
(@NPC38,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Longboatsman
(@NPC39,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Mistweaver
(@NPC40,1,100,1,0,-@KVALDIRREF,1), -- Kvaldir ref loot template on Skadir Raider
diff --git a/sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql
index 336cd61c0eb..ac49289f702 100644
--- a/sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_19_02_world_creature_loot_template.sql
@@ -1,2 +1,2 @@
-- fix DB-error on startup
-DELETE FROM `creature_loot_template` WHERE `entry` IN (34965,34980);
+DELETE FROM `creature_loot_template` WHERE `entry` IN (34965,34980);
diff --git a/sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql
index 47a22d519d0..10a4eef98d4 100644
--- a/sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_20_00_world_gameobject_loot_template.sql
@@ -1,4 +1,4 @@
-SET @Ref := 12002;
+SET @Ref := 12002;
DELETE FROM `reference_loot_template` WHERE `entry`=@Ref;
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(@Ref,47242,100,1,0,1,1);
diff --git a/sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql
index 73e01efa23e..879e6a3c0b5 100644
--- a/sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_20_04_world_creature_loot_template.sql
@@ -1,3 +1,3 @@
-- Make Grimscale Murlocs drop their heads faster...
-UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-66 WHERE `item`=21757;
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-66 WHERE `item`=21757;
diff --git a/sql/old/3.3.5a/2012_04_22_00_world_sai.sql b/sql/old/3.3.5a/2012_04_22_00_world_sai.sql
index f223883c8a7..484745f237f 100644
--- a/sql/old/3.3.5a/2012_04_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_04_22_00_world_sai.sql
@@ -5,7 +5,7 @@ SET @GOSSIP := 9832;
UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ROSS;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP AND `id`>0 AND `id`<11;
-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
+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
(@GOSSIP, 1, 0, 'I''ve lost my Blood Knight Tabard.', 1, 1, 0, 0, 0, 0, ''),
(@GOSSIP, 2, 0, 'I''ve lost my Tabard of the Hand.', 1, 1, 0, 0, 0, 0, ''),
(@GOSSIP, 3, 0, 'I''ve lost my Tabard of the Protector.', 1, 1, 0, 0, 0, 0, ''),
diff --git a/sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql b/sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql
index 6ea44d92722..007b891e3d3 100644
--- a/sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_23_02_world_prospecting_loot_template.sql
@@ -1,4 +1,4 @@
-SET @TinRef := 13000;
+SET @TinRef := 13000;
SET @TBC1 := @TinRef+1;
SET @TBC2 := @TinRef+2;
SET @WOTLK1 := @TinRef+3;
@@ -7,18 +7,18 @@ SET @WOTLK3 := @TinRef+5;
SET @Copper := 2770;
SET @Tin := 2771;
-SET @Iron := 2772;
+SET @Iron := 2772;
SET @Mithril := 3858;
SET @Thorium := 10620;
-SET @FelIron := 23424;
-SET @Adamantite := 23425;
-SET @Cobalt := 36909;
+SET @FelIron := 23424;
+SET @Adamantite := 23425;
+SET @Cobalt := 36909;
SET @Saronite := 36912;
SET @Titanium := 36910;
-- Reference Loot Templates
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @TinRef AND @TinRef+5;
-INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- Stupid Tin
(@TinRef,1529,0,1,1,1,1), -- Jade
(@TinRef,3864,0,1,1,1,1), -- Citrine
@@ -35,7 +35,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@TBC2,23437,0,1,1,1,1), -- Talasite
(@TBC2,23438,0,1,1,1,1), -- Star of Elune
(@TBC2,23439,0,1,1,1,1), -- Noble Topaz
-(@TBC2,23440,0,1,1,1,1), -- Dawnstone
+(@TBC2,23440,0,1,1,1,1), -- Dawnstone
(@TBC2,23441,0,1,1,1,1), -- Nightseye
-- WOTLK Greens
(@WOTLK1,36917,0,1,1,1,2), -- Bloodstone
@@ -61,7 +61,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
-- --------------------------------------------------------
-- Prospecting Loot Templates
DELETE FROM `prospecting_loot_template` WHERE `entry` IN (@Copper,@Tin,@Iron,@Mithril,@Thorium,@FelIron,@Adamantite,@Cobalt,@Saronite,@Titanium);
-INSERT INTO `prospecting_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+INSERT INTO `prospecting_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- Copper Ore
(@Copper,774,0,1,1,1,1), -- Malachite
(@Copper,818,0,1,1,1,1), -- Tigerseye
diff --git a/sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql
index 5ba6f24ccf8..e1c6738ffc1 100644
--- a/sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2012_04_24_04_world_spell_proc_event.sql
@@ -1,4 +1,4 @@
-- Rogue T9 2P - Should proc only from Rupture ticks.
DELETE FROM `spell_proc_event` WHERE `entry` IN(67209);
-INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `procFlags`) VALUES
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `procFlags`) VALUES
(67209, 0x01, 8, 0x100000, 0x50000);
diff --git a/sql/old/3.3.5a/2012_04_24_06_world_misc.sql b/sql/old/3.3.5a/2012_04_24_06_world_misc.sql
index 2e095a76cd9..0fe371d2de9 100644
--- a/sql/old/3.3.5a/2012_04_24_06_world_misc.sql
+++ b/sql/old/3.3.5a/2012_04_24_06_world_misc.sql
@@ -14,7 +14,7 @@ SET @ENTRY := 26096;
SET @SPELL_ARCANE_EXPLOSION := 35426;
UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gnome Soul - On Just Summoned - Quest Credit"),
(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,25814,10,1,0,0,0,0,"Gnome Soul - On Just Summoned - Set Data Fizzcrank Mechagnome"),
(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,69,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gnome Soul - On Just Summoned - Move to Summoner"),
@@ -26,6 +26,6 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
SET @ENTRY := 25814;
UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
+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
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,1,1,10000,0,0,0,0,0,0,0,0,0,0,0,0,"Fizzcrank Mechagnome - Chance Say on Aggro"),
(@ENTRY,1,0,0,38,0,100,0,1,1,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Fizzcrank Mechagnome - On Data Set - Forced Despawn");
diff --git a/sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql
index 07c53a8f7c9..a74305da8e9 100644
--- a/sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_04_28_00_world_reference_loot_template.sql
@@ -10,7 +10,7 @@ SET @Yogg10Ref := @Vezax10Ref+2;
SET @Yogg25Ref := @Vezax10Ref+3;
SET @Chest := 12034;
SET @Shoulder := 12035;
-SET @EmblemRef := 34349;
+SET @EmblemRef := 34349;
SET @Recipe := 34154;
SET @Vezax10 := 33271;
SET @Vezax25 := 33449;
@@ -109,18 +109,18 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- ----------------------------------------------------------
-- Yogg Saron
-- ----------------------------------------------------------
--- 10 man
+-- 10 man
-- All modes
(@Yogg10,1,100,31,0,-@Yogg10Ref,1), -- 1x Normal Loot item for modes 0&1&2&3&4
(@Yogg10,2,100,31,0,-@Chest,1), -- 1x Tier token for modes 0&1&2&3&4
(@Yogg10,47241,100,31,0,1,1), -- 1x Emblem of Triumph for modes 0&1&2&3&4
-- Extra for <3 watchers
-(@Yogg10,3,100,30,0,-@EmblemRef,1), -- additional Emblem for modes2&3
+(@Yogg10,3,100,30,0,-@EmblemRef,1), -- additional Emblem for modes2&3
-- Extra for <2 watchers
(@Yogg10,4,100,28,0,-34350,1), -- Runed Orb for 0&1&2
(@Yogg10,5,10,28,0,-@Recipe,1), -- Chance on Recipe for 0&1&2
-- Extra for <1 watchers
-(@Yogg10,6,100,24,0,-@EmblemRef,1), -- additional Emblem for 0&1
+(@Yogg10,6,100,24,0,-@EmblemRef,1), -- additional Emblem for 0&1
(@Yogg10,7,100,24,0,-@Recipe,1), -- Garanteed Recipe for 0&1
-- Hardmode 10 loot
(@Yogg10,46067,0,24,1,1,1), -- Hammer of Crushing Whispers
@@ -143,7 +143,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- Extra for <2 watchers
(@Yogg25,6,100,28,0,-34350,1), -- Runed Orb for 0&1&2
-- Extra for <1 watchers
-(@Yogg25,7,100,24,0,-@EmblemRef,1), -- additional Emblem for 0&1
+(@Yogg25,7,100,24,0,-@EmblemRef,1), -- additional Emblem for 0&1
(@Yogg25,8,100,24,0,-@Recipe,1), -- Garanteed Recipe for 0&1
-- Hardmode 25 loot
(@Yogg25,45533,0,24,1,1,1), -- Dark Edge of Depravity
diff --git a/sql/old/3.3.5a/2012_05_01_00_world_creature.sql b/sql/old/3.3.5a/2012_05_01_00_world_creature.sql
index c0509d0d132..56cbf385549 100644
--- a/sql/old/3.3.5a/2012_05_01_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_01_00_world_creature.sql
@@ -1,8 +1,8 @@
-- Add missing Challe & Orphan Matron Aria Spawns
SET @GUID := 41876;
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+1;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
-(@GUID,23101,530,1,1,0,0,-480.4989,7499.029,181.2889,3.560472,120,0,0,1,0,0),
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+(@GUID,23101,530,1,1,0,0,-480.4989,7499.029,181.2889,3.560472,120,0,0,1,0,0),
(@GUID+1,34365,571,1,1,0,0,5716.604,642.8611,646.2927,5.88176,120,0,0,1,0,0);
-- Add to game event creature
DELETE FROM `game_event_creature` WHERE `guid`=@GUID+1;
diff --git a/sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql b/sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql
index 6c2ea6d3a95..b808f2da47c 100644
--- a/sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql
+++ b/sql/old/3.3.5a/2012_05_03_01_world_cos_misc.sql
@@ -34,7 +34,7 @@ UPDATE `script_texts` SET `content_default` = "We're going to finish this right
UPDATE `script_texts` SET `comment` = concat(`comment`,". NEEDS VERIFICATION") WHERE `entry` IN (-1595101,-1595105);
SET @GUID := 88474;
-INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`,
+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
(@GUID+00,27737,595,3,1,25543,0,2319.89,1285.78,131.407,1.72169,60,10,0,630,0,1,0,0,0),
diff --git a/sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql b/sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql
index 62fd4415549..8455d58b325 100644
--- a/sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql
+++ b/sql/old/3.3.5a/2012_05_03_04_world_game_event_creature_quest.sql
@@ -1,4 +1,4 @@
-DELETE FROM `creature_questrelation` WHERE `id` IN (14305,14444,22817,22818,33532,33533,34365);
+DELETE FROM `creature_questrelation` WHERE `id` IN (14305,14444,22817,22818,33532,33533,34365);
DELETE FROM `game_event_creature_quest` WHERE `eventEntry`=10;
INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`,`quest`) VALUES
-- Alliance
@@ -8,7 +8,7 @@ INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`,`quest`) VALUES
(10,14305,1687), -- Human Orphan - Spooky Lighthouse
(10,14305,558), -- Human Orphan - Jaina's Autograph
(10,14305,4822), -- Human Orphan - You Scream, I Scream...
--- Horde
+-- Horde
(10,14451,172), -- Orphan Matron Battlewail - Children's Week
(10,14444,910), -- Orcish Orphan - Down at the Docks
(10,14444,911), -- Orcish Orphan - Gateway to the Frontier
@@ -50,7 +50,7 @@ INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`,`quest`) VALUES
(10,33533,13956), -- Oracle Orphan - Meeting a Great One
(10,33533,13959); -- Oracle Orphan - Back To The Orphanage
--- Removed "When I Grow Up..." and replace it with "Now, When I Grow Up..."
+-- Removed "When I Grow Up..." and replace it with "Now, When I Grow Up..."
UPDATE `quest_template` SET `prevquestid`=10945,`exclusivegroup`=-11975 WHERE `id` IN (11975,10963);
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry`=10960;
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
diff --git a/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql b/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql
index c0b2c6b147b..29285622448 100644
--- a/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_05_02_world_gameobject.sql
@@ -1,7 +1,7 @@
-- Add some missing Blood of Heroes spawns
SET @GUID := 5276;
DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+5;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(@GUID,176213,0,1,1,1529.10242,-1427.06946,65.49049,-3.001947,0,0,-0.9975634,0.06976615,7200,100,1),
(@GUID+1,176213,0,1,1,1705.87439,-4690.138,48.9742165,-3.08918333,0,0,-0.9996567,0.02620165,7200,100,1),
(@GUID+2,176213,0,1,1,1846.79382,-3825.265,135.5159,1.83259487,0,0,0.7933531,0.6087617,7200,100,1),
diff --git a/sql/old/3.3.5a/2012_05_08_00_world_sai.sql b/sql/old/3.3.5a/2012_05_08_00_world_sai.sql
index 8a776b5f2d2..7e7c8ef2c13 100644
--- a/sql/old/3.3.5a/2012_05_08_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_08_00_world_sai.sql
@@ -7,7 +7,7 @@ SET @QUEST_PLEASURES := 9483;
SET @SPELL_RETRIBUTION := 30077;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_VIERA,@ENTRY_TWINKLE);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_VIERA,@ENTRY_TWINKLE,@ENTRY_VIERA*100,@ENTRY_VIERA*100+1);
-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
+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
(@ENTRY_VIERA,0,0,0,20,0,100,0,@QUEST_PLEASURES,0,0,0,80,@ENTRY_VIERA*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Quest Finish - Run Script'),
(@ENTRY_VIERA*100,9,0,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Viera Sunwhisper - On Script - Remove Quest Flag"),
(@ENTRY_VIERA*100,9,1,0,0,0,100,0,2000,2000,0,0,53,0,@ENTRY_VIERA,0,0,0,0,1,0,0,0,0,0,0,0,'Viera Sunwhisper - On Script - Start WP 1'),
diff --git a/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql b/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql
index b83d02b4762..2cc45d27e04 100644
--- a/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_08_01_world_gameobject.sql
@@ -1,5 +1,5 @@
-- Add Missing Ice Wall, Pit of Saron
SET @GUID := 305;
DELETE FROM `gameobject` WHERE `guid`=@GUID;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(@GUID,201885,658,3,1,932.2674,-80.6684,591.6761,2.286379,0,0,0,0,300,100,1);
diff --git a/sql/old/3.3.5a/2012_05_10_00_world_sai.sql b/sql/old/3.3.5a/2012_05_10_00_world_sai.sql
index c6d6e914345..46c9926787f 100644
--- a/sql/old/3.3.5a/2012_05_10_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_10_00_world_sai.sql
@@ -27,7 +27,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
-- Essence of Warlord Jin'arrak text
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
-INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@ENTRY,0,0,"How dare you summon me without an offering!",42,0,0,0,0,0,"Essence of Warlord Jin'arrak");
-- Ganjo's Resurrection removes On The Other Side
diff --git a/sql/old/3.3.5a/2012_05_10_03_world_misc.sql b/sql/old/3.3.5a/2012_05_10_03_world_misc.sql
index 339f52ac0bb..40566b09442 100644
--- a/sql/old/3.3.5a/2012_05_10_03_world_misc.sql
+++ b/sql/old/3.3.5a/2012_05_10_03_world_misc.sql
@@ -88,7 +88,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(19,0,25249,0,2,52571,1,0,'A Change of Heart');
-- spawn farmer torp author: zxbiohazardzx closes #6256
-SET @guid := 42652;
+SET @guid := 42652;
DELETE FROM `creature` WHERE `guid`=@guid;
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`)
VALUES
@@ -99,7 +99,7 @@ UPDATE `creature_template_addon` SET `auras`='25163' WHERE `entry`=15429;
-- Mr. Chilly
-- Add aura chilly for Periodic slide
DELETE FROM `creature_template_addon` WHERE `entry`=29726;
-INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
+INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
(29726, 0, 0, 0, 0, 0, '61811');
-- Update to Change <name> to $n in page text author: gecko32 closes #5930
@@ -119,7 +119,7 @@ DELETE FROM `creature_ai_scripts` WHERE creature_id=22293;
-- fix areatrigger for wickerman camp author: boomper closes #3549
DELETE FROM `areatrigger_involvedrelation` WHERE `id` =3991;
-INSERT INTO `areatrigger_involvedrelation` (`id`, `quest`)
+INSERT INTO `areatrigger_involvedrelation` (`id`, `quest`)
VALUES (3991,1658);
-- yous have da darkrune should be daily author: kaelima closes #3457
diff --git a/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql
index b1f445faa59..ca9d74edeb8 100644
--- a/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_12_02_world_gameobject_loot_template.sql
@@ -32,6 +32,6 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
-- Assign to the chest
DELETE FROM `gameobject_loot_template` WHERE `entry` IN (27985,27993);
INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-(27985,1,100,1,0,-@RefNormal,2), -- Two from Normal Reference Loot
+(27985,1,100,1,0,-@RefNormal,2), -- Two from Normal Reference Loot
(27993,1,100,1,0,-@RefHeroic,2), -- Two from Heroic Reference Loot
(27993,43102,85,1,0,1,1); -- Frozen Orb
diff --git a/sql/old/3.3.5a/2012_05_20_00_world_misc.sql b/sql/old/3.3.5a/2012_05_20_00_world_misc.sql
index 5b96f9881d6..de79058d554 100644
--- a/sql/old/3.3.5a/2012_05_20_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_05_20_00_world_misc.sql
@@ -1,5 +1,5 @@
-- Update mod rep command name
-UPDATE `command` SET
+UPDATE `command` SET
`name` = 'modify reputation',
`help` = 'Syntax: .modify reputation #repId (#repvalue | $rankname [#delta])\nSets the selected players reputation with faction #repId to #repvalue or to $reprank.\nIf the reputation rank name is provided, the resulting reputation will be the lowest reputation for that rank plus the delta amount, if specified.\nYou can use \'.pinfo rep\' to list all known reputation ids, or use \'.lookup faction $name\' to locate a specific faction id.'
WHERE `name` = 'modify rep';
@@ -8,7 +8,7 @@ WHERE `name` = 'modify rep';
UPDATE `conditions` SET
`SourceGroup` = 1,
`SourceId` = 0
-WHERE
+WHERE
`SourceTypeOrReferenceId` = 13 AND
`SourceEntry` = 52264 AND
`ConditionTypeOrReference` = 29 AND
diff --git a/sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql
index 7603f7dd938..bd74c782534 100644
--- a/sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql
@@ -1,2 +1,2 @@
-DELETE FROM `spell_bonus_data` WHERE `entry`=633;
-INSERT INTO `spell_bonus_data` (`entry`,`comments`) VALUES (633,'Paladin - Lay on Hands');
+DELETE FROM `spell_bonus_data` WHERE `entry`=633;
+INSERT INTO `spell_bonus_data` (`entry`,`comments`) VALUES (633,'Paladin - Lay on Hands');
diff --git a/sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql
index 22ecebcae31..67716f0998e 100644
--- a/sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql
@@ -3,7 +3,7 @@ SET @epic := 25009;
SET @gem := @entry+1;
-- Create references
DELETE FROM `reference_loot_template` WHERE `entry` IN(@entry,@epic,@gem);
-INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@entry,27452,0,1,1,1,1), -- Light Scribe Bands
(@entry,27453,0,1,1,1,1), -- Averinn's RIng of Slaying
(@entry,27454,0,1,1,1,1), -- Volcanic Pauldrons
@@ -26,7 +26,7 @@ INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `
-- Assign loot to the chest
SET @GOloot := 21764; -- lootid of Reinforced Fel Iron Chest Heroic
DELETE FROM `gameobject_loot_template` WHERE `entry`=@GOloot;
-INSERT INTO `gameobject_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+INSERT INTO `gameobject_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
(@GOloot,1,100,1,0,-@entry, 2), -- one from gear
(@GOloot,2,30,1,0,-@gem,1), -- one gem (30%)
(@GOloot,3,100,1,0,-@epic,1); -- one from epics
diff --git a/sql/old/3.3.5a/2012_05_23_05_world_creature.sql b/sql/old/3.3.5a/2012_05_23_05_world_creature.sql
index bb162f927bd..e945ff4dd6c 100644
--- a/sql/old/3.3.5a/2012_05_23_05_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_23_05_world_creature.sql
@@ -1,6 +1,6 @@
-- Spawn from Sniff
DELETE FROM `creature` WHERE `id`=34526;
-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
+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
(42161,34526,1,1,1,0,0,-1050.052,-286.7274,159.1137,5.951573,120,0,0,1,0,0,0,0,0);
-- Template updates
UPDATE `creature_template` SET `faction_A`=104,`faction_H`=104,`baseattacktime`=2000,`npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|512 WHERE `entry`=34526; -- Aponi Brightmane
diff --git a/sql/old/3.3.5a/2012_05_26_00_world_scripts.sql b/sql/old/3.3.5a/2012_05_26_00_world_scripts.sql
index 18b0fa2f6b2..166d90bac8f 100644
--- a/sql/old/3.3.5a/2012_05_26_00_world_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_26_00_world_scripts.sql
@@ -9,7 +9,7 @@ UPDATE `smart_scripts` SET
`action_type` = 22,
`action_param1` = 1,
`target_type` = 1
-WHERE
+WHERE
(`entryorguid` = 11457 AND
`source_type` = 0 AND
`id` = 10 AND
diff --git a/sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql b/sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql
index 7efebc37489..31abfc2ea5a 100644
--- a/sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql
@@ -1,4 +1,4 @@
-- Fire Shield from 2.0.12 dbc
DELETE FROM `spell_dbc` WHERE `Id`=13377;
-INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `CastingTimeIndex`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieSides2`, `EffectDieSides3`, `EffectRealPointsPerLevel1`, `EffectRealPointsPerLevel2`, `EffectRealPointsPerLevel3`, `EffectBasePoints1`, `EffectBasePoints2`, `EffectBasePoints3`, `EffectMechanic1`, `EffectMechanic2`, `EffectMechanic3`, `EffectImplicitTargetA1`, `EffectImplicitTargetA2`, `EffectImplicitTargetA3`, `EffectImplicitTargetB1`, `EffectImplicitTargetB2`, `EffectImplicitTargetB3`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectRadiusIndex3`, `EffectApplyAuraName1`, `EffectApplyAuraName2`, `EffectApplyAuraName3`, `EffectAmplitude1`, `EffectAmplitude2`, `EffectAmplitude3`, `EffectMultipleValue1`, `EffectMultipleValue2`, `EffectMultipleValue3`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectMiscValue3`, `EffectMiscValueB1`, `EffectMiscValueB2`, `EffectMiscValueB3`, `EffectTriggerSpell1`, `EffectTriggerSpell2`, `EffectTriggerSpell3`, `EffectSpellClassMaskA1`, `EffectSpellClassMaskA2`, `EffectSpellClassMaskA3`, `EffectSpellClassMaskB1`, `EffectSpellClassMaskB2`, `EffectSpellClassMaskB3`, `EffectSpellClassMaskC1`, `EffectSpellClassMaskC2`, `EffectSpellClassMaskC3`, `MaxTargetLevel`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `MaxAffectedTargets`, `DmgClass`, `PreventionType`, `DmgMultiplier1`, `DmgMultiplier2`, `DmgMultiplier3`, `AreaGroupId`, `SchoolMask`, `Comment`) VALUES
+INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `CastingTimeIndex`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieSides2`, `EffectDieSides3`, `EffectRealPointsPerLevel1`, `EffectRealPointsPerLevel2`, `EffectRealPointsPerLevel3`, `EffectBasePoints1`, `EffectBasePoints2`, `EffectBasePoints3`, `EffectMechanic1`, `EffectMechanic2`, `EffectMechanic3`, `EffectImplicitTargetA1`, `EffectImplicitTargetA2`, `EffectImplicitTargetA3`, `EffectImplicitTargetB1`, `EffectImplicitTargetB2`, `EffectImplicitTargetB3`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectRadiusIndex3`, `EffectApplyAuraName1`, `EffectApplyAuraName2`, `EffectApplyAuraName3`, `EffectAmplitude1`, `EffectAmplitude2`, `EffectAmplitude3`, `EffectMultipleValue1`, `EffectMultipleValue2`, `EffectMultipleValue3`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectMiscValue3`, `EffectMiscValueB1`, `EffectMiscValueB2`, `EffectMiscValueB3`, `EffectTriggerSpell1`, `EffectTriggerSpell2`, `EffectTriggerSpell3`, `EffectSpellClassMaskA1`, `EffectSpellClassMaskA2`, `EffectSpellClassMaskA3`, `EffectSpellClassMaskB1`, `EffectSpellClassMaskB2`, `EffectSpellClassMaskB3`, `EffectSpellClassMaskC1`, `EffectSpellClassMaskC2`, `EffectSpellClassMaskC3`, `MaxTargetLevel`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `MaxAffectedTargets`, `DmgClass`, `PreventionType`, `DmgMultiplier1`, `DmgMultiplier2`, `DmgMultiplier3`, `AreaGroupId`, `SchoolMask`, `Comment`) VALUES
(13377, 1, 0, 2512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 40, 40, 21, 1, 0, -1, -1, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 3000, 0, 0, '0', '0', '0', 0, 0, 0, 0, 0, 0, 13376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 'Fire Shield');
diff --git a/sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql b/sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql
index 397a5ad517a..77fa05a4059 100644
--- a/sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql
@@ -64,7 +64,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY,0,5,0,1,0,100,2,0,8000,12000,14000,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Blackhand Veteran - OOC - emote');
-- Rage Talon Dragonspawn SAI
-SET @ENTRY := 9096; -- NPC entry
+SET @ENTRY := 9096; -- NPC entry
SET @SPELL1 := 15580; -- Strike
SET @SPELL2 := 12021; -- Fixate
SET @SPELL3 := 15572; -- Sunder Armor
diff --git a/sql/old/3.3.5a/2012_05_27_02_world_creature.sql b/sql/old/3.3.5a/2012_05_27_02_world_creature.sql
index 8ca3ee75c94..a2b5c2e26a5 100644
--- a/sql/old/3.3.5a/2012_05_27_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_27_02_world_creature.sql
@@ -1,4 +1,4 @@
-- Add Missing spawn for Queen Angerboda
-DELETE FROM `creature` WHERE `id`=24023;
+DELETE FROM `creature` WHERE `id`=24023;
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
(42162,24023,571,1,1,0,0,2855.372,-3869.662,248.6132,2.181662,150,0,0,9291,3231,0,0,0,0);
diff --git a/sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql b/sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql
index 1f7cfa3d19c..72fd4a53d37 100644
--- a/sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql
@@ -8,7 +8,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@ENTRY,0,0,1,11,0,100,0,0,0,0,0,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Reconstructed Wyrm - On spawn - cast aura'),
(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,53,0,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,'Reconstructed Wyrm - On spawn - Load Path');
-- waypoints for Reconstructed Wyrm
-DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY);
+DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY);
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
(@ENTRY,1,4685.845,1130.759,150.1177, 'Reconstructed Wyrm'),
(@ENTRY,2,4686.284,1131.658,150.1177, 'Reconstructed Wyrm'),
diff --git a/sql/old/3.3.5a/2012_05_27_06_world_creature.sql b/sql/old/3.3.5a/2012_05_27_06_world_creature.sql
index 1074465a0be..df7e2dd8d3f 100644
--- a/sql/old/3.3.5a/2012_05_27_06_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_27_06_world_creature.sql
@@ -1,13 +1,13 @@
-- Tukemuth
DELETE FROM `smart_scripts` WHERE `entryorguid`=32400;
-INSERT INTO `smart_scripts` VALUES
+INSERT INTO `smart_scripts` VALUES
(32400,0,0,0,9,0,100,0,0,5,9000,13000,11,50410,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Tukemuth - Cast Tusk Strike'),
(32400,0,1,0,0,0,100,0,9000,17000,15000,22000,11,57066,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Tukemuth - Cast Trample');
UPDATE `creature_template` SET faction_A=7,faction_H=7,mindmg=2926.0,maxdmg=3542.0,skinloot=70209,spell1=50410,spell2=57066,attackpower=3384,dmg_multiplier=1.0,AIName= 'SmartAI',mechanic_immune_mask=2147483647 where entry=32400;
-- Fumblub Gearwind
DELETE FROM `smart_scripts` WHERE `entryorguid`=32358;
-INSERT INTO `smart_scripts` VALUES
+INSERT INTO `smart_scripts` VALUES
(32358,0,0,0,0,0,100,0,4000,6000,12000,15000,11,60906,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Fumblub Gearwind - Cast Machine Gun');
UPDATE `creature_template` SET faction_A=14,faction_H=14,mindmg=2792,maxdmg=3376,spell1=60906,attackpower=3384,dmg_multiplier=1.0,AIName= 'SmartAI',mechanic_immune_mask=2147483647,type_flags=2048,InhabitType=4 where entry=32358;
UPDATE `creature_addon` SET mount=22719,bytes1=33554432 where guid=151938;
@@ -107,7 +107,7 @@ UPDATE `creature_template` SET type_flags= '1',mechanic_immune_mask=66624 WHERE
-- Zuldrak Sentinel
DELETE FROM `smart_scripts` WHERE `entryorguid`=32447;
-INSERT INTO `smart_scripts` VALUES
+INSERT INTO `smart_scripts` VALUES
(32447,0,0,0,0,0,100,0,0,5,9000,13000,11,55196,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Zuldrak Sentinel - Cast Stomp'),
(32447,0,1,0,0,0,100,0,15000,20000,21000,35000,11,54565,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Zuldrak Sentinel - Cast Whammy');
UPDATE `creature_template` SET mindmg= '3905',maxdmg= '4600',attackpower= '4252',dmg_multiplier= '1.0',mechanic_immune_mask= '66624',spell1= '54565',spell2= '55196',AIName= 'SmartAI' WHERE entry= '32447';
diff --git a/sql/old/3.3.5a/2012_05_28_05_world_creature.sql b/sql/old/3.3.5a/2012_05_28_05_world_creature.sql
index c7d4af5b494..ad42bb2bdfe 100644
--- a/sql/old/3.3.5a/2012_05_28_05_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_28_05_world_creature.sql
@@ -33,7 +33,7 @@ UPDATE `gameobject` SET `phaseMask`=64 WHERE `guid` IN (100441,100440,100438,100
-- Phase for objects in The Breach after "The last line of defense"
UPDATE `gameobject` SET `phaseMask`=129 WHERE `id` IN (192797,192798,192799,192800,192801,192802,192803,192804,192805);
-- Phase for objects in The Breach before "The last line of defense"
-UPDATE `gameobject` SET `phaseMask`=66 WHERE `id` IN (192161,192162,192166,192806,192807,192808,192809,192810,192811,192812,192813,192814,192815,192816,192817);
+UPDATE `gameobject` SET `phaseMask`=66 WHERE `id` IN (192161,192162,192166,192806,192807,192808,192809,192810,192811,192812,192813,192814,192815,192816,192817);
-- Phase for NPCs in Argent Vanguard that should be in all phases (except during "The last line of defense)
UPDATE `creature` SET `phaseMask`=131 WHERE `guid` IN (121664,124618,124483,121684,121671,121696,121668,121693,121669,121677,121697,121666,121662,121678,121670,121680,121685,121683,121665,121682,121686,121663,121695,124527,124491,124661,123618,124497,124323,124340,124332,207301,207298,207296,207297,207299,207300,124442);
-- Same as with the objects,delete duplicate creatures that have no direct interaction with a particular phase,a single creature can fulfill that role.
@@ -70,9 +70,9 @@ UPDATE `creature_template` SET `InhabitType`=7 WHERE `entry`=30482;
-- Set right faction for previously not spawned creatures
UPDATE `creature_template` SET `faction_H`=2068,`faction_A`=2068 WHERE `entry` IN (30541,30203,30543,30202,30482,30830,30831,30829,30443);
-- ----------------
--- -- Spawnfixes --
+-- -- Spawnfixes --
-- ----------------
--- Add the right mobs for each phase,they have a different id for each phase. Some mobs are only on 2 phases,not all 3 (Reanimated crusader and Gargoyles). They have the exact same points as their already spawned counterparts which belong to the final phase.
+-- Add the right mobs for each phase,they have a different id for each phase. Some mobs are only on 2 phases,not all 3 (Reanimated crusader and Gargoyles). They have the exact same points as their already spawned counterparts which belong to the final phase.
-- NOTE: The ones with a currentwaypoint set have it simply because that's the waypoint the of their already spawned counterpart. I use it simply as a guideline for me to create the paths for all these new ones and its changed back to 0 after I set the new paths with creature_addon later in this SQL.
DELETE FROM `creature` WHERE `id` IN (30596,30686,30714,30677,30443,30829,30830,30831,30203,30543,30202,30541,30482,30333,30205);
DELETE FROM `creature` WHERE `guid` BETWEEN @NEXT+83 and @NEXT+89 AND `id`=30544;
diff --git a/sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql
index c2cab663d4a..9e997314262 100644
--- a/sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql
@@ -1,4 +1,4 @@
-SET @Twins := 34329;
+SET @Twins := 34329;
SET @emblem := 49426;
DELETE FROM `reference_loot_template` WHERE `entry`=@Twins;
INSERT INTO `reference_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
diff --git a/sql/old/3.3.5a/2012_05_31_01_world_sai.sql b/sql/old/3.3.5a/2012_05_31_01_world_sai.sql
index 3055e98f167..a64746f360d 100644
--- a/sql/old/3.3.5a/2012_05_31_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_31_01_world_sai.sql
@@ -42,7 +42,7 @@ INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_OGRON,@ENTRY_HALAN,@ENTRY_SKIRM,@ENTRY_CALDWELL,@ENTRY_PAVAL) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_OGRON*100,@ENTRY_OGRON*100+1,@ENTRY_CALDWELL*100,@ENTRY_HALAN*100,@ENTRY_PAVAL*100,@ENTRY_CALDWELL*100+1,@ENTRY_PAVAL*100+1,@ENTRY_OGRON*100+2) AND `source_type`=9;
-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
+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
(@ENTRY_OGRON,0,0,0,6,0,100,0,0,0,0,0,6,1273,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ogron - On Death - Fail Quest'),
(@ENTRY_OGRON,0,1,0,19,0,100,0,1273,0,0,0,80,@ENTRY_OGRON*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ogron - On Quest Accept - Script'),
(@ENTRY_OGRON*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'Ogron - On Script - Say "I noticed some fire.."'),
diff --git a/sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql b/sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql
index 1db1d6fbd76..4745fdde00f 100644
--- a/sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql
@@ -1,7 +1,7 @@
-- Add Missing Draconic for Dummies Objects
SET @GUID := 4595;
DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+2;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(@GUID,180665,0,1,1,-8340.196,413.7499,124.489677,2.82742977,0,0,0.987688,0.156436,180,255,1),
(@GUID+1,180666,0,1,1,1628.83984,133.9376,-60.96726,-0.401424885,0,0,-0.199368,0.979925,180,255,1),
(@GUID+2,180667,469,1,1,-7526.57,-924.776,458.826,0.558504,0,0,0.275637,0.961262,180,255,1);
diff --git a/sql/old/3.3.5a/2012_05_31_11_world_creature.sql b/sql/old/3.3.5a/2012_05_31_11_world_creature.sql
index 177c6230964..cced4d78775 100644
--- a/sql/old/3.3.5a/2012_05_31_11_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_31_11_world_creature.sql
@@ -1,6 +1,6 @@
-- Add a couple more Domesticated Felboar Spawns
SET @GUID := 42567;
DELETE FROM `creature` WHERE `guid` IN (@GUID,@GUID+1);
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,21195,530,1,1,0,0,-2678.16016,1477.65625,26.9172077,4.86340427,300,5,0,1,0,1),
(@GUID+1,21195,530,1,1,0,0,-2691.666,1525,21.3857346,0.3155697,300,5,0,1,0,1);
diff --git a/sql/old/3.3.5a/2012_05_31_12_world_creature.sql b/sql/old/3.3.5a/2012_05_31_12_world_creature.sql
index cad0364d021..1af9a5d2fbe 100644
--- a/sql/old/3.3.5a/2012_05_31_12_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_31_12_world_creature.sql
@@ -1,6 +1,6 @@
-- Add missing 7th Legion Chain Gun spawns
DELETE FROM `creature` WHERE `guid` IN (42569,42570,42663,42664);
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(42569,27714,571,1,1,25331,0,3665.613,-1209.412,102.4201,4.206244,120,0,0,1,0,0),
(42570,27714,571,1,1,25331,0,3660.56,-1207.094,102.4201,4.29351,120,0,0,1,0,0),
(42663,27714,571,1,1,25331,0,3677.009,-1174.462,102.3367,1.169371,120,0,0,1,0,0),
diff --git a/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql
index cd6015929b1..0e113bbaac6 100644
--- a/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql
+++ b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql
@@ -1,8 +1,8 @@
-SET @RefDLK := 26043;
+SET @RefDLK := 26043;
SET @HFP := 6000;
SET @HFP1 := @HFP+1;
SET @HFP2 := @HFP+2;
-SET @Scrolls := @HFP+3;
+SET @Scrolls := @HFP+3;
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DELETE FROM `reference_loot_template` WHERE `entry` IN (@RefDLK,@HFP,@HFP1,@HFP2,@Scrolls);
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
@@ -62,7 +62,7 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@RefDLK,30740,0,1,1,1,1), -- Ripfiend Shoulderplates
(@RefDLK,30741,0,1,1,1,1); -- Topaz-Studded Battlegrips
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-DELETE FROM `creature_loot_template` WHERE `entry` IN (18728,187281,19191,16977,19354,17084,17057,16873,16871,19422,16907,19424,19423,16903,16901,19701,16876,16925,18952,16972,16973,17014,16844,19299,16847,16863,18981,16959,19434,16938,16937,19312,22461,19190,18733,24918,18977,17034,19459,19136,19264,16954,18678,18827,16947,16845,19457,16967,16966,22374,18978,16880,17058,22323,19261,17035,17053,16978,16846,16912,16911,19408,17039,16857,18677,19192,16946,16950,16934,19189,19188,16932,16933,20798,19458,16974,19415,16878,16870,19295,16867,19414,19413,19410,19411,16960,16879,16929,16928,16927,19282,19335,19443,16951,19349,19350,16968,26222,26223,16975,20145,16904,16906,16905,19527,16939,18679,19263,19298,16964,19442,24919,18975);
+DELETE FROM `creature_loot_template` WHERE `entry` IN (18728,187281,19191,16977,19354,17084,17057,16873,16871,19422,16907,19424,19423,16903,16901,19701,16876,16925,18952,16972,16973,17014,16844,19299,16847,16863,18981,16959,19434,16938,16937,19312,22461,19190,18733,24918,18977,17034,19459,19136,19264,16954,18678,18827,16947,16845,19457,16967,16966,22374,18978,16880,17058,22323,19261,17035,17053,16978,16846,16912,16911,19408,17039,16857,18677,19192,16946,16950,16934,19189,19188,16932,16933,20798,19458,16974,19415,16878,16870,19295,16867,19414,19413,19410,19411,16960,16879,16929,16928,16927,19282,19335,19443,16951,19349,19350,16968,26222,26223,16975,20145,16904,16906,16905,19527,16939,18679,19263,19298,16964,19442,24919,18975);
INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Doom Lord Kazzak, NPC 18728
@@ -91,7 +91,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- ---------------------------------------------------
(16977,21877,55,1,0,1,1), -- Netherweave Cloth
(16977,14047,15,1,0,1,3), -- Runecloth
-(16977,27859,10,1,0,1,1), -- Zanger Caps
+(16977,27859,10,1,0,1,1), -- Zanger Caps
(16977,28399,5,1,0,1,1), -- Filtered Draenic Water
(16977,13446,2,1,0,1,1), -- Major Healing Potion
(16977,1,90,1,0,-6001,1), -- Generic HellfirePeninsula Loot1
@@ -611,7 +611,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- ---------------------------------------------------
(16978,28562,-100,1,0,1,1), -- QItem: Unyielding Battle Horn
(16978,21877,55,1,0,1,1), -- Netherweave Cloth
-(16978,27859,5,1,0,1,1), -- Zanger Caps
+(16978,27859,5,1,0,1,1), -- Zanger Caps
(16978,28399,2.5,1,0,1,1), -- Filtered Draenic Water
(16978,13446,2,1,0,1,1), -- Major Healing Potion
(16978,13444,2,1,0,1,1), -- Major Mana Potion
@@ -1016,7 +1016,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- ---------------------------------------------------
(16904,21877,60,1,0,1,1), -- Netherweave Cloth
(16904,14047,20,1,0,1,3), -- Runecloth
-(16904,27859,8,1,0,1,1), -- Zanger Caps
+(16904,27859,8,1,0,1,1), -- Zanger Caps
(16904,28399,4,1,0,1,1), -- Filtered Draenic Water
(16904,13446,2,1,0,1,1), -- Major Healing Potion
(16904,13444,1,1,0,1,1), -- Major Mana Potion
@@ -1027,7 +1027,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
(16906,28552,15,1,0,1,1), -- A Mysterious Tome
(16906,21877,60,1,0,1,1), -- Netherweave Cloth
(16906,14047,20,1,0,1,3), -- Runecloth
-(16906,27859,8,1,0,1,1), -- Zanger Caps
+(16906,27859,8,1,0,1,1), -- Zanger Caps
(16906,28399,4,1,0,1,1), -- Filtered Draenic Water
(16906,13446,2,1,0,1,1), -- Major Healing Potion
(16906,13444,1,1,0,1,1), -- Major Mana Potion
@@ -1038,7 +1038,7 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
-- ---------------------------------------------------
(16905,21877,60,1,0,1,1), -- Netherweave Cloth
(16905,14047,20,1,0,1,3), -- Runecloth
-(16905,27859,8,1,0,1,1), -- Zanger Caps
+(16905,27859,8,1,0,1,1), -- Zanger Caps
(16905,28399,4,1,0,1,1), -- Filtered Draenic Water
(16905,13446,2,1,0,1,1), -- Major Healing Potion
(16905,13444,1,1,0,1,1), -- Major Mana Potion
@@ -1128,5 +1128,5 @@ INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loot
(18975,1,2,1,0,-6003,1), -- Scroll of * Reference
(18975,2,90,1,0,-6000,1); -- Generic HellfirePeninsula Loot
-UPDATE `creature_template` SET `lootid`=`entry` WHERE `entry` IN (26222,26223);
+UPDATE `creature_template` SET `lootid`=`entry` WHERE `entry` IN (26222,26223);
DELETE FROM `reference_loot_template` WHERE `entry`=34081;
diff --git a/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql
index e739f81407b..bae963fd5b4 100644
--- a/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql
+++ b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql
@@ -5,10 +5,10 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(@ZM1,1,30,1,0,-4000,1), -- Grey Items level 61 (ilvl 66)
(@ZM1,2,30,1,0,-4001,1), -- Grey Items level 64 (ilvl 69)
-(@ZM1,3,2,1,0,-4103,1), -- Green Items level 60 (ilvl 90)
-(@ZM1,4,2,1,0,-4104,1), -- Green Items level 61 (ilvl 93)
-(@ZM1,5,2,1,0,-4105,1), -- Green Items level 62 (ilvl 96)
-(@ZM1,6,2,1,0,-4106,1), -- Green Items level 63 (ilvl 99)
+(@ZM1,3,2,1,0,-4103,1), -- Green Items level 60 (ilvl 90)
+(@ZM1,4,2,1,0,-4104,1), -- Green Items level 61 (ilvl 93)
+(@ZM1,5,2,1,0,-4105,1), -- Green Items level 62 (ilvl 96)
+(@ZM1,6,2,1,0,-4106,1), -- Green Items level 63 (ilvl 99)
(@ZM1,7,0.5,1,0,-4203,1), -- Blue items level 63 (ilvl 94)
(@ZM1,8,0.5,1,0,-4204,1), -- Blue items level 64 (ilvl 97)
(@ZM1,9,0.5,1,0,-4205,1), -- Blue items level 65 (ilvl 97)
diff --git a/sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql
index c712cbe18bd..ae41cb150b2 100644
--- a/sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql
@@ -16,9 +16,9 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@Grey+52,3994,0,1,1,1,1), -- Laminated Scale Bracers
(@Grey+52,8080,0,1,1,1,1), -- Light Plate Chestpiece
(@Grey+52,13817,0,1,1,1,1); -- Tapered Greatsword
--- --------------------------------------------------------
--- TBC_Greys_References
--- --------------------------------------------------------
+-- --------------------------------------------------------
+-- TBC_Greys_References
+-- --------------------------------------------------------
SET @GreyTBC := 4000; -- reference starting value TDB Field
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @GreyTBC AND @GreyTBC+2;
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
@@ -99,9 +99,9 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@GreyTBC+2,25394,0,1,1,1,1), -- Deteriorating Plate Helmet
(@GreyTBC+2,25395,0,1,1,1,1), -- Deteriorating Plate Pants
(@GreyTBC+2,25396,0,1,1,1,1); -- Deteriorating Plate Shoulderpads
--- --------------------------------------------------------
--- TBC_Greens_References
--- --------------------------------------------------------
+-- --------------------------------------------------------
+-- TBC_Greens_References
+-- --------------------------------------------------------
SET @GreenTBC := 4100; -- reference starting value TDB Field
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @GreenTBC AND @GreenTBC+13;
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
@@ -719,9 +719,9 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
(@GreenTBC+13,25023,0,1,1,1,1), -- Warlord's Sabatons
(@GreenTBC+13,25309,0,1,1,1,1), -- Warpdagger
(@GreenTBC+13,25253,0,1,1,1,1); -- Windspear Longbow
--- --------------------------------------------------------
--- TBC_Blues_References
--- --------------------------------------------------------
+-- --------------------------------------------------------
+-- TBC_Blues_References
+-- --------------------------------------------------------
SET @BlueTBC := 4200; -- reference starting value TDB Field
DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @BlueTBC AND @BlueTBC+10;
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
diff --git a/sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql
index 57be9083048..8390f14ba80 100644
--- a/sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql
@@ -1,4 +1,4 @@
-DELETE FROM `reference_loot_template` WHERE `entry` IN (14011,14012);
+DELETE FROM `reference_loot_template` WHERE `entry` IN (14011,14012);
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(14011,37759,0,1,1,1,1), -- Rhie-ay's Clutching Gauntlets
(14011,37768,0,1,1,1,1), -- Leggings of Violent Exsanguination
diff --git a/sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql b/sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql
index 65d5d43bad2..ee265b3bdcc 100644
--- a/sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql
@@ -4,9 +4,9 @@ DELETE FROM `creature` WHERE `id` IN (27682,27608);
UPDATE `creature_template` SET `speed_walk`=9/2,`speed_run`=17/7,`InhabitType`=4 WHERE `entry`=26838;
SET @NPC := 99078;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3433.348,274.121,192.7347,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -40,9 +40,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,26,3382.149,279.6307,169.347,0,0,0,100,0);
SET @NPC := 99079;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3434.632,268.5218,212.5722,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -73,9 +73,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,23,3441.441,249.5543,185.3083,0,0,0,100,0);
SET @NPC := 99083;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3639.789,321.911,195.744,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -113,9 +113,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,30,3610.069,345.1742,204.7075,0,0,0,100,0);
SET @NPC := 99084;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3419.562,219.4669,185.8007,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -145,9 +145,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,22,3381.995,245.4414,151.9461,0,0,0,100,0);
SET @NPC := 99085;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3431.814,203.5959,199.4538,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -178,9 +178,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,23,3382.743,269.2179,222.0501,0,0,0,100,0);
SET @NPC := 99086;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3408.915,276.3928,180.561,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -204,9 +204,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,16,3268.329,422.1047,154.7629,0,0,0,100,0);
SET @NPC := 99087;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3748.954,236.7544,178.6408,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -237,9 +237,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
SET @NPC := 99088;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3412.463,216.0972,212.123,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -260,9 +260,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,13,3301.554,308.331,241.2928,0,0,0,100,0);
SET @NPC := 99089;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3100.95,567.1441,118.4118,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -289,15 +289,15 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
-- static
DELETE FROM `creature` WHERE `guid` IN (99090,99091);
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(99090,27682,571,1,1,24743,0,2954.845,625.8646,146.2928,2.094395,120,0,0,38440,0,0),
(99091,27682,571,1,1,24743,0,3256.357,585.8403,136.8419,0.4363323,120,0,0,38440,0,0);
-- waypoints
SET @NPC := 99092;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3017.465,301.0079,204.943,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -315,9 +315,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,10,3017.465,301.0079,204.943,0,0,0,100,0);
SET @NPC := 99094;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3138.133,520.6823,53.44044,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -351,9 +351,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,26,3138.133,520.6823,53.44044,0,0,0,100,0);
SET @NPC := 99095;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3199.019,490.8836,212.5729,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -368,9 +368,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,7,3199.019,490.8836,212.5729,0,0,0,100,0);
SET @NPC := 99096;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3214.422,579.9131,196.0033,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -385,9 +385,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,7,3214.422,579.9131,196.0033,0,0,0,100,0);
SET @NPC := 99097;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3106.429,348.3322,212.4711,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -402,9 +402,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,7,3106.429,348.3322,212.4711,0,0,0,100,0);
SET @NPC := 99098;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3129.027,582.4556,247.3863,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -419,9 +419,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,7,3129.027,582.4556,247.3863,0,0,0,100,0);
SET @NPC := 99099;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3691.676,352.0933,342.2254,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -437,9 +437,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3691.676,352.0933,342.2254,0,0,0,100,0);
SET @NPC := 99093;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3036.494,602.2036,179.671,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -494,9 +494,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,47,3036.494,602.2036,179.671,0,0,0,100,0);
SET @NPC := 99103;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3065.57,646.0688,229.7383,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -518,9 +518,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,14,3065.57,646.0688,229.7383,0,0,0,100,0);
SET @NPC := 99104;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3112.661,560.2861,197.5214,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -573,9 +573,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,45,3112.661,560.2861,197.5214,0,0,0,100,0);
SET @NPC := 99105;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27682,571,1,1,24743,0,3040.376,545.7573,223.7107,1.91463,120,0,0,38440,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -612,9 +612,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
UPDATE `creature_template` SET `speed_walk`=7/2,`speed_run`=15/7,`InhabitType`=4 WHERE `entry`=27608;
SET @NPC := 99105;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3177.857,623.9463,234.0692,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -637,9 +637,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,15,3177.857,623.9463,234.0692,0,0,0,100,0);
SET @NPC := 99106;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,2980.341,629.1049,218.5251,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -655,9 +655,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,2980.341,629.1049,218.5251,0,0,0,100,0);
SET @NPC := 99107;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3488.651,-5.619141,169.4104,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -677,9 +677,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,12,3488.651,-5.619141,169.4104,0,0,0,100,0);
SET @NPC := 99108;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3542.247,134.1484,169.6936,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -705,9 +705,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,18,3542.247,134.1484,169.6936,0,0,0,100,0);
SET @NPC := 99109;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3590.88,69.88932,149.1064,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -724,9 +724,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,9,3590.88,69.88932,149.1064,0,0,0,100,0);
SET @NPC := 99110;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3424.549,257.6351,132.4231,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -746,9 +746,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,12,3424.549,257.6351,132.4231,0,0,0,100,0);
SET @NPC := 99111;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3485.543,172.4427,356.9669,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -764,9 +764,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3485.543,172.4427,356.9669,0,0,0,100,0);
SET @NPC := 99112;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3037.007,696.7842,221.9052,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -787,9 +787,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,13,3037.007,696.7842,221.9052,0,0,0,100,0);
SET @NPC := 99113;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3723.934,203.8074,149.416,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -814,9 +814,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,17,3723.934,203.8074,149.416,0,0,0,100,0);
SET @NPC := 99114;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3737.246,441.4471,163.1518,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -838,9 +838,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,14,3737.246,441.4471,163.1518,0,0,0,100,0);
SET @NPC := 99115;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3490.259,76.95345,197.2588,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -858,9 +858,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,10,3490.259,76.95345,197.2588,0,0,0,100,0);
SET @NPC := 99116;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3484.9,77.65061,181.4013,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -877,9 +877,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,9,3484.9,77.65061,181.4013,0,0,0,100,0);
SET @NPC := 99117;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,2938.209,403.6825,200.0642,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -901,9 +901,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,14,2938.209,403.6825,200.0642,0,0,0,100,0);
SET @NPC := 99118;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,27608,571,1,1,24140,0,3756.611,216.3398,142.0742,1.91463,120,0,0,92538,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -929,9 +929,9 @@ DELETE FROM `creature` WHERE `guid` IN (100170,100206,100207,100208,100209,10021
UPDATE `creature_template` SET `speed_walk`=9/2,`speed_run`=17/7,`InhabitType`=4 WHERE `entry`=26925;
SET @NPC := 100170;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3423.212,279.9993,128.0342,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -948,9 +948,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,9,3381.065,257.5826,128.0342,0,0,0,100,0);
SET @NPC := 100206;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3662.692,328.2304,338.4197,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -966,9 +966,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3691.676,352.0933,342.2254,0,0,0,100,0);
SET @NPC := 100207;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3657.962,213.0957,169.3146,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -990,9 +990,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,14,3648.757,225.0738,169.3146,0,0,0,100,0);
SET @NPC := 100208;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3606.596,396.9579,205.5612,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1010,9 +1010,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,10,3568.027,418.6763,205.5612,0,0,0,100,0);
SET @NPC := 100209;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3648.806,293.8063,321.0587,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1028,9 +1028,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3662.692,328.2304,338.4197,0,0,0,100,0);
SET @NPC := 100210;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3452.103,334.373,128.0342,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1047,9 +1047,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,9,3218.353,177.623,195.7842,0,0,0,100,0);
SET @NPC := 100213;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3648.806,293.8063,321.0587,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1065,9 +1065,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3795.056,64.55627,390.3087,0,0,0,100,0);
SET @NPC := 100215;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3606.596,396.9579,205.5612,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1085,9 +1085,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,10,3585.346,505.2079,272.8112,0,0,0,100,0);
SET @NPC := 100216;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3772.475,266.6113,254.1891,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1111,9 +1111,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,16,3798.725,252.1113,321.4391,0,0,0,100,0);
SET @NPC := 100226;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3447.796,171.34,125.7842,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1132,9 +1132,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,11,3433.646,226.0049,125.7842,0,0,0,100,0);
SET @NPC := 130999;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26925,571,1,1,6376,0,3750.984,407.8766,254.1891,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1164,9 +1164,9 @@ DELETE FROM `creature` WHERE `guid` IN (100823,100824,100825,100826,131035,13103
UPDATE `creature_template` SET `speed_walk`=7/2,`speed_run`=15/7,`InhabitType`=4 WHERE `entry`=26933;
SET @NPC := 100823;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3791.882,255.4148,152.3366,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1192,9 +1192,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,18,3786.234,277.9988,152.3366,0,0,0,100,0);
SET @NPC := 100824;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3559.792,412.912,244.8625,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1216,9 +1216,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,14,3479.214,376.5652,244.8625,0,0,0,100,0);
SET @NPC := 100825;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3424.446,300.7501,194.3189,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1233,9 +1233,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,7,3513.567,405.2664,194.3189,0,0,0,100,0);
SET @NPC := 100826;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3457.605,232.8917,280.631,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1251,9 +1251,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3516.544,159.0889,280.631,0,0,0,100,0);
SET @NPC := 131035;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3559.792,412.912,244.8625,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1275,9 +1275,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,14,3479.214,376.5652,244.8625,0,0,0,100,0);
SET @NPC := 131036;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3438.608,283.5485,224.3952,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1293,9 +1293,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,8,3437.712,218.1042,224.3952,0,0,0,100,0);
SET @NPC := 131037;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3337.373,175.2911,169.6936,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -1320,9 +1320,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,17,3554.261,69.58746,169.6936,0,0,0,100,0);
SET @NPC := 131038;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26933,571,1,1,0,0,3738.288,310.6056,206.0655,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
diff --git a/sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql b/sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql
index 60b936a7f72..79fa6b22cd2 100644
--- a/sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql
@@ -4,9 +4,9 @@ DELETE FROM `creature_addon` WHERE `guid` IN (97922,97923);
-- Pathing for Frigid Proto-Drake
SET @NPC := 97991;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7138.47,-2166.756,798.66,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -41,9 +41,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,27,7118.583,-2150.815,787.2991,0,0,0,100,0);
SET @NPC := 97992;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7368.505,-2205.943,843.7172,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -57,9 +57,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,6,7302.835,-2255.226,790.5214,0,0,0,100,0);
SET @NPC := 98025;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7139.471,-2158.159,806.128,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -98,9 +98,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,31,7133.573,-2119.781,811.7565,0,0,0,100,0);
SET @NPC := 98026;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7111.189,-2126.364,809.0059,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -134,9 +134,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,26,7139.663,-2146.639,806.1729,0,0,0,100,0);
SET @NPC := 98027;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7325.084,-2259.102,789.8701,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -175,9 +175,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,31,7324.438,-2258.339,789.8701,0,0,0,100,0);
SET @NPC := 97995;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7303.549,-2258.753,788.369,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
@@ -210,9 +210,9 @@ INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`
(@PATH,25,7305.381,-2260.717,790.9471,0,0,0,100,0);
SET @NPC := 98028;
-SET @PATH := @NPC*10;
+SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,29460,571,1,1,0,0,7133.43,-2118.791,811.7565,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`) VALUES (@NPC,@PATH,50331648);
diff --git a/sql/old/3.3.5a/2012_06_03_01_world_creature.sql b/sql/old/3.3.5a/2012_06_03_01_world_creature.sql
index 68448b31591..2df2bd6fbc0 100644
--- a/sql/old/3.3.5a/2012_06_03_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_03_01_world_creature.sql
@@ -1,7 +1,7 @@
-- Add more Domesticated Felboar Spawns
SET @GUID := 43456;
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+11;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,21195,530,1,1,0,0,-2547.195,1426.521,65.57381,1.465101,300,5,0,1,0,1),
(@GUID+1,21195,530,1,1,0,0,-2585.524,1448.067,53.78493,2.973133,300,5,0,1,0,1),
(@GUID+2,21195,530,1,1,0,0,-2513.349,1387.699,66.09725,4.945046,300,5,0,1,0,1),
diff --git a/sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql b/sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql
index 023182aaf1b..bed13c12210 100644
--- a/sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql
@@ -38,7 +38,7 @@ UPDATE `quest_template` SET `OfferRewardText`='$N! You are the $g man:woman;!!!$
UPDATE `quest_template` SET `OfferRewardText`='Ah, Andre''s head. So I guess he''ll make his trial after all!$B$BMuch appreciated, $N. Now if you''ll just sign here, I can issue you payment for services rendered.$B$BDon''t worry about the small print. It''s harmless, and... I don''t think there''s a magnifying glass small enough to read it anyway.' WHERE `Id`=2875; -- WANTED: Andre Firebeard
UPDATE `quest_template` SET `OfferRewardText`='Great, thanks for the shipment! Now MacKinley and I can finally settle our wager.' WHERE `Id`=2873; -- Stoley's Shipment
UPDATE `quest_template` SET `OfferRewardText`='You have my sincere thanks for your efforts, $N. Though much remains to be done, it gladdens me to know we have helped some find their long-deserved rest.' WHERE `Id`=10047; -- The Path of Glory
-UPDATE `quest_template` SET `OfferRewardText`='Well, I must say, I am impressed, $N. I didn''t think you had the mettle for this mission. Well done. Well done, indeed.
+UPDATE `quest_template` SET `OfferRewardText`='Well, I must say, I am impressed, $N. I didn''t think you had the mettle for this mission. Well done. Well done, indeed.
' WHERE `Id`=10394; -- Disruption - Forge Camp: Mageddon
UPDATE `quest_template` SET `OfferRewardText`='It worked! You got the essence! Well done, $N! Well done!$B$BThis essence will be invaluable in my research. I hope to one day learn how to capture living dragon whelps, or perhaps capture their eggs. If I could find a way to do that, then I would be the envy of dragon scholars around the world!$B$BMy employer would also be happy, and as I said before, he''s someone you want to keep happy...' WHERE `Id`=4726; -- Broodling Essence
UPDATE `quest_template` SET `OfferRewardText`='There is no doubt, this is raw saronite. We''ve seen weapons made from it in the hands of the Lich King''s chosen before, but this is the first time it''s been used to arm anything else. The scale of that mining operation must be huge.' WHERE `Id`=13138; -- I'm Smelting... Smelting!
@@ -362,7 +362,7 @@ UPDATE `quest_template` SET `OfferRewardText`='You have seen the Chamber of Khaz
UPDATE `quest_template` SET `OfferRewardText`='Well done, $N. Your actions in the field are instrumental in our battle for Hellfire Peninsula.' WHERE `Id`=13408; -- Hellfire Fortifications
UPDATE `quest_template` SET `OfferRewardText`='I have to hand it to you, $N, you''re a fighter born! Those Horde yokels may never know how close they came to the end. It takes real character to step in harm''s way on behalf of your enemies. That''s the kind of honor and commitment that holds the Alliance together! $B$B<Field Marshal Brock salutes you crisply.>
' WHERE `Id`=10396; -- Enemy of my Enemy...
-UPDATE `quest_template` SET `OfferRewardText`='It is fortuitous that you intercepted this missive when you did, $N. Though it will take me some time to decipher, I can already sense the hatred and urgency woven into this scroll. I fear the Legion''s true motives in this land will soon be made evident...$B$BGive me a moment to decipher this script. $B$B<Warp-Scryer Kryv begins to read the demonic missive>
+UPDATE `quest_template` SET `OfferRewardText`='It is fortuitous that you intercepted this missive when you did, $N. Though it will take me some time to decipher, I can already sense the hatred and urgency woven into this scroll. I fear the Legion''s true motives in this land will soon be made evident...$B$BGive me a moment to decipher this script. $B$B<Warp-Scryer Kryv begins to read the demonic missive>
' WHERE `Id`=10395; -- The Dark Missive
UPDATE `quest_template` SET `OfferRewardText`='Are you certain of your choice, $N? The Aldor will welcome you as an ally, but the Scryers will not easily forgive your decision.' WHERE `Id`=10551; -- Allegiance to the Aldor
UPDATE `quest_template` SET `OfferRewardText`='Welcome back from your exercises, $N. I''m confident that you will make us proud when the competition starts.' WHERE `Id`=13749; -- A Valiant's Field Training
@@ -426,7 +426,7 @@ UPDATE `quest_template` SET `OfferRewardText`='So, sister, you think that comple
UPDATE `quest_template` SET `OfferRewardText`='These will do nicely. I''ll have the harness ready for you in no time.' WHERE `Id`=12900; -- Making a Harness
UPDATE `quest_template` SET `OfferRewardText`='I''m impressed. I never thought I would see an icemaw matriarch again. Especially not one this size.' WHERE `Id`=12983; -- The Last of Her Kind
UPDATE `quest_template` SET `OfferRewardText`='The jormungar are vile creatures. You did well in destroying them.' WHERE `Id`=12989; -- The Slithering Darkness
-UPDATE `quest_template` SET `OfferRewardText`='Not bad. I was hoping Kirgaraak would snap your neck so I could keep your bear.$B$BJust joking, sister. Well... half-joking. That''s a really nice bear you''ve got.' WHERE `Id`=12996; -- The Warm-Up
+UPDATE `quest_template` SET `OfferRewardText`='Not bad. I was hoping Kirgaraak would snap your neck so I could keep your bear.$B$BJust joking, sister. Well... half-joking. That''s a really nice bear you''ve got.' WHERE `Id`=12996; -- The Warm-Up
UPDATE `quest_template` SET `OfferRewardText`='You really did it! You made it out with your health. Wish we could say the same for your bear.$B$BIt''s going to take a while for her to recover. Fortunately you won''t need her for a while.' WHERE `Id`=12997; -- Into the Pit
UPDATE `quest_template` SET `OfferRewardText`='You''ve really made it this far. Never would I have thought you''d progress so quickly among the hyldnir.' WHERE `Id`=13061; -- Prepare for Glory
UPDATE `quest_template` SET `OfferRewardText`='Are you ready to ride, sister? There is no coming back.' WHERE `Id`=13062; -- Lok'lira's Parting Gift
@@ -455,7 +455,7 @@ UPDATE `quest_template` SET `OfferRewardText`='I have never seen such terror in
UPDATE `quest_template` SET `OfferRewardText`='It''s about damned time! No doubt that Baron Sliver took his sweet time in sending you to me.$B$BI should have that empty space above his shoulders removed!' WHERE `Id`=12806; -- To the Rise with all Due Haste!
UPDATE `quest_template` SET `OfferRewardText`='In their folly, the Argent Crusade has chosen to turn a blind eye upon the presence of the Scarlet Onslaught. We will not.$B$BWe do not care if they might assist in the battle against the Lich King. We do not believe them worthy of existence. We will be their end, once and for all!' WHERE `Id`=12807; -- The Story Thus Far...
UPDATE `quest_template` SET `OfferRewardText`='I thought so! I couldn''t quite make out the destruction from here, but I can imagine how it must have looked. Splendid!$B$BWell done, $n. Thrallmar command will be happy to hear of your success!' WHERE `Id`=10087; -- Burn It Up... For the Horde!
-UPDATE `quest_template` SET `OfferRewardText`='Well done, $C, That''s one less forge camp we''ll need to worry about. It''ll take the Legion a while to get that facility back up and running. You''ve just bought us the one thing we''d run out of - time.
+UPDATE `quest_template` SET `OfferRewardText`='Well done, $C, That''s one less forge camp we''ll need to worry about. It''ll take the Legion a while to get that facility back up and running. You''ve just bought us the one thing we''d run out of - time.
' WHERE `Id`=10390; -- Forge Camp: Mageddon
UPDATE `quest_template` SET `OfferRewardText`='Now Veranus can finally rest in peace.' WHERE `Id`=24586; -- Razorscale Must Die!
UPDATE `quest_template` SET `OfferRewardText`='That will keep our recruits fed! Here''s how you cook it.' WHERE `Id`=13088; -- Northern Cooking
@@ -505,7 +505,7 @@ UPDATE `quest_template` SET `RequestItemsText`='Got the five Wastewander water p
UPDATE `quest_template` SET `RequestItemsText`='Yes $c, I am an official of the Gadgetzan Water Company. What can I assist you with?' WHERE `Id`=2781; -- WANTED: Caliph Scorpidsting
UPDATE `quest_template` SET `RequestItemsText`='You look a little dazed. Have you been reading our legal documents?' WHERE `Id`=2875; -- WANTED: Andre Firebeard
UPDATE `quest_template` SET `RequestItemsText`='The cries seem somehow... fainter than they were before. The Light grant it''s more than wishful thinking.' WHERE `Id`=10047; -- The Path of Glory
-UPDATE `quest_template` SET `RequestItemsText`='The Legion could start shelling the Horde at any time, $N! You need to destroy those blasted cannons!
+UPDATE `quest_template` SET `RequestItemsText`='The Legion could start shelling the Horde at any time, $N! You need to destroy those blasted cannons!
' WHERE `Id`=10396; -- Enemy of my Enemy...
UPDATE `quest_template` SET `RequestItemsText`='Do you have the broodling essence, $N? I can''t wait to study it.$B$BAnd besides that... my patron is not the type of person you want to disappoint.' WHERE `Id`=4726; -- Broodling Essence
UPDATE `quest_template` SET `RequestItemsText`='Hey, $N. Been to the Grizzled Den yet? Those Wendigos can be fierce.' WHERE `Id`=313; -- The Grizzled Den
@@ -538,13 +538,13 @@ UPDATE `quest_template` SET `RequestItemsText`='You find anything yet, $N?' WHER
UPDATE `quest_template` SET `RequestItemsText`='Any luck with the bloodtooth? Don''t forget what I told you about making blood pools.' WHERE `Id`=13833; -- Blood Is Thicker
UPDATE `quest_template` SET `RequestItemsText`='What is it that you''ve found, $N?' WHERE `Id`=24442; -- Battle Plans Of The Kvaldir
UPDATE `quest_template` SET `RequestItemsText`='Watch where you''re stepping! Watch watch watch!! This is delicate stuff you see here, and if we''re to win then it must all work perfectly!' WHERE `Id`=1179; -- The Brassbolts Brothers
-UPDATE `quest_template` SET `RequestItemsText`='Tell me, $N, has the deed been done? Has the Legionlord been vanquished?
+UPDATE `quest_template` SET `RequestItemsText`='Tell me, $N, has the deed been done? Has the Legionlord been vanquished?
' WHERE `Id`=10400; -- Overlord
UPDATE `quest_template` SET `RequestItemsText`='We need to get this information to the Alliance! It may well be the key to Arthas'' defeat.' WHERE `Id`=24500; -- Wrath of the Lich King
UPDATE `quest_template` SET `RequestItemsText`='We are currently accepting donations for wool cloth. A donation of sixty pieces of wool cloth will net you full recognition by the Gnomeregan Exiles for your generous actions. Our stores are such on wool that we would only need sixty pieces from you total; we should be able to acquire enough from others in the realm to support our drive.$B$BIf you have the sixty pieces of wool cloth on you and are ready to donate them, I''m able to take them from you now.' WHERE `Id`=7807; -- A Donation of Wool
UPDATE `quest_template` SET `RequestItemsText`='As with most other fabrics, our stocks of silk are at an all-time low. Our stores are such that we''d only need sixty pieces of silk from you total; we should be able to reach our goal with the support of others.$B$BA benevolent gift such as silk, might I add, would certainly increase your local standing in the community! If you have the sixty pieces of silk cloth on you and are ready to donate them, I''m able to take them from you now.' WHERE `Id`=7808; -- A Donation of Silk
UPDATE `quest_template` SET `RequestItemsText`='<Hansel is busily rubbing his bunions.>$B$BDon''t just stand there, grab some oil and a luffa and get to scrubbin'' these bunions.$B$BYe don''t have a luffa? Well then! Perhaps it''s time I sent you out to find a luffa?$B$BHey, where are ye goin''?' WHERE `Id`=7727; -- Incendosaurs? Whateverosaur is More Like It
-UPDATE `quest_template` SET `RequestItemsText`='Eight, $N. I need eight! ' WHERE `Id`=3443; -- Forging the Shaft
+UPDATE `quest_template` SET `RequestItemsText`='Eight, $N. I need eight! ' WHERE `Id`=3443; -- Forging the Shaft
UPDATE `quest_template` SET `RequestItemsText`='Don''t let the crazy goggles fool you, $N. I''m the smart one here.' WHERE `Id`=7702; -- Kill 'Em With Sleep Deprivation
UPDATE `quest_template` SET `RequestItemsText`='Let''s not waste more of my precious time with jibber jabber, $r. It''s time to focus on replenishing our dwindling fiery flux supply.$B$BWhat I''m gonna need from you is the following:$B$B*Incendosaur scales.$B$B*Heavy Leather.$B$B*Coal.$B$BI''ll take all that you can offer!$B$BAnd you''ll do it fast if you wanna get in good with the Brotherhood.
' WHERE `Id`=8242; -- Restoring Fiery Flux Supplies via Heavy Leather
@@ -581,11 +581,11 @@ UPDATE `quest_template` SET `RequestItemsText`='You are the delivery $g boy:girl
UPDATE `quest_template` SET `RequestItemsText`='What''s all this?$B$BBy any chance have you seen my no-good apprentice, Pestlepot?$B$BI sent him on an errand quite some time ago and he has yet to return!' WHERE `Id`=12527; -- Gluttonous Lurkers
UPDATE `quest_template` SET `RequestItemsText`='Have you collected the water-poppies, $n?' WHERE `Id`=12564; -- Troll Patrol: Something for the Pain
UPDATE `quest_template` SET `RequestItemsText`='You seek to change the path you walk, $N?' WHERE `Id`=24819; -- A Change of Heart
-UPDATE `quest_template` SET `RequestItemsText`='You close down that war-portal yet, $N? While you''re here shuffling your feet, there are more demons entering Outland!
+UPDATE `quest_template` SET `RequestItemsText`='You close down that war-portal yet, $N? While you''re here shuffling your feet, there are more demons entering Outland!
' WHERE `Id`=10397; -- Invasion Point: Annihilator
UPDATE `quest_template` SET `RequestItemsText`='What is it, $C? I sense you''ve found something that speaks of a coming doom.
' WHERE `Id`=10395; -- The Dark Missive
-UPDATE `quest_template` SET `RequestItemsText`='I sense a growing darkness within your heart, $C. Have you faced your fear? Or does it still await you at the Pools of Aggonar?
+UPDATE `quest_template` SET `RequestItemsText`='I sense a growing darkness within your heart, $C. Have you faced your fear? Or does it still await you at the Pools of Aggonar?
' WHERE `Id`=10399; -- The Heart of Darkness
UPDATE `quest_template` SET `RequestItemsText`='$N, you have returned. What did you learn?$B$BWhat is that sound?' WHERE `Id`=11629; -- Return to the Spirit Talker
UPDATE `quest_template` SET `RequestItemsText`='What''s this? Who are you?$B$BYou''re one of those $r things! How can you speak our tongue?' WHERE `Id`=11559; -- Winterfin Commerce
@@ -599,5 +599,5 @@ UPDATE `quest_template` SET `RequestItemsText`='Have you collected 10 Scarlet In
UPDATE `quest_template` SET `RequestItemsText`='You seek to continue down the path of destruction?' WHERE `Id`=24828; -- Path of Destruction
UPDATE `quest_template` SET `RequestItemsText`='You seek to change the path you walk, $N?' WHERE `Id`=24836; -- A Change of Heart
UPDATE `quest_template` SET `RequestItemsText`='Have you scouted all of the Blood Furnace yet? What do you have to tell me?' WHERE `Id`=9608; -- Heart of Rage
-UPDATE `quest_template` SET `RequestItemsText`='The tears of the Fire Lord are a rare find indeed.$B$BOffer 1 Blood of the Mountain and you shall be granted favor amongst the Brotherhood.
+UPDATE `quest_template` SET `RequestItemsText`='The tears of the Fire Lord are a rare find indeed.$B$BOffer 1 Blood of the Mountain and you shall be granted favor amongst the Brotherhood.
' WHERE `Id`=6646; -- Favor Amongst the Brotherhood, Blood of the Mountain
diff --git a/sql/old/3.3.5a/2012_06_04_01_world_gossip.sql b/sql/old/3.3.5a/2012_06_04_01_world_gossip.sql
index f6246967452..180a145678a 100644
--- a/sql/old/3.3.5a/2012_06_04_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_04_01_world_gossip.sql
@@ -6,7 +6,7 @@ UPDATE `creature_template` SET `gossip_menu_id`=7046 WHERE `entry`=16015;
DELETE FROM `gossip_menu` WHERE `entry`=7046;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7046,8292);
DELETE FROM `gossip_menu_option` WHERE `menu_id`=7046 AND `id` IN (0);
-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
+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
(7046,0,1, 'Hey Vi''el, show me your wares!',3,128,0,0,0,0, '');
UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=11119;
UPDATE `creature_template` SET `gossip_menu_id`=6092 WHERE `entry`=14742;
diff --git a/sql/old/3.3.5a/2012_06_04_03_world_conditions.sql b/sql/old/3.3.5a/2012_06_04_03_world_conditions.sql
index 0eadeb8542e..6426df66375 100644
--- a/sql/old/3.3.5a/2012_06_04_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_06_04_03_world_conditions.sql
@@ -1,5 +1,5 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 19 AND `SourceEntry` IN (13408,13409,13410,13411);
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(19, 0, 13408, 0, 0, 15, 0, 1503, 0, 0, 0, 0, '', 'Hellfire Fortifications - Alliance -All classes other than dk'),
(19, 0, 13409, 0, 0, 15, 0, 1503, 0, 0, 0, 0, '', 'Hellfire Fortifications - Horde -All classes other than dk'),
(19, 0, 13410, 0, 0, 15, 0, 32, 0, 0, 0, 0, '', 'Hellfire Fortifications - Alliance -Only dk'),
diff --git a/sql/old/3.3.5a/2012_06_05_01_world_gossip.sql b/sql/old/3.3.5a/2012_06_05_01_world_gossip.sql
index 11697eeffd4..97eb4f58e33 100644
--- a/sql/old/3.3.5a/2012_06_05_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_05_01_world_gossip.sql
@@ -9,7 +9,7 @@ UPDATE `creature_template` SET `gossip_menu_id`=2703,`ScriptName`='' WHERE `entr
DELETE FROM `gossip_menu` WHERE `entry` IN (2703,21320,21321);
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (2703,3375),(2703,3377),(21320,3382),(21321,3383);
DELETE FROM `gossip_menu_option` WHERE `menu_id`=2703 AND `id` IN (0,1,2);
-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
+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
(2703,0,0, 'How do I use the Cache of Mau''ari?',1,1,21320,0,0,0, ''),
(2703,1,0, 'What is E''ko?',1,1,21321,0,0,0, ''),
(2703,2,0, 'I''d like you to make me a new Cache of Mau''ari please',1,1,0,0,0,0, '');
diff --git a/sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql b/sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql
index 84893613c75..d6ee0349fc4 100644
--- a/sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql
+++ b/sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql
@@ -10,7 +10,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
DELETE FROM `gossip_menu` WHERE `entry` IN (3050,3051,3052,3053,3054);
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (3050,3759),(3051,3760),(3052,3761),(3053,3762),(3054,3763);
DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 3049 AND 3054;
-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
+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
(3049,0,0, 'You will have to excuse me, Lorax, I do not speak ''crazy''.',1,1,3050,0,0,0, ''),
(3050,0,0, 'My apologies, I did not realize that you could understand what I was saying. What is it you are doing out here?',1,1,3051,0,0,0, ''),
(3051,0,0, 'Do you? Perhaps you should tell me what it is that is bothering you',1,1,3052,0,0,0, ''),
diff --git a/sql/old/3.3.5a/2012_06_06_00_world_script.sql b/sql/old/3.3.5a/2012_06_06_00_world_script.sql
index 727d28e8ea9..d2790265851 100644
--- a/sql/old/3.3.5a/2012_06_06_00_world_script.sql
+++ b/sql/old/3.3.5a/2012_06_06_00_world_script.sql
@@ -14,7 +14,7 @@ DELETE FROM `gossip_menu` WHERE `entry` IN (21322,21323,21324,21325,21326);
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (21322,3759),(21323,3760),(21324,3761),(21325,3762),(21326,3763);
DELETE FROM `gossip_menu_option` WHERE `menu_id`=3049;
DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 21322 AND 21326;
-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
+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
(3049,0,0, 'You will have to excuse me, Lorax, I do not speak ''crazy''.',1,1,21322,0,0,0, ''),
(21322,0,0, 'My apologies, I did not realize that you could understand what I was saying. What is it you are doing out here?',1,1,21323,0,0,0, ''),
(21323,0,0, 'Do you? Perhaps you should tell me what it is that is bothering you',1,1,21324,0,0,0, ''),
diff --git a/sql/old/3.3.5a/2012_06_07_00_world_gossip.sql b/sql/old/3.3.5a/2012_06_07_00_world_gossip.sql
index aac3ac53e74..0d53f910af8 100644
--- a/sql/old/3.3.5a/2012_06_07_00_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_07_00_world_gossip.sql
@@ -13,7 +13,7 @@ DELETE FROM `gossip_menu` WHERE `entry`=10118 AND `text_id`=14076;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (10136,14072),(10138,14074),(10118,14076);
-- Add Gossip Options
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP AND `id` IN (2,3,4,5);
-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
+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
(@GOSSIP,2,0, 'Tell me about the Wispcloak Recipe.',1,1,10136,0,0,0, ''),
(@GOSSIP,3,0, 'I am ready to learn the Wispcloak Recipe.',1,1,0,0,0,0, ''),
(@GOSSIP,4,0, 'Tell me about the Deathchill Cloak Recipe.',1,1,10138,0,0,0, ''),
diff --git a/sql/old/3.3.5a/2012_06_07_05_world_misc.sql b/sql/old/3.3.5a/2012_06_07_05_world_misc.sql
index d45384dd3ef..8c7f4c54d10 100644
--- a/sql/old/3.3.5a/2012_06_07_05_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_07_05_world_misc.sql
@@ -6,7 +6,7 @@ DELETE FROM `creature_addon` WHERE `guid` IN (45208,45099,45075,45136,12925,1240
UPDATE `creature_template` SET `gossip_menu_id`=9054 WHERE `entry`=25021;
UPDATE `creature_template` SET `gossip_menu_id`=9056 WHERE `entry`=25022;
UPDATE `creature_template` SET `gossip_menu_id`=9057 WHERE `entry`=25023;
-UPDATE `creature_template` SET `gossip_menu_id`=9054 WHERE `entry`=25024;
+UPDATE `creature_template` SET `gossip_menu_id`=9054 WHERE `entry`=25024;
UPDATE `creature_template` SET `gossip_menu_id`=9077 WHERE `entry`=25025;
DELETE FROM `gossip_menu` WHERE `entry`=9054 AND `text_id`=12243;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9054,12243);
diff --git a/sql/old/3.3.5a/2012_06_12_00_world_transport.sql b/sql/old/3.3.5a/2012_06_12_00_world_transport.sql
index d3a35c254d9..28779398a7a 100644
--- a/sql/old/3.3.5a/2012_06_12_00_world_transport.sql
+++ b/sql/old/3.3.5a/2012_06_12_00_world_transport.sql
@@ -1,7 +1,7 @@
-- Zeppelin: <The Zephyr> "Durotar to Thunder Bluff"
SET @GUID := 43468;
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+11;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,3084,647,1,1,0,0,-4.83257,-4.312334,-17.63218,1.623156,180,0,0,1,0,0), -- Bluffwatcher
(@GUID+1,3084,647,1,1,0,0,-5.206744,-11.34318,-17.61012,4.712389,180,0,0,1,0,0), -- Bluffwatcher
(@GUID+2,24934,647,1,1,0,0,10.32099,-3.573514,-23.49413,3.176499,180,0,0,1,0,0), -- Snack-O-Matic IV
diff --git a/sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql
index b7f61f407b4..b72461e8d39 100644
--- a/sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql
@@ -1,6 +1,6 @@
-- Death Knight
DELETE FROM `spell_bonus_data` WHERE `entry` IN(58621, 47632, 47633, 50444, 70890, 50526, 48982, 59754, 49184);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(58621, 0, -1, 0.08, -1, 'Death Knight - Glyph of Chains of Ice'), -- Shouldn't scale with SP.
(47632, 0, -1, 0.15, -1, 'Death Knight - Death Coil'), -- Shouldn't scale with SP.
(47633, 0, -1, 0.15, -1, 'Death Knight - Death Coil (Heal)'), -- Shouldn't scale with SP.
@@ -15,13 +15,13 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
DELETE FROM `spell_bonus_data` WHERE `entry` IN(48450, 48451); -- Lifebloom Rank 2, Rank 3
DELETE FROM `spell_bonus_data` WHERE `entry` IN(48567, 48568); -- Lacerate Rank 2, Rank 3
DELETE FROM `spell_bonus_data` WHERE `entry` IN(33745, 9007);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(33745, 0, 0, 0.01, 0.01, 'Druid - Lacerate ($AP*0.05/number of ticks)'), -- Direct damage should scale with AP, based on DrDamage addon(3.3.5a).
(9007, -1, 0, -1, 0.03, 'Druid - Pounce Bleed (Triggered)'); -- Shouldn't scale with SP. Increase AP coefficient, based on DrDamage addon(3.3.5a) and Wowwiki.com.
-- Hunter
DELETE FROM `spell_bonus_data` WHERE `entry` IN(56641, 42243, 3674, 19306, 1495, 63468, 136);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(56641, 0, -1, 0.1, -1, 'Hunter - Steady Shot'), -- Shouldn't scale with SP.
(42243, 0, -1, 0.0837, -1, 'Hunter - Volley (Triggered)'), -- Shouldn't scale with SP.
(3674, -1, 0, -1, 0.023, 'Hunter - Black Arrow ($RAP*0.1 / number of ticks)'), -- Shouldn't scale with SP. Increase AP coefficient, based on DrDamage addon(3.3.5a).
@@ -33,7 +33,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- Mage
DELETE FROM `spell_bonus_data` WHERE `entry`=7269; -- Arcane Missiles Triggered Spell Rank 2
DELETE FROM `spell_bonus_data` WHERE `entry` IN(133, 44614, 44457, 44461);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(133, 1, 0, -1, -1, 'Mage - Fireball'), -- DoT componenet shouldn't scale.
(44614, 0.8571, 0, -1, -1, 'Mage - Frostfire Bolt'), -- DoT componenet shouldn't scale.
(44457, -1, 0.2, -1, -1, 'Mage - Living Bomb ($SP*0.8 / number of ticks)'), -- Direct damage bonus correction.
@@ -41,7 +41,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- Paladin
DELETE FROM `spell_bonus_data` WHERE `entry` IN(633, 54158, 20467, 20187, 31803, 53742, 31804, 53733);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(633, 0, -1, -1, -1, 'Paladin - Lay on Hands'), -- Shouldn't scale with SP.
(54158, 0.27, -1, 0.175, -1, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'), -- Increase coefficient, based on Wowwiki.com.
(20467, 0.14, -1, 0.115, -1, 'Paladin - Judgement of Command'), -- Decrease coefficient, based on Wowwiki.com.
@@ -55,7 +55,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
DELETE FROM `spell_bonus_data` WHERE `entry` IN(52983, 52954, 58985); -- Penance Heal Rank 2, Rank 3, Rank 4
DELETE FROM `spell_bonus_data` WHERE `entry` IN(52998, 52999, 53000); -- Penance Hurt Rank 2, Rank 3, Rank 4
DELETE FROM `spell_bonus_data` WHERE `entry` IN(7001);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(7001, -1, 0.626, -1, -1, 'Priest - Lightwell Renew ($SP*1.878 / number of ticks)'); -- Increase coefficient, based on DrDamage addon(3.3.5a).
-- Rogue
@@ -63,7 +63,7 @@ DELETE FROM `spell_bonus_data` WHERE `entry` IN(819, 11353, 11354, 25349, 26968,
DELETE FROM `spell_bonus_data` WHERE `entry` IN(8685, 8689, 11335, 11336, 11337, 26890, 57964, 57965); -- Instant Poison Rank 2, Rank 3, etc.
DELETE FROM `spell_bonus_data` WHERE `entry` IN(13222, 13223, 13224, 27189, 57974, 57975); -- Wound Poison Rank 2, Rank 3, etc.
DELETE FROM `spell_bonus_data` WHERE `entry` IN(32645, 2098, 703, 1776, 1943, 8680, 26688, 13218);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(32645, 0, -1, -1, -1, 'Rogue - Envenom'), -- Shouldn't scale with SP.
(2098, 0, -1, -1, -1, 'Rogue - Eviscerate'), -- Shouldn't scale with SP.
(703, -1, 0, -1, 0.07, 'Rogue - Garrote'), -- Shouldn't scale with SP.
diff --git a/sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql
index dc59f152e33..1f43c115d3b 100644
--- a/sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql
@@ -1,6 +1,6 @@
-- Death Knight
DELETE FROM `spell_bonus_data` WHERE `entry` IN (58621, 47632, 47633, 50444, 70890, 50526, 48982, 59754, 49184);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(58621, 0, 0, 0.08, 0, 'Death Knight - Glyph of Chains of Ice'), -- Shouldn't scale with SP.
(47632, 0, 0, 0.15, 0, 'Death Knight - Death Coil'), -- Shouldn't scale with SP.
(47633, 0, 0, 0.15, 0, 'Death Knight - Death Coil (Heal)'), -- Shouldn't scale with SP.
@@ -13,13 +13,13 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- Druid
DELETE FROM `spell_bonus_data` WHERE `entry` IN (33745, 9007);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(33745, 0, 0, 0.01, 0.01, 'Druid - Lacerate ($AP*0.05/number of ticks)'), -- Direct damage should scale with AP, based on DrDamage addon(3.3.5a).
(9007, 0, 0, 0, 0.03, 'Druid - Pounce Bleed (Triggered)'); -- Shouldn't scale with SP. Increase AP coefficient, based on DrDamage addon(3.3.5a) and Wowwiki.com.
-- Hunter
DELETE FROM `spell_bonus_data` WHERE `entry` IN (56641, 42243, 3674, 19306, 1495, 63468, 136);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(56641, 0, 0, 0.1, 0, 'Hunter - Steady Shot'), -- Shouldn't scale with SP.
(42243, 0, 0, 0.0837, 0, 'Hunter - Volley (Triggered)'), -- Shouldn't scale with SP.
(3674, 0, 0, 0, 0.023, 'Hunter - Black Arrow ($RAP*0.1 / number of ticks)'), -- Shouldn't scale with SP. Increase AP coefficient, based on DrDamage addon(3.3.5a).
@@ -30,7 +30,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- Mage
DELETE FROM `spell_bonus_data` WHERE `entry` IN (133, 44614, 44457, 44461);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(133, 1, 0, 0, 0, 'Mage - Fireball'), -- DoT componenet shouldn't scale.
(44614, 0.8571, 0, 0, 0, 'Mage - Frostfire Bolt'), -- DoT componenet shouldn't scale.
(44457, 0, 0.2, 0, 0, 'Mage - Living Bomb ($SP*0.8 / number of ticks)'), -- Direct damage bonus correction.
@@ -38,7 +38,7 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- Paladin
DELETE FROM `spell_bonus_data` WHERE `entry` IN (633, 54158, 20467, 20187, 31803, 53742, 31804, 53733);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(633, 0, 0, 0, 0, 'Paladin - Lay on Hands'), -- Shouldn't scale with SP.
(54158, 0.27, 0, 0.175, 0, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'), -- Increase coefficient, based on Wowwiki.com.
(20467, 0.14, 0, 0.115, 0, 'Paladin - Judgement of Command'), -- Decrease coefficient, based on Wowwiki.com.
@@ -50,12 +50,12 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
-- Priest
DELETE FROM `spell_bonus_data` WHERE `entry` = 7001;
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(7001, 0, 0.626, 0, 0, 'Priest - Lightwell Renew ($SP*1.878 / number of ticks)'); -- Increase coefficient, based on DrDamage addon(3.3.5a).
-- Rogue
DELETE FROM `spell_bonus_data` WHERE `entry` IN (32645, 2098, 703, 1776, 1943, 8680, 26688, 13218);
-INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(32645, 0, 0, 0, 0, 'Rogue - Envenom'), -- Shouldn't scale with SP.
(2098, 0, 0, 0, 0, 'Rogue - Eviscerate'), -- Shouldn't scale with SP.
(703, 0, 0, 0, 0.07, 'Rogue - Garrote'), -- Shouldn't scale with SP.
diff --git a/sql/old/3.3.5a/2012_06_16_01_world_creature.sql b/sql/old/3.3.5a/2012_06_16_01_world_creature.sql
index d44b568f79b..7fe69dff71f 100644
--- a/sql/old/3.3.5a/2012_06_16_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_16_01_world_creature.sql
@@ -1,6 +1,6 @@
-- Add missing Storm Totem spawn to Borean Tundra
SET @GUID := 12925;
DELETE FROM `creature` WHERE `guid`=@GUID;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,26048,571,1,1,0,0,3409.903,4128.829,18.13754,5.742133,300,0,0,1,0,0);
UPDATE `creature_template` SET `flags_extra`=`flags_extra`|16777216 WHERE `entry`=26048;
diff --git a/sql/old/3.3.5a/2012_06_17_02_world_creature.sql b/sql/old/3.3.5a/2012_06_17_02_world_creature.sql
index a309ada3498..73ffdb26ff8 100644
--- a/sql/old/3.3.5a/2012_06_17_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_17_02_world_creature.sql
@@ -2,7 +2,7 @@
SET @GUID := 42187;
SET @ENTRY := 26924;
DELETE FROM `creature` WHERE `guid`=@GUID;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,@ENTRY,571,1,2,0,0,4834.98,-4754.5,32.5689,3.97935,180,0,0,1,0,0);
-- Add Aura to Gan'jo
DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
diff --git a/sql/old/3.3.5a/2012_06_19_02_world_misc.sql b/sql/old/3.3.5a/2012_06_19_02_world_misc.sql
index 32aa493f4f7..2d79a5e43af 100644
--- a/sql/old/3.3.5a/2012_06_19_02_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_19_02_world_misc.sql
@@ -2,7 +2,7 @@
SET @GUID := 42875;
SET @ENTRY := 26257;
DELETE FROM `creature` WHERE `guid` IN (@GUID,@GUID+1);
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID,@ENTRY,571,1,1,0,0,3369.694,2528.735,197.4004,3.490659,180,0,0,1,0,0),
(@GUID+1,@ENTRY,571,1,1,0,0,3346.363,2534.127,197.4004,4.258604,180,0,0,1,0,0);
-- Add SAI
@@ -27,7 +27,7 @@ INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`
SET @NPC := 111304;
SET @PATH := @NPC*10;
DELETE FROM `creature` WHERE `guid`=@NPC;
-INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES
(@NPC,26276,571,1,1,0,0,3560.472,1769.351,171.9977,1.91463,120,0,0,1,0,2);
DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`) VALUES (@NPC,@PATH,50331648,1);
diff --git a/sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql b/sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql
index a9565d36934..f8f05fd9396 100644
--- a/sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql
+++ b/sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql
@@ -1,4 +1,4 @@
-- Add 10 reputation gaining from killing NPC Monstrous Kaliri towards Sha'tari Skyguard
-DELETE FROM `creature_onkill_reputation` WHERE `creature_id`=23051;
+DELETE FROM `creature_onkill_reputation` WHERE `creature_id`=23051;
INSERT INTO `creature_onkill_reputation` (`creature_id`,`RewOnKillRepFaction1`,`MaxStanding1`,`RewOnKillRepValue1`) VALUES
(23051,1031,7,10);
diff --git a/sql/old/3.3.5a/2012_07_14_01_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_07_14_01_world_creature_loot_template.sql
index 1b9c4f4448c..6a9f6998324 100644
--- a/sql/old/3.3.5a/2012_07_14_01_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_07_14_01_world_creature_loot_template.sql
@@ -2,8 +2,8 @@
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`= -100 WHERE `item`=23270;
-- update Al'ar loot
-SET @gear := 34053;
-SET @talon := 34377;
+SET @gear := 34053;
+SET @talon := 34377;
SET @Alar := 19514;
DELETE FROM `creature_loot_template` WHERE `entry`=@Alar;
diff --git a/sql/old/3.3.5a/2012_07_29_08_world_sai.sql b/sql/old/3.3.5a/2012_07_29_08_world_sai.sql
index 796578d3f00..9ef63caba11 100644
--- a/sql/old/3.3.5a/2012_07_29_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_07_29_08_world_sai.sql
@@ -8,7 +8,7 @@ SET @SPELL2:= 8599; -- Enrage
-- Add SmartAI for Kolphis Darkscale
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
-DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
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
(@ENTRY,0,0,0,62,0,100,0,8439,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kolphis Darkscale - On Gossip Select - Quest Credit'),
(@ENTRY,0,1,0,0,0,50,0,3000,3000,8000,8000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0,'Kolphis Darkscale - Combat - Whirlwind'),
@@ -31,6 +31,6 @@ INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8436,10540);
-- Add gossip_menu conditions
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=8436;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15,8436,0,0,0,9,0,@QUEST,0,0,0,0,'','Kolphis Darkscale - Show Gossip Option 0 - If on Quest Meeting at the Blackwing Coven'),
(14,8436,10540,0,0,28,0,@QUEST,0,0,0,0,'','Kolphis Darkscale - Show Gossip Menu - If Quest Meeting at the Blackwing Coven is Completed');
diff --git a/sql/old/3.3.5a/2012_07_29_09_world_gossip_menu_option.sql b/sql/old/3.3.5a/2012_07_29_09_world_gossip_menu_option.sql
index 66474bdb5e4..99089488941 100644
--- a/sql/old/3.3.5a/2012_07_29_09_world_gossip_menu_option.sql
+++ b/sql/old/3.3.5a/2012_07_29_09_world_gossip_menu_option.sql
@@ -1,12 +1,12 @@
UPDATE `gossip_menu_option` SET
- `npc_option_npcflag` = 65536,
+ `npc_option_npcflag` = 65536,
`option_icon` = 5
WHERE
- `menu_id` = 1293 AND
- `id` = 1;
+ `menu_id` = 1293 AND
+ `id` = 1;
UPDATE `gossip_menu_option` SET
- `npc_option_npcflag` = 128
+ `npc_option_npcflag` = 128
WHERE
- `menu_id` = 1293 AND
- `id` = 2;
+ `menu_id` = 1293 AND
+ `id` = 2;
diff --git a/sql/old/3.3.5a/2012_08_04_00_world_disables.sql b/sql/old/3.3.5a/2012_08_04_00_world_disables.sql
index f3f197ba23a..b25af0201d0 100644
--- a/sql/old/3.3.5a/2012_08_04_00_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_00_world_disables.sql
@@ -1,4 +1,4 @@
-DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (73,108,241,242,259,326,327,352,390,406,462,490,497,534,548,612,636,740,774,796,797,798,799,800,801,802,803,810,811,814,820,839,856,859,904,946,987,988,989,1128,1129,1155,1156,1157,1158,1161,1162,1163,1165,1263,1272,1277,1278,1279,1280,1281,1283,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1390,1397,1441,1443,1460,1461,1533,1537,1538,1659,1660,1662,1663,1664,2020,2971,3023,3064,3241,3383,3401,3403,3404,3405,3422,3423,3424,3425,3515,3516,3529,3530,3531,3622,3623,3624,3885,3910,4323,4541,4905,5053,5205,5207,5208,5209,5303,5304,5506,5512,5516,5520,5523,5532,5653,5659,5664,5665,5666,5667,5668,5669,5670,5671,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712,6003,6165,6202,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6841,6842,7069,7904,8002,8244,8245,8247,8248,8337,8339,8340,8444,8445,8448,8449,8450,8451,8452,8453,8454,8458,8459,8571,9031,9306,9307,9445,9596,9597,9599,9679,9745,10370,10402,10616,10743,10890,11127);
+DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (73,108,241,242,259,326,327,352,390,406,462,490,497,534,548,612,636,740,774,796,797,798,799,800,801,802,803,810,811,814,820,839,856,859,904,946,987,988,989,1128,1129,1155,1156,1157,1158,1161,1162,1163,1165,1263,1272,1277,1278,1279,1280,1281,1283,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1390,1397,1441,1443,1460,1461,1533,1537,1538,1659,1660,1662,1663,1664,2020,2971,3023,3064,3241,3383,3401,3403,3404,3405,3422,3423,3424,3425,3515,3516,3529,3530,3531,3622,3623,3624,3885,3910,4323,4541,4905,5053,5205,5207,5208,5209,5303,5304,5506,5512,5516,5520,5523,5532,5653,5659,5664,5665,5666,5667,5668,5669,5670,5671,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712,6003,6165,6202,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6841,6842,7069,7904,8002,8244,8245,8247,8248,8337,8339,8340,8444,8445,8448,8449,8450,8451,8452,8453,8454,8458,8459,8571,9031,9306,9307,9445,9596,9597,9599,9679,9745,10370,10402,10616,10743,10890,11127);
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
(1,73,0,'','','Deprecated quest: <TXT> No Reward'),
(1,108,0,'','','Deprecated quest: <TXT> Mystery Reward'),
diff --git a/sql/old/3.3.5a/2012_08_04_01_world_disables.sql b/sql/old/3.3.5a/2012_08_04_01_world_disables.sql
index ca9f62564d5..1d5a7488138 100644
--- a/sql/old/3.3.5a/2012_08_04_01_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_01_world_disables.sql
@@ -1,11 +1,11 @@
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (3631,4487,4488,4489,4490,4183,4184,4185,4186,4223,4224,402,550,620,785,908,909,9662,11179,11461,12087,12103,12108,12156,12426,12682,12764,12765,24222,24227,10452,10453,11125,11179,11437,11438,11444,11445,11974,12179,12228,12233,12590,14119,14147,14148,14149,14150);
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
-(1, 402,0,'','','Deprecated quest: Sirra is Busy'),
-(1, 550,0,'','','Deprecated quest: Battle of Hillsbrad'),
-(1, 620,0,'','','Deprecated quest: The Monogrammed Sash'),
-(1, 785,0,'','','Deprecated quest: A Strategic Alliance'),
-(1, 908,0,'','','Deprecated quest: A Strategic Alliance'),
-(1, 909,0,'','','Deprecated quest: A Strategic Alliance'),
+(1, 402,0,'','','Deprecated quest: Sirra is Busy'),
+(1, 550,0,'','','Deprecated quest: Battle of Hillsbrad'),
+(1, 620,0,'','','Deprecated quest: The Monogrammed Sash'),
+(1, 785,0,'','','Deprecated quest: A Strategic Alliance'),
+(1, 908,0,'','','Deprecated quest: A Strategic Alliance'),
+(1, 909,0,'','','Deprecated quest: A Strategic Alliance'),
(1,3631,0,'','','Deprecated quest: Summon Felsteed'),
(1,4487,0,'','','Deprecated quest: Summon Felsteed'),
(1,4488,0,'','','Deprecated quest: Summon Felsteed'),
@@ -18,33 +18,33 @@ INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comm
(1,4223,0,'','','Deprecated quest: The True Masters'),
(1,4224,0,'','','Deprecated quest: The True Masters'),
-- some random ones:
-(1, 9662,0,'','','Deprecated quest:Deprecated: Keanna''s Freedom'),
-(1,11179,0,'','','Deprecated quest:[Temporarily Deprecated Awaiting a New Mob]Finlay Is Gutless'),
-(1,11461,0,'','','Deprecated quest:DEPRECATED'),
-(1,12087,0,'','','Deprecated quest:A Little Help Here? DEPRECATED'),
-(1,12103,0,'','','Deprecated quest:DEPRECATED'),
-(1,12108,0,'','','Deprecated quest:DEPRECATED'),
-(1,12156,0,'','','Deprecated quest:DEPRECAED'),
-(1,12426,0,'','','Deprecated quest:DEPRECATED'),
-(1,12682,0,'','','Deprecated quest:Uncharted Territory (DEPRECATED)'),
-(1,12764,0,'','','Deprecated quest:The Secret to Kungaloosh (DEPRECATED)'),
-(1,12765,0,'','','Deprecated quest:Kungaloosh (DEPRECATED)'),
-(1,24222,0,'','','Deprecated quest:Call to Arms: Eye of the Storm DEPRECATED'),
-(1,24227,0,'','','Deprecated quest:DEPRECATED'),
-(1,10452,0,'','','Deprecated quest:DON''T USE [PH] Fel Orc 1'),
-(1,10453,0,'','','Deprecated quest:DON''T USE [PH] Fel Orc bread'),
-(1,11125,0,'','','Deprecated quest:[PH] New Hinterlands Quest'),
-(1,11437,0,'','','Deprecated quest:[PH] Beer Garden A'),
-(1,11438,0,'','','Deprecated quest:[PH] Beer Garden B'),
-(1,11444,0,'','','Deprecated quest:[PH] Beer Garden A'),
-(1,11445,0,'','','Deprecated quest:[PH] Beer Garden B'),
-(1,11974,0,'','','Deprecated quest:[ph] Now, When I Grow Up...'),
-(1,12179,0,'','','Deprecated quest:Specialization 1 [PH]'),
-(1,12228,0,'','','Deprecated quest:Reacquiring the Magic [PH]'),
-(1,12233,0,'','','Deprecated quest:[Depricated]Sewing Your Seed'),
-(1,12590,0,'','','Deprecated quest:Blahblah[PH]'),
-(1,14119,0,'','','Deprecated quest:Blank [PH]'),
-(1,14147,0,'','','Deprecated quest:Blank [PH]'),
-(1,14148,0,'','','Deprecated quest:Blank [PH]'),
-(1,14149,0,'','','Deprecated quest:Blank [PH]'),
+(1, 9662,0,'','','Deprecated quest:Deprecated: Keanna''s Freedom'),
+(1,11179,0,'','','Deprecated quest:[Temporarily Deprecated Awaiting a New Mob]Finlay Is Gutless'),
+(1,11461,0,'','','Deprecated quest:DEPRECATED'),
+(1,12087,0,'','','Deprecated quest:A Little Help Here? DEPRECATED'),
+(1,12103,0,'','','Deprecated quest:DEPRECATED'),
+(1,12108,0,'','','Deprecated quest:DEPRECATED'),
+(1,12156,0,'','','Deprecated quest:DEPRECAED'),
+(1,12426,0,'','','Deprecated quest:DEPRECATED'),
+(1,12682,0,'','','Deprecated quest:Uncharted Territory (DEPRECATED)'),
+(1,12764,0,'','','Deprecated quest:The Secret to Kungaloosh (DEPRECATED)'),
+(1,12765,0,'','','Deprecated quest:Kungaloosh (DEPRECATED)'),
+(1,24222,0,'','','Deprecated quest:Call to Arms: Eye of the Storm DEPRECATED'),
+(1,24227,0,'','','Deprecated quest:DEPRECATED'),
+(1,10452,0,'','','Deprecated quest:DON''T USE [PH] Fel Orc 1'),
+(1,10453,0,'','','Deprecated quest:DON''T USE [PH] Fel Orc bread'),
+(1,11125,0,'','','Deprecated quest:[PH] New Hinterlands Quest'),
+(1,11437,0,'','','Deprecated quest:[PH] Beer Garden A'),
+(1,11438,0,'','','Deprecated quest:[PH] Beer Garden B'),
+(1,11444,0,'','','Deprecated quest:[PH] Beer Garden A'),
+(1,11445,0,'','','Deprecated quest:[PH] Beer Garden B'),
+(1,11974,0,'','','Deprecated quest:[ph] Now, When I Grow Up...'),
+(1,12179,0,'','','Deprecated quest:Specialization 1 [PH]'),
+(1,12228,0,'','','Deprecated quest:Reacquiring the Magic [PH]'),
+(1,12233,0,'','','Deprecated quest:[Depricated]Sewing Your Seed'),
+(1,12590,0,'','','Deprecated quest:Blahblah[PH]'),
+(1,14119,0,'','','Deprecated quest:Blank [PH]'),
+(1,14147,0,'','','Deprecated quest:Blank [PH]'),
+(1,14148,0,'','','Deprecated quest:Blank [PH]'),
+(1,14149,0,'','','Deprecated quest:Blank [PH]'),
(1,14150,0,'','','Deprecated quest:Blank [PH]');
diff --git a/sql/old/3.3.5a/2012_08_04_02_world_disables.sql b/sql/old/3.3.5a/2012_08_04_02_world_disables.sql
index cccc7141d68..a01b1284293 100644
--- a/sql/old/3.3.5a/2012_08_04_02_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_02_world_disables.sql
@@ -1,23 +1,23 @@
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (7790,8152,8237,8971,8972,8973,8974,8975,8976,9296,9750,10145,10207,10549,11493,11588,11589,11997,12313,13840,24797);
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
-(1,7790,0,'','','Deprecated quest: REUSE'),
-(1,8152,0,'','','Deprecated quest: REUSE'),
-(1,8237,0,'','','Deprecated quest: REUSE'),
-(1,8971,0,'','','Deprecated quest: REUSE'),
-(1,8972,0,'','','Deprecated quest: REUSE'),
-(1,8973,0,'','','Deprecated quest: REUSE'),
-(1,8974,0,'','','Deprecated quest: REUSE'),
-(1,8975,0,'','','Deprecated quest: REUSE'),
-(1,8976,0,'','','Deprecated quest: REUSE'),
-(1,9296,0,'','','Deprecated quest: reuse'),
-(1,9750,0,'','','Deprecated quest: UNUSED Urgent Delivery'),
-(1,10145,0,'','','Deprecated quest: Mission: Sever the Tie UNUSED'),
-(1,10207,0,'','','Deprecated quest: Forward Base: Reaver''s Fall REUSE'),
-(1,10549,0,'','','Deprecated quest: REUSE'),
-(1,11493,0,'','','Deprecated quest: UNUSED'),
-(1,11588,0,'','','Deprecated quest: REUSE'),
-(1,11589,0,'','','Deprecated quest: REUSE'),
-(1,11997,0,'','','Deprecated quest: REUSE'),
-(1,12313,0,'','','Deprecated quest: UNUSED Save Brewfest!'),
-(1,13840,0,'','','Deprecated quest: REUSE'),
+(1,7790,0,'','','Deprecated quest: REUSE'),
+(1,8152,0,'','','Deprecated quest: REUSE'),
+(1,8237,0,'','','Deprecated quest: REUSE'),
+(1,8971,0,'','','Deprecated quest: REUSE'),
+(1,8972,0,'','','Deprecated quest: REUSE'),
+(1,8973,0,'','','Deprecated quest: REUSE'),
+(1,8974,0,'','','Deprecated quest: REUSE'),
+(1,8975,0,'','','Deprecated quest: REUSE'),
+(1,8976,0,'','','Deprecated quest: REUSE'),
+(1,9296,0,'','','Deprecated quest: reuse'),
+(1,9750,0,'','','Deprecated quest: UNUSED Urgent Delivery'),
+(1,10145,0,'','','Deprecated quest: Mission: Sever the Tie UNUSED'),
+(1,10207,0,'','','Deprecated quest: Forward Base: Reaver''s Fall REUSE'),
+(1,10549,0,'','','Deprecated quest: REUSE'),
+(1,11493,0,'','','Deprecated quest: UNUSED'),
+(1,11588,0,'','','Deprecated quest: REUSE'),
+(1,11589,0,'','','Deprecated quest: REUSE'),
+(1,11997,0,'','','Deprecated quest: REUSE'),
+(1,12313,0,'','','Deprecated quest: UNUSED Save Brewfest!'),
+(1,13840,0,'','','Deprecated quest: REUSE'),
(1,24797,0,'','','Deprecated quest: REUSE');
diff --git a/sql/old/3.3.5a/2012_08_04_03_world_disables.sql b/sql/old/3.3.5a/2012_08_04_03_world_disables.sql
index e2d1ca1ff6b..a0b7750702f 100644
--- a/sql/old/3.3.5a/2012_08_04_03_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_03_world_disables.sql
@@ -1,38 +1,38 @@
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (9754,9755,10215,11522,12445,12731,12923,13541,7797,7869,7870,7906,9378,9611,9880,9881,9908,9909,9949,9950,10088,10181,10214,10454,11197,11226,11577,11874,11937,12485,12600,13123,13210,13317,13990);
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
-(1,9754,0,'','','Deprecated quest: '),
-(1,9755,0,'','','Deprecated quest: '),
-(1,10215,0,'','','Deprecated quest: '),
-(1,11522,0,'','','Deprecated quest: '),
-(1,12445,0,'','','Deprecated quest: '),
-(1,12731,0,'','','Deprecated quest: '),
-(1,12923,0,'','','Deprecated quest: '),
-(1,13541,0,'','','Deprecated quest: '),
--- some others that contain a -
-(1,7797,0,'','','Deprecated quest: Dimensional Ripper - Everlook'),
-(1,7869,0,'','','Deprecated quest: test quest - do not use'),
-(1,7870,0,'','','Deprecated quest: test quest2 - do not use'),
-(1,7906,0,'','','Deprecated quest: Darkmoon Cards - Beasts'),
-(1,9378,0,'','','Deprecated quest: DND FLAG The Dread Citadel - Naxxramas'),
-(1,9611,0,'','','Deprecated quest: Azuremyst: aa - A - Quest Flag 000'),
-(1,9880,0,'','','Deprecated quest: Hellfire Penninsula: -pn - A - ToWoW - Hellfire Turnin Cap'),
-(1,9881,0,'','','Deprecated quest: Hellfire Penninsula: -pn - H - ToWoW - Hellfire Turnin Cap'),
-(1,9908,0,'','','Deprecated quest: Hellfire Penninsula: -pn - A - ToWoW - Hellfire Turnin'),
-(1,9909,0,'','','Deprecated quest: Hellfire Penninsula: -pn - H - ToWoW - Hellfire Turnin'),
-(1,9949,0,'','','Deprecated quest: A Bird''s-Eye View'),
-(1,9950,0,'','','Deprecated quest: A Bird''s-Eye View'),
-(1,10088,0,'','','Deprecated quest: When This Mine''s a-Rockin'''),
-(1,10181,0,'','','Deprecated quest: Collector''s Edition: -pn - E - FLAG'),
-(1,10214,0,'','','Deprecated quest: When This Mine''s a-Rockin'''),
-(1,10454,0,'','','Deprecated quest: FLAG - OFF THE RAILS'),
-(1,11197,0,'','','Deprecated quest: ZZOLD Upper Deck Promo - Ghost Wolf Mount OLD'),
-(1,11226,0,'','','Deprecated quest: Upper Deck Promo - Spectral Tiger Mount'),
-(1,11577,0,'','','Deprecated quest: WoW Collector''s Edition: - DEM - E - FLAG'),
-(1,11874,0,'','','Deprecated quest: Upper Deck Promo - Rocket Mount'),
-(1,11937,0,'','','Deprecated quest: FLAG - all torch return quests are complete'),
-(1,12485,0,'','','Deprecated quest: Howling Fjord: aa - A - LK FLAG'),
-(1,12600,0,'','','Deprecated quest: Upper Deck Promo - Bear Mount'),
-(1,13123,0,'','','Deprecated quest: WotLK Collector''s Edition: - DEM - E - FLAG'),
-(1,13210,0,'','','Deprecated quest: Blizzard Account: - DEM - E - FLAG'),
-(1,13317,0,'','','Deprecated quest: ----'),
-(1,13990,0,'','','Deprecated quest: Upper Deck Promo - Chicken Mount');
+(1,9754,0,'','','Deprecated quest: '),
+(1,9755,0,'','','Deprecated quest: '),
+(1,10215,0,'','','Deprecated quest: '),
+(1,11522,0,'','','Deprecated quest: '),
+(1,12445,0,'','','Deprecated quest: '),
+(1,12731,0,'','','Deprecated quest: '),
+(1,12923,0,'','','Deprecated quest: '),
+(1,13541,0,'','','Deprecated quest: '),
+-- some others that contain a -
+(1,7797,0,'','','Deprecated quest: Dimensional Ripper - Everlook'),
+(1,7869,0,'','','Deprecated quest: test quest - do not use'),
+(1,7870,0,'','','Deprecated quest: test quest2 - do not use'),
+(1,7906,0,'','','Deprecated quest: Darkmoon Cards - Beasts'),
+(1,9378,0,'','','Deprecated quest: DND FLAG The Dread Citadel - Naxxramas'),
+(1,9611,0,'','','Deprecated quest: Azuremyst: aa - A - Quest Flag 000'),
+(1,9880,0,'','','Deprecated quest: Hellfire Penninsula: -pn - A - ToWoW - Hellfire Turnin Cap'),
+(1,9881,0,'','','Deprecated quest: Hellfire Penninsula: -pn - H - ToWoW - Hellfire Turnin Cap'),
+(1,9908,0,'','','Deprecated quest: Hellfire Penninsula: -pn - A - ToWoW - Hellfire Turnin'),
+(1,9909,0,'','','Deprecated quest: Hellfire Penninsula: -pn - H - ToWoW - Hellfire Turnin'),
+(1,9949,0,'','','Deprecated quest: A Bird''s-Eye View'),
+(1,9950,0,'','','Deprecated quest: A Bird''s-Eye View'),
+(1,10088,0,'','','Deprecated quest: When This Mine''s a-Rockin'''),
+(1,10181,0,'','','Deprecated quest: Collector''s Edition: -pn - E - FLAG'),
+(1,10214,0,'','','Deprecated quest: When This Mine''s a-Rockin'''),
+(1,10454,0,'','','Deprecated quest: FLAG - OFF THE RAILS'),
+(1,11197,0,'','','Deprecated quest: ZZOLD Upper Deck Promo - Ghost Wolf Mount OLD'),
+(1,11226,0,'','','Deprecated quest: Upper Deck Promo - Spectral Tiger Mount'),
+(1,11577,0,'','','Deprecated quest: WoW Collector''s Edition: - DEM - E - FLAG'),
+(1,11874,0,'','','Deprecated quest: Upper Deck Promo - Rocket Mount'),
+(1,11937,0,'','','Deprecated quest: FLAG - all torch return quests are complete'),
+(1,12485,0,'','','Deprecated quest: Howling Fjord: aa - A - LK FLAG'),
+(1,12600,0,'','','Deprecated quest: Upper Deck Promo - Bear Mount'),
+(1,13123,0,'','','Deprecated quest: WotLK Collector''s Edition: - DEM - E - FLAG'),
+(1,13210,0,'','','Deprecated quest: Blizzard Account: - DEM - E - FLAG'),
+(1,13317,0,'','','Deprecated quest: ----'),
+(1,13990,0,'','','Deprecated quest: Upper Deck Promo - Chicken Mount');
diff --git a/sql/old/3.3.5a/2012_08_04_04_world_disables.sql b/sql/old/3.3.5a/2012_08_04_04_world_disables.sql
index 14a0d6f94aa..ecbafc45e58 100644
--- a/sql/old/3.3.5a/2012_08_04_04_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_04_world_disables.sql
@@ -1,34 +1,34 @@
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (11335,11336,11337,11338,11339,11340,11341,11342,13405,13407,13427,13428,14163,14164,14178,14179,14180,14181,14182,14183,24216,24217,24218,24219,24220,24221,24223,24224,24225,24226,24426,24427);
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
-(1,11335,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,11336,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
-(1,11337,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
-(1,11338,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,11339,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,11340,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
-(1,11341,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
-(1,11342,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,13405,0,'','','Deprecated quest: Call to Arms: Strand of the Ancients'),
-(1,13407,0,'','','Deprecated quest: Call to Arms: Strand of the Ancients'),
-(1,13427,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
-(1,13428,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
-(1,14163,0,'','','Deprecated quest: Call to Arms: Isle of Conquest'),
-(1,14164,0,'','','Deprecated quest: Call to Arms: Isle of Conquest'),
-(1,14178,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,14179,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
-(1,14180,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,14181,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,14182,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
-(1,14183,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24216,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24217,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24218,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24219,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24220,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,24221,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,24223,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,24224,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24225,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
-(1,24226,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
-(1,24426,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
+(1,11335,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,11336,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
+(1,11337,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
+(1,11338,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,11339,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,11340,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
+(1,11341,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
+(1,11342,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,13405,0,'','','Deprecated quest: Call to Arms: Strand of the Ancients'),
+(1,13407,0,'','','Deprecated quest: Call to Arms: Strand of the Ancients'),
+(1,13427,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
+(1,13428,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
+(1,14163,0,'','','Deprecated quest: Call to Arms: Isle of Conquest'),
+(1,14164,0,'','','Deprecated quest: Call to Arms: Isle of Conquest'),
+(1,14178,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,14179,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
+(1,14180,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,14181,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,14182,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
+(1,14183,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24216,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24217,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24218,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24219,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24220,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,24221,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,24223,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,24224,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24225,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
+(1,24226,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
+(1,24426,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
(1,24427,0,'','','Deprecated quest: Call to Arms: Alterac Valley');
diff --git a/sql/old/3.3.5a/2012_08_04_05_world_disables.sql b/sql/old/3.3.5a/2012_08_04_05_world_disables.sql
index ce123e4e5be..66d475a39b8 100644
--- a/sql/old/3.3.5a/2012_08_04_05_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_05_world_disables.sql
@@ -1,28 +1,28 @@
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (8384,8386,8389,8390,8391,8392,8397,8398,8404,8405,8406,8407,8408,8431,8432,8433,8434,8435,8440,8441,8442,8443,8567,8568,8569,8570);
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
-(1,8384,0,'','','Deprecated quest: Claiming Arathi Basin'),
-(1,8386,0,'','','Deprecated quest: Fight for Warsong Gulch'),
-(1,8389,0,'','','Deprecated quest: Battle of Warsong Gulch'),
-(1,8390,0,'','','Deprecated quest: Conquering Arathi Basin'),
-(1,8391,0,'','','Deprecated quest: Claiming Arathi Basin'),
-(1,8392,0,'','','Deprecated quest: Claiming Arathi Basin'),
-(1,8397,0,'','','Deprecated quest: Claiming Arathi Basin'),
-(1,8398,0,'','','Deprecated quest: Claiming Arathi Basin'),
-(1,8404,0,'','','Deprecated quest: Fight for Warsong Gulch'),
-(1,8405,0,'','','Deprecated quest: Fight for Warsong Gulch'),
-(1,8406,0,'','','Deprecated quest: Fight for Warsong Gulch'),
-(1,8407,0,'','','Deprecated quest: Fight for Warsong Gulch'),
-(1,8408,0,'','','Deprecated quest: Fight for Warsong Gulch'),
-(1,8431,0,'','','Deprecated quest: Battle of Warsong Gulch'),
-(1,8432,0,'','','Deprecated quest: Battle of Warsong Gulch'),
-(1,8433,0,'','','Deprecated quest: Battle of Warsong Gulch'),
-(1,8434,0,'','','Deprecated quest: Battle of Warsong Gulch'),
-(1,8435,0,'','','Deprecated quest: Battle of Warsong Gulch'),
-(1,8440,0,'','','Deprecated quest: Conquering Arathi Basin'),
-(1,8441,0,'','','Deprecated quest: Conquering Arathi Basin'),
-(1,8442,0,'','','Deprecated quest: Conquering Arathi Basin'),
-(1,8443,0,'','','Deprecated quest: Conquering Arathi Basin'),
-(1,8567,0,'','','Deprecated quest: Past Victories in Warsong Gulch'),
-(1,8568,0,'','','Deprecated quest: Past Victories in Warsong Gulch'),
-(1,8569,0,'','','Deprecated quest: Past Efforts in Warsong Gulch'),
-(1,8570,0,'','','Deprecated quest: Past Efforts in Warsong Gulch');
+(1,8384,0,'','','Deprecated quest: Claiming Arathi Basin'),
+(1,8386,0,'','','Deprecated quest: Fight for Warsong Gulch'),
+(1,8389,0,'','','Deprecated quest: Battle of Warsong Gulch'),
+(1,8390,0,'','','Deprecated quest: Conquering Arathi Basin'),
+(1,8391,0,'','','Deprecated quest: Claiming Arathi Basin'),
+(1,8392,0,'','','Deprecated quest: Claiming Arathi Basin'),
+(1,8397,0,'','','Deprecated quest: Claiming Arathi Basin'),
+(1,8398,0,'','','Deprecated quest: Claiming Arathi Basin'),
+(1,8404,0,'','','Deprecated quest: Fight for Warsong Gulch'),
+(1,8405,0,'','','Deprecated quest: Fight for Warsong Gulch'),
+(1,8406,0,'','','Deprecated quest: Fight for Warsong Gulch'),
+(1,8407,0,'','','Deprecated quest: Fight for Warsong Gulch'),
+(1,8408,0,'','','Deprecated quest: Fight for Warsong Gulch'),
+(1,8431,0,'','','Deprecated quest: Battle of Warsong Gulch'),
+(1,8432,0,'','','Deprecated quest: Battle of Warsong Gulch'),
+(1,8433,0,'','','Deprecated quest: Battle of Warsong Gulch'),
+(1,8434,0,'','','Deprecated quest: Battle of Warsong Gulch'),
+(1,8435,0,'','','Deprecated quest: Battle of Warsong Gulch'),
+(1,8440,0,'','','Deprecated quest: Conquering Arathi Basin'),
+(1,8441,0,'','','Deprecated quest: Conquering Arathi Basin'),
+(1,8442,0,'','','Deprecated quest: Conquering Arathi Basin'),
+(1,8443,0,'','','Deprecated quest: Conquering Arathi Basin'),
+(1,8567,0,'','','Deprecated quest: Past Victories in Warsong Gulch'),
+(1,8568,0,'','','Deprecated quest: Past Victories in Warsong Gulch'),
+(1,8569,0,'','','Deprecated quest: Past Efforts in Warsong Gulch'),
+(1,8570,0,'','','Deprecated quest: Past Efforts in Warsong Gulch');
diff --git a/sql/old/3.3.5a/2012_08_04_10_world_disables.sql b/sql/old/3.3.5a/2012_08_04_10_world_disables.sql
index 1d991eafef5..b911e33fd3c 100644
--- a/sql/old/3.3.5a/2012_08_04_10_world_disables.sql
+++ b/sql/old/3.3.5a/2012_08_04_10_world_disables.sql
@@ -19,8 +19,8 @@ INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comm
(1,12493,0,'','','Deprecated quest: PvP Test'),
(1,12911,0,'','','Deprecated quest: Kill Credit Test'),
(1,13649,0,'','','Deprecated quest: Justin''s Fun Test'),
-(1,14106,0,'','','Deprecated quest: Na Kada''s Quest Test'),
--- containing "flag"
+(1,14106,0,'','','Deprecated quest: Na Kada''s Quest Test'),
+-- containing "flag"
(1,9713,0,'','','Deprecated quest: Glowcap Harvesting Enabling Flag'),
(1,9926,0,'','','Deprecated quest: FLAG Shadow Council/Warmaul Questline'),
(1,11087,0,'','','Deprecated quest: HYJAL FLAG'),
diff --git a/sql/old/3.3.5a/2012_08_10_05_world_quest_template.sql b/sql/old/3.3.5a/2012_08_10_05_world_quest_template.sql
index a65e7e76a44..a11657dc664 100644
--- a/sql/old/3.3.5a/2012_08_10_05_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_08_10_05_world_quest_template.sql
@@ -1,2 +1,2 @@
--- Change $B$$B at end of details text to $B$B
+-- Change $B$$B at end of details text to $B$B
UPDATE `quest_template` SET `Details`='Brave traveler, the centaurs have increased their attacks in this area. Freewind Post must know about this renewed harassment immediately! Seek Cliffwatcher Longhorn at Freewind Post to the southeast and give him this urgent message.$b$bBe warned, avoid the Grimtotem Clan nearby... they have been acting strange toward us lately.$B$B' WHERE `Id`=4542;
diff --git a/sql/old/3.3.5a/2012_08_10_06_world_creature.sql b/sql/old/3.3.5a/2012_08_10_06_world_creature.sql
index 3d59f06db78..611a2d1e934 100644
--- a/sql/old/3.3.5a/2012_08_10_06_world_creature.sql
+++ b/sql/old/3.3.5a/2012_08_10_06_world_creature.sql
@@ -1,8 +1,8 @@
SET @CGUID:=42571; -- Need 2
DELETE FROM `creature` WHERE `id` IN (30395,30469);
-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
+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,30395,571,1,1,0,0,8348.886,-2509.476,1147.369,3.700098,120,0,0,12600,0,0,0,0,0),
-(@CGUID+1,30469,571,1,1,0,0,7620.369,-1609.421,969.6507,0.767944,120,0,0,12600,0,0,0,0,0);
+(@CGUID+1,30469,571,1,1,0,0,7620.369,-1609.421,969.6507,0.767944,120,0,0,12600,0,0,0,0,0);
-- Template updates
UPDATE `creature_template` SET `npcflag`=`npcflag`|3 WHERE `entry`=30395; -- Chieftain Swiftspear
diff --git a/sql/old/3.3.5a/2012_08_20_02_world_wintergrasp_creatures.sql b/sql/old/3.3.5a/2012_08_20_02_world_wintergrasp_creatures.sql
index 1e75f37d32f..b3a91b91a58 100644
--- a/sql/old/3.3.5a/2012_08_20_02_world_wintergrasp_creatures.sql
+++ b/sql/old/3.3.5a/2012_08_20_02_world_wintergrasp_creatures.sql
@@ -28,7 +28,7 @@ UPDATE `creature_model_info` SET `bounding_radius`=0.305,`combat_reach`=5,`gende
DELETE FROM `creature_template_addon` WHERE `entry` IN (31841,31842,30400,30499,30489,30869,31036,31051,31052,31054,31108,31109,31153,32294,39172,30870,31053,31091,31101,31102,31106,31107,31151,32296,39173,30740,32629,28319,28366,32627,28312,28094,27881,30739);
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
-(31841,0,0,1,0, '58729'), -- Taunka Spirit Guide (Spiritual Immunity, Spirit Heal Channel) FIX: Do we need the spell that revives players here (22011)? It has a duration (found in sniffs).
+(31841,0,0,1,0, '58729'), -- Taunka Spirit Guide (Spiritual Immunity, Spirit Heal Channel) FIX: Do we need the spell that revives players here (22011)? It has a duration (found in sniffs).
(31842,0,0,1,0, '58729'), -- Dwarven Spirit Guide This spell (and the spell it triggers, are used in the "ressurect system" in Battleground.cpp
(30400,0,0,1,0, NULL), -- Goblin Mechanic
(30499,0,0,1,0, NULL), -- Gnomish Engineer
diff --git a/sql/old/3.3.5a/2012_08_20_06_world_wintergrasp_spells.sql b/sql/old/3.3.5a/2012_08_20_06_world_wintergrasp_spells.sql
index cb2bd219e40..43a1cd1ad9e 100644
--- a/sql/old/3.3.5a/2012_08_20_06_world_wintergrasp_spells.sql
+++ b/sql/old/3.3.5a/2012_08_20_06_world_wintergrasp_spells.sql
@@ -58,12 +58,12 @@ INSERT INTO `spell_area` (`spell`,`area`,`autocast`) VALUES
-- Spell scripts. replace with SAI
DELETE FROM `spell_scripts` WHERE `id`=49899;
INSERT INTO `spell_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
-(49899,0,1,406,0,0,0,0,0,0); -- Activate Robotic Arms
+(49899,0,1,406,0,0,0,0,0,0); -- Activate Robotic Arms
-- Spell Target position for Wintergrasp Graveyard spells
DELETE FROM `spell_target_position` WHERE `id` IN (59760,59762,59763,59765,59766,59767,59769);
INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
-(59760,571,5537.986,2897.493,517.057,4.819249), -- Teleport: Fortress Graveyard
+(59760,571,5537.986,2897.493,517.057,4.819249), -- Teleport: Fortress Graveyard
(59762,571,5104.750,2300.940,368.579,0.733038), -- Teleport: Sunken Ring "area 4538"
(59763,571,5099.120,3466.036,368.484,5.317802), -- Teleport: Broken Temple "area 4539 & 4589"
(59765,571,5032.454,3711.382,372.468,3.971623), -- Teleport: Horde Landing Zone
diff --git a/sql/old/3.3.5a/2012_08_20_07_world_wintergrasp_texts.sql b/sql/old/3.3.5a/2012_08_20_07_world_wintergrasp_texts.sql
index 090c5350c74..2b94bf75a41 100644
--- a/sql/old/3.3.5a/2012_08_20_07_world_wintergrasp_texts.sql
+++ b/sql/old/3.3.5a/2012_08_20_07_world_wintergrasp_texts.sql
@@ -1,4 +1,4 @@
--- Unused yet:
+-- Unused yet:
-- Wintergrasp is under attack!
-- Wintergrasp Fortress is under attack!
-- Winter's Edge Tower is under attack!
diff --git a/sql/old/3.3.5a/2012_08_27_06_world_sai.sql b/sql/old/3.3.5a/2012_08_27_06_world_sai.sql
index 8b1aafd1558..e95498f6bef 100644
--- a/sql/old/3.3.5a/2012_08_27_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_08_27_06_world_sai.sql
@@ -35,9 +35,9 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr
(@Ghoul,1,5,'BRAINNNS!',12,0,50,0,0,0,'Decomposing Ghoul - OOC');
-- Add conditions for spell Shining Light to hit only Ghouls
DELETE FROM `conditions` WHERE `SourceEntry`=@Spell AND `SourceTypeOrReferenceId`=13;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13,1,@Spell,0,0,31,0,3,@Ghoul,0,0,0,'', 'Shinning Light can only hit Decomposing Ghouls');
-- Add conditions for spell Shining Light to be available only, if on quest
DELETE FROM `conditions` WHERE `SourceEntry`=@Spell AND `SourceTypeOrReferenceId`=17;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17,0,@Spell,0,0,9,0,11288,0,0,0,0,'', 'Shinning Light can only hit targets on the quest');
diff --git a/sql/old/3.3.5a/2012_08_27_08_world_misc.sql b/sql/old/3.3.5a/2012_08_27_08_world_misc.sql
index 62a57cd42de..3847271dc15 100644
--- a/sql/old/3.3.5a/2012_08_27_08_world_misc.sql
+++ b/sql/old/3.3.5a/2012_08_27_08_world_misc.sql
@@ -9,7 +9,7 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ
-- SAI
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28013;
DELETE FROM `smart_scripts` WHERE `entryorguid`=28013 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
+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
(28013,0,0,0,8,0,100,0,48455,0,0,0,33,28013,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fire Upon the Waters Kill Credit Bunny - On SpellHit Apothecary's Burning Water - Call KilledMonster Fire Upon the Waters Kill Credit Bunny");
-- Ensure spell only works on Fire Upon the Waters Kill Credit Bunny
diff --git a/sql/old/3.3.5a/2012_08_29_00_world_blood_furnace.sql b/sql/old/3.3.5a/2012_08_29_00_world_blood_furnace.sql
index 85b493da202..692ce27ebcd 100644
--- a/sql/old/3.3.5a/2012_08_29_00_world_blood_furnace.sql
+++ b/sql/old/3.3.5a/2012_08_29_00_world_blood_furnace.sql
@@ -15,7 +15,7 @@ UPDATE `creature_template` SET `unit_flags`=`unit_flags`|256|512|2 WHERE `entry`
-- CREATURE
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+148 OR `map`=542;
-INSERT INTO `creature`(`guid`,`id`,`map`,`spawnMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`curhealth`,`curmana`,`MovementType`) VALUES
+INSERT INTO `creature`(`guid`,`id`,`map`,`spawnMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`curhealth`,`curmana`,`MovementType`) VALUES
(@GUID+88,17414,542,3,317.15,189.009,10.0509,1.88412,7200,10472,5875,0),
(@GUID+92,17414,542,3,436.311,198.522,11.4389,1.34468,7200,10472,5875,0),
(@GUID+91,17414,542,3,345.706,198.519,11.139,1.6879,7200,10472,5875,0),
diff --git a/sql/old/3.3.5a/2012_08_31_00_world_command.sql b/sql/old/3.3.5a/2012_08_31_00_world_command.sql
index c0686d6d907..2862c0299e9 100644
--- a/sql/old/3.3.5a/2012_08_31_00_world_command.sql
+++ b/sql/old/3.3.5a/2012_08_31_00_world_command.sql
@@ -3,7 +3,7 @@ DELETE FROM `command` WHERE `name`='taxicheat';
DELETE FROM `command` WHERE `name`='waterwalk';
DELETE FROM `command` WHERE `name`='cheat' OR `name` LIKE 'cheat%';
-INSERT INTO `command` (`name`, `security`, `help`) VALUES
+INSERT INTO `command` (`name`, `security`, `help`) VALUES
('cheat', 2, 'Syntax: .cheat $subcommand\r\nType .cheat to see the list of possible subcommands or .help cheat $subcommand to see info on subcommands'),
('cheat god', 2, 'Syntax: .cheat god [on/off]\r\nEnables or disables your character''s ability to take damage.'),
('cheat casttime', 2, 'Syntax: .cheat casttime [on/off]\r\nEnables or disables your character''s spell cast times.'),
diff --git a/sql/old/3.3.5a/2012_09_10_00_world_game_event.sql b/sql/old/3.3.5a/2012_09_10_00_world_game_event.sql
index edd6413379c..d7c17b298ce 100644
--- a/sql/old/3.3.5a/2012_09_10_00_world_game_event.sql
+++ b/sql/old/3.3.5a/2012_09_10_00_world_game_event.sql
@@ -1,3 +1,3 @@
-UPDATE `game_event` SET `start_time`='2012-11-04 00:01:00' WHERE `eventEntry`=3; -- Darkmoon Faire - Terrokkar
-UPDATE `game_event` SET `start_time`='2012-12-02 00:01:00' WHERE `eventEntry`=4; -- Darkmoon Faire - Elwynn
+UPDATE `game_event` SET `start_time`='2012-11-04 00:01:00' WHERE `eventEntry`=3; -- Darkmoon Faire - Terrokkar
+UPDATE `game_event` SET `start_time`='2012-12-02 00:01:00' WHERE `eventEntry`=4; -- Darkmoon Faire - Elwynn
UPDATE `game_event` SET `start_time`='2012-10-07 00:01:00' WHERE `eventEntry`=5; -- Darkmoon Faire - Mulgore
diff --git a/sql/old/3.3.5a/2012_09_13_01_world_fires_over_skettis.sql b/sql/old/3.3.5a/2012_09_13_01_world_fires_over_skettis.sql
index de9ba5a78fe..8ef62847349 100644
--- a/sql/old/3.3.5a/2012_09_13_01_world_fires_over_skettis.sql
+++ b/sql/old/3.3.5a/2012_09_13_01_world_fires_over_skettis.sql
@@ -8,7 +8,7 @@ SET @SUMMEGG := 39843;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@TRIGGER;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER*100 AND `source_type`=9;
-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
+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
(@TRIGGER,0,0,0,25,0,100,0,0,0,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On spawn/reset - Summon Monstrous Kaliri Egg (object wild)'),
(@TRIGGER,0,1,2,8,0,100,0,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit to invoker party'),
(@TRIGGER,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@EGG,1,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Despawn'),
diff --git a/sql/updates/characters/2012_11_18_00_character_calendar.sql b/sql/updates/characters/2012_11_18_00_character_calendar.sql
new file mode 100644
index 00000000000..a3e7c352788
--- /dev/null
+++ b/sql/updates/characters/2012_11_18_00_character_calendar.sql
@@ -0,0 +1,26 @@
+DROP TABLE IF EXISTS `calendar_events`;
+CREATE TABLE IF NOT EXISTS `calendar_events` (
+ `id` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `creator` int(10) unsigned NOT NULL DEFAULT '0',
+ `title` varchar(255) NOT NULL DEFAULT '',
+ `description` varchar(255) NOT NULL DEFAULT '',
+ `type` tinyint(1) unsigned NOT NULL DEFAULT '4',
+ `dungeon` int(10) NOT NULL DEFAULT '-1',
+ `eventtime` int(10) unsigned NOT NULL DEFAULT '0',
+ `flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `time2` int(10) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS `calendar_invites`;
+CREATE TABLE IF NOT EXISTS `calendar_invites` (
+ `id` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `event` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `invitee` int(10) unsigned NOT NULL DEFAULT '0',
+ `sender` int(10) unsigned NOT NULL DEFAULT '0',
+ `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `statustime` int(10) unsigned NOT NULL DEFAULT '0',
+ `rank` tinyint(1) unsigned NOT NULL DEFAULT '0',
+ `text` varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/sql/updates/world/2012_09_16_01_world_creature_template_addon.sql b/sql/updates/world/2012_09_16_01_world_creature_template_addon.sql
index 15415e856f3..c23a38cd058 100644
--- a/sql/updates/world/2012_09_16_01_world_creature_template_addon.sql
+++ b/sql/updates/world/2012_09_16_01_world_creature_template_addon.sql
@@ -1,3 +1,3 @@
DELETE FROM `creature_template_addon` WHERE `entry`=28670; -- Frostbrood Vanquisher
-INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(28670,0,0,0x3000000,0x1,0,'53112');
diff --git a/sql/updates/world/2012_09_17_02_world_misc.sql b/sql/updates/world/2012_09_17_02_world_misc.sql
index 0b6a3b2237c..378833dfc52 100644
--- a/sql/updates/world/2012_09_17_02_world_misc.sql
+++ b/sql/updates/world/2012_09_17_02_world_misc.sql
@@ -1,6 +1,6 @@
-- The Call to Command (6144, 6145, 6146, 14349, 14350) quest chain fix by nelegalno
-- The first 2 quests in the chain ware replaced with new ones after the removal of Varimathras (2425) but players that completed
--- the old quests shouldn't get the new ones and the third quest Nathanos' Ruse (6146) should require 6145 or 14350 completed
+-- the old quests shouldn't get the new ones and the third quest Nathanos' Ruse (6146) should require 6145 or 14350 completed
-- The Call to Command ExclusiveGroup
UPDATE `quest_template` SET `ExclusiveGroup` = 6144 WHERE `Id` = 6144; -- The Call to Command (6144) quest
diff --git a/sql/updates/world/2012_09_22_01_world_i_was_a_lot_of_things.sql b/sql/updates/world/2012_09_22_01_world_i_was_a_lot_of_things.sql
index 1682d9f699b..95fc92daa76 100644
--- a/sql/updates/world/2012_09_22_01_world_i_was_a_lot_of_things.sql
+++ b/sql/updates/world/2012_09_22_01_world_i_was_a_lot_of_things.sql
@@ -2,7 +2,7 @@
UPDATE `creature_template` SET `AIName`='',`ScriptName`='npc_shadowmoon_tuber_node',`flags_extra`=`flags_extra`|128 WHERE `entry`=21347;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=36652;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
(13,1,36652,31,3,21347,'Tuber Whistle targets Shadowmoon Valley Tuber Node');
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=21195;
@@ -17,7 +17,7 @@ SET @BOAR_GUID = 77832; -- 8
DELETE FROM `creature` WHERE `id`=21347 OR `guid` BETWEEN @TRIGGER_GUID AND @TRIGGER_GUID + 9;
SET @TRIGGER_GUID = @TRIGGER_GUID - 1;
-INSERT INTO `creature`(`guid`,`id`,`map`,`phaseMask`,`position_x`,`position_y`,`position_z`)
+INSERT INTO `creature`(`guid`,`id`,`map`,`phaseMask`,`position_x`,`position_y`,`position_z`)
SELECT (SELECT @TRIGGER_GUID:=@TRIGGER_GUID+1),21347,`map`,3,`position_x`,`position_y`,`position_z` FROM `gameobject` WHERE `id`=184701 LIMIT 10;
DELETE FROM `creature` WHERE (`id`=21195 AND `map`=530) OR `guid` BETWEEN @BOAR_GUID AND @BOAR_GUID + 7;
diff --git a/sql/updates/world/2012_09_24_02_world_misc.sql b/sql/updates/world/2012_09_24_02_world_misc.sql
index bd97308d7c6..b4cf7fda0a5 100644
--- a/sql/updates/world/2012_09_24_02_world_misc.sql
+++ b/sql/updates/world/2012_09_24_02_world_misc.sql
@@ -82,7 +82,7 @@ UPDATE `creature_template` SET `spell1` = 56746, `spell2` = 56748, `spell3` = 56
-- Fix Brann's Communicator Closes #5835 author gecko32
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=61122 AND `spell_effect`=55038;
-INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(61122, 55038, 0, 'Contact Brann');
-- Fix Black Bruise proc Scaling author Vincent-Michael Closes #7040
diff --git a/sql/updates/world/2012_09_24_03_world_misc.sql b/sql/updates/world/2012_09_24_03_world_misc.sql
index a043ff60fc5..3bcb40f79c0 100644
--- a/sql/updates/world/2012_09_24_03_world_misc.sql
+++ b/sql/updates/world/2012_09_24_03_world_misc.sql
@@ -66,7 +66,7 @@ UPDATE `quest_template` SET `NextQuestIdChain` = 8736 WHERE `Id` = 8735;
-- Azuregos's Magical Ledger > Translating the Ledger
UPDATE `quest_template` SET `NextQuestIdChain` = 8576 WHERE `Id` = 8575;
--- Hive'Zora Scout Report (8534), Hive'Regal Scout Report (8738) and Hive'Ashi Scout Report (8739) quests fix by Raszagal (Inspired by Justiciar's fix drom #3311)
+-- Hive'Zora Scout Report (8534), Hive'Regal Scout Report (8738) and Hive'Ashi Scout Report (8739) quests fix by Raszagal (Inspired by Justiciar's fix drom #3311)
-- TODO: Get sniffs for gossip_menu_option placeholder texts
-- Closes #3311 and Closes #7453
@@ -82,7 +82,7 @@ UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP1 WHERE `entry`=@NPC1;
UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP2 WHERE `entry`=@NPC2;
UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP3 WHERE `entry`=@NPC3;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@NPC1,@NPC2,@NPC3);
--- Gossips
+-- Gossips
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP1 AND `text_id`=8063;
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP2 AND `text_id`=8064;
DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP3 AND `text_id`=8065;
diff --git a/sql/updates/world/2012_09_26_00_world_misc.sql b/sql/updates/world/2012_09_26_00_world_misc.sql
index f7b65b94935..d9ac468f4a6 100644
--- a/sql/updates/world/2012_09_26_00_world_misc.sql
+++ b/sql/updates/world/2012_09_26_00_world_misc.sql
@@ -1,7 +1,7 @@
-- Scripted Npc Infiltrator Marksen (Zombie Form 7293) From Sniff author expecto Closes #6910
UPDATE creature_template SET AIName = 'SmartAI', `spell1` = 7293 WHERE entry = 5416;
DELETE FROM `smart_scripts` WHERE (`entryorguid`=5416 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
+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
(5416, 0, 0, 0, 1, 0, 100, 0, 5000, 5000, 10000, 12000, 11, 7293, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Infiltrator Marksen - Cast Zombie Form');
-- Wildlord Antelarion (22127) gossip fix by nelegalno
@@ -95,7 +95,7 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi
-- fix loot of Savage Cave Beast Closes #7874
DELETE FROM `creature_loot_template` WHERE `entry` = 31470;
-INSERT INTO `creature_loot_template`
+INSERT INTO `creature_loot_template`
SELECT 31470, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount` FROM `creature_loot_template` WHERE `entry` = 30329;
-- partially revert commit 0deaa521bcae3ab9004529473aceadee134f3a68 author Elron103 Closes #7580
@@ -155,7 +155,7 @@ DELETE FROM `gossip_menu` WHERE `entry`=7376 AND `text_id` IN (8826,8827);
DELETE FROM `gossip_menu` WHERE `entry`=7377 AND `text_id` IN (8828,8829);
DELETE FROM `gossip_menu` WHERE `entry`=7378 AND `text_id`=8832;
-INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
(2601,3293),
(2601,3294),
(6504,7699),
@@ -232,11 +232,11 @@ INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (5824,6995);
-- Set pickpocketloot data for Skeletal Reavers author trista Closes #7366
SET @SREAVER := 32467;
-UPDATE `creature_template` SET `pickpocketloot`=`entry` WHERE `entry`=@SREAVER;
-DELETE FROM `pickpocketing_loot_template` WHERE `entry`=@SREAVER;
-INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-(@SREAVER,35947,0.7,1,0,1,1), -- Sparkling Frostcap
-(@SREAVER,33447,0.7,1,0,1,1), -- Runic Healing Potion
+UPDATE `creature_template` SET `pickpocketloot`=`entry` WHERE `entry`=@SREAVER;
+DELETE FROM `pickpocketing_loot_template` WHERE `entry`=@SREAVER;
+INSERT INTO `pickpocketing_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@SREAVER,35947,0.7,1,0,1,1), -- Sparkling Frostcap
+(@SREAVER,33447,0.7,1,0,1,1), -- Runic Healing Potion
(@SREAVER,38269,1.4,1,0,1,1), -- Soggy Handkerchief
(@SREAVER,43575,1.6,1,0,1,1); -- Reinforced Junkbox
@@ -319,7 +319,7 @@ DELETE FROM `creature_transport` WHERE `transport_entry`=164871 AND `npc_entry`=
INSERT INTO `creature_transport` (`guid`,`transport_entry`,`npc_entry`,`TransOffsetX`,`TransOffsetY`,`TransOffsetZ`,`TransOffsetO`,`emote`) VALUES
(18,164871,25077,-19.68856,-8.170582,-14.37648,3.176499,0); -- Sky-Captain Cloudkicker
-- Zeppelin: <The Zephyr>
-UPDATE `creature_transport` SET `emote`=173 WHERE `transport_entry`=190549 AND `npc_entry`=34719;
+UPDATE `creature_transport` SET `emote`=173 WHERE `transport_entry`=190549 AND `npc_entry`=34719;
-- Fix flight masters around the Dark Portal in Outland (16.11.2011) by SignFinder ( https://github.com/TrinityCore/TrinityCore/issues/2596#issuecomment-4450115 ) Closes #6401
@@ -368,7 +368,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(15,@GOSSIP_VLAGGA,0,0,0,8,10289,0,0,0,'',"Show gossip option 0 if player has rewarded quest Journey to Thrallmar"),
(15,@GOSSIP_VLAGGA,1,0,0,28,10289,0,0,0,'',"Show gossip option 1 if player has complete quest Journey to Thrallmar");
--- fix dedication of honor movie playback. author trista and vincent-michael. Closes #5754
+-- fix dedication of honor movie playback. author trista and vincent-michael. Closes #5754
SET @MEMORIAL := 202443;
SET @Script := 20244300;
UPDATE `gameobject_template` SET AIName = 'SmartGameObjectAI' WHERE entry = @MEMORIAL;
diff --git a/sql/updates/world/2012_09_27_01_world_custodian_of_time.sql b/sql/updates/world/2012_09_27_01_world_custodian_of_time.sql
index 5396bd3e7f0..521c55d507e 100644
--- a/sql/updates/world/2012_09_27_01_world_custodian_of_time.sql
+++ b/sql/updates/world/2012_09_27_01_world_custodian_of_time.sql
@@ -1,7 +1,7 @@
-- Custodian of Time's Whispers for quest 10277
DELETE FROM `script_texts` WHERE `entry` IN (-1000217,-1000218,-1000219,-1000220,-1000221,-1000222,-1000223,-1000224,-1000225,-1000226,-1000227,-1000228,-1000229,-1000230);
-DELETE FROM `creature_text` WHERE `entry`=20129;
-INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+DELETE FROM `creature_text` WHERE `entry`=20129;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(20129,0,0, 'Greetings, $N. I will guide you through the cavern. Please try and keep up.',15,0,100,0,0,0, 'WHISPER_CUSTODIAN_1'),
(20129,1,0, 'We do not know if the Caverns of Time have always been accessible to mortals. Truly, it is impossible to tell as the Timeless One is in perpetual motion, changing our timeways as he sees fit. What you see now may very well not exist tomorrow. You may wake up and have no memory of this place.',15,0,100,0,0,0, 'WHISPER_CUSTODIAN_2'),
(20129,2,0, 'It is strange, I know... Most mortals cannot actually comprehend what they see here, as often, what they see is not anchored within their own perception of reality.',15,0,100,0,0,0, 'WHISPER_CUSTODIAN_3'),
diff --git a/sql/updates/world/2012_10_02_00_world_oculus.sql b/sql/updates/world/2012_10_02_00_world_oculus.sql
index 2db8bd8fed1..8c9ea1bcb60 100644
--- a/sql/updates/world/2012_10_02_00_world_oculus.sql
+++ b/sql/updates/world/2012_10_02_00_world_oculus.sql
@@ -1,6 +1,6 @@
-- Addon data based on sniff fixed by Vincent-Michael
DELETE FROM `creature_template_addon` WHERE `entry` IN (27692,27755,27756);
-INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(27692,0,0,0x3000000,0x1,0,'50296 50325'), -- Emerald Drake
(27755,0,0,0x3000000,0x1,0,'50296 50325'), -- Amber Drake
(27756,0,0,0x3000000,0x1,0,'50296 50248 50325'); -- Ruby Drake // Evasive aura should be here from the start
diff --git a/sql/updates/world/2012_10_04_00_world_spelldifficulty_dbc.sql b/sql/updates/world/2012_10_04_00_world_spelldifficulty_dbc.sql
index 763bf57fc47..6587e35bf9b 100644
--- a/sql/updates/world/2012_10_04_00_world_spelldifficulty_dbc.sql
+++ b/sql/updates/world/2012_10_04_00_world_spelldifficulty_dbc.sql
@@ -1,5 +1,5 @@
-- Boss Anubarak Move Heroic Spell in spelldifficulty
DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (53472,53454);
INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
-(53472,53472,59433), -- Spell Pound
+(53472,53472,59433), -- Spell Pound
(53454,53454,59446); -- Spell Impale Damage
diff --git a/sql/updates/world/2012_10_11_00_world_gameobject.sql b/sql/updates/world/2012_10_11_00_world_gameobject.sql
index 0c08d9d5622..e58d60590cb 100644
--- a/sql/updates/world/2012_10_11_00_world_gameobject.sql
+++ b/sql/updates/world/2012_10_11_00_world_gameobject.sql
@@ -2,91 +2,91 @@ SET @GUID = 74685;
SET @MAP = 571;
DELETE FROM `gameobject` WHERE (`id` IN (192254,192255,192269,192284,192285,192336,192338,192339,192349,192350,192351,192352,192353,192354,192355,192356,192357,192358,192359,192360,192361,192362,192363,192364,192366,192367,192368,192369,192370,192371,192372,192373,192374,192375,192378,192379,192416,192488,192501) AND `guid` != 67250) OR `guid` BETWEEN @GUID AND @GUID+87;
INSERT INTO `gameobject` (`guid`,`id`,`map`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`) VALUES
-(@GUID+0, 192488, @MAP, 64, 5262.540039, 3047.949951, 432.054993, 3.106650), -- Flag on tower
+(@GUID+0, 192488, @MAP, 64, 5262.540039, 3047.949951, 432.054993, 3.106650), -- Flag on tower
(@GUID+1, 192501, @MAP, 128, 5262.540039, 3047.949951, 432.054993, 3.106650), -- Flag on tower
-(@GUID+2, 192374, @MAP, 64, 5272.939941, 2976.550049, 444.492004, 3.124120), -- Flag on Wall Intersect
+(@GUID+2, 192374, @MAP, 64, 5272.939941, 2976.550049, 444.492004, 3.124120), -- Flag on Wall Intersect
(@GUID+3, 192416, @MAP, 128, 5272.939941, 2976.550049, 444.492004, 3.124120), -- Flag on Wall Intersect
-(@GUID+4, 192375, @MAP, 64, 5235.189941, 2941.899902, 444.278015, 1.588250), -- Flag on Wall Intersect
+(@GUID+4, 192375, @MAP, 64, 5235.189941, 2941.899902, 444.278015, 1.588250), -- Flag on Wall Intersect
(@GUID+5, 192416, @MAP, 128, 5235.189941, 2941.899902, 444.278015, 1.588250), -- Flag on Wall Intersect
-(@GUID+6, 192488, @MAP, 64, 5163.129883, 2952.590088, 433.502991, 1.535890), -- Flag on tower
+(@GUID+6, 192488, @MAP, 64, 5163.129883, 2952.590088, 433.502991, 1.535890), -- Flag on tower
(@GUID+7, 192501, @MAP, 128, 5163.129883, 2952.590088, 433.502991, 1.535890), -- Flag on tower
-(@GUID+8, 192488, @MAP, 64, 5145.109863, 2935.000000, 433.385986, 3.141590), -- Flag on tower
+(@GUID+8, 192488, @MAP, 64, 5145.109863, 2935.000000, 433.385986, 3.141590), -- Flag on tower
(@GUID+9, 192501, @MAP, 128, 5145.109863, 2935.000000, 433.385986, 3.141590), -- Flag on tower
-(@GUID+10, 192488, @MAP, 64, 5158.810059, 2883.129883, 431.618011, 3.141590), -- Flag on wall
+(@GUID+10, 192488, @MAP, 64, 5158.810059, 2883.129883, 431.618011, 3.141590), -- Flag on wall
(@GUID+11, 192416, @MAP, 128, 5158.810059, 2883.129883, 431.618011, 3.141590), -- Flag on wall
-(@GUID+12, 192336, @MAP, 64, 5154.490234, 2862.149902, 445.011993, 3.141590), -- Flag on Wall Intersect
+(@GUID+12, 192336, @MAP, 64, 5154.490234, 2862.149902, 445.011993, 3.141590), -- Flag on Wall Intersect
(@GUID+13, 192416, @MAP, 128, 5154.490234, 2862.149902, 445.011993, 3.141590), -- Flag on Wall Intersect
-(@GUID+14, 192255, @MAP, 64, 5154.520020, 2853.310059, 409.183014, 3.141590), -- Flag on the floor
+(@GUID+14, 192255, @MAP, 64, 5154.520020, 2853.310059, 409.183014, 3.141590), -- Flag on the floor
(@GUID+15, 192269, @MAP, 128, 5154.520020, 2853.310059, 409.183014, 3.141590), -- Flag on the floor
-(@GUID+16, 192254, @MAP, 64, 5154.459961, 2828.939941, 409.188995, 3.141590), -- Flag on the floor
+(@GUID+16, 192254, @MAP, 64, 5154.459961, 2828.939941, 409.188995, 3.141590), -- Flag on the floor
(@GUID+17, 192269, @MAP, 128, 5154.459961, 2828.939941, 409.188995, 3.141590), -- Flag on the floor
-(@GUID+18, 192349, @MAP, 64, 5155.310059, 2820.739990, 444.979004, -3.13286), -- Flag on wall intersect
+(@GUID+18, 192349, @MAP, 64, 5155.310059, 2820.739990, 444.979004, -3.13286), -- Flag on wall intersect
(@GUID+19, 192416, @MAP, 128, 5155.310059, 2820.739990, 444.979004, -3.13286), -- Flag on wall intersect
-(@GUID+20, 192488, @MAP, 64, 5160.339844, 2798.610107, 430.769012, 3.141590), -- Flag on wall
+(@GUID+20, 192488, @MAP, 64, 5160.339844, 2798.610107, 430.769012, 3.141590), -- Flag on wall
(@GUID+21, 192416, @MAP, 128, 5160.339844, 2798.610107, 430.769012, 3.141590), -- Flag on wall
-(@GUID+22, 192488, @MAP, 64, 5146.040039, 2747.209961, 433.584015, 3.071770), -- Flag on tower
+(@GUID+22, 192488, @MAP, 64, 5146.040039, 2747.209961, 433.584015, 3.071770), -- Flag on tower
(@GUID+23, 192501, @MAP, 128, 5146.040039, 2747.209961, 433.584015, 3.071770), -- Flag on tower
-(@GUID+24, 192488, @MAP, 64, 5163.779785, 2729.679932, 433.394012, -1.58825), -- Flag on tower
+(@GUID+24, 192488, @MAP, 64, 5163.779785, 2729.679932, 433.394012, -1.58825), -- Flag on tower
(@GUID+25, 192501, @MAP, 128, 5163.779785, 2729.679932, 433.394012, -1.58825), -- Flag on tower
-(@GUID+26, 192366, @MAP, 64, 5236.270020, 2739.459961, 444.992004, -1.59698), -- Flag on wall intersect
+(@GUID+26, 192366, @MAP, 64, 5236.270020, 2739.459961, 444.992004, -1.59698), -- Flag on wall intersect
(@GUID+27, 192416, @MAP, 128, 5236.270020, 2739.459961, 444.992004, -1.59698), -- Flag on wall intersect
-(@GUID+28, 192367, @MAP, 64, 5271.799805, 2704.870117, 445.183014, -3.13286), -- Flag on wall intersect
+(@GUID+28, 192367, @MAP, 64, 5271.799805, 2704.870117, 445.183014, -3.13286), -- Flag on wall intersect
(@GUID+29, 192416, @MAP, 128, 5271.799805, 2704.870117, 445.183014, -3.13286), -- Flag on wall intersect
-(@GUID+30, 192488, @MAP, 64, 5260.819824, 2631.800049, 433.324005, 3.054330), -- Flag on tower
+(@GUID+30, 192488, @MAP, 64, 5260.819824, 2631.800049, 433.324005, 3.054330), -- Flag on tower
(@GUID+31, 192501, @MAP, 128, 5260.819824, 2631.800049, 433.324005, 3.054330), -- Flag on tower
-(@GUID+32, 192488, @MAP, 64, 5278.379883, 2613.830078, 433.408997, -1.58825), -- Flag on tower
+(@GUID+32, 192488, @MAP, 64, 5278.379883, 2613.830078, 433.408997, -1.58825), -- Flag on tower
(@GUID+33, 192501, @MAP, 128, 5278.379883, 2613.830078, 433.408997, -1.58825), -- Flag on tower
-(@GUID+34, 192364, @MAP, 64, 5350.879883, 2622.719971, 444.686005, -1.57080), -- Flag on wall intersect
+(@GUID+34, 192364, @MAP, 64, 5350.879883, 2622.719971, 444.686005, -1.57080), -- Flag on wall intersect
(@GUID+35, 192416, @MAP, 128, 5350.879883, 2622.719971, 444.686005, -1.57080), -- Flag on wall intersect
-(@GUID+36, 192370, @MAP, 64, 5392.270020, 2639.739990, 435.330994, 1.509710), -- Flag on wall intersect
+(@GUID+36, 192370, @MAP, 64, 5392.270020, 2639.739990, 435.330994, 1.509710), -- Flag on wall intersect
(@GUID+37, 192416, @MAP, 128, 5392.270020, 2639.739990, 435.330994, 1.509710), -- Flag on wall intersect
-(@GUID+38, 192369, @MAP, 64, 5350.950195, 2640.360107, 435.407990, 1.570800), -- Flag on wall intersect
+(@GUID+38, 192369, @MAP, 64, 5350.950195, 2640.360107, 435.407990, 1.570800), -- Flag on wall intersect
(@GUID+39, 192416, @MAP, 128, 5350.950195, 2640.360107, 435.407990, 1.570800), -- Flag on wall intersect
-(@GUID+40, 192368, @MAP, 64, 5289.459961, 2704.679932, 435.875000, -0.01745), -- Flag on wall intersect
+(@GUID+40, 192368, @MAP, 64, 5289.459961, 2704.679932, 435.875000, -0.01745), -- Flag on wall intersect
(@GUID+41, 192416, @MAP, 128, 5289.459961, 2704.679932, 435.875000, -0.01745), -- Flag on wall intersect
-(@GUID+42, 192362, @MAP, 64, 5322.120117, 2763.610107, 444.973999, -1.55334), -- Flag on wall intersect
+(@GUID+42, 192362, @MAP, 64, 5322.120117, 2763.610107, 444.973999, -1.55334), -- Flag on wall intersect
(@GUID+43, 192416, @MAP, 128, 5322.120117, 2763.610107, 444.973999, -1.55334), -- Flag on wall intersect
-(@GUID+44, 192363, @MAP, 64, 5363.609863, 2763.389893, 445.023987, -1.54462), -- Flag on wall intersect
+(@GUID+44, 192363, @MAP, 64, 5363.609863, 2763.389893, 445.023987, -1.54462), -- Flag on wall intersect
(@GUID+45, 192416, @MAP, 128, 5363.609863, 2763.389893, 445.023987, -1.54462), -- Flag on wall intersect
-(@GUID+46, 192379, @MAP, 64, 5363.419922, 2781.030029, 435.763000, 1.570800), -- Flag on wall intersect
+(@GUID+46, 192379, @MAP, 64, 5363.419922, 2781.030029, 435.763000, 1.570800), -- Flag on wall intersect
(@GUID+47, 192416, @MAP, 128, 5363.419922, 2781.030029, 435.763000, 1.570800), -- Flag on wall intersect
-(@GUID+48, 192378, @MAP, 64, 5322.020020, 2781.129883, 435.811005, 1.570800), -- Flag on wall intersect
+(@GUID+48, 192378, @MAP, 64, 5322.020020, 2781.129883, 435.811005, 1.570800), -- Flag on wall intersect
(@GUID+49, 192416, @MAP, 128, 5322.020020, 2781.129883, 435.811005, 1.570800), -- Flag on wall intersect
-(@GUID+50, 192355, @MAP, 64, 5288.919922, 2820.219971, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+50, 192355, @MAP, 64, 5288.919922, 2820.219971, 435.721008, 0.017452), -- Flag on wall intersect
(@GUID+51, 192416, @MAP, 128, 5288.919922, 2820.219971, 435.721008, 0.017452), -- Flag on wall intersect
-(@GUID+52, 192354, @MAP, 64, 5288.410156, 2861.790039, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+52, 192354, @MAP, 64, 5288.410156, 2861.790039, 435.721008, 0.017452), -- Flag on wall intersect
(@GUID+53, 192416, @MAP, 128, 5288.410156, 2861.790039, 435.721008, 0.017452), -- Flag on wall intersect
-(@GUID+54, 192358, @MAP, 64, 5322.229980, 2899.429932, 435.808014, -1.58825), -- Flag on wall intersect
+(@GUID+54, 192358, @MAP, 64, 5322.229980, 2899.429932, 435.808014, -1.58825), -- Flag on wall intersect
(@GUID+55, 192416, @MAP, 128, 5322.229980, 2899.429932, 435.808014, -1.58825), -- Flag on wall intersect
-(@GUID+56, 192359, @MAP, 64, 5364.350098, 2899.399902, 435.838989, -1.57080), -- Flag on wall intersect
+(@GUID+56, 192359, @MAP, 64, 5364.350098, 2899.399902, 435.838989, -1.57080), -- Flag on wall intersect
(@GUID+57, 192416, @MAP, 128, 5364.350098, 2899.399902, 435.838989, -1.57080), -- Flag on wall intersect
-(@GUID+58, 192338, @MAP, 64, 5397.759766, 2873.080078, 455.460999, 3.106650), -- Flag on keep
+(@GUID+58, 192338, @MAP, 64, 5397.759766, 2873.080078, 455.460999, 3.106650), -- Flag on keep
(@GUID+59, 192416, @MAP, 128, 5397.759766, 2873.080078, 455.460999, 3.106650), -- Flag on keep
-(@GUID+60, 192339, @MAP, 64, 5397.390137, 2809.330078, 455.343994, 3.106650), -- Flag on keep
+(@GUID+60, 192339, @MAP, 64, 5397.390137, 2809.330078, 455.343994, 3.106650), -- Flag on keep
(@GUID+61, 192416, @MAP, 128, 5397.390137, 2809.330078, 455.343994, 3.106650), -- Flag on keep
-(@GUID+62, 192284, @MAP, 64, 5372.479980, 2862.500000, 409.049011, 3.141590), -- Flag on floor
+(@GUID+62, 192284, @MAP, 64, 5372.479980, 2862.500000, 409.049011, 3.141590), -- Flag on floor
(@GUID+63, 192269, @MAP, 128, 5372.479980, 2862.500000, 409.049011, 3.141590), -- Flag on floor
-(@GUID+64, 192285, @MAP, 64, 5371.490234, 2820.800049, 409.177002, 3.141590), -- Flag on floor
+(@GUID+64, 192285, @MAP, 64, 5371.490234, 2820.800049, 409.177002, 3.141590), -- Flag on floor
(@GUID+65, 192269, @MAP, 128, 5371.490234, 2820.800049, 409.177002, 3.141590), -- Flag on floor
-(@GUID+66, 192371, @MAP, 64, 5364.290039, 2916.939941, 445.330994, 1.579520), -- Flag on wall intersect
+(@GUID+66, 192371, @MAP, 64, 5364.290039, 2916.939941, 445.330994, 1.579520), -- Flag on wall intersect
(@GUID+67, 192416, @MAP, 128, 5364.290039, 2916.939941, 445.330994, 1.579520), -- Flag on wall intersect
-(@GUID+68, 192372, @MAP, 64, 5322.859863, 2916.949951, 445.153992, 1.562070), -- Flag on wall intersect
+(@GUID+68, 192372, @MAP, 64, 5322.859863, 2916.949951, 445.153992, 1.562070), -- Flag on wall intersect
(@GUID+69, 192416, @MAP, 128, 5322.859863, 2916.949951, 445.153992, 1.562070), -- Flag on wall intersect
-(@GUID+70, 192373, @MAP, 64, 5290.350098, 2976.560059, 435.221008, 0.017452), -- Flag on wall intersect
+(@GUID+70, 192373, @MAP, 64, 5290.350098, 2976.560059, 435.221008, 0.017452), -- Flag on wall intersect
(@GUID+71, 192416, @MAP, 128, 5290.350098, 2976.560059, 435.221008, 0.017452), -- Flag on wall intersect
-(@GUID+72, 192360, @MAP, 64, 5352.370117, 3037.090088, 435.252014, -1.57080), -- Flag on wall intersect
+(@GUID+72, 192360, @MAP, 64, 5352.370117, 3037.090088, 435.252014, -1.57080), -- Flag on wall intersect
(@GUID+73, 192416, @MAP, 128, 5352.370117, 3037.090088, 435.252014, -1.57080), -- Flag on wall intersect
-(@GUID+74, 192361, @MAP, 64, 5392.649902, 3037.110107, 433.713013, -1.52716), -- Flag on wall intersect
+(@GUID+74, 192361, @MAP, 64, 5392.649902, 3037.110107, 433.713013, -1.52716), -- Flag on wall intersect
(@GUID+75, 192416, @MAP, 128, 5392.649902, 3037.110107, 433.713013, -1.52716), -- Flag on wall intersect
-(@GUID+76, 192356, @MAP, 64, 5237.069824, 2757.030029, 435.795990, 1.518440), -- Flag on wall intersect
+(@GUID+76, 192356, @MAP, 64, 5237.069824, 2757.030029, 435.795990, 1.518440), -- Flag on wall intersect
(@GUID+77, 192416, @MAP, 128, 5237.069824, 2757.030029, 435.795990, 1.518440), -- Flag on wall intersect
-(@GUID+78, 192352, @MAP, 64, 5173.020020, 2820.929932, 435.720001, 0.017452), -- Flag on wall intersect
+(@GUID+78, 192352, @MAP, 64, 5173.020020, 2820.929932, 435.720001, 0.017452), -- Flag on wall intersect
(@GUID+79, 192416, @MAP, 128, 5173.020020, 2820.929932, 435.720001, 0.017452), -- Flag on wall intersect
-(@GUID+80, 192353, @MAP, 64, 5172.109863, 2862.570068, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+80, 192353, @MAP, 64, 5172.109863, 2862.570068, 435.721008, 0.017452), -- Flag on wall intersect
(@GUID+81, 192416, @MAP, 128, 5172.109863, 2862.570068, 435.721008, 0.017452), -- Flag on wall intersect
-(@GUID+82, 192357, @MAP, 64, 5235.339844, 2924.340088, 435.040009, -1.57080), -- Flag on wall intersect
+(@GUID+82, 192357, @MAP, 64, 5235.339844, 2924.340088, 435.040009, -1.57080), -- Flag on wall intersect
(@GUID+83, 192416, @MAP, 128, 5235.339844, 2924.340088, 435.040009, -1.57080), -- Flag on wall intersect
-(@GUID+84, 192350, @MAP, 64, 5270.689941, 2861.780029, 445.058014, -3.11539), -- Flag on wall intersect
+(@GUID+84, 192350, @MAP, 64, 5270.689941, 2861.780029, 445.058014, -3.11539), -- Flag on wall intersect
(@GUID+85, 192416, @MAP, 128, 5270.689941, 2861.780029, 445.058014, -3.11539), -- Flag on wall intersect
-(@GUID+86, 192351, @MAP, 64, 5271.279785, 2820.159912, 445.200989, -3.13286), -- Flag on wall intersect
+(@GUID+86, 192351, @MAP, 64, 5271.279785, 2820.159912, 445.200989, -3.13286), -- Flag on wall intersect
(@GUID+87, 192416, @MAP, 128, 5271.279785, 2820.159912, 445.200989, -3.13286); -- Flag on wall intersect
diff --git a/sql/updates/world/2012_10_25_00_world_childrens_week.sql b/sql/updates/world/2012_10_25_00_world_childrens_week.sql
index e2d6eec4dd2..f10cf92b409 100644
--- a/sql/updates/world/2012_10_25_00_world_childrens_week.sql
+++ b/sql/updates/world/2012_10_25_00_world_childrens_week.sql
@@ -539,13 +539,13 @@ INSERT INTO `creature`(`guid`,`id`,`map`,`position_x`,`position_y`,`position_z`,
(@GUID_THRONE_OF_ELEMENTS_TRIGGER,22839,530,-781.294,6943.52,33.3344,0);
-- Misc
-DELETE `game_event_creature` FROM `game_event_creature` INNER JOIN `creature` ON `creature`.`guid`=`game_event_creature`.`guid`
+DELETE `game_event_creature` FROM `game_event_creature` INNER JOIN `creature` ON `creature`.`guid`=`game_event_creature`.`guid`
WHERE `id` IN (22905,22851,22838,22866,22831,22829,22872,22839,14450,22819,14451,34365,34387,34386,34490,34489,34381,36209);
-INSERT INTO `game_event_creature`(`eventEntry`,`guid`) SELECT 10,`guid` FROM `creature`
+INSERT INTO `game_event_creature`(`eventEntry`,`guid`) SELECT 10,`guid` FROM `creature`
WHERE `id` IN (22905,22851,22838,22866,22831,22829,22872,22839,14450,22819,14451,34365,34387,34386,34490,34489,34381,36209);
DELETE FROM `game_event_npc_vendor` WHERE `eventEntry`=10 AND `item`=46693;
-INSERT INTO `game_event_npc_vendor` (`eventEntry`, `guid`, `item`) VALUES
+INSERT INTO `game_event_npc_vendor` (`eventEntry`, `guid`, `item`) VALUES
(10,99369,46693),
(10,97984,46693);
@@ -553,7 +553,7 @@ UPDATE `item_template` SET `minMoneyLoot`=50000,`maxMoneyLoot`=50000 WHERE `entr
UPDATE `item_template` SET `HolidayId`=201 WHERE `entry` IN (46396,46397,31880,31881,18598,18597);
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (23012,23013,39478,39479,65352,65353);
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ErrorTextId`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ErrorTextId`,`Comment`) VALUES
(17,0,23012,0,12,10,0,"Orphan Whistle only while children's week"),
(17,0,23013,0,12,10,0,"Orphan Whistle only while children's week"),
(17,0,39478,0,12,10,0,"Orphan Whistle only while children's week"),
diff --git a/sql/updates/world/2012_11_11_00_world_sai.sql b/sql/updates/world/2012_11_11_00_world_sai.sql
index 7d895b81b7b..b5eedd86898 100644
--- a/sql/updates/world/2012_11_11_00_world_sai.sql
+++ b/sql/updates/world/2012_11_11_00_world_sai.sql
@@ -1,6 +1,6 @@
-- Update creature gossip_menu_option from sniff
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8803,8808,8894,9045,9621,9879,9895,9987,10117,10218) AND `id`=0;
-DELETE FROM `gossip_menu_option` WHERE `menu_id`=9879 AND `id`=1;
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9879 AND `id`=1;
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
(8803,0,1, 'I need some booze, Coot.',3,128,0,0,0,0, ''),
(8808,0,1, 'I require some components, Sorely.',3,128,0,0,0,0, ''),
diff --git a/sql/updates/world/2012_11_13_00_world_waypoints.sql b/sql/updates/world/2012_11_13_00_world_waypoints.sql
index 5e4c0aeae13..64e16cb2d0e 100644
--- a/sql/updates/world/2012_11_13_00_world_waypoints.sql
+++ b/sql/updates/world/2012_11_13_00_world_waypoints.sql
@@ -6,30 +6,30 @@ DELETE FROM `creature_addon` WHERE `guid`=@NPC;
INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
-(@PATH,1,-5716.181152,-3110.810791,316.686523,0,0,0,100,0),
-(@PATH,2,-5716.187012,-3093.080078,325.600677,0,0,0,100,0),
-(@PATH,3,-5712.214355,-3090.297607,327.738647,0,0,0,100,0),
-(@PATH,4,-5705.484375,-3092.523438,329.362366,0,0,0,100,0),
-(@PATH,5,-5681.826660,-3110.568848,338.121887,0,0,0,100,0),
-(@PATH,6,-5659.498535,-3122.215576,344.336151,0,0,0,100,0),
-(@PATH,7,-5639.585938,-3124.536133,348.404938,0,0,0,100,0),
-(@PATH,8,-5618.112793,-3110.905762,360.618225,0,0,0,100,0),
-(@PATH,9,-5621.486816,-3096.315918,368.247772,0,0,0,100,0),
-(@PATH,10,-5632.212891,-3078.608398,374.990936,0,0,0,100,0),
-(@PATH,11,-5629.793457,-3056.124023,384.465576,0,0,0,100,0),
-(@PATH,12,-5642.278809,-3036.872314,385.471649,0,0,0,100,0),
-(@PATH,13,-5609.369141,-3006.883301,386.288177,0,0,0,100,0),
-(@PATH,14,-5643.634277,-3036.388672,385.531891,0,0,0,100,0),
-(@PATH,15,-5630.174805,-3057.015869,384.385712,0,0,0,100,0),
-(@PATH,16,-5629.840332,-3065.496338,381.129578,0,0,0,100,0),
-(@PATH,17,-5634.866211,-3078.448975,374.489044,0,0,0,100,0),
-(@PATH,18,-5620.416504,-3101.081543,364.819855,0,0,0,100,0),
-(@PATH,19,-5624.629395,-3117.040527,354.493805,0,0,0,100,0),
-(@PATH,20,-5644.949707,-3125.081787,347.271362,0,0,0,100,0),
-(@PATH,21,-5660.741699,-3121.580566,343.975922,0,0,0,100,0),
-(@PATH,22,-5676.210938,-3111.586914,340.021484,0,0,0,100,0),
-(@PATH,23,-5691.895508,-3102.994385,333.646698,0,0,0,100,0),
-(@PATH,24,-5711.662109,-3088.433594,328.761566,0,0,0,100,0),
-(@PATH,25,-5717.663574,-3099.033691,321.686920,0,0,0,100,0),
-(@PATH,26,-5705.214844,-3132.324219,315.837585,0,0,0,100,0),
+(@PATH,1,-5716.181152,-3110.810791,316.686523,0,0,0,100,0),
+(@PATH,2,-5716.187012,-3093.080078,325.600677,0,0,0,100,0),
+(@PATH,3,-5712.214355,-3090.297607,327.738647,0,0,0,100,0),
+(@PATH,4,-5705.484375,-3092.523438,329.362366,0,0,0,100,0),
+(@PATH,5,-5681.826660,-3110.568848,338.121887,0,0,0,100,0),
+(@PATH,6,-5659.498535,-3122.215576,344.336151,0,0,0,100,0),
+(@PATH,7,-5639.585938,-3124.536133,348.404938,0,0,0,100,0),
+(@PATH,8,-5618.112793,-3110.905762,360.618225,0,0,0,100,0),
+(@PATH,9,-5621.486816,-3096.315918,368.247772,0,0,0,100,0),
+(@PATH,10,-5632.212891,-3078.608398,374.990936,0,0,0,100,0),
+(@PATH,11,-5629.793457,-3056.124023,384.465576,0,0,0,100,0),
+(@PATH,12,-5642.278809,-3036.872314,385.471649,0,0,0,100,0),
+(@PATH,13,-5609.369141,-3006.883301,386.288177,0,0,0,100,0),
+(@PATH,14,-5643.634277,-3036.388672,385.531891,0,0,0,100,0),
+(@PATH,15,-5630.174805,-3057.015869,384.385712,0,0,0,100,0),
+(@PATH,16,-5629.840332,-3065.496338,381.129578,0,0,0,100,0),
+(@PATH,17,-5634.866211,-3078.448975,374.489044,0,0,0,100,0),
+(@PATH,18,-5620.416504,-3101.081543,364.819855,0,0,0,100,0),
+(@PATH,19,-5624.629395,-3117.040527,354.493805,0,0,0,100,0),
+(@PATH,20,-5644.949707,-3125.081787,347.271362,0,0,0,100,0),
+(@PATH,21,-5660.741699,-3121.580566,343.975922,0,0,0,100,0),
+(@PATH,22,-5676.210938,-3111.586914,340.021484,0,0,0,100,0),
+(@PATH,23,-5691.895508,-3102.994385,333.646698,0,0,0,100,0),
+(@PATH,24,-5711.662109,-3088.433594,328.761566,0,0,0,100,0),
+(@PATH,25,-5717.663574,-3099.033691,321.686920,0,0,0,100,0),
+(@PATH,26,-5705.214844,-3132.324219,315.837585,0,0,0,100,0),
(@PATH,27,-5679.014160,-3185.046875,319.508057,0,0,0,100,0);
diff --git a/sql/updates/world/2012_11_14_00_world_various_fixes.sql b/sql/updates/world/2012_11_14_00_world_various_fixes.sql
index 5946c82e92c..01655b674b1 100644
--- a/sql/updates/world/2012_11_14_00_world_various_fixes.sql
+++ b/sql/updates/world/2012_11_14_00_world_various_fixes.sql
@@ -5,16 +5,16 @@ UPDATE `creature_template` SET `VehicleId`=220,`spell1`=56091,`spell2`=56092,`sp
UPDATE `creature_template` SET `VehicleId`=224,`faction_A`=35,`faction_H`=35,`InhabitType`=5 WHERE `entry` IN (31749,31748);
-- spawn the focusing iris 25men
DELETE FROM gameobject WHERE id IN (193960);
-INSERT INTO `gameobject`
+INSERT INTO `gameobject`
(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
-(361,193960,616,2,1,754.362,1301.61,266.171,6.23742,0,0,0.022883,-0.999738,300,0,1);
+(361,193960,616,2,1,754.362,1301.61,266.171,6.23742,0,0,0.022883,-0.999738,300,0,1);
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- The Heart of the Storm (Issue 1959)
DELETE FROM `gameobject` WHERE `id`=192181;
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(362,192181,571,1,1,7308.945,-727.9163,791.6083,1.53589,0,0,0.690772,0.723073,30,100,1);
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Add support for {Q} Corrupted Sabers ID: 4506 (Issue 2297)
+-- Add support for {Q} Corrupted Sabers ID: 4506 (Issue 2297)
SET @CommonKitten:=9937;
SET @CorruptedKitten :=9936;
SET @SGossip :=55002; -- Gossip for Kitten when near quest giver
@@ -39,7 +39,7 @@ INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`op
(@SGossip,1,0,'I want to release the saber to Winna.',1,131,0);
-- Only show gossip if near Winna
DELETE FROM `conditions` WHERE `SourceGroup`=@SGOSSIP AND `SourceTypeOrReferenceId`=15;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(15,@SGOSSIP,1,0,29,1,@Winna,5,0,0,0,'','Only show second gossip Corrupted Saber is near Wina in 5 yards');
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Fix for Prepping the Speech by Gecko32 (Issue 2399)
@@ -152,7 +152,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry`=32189 AND `seat_id`=0;
-- Add conditions for spell to target only alive Recons
DELETE FROM `conditions` WHERE `SourceEntry`=@Spell and `SourceTypeOrReferenceId`=17;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(17,0,@Spell,0,0,36,1,0,0,0,0,0,'','Fire SGM-3 can hit only alive Recon Fighter'),
(17,0,@Spell,0,0,31,1,3,@ReconFighter,0,0,0,'','Fire SGM-3 can hit Recon Fighter');
-- Keeping the Alliance Blind ID: 13331 quest requirements
@@ -163,11 +163,11 @@ UPDATE `quest_template` SET `PrevQuestId`=13313 WHERE `Id`=13331;
UPDATE `creature_loot_template` SET `ChanceOrQuestChance` = ABS(`ChanceOrQuestChance`) WHERE `item`=38303;
-- Add gossip menu option
DELETE FROM `gossip_menu_option` WHERE `menu_id`=9615 AND `id`=1;
-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
+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
(9615,1,0,'I need another of your elixirs, Drakuru.',1,1,0,0,0,0,'');
-- Add Conditions for Gossip
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9615 AND `SourceEntry`=1;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(15,9615,1,0,1,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
(15,9615,1,0,1,28,0,11991,0,0,0,0,'','Drakuru''s Elixir - Must have quest Subject to Interpretation'),
(15,9615,1,0,2,2,0,35797,1,0,1,0,'','Drakuru''s Elixir - Must not already have item'),
@@ -180,16 +180,16 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
(15,9615,1,0,5,28,0,12238,0,0,0,0,'','Drakuru''s Elixir - Must have quest Cleansing Drak''Tharon');
-- Add SmartAI to give item
DELETE FROM `smart_scripts` WHERE `entryorguid`=26423 AND `id` IN (2,3);
-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
+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
(26423,0,2,3,62,0,100,0,9615,1,0,0,11,50021,2,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - cast Replace Drakuru''s Elixir'),
(26423,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - close gossip');
-- Add TEMP Drakuru's Brazier In Drak'tharon Keep
DELETE FROM `gameobject` WHERE `guid`=364;
-INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(364,300188,600,3,1,-236.766,-614.774,116.487,1.5708,0,0,0,1,300,100,1);
-- Conditions for spell Target
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47110;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,1,47110,0,1,31,0,3,26498,0,0,0,'',NULL),-- Drakuru's Bunny 01
(13,1,47110,0,2,31,0,3,26559,0,0,0,'',NULL),-- Drakuru's Bunny 02
(13,1,47110,0,3,31,0,3,26700,0,0,0,'',NULL),-- Drakuru's Bunny 03
@@ -198,7 +198,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
-- Add Smart AI Drakuru Bunny
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (26498,26559,26700,26789,28015);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26498,26559,26700,26789,28015);
-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
+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
(26498,0,0,0,8,0,100,0,47110,0,0,0,12,26500,3,50000,0,0,0,8,0,0,0,3386.26,-1805.32,114.909,4.945,'Drakuru Bunny 01- On Spellhit - Summmon Image of Drakuru'),
(26559,0,0,0,8,0,100,0,47110,0,0,0,12,26543,3,50000,0,0,0,8,0,0,0,4243.98,-2025.08,238.248,1.431,'Drakuru Bunny 02- On Spellhit - Summmon Image of Drakuru'),
(26700,0,0,0,8,0,100,0,47110,0,0,0,12,26701,3,50000,0,0,0,8,0,0,0,4523.94,-3472.9,228.393,-0.803,'Drakuru Bunny 03- On Spellhit - Summmon Image of Drakuru'),
@@ -218,47 +218,47 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
SET @INNKEEPER=6740;
SET @QUEST=8356;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
-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
+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
(@INNKEEPER,0,2,0,22,0,100,0,41,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Allison - on /flex credit for quest');
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
-- Chicken Clucking for a Mint (Alliance)
SET @INNKEEPER=5111;
SET @QUEST=8353;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
-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
+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
(@INNKEEPER,0,2,0,22,0,100,0,22,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Firebrew - on /chicken credit for quest');
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
-- Dancing for Marzipan (Alliance)
SET @INNKEEPER=6735;
SET @QUEST=8357;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
-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
+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
(@INNKEEPER,0,2,0,22,0,100,0,34,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Saelienne - on /dance credit for quest');
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
-- Incoming Gumdrop (Alliance)
SET @INNKEEPER=6826;
SET @QUEST=8355;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@INNKEEPER;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER;
-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
+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
(@INNKEEPER,0,0,0,22,0,100,0,264,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Talvash del Kissel - on /train credit for quest');
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
-- Flexing for Nougat (Horde)
SET @INNKEEPER=6929;
SET @QUEST=8359;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=2;
-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
+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
(@INNKEEPER,0,2,0,22,0,100,0,41,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Gryshka - on /flex credit for quest');
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
-- Chicken Clucking for a Mint (Horde)
SET @INNKEEPER=6741;
@@ -266,7 +266,7 @@ SET @QUEST=8354;
-- SAI
UPDATE `smart_scripts` SET `link`=3 WHERE `entryorguid`=@INNKEEPER AND `id`=2;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER AND `id`=3;
-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
+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
(@INNKEEPER,0,3,0,61,0,100,0,0,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Norman - Link - exploreded for quest');
-- conditions
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
@@ -285,14 +285,14 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type
(@INNKEEPER,0,2,0,22,0,100,0,34,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Innkeeper Pala - on /dance credit for quest');
-- Add gossip menu option for trick or treat
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP;
-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
+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
(@GOSSIP,1,5,'Make this inn your home.',8,65536,0,0,0,0,''),
(@GOSSIP,2,1,'I want to browse your goods',3,128,0,0,0,0,''),
(@GOSSIP,0,0,'Trick or Treat!',1,1,0,0,0,0,'');
-- Add conditions must be hallows end for Dancing for Marzipan quest and trick or treat option
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL),
(15,@GOSSIP,0,0,12,12,0,0,0,'',NULL);
-- Incoming Gumdrop (Horde)
@@ -300,8 +300,8 @@ SET @INNKEEPER=11814;
SET @QUEST=8358;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@INNKEEPER;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@INNKEEPER;
-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
+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
(@INNKEEPER,0,0,0,22,0,100,0,264,0,0,0,33,@INNKEEPER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kali Remik - on /train credit for quest');
DELETE FROM `conditions` WHERE `SourceEntry`=@QUEST;
-INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(19,0,@QUEST,0,12,12,0,0,0,'',NULL);
diff --git a/sql/updates/world/2012_09_22_00_world_utgarde.sql b/sql/updates/world/2012_11_16_00_world_utgarde.sql
index 83cc227f9cd..1948796a77b 100644
--- a/sql/updates/world/2012_09_22_00_world_utgarde.sql
+++ b/sql/updates/world/2012_11_16_00_world_utgarde.sql
@@ -2,7 +2,7 @@
DELETE FROM `creature_loot_template` WHERE `entry`=31671;
-- Savage worg
DELETE FROM `creature_loot_template` WHERE `entry`=31678 AND `item` IN(39211,39212,33454);
-INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `mincountOrRef`, `maxcount`) VALUES
+INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `mincountOrRef`, `maxcount`) VALUES
(31678,39211,70,3,5),
(31678,39212,16,2,4),
(31678,33454, 3,1,1);
@@ -35,7 +35,7 @@ UPDATE `creature_template` SET `unit_flags`=2|4|256|512, `faction_A`=35, `factio
-- Dragonflayer runecaster
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=23960;
DELETE FROM `smart_scripts` WHERE `entryorguid`=23960 AND `source_type`=0;
-INSERT INTO `smart_scripts` (`entryorguid`, `id`, `event_type`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `target_type`, `target_param2`, `comment`) VALUES
+INSERT INTO `smart_scripts` (`entryorguid`, `id`, `event_type`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `target_type`, `target_param2`, `comment`) VALUES
(23960,1,0,2,5000,7000,14000,17000,11,42740,11,30,'Dragonflayer Runecaster - In combat - Cast Njords Rune of Protection'),
(23960,2,0,4,5000,7000,14000,17000,11,59616,11,30,'Dragonflayer Runecaster - In combat - Cast Njords Rune of Protection'),
(23960,3,0,2,1000,2000,15000,18000,11,54965, 1, 0,'Dragonflayer Runecaster - In combat - Cast Bolthorns Rune of Flame'),
@@ -48,7 +48,7 @@ INSERT INTO `smart_scripts`(`entryorguid`,`event_type`,`event_param1`,`event_par
(28419,0,5000,5000,30000,30000,11,40414,5,'Frenzied geist - In combat - Cast Fixate');
-- Difficulty data for spells used in utgarde keep
-DELETE FROM `spelldifficulty_dbc` WHERE `id` IN(42669,42708,42750,42723,42729,43667,42702) OR `spellid0` IN(42669,42708,42750,42723,42729,43667,42702);
+DELETE FROM `spelldifficulty_dbc` WHERE `id` IN(42669,42708,42750,42723,42729,43667,42702,50653,43931) OR `spellid0` IN(42669,42708,42750,42723,42729,43667,42702,50653,43931);
INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
(42669,42669,59706), -- Smash
(42708,42708,59708), -- Staggering Roar
@@ -56,11 +56,13 @@ INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
(42723,42723,59709), -- Dark Smash
(42729,42729,59734), -- Dreadful Roar
(43667,43667,59389), -- Shadow Bolt
-(42702,42702,59397); -- Decrepify
+(42702,42702,59397), -- Decrepify
+(50653,50653,59692), -- Flame Breath
+(43931,43931,59691); -- Rend
-- Ticking Time Bomb, Fixate
DELETE FROM `spell_script_names` WHERE `spell_id` IN(59686,40414);
-INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(59686,'spell_ticking_time_bomb'),
(40414,'spell_fixate');
@@ -88,7 +90,7 @@ INSERT INTO `creature_addon`(`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`auras`)
-- Waypoint data
DELETE FROM `waypoint_data` WHERE `id` IN (1259400,1259340,1259150,1259200,1259140,1259360,1259370,1259220);
-INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES
+INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES
(1259400,1,211.864,-352.629,196.144),
(1259340,1,271.911,-318.506,185.049),
(1259150,1,265.478,-199.246,186.812),
diff --git a/sql/updates/world/2012_11_16_01_world_utgarde.sql b/sql/updates/world/2012_11_16_01_world_utgarde.sql
new file mode 100644
index 00000000000..30a64b02e3a
--- /dev/null
+++ b/sql/updates/world/2012_11_16_01_world_utgarde.sql
@@ -0,0 +1,39 @@
+-- Areatrigger script
+DELETE FROM `areatrigger_scripts` WHERE `entry`=4838;
+INSERT INTO `areatrigger_scripts`(`entry`,`ScriptName`) VALUES
+(4838,'SmartTrigger');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=4838 AND `source_type`=2;
+INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`event_type`,`event_param1`,`action_type`,`action_param1`,`action_param2`,`target_type`,`target_param1`,`comment`) VALUES
+(4838,2,46,4838,45,28,6,10,125946,'Areatrigger in Utgarde Keep near Ingvar - On trigger - Set data of Enslaved Proto Drake');
+
+-- Template updates for proto drake and rider
+UPDATE `creature_template` SET `AIName`='',`ScriptName`='npc_enslaved_proto_drake' WHERE `entry`=24083; -- Proto drake non heroic
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (24849,31676); -- Proto drake rider
+
+-- Waypoints for core script
+DELETE FROM `waypoint_data` WHERE `id`=125946;
+INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`,`move_flag`) VALUES
+(125946,1,210.92,-185.92,203.729,1),
+(125946,2,215.397,-181.239,205.773,1),
+(125946,3,219.674,-176.469,202.97,1),
+(125946,4,223.183,-172.761,200.058,1),
+(125946,5,228.007,-168.952,196.713,1),
+(125946,6,230.514,-167.104,195.116,1),
+(125946,7,235.687,-163.455,192.13,1),
+(125946,8,239.569,-161.025,190.346,1);
+
+-- Mount the rider to the drake
+DELETE FROM `vehicle_template_accessory` WHERE `entry`=24083;
+INSERT INTO `vehicle_template_accessory`(`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES
+(24083,24849,0,0,'Proto Drake Rider mounted to Enslaved Proto Drake',6,30000);
+
+-- Create required spellclick information
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=24083;
+INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`cast_flags`) VALUES
+(24083,55074,1);
+
+-- Remove no longer needed data
+DELETE FROM `creature` WHERE `guid`=125912 AND `map`=574 AND `id`=24849;
+DELETE FROM `creature_addon` WHERE `guid`=125912;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=24083;
diff --git a/sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql b/sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql
new file mode 100644
index 00000000000..7d2caf76e33
--- /dev/null
+++ b/sql/updates/world/2012_11_16_02_world_creature_ai_summons.sql
@@ -0,0 +1 @@
+DROP TABLE `creature_ai_summons`;
diff --git a/sql/updates/world/2012_11_17_00_world_various_fixes.sql b/sql/updates/world/2012_11_17_00_world_various_fixes.sql
new file mode 100644
index 00000000000..981d378217f
--- /dev/null
+++ b/sql/updates/world/2012_11_17_00_world_various_fixes.sql
@@ -0,0 +1,834 @@
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3132: Horde Brewfest Vendors
+-- add Ray'ma <Brew of the Month Club> (27489)
+DELETE FROM `creature` WHERE `id`=27489;
+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
+(42662,27489,1,1,1,0,0,1472.608,-4209.172,43.26931,4.433136,600,0,0,7500,1,0,0,0,0);
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3563: Mistcaller Yngvar
+-- Deletes incorrectly spawned Mistcaller Yngvar
+DELETE FROM `creature` WHERE `id`=34965;
+-- Spawns missing Spell Focus for Mistcaller's Cave
+DELETE FROM `gameobject` WHERE `guid`=365;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(365,300006,571,1,1,10184.8,1184.6,75.892,2.7989,0,0,0.985356,0.170509,300,0,1);
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3635: The Test of Skulls, Somnus
+-- Spawn Somnus (12900) NPC needed for The Test of Skulls, Somnus (6583) quest fix by shlomi1515
+SET @NPC :=12900;
+UPDATE `creature_template` SET AIName='SmartAI', Mechanic_Immune_Mask=2147483647 WHERE entry=@NPC;
+DELETE FROM `creature` WHERE id=@NPC;
+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
+(42880,@NPC,0,1,1,0,0,-10444.5,-4096.17,28.9469,2.91185,300,0,0,38844,0,2,0,0,0);
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC 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
+(@NPC,0,0,0,13,0,100,0,75000,75000,75000,75000,11,20989,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - Target is Casting - Cast Sleep'),
+(@NPC,0,1,0,13,0,100,0,85000,85000,85000,85000,11,12882,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - Target is Casting - Cast Wing Flap'),
+(@NPC,0,2,0,0,0,100,0,0,5000,30000,30000,11,20667,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - IC - Cast Corrosive Acid Breath'),
+(@NPC,0,3,0,0,0,100,0,7000,9000,14000,20000,11,18368,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Somnus - IC - Cast Strike');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3678: Joys of Omosh
+-- Orokk Omosh SAI
+SET @ENTRY := 7790;
+SET @QUEST := 2755;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
+DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
+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
+(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'Orokk Omosh - On Quest Accept - Run Script'),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,5,10,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orokk Omosh - On Script - Start Dancing'),
+(@ENTRY*100,9,1,0,0,0,100,0,30000,30000,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Orokk Omosh - On Script - Stop Dancing'),
+(@ENTRY*100,9,2,0,0,0,100,0,33000,33000,0,0,15,@QUEST,0,0,0,0,7,0,0,0,0,0,0,0,0, 'Orokk Omosh - On Script - Quest Credit');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3679: Gnomer-gooooone!
+-- Raschal the Courier SAI
+SET @ENTRY := 7853;
+SET @QUEST := 2843;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
+DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
+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
+(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0, 'Scooty - On Quest Accept - Run Script'),
+(@ENTRY*100,9,0,0,0,0,100,0,10000,10000,0,0,15,@QUEST,0,0,0,0,7,0,0,0,0,0,0,0,0, 'Scooty - On Script - Quest Credit');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3680: Test of Faith
+-- Dorn Plainstalker SAI
+SET @ENTRY := 2986;
+SET @QUEST := 1149;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `id`=@QUEST;
+DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,0,19,0,100,0,@QUEST,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Dorn Plainstalker - On Quest Accept - Say Line 0');
+-- Text
+DELETE FROM `db_script_string` WHERE `entry`=2000000042;
+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, 'Until we meet again, brave one.',12,0,100,113,0,0, 'Dorn Plainstalker');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3749: Frankly,It Makes No Sense
+SET @Scorp := 21909; -- Arcano-Scorp
+SET @CreditGuid := 84902; -- There is unused spawn of this
+SET @Guid1 := 43463; -- TC team values should be set here -> add missing scorp spawn
+SET @Guid2 := 43464; -- TC team values should be set here -> add missing scorp spawn
+SET @Control1 := 37867; -- Trigger /connected with dismissing to make vehicle not attack master/
+SET @Control1_1 := 37868; -- Control /apply control aura without target/
+SET @Control2 := 37892; -- -//-
+SET @Control2_2 := 37893; -- -//-
+SET @Control3 := 37894; -- -//-
+SET @Control3_3 := 37895; -- -//-
+SET @Diametron := 21462; -- Greater Fellfire Diametron
+-- Arcano-Scorp spells:
+SET @Tag := 37851; -- Tag Greater Felfire Diemetradon
+SET @Arcano_Cloak := 37917;
+SET @Arcano_dismantle := 37919;
+SET @Arcano_pince := 37918;
+-- Add spawns for two missing Arcano-Scorps
+UPDATE `creature_template` SET `AIName`='PetAI',`unit_flags`=512,`MovementType`=1,`spell4`=@Tag,`spell5`=@Arcano_Cloak,`spell6`=@Arcano_dismantle,`spell7`=@Arcano_pince WHERE `entry`=@Scorp;
+UPDATE `creature` SET `MovementType`=1,`spawndist`=3,`position_x`=-3414.004,`position_y`=825.4113,`position_z`=-30.77301 WHERE `guid`=76655;
+DELETE FROM `creature` WHERE `guid` IN (@Guid1,@Guid2,@CreditGuid);
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`MovementType`) VALUES
+(@Guid1,@Scorp,530,1,1,-3414.294,813.9421,-31.12042,1.478481,30,3,0,1),
+(@Guid2,@Scorp,530,1,1,-3408.508,795.8544,-31.42966,1.452154,30,3,0,1);
+-- Spell script for trigger of control spell *will rewrite it once SAI spell script is released*
+DELETE FROM `spell_scripts` WHERE `id` IN (@Control1,@Control2,@Control3);
+INSERT INTO `spell_scripts` (`id`,`effindex`,`delay`,`command`,`datalong`,`datalong2`) VALUES
+(@Control1,0,0,15,@Control1_1,2),
+(@Control2,0,0,15,@Control2_2,2),
+(@Control3,0,0,15,@Control3_3,2);
+-- Limit @Tag only to Diametrons,also to ones not affected by it
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@Tag;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@Tag,0,0,31,1,3,@Diametron,0,0,0, '', 'Tag can only target Greater Felfire Diametrons'),
+(17,0,@Tag,0,0,1,1,@Tag,0,0,1,0, '', 'Tag cannot be casted on tagged Diametrons');
+-- Limit Arcano_Dismantle to not being able to hit self and cannot damage anything else beside Arcano-scorp
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@Arcano_dismantle;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@Arcano_dismantle,0,0,33,1,0,1,0,1,0, '', 'Arcano-Dismantle effect 0 cannot hit self'),
+(13,2,@Arcano_dismantle,0,0,33,1,0,1,0,1,0, '', 'Arcano-Dismantle effect 1 cannot hit self'),
+(13,1,@Arcano_dismantle,0,0,31,0,3,@Scorp,0,0,0, '', 'Arcano-Dismantle effect 0 can hit only Arcano-Scorp'),
+(13,2,@Arcano_dismantle,0,0,31,0,3,@Scorp,0,0,0, '', 'Arcano-Dismantle effect 1 can hit only Arcano-Scorp');
+-- Limit @Arcano_pince to not being able to hit self and cannot damage anything else beside Arcano-scorp
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@Arcano_pince;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@Arcano_pince,0,0,33,1,0,1,0,1,0, '', 'Arcano_pince effect 0 cannot hit self'),
+(13,1,@Arcano_pince,0,0,31,0,3,@Scorp,0,0,0, '', 'Arcano_pince effect 0 can hit only Arcano-Scorp');
+-- Add SAI for Greater Diametron to prevent some bugs
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Diametron;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Diametron;
+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
+(@Diametron,0,0,0,0,0,100,0,4500,5000,5000,7000,11,37945,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - IC - Cast Fel Fireball'),
+(@Diametron,0,1,0,0,0,100,0,1500,3000,15000,17000,11,37941,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - IC - Cast Flaming Wound'),
+(@Diametron,0,2,3,8,0,100,0,@Tag,0,0,0,90,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - On hit by spell Tag - Set bytes to wipe aggro'),
+(@Diametron,0,3,4,61,0,100,0,0,0,0,0,91,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - Linked with previous event - Remove bytes'),
+(@Diametron,0,4,0,61,0,100,0,0,0,0,0,75,@Tag,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Greater Fellfire Diametron - Linked with previous event - Add Tag aura on self');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3809: You Robot
+DELETE FROM `creature_ai_scripts` WHERE creature_id=19851;
+UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry`=19851;
+DELETE FROM `smart_scripts` WHERE entryorguid=19851;
+INSERT INTO `smart_scripts` VALUES
+(19851,0,0,0,9,0,100,0,8,25,15000,21000,11,35570,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Negatron - Cast Charge'),
+(19851,0,1,0,9,0,100,0,0,5,15000,21000,11,34625,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Negatron - Cast Demolish'),
+(19851,0,2,0,0,0,100,0,15000,19000,21000,25000,11,35565,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Negatron - Cast Earthquake'),
+(19851,0,3,0,2,0,100,0,0,50,16000,22000,11,34624,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Negatron - Cast Frenzy at 50% HP'),
+(19851,0,4,0,6,0,100,0,0,0,0,0,15,10248,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Negatron - Death - Quest Complete');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3822: Deaths Door
+-- Fix quest 10910 'Deaths Door'
+-- Evergrove Druid SAI
+SET @ENTRY := 22423;
+UPDATE `creature_template` SET `inhabittype`=4,`AIName`= 'SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature_template_addon` SET `bytes1`=0,`bytes2`=1,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,8,0,100,1,38782,0,0,0,11,38776,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - transform to crow'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,19,33554432,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - Remove field flag'),
+(@ENTRY,0,2,3,61,0,100,0,0,0,0,0,69,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - Follow player invoker'),
+(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On hit by signal - Set npcflag = 2'),
+(@ENTRY,0,4,5,64,0,100,1,0,0,0,0,11,39158,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On gossip hello - transform to druid, since end point for follow can''t be player'),
+(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,41,60000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - After 60 sec - despawn'),
+(@ENTRY,0,6,0,19,0,100,0,10904,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On target accepted next quest - despawn'),
+(@ENTRY,0,7,0,19,0,100,0,10911,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On target accepted next quest - despawn'),
+(@ENTRY,0,8,0,19,0,100,0,10912,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Evergrove Druid - On target accepted next quest - despawn'),
+(@ENTRY,0,9,0,11,0,100,0,0,0,0,0,83,2,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Evergrove Druid - On Spawn - Remove quest flag');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3930: Evil Draws Near
+-- Teribus the Cursed is out of combat when is finally summoned by players
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry`=22441; -- removing OOC
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `creature` WHERE `guid`=42889;
+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 (42889,34675,0,1,1,0,0,-9133.91,355.333,92.3983,2.0151,300,0,0,1524,0,0,0,0,0);
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 3761 Day of the Dead
+-- Day of the Dead
+SET @ENTRY := 34383; -- Catrina
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@ENTRY,0,0,0,10,NULL);
+UPDATE `quest_template` SET `RequiredRaces`=512 WHERE `Id`=14171;
+UPDATE `quest_template` SET `RequiredRaces`=1024 WHERE `Id`=14169;
+-- Invisibility aura for Cheerful Spirits
+DELETE FROM `creature_template_addon` WHERE `entry` IN (35256,34435,34435,34478,34481,34484,34479,34483,34476,34477,34480,34482,35260,35261);
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(35256,0,0,0,0,0,30628), -- Cheerful Dalaran Spirit
+(34435,0,0,0,0,0,30628), -- Cheerful Human Spirit
+(34478,0,0,0,0,0,30628), -- Cheerful Dwarf Spirit
+(34481,0,0,0,0,0,30628), -- Cheerful Gnome Spirit
+(34484,0,0,0,0,0,30628), -- Cheerful Draenei Spirit
+(34479,0,0,0,0,0,30628), -- Cheerful Night Elf Spirit
+(34483,0,0,0,0,0,30628), -- Cheerful Blood Elf Spirit
+(34476,0,0,0,0,0,30628), -- Cheerful Forsaken Spirit
+(34477,0,0,0,0,0,30628), -- Cheerful Orc Spirit
+(34480,0,0,0,0,0,30628), -- Cheerful Tauren Spirit
+(34482,0,0,0,0,0,30628), -- Cheerful Troll Spirit
+(35260,0,0,0,0,0,30628), -- Cheerful Aldor Spirit
+(35261,0,0,0,0,0,30628); -- Cheerful Scryer Spirit
+-- Quest relations
+DELETE FROM `creature_questrelation` WHERE `id` IN (35256,34435,34435,34478,34481,34484,34479,34483,34476,34477,34480,34482,35260,35261);
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES
+(34435,13952),
+(34476,14174),
+(34477,14175),
+(34478,14167),
+(34479,14170),
+(34480,14176),
+(34481,14168),
+(34482,14177),
+(34483,14171),
+(34484,14169),
+(35256,14166),
+(35260,14172),
+(35261,14173);
+DELETE FROM `creature_involvedrelation` WHERE `id` IN (35256,34435,34435,34478,34481,34484,34479,34483,34476,34477,34480,34482,35260,35261);
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(34435,13952),
+(34476,14174),
+(34477,14175),
+(34478,14167),
+(34479,14170),
+(34480,14176),
+(34481,14168),
+(34482,14177),
+(34483,14171),
+(34484,14169),
+(35256,14166),
+(35260,14172),
+(35261,14173);
+-- Creature spawns for Day of the Dead Event
+SET @GUID := 134848;
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+146;
+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
+(@GUID,20102,530,1,1,0,0,3038.56,3635.53,144.012,3.32713,300,0,0,42,0,0,0,0,0),
+(@GUID+1,35250,1,1,1,0,0,10066,2125.69,1329.66,1.12742,300,0,0,42,0,0,0,0,0),
+(@GUID+2,35250,1,1,1,0,0,10058.4,2135.92,1330.81,4.55176,300,0,0,42,0,0,0,0,0),
+(@GUID+3,35250,1,1,1,0,0,10045,2109.59,1330.2,0.224221,300,0,0,42,0,0,0,0,0),
+(@GUID+4,35250,1,1,1,0,0,10053.8,2104.68,1330.93,1.5594,300,0,0,42,0,0,0,0,0),
+(@GUID+5,35250,1,1,1,0,0,10052.9,2111.1,1330.06,1.93246,300,0,0,42,0,0,0,0,0),
+(@GUID+6,35250,1,1,1,0,0,10062.2,2109.76,1330.92,2.08954,300,0,0,42,0,0,0,0,0),
+(@GUID+7,35250,1,1,1,0,0,10063.5,2117.74,1330.03,3.55824,300,0,0,42,0,0,0,0,0),
+(@GUID+8,35250,1,1,1,0,0,10059.1,2123.97,1330.28,5.04264,300,0,0,42,0,0,0,0,0),
+(@GUID+9,35250,1,1,1,0,0,10052.9,2127.26,1330.13,3.93523,300,0,0,42,0,0,0,0,0),
+(@GUID+10,34479,1,1,1,0,0,10061.5,2128.42,1330.17,2.73357,300,0,0,2442,2434,0,0,0,0),
+(@GUID+11,35243,530,1,1,0,0,9404.91,-6859.42,15.101,4.17483,300,0,0,40,120,0,0,0,0),
+(@GUID+12,35243,530,1,1,0,0,9411.01,-6855.19,14.9017,1.27278,300,0,0,40,120,0,0,0,0),
+(@GUID+13,35243,530,1,1,0,0,9414.6,-6853.32,14.9361,2.67472,300,0,0,40,120,0,0,0,0),
+(@GUID+14,35243,530,1,1,0,0,9415.1,-6848.51,15.1693,3.83318,300,0,0,40,120,0,0,0,0),
+(@GUID+15,35249,0,1,1,0,0,-9350.81,171.018,61.7532,1.0198,300,0,0,42,0,0,0,0,0),
+(@GUID+16,35253,1,1,1,0,0,1174.68,-4467.53,21.2746,0.833251,300,0,0,42,0,0,0,0,0),
+(@GUID+17,35253,1,1,1,0,0,1182,-4463.02,21.2426,2.68915,300,0,0,42,0,0,0,0,0),
+(@GUID+18,35253,1,1,1,0,0,1186.12,-4465.53,21.2886,1.73018,300,0,0,42,0,0,0,0,0),
+(@GUID+19,35253,1,1,1,0,0,1176.79,-4460.38,21.4269,5.82603,300,0,0,42,0,0,0,0,0),
+(@GUID+20,35251,1,1,1,0,0,1172.3,-4460.54,21.4697,6.19124,300,0,0,42,0,0,0,0,0),
+(@GUID+21,35251,1,1,1,0,0,1180.91,-4471.22,21.1603,1.71055,300,0,0,42,0,0,0,0,0),
+(@GUID+22,34483,530,1,1,0,0,9407.42,-6859.87,14.8699,3.93528,300,0,0,4890,7196,0,0,0,0),
+(@GUID+23,35243,530,1,1,0,0,9409.6,-6847.61,15.5215,4.92881,300,0,0,40,120,0,0,0,0),
+(@GUID+24,35243,530,1,1,0,0,9407.46,-6852.95,15.239,0.00436234,300,0,0,40,120,0,0,0,0),
+(@GUID+25,35249,0,1,1,0,0,-9337.56,188.283,61.5117,3.72314,300,0,0,42,0,0,0,0,0),
+(@GUID+26,35249,0,1,1,0,0,-9340.16,183.339,61.5512,0.349854,300,0,0,42,0,0,0,0,0),
+(@GUID+27,35249,0,1,1,0,0,-9342.2,187.984,61.5586,5.25467,300,0,0,42,0,0,0,0,0),
+(@GUID+28,35249,0,1,1,0,0,-9329.31,166.352,61.5815,1.76357,300,0,0,42,0,0,0,0,0),
+(@GUID+29,35249,0,1,1,0,0,-9322.06,168.47,61.6066,2.40367,300,0,0,42,0,0,0,0,0),
+(@GUID+30,35249,0,1,1,0,0,-9318.67,173.348,61.613,2.83957,300,0,0,42,0,0,0,0,0),
+(@GUID+31,35249,0,1,1,0,0,-9346.44,171.041,61.5582,2.74061,300,0,0,42,0,0,0,0,0),
+(@GUID+32,35249,0,1,1,0,0,-9344.05,175.877,61.5584,3.59669,300,0,0,42,0,0,0,0,0),
+(@GUID+33,35249,0,1,1,0,0,-9349.19,176.153,61.726,5.18634,300,0,0,42,0,0,0,0,0),
+(@GUID+34,35249,0,1,1,0,0,-9327.92,185.507,62.7096,4.07265,300,0,0,42,0,0,0,0,0),
+(@GUID+35,34383,1,1,1,0,0,1184.43,-4467.28,21.3388,1.2079,300,0,0,12600,0,0,0,0,0),
+(@GUID+36,34383,0,1,1,0,0,-9330.46,180.936,61.6792,4.1716,300,0,0,12600,0,0,0,0,0),
+(@GUID+37,34382,1,1,1,0,0,1180.53,-4465.53,21.3293,0.944794,600,0,0,12600,0,0,0,0,0),
+(@GUID+38,34382,0,1,1,0,0,-9327.6,178.975,61.6973,4.10484,600,0,0,12600,0,0,0,0,0),
+(@GUID+39,34482,1,1,1,0,0,1181.51,-4469.65,21.2349,1.4121,300,0,0,2136,5751,0,0,0,0),
+(@GUID+40,34435,0,1,1,0,0,-9354.72,167.942,61.665,0.27367,300,0,0,3052,0,0,0,0,0),
+(@GUID+41,34477,1,1,1,0,0,1173.47,-4462.54,21.3309,0.60707,300,0,0,3052,0,0,0,0,0),
+(@GUID+42,35256,571,1,65535,0,0,5831.01,751.564,641.134,3.40199,300,0,0,12600,0,0,0,0,0),
+(@GUID+43,35254,571,1,65535,0,0,5829.42,754.776,640.729,5.14164,300,0,0,8508,7981,0,0,0,0),
+(@GUID+44,35254,571,1,65535,0,0,5827.15,751.291,640.952,0.150437,300,0,0,8508,7981,0,0,0,0),
+(@GUID+45,35254,571,1,65535,0,0,5830.31,746.699,641.251,1.36388,300,0,0,8508,7981,0,0,0,0),
+(@GUID+46,35254,571,1,65535,0,0,5835.25,748.654,641.162,2.59303,300,0,0,8508,7981,0,0,0,0),
+(@GUID+47,35254,571,1,65535,0,0,5835.24,754.043,641.008,3.64153,300,0,0,8508,7981,0,0,0,0),
+(@GUID+48,35254,571,1,65535,0,0,5828.15,741.877,642.46,1.24607,300,0,0,8508,7981,0,0,0,0),
+(@GUID+49,35254,571,1,65535,0,0,5846.77,755.676,640.68,0.837661,300,0,0,8508,7981,0,0,0,0),
+(@GUID+50,35254,571,1,65535,0,0,5850.95,756.541,640.434,2.81294,300,0,0,8508,7981,0,0,0,0),
+(@GUID+51,35254,571,1,65535,0,0,5848.22,760.619,641.147,4.64684,300,0,0,8508,7981,0,0,0,0),
+(@GUID+52,35254,571,1,65535,0,0,5841.11,762.141,640.661,0.480303,300,0,0,8508,7981,0,0,0,0),
+(@GUID+53,35244,0,1,1,0,0,1833.58,225.962,60.4294,4.33165,300,0,0,42,0,0,0,0,0),
+(@GUID+54,35244,0,1,1,0,0,1828.46,224.586,60.4551,5.29769,300,0,0,42,0,0,0,0,0),
+(@GUID+55,35244,0,1,1,0,0,1824.9,218.875,60.4469,0.0315971,300,0,0,42,0,0,0,0,0),
+(@GUID+56,35244,0,1,1,0,0,1836.95,222.233,60.2385,3.22031,300,0,0,42,0,0,0,0,0),
+(@GUID+57,35244,0,1,1,0,0,1834.67,215.873,60.1774,2.55665,300,0,0,42,0,0,0,0,0),
+(@GUID+58,35244,0,1,1,0,0,1821.83,225.812,60.919,5.50582,300,0,0,42,0,0,0,0,0),
+(@GUID+59,34476,0,1,1,0,0,1830.34,219.535,60.6017,4.58298,300,0,0,3052,0,0,0,0,0),
+(@GUID+60,34382,571,1,65535,0,0,5844.1,764.778,640.546,4.20309,600,0,0,12600,0,0,0,0,0),
+(@GUID+61,34382,0,1,1,0,0,1832.47,210.797,60.312,2.04222,600,0,0,12600,0,0,0,0,0),
+(@GUID+62,34382,530,1,1,0,0,9406.42,-6864.02,14.8942,1.19424,600,0,0,12600,0,0,0,0,0),
+(@GUID+63,34382,1,1,1,0,0,10058.2,2133,1329.66,4.43788,600,0,0,12600,0,0,0,0,0),
+(@GUID+64,34382,1,1,1,0,0,-989.195,-59.6891,27.4632,5.21191,600,0,0,12600,0,0,0,0,0),
+(@GUID+65,34382,530,1,1,0,0,-4320.01,-12433.4,17.9088,5.1906,600,0,0,12600,0,0,0,0,0),
+(@GUID+66,34382,530,1,1,0,0,-1805.58,4911.74,-21.8346,1.35833,600,0,0,12600,0,0,0,0,0),
+(@GUID+67,34382,0,1,1,0,0,-5151.65,-852.495,508.667,4.58185,600,0,0,12600,0,0,0,0,0),
+(@GUID+68,34383,571,1,65535,0,0,5844.93,762.949,640.713,2.86791,300,0,0,12600,0,0,0,0,0),
+(@GUID+69,34383,0,1,1,0,0,1828.96,210.695,60.2619,1.24504,300,0,0,12600,0,0,0,0,0),
+(@GUID+70,34383,530,1,1,0,0,9403.71,-6861.68,15.0351,0.609119,300,0,0,12600,0,0,0,0,0),
+(@GUID+71,34383,1,1,1,0,0,10067,2128.44,1329.66,3.57394,300,0,0,12600,0,0,0,0,0),
+(@GUID+72,34383,1,1,1,0,0,-987.397,-58.6047,27.5876,4.96843,300,0,0,12600,0,0,0,0,0),
+(@GUID+73,34383,530,1,1,0,0,-4317.46,-12431.3,17.755,5.11599,300,0,0,12600,0,0,0,0,0),
+(@GUID+74,34383,530,1,1,0,0,-1809.42,4913.42,-21.8336,0.867451,300,0,0,12600,0,0,0,0,0),
+(@GUID+75,34383,0,1,1,0,0,-5155.07,-854.489,508.115,5.0845,300,0,0,12600,0,0,0,0,0),
+(@GUID+76,34480,1,1,1,0,0,-979.399,-75.0704,19.5113,0.118608,300,0,0,3052,0,0,0,0,0),
+(@GUID+77,35252,1,1,1,0,0,-979.099,-78.4939,19.6825,0.8451,300,0,0,42,0,0,0,0,0),
+(@GUID+78,35252,1,1,1,0,0,-979.773,-70.3366,19.8615,5.07447,300,0,0,42,0,0,0,0,0),
+(@GUID+79,35252,1,1,1,0,0,-975.337,-71.6525,18.3695,3.78799,300,0,0,42,0,0,0,0,0),
+(@GUID+80,35252,1,1,1,0,0,-975.356,-76.2146,18.7461,2.57848,300,0,0,42,0,0,0,0,0),
+(@GUID+81,35252,1,1,1,0,0,-979.443,-57.4083,26.7673,4.68334,300,0,0,42,0,0,0,0,0),
+(@GUID+82,34484,530,1,1,0,0,-4329.44,-12443.6,17.6841,5.62257,300,0,0,5589,3155,0,0,0,0),
+(@GUID+83,35246,530,1,1,0,0,-4326.98,-12448.5,16.9294,5.47334,300,0,0,41,60,0,0,0,0),
+(@GUID+84,35246,530,1,1,0,0,-4326.59,-12453.9,16.7549,0.721683,300,0,0,41,60,0,0,0,0),
+(@GUID+85,35246,530,1,1,0,0,-4319.13,-12455.1,17.4243,2.4417,300,0,0,41,60,0,0,0,0),
+(@GUID+86,35246,530,1,1,0,0,-4320.45,-12448.9,17.0584,3.68656,300,0,0,41,60,0,0,0,0),
+(@GUID+87,35246,530,1,1,0,0,-4309.37,-12444,17.5071,3.15249,300,0,0,41,60,0,0,0,0),
+(@GUID+88,35246,530,1,1,0,0,-4312.76,-12446.2,17.3102,1.3932,300,0,0,41,60,0,0,0,0),
+(@GUID+89,35246,530,1,1,0,0,-4313.48,-12441,17.2002,5.26914,300,0,0,41,60,0,0,0,0),
+(@GUID+90,35246,530,1,1,0,0,-4315.9,-12433.6,17.5953,2.19823,300,0,0,41,60,0,0,0,0),
+(@GUID+91,35260,530,1,1,0,0,-1810.34,4923.26,-21.8439,5.41099,300,0,0,5589,3155,0,0,0,0),
+(@GUID+92,35261,530,1,1,0,0,-1796.9,4928.76,-22.2745,3.23936,300,0,0,4890,7196,0,0,0,0),
+(@GUID+93,35258,530,1,1,0,0,-1806.01,4925.33,-21.878,3.62813,300,0,0,4140,6443,0,0,0,0),
+(@GUID+94,35258,530,1,1,0,0,-1812.25,4929.11,-21.6268,4.96723,300,0,0,4140,6443,0,0,0,0),
+(@GUID+95,35258,530,1,1,0,0,-1814.69,4922.25,-22.0148,0.254842,300,0,0,4140,6443,0,0,0,0),
+(@GUID+96,35258,530,1,1,0,0,-1809.16,4918.68,-21.982,1.82171,300,0,0,4140,6443,0,0,0,0),
+(@GUID+97,35259,530,1,1,0,0,-1801.26,4929.1,-22.3108,6.17282,300,0,0,4140,6443,0,0,0,0),
+(@GUID+98,35259,530,1,1,0,0,-1792.87,4928.28,-22.1848,2.99981,300,0,0,4140,6443,0,0,0,0),
+(@GUID+99,35259,530,1,1,0,0,-1797.58,4924.28,-21.9414,1.31905,300,0,0,4140,6443,0,0,0,0),
+(@GUID+100,35259,530,1,1,0,0,-1796.3,4933.33,-22.3432,4.54704,300,0,0,4140,6443,0,0,0,0),
+(@GUID+101,34481,0,1,1,0,0,-5167.84,-870.949,506.706,1.024,300,0,0,2136,5751,0,0,0,0),
+(@GUID+102,34478,0,1,1,0,0,-5165.9,-866.76,506.808,4.28811,300,0,0,3052,0,0,0,0,0),
+(@GUID+103,35247,0,1,1,0,0,-5162.65,-873.025,507.206,1.00122,300,0,0,42,0,0,0,0,0),
+(@GUID+104,35247,0,1,1,0,0,-5158.7,-872.414,507.406,2.72124,300,0,0,42,0,0,0,0,0),
+(@GUID+105,35247,0,1,1,0,0,-5160.49,-869.137,507.265,4.21349,300,0,0,42,0,0,0,0,0),
+(@GUID+106,35247,0,1,1,0,0,-5164.33,-869.728,507.01,5.69397,300,0,0,42,0,0,0,0,0),
+(@GUID+107,35248,0,1,1,0,0,-5155,-856.249,508.059,1.51565,300,0,0,42,0,0,0,0,0),
+(@GUID+108,35248,0,1,1,0,0,-5159.06,-867.484,507.333,0.859842,300,0,0,42,0,0,0,0,0),
+(@GUID+109,35248,0,1,1,0,0,-5154.91,-867.566,507.758,2.45027,300,0,0,42,0,0,0,0,0),
+(@GUID+110,35248,0,1,1,0,0,-5155.64,-863.343,507.652,4.05641,300,0,0,42,0,0,0,0,0),
+(@GUID+111,35248,0,1,1,0,0,-5159.96,-863.16,507.247,5.49762,300,0,0,42,0,0,0,0,0),
+(@GUID+112,18927,0,1,1,0,0,-8855.97,652.546,96.2675,5.07716,300,0,0,42,0,0,0,0,0),
+(@GUID+113,18927,571,1,1,0,0,5678.09,658.93,647.134,0.088838,300,0,0,42,0,0,0,0,0),
+(@GUID+114,18927,0,1,1,0,0,-8854.78,649.83,96.7417,1.43117,300,0,0,42,0,0,0,0,0),
+(@GUID+115,18927,571,1,1,0,0,5719.3,687.257,645.752,5.72721,300,0,0,42,0,0,0,0,0),
+(@GUID+116,19169,530,1,1,0,0,9659.86,-7115.63,14.3239,5.88552,300,0,0,42,0,0,0,0,0),
+(@GUID+117,19169,571,1,1,0,0,5889.57,550.355,639.637,1.57167,300,0,0,42,0,0,0,0,0),
+(@GUID+118,19169,571,1,1,0,0,5928.98,639.593,645.557,3.01052,300,0,0,42,0,0,0,0,0),
+(@GUID+119,19169,530,1,1,0,0,9664.38,-7117.91,14.324,2.63397,300,0,0,42,0,0,0,0,0),
+(@GUID+120,19148,0,1,1,0,0,-4914.82,-951.191,501.498,4.5773,300,0,0,42,0,0,0,0,0),
+(@GUID+121,19148,0,1,1,0,0,-4915.33,-953.892,501.498,2.25016,300,0,0,42,0,0,0,0,0),
+(@GUID+122,19171,530,1,1,0,0,-3910.91,-11612.4,-138.243,4.99941,300,0,0,42,0,0,0,0,0),
+(@GUID+123,19171,530,1,1,0,0,-3909.22,-11614.8,-138.101,3.1765,300,0,0,42,0,0,0,0,0),
+(@GUID+124,19172,0,1,1,0,0,-4826.78,-1175.89,502.193,2.45358,300,0,0,42,0,0,0,0,0),
+(@GUID+125,19172,0,1,1,0,0,-4829.02,-1174.75,502.193,0.724139,300,0,0,42,0,0,0,0,0),
+(@GUID+126,19173,1,1,1,0,0,9923.44,2496.95,1317.49,2.28359,300,0,0,42,0,0,0,0,0),
+(@GUID+127,19173,1,1,1,0,0,9921.56,2499.58,1317.77,5.61996,300,0,0,42,0,0,0,0,0),
+(@GUID+128,19178,0,1,1,0,0,1626.7,222.7,-43.1027,1.01229,300,0,0,42,0,0,0,0,0),
+(@GUID+129,19178,0,1,1,0,0,1629.95,219.238,-43.1027,1.91079,300,0,0,42,0,0,0,0,0),
+(@GUID+130,19177,1,1,1,0,0,1688.01,-4350.19,61.2691,2.56413,300,0,0,42,0,0,0,0,0),
+(@GUID+131,19177,1,1,1,0,0,1685.07,-4352.88,61.7253,1.79601,300,0,0,42,0,0,0,0,0),
+(@GUID+132,19176,1,1,1,0,0,-1241.98,81.7344,129.422,5.4992,300,0,0,42,0,0,0,0,0),
+(@GUID+133,19176,1,1,1,0,0,-1242.68,76.7127,128.935,1.27376,300,0,0,42,0,0,0,0,0),
+(@GUID+134,19175,1,1,1,0,0,1607.39,-4402.93,10.1664,3.11715,300,0,0,42,0,0,0,0,0),
+(@GUID+135,19175,1,1,1,0,0,1603.36,-4404.49,9.30901,0.627438,300,0,0,42,0,0,0,0,0),
+(@GUID+136,20102,1,1,1,0,0,6747.03,-4664.43,724.551,3.61009,300,0,0,42,0,0,0,0,0),
+(@GUID+137,20102,1,1,1,0,0,-938.792,-3735.2,8.57162,3.66385,300,0,0,42,0,0,0,0,0),
+(@GUID+138,20102,1,1,1,0,0,-7177.24,-3810.02,8.3753,0.711558,300,0,0,42,0,0,0,0,0),
+(@GUID+139,20102,0,1,1,0,0,-14464.9,470.287,15.0369,5.96098,300,0,0,42,0,0,0,0,0),
+(@GUID+140,20102,530,1,1,0,0,-1888.02,5400.44,-12.4278,5.97919,300,0,0,42,0,0,0,0,0),
+(@GUID+141,20102,530,1,1,0,0,3035.51,3635.08,144.47,0.901821,300,0,0,42,0,0,0,0,0),
+(@GUID+142,20102,1,1,1,0,0,6745.48,-4667.44,723.103,1.03712,300,0,0,42,0,0,0,0,0),
+(@GUID+143,20102,1,1,1,0,0,-936.306,-3738.3,8.96324,3.35283,300,0,0,42,0,0,0,0,0),
+(@GUID+144,20102,1,1,1,0,0,-7173.14,-3808.58,8.37043,3.3285,300,0,0,42,0,0,0,0,0),
+(@GUID+145,20102,0,1,1,0,0,-14461.4,468.507,15.1232,2.66545,300,0,0,42,0,0,0,0,0),
+(@GUID+146,20102,530,1,1,0,0,-1884.63,5397.52,-12.4278,2.51637,300,0,0,42,0,0,0,0,0);
+-- Assignment of creatures to game event.
+DELETE FROM `game_event_creature` WHERE `eventEntry`=51 AND `guid` BETWEEN @GUID AND @GUID+146;
+INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
+(51,@GUID),(51,@GUID+1),(51,@GUID+2),(51,@GUID+3),(51,@GUID+4),(51,@GUID+5),
+(51,@GUID+6),(51,@GUID+7),(51,@GUID+8),(51,@GUID+9),(51,@GUID+10),
+(51,@GUID+11),(51,@GUID+12),(51,@GUID+13),(51,@GUID+14),(51,@GUID+15),
+(51,@GUID+16),(51,@GUID+17),(51,@GUID+18),(51,@GUID+19),(51,@GUID+20),
+(51,@GUID+21),(51,@GUID+22),(51,@GUID+23),(51,@GUID+24),(51,@GUID+25),
+(51,@GUID+26),(51,@GUID+27),(51,@GUID+28),(51,@GUID+29),(51,@GUID+30),
+(51,@GUID+31),(51,@GUID+32),(51,@GUID+33),(51,@GUID+34),(51,@GUID+35),
+(51,@GUID+36),(51,@GUID+37),(51,@GUID+38),(51,@GUID+39),(51,@GUID+40),
+(51,@GUID+41),(51,@GUID+42),(51,@GUID+43),(51,@GUID+44),(51,@GUID+45),
+(51,@GUID+46),(51,@GUID+47),(51,@GUID+48),(51,@GUID+49),(51,@GUID+50),
+(51,@GUID+51),(51,@GUID+52),(51,@GUID+53),(51,@GUID+54),(51,@GUID+55),
+(51,@GUID+56),(51,@GUID+57),(51,@GUID+58),(51,@GUID+59),(51,@GUID+60),
+(51,@GUID+61),(51,@GUID+62),(51,@GUID+63),(51,@GUID+64),(51,@GUID+65),
+(51,@GUID+66),(51,@GUID+67),(51,@GUID+68),(51,@GUID+69),(51,@GUID+70),
+(51,@GUID+71),(51,@GUID+72),(51,@GUID+73),(51,@GUID+74),(51,@GUID+75),
+(51,@GUID+76),(51,@GUID+77),(51,@GUID+78),(51,@GUID+79),(51,@GUID+80),
+(51,@GUID+81),(51,@GUID+82),(51,@GUID+83),(51,@GUID+84),(51,@GUID+85),
+(51,@GUID+86),(51,@GUID+87),(51,@GUID+88),(51,@GUID+89),(51,@GUID+90),
+(51,@GUID+91),(51,@GUID+92),(51,@GUID+93),(51,@GUID+94),(51,@GUID+95),
+(51,@GUID+96),(51,@GUID+97),(51,@GUID+98),(51,@GUID+99),(51,@GUID+100),
+(51,@GUID+101),(51,@GUID+102),(51,@GUID+103),(51,@GUID+104),(51,@GUID+105),
+(51,@GUID+106),(51,@GUID+107),(51,@GUID+108),(51,@GUID+109),(51,@GUID+110),
+(51,@GUID+111),(51,@GUID+112),(51,@GUID+113),(51,@GUID+114),(51,@GUID+115),
+(51,@GUID+116),(51,@GUID+117),(51,@GUID+118),(51,@GUID+119),(51,@GUID+120),
+(51,@GUID+121),(51,@GUID+122),(51,@GUID+123),(51,@GUID+124),(51,@GUID+125),
+(51,@GUID+126),(51,@GUID+127),(51,@GUID+128),(51,@GUID+129),(51,@GUID+130),
+(51,@GUID+131),(51,@GUID+132),(51,@GUID+133),(51,@GUID+134),(51,@GUID+135),
+(51,@GUID+136),(51,@GUID+137),(51,@GUID+138),(51,@GUID+139),(51,@GUID+140),
+(51,@GUID+141),(51,@GUID+142),(51,@GUID+143),(51,@GUID+144),(51,@GUID+145),
+(51,@GUID+146);
+-- Gameobject spawns
+SET @GUID := 76237;
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID AND @GUID+313;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID,195066,1,1,1,-984.309,-72.3299,20.9918,0,0,0,0,1,180,100,1),
+(@GUID+1,195069,0,1,1,-9330.98,181.918,62.7222,2.54818,0,0,0,1,180,100,1),
+(@GUID+2,182807,530,1,1,9672.12,-7346.44,11.9311,-0.244346,0,0,0.121869,-0.992546,180,100,1),
+(@GUID+3,195307,0,1,1,1780.5,269.08,59.8237,3.00195,0,0,0,1,180,100,1),
+(@GUID+4,195090,0,1,1,-5155.34,-862.141,507.655,4.22449,0,0,0.856962,-0.515379,300,0,1),
+(@GUID+5,195307,1,1,1,10054.2,2129.03,1329.66,-2.30383,0,0,0,1,180,100,1),
+(@GUID+6,195307,0,1,1,1792.51,241.774,60.5867,-2.30383,0,0,0,1,180,100,1),
+(@GUID+7,195307,1,1,1,10053.8,2127.78,1329.67,-2.30383,0,0,0,1,180,100,1),
+(@GUID+8,195307,1,1,1,10049.7,2113.11,1329.68,-2.79252,0,0,0,1,180,100,1),
+(@GUID+9,195087,0,1,1,-9333.99,181.712,61.5651,4.14018,0,0,0.87792,-0.478807,300,0,1),
+(@GUID+10,195087,1,1,1,1177.92,-4467.1,21.3191,1.02726,0,0,0.49134,0.870968,300,0,1),
+(@GUID+11,195067,1,1,1,1179.08,-4469.52,21.5266,1.0194,0,0,0.487916,0.87289,300,0,1),
+(@GUID+12,195067,1,1,1,1174.65,-4455.39,21.539,1.12543,0,0,0.533485,0.845809,300,0,1),
+(@GUID+13,195067,1,1,1,1186.5,-4461.7,21.136,1.23932,0,0,0.580757,0.814077,300,0,1),
+(@GUID+14,195087,571,1,65535,5851.71,759.739,640.824,0.177921,0,0,0.088843,0.996046,300,0,1),
+(@GUID+15,195087,0,1,1,1831.24,213.873,60.339,4.59476,0,0,0.747449,-0.66432,300,0,1),
+(@GUID+16,195087,530,1,1,9410.84,-6856.04,14.8094,5.30187,0,0,0.471204,-0.882024,300,0,1),
+(@GUID+17,195087,1,1,1,10051.5,2108.48,1329.65,5.63954,0,0,0.316296,-0.948661,300,0,1),
+(@GUID+18,195087,1,1,1,-978.502,-68.0701,19.8816,2.48265,0,0,0.946214,0.323543,300,0,1),
+(@GUID+19,195087,530,1,1,-4320.88,-12435.8,17.794,2.95615,0,0,0.995704,0.0925905,300,0,1),
+(@GUID+20,195087,530,1,1,-1795.3,4913.74,-21.6189,5.79582,0,0,0.241278,-0.970456,300,0,1),
+(@GUID+21,195087,0,1,1,-5167.15,-868.97,506.692,3.55298,0,0,0.97892,-0.204245,300,0,1),
+(@GUID+22,195067,571,1,65535,5842.99,757.208,641.032,3.23312,0,0,0.998953,-0.0457468,300,0,1),
+(@GUID+23,195067,571,1,65535,5848.67,757.932,640.765,0.331072,0,0,0.164781,0.98633,300,0,1),
+(@GUID+24,195067,571,1,65535,5826.98,742.899,642.182,0.40961,0,0,0.203376,0.979101,300,0,1),
+(@GUID+25,195067,571,1,65535,5833.05,758.772,640.632,6.22548,0,0,0.0288469,-0.999584,300,0,1),
+(@GUID+26,195067,571,1,65535,5838.49,754.714,640.99,5.00419,0,0,0.596791,-0.802397,300,0,1),
+(@GUID+27,195067,0,1,1,-9325.85,176.738,61.6842,4.03415,0,0,0.902059,-0.431613,300,0,1),
+(@GUID+28,195067,0,1,1,-9339.4,177.75,61.5578,2.84035,0,0,0.988678,0.150053,300,0,1),
+(@GUID+29,195067,0,1,1,-9341.6,186.007,61.5588,0.590182,0,0,0.290827,0.956776,300,0,1),
+(@GUID+30,195067,0,1,1,-9349.4,172.027,61.5583,3.72,0,0,0.958472,-0.285187,300,0,1),
+(@GUID+31,195067,0,1,1,-9333.49,166.771,61.5731,4.50147,0,0,0.777611,-0.628745,300,0,1),
+(@GUID+32,195067,0,1,1,1838.15,218.056,60.1301,6.04382,0,0,0.119397,-0.992847,300,0,1),
+(@GUID+33,195067,0,1,1,1824.56,214.048,60.2184,2.55272,0,0,0.956966,0.290199,300,0,1),
+(@GUID+34,195067,0,1,1,1826.85,224.597,60.3819,1.15864,0,0,0.547456,0.836835,300,0,1),
+(@GUID+35,195067,0,1,1,1834.25,227.476,60.3832,0.0394494,0,0,0.0197234,0.999805,300,0,1),
+(@GUID+36,195067,530,1,1,9408.5,-6861.43,14.8097,5.18014,0,0,0.523987,-0.851727,300,0,1),
+(@GUID+37,195067,530,1,1,9414.83,-6847.96,15.2124,0.302815,0,0,0.15083,0.98856,300,0,1),
+(@GUID+38,195067,530,1,1,9406.18,-6848.78,15.7346,4.10414,0,0,0.886406,-0.462909,300,0,1),
+(@GUID+39,195067,1,1,1,10040.1,2118.35,1329.71,6.16969,0,0,0.0567171,-0.99839,300,0,1),
+(@GUID+40,195067,1,1,1,10054.5,2128.79,1329.66,0.15354,0,0,0.0766945,0.997055,300,0,1),
+(@GUID+41,195067,1,1,1,10064.3,2124.92,1329.66,5.938,0,0,0.171738,-0.985143,300,0,1),
+(@GUID+42,195067,1,1,1,10048.2,2118.42,1329.87,6.00475,0,0,0.138768,-0.990325,300,0,1),
+(@GUID+43,195067,1,1,1,-981.572,-70.544,20.3174,2.24703,0,0,0.901626,0.432516,300,0,1),
+(@GUID+44,195067,1,1,1,-982.861,-78.1374,20.4409,2.76147,0,0,0.981992,0.188921,300,0,1),
+(@GUID+45,195067,1,1,1,-979.741,-82.5911,20.4482,2.84001,0,0,0.988652,0.150222,300,0,1),
+(@GUID+46,195067,1,1,1,-985.891,-59.0171,27.1512,2.98923,0,0,0.9971,0.0761065,300,0,1),
+(@GUID+47,195067,530,1,1,-4330.57,-12441.9,18.6116,1.10261,0,0,0.523798,0.851843,300,0,1),
+(@GUID+48,195067,530,1,1,-4331.79,-12444.3,18.6116,1.10261,0,0,0.523798,0.851843,300,0,1),
+(@GUID+49,195067,530,1,1,-4320.15,-12431.6,18.6801,3.86328,0,0,0.935599,-0.353065,300,0,1),
+(@GUID+50,195067,530,1,1,-4318.44,-12430.1,18.6801,3.84757,0,0,0.938343,-0.345706,300,0,1),
+(@GUID+51,195067,530,1,1,-4322.19,-12440.2,17.4944,3.02291,0,0,0.99824,0.0593089,300,0,1),
+(@GUID+52,195067,530,1,1,-4323.07,-12450.7,16.8485,5.33983,0,0,0.454382,-0.890807,300,0,1),
+(@GUID+53,195067,530,1,1,-4311.45,-12442.3,17.3037,0.772738,0,0,0.376827,0.926284,300,0,1),
+(@GUID+54,195067,530,1,1,-1791.77,4917.77,-21.025,1.42901,0,0,0.655244,0.755417,300,0,1),
+(@GUID+55,195067,530,1,1,-1789.47,4922.28,-21.0992,1.01275,0,0,0.48501,0.874508,300,0,1),
+(@GUID+56,195067,530,1,1,-1784.66,4926.07,-21.1388,0.521876,0,0,0.257987,0.966148,300,0,1),
+(@GUID+57,195067,530,1,1,-1799.03,4911.63,-21.3716,4.9201,0,0,0.62999,-0.776603,300,0,1),
+(@GUID+58,195067,530,1,1,-1811.06,4914.83,-21.8399,3.80091,0,0,0.946153,-0.32372,300,0,1),
+(@GUID+59,195067,530,1,1,-1804.87,4922.87,-21.9285,0.341232,0,0,0.169789,0.98548,300,0,1),
+(@GUID+60,195067,0,1,1,-5157.02,-875.2,507.717,5.59108,0,0,0.339185,-0.94072,300,0,1),
+(@GUID+61,195067,0,1,1,-5162.53,-877.151,507.269,3.8475,0,0,0.938356,-0.345672,300,0,1),
+(@GUID+62,195067,0,1,1,-5168.31,-872.67,506.918,4.71929,0,0,0.704662,-0.709544,300,0,1),
+(@GUID+63,195067,0,1,1,-5159.9,-868.605,507.293,4.7782,0,0,0.683461,-0.729987,300,0,1),
+(@GUID+64,195067,0,1,1,-5153.67,-856.503,508.317,1.38528,0,0,0.63857,0.769564,300,0,1),
+(@GUID+65,195090,0,1,1,-5153.07,-855.424,508.469,2.04894,0,0,0.854438,0.519553,300,0,1),
+(@GUID+66,195090,1,1,1,1187.46,-4465.48,21.3276,5.08777,0,0,0.562749,-0.826628,300,0,1),
+(@GUID+67,195090,1,1,1,1184.69,-4469.05,21.3202,3.92145,0,0,0.924935,-0.380125,300,0,1),
+(@GUID+68,195090,1,1,1,1178.71,-4465.61,21.3464,2.50381,0,0,0.949584,0.313514,300,0,1),
+(@GUID+69,195090,1,1,1,1173.45,-4463.9,21.2566,2.95934,0,0,0.995851,0.0909994,300,0,1),
+(@GUID+70,195090,1,1,1,1174.56,-4459.12,21.5159,1.31393,0,0,0.610717,0.791849,300,0,1),
+(@GUID+71,195090,1,1,1,1178.38,-4459.37,21.4634,6.03418,0,0,0.124183,-0.992259,300,0,1),
+(@GUID+72,195090,1,1,1,1183.11,-4462.38,21.173,0.457849,0,0,0.22693,0.973911,300,0,1),
+(@GUID+73,195090,0,1,1,-9319.35,175.184,61.6322,5.94267,0,0,0.169436,-0.985541,300,0,1),
+(@GUID+74,195090,0,1,1,-9321.89,177.068,61.6465,5.64422,0,0,0.314075,-0.949398,300,0,1),
+(@GUID+75,195090,0,1,1,-9324.42,178.952,61.9249,5.64422,0,0,0.314075,-0.949398,300,0,1),
+(@GUID+76,195090,0,1,1,-9327.35,181.579,61.6579,5.76203,0,0,0.257639,-0.966241,300,0,1),
+(@GUID+77,195090,0,1,1,-9329.68,183.137,61.6151,5.69527,0,0,0.289742,-0.957105,300,0,1),
+(@GUID+78,195090,0,1,1,-9332.5,185.014,61.5442,5.69527,0,0,0.289742,-0.957105,300,0,1),
+(@GUID+79,195090,0,1,1,-9336.77,184.723,61.5328,1.08891,0,0,0.517952,0.85541,300,0,1),
+(@GUID+80,195090,0,1,1,-9340.96,187.22,61.5554,0.865071,0,0,0.419174,0.907906,300,0,1),
+(@GUID+81,195090,0,1,1,-9347.4,178.086,61.558,4.29726,0,0,0.837647,-0.546212,300,0,1),
+(@GUID+82,195090,0,1,1,-9349.37,175.371,61.7816,4.06557,0,0,0.895168,-0.445729,300,0,1),
+(@GUID+83,195090,0,1,1,-9351.22,172.514,61.5657,4.2737,0,0,0.844024,-0.536305,300,0,1),
+(@GUID+84,195090,0,1,1,-9352.79,169.484,61.5833,4.19909,0,0,0.86344,-0.504452,300,0,1),
+(@GUID+85,195090,0,1,1,-9328.38,163.069,62.1162,5.656,0,0,0.308476,-0.951232,300,0,1),
+(@GUID+86,195090,0,1,1,-9324.64,167.678,61.5815,2.66756,0,0,0.972043,0.234801,300,0,1),
+(@GUID+87,195090,0,1,1,-9327.99,170.234,61.6257,2.49478,0,0,0.948158,0.317799,300,0,1),
+(@GUID+88,195090,0,1,1,-9330.76,172.21,61.6444,2.42016,0,0,0.935645,0.352943,300,0,1),
+(@GUID+89,195090,0,1,1,-9333.31,174.06,61.6475,2.60866,0,0,0.964707,0.263324,300,0,1),
+(@GUID+90,195090,0,1,1,-9335.44,175.283,61.6076,2.62044,0,0,0.966242,0.257637,300,0,1),
+(@GUID+91,195090,0,1,1,-9329.47,179.114,61.7075,1.27741,0,0,0.596156,0.802868,300,0,1),
+(@GUID+92,195090,571,1,65535,5853.87,762.992,641.211,6.18229,0,0,0.0504241,-0.998728,300,0,1),
+(@GUID+93,195090,571,1,65535,5855.51,765.516,641.483,0.212483,0,0,0.106042,0.994362,300,0,1),
+(@GUID+94,195090,571,1,65535,5853.92,767.065,641.349,0.656233,0,0,0.322261,0.946651,300,0,1),
+(@GUID+95,195090,571,1,65535,5851.19,767.209,640.997,0.597328,0,0,0.294244,0.95573,300,0,1),
+(@GUID+96,195090,571,1,65535,5851.3,769.624,640.886,1.09213,0,0,0.519328,0.854575,300,0,1),
+(@GUID+97,195090,571,1,65535,5849.36,771.084,640.573,1.31204,0,0,0.609968,0.792426,300,0,1),
+(@GUID+98,195090,571,1,65535,5843.35,763.212,640.647,3.49938,0,0,0.984042,-0.177939,300,0,1),
+(@GUID+99,195090,571,1,65535,5832.79,754.608,640.935,4.05308,0,0,0.897934,-0.440131,300,0,1),
+(@GUID+100,195090,571,1,65535,5828.7,749.25,641.164,4.17874,0,0,0.868526,-0.495643,300,0,1),
+(@GUID+101,195090,571,1,65535,5835.35,751.259,641.084,0.400976,0,0,0.199148,0.97997,300,0,1),
+(@GUID+102,195090,571,1,65535,5827.74,742.946,642.332,0.687646,0,0,0.337089,0.941473,300,0,1),
+(@GUID+103,195090,571,1,65535,5809.37,743.705,640.998,3.12238,0,0,0.999954,0.00960593,300,0,1),
+(@GUID+104,195090,571,1,65535,5822.29,758.23,640.365,1.61049,0,0,0.721,0.692935,300,0,1),
+(@GUID+105,195090,571,1,65535,5811.39,757.19,640.324,2.50977,0,0,0.950514,0.310683,300,0,1),
+(@GUID+106,195090,571,1,65535,5846.75,758.117,640.939,6.14616,0,0,0.0684576,-0.997654,300,0,1),
+(@GUID+107,195090,0,1,1,1830.63,211.165,60.3098,4.80682,0,0,0.672944,-0.739693,300,0,1),
+(@GUID+108,195090,0,1,1,1840.85,213.082,61.3837,5.26628,0,0,0.486826,-0.873499,300,0,1),
+(@GUID+109,195090,0,1,1,1841.8,219.772,60.7409,1.28038,0,0,0.597349,0.801981,300,0,1),
+(@GUID+110,195090,0,1,1,1823.03,229.093,60.4377,2.72944,0,0,0.978842,0.204619,300,0,1),
+(@GUID+111,195090,0,1,1,1827.77,222.032,60.6016,4.97961,0,0,0.60661,-0.795,300,0,1),
+(@GUID+112,195090,0,1,1,1827.52,217.594,60.5054,4.65367,0,0,0.72756,-0.686044,300,0,1),
+(@GUID+113,195090,0,1,1,1832.1,217.303,60.342,6.21268,0,0,0.0352447,-0.999379,300,0,1),
+(@GUID+114,195090,0,1,1,1834.79,220.5,60.2436,1.11937,0,0,0.530921,0.847421,300,0,1),
+(@GUID+115,195090,0,1,1,1814.67,217.597,60.2211,3.50306,0,0,0.983712,-0.17975,300,0,1),
+(@GUID+116,195090,530,1,1,9407.83,-6850.31,15.4148,6.05585,0,0,0.113421,-0.993547,300,0,1),
+(@GUID+117,195090,530,1,1,9412.52,-6848.4,15.3197,0.703365,0,0,0.344478,0.938794,300,0,1),
+(@GUID+118,195090,530,1,1,9414.82,-6851.42,15.0296,5.58069,0,0,0.344071,-0.938944,300,0,1),
+(@GUID+119,195090,530,1,1,9410.57,-6853.66,14.9713,3.57007,0,0,0.977139,-0.212602,300,0,1),
+(@GUID+120,195090,530,1,1,9405.72,-6861.46,14.9588,4.79136,0,0,0.678642,-0.734469,300,0,1),
+(@GUID+121,195090,530,1,1,9412.52,-6861.73,14.6487,5.88699,0,0,0.196805,-0.980443,300,0,1),
+(@GUID+122,195090,530,1,1,9416.75,-6856.38,14.8519,5.80845,0,0,0.235147,-0.97196,300,0,1),
+(@GUID+123,195090,530,1,1,9418.64,-6852.18,14.9737,5.72205,0,0,0.2769,-0.960899,300,0,1),
+(@GUID+124,195090,1,1,1,10062.7,2128.29,1329.77,1.94816,0,0,0.827186,0.561928,300,0,1),
+(@GUID+125,195090,1,1,1,10066.2,2127.23,1329.66,4.62637,0,0,0.736856,-0.67605,300,0,1),
+(@GUID+126,195090,1,1,1,10065.9,2121.66,1330.2,4.78738,0,0,0.680104,-0.733115,300,0,1),
+(@GUID+127,195090,1,1,1,10064.8,2117.6,1330.03,4.56746,0,0,0.756445,-0.654057,300,0,1),
+(@GUID+128,195090,1,1,1,10063.4,2113.77,1330.06,4.01769,0,0,0.905582,-0.424171,300,0,1),
+(@GUID+129,195090,1,1,1,10054.1,2110.63,1329.93,3.8449,0,0,0.938805,-0.344449,300,0,1),
+(@GUID+130,195090,1,1,1,10049.1,2112.98,1330.03,2.00314,0,0,0.842318,0.538981,300,0,1),
+(@GUID+131,195090,1,1,1,10046.4,2109.25,1329.96,4.10408,0,0,0.88642,-0.462882,300,0,1),
+(@GUID+132,195090,1,1,1,10053.1,2126.22,1330.07,1.08422,0,0,0.515946,0.856621,300,0,1),
+(@GUID+133,195090,1,1,1,10054,2130.84,1330.02,1.00961,0,0,0.483637,0.875269,300,0,1),
+(@GUID+134,195090,1,1,1,10060.3,2124.09,1330.01,4.74418,0,0,0.695778,-0.718257,300,0,1),
+(@GUID+135,195090,1,1,1,10059.9,2135.05,1330.75,1.53583,0,0,0.694637,0.719361,300,0,1),
+(@GUID+136,195090,1,1,1,10066.4,2132.16,1332.09,2.49402,0,0,0.948037,0.31816,300,0,1),
+(@GUID+137,195090,1,1,1,10052.2,2104.91,1330.92,3.28727,0,0,0.997349,-0.0727721,300,0,1),
+(@GUID+138,195090,1,1,1,-988.152,-59.1082,27.5232,5.15851,0,0,0.533167,-0.84601,300,0,1),
+(@GUID+139,195090,1,1,1,-977.555,-56.5706,26.7082,5.00143,0,0,0.5979,-0.801571,300,0,1),
+(@GUID+140,195090,1,1,1,-979.763,-72.5159,19.6852,3.24999,0,0,0.998531,-0.0541744,300,0,1),
+(@GUID+141,195090,1,1,1,-979.359,-76.7106,19.6107,3.13611,0,0,0.999996,0.00274046,300,0,1),
+(@GUID+142,195090,1,1,1,-976.6,-74.4185,18.8465,3.47776,0,0,0.985907,-0.167293,300,0,1),
+(@GUID+143,195090,1,1,1,-981.652,-79.1964,20.249,3.91758,0,0,0.925669,-0.378334,300,0,1),
+(@GUID+144,195090,1,1,1,-985.178,-75.001,21.0173,3.12433,0,0,0.999963,0.00863036,300,0,1),
+(@GUID+145,195090,1,1,1,-981.153,-66.7737,20.9042,2.28788,0,0,0.910272,0.41401,300,0,1),
+(@GUID+146,195090,530,1,1,-4319.45,-12430.9,18.6806,2.09613,0,0,0.866459,0.499248,300,0,1),
+(@GUID+147,195090,530,1,1,-4320.99,-12432.3,18.6806,3.9536,0,0,0.918707,-0.394941,300,0,1),
+(@GUID+148,195090,530,1,1,-4331.11,-12443.6,18.6114,2.34746,0,0,0.922199,0.386715,300,0,1),
+(@GUID+149,195090,530,1,1,-4325.9,-12451.6,16.6623,0.839496,0,0,0.40753,0.913192,300,0,1),
+(@GUID+150,195090,530,1,1,-4326.17,-12455.4,16.9729,0.509629,0,0,0.252066,0.96771,300,0,1),
+(@GUID+151,195090,530,1,1,-4320.52,-12456.9,17.3025,0.721686,0,0,0.353063,0.9356,300,0,1),
+(@GUID+152,195090,530,1,1,-4321.35,-12454.2,17.2013,0.914109,0,0,0.441307,0.897356,300,0,1),
+(@GUID+153,195090,530,1,1,-4320.01,-12449.5,17.0817,0.800226,0,0,0.389522,0.921017,300,0,1),
+(@GUID+154,195090,530,1,1,-4314.66,-12447.8,17.3873,1.00836,0,0,0.483088,0.875572,300,0,1),
+(@GUID+155,195090,530,1,1,-4311.21,-12446.3,17.4275,1.0869,0,0,0.51709,0.855931,300,0,1),
+(@GUID+156,195090,530,1,1,-4316.32,-12444.3,17.1922,0.88662,0,0,0.428932,0.903337,300,0,1),
+(@GUID+157,195090,530,1,1,-4310.89,-12440.6,17.2147,1.05941,0,0,0.505278,0.862957,300,0,1),
+(@GUID+158,195090,530,1,1,-1801.49,4910.65,-21.3903,5.6034,0,0,0.333386,-0.94279,300,0,1),
+(@GUID+159,195090,530,1,1,-1796.61,4911.2,-21.382,0.113465,0,0,0.0567022,0.998391,300,0,1),
+(@GUID+160,195090,530,1,1,-1792.12,4916.53,-21.0244,1.24837,0,0,0.584434,0.811441,300,0,1),
+(@GUID+161,195090,530,1,1,-1788.82,4923.25,-21.0863,1.01275,0,0,0.485009,0.874509,300,0,1),
+(@GUID+162,195090,530,1,1,-1786.08,4925.63,-21.1386,0.243056,0,0,0.121229,0.992625,300,0,1),
+(@GUID+163,195090,530,1,1,-1806.29,4914.21,-22.0573,3.90301,0,0,0.928401,-0.371579,300,0,1),
+(@GUID+164,195090,530,1,1,-1814.82,4912.82,-21.4843,3.71452,0,0,0.95925,-0.28256,300,0,1),
+(@GUID+165,195090,530,1,1,-1808.63,4922.35,-21.8564,1.05594,0,0,0.503782,0.863831,300,0,1),
+(@GUID+166,195090,530,1,1,-1810.52,4926.39,-21.734,1.05202,0,0,0.502085,0.864818,300,0,1),
+(@GUID+167,195090,530,1,1,-1812.06,4920.92,-21.9526,0.945987,0,0,0.455553,0.890209,300,0,1),
+(@GUID+168,195090,530,1,1,-1795.43,4927.2,-22.1493,0.270544,0,0,0.13486,0.990865,300,0,1),
+(@GUID+169,195090,530,1,1,-1796.32,4931.29,-22.3174,0.129173,0,0,0.0645415,0.997915,300,0,1),
+(@GUID+170,195090,530,1,1,-1799.12,4928.21,-22.2813,0.707226,0,0,0.346289,0.938128,300,0,1),
+(@GUID+171,195090,530,1,1,-1783.82,4935.44,-22.5892,5.4471,0,0,0.405971,-0.913886,300,0,1),
+(@GUID+172,195090,530,1,1,-1829.25,4920.79,-21.671,4.42216,0,0,0.801927,-0.597422,300,0,1),
+(@GUID+173,195090,530,1,1,-1835.24,4924,-21.3785,4.00983,0,0,0.907242,-0.420609,300,0,1),
+(@GUID+174,195090,530,1,1,-1798.26,4902.69,-21.4127,5.45889,0,0,0.400579,-0.916262,300,0,1),
+(@GUID+175,195090,530,1,1,-1792.22,4911.42,-21.4162,5.16829,0,0,0.529021,-0.848609,300,0,1),
+(@GUID+176,195090,0,1,1,-5146.92,-846.795,509.814,4.73578,0,0,0.698788,-0.715329,300,0,1),
+(@GUID+177,195090,0,1,1,-5148.88,-848.813,510.175,3.96217,0,0,0.917006,-0.398873,300,0,1),
+(@GUID+178,195090,0,1,1,-5154.23,-851.792,509.604,3.80116,0,0,0.946112,-0.323839,300,0,1),
+(@GUID+179,195090,0,1,1,-5151.12,-850.78,510.203,2.82334,0,0,0.987366,0.158455,300,0,1),
+(@GUID+180,195090,0,1,1,-5157.25,-865.505,507.488,4.03286,0,0,0.902338,-0.431029,300,0,1),
+(@GUID+181,195090,0,1,1,-5162.21,-871.414,507.192,3.93861,0,0,0.921641,-0.388044,300,0,1),
+(@GUID+182,195090,0,1,1,-5158.06,-875.801,507.508,4.08391,0,0,0.891043,-0.453918,300,0,1),
+(@GUID+183,195090,0,1,1,-5163.62,-875.984,507.254,4.18994,0,0,0.865739,-0.500496,300,0,1),
+(@GUID+184,195090,0,1,1,-5166.94,-874.019,507.083,2.13612,0,0,0.876268,0.481825,300,0,1),
+(@GUID+185,195090,0,1,1,-5166.83,-871.411,506.884,1.14652,0,0,0.542373,0.840138,300,0,1),
+(@GUID+186,195090,0,1,1,-5164.94,-867.229,506.913,1.14652,0,0,0.542373,0.840138,300,0,1),
+(@GUID+187,195090,0,1,1,-5167.77,-861.231,506.701,0.420025,0,0,0.208472,0.978028,300,0,1),
+(@GUID+188,195090,0,1,1,-5165.58,-860.107,506.446,0.475003,0,0,0.235275,0.971929,300,0,1),
+(@GUID+189,195090,0,1,1,-5163.08,-858.823,506.659,0.475003,0,0,0.235275,0.971929,300,0,1),
+(@GUID+190,195090,0,1,1,-5160.59,-857.539,506.642,0.475003,0,0,0.235275,0.971929,300,0,1),
+(@GUID+191,195090,0,1,1,-5157.78,-856.092,507.248,0.475003,0,0,0.235275,0.971929,300,0,1),
+(@GUID+192,195307,1,1,1,10054.6,2131.96,1329.66,-2.75761,0,0,0,1,180,100,1),
+(@GUID+193,195307,1,1,1,10062.8,2129.42,1329.66,-2.30383,0,0,0,1,180,100,1),
+(@GUID+194,195307,0,1,1,-5159.66,-869.708,507.315,3.00195,0,0,0,1,180,100,1),
+(@GUID+195,195307,0,1,1,-5160.8,-869.684,507.251,-2.30383,0,0,0,1,180,100,1),
+(@GUID+196,195307,0,1,1,-9328.34,171.941,62.8343,3.00195,0,0,0,1,180,100,1),
+(@GUID+197,195307,0,1,1,-9351.13,177.262,62.7149,-2.30383,0,0,0,1,180,100,1),
+(@GUID+198,195307,1,1,1,1171.94,-4462.66,21.3171,3.00195,0,0,0,1,180,100,1),
+(@GUID+199,195307,1,1,1,1177.22,-4464.5,22.4542,-2.30383,0,0,0,1,180,100,1),
+(@GUID+200,195307,1,1,1,-984.535,-75.8281,20.8642,3.00195,0,0,0,1,180,100,1),
+(@GUID+201,195307,1,1,1,-979.977,-71.342,20.7172,-2.30383,0,0,0,1,180,100,1),
+(@GUID+202,195068,0,1,1,1780.14,269.759,59.8725,0,0,0,0,1,180,100,1),
+(@GUID+203,195068,0,1,1,1777.31,220.538,59.5768,0,0,0,0,1,180,100,1),
+(@GUID+204,195068,1,1,1,10053.6,2109.59,1329.65,0,0,0,0,1,180,100,1),
+(@GUID+205,195068,1,1,1,10065,2118.72,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+206,195068,1,1,1,10053.4,2128.55,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+207,195068,0,1,1,-5160.02,-869.03,507.29,0,0,0,0,1,180,100,1),
+(@GUID+208,195068,0,1,1,-5159.92,-870.566,507.307,0,0,0,0,1,180,100,1),
+(@GUID+209,195068,0,1,1,-9328.37,170.188,61.6268,0,0,0,0,1,180,100,1),
+(@GUID+210,195068,0,1,1,-9327.13,181.863,61.6551,0,0,0,0,1,180,100,1),
+(@GUID+211,195068,1,1,1,1180.13,-4457.48,21.4889,0,0,0,0,1,180,100,1),
+(@GUID+212,195068,1,1,1,1186.07,-4471.15,21.3707,0,0,0,0,1,180,100,1),
+(@GUID+213,195068,1,1,1,1172.28,-4463.25,21.2866,0,0,0,0,1,180,100,1),
+(@GUID+214,195068,1,1,1,-983.009,-70.0955,20.7835,0,0,0,0,1,180,100,1),
+(@GUID+215,195068,1,1,1,-984.639,-76.1319,20.8549,0,0,0,0,1,180,100,1),
+(@GUID+216,195068,1,1,1,-984.92,-75.1719,20.9388,0,0,0,0,1,180,100,1),
+(@GUID+217,195067,0,1,1,1778.85,260.073,59.498,0,0,0,0,1,180,100,1),
+(@GUID+218,195067,1,1,1,10054.1,2124.82,1329.7,0,0,0,0,1,180,100,1),
+(@GUID+219,195067,1,1,1,10047.4,2110.17,1329.65,0,0,0,0,1,180,100,1),
+(@GUID+220,195067,1,1,1,10059.8,2122.52,1329.67,0,0,0,0,1,180,100,1),
+(@GUID+221,195067,0,1,1,-5161.69,-869.67,507.202,0,0,0,0,1,180,100,1),
+(@GUID+222,195067,0,1,1,-9352.43,172.927,61.5748,0,0,0,0,1,180,100,1),
+(@GUID+223,195067,1,1,1,1175.47,-4455.32,21.5219,0,0,0,0,1,180,100,1),
+(@GUID+224,195067,1,1,1,1185.36,-4460.86,21.102,0,0,0,0,1,180,100,1),
+(@GUID+225,195067,1,1,1,1179.27,-4468.45,21.2471,0,0,0,0,1,180,100,1),
+(@GUID+226,195067,1,1,1,-983.566,-73.3247,20.6424,0,0,0,0,1,180,100,1),
+(@GUID+227,195067,1,1,1,-980.892,-79.2656,20.1022,0,0,0,0,1,180,100,1),
+(@GUID+228,195063,1,1,1,1191.1,-4465.38,21.489,0,0,0,0,1,180,100,1),
+(@GUID+229,195063,1,1,1,1176.06,-4456.3,21.5271,0,0,0,0,1,180,100,1),
+(@GUID+230,195063,1,1,1,1185.15,-4469.57,21.3318,0,0,0,0,1,180,100,1),
+(@GUID+231,195063,0,1,1,1776.75,250.743,59.8824,0,0,0,0,1,180,100,1),
+(@GUID+232,195063,0,1,1,1782.6,260.549,59.42,0,0,0,0,1,180,100,1),
+(@GUID+233,195063,0,1,1,1776.35,223.174,59.5078,0,0,0,0,1,180,100,1),
+(@GUID+234,195063,0,1,1,1781.6,252.318,59.5262,0,0,0,0,1,180,100,1),
+(@GUID+235,195063,0,1,1,1779.51,268.924,59.893,0,0,0,0,1,180,100,1),
+(@GUID+236,195063,1,1,1,10066.4,2120.48,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+237,195063,1,1,1,10046.7,2110.08,1329.65,0,0,0,0,1,180,100,1),
+(@GUID+238,195063,1,1,1,10050.3,2118.57,1331.05,0,0,0,0,1,180,100,1),
+(@GUID+239,195063,1,1,1,10063.6,2112.16,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+240,195063,1,1,1,10055,2111.28,1329.65,0,0,0,0,1,180,100,1),
+(@GUID+241,195063,0,1,1,-5158.94,-869.955,507.357,0,0,0,0,1,180,100,1),
+(@GUID+242,195063,0,1,1,-5160.05,-871.753,507.315,0,0,0,0,1,180,100,1),
+(@GUID+243,195063,0,1,1,-5161.04,-868.969,507.233,0,0,0,0,1,180,100,1),
+(@GUID+244,195063,0,1,1,-5149.86,-882.234,508.225,0,0,0,0,1,180,100,1),
+(@GUID+245,195063,0,1,1,-5162.1,-870.601,507.185,0,0,0,0,1,180,100,1),
+(@GUID+246,195063,0,1,1,-5149.59,-854.429,509.499,0,0,0,0,1,180,100,1),
+(@GUID+247,195063,0,1,1,-9323.89,179.863,64.6421,0,0,0,0,1,180,100,1),
+(@GUID+248,195063,0,1,1,-9330.93,172.332,61.6442,0,0,0,0,1,180,100,1),
+(@GUID+249,195063,0,1,1,-9331.52,182.493,61.6,0,0,0,0,1,180,100,1),
+(@GUID+250,195063,0,1,1,-9334.96,176.014,63.3874,0,0,0,0,1,180,100,1),
+(@GUID+251,195063,0,1,1,-9340.66,187.524,61.5517,0,0,0,0,1,180,100,1),
+(@GUID+252,195063,1,1,1,1176.77,-4463.59,22.4735,0,0,0,0,1,180,100,1),
+(@GUID+253,195063,1,1,1,1177.63,-4467.96,21.307,0,0,0,0,1,180,100,1),
+(@GUID+254,195063,1,1,1,1174.72,-4455.49,21.5368,0,0,0,0,1,180,100,1),
+(@GUID+255,195063,1,1,1,-980.41,-71.3438,20.7185,0,0,0,0,1,180,100,1),
+(@GUID+256,195063,1,1,1,-983.493,-72.6302,20.6698,0,0,0,0,1,180,100,1),
+(@GUID+257,195063,1,1,1,-982.13,-68.0764,20.8836,0,0,0,0,1,180,100,1),
+(@GUID+258,195063,1,1,1,-984.149,-77.3333,20.7527,0,0,0,0,1,180,100,1),
+(@GUID+259,195063,1,1,1,-980.212,-80.2552,20.0676,0,0,0,0,1,180,100,1),
+(@GUID+260,182807,1,1,1,1184.02,-4469.83,21.2852,0,0,0,0,1,180,100,1),
+(@GUID+261,182807,530,1,1,9672.12,-7346.44,11.9311,-0.244346,0,0,0.121869,-0.992546,180,100,1),
+(@GUID+262,182807,0,1,1,1780.18,214.781,59.8534,0,0,0,0,1,180,100,1),
+(@GUID+263,182807,0,1,1,1780.76,215.611,59.7988,0,0,0,0,1,180,100,1),
+(@GUID+264,182807,1,1,1,10063.4,2111.85,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+265,182807,1,1,1,10062.7,2129.98,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+266,182807,1,1,1,10065.5,2118.46,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+267,182807,1,1,1,10054.8,2132.24,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+268,182807,1,1,1,10053.7,2125.31,1329.69,0,0,0,0,1,180,100,1),
+(@GUID+269,182807,0,1,1,-5161.27,-870.734,507.233,0,0,0,0,1,180,100,1),
+(@GUID+270,182807,0,1,1,-5160.73,-871.283,507.27,0,0,0,0,1,180,100,1),
+(@GUID+271,182807,0,1,1,-9326.85,170.807,62.8254,0,0,0,0,1,180,100,1),
+(@GUID+272,182807,0,1,1,-9335.46,175.405,61.6072,0,0,0,0,1,180,100,1),
+(@GUID+273,182807,1,1,1,1174.36,-4455.34,21.5514,0,0,0,0,1,180,100,1),
+(@GUID+274,182807,1,1,1,-984.738,-73.1875,20.9946,0,0,0,0,1,180,100,1),
+(@GUID+275,182807,1,1,1,-980.771,-79.8229,20.1335,0,0,0,0,1,180,100,1),
+(@GUID+276,180885,0,1,1,1805.89,217.134,60.6002,1.51844,0,0,0,1,180,100,1),
+(@GUID+277,180885,1,1,1,10050.3,2118.06,1329.94,0.750491,0,0,0,1,180,100,1),
+(@GUID+278,180885,0,1,1,-5149.52,-854.931,508.432,0.750491,0,0,0,1,180,100,1),
+(@GUID+279,180885,0,1,1,-9331.44,181.991,61.63,0.750491,0,0,0,1,180,100,1),
+(@GUID+280,180885,1,1,1,1176.85,-4464.09,21.3468,0.750491,0,0,0,1,180,100,1),
+(@GUID+281,180885,1,1,1,-980.33,-71.8455,19.5878,0.750491,0,0,0,1,180,100,1),
+(@GUID+282,195066,0,1,1,-9328.34,170.201,61.6675,0,0,0,0,1,180,100,1),
+(@GUID+283,195069,0,1,1,-9331.48,181.45,62.7343,-0.890117,0,0,0,1,180,100,1),
+(@GUID+284,195069,0,1,1,-9332.01,182.043,62.6892,-0.157079,0,0,0,1,180,100,1),
+(@GUID+285,195066,0,1,1,-9327.13,181.875,61.6549,0,0,0,0,1,180,100,1),
+(@GUID+286,195069,0,1,1,-5149.05,-855.003,509.504,2.54818,0,0,0,1,180,100,1),
+(@GUID+287,195069,0,1,1,-5149.55,-855.472,509.469,-0.890117,0,0,0,1,180,100,1),
+(@GUID+288,195069,0,1,1,-5150.07,-854.878,509.496,-0.157079,0,0,0,1,180,100,1),
+(@GUID+289,195066,0,1,1,-5159.99,-869.016,507.291,0,0,0,0,1,180,100,1),
+(@GUID+290,195066,0,1,1,-5159.91,-870.554,507.307,0,0,0,0,1,180,100,1),
+(@GUID+291,195069,1,1,1,10049.8,2118.11,1331.01,-0.157079,0,0,0,1,180,100,1),
+(@GUID+292,195069,1,1,1,10050.9,2117.89,1331.03,1.72787,0,0,0,1,180,100,1),
+(@GUID+293,195066,1,1,1,10065.1,2118.72,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+294,195066,1,1,1,10053.5,2128.55,1329.66,0,0,0,0,1,180,100,1),
+(@GUID+295,195069,1,1,1,10050.3,2117.48,1330.99,-0.890117,0,0,0,1,180,100,1),
+(@GUID+296,195066,1,1,1,10053.6,2109.59,1329.65,0,0,0,0,1,180,100,1),
+(@GUID+297,195066,0,1,1,1777.32,220.55,59.5767,0,0,0,0,1,180,100,1),
+(@GUID+298,195066,0,1,1,1780.16,269.773,59.8725,0,0,0,0,1,180,100,1),
+(@GUID+299,195069,0,1,1,1805.33,217.408,61.5327,-0.157079,0,0,0,1,180,100,1),
+(@GUID+300,195069,0,1,1,1805.86,216.814,61.5886,-0.890117,0,0,0,1,180,100,1),
+(@GUID+301,195069,0,1,1,1806.35,217.283,61.5437,2.54818,0,0,0,1,180,100,1),
+(@GUID+302,195066,1,1,1,1186.07,-4471.14,21.3708,0,0,0,0,1,180,100,1),
+(@GUID+303,195066,1,1,1,1180.13,-4457.47,21.4891,0,0,0,0,1,180,100,1),
+(@GUID+304,195069,1,1,1,1176.29,-4464.04,22.4501,-0.157079,0,0,0,1,180,100,1),
+(@GUID+305,195066,1,1,1,1172.31,-4463.23,21.2882,0,0,0,0,1,180,100,1),
+(@GUID+306,195069,1,1,1,1177.32,-4464.16,22.4611,2.54818,0,0,0,1,180,100,1),
+(@GUID+307,195069,1,1,1,1176.82,-4464.63,22.4507,-0.890117,0,0,0,1,180,100,1),
+(@GUID+308,195066,1,1,1,-984.632,-76.1215,20.8542,0,0,0,0,1,180,100,1),
+(@GUID+309,195069,1,1,1,-979.866,-71.9184,20.7017,2.54818,0,0,0,1,180,100,1),
+(@GUID+310,195066,1,1,1,-983.002,-70.0833,20.7837,0,0,0,0,1,180,100,1),
+(@GUID+311,195066,1,1,1,-984.913,-75.1597,20.9375,0,0,0,0,1,180,100,1),
+(@GUID+312,195069,1,1,1,-980.894,-71.7934,20.7099,-0.157079,0,0,0,1,180,100,1),
+(@GUID+313,195069,1,1,1,-980.365,-72.3872,20.7085,-0.890117,0,0,0,1,180,100,1);
+-- Assignment of gameobjects to event
+DELETE FROM `game_event_gameobject` WHERE `eventEntry`=51 AND `guid` BETWEEN @GUID AND @GUID+314;
+INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES
+(51,@GUID),(51,@GUID+1),(51,@GUID+2),(51,@GUID+3),(51,@GUID+4),(51,@GUID+5),(51,@GUID+6),(51,@GUID+7),(51,@GUID+8),(51,@GUID+9),(51,@GUID+10),
+(51,@GUID+11),(51,@GUID+12),(51,@GUID+13),(51,@GUID+14),(51,@GUID+15),(51,@GUID+16),(51,@GUID+17),(51,@GUID+18),(51,@GUID+19),(51,@GUID+20),
+(51,@GUID+21),(51,@GUID+22),(51,@GUID+23),(51,@GUID+24),(51,@GUID+25),(51,@GUID+26),(51,@GUID+27),(51,@GUID+28),(51,@GUID+29),(51,@GUID+30),
+(51,@GUID+31),(51,@GUID+32),(51,@GUID+33),(51,@GUID+34),(51,@GUID+35),(51,@GUID+36),(51,@GUID+37),(51,@GUID+38),(51,@GUID+39),(51,@GUID+40),
+(51,@GUID+41),(51,@GUID+42),(51,@GUID+43),(51,@GUID+44),(51,@GUID+45),(51,@GUID+46),(51,@GUID+47),(51,@GUID+48),(51,@GUID+49),(51,@GUID+50),
+(51,@GUID+51),(51,@GUID+52),(51,@GUID+53),(51,@GUID+54),(51,@GUID+55),(51,@GUID+56),(51,@GUID+57),(51,@GUID+58),(51,@GUID+59),(51,@GUID+60),
+(51,@GUID+61),(51,@GUID+62),(51,@GUID+63),(51,@GUID+64),(51,@GUID+65),(51,@GUID+66),(51,@GUID+67),(51,@GUID+68),(51,@GUID+69),(51,@GUID+70),
+(51,@GUID+71),(51,@GUID+72),(51,@GUID+73),(51,@GUID+74),(51,@GUID+75),(51,@GUID+76),(51,@GUID+77),(51,@GUID+78),(51,@GUID+79),(51,@GUID+80),
+(51,@GUID+81),(51,@GUID+82),(51,@GUID+83),(51,@GUID+84),(51,@GUID+85),(51,@GUID+86),(51,@GUID+87),(51,@GUID+88),(51,@GUID+89),(51,@GUID+90),
+(51,@GUID+91),(51,@GUID+92),(51,@GUID+93),(51,@GUID+94),(51,@GUID+95),(51,@GUID+96),(51,@GUID+97),(51,@GUID+98),(51,@GUID+99),(51,@GUID+100),
+(51,@GUID+101),(51,@GUID+102),(51,@GUID+103),(51,@GUID+104),(51,@GUID+105),(51,@GUID+106),(51,@GUID+107),(51,@GUID+108),(51,@GUID+109),(51,@GUID+110),
+(51,@GUID+111),(51,@GUID+112),(51,@GUID+113),(51,@GUID+114),(51,@GUID+115),(51,@GUID+116),(51,@GUID+117),(51,@GUID+118),(51,@GUID+119),(51,@GUID+120),
+(51,@GUID+121),(51,@GUID+122),(51,@GUID+123),(51,@GUID+124),(51,@GUID+125),(51,@GUID+126),(51,@GUID+127),(51,@GUID+128),(51,@GUID+129),(51,@GUID+130),
+(51,@GUID+131),(51,@GUID+132),(51,@GUID+133),(51,@GUID+134),(51,@GUID+135),(51,@GUID+136),(51,@GUID+137),(51,@GUID+138),(51,@GUID+139),(51,@GUID+140),
+(51,@GUID+141),(51,@GUID+142),(51,@GUID+143),(51,@GUID+144),(51,@GUID+145),(51,@GUID+146),(51,@GUID+147),(51,@GUID+148),(51,@GUID+149),(51,@GUID+150),
+(51,@GUID+151),(51,@GUID+152),(51,@GUID+153),(51,@GUID+154),(51,@GUID+155),(51,@GUID+156),(51,@GUID+157),(51,@GUID+158),(51,@GUID+159),(51,@GUID+160),
+(51,@GUID+161),(51,@GUID+162),(51,@GUID+163),(51,@GUID+164),(51,@GUID+165),(51,@GUID+166),(51,@GUID+167),(51,@GUID+168),(51,@GUID+169),(51,@GUID+170),
+(51,@GUID+171),(51,@GUID+172),(51,@GUID+173),(51,@GUID+174),(51,@GUID+175),(51,@GUID+176),(51,@GUID+177),(51,@GUID+178),(51,@GUID+179),(51,@GUID+180),
+(51,@GUID+181),(51,@GUID+182),(51,@GUID+183),(51,@GUID+184),(51,@GUID+185),(51,@GUID+186),(51,@GUID+187),(51,@GUID+188),(51,@GUID+189),(51,@GUID+190),
+(51,@GUID+191),(51,@GUID+192),(51,@GUID+193),(51,@GUID+194),(51,@GUID+195),(51,@GUID+196),(51,@GUID+197),(51,@GUID+198),(51,@GUID+199),(51,@GUID+200),
+(51,@GUID+201),(51,@GUID+202),(51,@GUID+203),(51,@GUID+204),(51,@GUID+205),(51,@GUID+206),(51,@GUID+207),(51,@GUID+208),(51,@GUID+209),(51,@GUID+210),
+(51,@GUID+211),(51,@GUID+212),(51,@GUID+213),(51,@GUID+214),(51,@GUID+215),(51,@GUID+216),(51,@GUID+217),(51,@GUID+218),(51,@GUID+219),(51,@GUID+220),
+(51,@GUID+221),(51,@GUID+222),(51,@GUID+223),(51,@GUID+224),(51,@GUID+225),(51,@GUID+226),(51,@GUID+227),(51,@GUID+228),(51,@GUID+229),(51,@GUID+230),
+(51,@GUID+231),(51,@GUID+232),(51,@GUID+233),(51,@GUID+234),(51,@GUID+235),(51,@GUID+236),(51,@GUID+237),(51,@GUID+238),(51,@GUID+239),(51,@GUID+240),
+(51,@GUID+241),(51,@GUID+242),(51,@GUID+243),(51,@GUID+244),(51,@GUID+245),(51,@GUID+246),(51,@GUID+247),(51,@GUID+248),(51,@GUID+249),(51,@GUID+250),
+(51,@GUID+251),(51,@GUID+252),(51,@GUID+253),(51,@GUID+254),(51,@GUID+255),(51,@GUID+256),(51,@GUID+257),(51,@GUID+258),(51,@GUID+259),(51,@GUID+260),
+(51,@GUID+261),(51,@GUID+262),(51,@GUID+263),(51,@GUID+264),(51,@GUID+265),(51,@GUID+266),(51,@GUID+267),(51,@GUID+268),(51,@GUID+269),(51,@GUID+270),
+(51,@GUID+271),(51,@GUID+272),(51,@GUID+273),(51,@GUID+274),(51,@GUID+275),(51,@GUID+276),(51,@GUID+277),(51,@GUID+278),(51,@GUID+279),(51,@GUID+280),
+(51,@GUID+281),(51,@GUID+282),(51,@GUID+283),(51,@GUID+284),(51,@GUID+285),(51,@GUID+286),(51,@GUID+287),(51,@GUID+288),(51,@GUID+289),(51,@GUID+290),
+(51,@GUID+291),(51,@GUID+292),(51,@GUID+293),(51,@GUID+294),(51,@GUID+295),(51,@GUID+296),(51,@GUID+297),(51,@GUID+298),(51,@GUID+299),(51,@GUID+300),
+(51,@GUID+301),(51,@GUID+302),(51,@GUID+303),(51,@GUID+304),(51,@GUID+305),(51,@GUID+306),(51,@GUID+307),(51,@GUID+308),(51,@GUID+309),(51,@GUID+310),
+(51,@GUID+311),(51,@GUID+312),(51,@GUID+313);
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4803: To Catch a Sparrowhawk
+-- Sparrowhawk SAI
+SET @Sparrowhawk := 22979;
+SET @Net := 39810;
+SET @ItemSpell := 39812;
+SET @QuestItem := 32320;
+SET @Script := 39810;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Sparrowhawk;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sparrowhawk 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
+(@Sparrowhawk,0,0,0,13,0,100,0,0,0,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sparrowhawk - On target casting spell on it - Flee'),
+(@Sparrowhawk,0,1,2,8,0,100,0,@Net,0,0,0,85,@ItemSpell,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Sparrowhawk - On spell hit by net - Ivoker cast on self spell for item'),
+(@Sparrowhawk,0,2,3,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sparrowhawk - Linked with previous event - Set unseen'),
+(@Sparrowhawk,0,3,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sparrowhawk - Linked with previous event - Despawn in 1 sec');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4843: Stop the Ascension!
+-- Halfdan SAI
+SET @Halfdan := 23671;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Halfdan;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Halfdan 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
+(@Halfdan,0,0,0,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,2000,0,0,0,0,0, 'Halfdan - On summoned - Say line 1'),
+(@Halfdan,0,1,0,52,0,100,0,0,@Halfdan,0,0,1,1,2000,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - On text 1 over - Say line 2'),
+(@Halfdan,0,2,3,52,0,100,0,1,@Halfdan,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - IC - Change faction to unfriendly'),
+(@Halfdan,0,3,0,61,0,100,0,0,0,0,0,46,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - Linked with previous event - Move 1 forward to aggro'),
+(@Halfdan,0,4,0,0,0,100,0,2000,5000,9500,11500,11,35263,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Frost attack'),
+(@Halfdan,0,5,0,0,0,100,0,2500,5000,6000,10000,11,32736,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Mortal Strike'),
+(@Halfdan,0,6,0,0,0,100,0,1250,5000,5000,6000,11,12169,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Shield Block'),
+(@Halfdan,0,7,0,0,0,100,0,3000,8000,4000,12000,11,32015,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - IC - Cast Knockdown'),
+(@Halfdan,0,8,0,9,0,100,0,8,25,5000,5000,11,19131,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - On target in range - Cast Shield Charge'),
+(@Halfdan,0,9,10,2,0,100,1,75,75,120000,120000,1,2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - At 75% HP - Say line 3'),
+(@Halfdan,0,10,0,61,0,100,0,0,0,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - Linked with previous event - Cast Enrage on self'),
+(@Halfdan,0,11,0,2,0,100,1,25,25,120000,120000,1,3,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Halfdan - At 25% HP - Say line 4'),
+(@Halfdan,0,12,13,1,0,100,0,20000,20000,20000,20000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - OOC more than 20 sec - Set unseen'),
+(@Halfdan,0,13,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Halfdan - Linked with previous event - Despawn in 1 sec');
+-- Texts
+DELETE FROM `creature_text` WHERE `entry`=@Halfdan;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Halfdan,0,0, 'You think I do not know what you are trying to do? You think I haven''t been watching you?',12,0,100,1,2000,0, 'Halfdan'),
+(@Halfdan,1,0, 'Hah! You thought to interfere with my ascension? Nothing can stop me now!',12,0,100,1,2000,0, 'Halfdan'),
+(@Halfdan,2,0, 'You will not stop my ascension, tiny $C. Time to die!',14,0,100,1,2000,0, 'Halfdan'),
+(@Halfdan,3,0, 'No! You will not defeat me!',14,0,100,1,1000,0, 'Halfdan');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Issue 4996: Melding of Influences
+-- Primal Ooze and Captured Fel Ooze SAIs
+SET @POoze := 6557;
+SET @CFOoze := 10290;
+SET @GFOoze := 9621; -- Gargantuan Ooze = result of merging
+SET @SpellTrigger := 16031; -- Cast Releasing Corrupt Ooze - can be used only with target of Primal Ooze to summon the Corrupted Ooze and trigger events
+SET @MergingOozes := 16032; -- Spell visual for Oozes at the moment of meging
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@POoze,@CFOoze);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@POoze,@CFOoze);
+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
+(@POoze,0,0,0,8,0,100,0,@SpellTrigger,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Primal Ooze - On hit by spell Releasing Ooze - Set phase 2'),
+-- Phase 2 - used to delay a bit Primal Ooze actions, so the Corrupted Ooze will be spawned
+(@POoze,0,1,2,60,2,100,1,1500,1500,0,0,45,0,1,0,0,0,0,9,@CFOoze,0,35,0,0,0,0, 'Primal Ooze - On event update in phase 2 - Set data 0 1 on Corrupted Ooze'),
+(@POoze,0,2,0,61,2,100,0,0,0,0,0,29,0,0,10290,1,1,0,9,@CFOoze,0,35,0,0,0,0, 'Primal Ooze - Linked with previous event - Follow Captured felwood ooze'),
+(@POoze,0,3,4,65,2,100,0,0,0,0,0,47,0,0,0,0,0,0,0,0,1,0,0,0,0,0, 'Primal Ooze - On follow complete - Set unseen'),
+(@POoze,0,4,5,61,2,100,0,0,0,0,0,12,@GFOoze,6,20000,0,0,0,1,0,0,0,0,0,0,0, 'Primal Ooze - Linked with previous event - Spawn Gargantuan Ooze'),
+(@POoze,0,5,6,61,2,100,0,0,0,0,0,11,@MergingOozes,0,0,0,0,0,9,@GFOoze,0,5,0,0,0,0, 'Captured Fel Ooze - Linked with previous event - Cast Merging Oozes on Gargantuan Ooze'),
+(@POoze,0,6,0,61,2,100,0,0,0,0,0,41,50,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Primal Ooze - Linked with previous event - Despawn self'),
+-- <<<>>>>
+(@CFOoze,0,0,0,38,0,100,0,0,1,0,0,29,0,0,@POoze,0,1,0,9,@POoze,0,20,0,0,0,0, 'Captured Fel Ooze - On data set 0 1 - Follow Primal Ooze in less than 20 range'),
+(@CFOoze,0,1,2,65,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Captured Fel Ooze - On follow complete - Set unseen'),
+(@CFOoze,0,2,0,61,0,100,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Captured Fel Ooze - Linked with previous event - Despawn');
+-- Add conditions for Releasing Corrupt Ooze
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SpellTrigger;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@SpellTrigger,0,0,31,1,3,@POoze,0,0,0, '', 'Releasing Corrupted Ooze can be casted only on Primal Ooze');
+-- Condition for Merging Oozes so it can hit only Gargantuan Ooze
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@MergingOozes;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,@MergingOozes,0,0,31,0,3,@GFOoze,0,0,0, '', 'Merging Oozes can hit only Gargantuan Ooze');
+-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+DELETE FROM `creature_addon` WHERE `guid`=53882;
diff --git a/sql/updates/world/2012_11_18_00_world_ormorok.sql b/sql/updates/world/2012_11_18_00_world_ormorok.sql
new file mode 100644
index 00000000000..0ec8d13fd64
--- /dev/null
+++ b/sql/updates/world/2012_11_18_00_world_ormorok.sql
@@ -0,0 +1,56 @@
+-- Crystal Spikes - Script Effect - Spell casted by Ormorok - Triggers one summon spell in every direction
+DELETE FROM `spell_scripts` WHERE `id` IN (47958,57082);
+INSERT INTO `spell_scripts`(`id`,`command`,`datalong`,`datalong2`) VALUES
+-- Non heroic
+(47958,15,47954,1),
+(47958,15,47955,1),
+(47958,15,47956,1),
+(47958,15,47957,1),
+-- Heroic
+(57082,15,57077,1),
+(57082,15,57078,1),
+(57082,15,57080,1),
+(57082,15,57081,1);
+
+DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (47958,48016,48017) OR `spellid0` IN (47958,48016,48017);
+INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
+(47958,47958,57082), -- Crystal Spikes
+(48016,48016,57066), -- Trample
+(48017,48017,57086); -- Frenzy
+
+-- Assign aura script for spawning Crystal Spike rows
+DELETE FROM `spell_script_names` WHERE `spell_id`=47941;
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(47941,'spell_crystal_spike');
+
+-- Apply aura to triggers
+DELETE FROM `creature_template_addon` WHERE `entry` IN (27101,27079);
+INSERT INTO `creature_template_addon`(`entry`,`auras`) VALUES
+(27101,'47941'), -- Aura to summon the next trigger after 250ms
+(27079,'47941'); -- Aura to summon the next trigger after 250ms and visual effect
+
+-- Assign core scripts and SmartAI to trigger
+UPDATE `creature_template` SET `AIName`='',`ScriptName`='npc_crystal_spike_trigger' WHERE `entry` IN (27101,27079);
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=27099;
+
+-- SAI for Crystal Spike (Damage dealer)
+DELETE FROM `smart_scripts` WHERE `entryorguid`=27099 AND `source_type`=0;
+INSERT INTO `smart_scripts`(`entryorguid`,`event_type`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES
+(27099,54,80,2709900,2,1,'Crystal Spike - Is summoned - Call timed action list');
+
+-- Timed action list
+DELETE FROM `smart_scripts` WHERE `entryorguid`=2709900 AND `source_type`=9;
+INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`id`,`event_param1`,`event_param2`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES
+(2709900,9,1,2100,2100,11,47944,2,1,'Crystal Spike - Timed action list - Cast damage spell'),
+(2709900,9,2,0,0,41,0,0,1,'Crystal Spike - Timed action list - Despawn');
+
+-- Creature texts for the boss
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1576024 AND -1576020;
+
+DELETE FROM `creature_text` WHERE `entry`=26794;
+INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`comment`) VALUES
+(26794,1,'Noo!',14,13328,'ormorok SAY_AGGRO'),
+(26794,2,'Aaggh!',14,13330,'ormorok SAY_DEATH'),
+(26794,3,'Back!',14,13331,'ormorok SAY_REFLECT'),
+(26794,4,'Bleed!',14,13332,'ormorok SAY_CRYSTAL_SPIKES'),
+(26794,5,'Aaggh! Kill!',14,13329,'ormorok SAY_KILL');
diff --git a/sql/updates/world/2012_11_18_01_world_creature_text.sql b/sql/updates/world/2012_11_18_01_world_creature_text.sql
new file mode 100644
index 00000000000..5d8da97f1f0
--- /dev/null
+++ b/sql/updates/world/2012_11_18_01_world_creature_text.sql
@@ -0,0 +1,15 @@
+-- Ossirian the Unscarred
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1509027 AND -1509018;
+DELETE FROM `creature_text` WHERE `entry`=15339;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(15339, 0, 0, 'I am rejuvinated!', 14, 0, 100, 0, 0, 8593, 'SAY_SUPREME_1'),
+(15339, 0, 1, 'My powers are renewed!', 14, 0, 100, 0, 0, 8595, 'SAY_SUPREME_2'),
+(15339, 0, 2, 'My powers return!', 14, 0, 100, 0, 0, 8596, 'SAY_SUPREME_3'),
+(15339, 1, 0, 'Protect the city at all costs!', 14, 0, 100, 0, 0, 8597, 'SAY_INTRO_1'),
+(15339, 1, 1, 'To your posts. Defend the city.', 14, 0, 100, 0, 0, 8600, 'SAY_INTRO_2'),
+(15339, 1, 2, 'Tresspassers will be terminated.', 14, 0, 100, 0, 0, 8601, 'SAY_INTRO_3'),
+(15339, 2, 0, 'Sands of the desert rise and block out the sun!', 14, 0, 100, 0, 0, 8598, 'SAY_AGGRO'),
+(15339, 3, 0, 'You are terminated.', 14, 0, 100, 0, 0, 8602, 'SAY_SLAY'),
+(15339, 4, 0, 'I...have...failed.', 14, 0, 100, 0, 0, 8594, 'SAY_DEATH'),
+(15339, 5, 0, 'The walls have been breached!', 14, 0, 100, 0, 0, 8599, 'SAY_KURINAXX_DEATH');
+
diff --git a/sql/updates/world/2012_11_18_01_world_gameobject.sql b/sql/updates/world/2012_11_18_01_world_gameobject.sql
new file mode 100644
index 00000000000..d82f9a07e7e
--- /dev/null
+++ b/sql/updates/world/2012_11_18_01_world_gameobject.sql
@@ -0,0 +1,3 @@
+-- Ossirian Crystal
+UPDATE `gameobject_template` SET `ScriptName`='go_ossirian_crystal' WHERE `entry`=180619;
+
diff --git a/sql/updates/world/2012_11_18_02_world_toc.sql b/sql/updates/world/2012_11_18_02_world_toc.sql
new file mode 100644
index 00000000000..9262aceed7a
--- /dev/null
+++ b/sql/updates/world/2012_11_18_02_world_toc.sql
@@ -0,0 +1,150 @@
+-- Trial of the Crusader Death knight Death grip scriptname
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (66017, 68753, 68754, 68755);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(66017, 'spell_faction_champion_death_grip'),
+(68753, 'spell_faction_champion_death_grip'),
+(68754, 'spell_faction_champion_death_grip'),
+(68755, 'spell_faction_champion_death_grip');
+
+-- Trial of the Crusader shaman heroism/bloodlust
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (65983, 65980);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(65983, 'spell_toc_heroism'),
+(65980, 'spell_toc_bloodlust');
+
+-- impale scriptname
+DELETE FROM `spell_script_names` WHERE `spell_id`=65919;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(65919, 'spell_impale');
+
+-- firebomb scriptname and modelid (ToC Gormok encounter)
+UPDATE `creature_template` SET `ScriptName`="npc_firebomb" WHERE `entry`=34854;
+
+-- frost sphere corrections
+UPDATE `creature_template` SET `minlevel`=80, `InhabitType`=4, `RegenHealth`=0 WHERE `entry` IN (34606, 34649);
+
+-- Dark / Light essence removing
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-67222, -67223, -67224, -65686, -67176, -67177, -67178, -65684);
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(-67222, -67511, 0, 'Light Essence 25M'),
+(-67223, -67512, 0, 'Light Essence 10M H'),
+(-67224, -67513, 0, 'Light Essence 25M H'),
+(-65686, -65811, 0, 'Light Essence 10M'),
+(-67176, -67179, 0, 'Dark Essence 25M'),
+(-67177, -67180, 0, 'Dark Essence 10M H'),
+(-67178, -67181, 0, 'Dark Essence 25M H'),
+(-65684, -65827, 0, 'Dark Essence 10M');
+
+-- Gormoks Fire Bomb scriptname
+DELETE FROM `spell_script_names` WHERE `spell_id`=66313;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(66313, 'spell_gormok_fire_bomb');
+
+-- correcting hitbox of Anub'Arak
+UPDATE `creature_model_info` SET `bounding_radius`=1.085, `combat_reach`=10.5 WHERE `modelid`=29268;
+
+-- correcting hitbox of Acidmaw
+UPDATE `creature_model_info` SET `bounding_radius`=1.24, `combat_reach`=12 WHERE `modelid`=29815;
+
+-- spawn the Anub'arak gate in all versions of the instance
+UPDATE `gameobject` SET `spawnMask`=15 WHERE `guid`=151192;
+
+-- adding ToC boss immunities
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 65536 | 131072 | 524288 | 4194304 | 8388608 | 67108864 | 536870912 WHERE `entry` IN (34796, 35438, 35439, 35440, 34799, 35514, 35515, 35516, 35144, 35511, 35512, 35513, 34797, 35447, 35448, 35449, 34780, 35216, 35268, 35269, 36066, 35347, 35348, 35349, 34497, 35350, 35351, 35352, 34564, 34566, 35615, 35616);
+
+-- adding Teleport locations to Trial of the Crusader/champion for GMs
+DELETE FROM `game_tele` WHERE `name` LIKE '%TrialOfTheCrusader%' OR `name` LIKE '%TrialOfTheChampion%';
+INSERT INTO `game_tele` (`position_x`, `position_y`, `position_z`, `orientation`, `map`, `name`) VALUES
+(8515.63, 714.174, 558.248, 1.57298, 571, 'TrialOfTheCrusader'),
+(8588.42, 791.888, 558.236, 3.23819, 571, 'TrialOfTheChampion');
+
+-- misc fixes for higher boss brackets
+UPDATE `creature_template` SET `dmg_multiplier`=70 WHERE `entry` IN (35440, 35513, 35516, 35449, 35269, 35352, 35349, 35616, 35664, 35670, 35673, 35676, 35682, 35685, 35688, 35691, 35694, 35697, 35701, 35704, 35707, 35710, 35713, 35716, 35720, 35723, 35726, 35730, 35733, 35736, 35739, 35742, 35745, 35748, 35749);
+UPDATE `creature_template` SET `flags_extra`=`flags_extra` | 1 WHERE `entry` IN (35438, 35439, 35440, 35511, 35512, 35513, 35514, 35515, 35516, 35662, 35663, 35664, 35665, 35666, 35667, 35668, 35669, 35670, 35671, 35672, 35673, 35674, 35675, 35676, 35680, 35681, 35682, 35683, 35684, 35685, 35686, 35687, 35688, 35689, 35690, 35691, 35692, 35693, 35694, 35695, 35696, 35697, 35699, 35700, 35701, 35702, 35703, 35704, 35705, 35706, 35707, 35708, 35709, 35710, 35711, 35712, 35713, 35714, 35715, 35716, 35718, 35719, 35720, 35721, 35722, 35723, 35724, 35725, 35726, 35728, 35729, 35730, 35731, 35732, 35733, 35734, 35735, 35736, 35737, 35738, 35739, 35740, 35741, 35742, 35743, 35744, 35745, 35746, 35747, 35748, 34442, 34443, 35749);
+UPDATE `creature_template` SET `speed_walk`=2.8, `speed_run`=1.71429 WHERE `entry` IN (35350, 35351, 35352, 35347, 35348, 35349);
+UPDATE `creature_template` SET `speed_walk`=2, `speed_run`=1.14286 WHERE `entry` IN (34566, 35615, 35616);
+UPDATE `creature_template` SET `skinloot`=34797 WHERE `entry` IN (35447, 35448, 35449);
+UPDATE `creature_template` SET `skinloot`=70214 WHERE `entry` IN (34566, 35615, 35616);
+UPDATE `creature_template` SET `mindmg`=388, `maxdmg`=583, `attackpower`=146 WHERE `entry` IN (35711, 35712, 35713);
+UPDATE `creature_template` SET `mindmg`=468, `maxdmg`=702, `attackpower`=175 WHERE `entry` IN (35699, 35700, 35701);
+UPDATE `creature_template` SET `dmg_multiplier`=35 WHERE `entry` IN (34472, 34454);
+UPDATE `creature_template` SET `unit_class`=1 WHERE `entry` IN (34461, 35743, 35744, 35745);
+
+-- adding Jaraxxus add immunities
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 1024 | 2048 WHERE `entry` IN (34815, 35262, 35263, 35264, 34826, 35270, 35271, 35272);
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 262144 WHERE `entry` IN (35263, 35264);
+-- adding Nether portal and Infernal volcano immunities to knockout/grip
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 32 | 8192 WHERE `entry` IN (34825, 35278, 35279, 35280, 34813, 35265, 35266, 35267);
+
+-- cast Forbearance together with Divine shield (ToC Faction Champions paladin)
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66010;
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(66010, 25771, 0, 'Divine Shield - Forbearance');
+
+-- make all Diminishing returns rules apply in faction champions
+UPDATE `creature_template` SET `flags_extra`=`flags_extra` | 1048576 WHERE `entry` IN
+(34445,35705,35706,35707,
+34459,35686,35687,35688,
+34447,35683,35684,35685,
+34455,35680,35681,35682,
+34453,35718,35719,35720,
+34458,35692,35693,35694,
+34454,35711,35712,35713,
+34448,35724,35725,35726,
+34441,34442,34443,35749,
+34450,35695,35696,35697,
+35610,35774,35775,35776,
+35465,36301,36302,36303,
+34451,35671,35672,35673,
+34449,35689,35690,35691,
+34444,35740,35741,35742,
+34456,35708,35709,35710,
+34460,35702,35703,35704,
+34461,35743,35744,35745,
+34463,35734,35735,35736,
+34465,35746,35747,35748,
+34466,35665,35666,35667,
+34467,35662,35663,35664,
+34468,35721,35722,35723,
+34469,35714,35715,35716,
+34470,35728,35729,35730,
+34473,35674,35675,35676,
+34474,35731,35732,35733,
+34475,35737,35738,35739,
+34471,35668,35669,35670,
+34472,35699,35700,35701);
+
+-- correcting faction champions dmg multipliers
+UPDATE `creature_template` SET `dmg_multiplier`=10.8 WHERE `entry` IN (34445,34459,34447,34455,34453,34458,34454,34448,34441,34450,35610,35465,34451,34449,34444,34456,34460,34461,34463,34465,34466,34467,34468,34469,34470,34473,34474,34475,34472, 34471);
+UPDATE `creature_template` SET `dmg_multiplier`=16.1 WHERE `entry` IN (35705,35706,35686,35687,35683,35684,35680,35681,35718,35719,35692,35693,35711,35712,35724,35725,34442,34443,35695,35696,35774,35775,36301,36302,35671,35672,35689,35690,35740,35741,35708,35709,35702,35703,35743,35744,35734,35735,35746,35747,35665,35666,35662,35663,35721,35722,35714,35715,35728,35729,35674,35675,35731,35732,35737,35738,35699,35700, 35668, 35669);
+UPDATE `creature_template` SET `dmg_multiplier`=21.5 WHERE `entry` IN (35707,35688,35685,35682,35720,35694,35713,35726,35749,35697,35776,36303,35673,35691,35742,35710,35704,35745,35736,35748,35667,35664,35723,35716,35730,35676,35733,35739,35701, 35670);
+
+-- ToC warlock pet db corrections
+UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2, `faction_A`=16, `faction_H`=16, `mindmg`=417, `maxdmg`=582, `attackpower`=608, `unit_class`=2, `dynamicflags`=8, `minrangedmg`=341, `maxrangedmg`=506, `rangedattackpower`=80 WHERE `entry` IN (36301, 36302, 36303);
+UPDATE `creature_template` SET `faction_A`=16, `faction_H`=16, `difficulty_entry_1`=36301, `difficulty_entry_2`=36302, `difficulty_entry_3`=36303 WHERE `entry`=35465;
+UPDATE `creature_template` SET `name`="Zhaagrym (1)" WHERE `entry`=36301;
+
+-- Jaraxxus Mistress Kiss
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_mistress_kiss_area';
+INSERT INTO `spell_script_names` (spell_id, `ScriptName`) VALUES
+(66336, 'spell_mistress_kiss_area'),
+(67076, 'spell_mistress_kiss_area'),
+(67077, 'spell_mistress_kiss_area'),
+(67078, 'spell_mistress_kiss_area');
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_mistress_kiss';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(66334, 'spell_mistress_kiss'),
+(67905, 'spell_mistress_kiss'),
+(67906, 'spell_mistress_kiss'),
+(67907, 'spell_mistress_kiss');
+
+-- Gormoks Rising anger targeting
+DELETE FROM `conditions` WHERE `SourceEntry`=66636;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES
+(13, 1, 66636, 31, 3, 34796, 'Rising Anger');
+
+-- Twins loot correction
+UPDATE `creature_loot_template` SET `maxcount`=1 WHERE `entry`=34497 AND `mincountOrRef` IN (-34296, -34302);
+-- Anubarak loot correction
+UPDATE `creature_loot_template` SET `maxcount`=2 WHERE `entry`=34564 AND `mincountOrRef` IN (-34298, -34304);
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index 5ab5f99310a..d9d19c2f009 100755
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -21,6 +21,7 @@
#include "SpellInfo.h"
#include "Vehicle.h"
#include "ObjectAccessor.h"
+#include "Player.h"
int AggressorAI::Permissible(const Creature* creature)
{
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index f30c4516830..2fdb3cd39c6 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -90,8 +90,6 @@ void PetAI::UpdateAI(const uint32 diff)
else
m_updateAlliesTimer -= diff;
- // me->getVictim() can't be used for check in case stop fighting, me->getVictim() clear at Unit death etc.
- // Must also check if victim is alive
if (me->getVictim() && me->getVictim()->isAlive())
{
// is only necessary to stop casting, the pet must not exit combat
@@ -108,7 +106,9 @@ void PetAI::UpdateAI(const uint32 diff)
return;
}
- DoMeleeAttackIfReady();
+ // Check before attacking to prevent pets from leaving stay position
+ if (CanAttack(me->getVictim()))
+ DoMeleeAttackIfReady();
}
else if (owner && me->GetCharmInfo()) //no victim
{
@@ -335,7 +335,8 @@ void PetAI::AttackStart(Unit* target)
if (Unit* owner = me->GetOwner())
owner->SetInCombatWith(target);
- DoAttack(target, true);
+ // Only chase if not commanded to stay or if stay but commanded to attack
+ DoAttack(target, (!me->GetCharmInfo()->HasCommandState(COMMAND_STAY) || me->GetCharmInfo()->IsCommandAttack()));
}
void PetAI::OwnerDamagedBy(Unit* attacker)
@@ -382,31 +383,42 @@ void PetAI::OwnerAttacked(Unit* target)
Unit* PetAI::SelectNextTarget()
{
// Provides next target selection after current target death
+ // Targets are not evaluated here for being valid attack targets
// Passive pets don't do next target selection
if (me->HasReactState(REACT_PASSIVE))
return NULL;
- Unit* target = me->getAttackerForHelper();
+ // Check pet attackers first so we don't drag a bunch of targets to the owner
+ if (Unit* myAttacker = me->getAttackerForHelper())
+ if (!myAttacker->HasBreakableByDamageCrowdControlAura())
+ return myAttacker;
- // Check pet's attackers first to prevent dragging mobs back to owner
- if (target && !target->HasBreakableByDamageCrowdControlAura())
- return target;
-
- if (me->GetCharmerOrOwner())
- {
- // Check owner's attackers if pet didn't have any
- target = me->GetCharmerOrOwner()->getAttackerForHelper();
- if (target && !target->HasBreakableByDamageCrowdControlAura())
- return target;
-
- // 3.0.2 - Pets now start attacking their owners target in defensive mode as soon as the hunter does
- target = me->GetCharmerOrOwner()->getVictim();
- if (target && !target->HasBreakableByDamageCrowdControlAura())
- return target;
- }
+ // Not sure why we wouldn't have an owner but just in case...
+ if (!me->GetCharmerOrOwner())
+ return NULL;
- // Default
+ // Check owner attackers
+ if (Unit* ownerAttacker = me->GetCharmerOrOwner()->getAttackerForHelper())
+ if (!ownerAttacker->HasBreakableByDamageCrowdControlAura())
+ return ownerAttacker;
+
+ // Check owner victim
+ // 3.0.2 - Pets now start attacking their owners victim in defensive mode as soon as the hunter does
+ if (Unit* ownerVictim = me->GetCharmerOrOwner()->getVictim())
+ if (!ownerVictim->HasBreakableByDamageCrowdControlAura())
+ return ownerVictim;
+
+ // Neither pet or owner had a target and aggressive pets can pick any target
+ // Note: Creature::SelectNearestTarget() If no distance is supplied it uses MAX_VISIBILITY_DISTANCE
+ // We also want to lock this to LOS so pet doesn't go running through walls and stuff
+ if (me->HasReactState(REACT_AGGRESSIVE))
+ if (Unit* nearTarget = me->ToCreature()->SelectNearestTarget())
+ if (nearTarget->IsHostileTo(me) && !nearTarget->HasBreakableByDamageCrowdControlAura())
+ if (nearTarget->IsWithinLOS(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()))
+ return nearTarget;
+
+ // Default - no valid targets
return NULL;
}
@@ -518,6 +530,10 @@ bool PetAI::CanAttack(Unit* target)
// Evaluates wether a pet can attack a specific
// target based on CommandState, ReactState and other flags
+ // Can't attack dead targets...
+ if (!target->isAlive())
+ return false;
+
// Returning - check first since pets returning ignore attacks
if (me->GetCharmInfo()->IsReturning())
return false;
@@ -526,19 +542,17 @@ bool PetAI::CanAttack(Unit* target)
if (me->HasReactState(REACT_PASSIVE))
return me->GetCharmInfo()->IsCommandAttack();
- // Pets commanded to attack should not stop their approach if attacked by another creature
- if (me->getVictim() && (me->getVictim() != target))
- return !me->GetCharmInfo()->IsCommandAttack();
-
- // From this point on, pet will always be either aggressive or defensive
+ // Follow
+ if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
+ return true;
// Stay - can attack if target is within range or commanded to
if (me->GetCharmInfo()->HasCommandState(COMMAND_STAY))
- return (me->IsWithinMeleeRange(target, MELEE_RANGE) || me->GetCharmInfo()->IsCommandAttack());
+ return (me->IsWithinMeleeRange(target) || me->GetCharmInfo()->IsCommandAttack());
- // Follow
- if (me->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
- return true;
+ // Pets commanded to attack should not stop their approach if attacked by another creature
+ if (me->getVictim() && (me->getVictim() != target))
+ return !me->GetCharmInfo()->IsCommandAttack();
// default, though we shouldn't ever get here
return false;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 9c666e7de32..3f5952a210d 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -12,6 +12,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "Group.h"
+#include "Player.h"
enum ePoints
{
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index ebb734156b4..96209084240 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -12,6 +12,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedFollowerAI.h"
#include "Group.h"
+#include "Player.h"
const float MAX_PLAYER_DISTANCE = 100.0f;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
index 34300ff406c..ae1b5fcc12d 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
@@ -8,7 +8,6 @@
#ifndef SC_GOSSIP_H
#define SC_GOSSIP_H
-#include "Player.h"
#include "GossipDef.h"
#include "QuestDef.h"
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index a1fb2147cc2..b8c0f952df9 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -472,6 +472,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
+ // Special handling for vehicles
+ if (IsUnit(*itr))
+ if (Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
+ for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
+ if (Player* player = ObjectAccessor::FindPlayer(it->second.Passenger))
+ player->AreaExploredOrEventHappens(e.action.quest.quest);
+
if (IsPlayer(*itr))
{
(*itr)->ToPlayer()->AreaExploredOrEventHappens(e.action.quest.quest);
@@ -752,6 +759,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u",
unit->GetGUIDLow(), e.action.quest.quest);
}
+ // Special handling for vehicles
+ if (Vehicle* vehicle = unit->GetVehicleKit())
+ for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
+ if (Player* player = ObjectAccessor::FindPlayer(it->second.Passenger))
+ player->GroupEventHappens(e.action.quest.quest, GetBaseObject());
break;
}
case SMART_ACTION_CALL_CASTEDCREATUREORGO:
@@ -878,6 +890,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
+ // Special handling for vehicles
+ if (IsUnit(*itr))
+ if (Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
+ for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
+ if (Player* player = ObjectAccessor::FindPlayer(it->second.Passenger))
+ player->RewardPlayerAndGroupAtEvent(e.action.killedMonster.creature, player);
+
if (!IsPlayer(*itr))
continue;
diff --git a/src/server/game/Battlefield/BattlefieldHandler.cpp b/src/server/game/Battlefield/BattlefieldHandler.cpp
index 66285fe1b04..79b5f3a7998 100644
--- a/src/server/game/Battlefield/BattlefieldHandler.cpp
+++ b/src/server/game/Battlefield/BattlefieldHandler.cpp
@@ -26,6 +26,7 @@
#include "Battlefield.h"
#include "BattlefieldMgr.h"
#include "Opcodes.h"
+#include "Player.h"
//This send to player windows for invite player to join the war
//Param1:(guid) the guid of Bf
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 4468660006e..98833589d00 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -24,6 +24,7 @@
#include "BattlefieldWG.h"
#include "SpellAuras.h"
#include "Vehicle.h"
+#include "Player.h"
enum WGVehicles
{
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index 68072a68249..0a81a7af992 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -21,11 +21,9 @@
#include "ObjectAccessor.h"
#include "WorldPacket.h"
-#include "World.h"
-#include "Group.h"
-#include "GroupMgr.h"
#include "Battlefield.h"
+class Group;
class BattlefieldWG;
class WintergraspCapturePoint;
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index a8526985468..e7644805a76 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -22,6 +22,7 @@
#include "World.h"
#include "Group.h"
#include "ArenaTeamMgr.h"
+#include "Player.h"
ArenaTeam::ArenaTeam()
: TeamId(0), Type(0), TeamName(), CaptainGuid(0), BackgroundColor(0), EmblemStyle(0), EmblemColor(0),
@@ -510,6 +511,23 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_EVENT");
}
+void ArenaTeam::MassInviteToEvent(WorldSession* session)
+{
+ WorldPacket data(SMSG_CALENDAR_ARENA_TEAM, (Members.size() - 1) * (4 + 8 + 1));
+ data << uint32(Members.size() - 1);
+
+ for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
+ {
+ if (itr->Guid != session->GetPlayer()->GetGUID())
+ {
+ data.appendPackGUID(itr->Guid);
+ data << uint8(0); // unk
+ }
+ }
+
+ session->SendPacket(&data);
+}
+
uint8 ArenaTeam::GetSlotByType(uint32 type)
{
switch (type)
diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
index 1c07e377d96..5d8345aec53 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.h
+++ b/src/server/game/Battlegrounds/ArenaTeam.h
@@ -163,6 +163,8 @@ class ArenaTeam
void BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCount, std::string const& str1, std::string const& str2, std::string const& str3);
void NotifyStatsChanged();
+ void MassInviteToEvent(WorldSession* session);
+
void Roster(WorldSession* session);
void Query(WorldSession* session);
void SendStats(WorldSession* session);
diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
index 9365172a4ca..8b2a056f4bb 100644
--- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
@@ -22,6 +22,7 @@
#include "DatabaseEnv.h"
#include "Language.h"
#include "ObjectAccessor.h"
+#include "Player.h"
ArenaTeamMgr::ArenaTeamMgr()
{
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 92a6d39a3ca..eb7ce9a64a4 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -407,6 +407,17 @@ inline void Battleground::_ProcessRessurect(uint32 diff)
}
}
+uint32 Battleground::GetPrematureWinner()
+{
+ uint32 winner = 0;
+ if (GetPlayersCountByTeam(ALLIANCE) >= GetMinPlayersPerTeam())
+ winner = ALLIANCE;
+ else if (GetPlayersCountByTeam(HORDE) >= GetMinPlayersPerTeam())
+ winner = HORDE;
+
+ return winner;
+}
+
inline void Battleground::_ProcessProgress(uint32 diff)
{
// *********************************************************
@@ -421,13 +432,7 @@ inline void Battleground::_ProcessProgress(uint32 diff)
else if (m_PrematureCountDownTimer < diff)
{
// time's up!
- uint32 winner = 0;
- if (GetPlayersCountByTeam(ALLIANCE) >= GetMinPlayersPerTeam())
- winner = ALLIANCE;
- else if (GetPlayersCountByTeam(HORDE) >= GetMinPlayersPerTeam())
- winner = HORDE;
-
- EndBattleground(winner);
+ EndBattleground(GetPrematureWinner());
m_PrematureCountDown = false;
}
else if (!sBattlegroundMgr->isTesting())
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index ea22e2a4dd0..3feeea53ad8 100755
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -168,25 +168,6 @@ struct BattlegroundObjectInfo
uint32 spellid;
};
-// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
-enum BattlegroundQueueTypeId
-{
- BATTLEGROUND_QUEUE_NONE = 0,
- BATTLEGROUND_QUEUE_AV = 1,
- BATTLEGROUND_QUEUE_WS = 2,
- BATTLEGROUND_QUEUE_AB = 3,
- BATTLEGROUND_QUEUE_EY = 4,
- BATTLEGROUND_QUEUE_SA = 5,
- BATTLEGROUND_QUEUE_IC = 6,
- BATTLEGROUND_QUEUE_TP = 7,
- BATTLEGROUND_QUEUE_BFG = 8,
- BATTLEGROUND_QUEUE_RB = 9,
- BATTLEGROUND_QUEUE_2v2 = 10,
- BATTLEGROUND_QUEUE_3v3 = 11,
- BATTLEGROUND_QUEUE_5v5 = 12,
- MAX_BATTLEGROUND_QUEUE_TYPES
-};
-
enum ScoreType
{
SCORE_KILLING_BLOWS = 1,
@@ -255,37 +236,6 @@ enum BattlegroundStartingEventsIds
};
#define BG_STARTING_EVENT_COUNT 4
-enum GroupJoinBattlegroundResult
-{
- ERR_BATTLEGROUND_NONE = 0,
- ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = 2, // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter.
- ERR_ARENA_TEAM_PARTY_SIZE = 3, // Incorrect party size for this arena.
- ERR_BATTLEGROUND_TOO_MANY_QUEUES = 4, // You can only be queued for 2 battles at once
- ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = 5, // You cannot queue for a rated match while queued for other battles
- ERR_BATTLEDGROUND_QUEUED_FOR_RATED = 6, // You cannot queue for another battle while queued for a rated arena match
- ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = 7, // Your team has left the arena queue
- ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = 8, // You can't do that in a battleground.
- ERR_BATTLEGROUND_JOIN_XP_GAIN = 9, // wtf, doesn't exist in client...
- ERR_BATTLEGROUND_JOIN_RANGE_INDEX = 10, // Cannot join the queue unless all members of your party are in the same battleground level range.
- ERR_BATTLEGROUND_JOIN_TIMED_OUT = 11, // %s was unavailable to join the queue. (uint64 guid exist in client cache)
- //ERR_BATTLEGROUND_JOIN_TIMED_OUT = 12, // same as 11
- //ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = 13, // same as 7
- ERR_LFG_CANT_USE_BATTLEGROUND = 14, // You cannot queue for a battleground or arena while using the dungeon system.
- ERR_IN_RANDOM_BG = 15, // Can't do that while in a Random Battleground queue.
- ERR_IN_NON_RANDOM_BG = 16, // Can't queue for Random Battleground while in another Battleground queue.
- ERR_BG_DEVELOPER_ONLY = 17,
- ERR_BATTLEGROUND_INVITATION_DECLINED = 18,
- ERR_MEETING_STONE_NOT_FOUND = 19,
- ERR_WARGAME_REQUEST_FAILURE = 20,
- ERR_BATTLEFIELD_TEAM_PARTY_SIZE = 22,
- ERR_NOT_ON_TOURNAMENT_REALM = 23,
- ERR_BATTLEGROUND_PLAYERS_FROM_DIFFERENT_REALMS = 24,
- ERR_REMOVE_FROM_PVP_QUEUE_GRANT_LEVEL = 33,
- ERR_REMOVE_FROM_PVP_QUEUE_FACTION_CHANGE = 34,
- ERR_BATTLEGROUND_JOIN_FAILED = 35,
- ERR_BATTLEGROUND_DUPE_QUEUE = 43
-};
-
struct BattlegroundScore
{
BattlegroundScore() : KillingBlows(0), Deaths(0), HonorableKills(0), BonusHonor(0),
@@ -580,6 +530,8 @@ class Battleground
virtual uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return 0; }
virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) {}
uint32 GetTeamScore(uint32 TeamID) const;
+
+ virtual uint32 GetPrematureWinner();
protected:
// this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 90e44c32eae..fec17b2873e 100755
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -24,6 +24,7 @@
#include "ArenaTeamMgr.h"
#include "Log.h"
#include "Group.h"
+#include "Player.h"
/*********************************************************/
/*** BATTLEGROUND QUEUE SYSTEM ***/
@@ -216,7 +217,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
// Show queue status to player only (when joining queue)
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
{
- ChatHandler(leader).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
+ ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
}
// System message
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 5a887c647b1..8f7231ba66e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -548,6 +548,25 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
PlaySoundToAll(sound);
}
+uint32 BattlegroundAB::GetPrematureWinner()
+{
+ // How many bases each team owns
+ uint8 ally = 0, horde = 0;
+ for (uint8 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
+ if (m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED)
+ ++ally;
+ else if (m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
+ ++horde;
+
+ if (ally > horde)
+ return ALLIANCE;
+ else if (horde > ally)
+ return HORDE;
+
+ // If the values are equal, fall back to the original result (based on number of players on each team)
+ return Battleground::GetPrematureWinner();
+}
+
bool BattlegroundAB::SetupBattleground()
{
for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index 63c89717c8f..b80e216a216 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -272,6 +272,8 @@ class BattlegroundAB : public Battleground
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const; // overwrited
bool IsTeamScores500Disadvantage(uint32 team) const { return m_TeamScores500Disadvantage[GetTeamIndexByTeamId(team)]; }
+
+ uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
/* Gameobject spawning/despawning */
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index a348ec69b8a..95aa0308c7d 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -1695,3 +1695,16 @@ bool BattlegroundAV::IsAllTowersControlledAndCaptainAlive(uint32 team) const
return false;
}
+
+uint32 BattlegroundAV::GetPrematureWinner()
+{
+ uint32 allianceScore = m_Team_Scores[GetTeamIndexByTeamId(ALLIANCE)];
+ uint32 hordeScore = m_Team_Scores[GetTeamIndexByTeamId(HORDE)];
+
+ if (allianceScore > hordeScore)
+ return ALLIANCE;
+ else if (hordeScore > allianceScore)
+ return HORDE;
+
+ return Battleground::GetPrematureWinner();
+} \ No newline at end of file
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index dab67fe3258..bedd946a78c 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -1556,7 +1556,7 @@ class BattlegroundAV : public Battleground
/*general stuff*/
void UpdateScore(uint16 team, int16 points);
- void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
+ void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
/*handlestuff*/ //these are functions which get called from extern
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
@@ -1572,6 +1572,8 @@ class BattlegroundAV : public Battleground
/* achievement req. */
bool IsBothMinesControlledByTeam(uint32 team) const;
bool IsAllTowersControlledAndCaptainAlive(uint32 team) const;
+
+ uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index e900bc9b1d3..458e86729e7 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -937,3 +937,13 @@ bool BattlegroundEY::IsAllNodesConrolledByTeam(uint32 team) const
return count == EY_POINTS_MAX;
}
+
+uint32 BattlegroundEY::GetPrematureWinner()
+{
+ if (GetTeamScore(TEAM_ALLIANCE) > GetTeamScore(TEAM_HORDE))
+ return ALLIANCE;
+ else if (GetTeamScore(TEAM_HORDE) > GetTeamScore(TEAM_ALLIANCE))
+ return HORDE;
+
+ return Battleground::GetPrematureWinner();
+} \ No newline at end of file
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index 61ee5b16c1c..2cfd4ca7e0f 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -369,6 +369,8 @@ class BattlegroundEY : public Battleground
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const;
+
+ uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index 1386af13186..9e58a93fd2d 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
@@ -20,6 +20,8 @@
#define __BATTLEGROUNDIC_H
#include "Battleground.h"
+#include "Language.h"
+#include "Object.h"
const uint32 BG_IC_Factions[2] =
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 9f59344843c..663e5aed1e4 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -858,3 +858,12 @@ void BattlegroundWS::FillInitialWorldStates(WorldPacket& data)
data << uint32(BG_WS_FLAG_STATE_ALLIANCE) << uint32(1);
}
+uint32 BattlegroundWS::GetPrematureWinner()
+{
+ if (GetTeamScore(TEAM_ALLIANCE) > GetTeamScore(TEAM_HORDE))
+ return ALLIANCE;
+ else if (GetTeamScore(TEAM_HORDE) > GetTeamScore(TEAM_ALLIANCE))
+ return HORDE;
+
+ return Battleground::GetPrematureWinner();
+}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index ec9f4ab1506..5b72de43b32 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -211,6 +211,8 @@ class BattlegroundWS : public Battleground
void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; }
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
+
+ uint32 GetPrematureWinner();
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
uint64 m_DroppedFlagGUID[2];
diff --git a/src/server/game/Calendar/Calendar.cpp b/src/server/game/Calendar/Calendar.cpp
deleted file mode 100755
index 139e63614cc..00000000000
--- a/src/server/game/Calendar/Calendar.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * 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 "Player.h"
-#include "Calendar.h"
-
-std::string CalendarInvite::GetDebugString() const
-{
- std::ostringstream data;
-
- data << "CalendarInvite::"
- << " inviteId: " << _inviteId
- << " EventId: " << _eventId
- << " Status: " << uint32(_status)
- << " Invitee: " << _invitee
- << " Sender: " << _senderGUID
- << " Rank: " << uint32(_rank)
- << " Text: " << _text;
-
- return data.str();
-}
-
-void CalendarInvite::Init()
-{
- _eventId = 0;
- _invitee = 0;
- _senderGUID = 0;
- _statusTime = 0;
- _status = CALENDAR_STATUS_INVITED; // default (0)?
- _rank = CALENDAR_RANK_PLAYER;
- _text = "";
-}
-
-std::string CalendarEvent::GetDebugString() const
-{
- std::ostringstream data;
-
- data << "CalendarEvent::"
- << " EventId: " << _eventId
- << " Title: " << _title
- << " Description" << _description
- << " Type: " << uint32(_type)
- << " Max Invites: " << _maxInvites
- << " Creator: " << _creatorGUID
- << " Flags: " << _flags
- << " Guild: " << _guildId
- << " Time: " << _eventTime
- << " Time2: " << _timezoneTime
- << " Repeatable: " << uint32(_repeatable)
- << " DungeonId: " << _dungeonId;
-
- return data.str();
-}
-
-void CalendarEvent::Init()
-{
- _creatorGUID = 0;
- _guildId = 0;
- _type = CALENDAR_TYPE_OTHER;
- _dungeonId = -1;
- _maxInvites = 0;
- _eventTime = 0;
- _flags = 0;
- _repeatable = false;
- _timezoneTime = 0;
- _title = "";
- _description = "";
-
-}
-
-std::string CalendarAction::GetDebugString() const
-{
- std::ostringstream data;
-
- data << "CalendarAction::"
- << " Action: " << GetAction()
- << " Guid: " << GetPlayer()->GetGUID()
- << " Invite Id: " << GetInviteId()
- << " Extra data: " << GetExtraData()
- << " Event: " << Event.GetDebugString()
- << " Invite: " << Invite.GetDebugString();
-
- return data.str();
-}
diff --git a/src/server/game/Calendar/Calendar.h b/src/server/game/Calendar/Calendar.h
deleted file mode 100755
index 273db4c3854..00000000000
--- a/src/server/game/Calendar/Calendar.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * 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/>.
- */
-
-#ifndef TRINITY_CALENDAR_H
-#define TRINITY_CALENDAR_H
-
-#include "Errors.h"
-#include "SharedDefines.h"
-#include <map>
-
-class CalendarInvite
-{
- public:
- CalendarInvite() : _inviteId(0) { Init(); }
- explicit CalendarInvite(uint64 inviteId) : _inviteId(inviteId) { Init(); }
-
- ~CalendarInvite() { }
-
- void SetInviteId(uint64 inviteId) { _inviteId = inviteId; }
- uint64 GetInviteId() const { return _inviteId; }
-
- void SetEventId(uint64 eventId) { _eventId = eventId; }
- uint64 GetEventId() const { return _eventId; }
-
- void SetSenderGUID(uint64 guid) { _senderGUID = guid; }
- uint64 GetSenderGUID() const { return _senderGUID; }
-
- void SetInvitee(uint64 guid) { _invitee = guid; }
- uint64 GetInvitee() const { return _invitee; }
-
- void SetStatusTime(uint32 statusTime) { _statusTime = statusTime; }
- uint32 GetStatusTime() const { return _statusTime; }
-
- void SetText(std::string const& text) { _text = text; }
- std::string const& GetText() const { return _text; }
-
- void SetStatus(CalendarInviteStatus status) { _status = status; }
- CalendarInviteStatus GetStatus() const { return _status; }
-
- void SetRank(CalendarModerationRank rank) { _rank = rank; }
- CalendarModerationRank GetRank() const { return _rank; }
-
- std::string GetDebugString() const;
-
- private:
- void Init();
-
- uint64 _inviteId;
- uint64 _eventId;
- uint64 _invitee;
- uint64 _senderGUID;
- uint32 _statusTime;
- CalendarInviteStatus _status;
- CalendarModerationRank _rank;
- std::string _text;
-};
-
-typedef std::set<uint64> CalendarInviteIdList;
-
-class CalendarEvent
-{
- public:
- CalendarEvent() : _eventId(0) { Init(); }
- explicit CalendarEvent(uint64 eventId) : _eventId(eventId) { Init(); }
-
- ~CalendarEvent() { }
-
- void SetEventId(uint64 eventId) { _eventId = eventId; }
- uint64 GetEventId() const { return _eventId; }
-
- void SetCreatorGUID(uint64 guid) { _creatorGUID = guid; }
- uint64 GetCreatorGUID() const { return _creatorGUID; }
-
- void SetGuildId(uint32 guildId) { _guildId = guildId; }
- uint32 GetGuildId() const { return _guildId; }
-
- void SetTitle(std::string const& title) { _title = title; }
- std::string const& GetTitle() const { return _title; }
-
- void SetDescription(std::string const& description) { _description = description; }
- std::string const& GetDescription() const { return _description; }
-
- void SetType(CalendarEventType type) { _type = type; }
- CalendarEventType GetType() const { return _type; }
-
- void SetMaxInvites(uint32 limit) { _maxInvites = limit; }
- uint32 GetMaxInvites() const { return _maxInvites; }
-
- void SetDungeonId(int32 dungeonId) { _dungeonId = dungeonId; }
- int32 GetDungeonId() const { return _dungeonId; }
-
- void SetTime(uint32 eventTime) { _eventTime = eventTime; }
- uint32 GetTime() const { return _eventTime; }
-
- void SetFlags(uint32 flags) { _flags = flags; }
- uint32 GetFlags() const { return _flags; }
-
- void SetRepeatable(bool repeatable) { _repeatable = repeatable; }
- bool GetRepeatable() const { return _repeatable; }
-
- void SetTimeZoneTime(uint32 timezoneTime) { _timezoneTime = timezoneTime; }
- uint32 GetTimeZoneTime() const { return _timezoneTime; }
-
- void AddInvite(uint64 inviteId)
- {
- if (inviteId)
- _invites.insert(inviteId);
- }
-
- void RemoveInvite(uint64 inviteId) { _invites.erase(inviteId); }
- bool HasInvite(uint64 inviteId) const { return _invites.find(inviteId) != _invites.end(); }
- CalendarInviteIdList const& GetInviteIdList() const { return _invites; }
- void SetInviteIdList(CalendarInviteIdList const& list) { _invites = list; }
- void ClearInviteIdList() { _invites.clear(); }
-
- std::string GetDebugString() const;
-
- private:
- void Init();
-
- uint64 _eventId;
- uint64 _creatorGUID;
- uint32 _guildId;
- CalendarEventType _type;
- int32 _dungeonId;
- uint32 _maxInvites;
- uint32 _eventTime;
- uint32 _flags;
- bool _repeatable;
- uint32 _timezoneTime;
- std::string _title;
- std::string _description;
- CalendarInviteIdList _invites;
-};
-
-typedef std::set<uint64> CalendarEventIdList;
-typedef std::map<uint64, CalendarInviteIdList> CalendarPlayerInviteIdMap;
-typedef std::map<uint64, CalendarEventIdList> CalendarPlayerEventIdMap;
-typedef std::map<uint64, CalendarInvite> CalendarInviteMap;
-typedef std::map<uint64, CalendarEvent> CalendarEventMap;
-
-class Player;
-
-struct CalendarAction
-{
- CalendarAction(): _action(CALENDAR_ACTION_NONE), _player(NULL), _inviteId(0), _data(0)
- {
- }
-
- void SetAction(CalendarActionData data) { _action = data; }
- CalendarActionData GetAction() const { return _action; }
-
- void SetPlayer(Player* player) { ASSERT(player); _player = player; }
- Player* GetPlayer() const { return _player; }
-
- void SetInviteId(uint64 id) { _inviteId = id; }
- uint64 GetInviteId() const { return _inviteId; }
-
- void SetExtraData(uint32 data) { _data = data; }
- uint32 GetExtraData() const { return _data; }
-
- CalendarEvent Event;
- CalendarInvite Invite;
-
- std::string GetDebugString() const;
-
- private:
- CalendarActionData _action;
- Player* _player;
- uint64 _inviteId;
- uint32 _data;
-};
-
-#endif
diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp
index 80de42c0ce2..1955eaa63aa 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -15,579 +15,620 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
-
-DROP TABLE IF EXISTS `calendar_events`;
-CREATE TABLE IF NOT EXISTS `calendar_events` (
- `id` int(11) unsigned NOT NULL DEFAULT '0',
- `creator` int(11) unsigned NOT NULL DEFAULT '0',
- `title` varchar(255) NOT NULL DEFAULT '',
- `description` varchar(255) NOT NULL DEFAULT '',
- `type` tinyint(1) unsigned NOT NULL DEFAULT '4',
- `dungeon` tinyint(3) NOT NULL DEFAULT '-1',
- `eventtime` int(10) unsigned NOT NULL DEFAULT '0',
- `flags` int(10) unsigned NOT NULL DEFAULT '0',
- `repeatable` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `time2` int(10) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
-);
-
-DROP TABLE IF EXISTS `calendar_invites`;
-CREATE TABLE IF NOT EXISTS `calendar_invites` (
- `id` int(11) unsigned NOT NULL DEFAULT '0',
- `event` int(11) unsigned NOT NULL DEFAULT '0',
- `invitee` int(11) unsigned NOT NULL DEFAULT '0',
- `sender` int(11) unsigned NOT NULL DEFAULT '0',
- `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `statustime` int(10) unsigned NOT NULL DEFAULT '0',
- `rank` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `text` varchar(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`)
-);
-*/
-
#include "CalendarMgr.h"
#include "QueryResult.h"
#include "DatabaseEnv.h"
#include "Log.h"
#include "Player.h"
+#include "GuildMgr.h"
#include "ObjectAccessor.h"
-CalendarMgr::CalendarMgr() :
- _eventNum(0), _inviteNum(0)
+CalendarInvite::~CalendarInvite()
{
+ sCalendarMgr->FreeInviteId(_inviteId);
}
-CalendarMgr::~CalendarMgr()
+CalendarEvent::~CalendarEvent()
{
+ sCalendarMgr->FreeEventId(_eventId);
}
-uint32 CalendarMgr::GetPlayerNumPending(uint64 guid)
+CalendarMgr::CalendarMgr()
{
- if (!guid)
- return 0;
-
- CalendarPlayerInviteIdMap::const_iterator itr = _playerInvites.find(guid);
- if (itr == _playerInvites.end())
- return 0;
-
- uint32 pendingNum = 0;
- for (CalendarInviteIdList::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
- if (CalendarInvite* invite = GetInvite(*it))
- if (invite->GetRank() != CALENDAR_RANK_OWNER
- && invite->GetStatus() != CALENDAR_STATUS_CONFIRMED
- && invite->GetStatus() != CALENDAR_STATUS_8
- && invite->GetStatus() != CALENDAR_STATUS_9) // FIXME Check the proper value
- ++pendingNum;
-
- return pendingNum;
}
-CalendarInviteIdList const& CalendarMgr::GetPlayerInvites(uint64 guid)
+CalendarMgr::~CalendarMgr()
{
- return _playerInvites[guid];
}
-CalendarEventIdList const& CalendarMgr::GetPlayerEvents(uint64 guid)
+void CalendarMgr::LoadFromDB()
{
- return _playerEvents[guid];
-}
+ uint32 count = 0;
+ _maxEventId = 1;
+ _maxInviteId = 1;
-CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId)
-{
- CalendarInviteMap::iterator itr = _invites.find(inviteId);
- if (itr != _invites.end())
- return &(itr->second);
+ // 0 1 2 3 4 5 6 7 8
+ if (QueryResult result = CharacterDatabase.Query("SELECT id, creator, title, description, type, dungeon, eventtime, flags, time2 FROM calendar_events"))
+ do
+ {
+ Field* fields = result->Fetch();
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
- return NULL;
-}
+ uint64 eventId = fields[0].GetUInt64();
+ uint64 creatorGUID = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_PLAYER);
+ std::string title = fields[2].GetString();
+ std::string description = fields[3].GetString();
+ CalendarEventType type = CalendarEventType(fields[4].GetUInt8());
+ int32 dungeonId = fields[5].GetInt32();
+ uint32 eventTime = fields[6].GetUInt32();
+ uint32 flags = fields[7].GetUInt32();
+ uint32 timezoneTime = fields[8].GetUInt32();
+ uint32 guildId = 0;
-CalendarEvent* CalendarMgr::GetEvent(uint64 eventId)
-{
- CalendarEventMap::iterator itr = _events.find(eventId);
- if (itr != _events.end())
- return &(itr->second);
+ if (flags & CALENDAR_FLAG_GUILD_EVENT || flags & CALENDAR_FLAG_WITHOUT_INVITES)
+ guildId = Player::GetGuildIdFromDB(creatorGUID);
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
- return NULL;
-}
+ CalendarEvent* calendarEvent = new CalendarEvent(eventId, creatorGUID , guildId, type, dungeonId, time_t(eventTime), flags, time_t(timezoneTime), title, description);
+ _events.insert(calendarEvent);
-uint64 CalendarMgr::GetFreeEventId()
-{
- return ++_eventNum;
-}
-uint64 CalendarMgr::GetFreeInviteId()
-{
- return ++_inviteNum;
-}
+ _maxEventId = std::max(_maxEventId, eventId);
-void CalendarMgr::LoadFromDB()
-{
- /*
- uint32 count = 0;
- // 0 1 2 3 4 5 6 7 8 9
- if (QueryResult result = CharacterDatabase.Query("SELECT id, creator, title, description, type, dungeon, eventtime, flags, repeatable, time2 FROM calendar_events"))
- do
- {
- Field * fields = result->Fetch();
-
- uint64 eventId = fields[0].GetUInt64();
- CalendarEvent& calendarEvent = _events[eventId];
-
- calendarEvent.SetEventId(eventId);
- calendarEvent.SetCreatorGUID(fields[1].GetUInt64());
- calendarEvent.SetTitle(fields[2].GetString());
- calendarEvent.SetDescription(fields[3].GetString());
- calendarEvent.SetType(fields[4].GetUInt8());
- calendarEvent.SetDungeonId(fields[5].GetInt32());
- calendarEvent.SetTime(fields[6].GetUInt32());
- calendarEvent.SetFlags(fields[7].GetUInt32());
- calendarEvent.SetRepeatable(fields[8].GetBool());
- calendarEvent.SetTimeZoneTime(fields[9].GetUInt32());
++count;
}
while (result->NextRow());
- sLog->outInfo(LOG_FILTER_CALENDAR, ">> Loaded %u calendar events", count);
+ sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u calendar events", count);
count = 0;
// 0 1 2 3 4 5 6 7
if (QueryResult result = CharacterDatabase.Query("SELECT id, event, invitee, sender, status, statustime, rank, text FROM calendar_invites"))
do
{
- Field * fields = result->Fetch();
+ Field* fields = result->Fetch();
- uint64 inviteId = fields[0].GetUInt64();
- uint64 eventId = fields[1].GetUInt64();
+ uint64 inviteId = fields[0].GetUInt64();
+ uint64 eventId = fields[1].GetUInt64();
+ uint64 invitee = MAKE_NEW_GUID(fields[2].GetUInt32(), 0, HIGHGUID_PLAYER);
+ uint64 senderGUID = MAKE_NEW_GUID(fields[3].GetUInt32(), 0, HIGHGUID_PLAYER);
+ CalendarInviteStatus status = CalendarInviteStatus(fields[4].GetUInt8());
+ uint32 statusTime = fields[5].GetUInt32();
+ CalendarModerationRank rank = CalendarModerationRank(fields[6].GetUInt8());
+ std::string text = fields[7].GetString();
- CalendarInvite& invite = _invites[inviteId];
+ CalendarInvite* invite = new CalendarInvite(inviteId, eventId, invitee, senderGUID, time_t(statusTime), status, rank, text);
+ _invites[eventId].push_back(invite);
- invite.SetEventId(eventId);
- invite.SetInvitee(fields[2].GetUInt64());
- invite.SetSenderGUID(fields[3].GetUInt64());
- invite.SetStatus(fields[4].GetUInt8());
- invite.SetStatusTime(fields[5].GetUInt32());
- invite.SetRank(fields[6].GetUInt8());
- invite.SetText(fields[7].GetString());
+ _maxInviteId = std::max(_maxInviteId, inviteId);
- CalendarEvent& calendarEvent = _events[eventId];
- calendarEvent.AddInvite(inviteId);
+ ++count;
}
while (result->NextRow());
- sLog->outInfo(LOG_FILTER_CALENDAR, ">> Loaded %u calendar Invites", count);
- */
+ sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u calendar invites", count);
+
+ for (uint64 i = 1; i < _maxEventId; ++i)
+ if (!GetEvent(i))
+ _freeEventIds.push_back(i);
+
+ for (uint64 i = 1; i < _maxInviteId; ++i)
+ if (!GetInvite(i))
+ _freeInviteIds.push_back(i);
}
-CalendarEvent* CalendarMgr::CheckPermisions(uint64 eventId, Player* player, uint64 inviteId, CalendarModerationRank minRank)
+void CalendarMgr::AddEvent(CalendarEvent* calendarEvent, CalendarSendEventType sendType)
{
- if (!player)
- return NULL; // CALENDAR_ERROR_INTERNAL
+ _events.insert(calendarEvent);
+ UpdateEvent(calendarEvent);
+ SendCalendarEvent(calendarEvent->GetCreatorGUID(), *calendarEvent, sendType);
+}
- CalendarEvent* calendarEvent = GetEvent(eventId);
- if (!calendarEvent)
- {
- player->GetSession()->SendCalendarCommandResult(CALENDAR_ERROR_EVENT_INVALID);
- return NULL;
- }
+void CalendarMgr::AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite)
+{
+ if (!calendarEvent->IsGuildAnnouncement())
+ SendCalendarEventInvite(*invite);
- CalendarInvite* invite = GetInvite(inviteId);
- if (!invite)
- {
- player->GetSession()->SendCalendarCommandResult(CALENDAR_ERROR_NO_INVITE);
- return NULL;
- }
+ if (!calendarEvent->IsGuildEvent() || invite->GetInviteeGUID() == calendarEvent->GetCreatorGUID())
+ SendCalendarEventInviteAlert(*calendarEvent, *invite);
- if (!calendarEvent->HasInvite(inviteId))
+ if (!calendarEvent->IsGuildAnnouncement())
{
- player->GetSession()->SendCalendarCommandResult(CALENDAR_ERROR_NOT_INVITED);
- return NULL;
+ _invites[invite->GetEventId()].push_back(invite);
+ UpdateInvite(invite);
}
+}
+
+void CalendarMgr::RemoveEvent(uint64 eventId, uint64 remover)
+{
+ CalendarEvent* calendarEvent = GetEvent(eventId);
- if (invite->GetEventId() != calendarEvent->GetEventId() || invite->GetInvitee() != player->GetGUID())
+ if (!calendarEvent)
{
- player->GetSession()->SendCalendarCommandResult(CALENDAR_ERROR_INTERNAL);
- return NULL;
+ SendCalendarCommandResult(remover, CALENDAR_ERROR_EVENT_INVALID);
+ return;
}
- if (invite->GetRank() < minRank)
+ SendCalendarEventRemovedAlert(*calendarEvent);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ PreparedStatement* stmt;
+ MailDraft mail(calendarEvent->BuildCalendarMailSubject(remover), calendarEvent->BuildCalendarMailBody());
+
+ std::vector<CalendarInvite*>::iterator itr = _invites[eventId].begin();
+ while (itr != _invites[eventId].end())
{
- player->GetSession()->SendCalendarCommandResult(CALENDAR_ERROR_PERMISSIONS);
- return NULL;
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CALENDAR_INVITE);
+ stmt->setUInt64(0, (*itr)->GetInviteId());
+ trans->Append(stmt);
+
+ // guild events only? check invite status here?
+ // When an event is deleted, all invited (accepted/declined? - verify) guildies are notified via in-game mail. (wowwiki)
+ if (remover && (*itr)->GetInviteeGUID() != remover)
+ mail.SendMailTo(trans, MailReceiver((*itr)->GetInviteeGUID()), calendarEvent, MAIL_CHECK_MASK_COPIED);
+
+ delete *itr;
+ _invites[eventId].erase(itr);
}
- return calendarEvent;
+ _invites.erase(eventId);
+
+ stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CALENDAR_EVENT);
+ stmt->setUInt64(0, eventId);
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
+
+ delete calendarEvent;
+ _events.erase(calendarEvent);
}
-void CalendarMgr::AddAction(CalendarAction const& action)
+void CalendarMgr::RemoveInvite(uint64 inviteId, uint64 eventId, uint64 /*remover*/)
{
- switch (action.GetAction())
- {
- case CALENDAR_ACTION_ADD_EVENT:
- {
- if (AddEvent(action.Event) && AddInvite(action.Invite))
- {
- SendCalendarEventInviteAlert(action.Event, action.Invite);
- SendCalendarEvent(action.Event, CALENDAR_SENDTYPE_ADD);
- }
- break;
- }
- case CALENDAR_ACTION_MODIFY_EVENT:
- {
- uint64 eventId = action.Event.GetEventId();
- CalendarEvent* calendarEvent = CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_MODERATOR);
- if (!calendarEvent)
- return;
-
- calendarEvent->SetEventId(action.Event.GetEventId());
- calendarEvent->SetType(action.Event.GetType());
- calendarEvent->SetFlags(action.Event.GetFlags());
- calendarEvent->SetTime(action.Event.GetTime());
- calendarEvent->SetTimeZoneTime(action.Event.GetTimeZoneTime());
- calendarEvent->SetRepeatable(action.Event.GetRepeatable());
- calendarEvent->SetDungeonId(action.Event.GetDungeonId());
- calendarEvent->SetTitle(action.Event.GetTitle());
- calendarEvent->SetDescription(action.Event.GetDescription());
- calendarEvent->SetMaxInvites(action.Event.GetMaxInvites());
-
- CalendarInviteIdList const& invites = calendarEvent->GetInviteIdList();
- for (CalendarInviteIdList::const_iterator itr = invites.begin(); itr != invites.end(); ++itr)
- if (CalendarInvite* invite = GetInvite(*itr))
- SendCalendarEventUpdateAlert(invite->GetInvitee(), *calendarEvent, CALENDAR_SENDTYPE_ADD);
+ CalendarEvent* calendarEvent = GetEvent(eventId);
- break;
- }
- case CALENDAR_ACTION_COPY_EVENT:
- {
- CalendarEvent* calendarEvent = CheckPermisions(action.Event.GetEventId(), action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_OWNER);
-
- if (!calendarEvent)
- return;
-
- uint64 eventId = GetFreeEventId();
- CalendarEvent newEvent(eventId);
- newEvent.SetType(calendarEvent->GetType());
- newEvent.SetFlags(calendarEvent->GetFlags());
- newEvent.SetTime(action.Event.GetTime());
- newEvent.SetTimeZoneTime(calendarEvent->GetTimeZoneTime());
- newEvent.SetRepeatable(calendarEvent->GetRepeatable());
- newEvent.SetDungeonId(calendarEvent->GetDungeonId());
- newEvent.SetTitle(calendarEvent->GetTitle());
- newEvent.SetDescription(calendarEvent->GetDescription());
- newEvent.SetMaxInvites(calendarEvent->GetMaxInvites());
- newEvent.SetCreatorGUID(calendarEvent->GetCreatorGUID());
- newEvent.SetGuildId(calendarEvent->GetGuildId());
-
- CalendarInviteIdList const invites = calendarEvent->GetInviteIdList();
- for (CalendarInviteIdList::const_iterator itr = invites.begin(); itr != invites.end(); ++itr)
- {
- if (CalendarInvite* invite = GetInvite(*itr))
- {
- uint64 inviteId = GetFreeInviteId();
- CalendarInvite newInvite(inviteId);
- newInvite.SetEventId(eventId);
- newInvite.SetSenderGUID(action.GetPlayer()->GetGUID());
- newInvite.SetInvitee(invite->GetInvitee());
- newInvite.SetStatus(invite->GetStatus());
- newInvite.SetStatusTime(invite->GetStatusTime());
- newInvite.SetText(invite->GetText());
- newInvite.SetRank(invite->GetRank());
- if (AddInvite(newInvite))
- {
- SendCalendarEventInviteAlert(newEvent, newInvite);
- newEvent.AddInvite(inviteId);
- }
- }
- }
-
- if (AddEvent(newEvent))
- SendCalendarEvent(newEvent, CALENDAR_SENDTYPE_COPY);
+ if (!calendarEvent)
+ return;
+ std::vector<CalendarInvite*>::iterator itr = _invites[eventId].begin();
+ for (; itr != _invites[eventId].end(); ++itr)
+ if ((*itr)->GetInviteId() == inviteId)
break;
- }
- case CALENDAR_ACTION_REMOVE_EVENT:
- {
- uint64 eventId = action.Event.GetEventId();
- //uint32 flags = action.Event.GetFlags();
- // FIXME - Use of Flags here!
- CalendarEvent* calendarEvent = CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_OWNER);
- if (!calendarEvent)
- return;
+ if (itr == _invites[eventId].end())
+ return;
- RemoveEvent(eventId);
- break;
- }
- case CALENDAR_ACTION_ADD_EVENT_INVITE:
- {
- uint64 eventId = action.Invite.GetEventId();
- CalendarEvent* calendarEvent = CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_MODERATOR);
- if (!calendarEvent)
- return;
-
- if (AddInvite(action.Invite))
- {
- calendarEvent->AddInvite(action.Invite.GetInviteId());
- SendCalendarEventInvite(action.Invite, (!(calendarEvent->GetFlags() & CALENDAR_FLAG_INVITES_LOCKED) &&
- !action.Invite.GetStatusTime()));
- SendCalendarEventInviteAlert(*calendarEvent, action.Invite);
- }
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CALENDAR_INVITE);
+ stmt->setUInt64(0, (*itr)->GetInviteId());
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
- break;
- }
- case CALENDAR_ACTION_SIGNUP_TO_EVENT:
- {
- uint64 eventId = action.Event.GetEventId();
- CalendarEvent* calendarEvent = GetEvent(eventId);
- CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_MODERATOR);
+ if (!calendarEvent->IsGuildEvent())
+ SendCalendarEventInviteRemoveAlert((*itr)->GetInviteeGUID(), *calendarEvent, CALENDAR_STATUS_REMOVED);
- if (!calendarEvent || !(calendarEvent->GetFlags() & CALENDAR_FLAG_GUILD_ONLY)
- || !calendarEvent->GetGuildId() || calendarEvent->GetGuildId() != action.GetExtraData())
- return;
+ SendCalendarEventInviteRemove(*calendarEvent, **itr, calendarEvent->GetFlags());
- CalendarInviteStatus status = action.Invite.GetStatus();
+ // we need to find out how to use CALENDAR_INVITE_REMOVED_MAIL_SUBJECT to force client to display different mail
+ //if ((*itr)->GetInviteeGUID() != remover)
+ // MailDraft(calendarEvent->BuildCalendarMailSubject(remover), calendarEvent->BuildCalendarMailBody())
+ // .SendMailTo(trans, MailReceiver((*itr)->GetInvitee()), calendarEvent, MAIL_CHECK_MASK_COPIED);
- if (status == CALENDAR_STATUS_INVITED)
- status = CALENDAR_STATUS_CONFIRMED;
- else if (status == CALENDAR_STATUS_ACCEPTED)
- status = CALENDAR_STATUS_8;
+ delete *itr;
+ _invites[eventId].erase(itr);
+}
- CalendarInvite newInvite(GetFreeInviteId());
- newInvite.SetStatus(status);
- newInvite.SetStatusTime(uint32(time(NULL)));
- newInvite.SetEventId(eventId);
- newInvite.SetInvitee(action.GetPlayer()->GetGUID());
- newInvite.SetSenderGUID(action.GetPlayer()->GetGUID());
+void CalendarMgr::UpdateEvent(CalendarEvent* calendarEvent)
+{
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CALENDAR_EVENT);
+ stmt->setUInt64(0, calendarEvent->GetEventId());
+ stmt->setUInt32(1, GUID_LOPART(calendarEvent->GetCreatorGUID()));
+ stmt->setString(2, calendarEvent->GetTitle());
+ stmt->setString(3, calendarEvent->GetDescription());
+ stmt->setUInt8(4, calendarEvent->GetType());
+ stmt->setInt32(5, calendarEvent->GetDungeonId());
+ stmt->setUInt32(6, uint32(calendarEvent->GetEventTime()));
+ stmt->setUInt32(7, calendarEvent->GetFlags());
+ stmt->setUInt32(8, calendarEvent->GetTimeZoneTime()); // correct?
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
+}
- if (AddInvite(newInvite))
- SendCalendarEventInvite(newInvite, false);
+void CalendarMgr::UpdateInvite(CalendarInvite* invite)
+{
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CALENDAR_INVITE);
+ stmt->setUInt64(0, invite->GetInviteId());
+ stmt->setUInt64(1, invite->GetEventId());
+ stmt->setUInt32(2, GUID_LOPART(invite->GetInviteeGUID()));
+ stmt->setUInt32(3, GUID_LOPART(invite->GetSenderGUID()));
+ stmt->setUInt8(4, invite->GetStatus());
+ stmt->setUInt32(5, uint32(invite->GetStatusTime()));
+ stmt->setUInt8(6, invite->GetRank());
+ stmt->setString(7, invite->GetText());
+ trans->Append(stmt);
+ CharacterDatabase.CommitTransaction(trans);
+}
- break;
- }
- case CALENDAR_ACTION_MODIFY_EVENT_INVITE:
- {
- uint64 eventId = action.Invite.GetEventId();
- uint64 inviteId = action.Invite.GetInviteId();
+void CalendarMgr::RemoveAllPlayerEventsAndInvites(uint64 guid)
+{
+ for (CalendarEventStore::const_iterator itr = _events.begin(); itr != _events.end(); ++itr)
+ if ((*itr)->GetCreatorGUID() == guid)
+ RemoveEvent((*itr)->GetEventId(), 0); // don't send mail if removing a character
- CalendarEvent* calendarEvent = NULL;
- if (action.GetInviteId() != action.Invite.GetInviteId())
- calendarEvent = CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_MODERATOR);
- else
- calendarEvent = GetEvent(eventId);
+ std::vector<CalendarInvite*> playerInvites = GetPlayerInvites(guid);
+ for (std::vector<CalendarInvite*>::const_iterator itr = playerInvites.begin(); itr != playerInvites.end(); ++itr)
+ RemoveInvite((*itr)->GetInviteId(), (*itr)->GetEventId(), guid);
+}
- CalendarInvite* invite = GetInvite(inviteId);
+void CalendarMgr::RemovePlayerGuildEventsAndSignups(uint64 guid, uint32 guildId)
+{
+ for (CalendarEventStore::const_iterator itr = _events.begin(); itr != _events.end(); ++itr)
+ if ((*itr)->GetCreatorGUID() == guid && ((*itr)->IsGuildEvent() || (*itr)->IsGuildAnnouncement()))
+ RemoveEvent((*itr)->GetEventId(), guid);
+
+ std::vector<CalendarInvite*> playerInvites = GetPlayerInvites(guid);
+ for (std::vector<CalendarInvite*>::const_iterator itr = playerInvites.begin(); itr != playerInvites.end(); ++itr)
+ if (CalendarEvent* calendarEvent = GetEvent((*itr)->GetEventId()))
+ if (calendarEvent->IsGuildEvent() && calendarEvent->GetGuildId() == guildId)
+ RemoveInvite((*itr)->GetInviteId(), (*itr)->GetEventId(), guid);
+}
- if (!calendarEvent || !invite || !calendarEvent->HasInvite(inviteId))
- return;
+CalendarEvent* CalendarMgr::GetEvent(uint64 eventId)
+{
+ for (CalendarEventStore::const_iterator itr = _events.begin(); itr != _events.end(); ++itr)
+ if ((*itr)->GetEventId() == eventId)
+ return *itr;
- invite->SetStatus(action.Invite.GetStatus());
- SendCalendarEventStatus(invite->GetSenderGUID(), *calendarEvent, *invite);
- break;
- }
- case CALENDAR_ACTION_MODIFY_MODERATOR_EVENT_INVITE:
- {
- uint64 eventId = action.Invite.GetEventId();
- uint64 inviteId = action.Invite.GetInviteId();
+ sLog->outDebug(LOG_FILTER_CALENDAR, "CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
+ return NULL;
+}
- CalendarEvent* calendarEvent = NULL;
- if (action.GetInviteId() != action.Invite.GetInviteId())
- calendarEvent = CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_OWNER);
- else
- calendarEvent = GetEvent(eventId);
+CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId)
+{
+ for (CalendarInviteStore::const_iterator itr = _invites.begin(); itr != _invites.end(); ++itr)
+ for (std::vector<CalendarInvite*>::const_iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
+ if ((*itr2)->GetInviteId() == inviteId)
+ return *itr2;
- CalendarInvite* invite = GetInvite(inviteId);
+ sLog->outDebug(LOG_FILTER_CALENDAR, "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
+ return NULL;
+}
- if (!calendarEvent || !invite || !calendarEvent->HasInvite(inviteId))
- return;
+void CalendarMgr::FreeEventId(uint64 id)
+{
+ if (id == _maxEventId)
+ --_maxEventId;
+ else
+ _freeEventIds.push_back(id);
+}
- invite->SetStatus(action.Invite.GetStatus());
- SendCalendarEventModeratorStatusAlert(*invite);
- break;
- }
- case CALENDAR_ACTION_REMOVE_EVENT_INVITE:
- {
- uint64 eventId = action.Invite.GetEventId();
- uint64 inviteId = action.Invite.GetInviteId();
- CalendarEvent* calendarEvent = CheckPermisions(eventId, action.GetPlayer(), action.GetInviteId(), CALENDAR_RANK_MODERATOR);
- if (!calendarEvent)
- return;
-
- // already checked in CheckPermisions
- CalendarInvite* invite = GetInvite(inviteId);
- if (!invite)
- return;
-
- if (calendarEvent->GetCreatorGUID() == invite->GetInvitee())
- {
- action.GetPlayer()->GetSession()->SendCalendarCommandResult(CALENDAR_ERROR_DELETE_CREATOR_FAILED);
- return;
- }
-
- if (uint64 invitee = RemoveInvite(inviteId))
- {
- SendCalendarEventInviteRemoveAlert(invitee, *calendarEvent, CALENDAR_STATUS_9);
- SendCalendarEventInviteRemove(action.GetPlayer()->GetGUID(), action.Invite, calendarEvent->GetFlags());
- }
- break;
- }
- default:
- break;
+uint64 CalendarMgr::GetFreeEventId()
+{
+ if (_freeEventIds.empty())
+ return ++_maxEventId;
+ else
+ {
+ uint64 eventId = _freeEventIds.front();
+ _freeEventIds.pop_front();
+ return eventId;
}
+}
+void CalendarMgr::FreeInviteId(uint64 id)
+{
+ if (id == _maxInviteId)
+ --_maxInviteId;
+ else
+ _freeInviteIds.push_back(id);
}
-bool CalendarMgr::AddEvent(CalendarEvent const& newEvent)
+uint64 CalendarMgr::GetFreeInviteId()
{
- uint64 eventId = newEvent.GetEventId();
- if (_events.find(eventId) != _events.end())
+ if (_freeInviteIds.empty())
+ return ++_maxInviteId;
+ else
{
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddEvent: Event [" UI64FMTD "] exists", eventId);
- return false;
+ uint64 inviteId = _freeInviteIds.front();
+ _freeInviteIds.pop_front();
+ return inviteId;
}
+}
+
+CalendarEventStore CalendarMgr::GetPlayerEvents(uint64 guid)
+{
+ CalendarEventStore events;
+
+ for (CalendarInviteStore::const_iterator itr = _invites.begin(); itr != _invites.end(); ++itr)
+ for (std::vector<CalendarInvite*>::const_iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
+ if ((*itr2)->GetInviteeGUID() == guid)
+ events.insert(GetEvent(itr->first));
- _events[eventId] = newEvent;
- return true;
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
+ for (CalendarEventStore::const_iterator itr = _events.begin(); itr != _events.end(); ++itr)
+ if ((*itr)->GetGuildId() == player->GetGuildId())
+ events.insert(*itr);
+
+ return events;
}
-bool CalendarMgr::RemoveEvent(uint64 eventId)
+std::vector<CalendarInvite*> CalendarMgr::GetEventInvites(uint64 eventId)
{
- CalendarEventMap::iterator itr = _events.find(eventId);
- if (itr == _events.end())
- {
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::RemoveEvent: Event [" UI64FMTD "] does not exist", eventId);
- return false;
- }
+ return _invites[eventId];
+}
- bool val = true;
+std::vector<CalendarInvite*> CalendarMgr::GetPlayerInvites(uint64 guid)
+{
+ std::vector<CalendarInvite*> invites;
- CalendarInviteIdList const& invites = itr->second.GetInviteIdList();
- for (CalendarInviteIdList::const_iterator itrInvites = invites.begin(); itrInvites != invites.end(); ++itrInvites)
- {
- CalendarInvite* invite = GetInvite(*itrInvites);
- if (!invite || !RemovePlayerEvent(invite->GetInvitee(), eventId))
- val = false;
+ for (CalendarInviteStore::const_iterator itr = _invites.begin(); itr != _invites.end(); ++itr)
+ for (std::vector<CalendarInvite*>::const_iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
+ if ((*itr2)->GetInviteeGUID() == guid)
+ invites.push_back(*itr2);
- if (uint64 invitee = RemoveInvite(*itrInvites))
- SendCalendarEventRemovedAlert(invitee, itr->second);
- }
+ return invites;
+}
+
+uint32 CalendarMgr::GetPlayerNumPending(uint64 guid)
+{
+ std::vector<CalendarInvite*> const& invites = GetPlayerInvites(guid);
- _events.erase(itr);
+ uint32 pendingNum = 0;
+ for (std::vector<CalendarInvite*>::const_iterator itr = invites.begin(); itr != invites.end(); ++itr)
+ // correct?
+ if ((*itr)->GetStatus() == CALENDAR_STATUS_INVITED || (*itr)->GetStatus() == CALENDAR_STATUS_TENTATIVE || (*itr)->GetStatus() == CALENDAR_STATUS_NOT_SIGNED_UP)
+ ++pendingNum;
- return val;
+ return pendingNum;
}
-bool CalendarMgr::AddPlayerEvent(uint64 guid, uint64 eventId)
+std::string CalendarEvent::BuildCalendarMailSubject(uint64 remover) const
{
- _playerEvents[guid].insert(eventId);
- return true;
+ std::ostringstream strm;
+ strm << remover << ':' << _title;
+ return strm.str();
}
-bool CalendarMgr::RemovePlayerEvent(uint64 guid, uint64 eventId)
+std::string CalendarEvent::BuildCalendarMailBody() const
{
- _playerEvents[guid].erase(eventId);
- return true;
+ WorldPacket data;
+ uint32 time;
+ std::ostringstream strm;
+
+ // we are supposed to send PackedTime so i used WorldPacket to pack it
+ data.AppendPackedTime(_eventTime);
+ data >> time;
+ strm << time;
+ return strm.str();
}
-bool CalendarMgr::AddInvite(CalendarInvite const& newInvite)
+void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite)
{
- uint64 inviteId = newInvite.GetInviteId();
- if (!inviteId)
+ CalendarEvent* calendarEvent = GetEvent(invite.GetEventId());
+ time_t statusTime = invite.GetStatusTime();
+ bool hasStatusTime = statusTime != 946684800; // 01/01/2000 00:00:00
+
+ uint64 invitee = invite.GetInviteeGUID();
+ Player* player = ObjectAccessor::FindPlayer(invitee);
+
+ uint8 level = player ? player->getLevel() : Player::GetLevelFromDB(invitee);
+
+ WorldPacket data(SMSG_CALENDAR_EVENT_INVITE, 8 + 8 + 8 + 1 + 1 + 1 + (statusTime ? 4 : 0) + 1);
+ data.appendPackGUID(invitee);
+ data << uint64(invite.GetEventId());
+ data << uint64(invite.GetInviteId());
+ data << uint8(level);
+ data << uint8(invite.GetStatus());
+ data << uint8(hasStatusTime);
+ if (hasStatusTime)
+ data.AppendPackedTime(statusTime);
+ data << uint8(invite.GetSenderGUID() != invite.GetInviteeGUID()); // false only if the invite is sign-up
+
+ if (!calendarEvent) // Pre-invite
{
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddInvite: Cant add Invite 0");
- return false;
+ if (Player* player = ObjectAccessor::FindPlayer(invite.GetSenderGUID()))
+ player->SendDirectMessage(&data);
}
-
- if (_invites.find(inviteId) != _invites.end())
+ else
{
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddInvite: Invite [" UI64FMTD "] exists", inviteId);
- return false;
+ if (calendarEvent->GetCreatorGUID() != invite.GetInviteeGUID()) // correct?
+ SendPacketToAllEventRelatives(data, *calendarEvent);
}
-
- _invites[inviteId] = newInvite;
- uint64 guid = newInvite.GetInvitee();
- bool inviteAdded = AddPlayerInvite(guid, inviteId);
- bool eventAdded = AddPlayerEvent(guid, newInvite.GetEventId());
- return eventAdded && inviteAdded;
}
-uint64 CalendarMgr::RemoveInvite(uint64 inviteId)
+void CalendarMgr::SendCalendarEventUpdateAlert(CalendarEvent const& calendarEvent, time_t oldEventTime)
{
- CalendarInviteMap::iterator itr = _invites.find(inviteId);
- if (itr == _invites.end())
- {
- sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::RemoveInvite: Invite [" UI64FMTD "] does not exist", inviteId);
- return 0;
- }
-
- uint64 invitee = itr->second.GetInvitee();
- _invites.erase(itr);
-
- return RemovePlayerInvite(invitee, inviteId) ? invitee : 0;
+ WorldPacket data(SMSG_CALENDAR_EVENT_UPDATED_ALERT, 1 + 8 + 4 + 4 + 4 + 1 + 4 +
+ calendarEvent.GetTitle().size() + calendarEvent.GetDescription().size() + 1 + 4 + 4);
+ data << uint8(1); // unk
+ data << uint64(calendarEvent.GetEventId());
+ data.AppendPackedTime(oldEventTime);
+ data << uint32(calendarEvent.GetFlags());
+ data.AppendPackedTime(calendarEvent.GetEventTime());
+ data << uint8(calendarEvent.GetType());
+ data << int32(calendarEvent.GetDungeonId());
+ data << calendarEvent.GetTitle();
+ data << calendarEvent.GetDescription();
+ data << uint8(CALENDAR_REPEAT_NEVER); // repeatable
+ data << uint32(CALENDAR_MAX_INVITES);
+ data << uint32(0); // unk
+
+ SendPacketToAllEventRelatives(data, calendarEvent);
}
-bool CalendarMgr::AddPlayerInvite(uint64 guid, uint64 inviteId)
+void CalendarMgr::SendCalendarEventStatus(CalendarEvent const& calendarEvent, CalendarInvite const& invite)
{
- _playerInvites[guid].insert(inviteId);
- return true;
+ WorldPacket data(SMSG_CALENDAR_EVENT_STATUS, 8 + 8 + 4 + 4 + 1 + 1 + 4);
+ data.appendPackGUID(invite.GetInviteeGUID());
+ data << uint64(calendarEvent.GetEventId());
+ data.AppendPackedTime(calendarEvent.GetEventTime());
+ data << uint32(calendarEvent.GetFlags());
+ data << uint8(invite.GetStatus());
+ data << uint8(invite.GetRank());
+ data.AppendPackedTime(invite.GetStatusTime());
+
+ SendPacketToAllEventRelatives(data, calendarEvent);
}
-bool CalendarMgr::RemovePlayerInvite(uint64 guid, uint64 inviteId)
+void CalendarMgr::SendCalendarEventRemovedAlert(CalendarEvent const& calendarEvent)
{
- _playerInvites[guid].erase(inviteId);
- return true;
+ WorldPacket data(SMSG_CALENDAR_EVENT_REMOVED_ALERT, 1 + 8 + 1);
+ data << uint8(1); // FIXME: If true does not SignalEvent(EVENT_CALENDAR_ACTION_PENDING)
+ data << uint64(calendarEvent.GetEventId());
+ data.AppendPackedTime(calendarEvent.GetEventTime());
+
+ SendPacketToAllEventRelatives(data, calendarEvent);
}
-void CalendarMgr::SendCalendarEvent(CalendarEvent const& calendarEvent, CalendarSendEventType type)
+void CalendarMgr::SendCalendarEventInviteRemove(CalendarEvent const& calendarEvent, CalendarInvite const& invite, uint32 flags)
{
- if (Player* player = ObjectAccessor::FindPlayer(calendarEvent.GetCreatorGUID()))
- player->GetSession()->SendCalendarEvent(calendarEvent, type);
+ WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_REMOVED, 8 + 4 + 4 + 1);
+ data.appendPackGUID(invite.GetInviteeGUID());
+ data << uint64(invite.GetEventId());
+ data << uint32(flags);
+ data << uint8(1); // FIXME
+
+ SendPacketToAllEventRelatives(data, calendarEvent);
}
-void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite, bool pending)
+void CalendarMgr::SendCalendarEventModeratorStatusAlert(CalendarEvent const& calendarEvent, CalendarInvite const& invite)
{
- if (Player* player = ObjectAccessor::FindPlayer(invite.GetSenderGUID()))
- player->GetSession()->SendCalendarEventInvite(invite, pending);
+ WorldPacket data(SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT, 8 + 8 + 1 + 1);
+ data.appendPackGUID(invite.GetInviteeGUID());
+ data << uint64(invite.GetEventId());
+ data << uint8(invite.GetRank());
+ data << uint8(1); // Unk boolean - Display to client?
+
+ SendPacketToAllEventRelatives(data, calendarEvent);
}
void CalendarMgr::SendCalendarEventInviteAlert(CalendarEvent const& calendarEvent, CalendarInvite const& invite)
{
- if (Player* player = ObjectAccessor::FindPlayer(invite.GetInvitee()))
- player->GetSession()->SendCalendarEventInviteAlert(calendarEvent, invite);
+ WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_ALERT);
+ data << uint64(calendarEvent.GetEventId());
+ data << calendarEvent.GetTitle();
+ data.AppendPackedTime(calendarEvent.GetEventTime());
+ data << uint32(calendarEvent.GetFlags());
+ data << uint32(calendarEvent.GetType());
+ data << int32(calendarEvent.GetDungeonId());
+ data << uint64(invite.GetInviteId());
+ data << uint8(invite.GetStatus());
+ data << uint8(invite.GetRank());
+ data.appendPackGUID(calendarEvent.GetCreatorGUID());
+ data.appendPackGUID(invite.GetSenderGUID());
+
+ if (calendarEvent.IsGuildEvent() || calendarEvent.IsGuildAnnouncement())
+ {
+ if (Guild* guild = sGuildMgr->GetGuildById(calendarEvent.GetGuildId()))
+ guild->BroadcastPacket(&data);
+ }
+ else
+ if (Player* player = ObjectAccessor::FindPlayer(invite.GetInviteeGUID()))
+ player->SendDirectMessage(&data);
}
-void CalendarMgr::SendCalendarEventUpdateAlert(uint64 guid, CalendarEvent const& calendarEvent, CalendarSendEventType type)
+void CalendarMgr::SendCalendarEvent(uint64 guid, CalendarEvent const& calendarEvent, CalendarSendEventType sendType)
{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
- player->GetSession()->SendCalendarEventUpdateAlert(calendarEvent, type);
-}
+ Player* player = ObjectAccessor::FindPlayer(guid);
+ if (!player)
+ return;
+
+ std::vector<CalendarInvite*> const& eventInviteeList = _invites[calendarEvent.GetEventId()];
+
+ WorldPacket data(SMSG_CALENDAR_SEND_EVENT, 60 + eventInviteeList.size() * 32);
+ data << uint8(sendType);
+ data.appendPackGUID(calendarEvent.GetCreatorGUID());
+ data << uint64(calendarEvent.GetEventId());
+ data << calendarEvent.GetTitle();
+ data << calendarEvent.GetDescription();
+ data << uint8(calendarEvent.GetType());
+ data << uint8(CALENDAR_REPEAT_NEVER); // repeatable
+ data << uint32(CALENDAR_MAX_INVITES);
+ data << int32(calendarEvent.GetDungeonId());
+ data << uint32(calendarEvent.GetFlags());
+ data.AppendPackedTime(calendarEvent.GetEventTime());
+ data.AppendPackedTime(calendarEvent.GetTimeZoneTime());
+ data << uint32(calendarEvent.GetGuildId());
+
+ data << uint32(eventInviteeList.size());
+ for (std::vector<CalendarInvite*>::const_iterator itr = eventInviteeList.begin(); itr != eventInviteeList.end(); ++itr)
+ {
+ CalendarInvite const* calendarInvite = (*itr);
+ uint64 inviteeGuid = calendarInvite->GetInviteeGUID();
+ Player* invitee = ObjectAccessor::FindPlayer(inviteeGuid);
+
+ uint8 inviteeLevel = invitee ? invitee->getLevel() : Player::GetLevelFromDB(inviteeGuid);
+ uint32 inviteeGuildId = invitee ? invitee->GetGuildId() : Player::GetGuildIdFromDB(inviteeGuid);
+
+ data.appendPackGUID(inviteeGuid);
+ data << uint8(inviteeLevel);
+ data << uint8(calendarInvite->GetStatus());
+ data << uint8(calendarInvite->GetRank());
+ data << uint8(calendarEvent.IsGuildEvent() && calendarEvent.GetGuildId() == inviteeGuildId);
+ data << uint64(calendarInvite->GetInviteId());
+ data.AppendPackedTime(calendarInvite->GetStatusTime());
+ data << calendarInvite->GetText();
+ }
-void CalendarMgr::SendCalendarEventStatus(uint64 guid, CalendarEvent const& calendarEvent, CalendarInvite const& invite)
-{
- if (Player* player = ObjectAccessor::FindPlayer(guid))
- player->GetSession()->SendCalendarEventStatus(calendarEvent, invite);
+ player->SendDirectMessage(&data);
}
-void CalendarMgr::SendCalendarEventRemovedAlert(uint64 guid, CalendarEvent const& calendarEvent)
+void CalendarMgr::SendCalendarEventInviteRemoveAlert(uint64 guid, CalendarEvent const& calendarEvent, CalendarInviteStatus status)
{
if (Player* player = ObjectAccessor::FindPlayer(guid))
- player->GetSession()->SendCalendarEventRemovedAlert(calendarEvent);
+ {
+ WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT, 8 + 4 + 4 + 1);
+ data << uint64(calendarEvent.GetEventId());
+ data.AppendPackedTime(calendarEvent.GetEventTime());
+ data << uint32(calendarEvent.GetFlags());
+ data << uint8(status);
+
+ player->SendDirectMessage(&data);
+ }
}
-void CalendarMgr::SendCalendarEventInviteRemoveAlert(uint64 guid, CalendarEvent const& calendarEvent, CalendarInviteStatus status)
+void CalendarMgr::SendCalendarClearPendingAction(uint64 guid)
{
if (Player* player = ObjectAccessor::FindPlayer(guid))
- player->GetSession()->SendCalendarEventInviteRemoveAlert(calendarEvent, status);
+ {
+ WorldPacket data(SMSG_CALENDAR_CLEAR_PENDING_ACTION, 0);
+ player->SendDirectMessage(&data);
+ }
}
-void CalendarMgr::SendCalendarEventInviteRemove(uint64 guid, CalendarInvite const& invite, uint32 flags)
+void CalendarMgr::SendCalendarCommandResult(uint64 guid, CalendarError err, char const* param /*= NULL*/)
{
if (Player* player = ObjectAccessor::FindPlayer(guid))
- player->GetSession()->SendCalendarEventInviteRemove(invite, flags);
+ {
+ WorldPacket data(SMSG_CALENDAR_COMMAND_RESULT, 0);
+ data << uint32(0);
+ data << uint8(0);
+ switch (err)
+ {
+ case CALENDAR_ERROR_OTHER_INVITES_EXCEEDED:
+ case CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S:
+ case CALENDAR_ERROR_IGNORING_YOU_S:
+ data << param;
+ break;
+ default:
+ data << uint8(0);
+ break;
+ }
+
+ data << uint32(err);
+
+ player->SendDirectMessage(&data);
+ }
}
-void CalendarMgr::SendCalendarEventModeratorStatusAlert(CalendarInvite const& invite)
+void CalendarMgr::SendPacketToAllEventRelatives(WorldPacket packet, CalendarEvent const& calendarEvent)
{
- if (Player* player = ObjectAccessor::FindPlayer(invite.GetInvitee()))
- player->GetSession()->SendCalendarEventModeratorStatusAlert(invite);
+ // Send packet to all guild members
+ if (calendarEvent.IsGuildEvent() || calendarEvent.IsGuildAnnouncement())
+ if (Guild* guild = sGuildMgr->GetGuildById(calendarEvent.GetGuildId()))
+ guild->BroadcastPacket(&packet);
+
+ // Send packet to all invitees if event is non-guild, in other case only to non-guild invitees (packet was broadcasted for them)
+ std::vector<CalendarInvite*> invites = _invites[calendarEvent.GetEventId()];
+ for (std::vector<CalendarInvite*>::iterator itr = invites.begin(); itr != invites.end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer((*itr)->GetInviteeGUID()))
+ if (!calendarEvent.IsGuildEvent() || (calendarEvent.IsGuildEvent() && player->GetGuildId() != calendarEvent.GetGuildId()))
+ player->SendDirectMessage(&packet);
}
diff --git a/src/server/game/Calendar/CalendarMgr.h b/src/server/game/Calendar/CalendarMgr.h
index a8749778cb3..db6acb667ec 100644
--- a/src/server/game/Calendar/CalendarMgr.h
+++ b/src/server/game/Calendar/CalendarMgr.h
@@ -19,60 +19,311 @@
#define TRINITY_CALENDARMGR_H
#include <ace/Singleton.h>
-#include "Calendar.h"
+#include "Common.h"
+#include "WorldPacket.h"
+
+enum CalendarMailAnswers
+{
+ // else
+ CALENDAR_EVENT_REMOVED_MAIL_SUBJECT = 0,
+ // if ( *(_DWORD *)(a1 + 8292) & 0x100 )
+ CALENDAR_INVITE_REMOVED_MAIL_SUBJECT = 0x100
+};
+
+enum CalendarFlags
+{
+ CALENDAR_FLAG_ALL_ALLOWED = 0x001,
+ CALENDAR_FLAG_INVITES_LOCKED = 0x010,
+ CALENDAR_FLAG_WITHOUT_INVITES = 0x040,
+ CALENDAR_FLAG_GUILD_EVENT = 0x400
+};
+
+enum CalendarModerationRank
+{
+ CALENDAR_RANK_PLAYER = 0,
+ CALENDAR_RANK_MODERATOR = 1,
+ CALENDAR_RANK_OWNER = 2
+};
+
+enum CalendarSendEventType
+{
+ CALENDAR_SENDTYPE_GET = 0,
+ CALENDAR_SENDTYPE_ADD = 1,
+ CALENDAR_SENDTYPE_COPY = 2
+};
+
+enum CalendarEventType
+{
+ CALENDAR_TYPE_RAID = 0,
+ CALENDAR_TYPE_DUNGEON = 1,
+ CALENDAR_TYPE_PVP = 2,
+ CALENDAR_TYPE_MEETING = 3,
+ CALENDAR_TYPE_OTHER = 4
+};
+
+enum CalendarRepeatType
+{
+ CALENDAR_REPEAT_NEVER = 0,
+ CALENDAR_REPEAT_WEEKLY = 1,
+ CALENDAR_REPEAT_BIWEEKLY = 2,
+ CALENDAR_REPEAT_MONTHLY = 3
+};
+
+enum CalendarInviteStatus
+{
+ CALENDAR_STATUS_INVITED = 0,
+ CALENDAR_STATUS_ACCEPTED = 1,
+ CALENDAR_STATUS_DECLINED = 2,
+ CALENDAR_STATUS_CONFIRMED = 3,
+ CALENDAR_STATUS_OUT = 4,
+ CALENDAR_STATUS_STANDBY = 5,
+ CALENDAR_STATUS_SIGNED_UP = 6,
+ CALENDAR_STATUS_NOT_SIGNED_UP = 7,
+ CALENDAR_STATUS_TENTATIVE = 8,
+ CALENDAR_STATUS_REMOVED = 9 // correct name?
+};
+
+enum CalendarError
+{
+ CALENDAR_OK = 0,
+ CALENDAR_ERROR_GUILD_EVENTS_EXCEEDED = 1,
+ CALENDAR_ERROR_EVENTS_EXCEEDED = 2,
+ CALENDAR_ERROR_SELF_INVITES_EXCEEDED = 3,
+ CALENDAR_ERROR_OTHER_INVITES_EXCEEDED = 4,
+ CALENDAR_ERROR_PERMISSIONS = 5,
+ CALENDAR_ERROR_EVENT_INVALID = 6,
+ CALENDAR_ERROR_NOT_INVITED = 7,
+ CALENDAR_ERROR_INTERNAL = 8,
+ CALENDAR_ERROR_GUILD_PLAYER_NOT_IN_GUILD = 9,
+ CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S = 10,
+ CALENDAR_ERROR_PLAYER_NOT_FOUND = 11,
+ CALENDAR_ERROR_NOT_ALLIED = 12,
+ CALENDAR_ERROR_IGNORING_YOU_S = 13,
+ CALENDAR_ERROR_INVITES_EXCEEDED = 14,
+ CALENDAR_ERROR_INVALID_DATE = 16,
+ CALENDAR_ERROR_INVALID_TIME = 17,
+
+ CALENDAR_ERROR_NEEDS_TITLE = 19,
+ CALENDAR_ERROR_EVENT_PASSED = 20,
+ CALENDAR_ERROR_EVENT_LOCKED = 21,
+ CALENDAR_ERROR_DELETE_CREATOR_FAILED = 22,
+ CALENDAR_ERROR_SYSTEM_DISABLED = 24,
+ CALENDAR_ERROR_RESTRICTED_ACCOUNT = 25,
+ CALENDAR_ERROR_ARENA_EVENTS_EXCEEDED = 26,
+ CALENDAR_ERROR_RESTRICTED_LEVEL = 27,
+ CALENDAR_ERROR_USER_SQUELCHED = 28,
+ CALENDAR_ERROR_NO_INVITE = 29,
+
+ CALENDAR_ERROR_EVENT_WRONG_SERVER = 36,
+ CALENDAR_ERROR_INVITE_WRONG_SERVER = 37,
+ CALENDAR_ERROR_NO_GUILD_INVITES = 38,
+ CALENDAR_ERROR_INVALID_SIGNUP = 39,
+ CALENDAR_ERROR_NO_MODERATOR = 40
+};
+
+#define CALENDAR_MAX_EVENTS 30
+#define CALENDAR_MAX_GUILD_EVENTS 100
+#define CALENDAR_MAX_INVITES 100
+
+struct CalendarInvite
+{
+ public:
+ CalendarInvite(CalendarInvite const& calendarInvite, uint64 inviteId, uint64 eventId)
+ {
+ _inviteId = inviteId;
+ _eventId = eventId;
+ _invitee = calendarInvite.GetInviteeGUID();
+ _senderGUID = calendarInvite.GetSenderGUID();
+ _statusTime = calendarInvite.GetStatusTime();
+ _status = calendarInvite.GetStatus();
+ _rank = calendarInvite.GetRank();
+ _text = calendarInvite.GetText();
+ }
+
+ CalendarInvite() : _inviteId(1), _eventId(0), _invitee(0), _senderGUID(0), _statusTime(time(NULL)),
+ _status(CALENDAR_STATUS_INVITED), _rank(CALENDAR_RANK_PLAYER), _text("") { }
+
+ CalendarInvite(uint64 inviteId, uint64 eventId, uint64 invitee, uint64 senderGUID, time_t statusTime,
+ CalendarInviteStatus status, CalendarModerationRank rank, std::string text) :
+ _inviteId(inviteId), _eventId(eventId), _invitee(invitee), _senderGUID(senderGUID), _statusTime(statusTime),
+ _status(status), _rank(rank), _text(text) { }
+
+ ~CalendarInvite();
+
+ void SetInviteId(uint64 inviteId) { _inviteId = inviteId; }
+ uint64 GetInviteId() const { return _inviteId; }
+
+ void SetEventId(uint64 eventId) { _eventId = eventId; }
+ uint64 GetEventId() const { return _eventId; }
+
+ void SetSenderGUID(uint64 guid) { _senderGUID = guid; }
+ uint64 GetSenderGUID() const { return _senderGUID; }
+
+ void SetInvitee(uint64 guid) { _invitee = guid; }
+ uint64 GetInviteeGUID() const { return _invitee; }
+
+ void SetStatusTime(time_t statusTime) { _statusTime = statusTime; }
+ time_t GetStatusTime() const { return _statusTime; }
+
+ void SetText(std::string text) { _text = text; }
+ std::string GetText() const { return _text; }
+
+ void SetStatus(CalendarInviteStatus status) { _status = status; }
+ CalendarInviteStatus GetStatus() const { return _status; }
+
+ void SetRank(CalendarModerationRank rank) { _rank = rank; }
+ CalendarModerationRank GetRank() const { return _rank; }
+
+ private:
+ uint64 _inviteId;
+ uint64 _eventId;
+ uint64 _invitee;
+ uint64 _senderGUID;
+ time_t _statusTime;
+ CalendarInviteStatus _status;
+ CalendarModerationRank _rank;
+ std::string _text;
+};
+
+struct CalendarEvent
+{
+ public:
+ CalendarEvent(CalendarEvent const& calendarEvent, uint64 eventId)
+ {
+ _eventId = eventId;
+ _creatorGUID = calendarEvent.GetCreatorGUID();
+ _guildId = calendarEvent.GetGuildId();
+ _type = calendarEvent.GetType();
+ _dungeonId = calendarEvent.GetDungeonId();
+ _eventTime = calendarEvent.GetEventTime();
+ _flags = calendarEvent.GetFlags();
+ _timezoneTime = calendarEvent.GetTimeZoneTime();
+ _title = calendarEvent.GetTitle();
+ _description = calendarEvent.GetDescription();
+ }
+
+ CalendarEvent(uint64 eventId, uint64 creatorGUID, uint32 guildId, CalendarEventType type, int32 dungeonId,
+ time_t eventTime, uint32 flags, time_t timezoneTime, std::string title, std::string description) :
+ _eventId(eventId), _creatorGUID(creatorGUID), _guildId(guildId), _type(type), _dungeonId(dungeonId),
+ _eventTime(eventTime), _flags(flags), _timezoneTime(timezoneTime), _title(title),
+ _description(description) { }
+
+ CalendarEvent() : _eventId(1), _creatorGUID(0), _guildId(0), _type(CALENDAR_TYPE_OTHER), _dungeonId(-1), _eventTime(0),
+ _flags(0), _timezoneTime(0), _title(""), _description("") { }
+
+ ~CalendarEvent();
+
+ void SetEventId(uint64 eventId) { _eventId = eventId; }
+ uint64 GetEventId() const { return _eventId; }
+
+ void SetCreatorGUID(uint64 guid) { _creatorGUID = guid; }
+ uint64 GetCreatorGUID() const { return _creatorGUID; }
+
+ void SetGuildId(uint32 guildId) { _guildId = guildId; }
+ uint32 GetGuildId() const { return _guildId; }
+
+ void SetTitle(std::string title) { _title = title; }
+ std::string GetTitle() const { return _title; }
+
+ void SetDescription(std::string description) { _description = description; }
+ std::string GetDescription() const { return _description; }
+
+ void SetType(CalendarEventType type) { _type = type; }
+ CalendarEventType GetType() const { return _type; }
+
+ void SetDungeonId(int32 dungeonId) { _dungeonId = dungeonId; }
+ int32 GetDungeonId() const { return _dungeonId; }
+
+ void SetEventTime(time_t eventTime) { _eventTime = eventTime; }
+ time_t GetEventTime() const { return _eventTime; }
+
+ void SetFlags(uint32 flags) { _flags = flags; }
+ uint32 GetFlags() const { return _flags; }
+
+ void SetTimeZoneTime(time_t timezoneTime) { _timezoneTime = timezoneTime; }
+ time_t GetTimeZoneTime() const { return _timezoneTime; }
+
+ bool IsGuildEvent() const { return _flags & CALENDAR_FLAG_GUILD_EVENT; }
+ bool IsGuildAnnouncement() const { return _flags & CALENDAR_FLAG_WITHOUT_INVITES; }
+
+ std::string BuildCalendarMailSubject(uint64 remover) const;
+ std::string BuildCalendarMailBody() const;
+
+ private:
+ uint64 _eventId;
+ uint64 _creatorGUID;
+ uint32 _guildId;
+ CalendarEventType _type;
+ int32 _dungeonId;
+ time_t _eventTime;
+ uint32 _flags;
+ time_t _timezoneTime;
+ std::string _title;
+ std::string _description;
+};
+
+typedef std::set<CalendarEvent*> CalendarEventStore;
+typedef std::map<uint64 /* eventId */, std::vector<CalendarInvite*> > CalendarInviteStore;
class CalendarMgr
{
- friend class ACE_Singleton<CalendarMgr, ACE_Null_Mutex>;
+ friend class ACE_Singleton<CalendarMgr, ACE_Null_Mutex>;
+ private:
CalendarMgr();
~CalendarMgr();
+ CalendarEventStore _events;
+ CalendarInviteStore _invites;
+
+ std::deque<uint64> _freeEventIds;
+ std::deque<uint64> _freeInviteIds;
+ uint64 _maxEventId;
+ uint64 _maxInviteId;
+
public:
void LoadFromDB();
- CalendarInvite* GetInvite(uint64 inviteId);
CalendarEvent* GetEvent(uint64 eventId);
+ CalendarEventStore const& GetEvents() const { return _events; }
+ CalendarEventStore GetPlayerEvents(uint64 guid);
- CalendarInviteIdList const& GetPlayerInvites(uint64 guid);
- CalendarEventIdList const& GetPlayerEvents(uint64 guid);
+ CalendarInvite* GetInvite(uint64 inviteId);
+ CalendarInviteStore const& GetInvites() const { return _invites; }
+ std::vector<CalendarInvite*> GetEventInvites(uint64 eventId);
+ std::vector<CalendarInvite*> GetPlayerInvites(uint64 guid);
- uint32 GetPlayerNumPending(uint64 guid);
+ void FreeEventId(uint64 id);
uint64 GetFreeEventId();
+ void FreeInviteId(uint64 id);
uint64 GetFreeInviteId();
- void AddAction(CalendarAction const& action);
-
- void SendCalendarEvent(CalendarEvent const& calendarEvent, CalendarSendEventType type);
- void SendCalendarEventInvite(CalendarInvite const& invite, bool pending);
- void SendCalendarEventInviteAlert(CalendarEvent const& calendarEvent, CalendarInvite const& invite);
- void SendCalendarEventInviteRemove(uint64 guid, CalendarInvite const& invite, uint32 flags);
- void SendCalendarEventInviteRemoveAlert(uint64 guid, CalendarEvent const& calendarEvent, CalendarInviteStatus status);
- void SendCalendarEventUpdateAlert(uint64 guid, CalendarEvent const& calendarEvent, CalendarSendEventType type);
- void SendCalendarEventStatus(uint64 guid, CalendarEvent const& calendarEvent, CalendarInvite const& invite);
- void SendCalendarEventRemovedAlert(uint64 guid, CalendarEvent const& calendarEvent);
- void SendCalendarEventModeratorStatusAlert(CalendarInvite const& invite);
+ uint32 GetPlayerNumPending(uint64 guid);
- private:
- CalendarEvent* CheckPermisions(uint64 eventId, Player* player, uint64 inviteId, CalendarModerationRank minRank);
+ void AddEvent(CalendarEvent* calendarEvent, CalendarSendEventType sendType);
+ void RemoveEvent(uint64 eventId, uint64 remover);
+ void UpdateEvent(CalendarEvent* calendarEvent);
- bool AddEvent(CalendarEvent const& calendarEvent);
- bool RemoveEvent(uint64 eventId);
- bool AddPlayerEvent(uint64 guid, uint64 eventId);
- bool RemovePlayerEvent(uint64 guid, uint64 eventId);
+ void AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite);
+ void RemoveInvite(uint64 inviteId, uint64 eventId, uint64 remover);
+ void UpdateInvite(CalendarInvite* invite);
- bool AddInvite(CalendarInvite const& invite);
- uint64 RemoveInvite(uint64 inviteId);
- bool AddPlayerInvite(uint64 guid, uint64 inviteId);
- bool RemovePlayerInvite(uint64 guid, uint64 inviteId);
+ void RemoveAllPlayerEventsAndInvites(uint64 guid);
+ void RemovePlayerGuildEventsAndSignups(uint64 guid, uint32 guildId);
- CalendarEventMap _events;
- CalendarInviteMap _invites;
- CalendarPlayerInviteIdMap _playerInvites;
- CalendarPlayerEventIdMap _playerEvents;
+ void SendCalendarEvent(uint64 guid, CalendarEvent const& calendarEvent, CalendarSendEventType sendType);
+ void SendCalendarEventInvite(CalendarInvite const& invite);
+ void SendCalendarEventInviteAlert(CalendarEvent const& calendarEvent, CalendarInvite const& invite);
+ void SendCalendarEventInviteRemove(CalendarEvent const& calendarEvent, CalendarInvite const& invite, uint32 flags);
+ void SendCalendarEventInviteRemoveAlert(uint64 guid, CalendarEvent const& calendarEvent, CalendarInviteStatus status);
+ void SendCalendarEventUpdateAlert(CalendarEvent const& calendarEvent, time_t oldEventTime);
+ void SendCalendarEventStatus(CalendarEvent const& calendarEvent, CalendarInvite const& invite);
+ void SendCalendarEventRemovedAlert(CalendarEvent const& calendarEvent);
+ void SendCalendarEventModeratorStatusAlert(CalendarEvent const& calendarEvent, CalendarInvite const& invite);
+ void SendCalendarClearPendingAction(uint64 guid);
+ void SendCalendarCommandResult(uint64 guid, CalendarError err, char const* param = NULL);
- uint64 _eventNum;
- uint64 _inviteNum;
+ void SendPacketToAllEventRelatives(WorldPacket packet, CalendarEvent const& calendarEvent);
};
#define sCalendarMgr ACE_Singleton<CalendarMgr, ACE_Null_Mutex>::instance()
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 66f964fb4cf..3ccab6e5c6c 100755
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -23,6 +23,7 @@
#include "World.h"
#include "DatabaseEnv.h"
#include "AccountMgr.h"
+#include "Player.h"
Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) : m_announce(true),
m_ownership(true), m_name(name), m_password(""), m_flags(0), m_channelId(channel_id),
@@ -385,7 +386,7 @@ void Channel::Password(uint64 p, const char *pass)
if (player)
sec = player->GetSession()->GetSecurity();
- ChatHandler chat(player);
+ ChatHandler chat(player->GetSession());
if (!IsOn(p))
{
diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h
index bd82a7cfc90..5f6be0e36de 100755
--- a/src/server/game/Chat/Channels/Channel.h
+++ b/src/server/game/Chat/Channels/Channel.h
@@ -26,9 +26,10 @@
#include "Common.h"
#include "Opcodes.h"
-#include "Player.h"
#include "WorldPacket.h"
+class Player;
+
enum ChatNotify
{
CHAT_JOINED_NOTICE = 0x00, //+ "%s joined channel.";
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index 78b71744e0e..66111e5a6db 100755
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -17,7 +17,7 @@
*/
#include "ChannelMgr.h"
-
+#include "Player.h"
#include "World.h"
ChannelMgr::~ChannelMgr()
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 4571f261587..8e2bc1fcc7a 100755
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -1182,6 +1182,11 @@ int ChatHandler::GetSessionDbLocaleIndex() const
return m_session->GetSessionDbLocaleIndex();
}
+std::string ChatHandler::GetNameLink(Player* chr) const
+{
+ return playerLink(chr->GetName());
+}
+
const char *CliHandler::GetTrinityString(int32 entry) const
{
return sObjectMgr->GetTrinityStringForDBCLocale(entry);
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index 0597ab216ec..167e6ca79d5 100644
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -20,16 +20,18 @@
#define TRINITYCORE_CHAT_H
#include "SharedDefines.h"
-#include "Player.h"
+#include "WorldSession.h"
#include <vector>
class ChatHandler;
-class WorldSession;
-class WorldObject;
class Creature;
+class Group;
class Player;
class Unit;
+class WorldSession;
+class WorldObject;
+
struct GameTele;
class ChatCommand
@@ -48,7 +50,6 @@ class ChatHandler
public:
WorldSession* GetSession() { return m_session; }
explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) {}
- explicit ChatHandler(Player* player) : m_session(player->GetSession()), sentErrorMessage(false) {}
virtual ~ChatHandler() {}
static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker, const char* addonPrefix = NULL);
@@ -115,7 +116,7 @@ class ChatHandler
bool extractPlayerTarget(char* args, Player** player, uint64* player_guid = NULL, std::string* player_name = NULL);
std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:"+name+"|h["+name+"]|h|r" : name; }
- std::string GetNameLink(Player const* chr) const { return playerLink(chr->GetName()); }
+ std::string GetNameLink(Player* chr) const;
GameObject* GetNearbyGameObject();
GameObject* GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid, uint32 entry);
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index 7d5078a751e..8c2a3a22a70 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -19,6 +19,8 @@
#include "SpellMgr.h"
#include "ObjectMgr.h"
#include "SpellInfo.h"
+#include "DBCStores.h"
+#include "AchievementMgr.h"
// Supported shift-links (client generated and server side)
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index a640fae92d4..6c499645e39 100755
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -21,6 +21,7 @@
#include "OutdoorPvP.h"
#include "SpellMgr.h"
#include "VMapManager2.h"
+#include "Player.h"
namespace DisableMgr
{
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index 43b29c600d6..a6b51a4d395 100755
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -21,6 +21,8 @@
#include "CreatureAI.h"
#include "ObjectMgr.h"
#include "TemporarySummon.h"
+#include "Pet.h"
+#include "Player.h"
TempSummon::TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) :
Creature(isWorldObject), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN),
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index db563c712cd..73b38c1da83 100755
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -23,6 +23,7 @@
#include "Bag.h"
#include "Log.h"
#include "UpdateData.h"
+#include "Player.h"
Bag::Bag(): Item()
{
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 0c77402bf49..f01953a5441 100755
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -26,6 +26,7 @@
#include "SpellInfo.h"
#include "ScriptMgr.h"
#include "ConditionMgr.h"
+#include "Player.h"
void AddItemsSetItem(Player* player, Item* item)
{
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index 5b427c48a4b..12bd99a3637 100755
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -25,6 +25,7 @@
#include <list>
#include <vector>
#include "Util.h"
+#include "DBCStores.h"
struct EnchStoreItem
{
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index e3ea4f77344..6da9bde6d16 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1996,7 +1996,7 @@ bool WorldObject::CanDetect(WorldObject const* obj, bool ignoreStealth) const
if (obj->IsAlwaysDetectableFor(seer))
return true;
- if (!seer->CanDetectInvisibilityOf(obj))
+ if (!ignoreStealth && !seer->CanDetectInvisibilityOf(obj))
return false;
if (!ignoreStealth && !seer->CanDetectStealthOf(obj))
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index 6e00fcbfe83..e7ecadae2f1 100755
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
@@ -78,26 +78,6 @@ enum PetTalk
PET_TALK_ATTACK = 1
};
-enum PetNameInvalidReason
-{
- // custom, not send
- PET_NAME_SUCCESS = 0,
-
- PET_NAME_INVALID = 1,
- PET_NAME_NO_NAME = 2,
- PET_NAME_TOO_SHORT = 3,
- PET_NAME_TOO_LONG = 4,
- PET_NAME_MIXED_LANGUAGES = 6,
- PET_NAME_PROFANE = 7,
- PET_NAME_RESERVED = 8,
- PET_NAME_THREE_CONSECUTIVE = 11,
- PET_NAME_INVALID_SPACE = 12,
- PET_NAME_CONSECUTIVE_SPACES = 13,
- PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14,
- PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15,
- PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
-};
-
typedef UNORDERED_MAP<uint32, PetSpell> PetSpellMap;
typedef std::vector<uint32> AutoSpellList;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 5e2fdae9c2c..d92e848e5d4 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -7220,7 +7220,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto
int32 count = sWorld->getIntConfig(CONFIG_PVP_TOKEN_COUNT);
if (AddItem(itemId, count))
- ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player.");
+ ChatHandler(GetSession()).PSendSysMessage("You have been awarded a token for slaying another player.");
}
}
@@ -20144,17 +20144,17 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
GetSession()->SendPacket(&data);
}
else // announce to player that player he is whispering to is dnd and cannot receive his message
- ChatHandler(this).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str());
+ ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str());
if (!isAcceptWhispers() && !isGameMaster() && !rPlayer->isGameMaster())
{
SetAcceptWhispers(true);
- ChatHandler(this).SendSysMessage(LANG_COMMAND_WHISPERON);
+ ChatHandler(GetSession()).SendSysMessage(LANG_COMMAND_WHISPERON);
}
// announce to player that player he is whispering to is afk
if (rPlayer->isAFK())
- ChatHandler(this).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str());
+ ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str());
// if player whisper someone, auto turn of dnd to be able to receive an answer
if (isDND() && !rPlayer->isGameMaster())
@@ -25726,7 +25726,7 @@ bool Player::AddItem(uint32 itemId, uint32 count)
if (count == 0 || dest.empty())
{
// -- TODO: Send to mailbox if no space
- ChatHandler(this).PSendSysMessage("You don't have any space in your bags.");
+ ChatHandler(GetSession()).PSendSysMessage("You don't have any space in your bags.");
return false;
}
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 18cc95444c0..b5c397057f4 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -21,29 +21,24 @@
#include <bitset>
#include "AchievementMgr.h"
-#include "Battleground.h"
-#include "Bag.h"
#include "Common.h"
#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "GroupReference.h"
-#include "ItemPrototype.h"
#include "Item.h"
#include "MapReference.h"
-#include "NPCHandler.h"
#include "Pet.h"
#include "QuestDef.h"
#include "ReputationMgr.h"
#include "Unit.h"
-#include "Util.h" // for Tokens typedef
#include "WorldSession.h"
#include "PhaseMgr.h"
// for template
#include "SpellMgr.h"
-#include<string>
-#include<vector>
+#include <string>
+#include <vector>
struct Mail;
struct ItemExtendedCostEntry;
@@ -377,9 +372,7 @@ typedef std::list<PlayerCreateInfoAction> PlayerCreateInfoActions;
struct PlayerInfo
{
// existence checked by displayId != 0
- PlayerInfo() : displayId_m(0), displayId_f(0), levelInfo(NULL)
- {
- }
+ PlayerInfo() : displayId_m(0), displayId_f(0), levelInfo(NULL) { }
uint32 mapId;
uint32 areaId;
@@ -841,13 +834,6 @@ enum RestType
REST_TYPE_IN_CITY = 2
};
-enum DuelCompleteType
-{
- DUEL_INTERRUPTED = 0,
- DUEL_WON = 1,
- DUEL_FLED = 2
-};
-
enum TeleportToOptions
{
TELE_TO_GM_MODE = 0x01,
@@ -953,17 +939,6 @@ struct InstancePlayerBind
InstancePlayerBind() : save(NULL), perm(false) {}
};
-enum DungeonStatusFlag
-{
- DUNGEON_STATUSFLAG_NORMAL = 0x01,
- DUNGEON_STATUSFLAG_HEROIC = 0x02,
-
- RAID_STATUSFLAG_10MAN_NORMAL = 0x01,
- RAID_STATUSFLAG_25MAN_NORMAL = 0x02,
- RAID_STATUSFLAG_10MAN_HEROIC = 0x04,
- RAID_STATUSFLAG_25MAN_HEROIC = 0x08
-};
-
struct AccessRequirement
{
uint8 levelMin;
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 117b93e8d90..1e849022d01 100755
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -26,6 +26,7 @@
#include "DBCStores.h"
#include "World.h"
#include "GameObjectAI.h"
+#include "Player.h"
void MapManager::LoadTransports()
{
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 7b9a99405e5..5e46d2c9ba7 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -29,6 +29,7 @@
#include "SpellMgr.h"
#include "SpellInfo.h"
#include "MoveSplineInit.h"
+#include "TemporarySummon.h"
Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) : _me(unit), _vehicleInfo(vehInfo), _usableSeatNum(0), _creatureEntry(creatureEntry)
{
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index b19abc778a9..6999eb301f5 100755
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -47,6 +47,12 @@ ObjectAccessor::~ObjectAccessor()
{
}
+Player* ObjectAccessor::GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/)
+{
+ Player* player = HashMapHolder<Player>::Find(guid);
+ return player && player->IsInWorld() ? player : NULL;
+}
+
WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, uint64 guid)
{
switch (GUID_HIPART(guid))
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index 41a7abc9a24..d2b532c9f94 100755
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
@@ -28,7 +28,6 @@
#include "GridDefines.h"
#include "Object.h"
-#include "Player.h"
#include <set>
@@ -116,11 +115,7 @@ class ObjectAccessor
}
// Player may be not in world while in ObjectAccessor
- static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/)
- {
- Player* player = HashMapHolder<Player>::Find(guid);
- return player && player->IsInWorld() ? player : NULL;
- }
+ static Player* GetObjectInWorld(uint64 guid, Player* /*typeSpecifier*/);
static Unit* GetObjectInWorld(uint64 guid, Unit* /*typeSpecifier*/)
{
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 96e0c246f1c..37117c9edf4 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -231,11 +231,27 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
return true;
}
-ObjectMgr::ObjectMgr(): _auctionId(1), _equipmentSetGuid(1),
- _itemTextId(1), _mailId(1), _hiPetNumber(1), _voidItemId(1), _hiCharGuid(1),
- _hiCreatureGuid(1), _hiPetGuid(1), _hiVehicleGuid(1), _hiItemGuid(1),
- _hiGoGuid(1), _hiDoGuid(1), _hiCorpseGuid(1), _hiMoTransGuid(1)
-{}
+ObjectMgr::ObjectMgr():
+ _auctionId(1),
+ _equipmentSetGuid(1),
+ _itemTextId(1),
+ _mailId(1),
+ _hiPetNumber(1),
+ _voidItemId(1),
+ _hiCharGuid(1),
+ _hiCreatureGuid(1),
+ _hiPetGuid(1),
+ _hiVehicleGuid(1),
+ _hiItemGuid(1),
+ _hiGoGuid(1),
+ _hiDoGuid(1),
+ _hiCorpseGuid(1),
+ _hiMoTransGuid(1)
+{
+ for (uint8 i = 0; i < MAX_CLASSES; ++i)
+ for (uint8 j = 0; j < MAX_RACES; ++j)
+ _playerInfo[j][i] = NULL;
+}
ObjectMgr::~ObjectMgr()
{
@@ -247,7 +263,10 @@ ObjectMgr::~ObjectMgr()
for (int race = 0; race < MAX_RACES; ++race)
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] _playerInfo[race][class_].levelInfo;
+ {
+ delete[] _playerInfo[race][class_]->levelInfo;
+ delete _playerInfo[race][class_];
+ }
for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
@@ -257,6 +276,9 @@ ObjectMgr::~ObjectMgr()
for (DungeonEncounterContainer::iterator itr =_dungeonEncounterStore.begin(); itr != _dungeonEncounterStore.end(); ++itr)
for (DungeonEncounterList::iterator encounterItr = itr->second.begin(); encounterItr != itr->second.end(); ++encounterItr)
delete *encounterItr;
+
+ for (AccessRequirementContainer::iterator itr = _accessRequirementStore.begin(); itr != _accessRequirementStore.end(); ++itr)
+ delete itr->second;
}
void ObjectMgr::AddLocaleString(std::string const& s, LocaleConstant locale, StringVector& data)
@@ -2807,8 +2829,11 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
{
+ if (!_playerInfo[race_][class_])
+ return;
+
if (count > 0)
- _playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
+ _playerInfo[race_][class_]->item.push_back(PlayerCreateInfoItem(itemId, count));
else
{
if (count < -1)
@@ -2915,17 +2940,16 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
-
- pInfo->mapId = mapId;
- pInfo->areaId = areaId;
- pInfo->positionX = positionX;
- pInfo->positionY = positionY;
- pInfo->positionZ = positionZ;
- pInfo->orientation = orientation;
-
- pInfo->displayId_m = rEntry->model_m;
- pInfo->displayId_f = rEntry->model_f;
+ PlayerInfo* info = new PlayerInfo();
+ info->mapId = mapId;
+ info->areaId = areaId;
+ info->positionX = positionX;
+ info->positionY = positionY;
+ info->positionZ = positionZ;
+ info->orientation = orientation;
+ info->displayId_m = rEntry->model_m;
+ info->displayId_f = rEntry->model_f;
+ _playerInfo[current_race][current_class] = info;
++count;
}
@@ -3048,10 +3072,16 @@ void ObjectMgr::LoadPlayerInfo()
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
for (uint32 r = min_race; r < max_race; ++r)
for (uint32 c = min_class; c < max_class; ++c)
- _playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
+ if (PlayerInfo * info = _playerInfo[r][c])
+ info->spell.push_back(fields[2].GetUInt32());
}
+ else if (PlayerInfo * info = _playerInfo[current_race][current_class])
+ info->spell.push_back(fields[2].GetUInt32());
else
- _playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
+ {
+ sLog->outError(LOG_FILTER_SQL, "Wrong race: %u, class: %u combination in `playercreateinfo_spell` table, ignoring.", current_race, current_class);
+ continue;
+ }
++count;
}
@@ -3096,8 +3126,8 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
- pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
+ if (PlayerInfo* info = _playerInfo[current_race][current_class])
+ info->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
++count;
}
@@ -3155,16 +3185,14 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
-
- if (!pInfo->levelInfo)
- pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
-
- PlayerLevelInfo* pLevelInfo = &pInfo->levelInfo[current_level-1];
-
- for (int i = 0; i < MAX_STATS; i++)
+ if (PlayerInfo* info = _playerInfo[current_race][current_class])
{
- pLevelInfo->stats[i] = fields[i+3].GetUInt8();
+ if (!info->levelInfo)
+ info->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
+
+ PlayerLevelInfo& levelInfo = info->levelInfo[current_level-1];
+ for (int i = 0; i < MAX_STATS; i++)
+ levelInfo.stats[i] = fields[i+3].GetUInt8();
}
++count;
@@ -3184,10 +3212,8 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerInfo* pInfo = &_playerInfo[race][class_];
-
- // skip non loaded combinations
- if (!pInfo->displayId_m || !pInfo->displayId_f)
+ PlayerInfo* info = _playerInfo[race][class_];
+ if (!info)
continue;
// skip expansion races if not playing with expansion
@@ -3199,7 +3225,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
// fatal error if no level 1 data
- if (!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0)
+ if (!info->levelInfo || info->levelInfo[0].stats[0] == 0)
{
sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level 1 does not have stats data!", race, class_);
exit(1);
@@ -3208,10 +3234,10 @@ void ObjectMgr::LoadPlayerInfo()
// fill level gaps
for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
{
- if (pInfo->levelInfo[level].stats[0] == 0)
+ if (info->levelInfo[level].stats[0] == 0)
{
sLog->outError(LOG_FILTER_SQL, "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level);
- pInfo->levelInfo[level] = pInfo->levelInfo[level-1];
+ info->levelInfo[level] = info->levelInfo[level-1];
}
}
}
@@ -3305,8 +3331,8 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES)
return;
- PlayerInfo const* pInfo = &_playerInfo[race][class_];
- if (pInfo->displayId_m == 0 || pInfo->displayId_f == 0)
+ PlayerInfo const* pInfo = _playerInfo[race][class_];
+ if (!pInfo)
return;
if (level <= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
@@ -3318,7 +3344,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const
{
// base data (last known level)
- *info = _playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
+ *info = _playerInfo[race][_class]->levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
@@ -5848,7 +5874,13 @@ void ObjectMgr::LoadAccessRequirements()
{
uint32 oldMSTime = getMSTime();
- _accessRequirementStore.clear(); // need for reload case
+ if (!_accessRequirementStore.empty())
+ {
+ for (AccessRequirementContainer::iterator itr = _accessRequirementStore.begin(); itr != _accessRequirementStore.end(); ++itr)
+ delete itr->second;
+
+ _accessRequirementStore.clear(); // need for reload case
+ }
// 0 1 2 3 4 5 6 7 8 9
QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement");
@@ -5870,61 +5902,61 @@ void ObjectMgr::LoadAccessRequirements()
uint8 difficulty = fields[1].GetUInt8();
uint32 requirement_ID = MAKE_PAIR32(mapid, difficulty);
- AccessRequirement ar;
+ AccessRequirement* ar = new AccessRequirement();
- ar.levelMin = fields[2].GetUInt8();
- ar.levelMax = fields[3].GetUInt8();
- ar.item = fields[4].GetUInt32();
- ar.item2 = fields[5].GetUInt32();
- ar.quest_A = fields[6].GetUInt32();
- ar.quest_H = fields[7].GetUInt32();
- ar.achievement = fields[8].GetUInt32();
- ar.questFailedText = fields[9].GetString();
+ ar->levelMin = fields[2].GetUInt8();
+ ar->levelMax = fields[3].GetUInt8();
+ ar->item = fields[4].GetUInt32();
+ ar->item2 = fields[5].GetUInt32();
+ ar->quest_A = fields[6].GetUInt32();
+ ar->quest_H = fields[7].GetUInt32();
+ ar->achievement = fields[8].GetUInt32();
+ ar->questFailedText = fields[9].GetString();
- if (ar.item)
+ if (ar->item)
{
- ItemTemplate const* pProto = GetItemTemplate(ar.item);
+ ItemTemplate const* pProto = GetItemTemplate(ar->item);
if (!pProto)
{
- sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item, mapid, difficulty);
- ar.item = 0;
+ sLog->outError(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item, mapid, difficulty);
+ ar->item = 0;
}
}
- if (ar.item2)
+ if (ar->item2)
{
- ItemTemplate const* pProto = GetItemTemplate(ar.item2);
+ ItemTemplate const* pProto = GetItemTemplate(ar->item2);
if (!pProto)
{
- sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item2, mapid, difficulty);
- ar.item2 = 0;
+ sLog->outError(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item2, mapid, difficulty);
+ ar->item2 = 0;
}
}
- if (ar.quest_A)
+ if (ar->quest_A)
{
- if (!GetQuestTemplate(ar.quest_A))
+ if (!GetQuestTemplate(ar->quest_A))
{
- sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_A, mapid, difficulty);
- ar.quest_A = 0;
+ sLog->outError(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_A, mapid, difficulty);
+ ar->quest_A = 0;
}
}
- if (ar.quest_H)
+ if (ar->quest_H)
{
- if (!GetQuestTemplate(ar.quest_H))
+ if (!GetQuestTemplate(ar->quest_H))
{
- sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar.quest_H, mapid, difficulty);
- ar.quest_H = 0;
+ sLog->outError(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_H, mapid, difficulty);
+ ar->quest_H = 0;
}
}
- if (ar.achievement)
+ if (ar->achievement)
{
- if (!sAchievementMgr->GetAchievement(ar.achievement))
+ if (!sAchievementMgr->GetAchievement(ar->achievement))
{
- sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar.achievement, mapid, difficulty);
- ar.achievement = 0;
+ sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar->achievement, mapid, difficulty);
+ ar->achievement = 0;
}
}
@@ -8074,9 +8106,9 @@ void ObjectMgr::LoadGossipMenuItems()
_gossipMenuItemsStore.clear();
QueryResult result = WorldDatabase.Query(
- // 0 1 2 3 4
+ // 0 1 2 3 4 5
"SELECT menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, "
- // 5 6 7 8 9
+ // 6 7 8 9 10
"action_menu_id, action_poi_id, box_coded, box_money, box_text "
"FROM gossip_menu_option ORDER BY menu_id, id");
@@ -8179,7 +8211,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (!cInfo)
{
if (player)
- ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
+ ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
return false;
@@ -8190,7 +8222,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (!skip_vendors || skip_vendors->count(vendor_entry) == 0)
{
if (player)
- ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
+ ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
@@ -8204,7 +8236,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
(type == ITEM_VENDOR_TYPE_CURRENCY && !sCurrencyTypesStore.LookupEntry(id)))
{
if (player)
- ChatHandler(player).PSendSysMessage(LANG_ITEM_NOT_FOUND, id, type);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, id, type);
else
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u, type %u), ignore", vendor_entry, id, type);
return false;
@@ -8213,7 +8245,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
{
if (player)
- ChatHandler(player).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
else
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", id, ExtendedCost, vendor_entry);
return false;
@@ -8224,7 +8256,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (maxcount > 0 && incrtime == 0)
{
if (player)
- ChatHandler(player).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
+ ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
else
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, id, vendor_entry);
return false;
@@ -8232,7 +8264,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
else if (maxcount == 0 && incrtime > 0)
{
if (player)
- ChatHandler(player).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
+ ChatHandler(player->GetSession()).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
else
sLog->outError(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", id, vendor_entry);
return false;
@@ -8246,7 +8278,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (vItems->FindItemCostPair(id, ExtendedCost, type))
{
if (player)
- ChatHandler(player).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, id, ExtendedCost, type);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, id, ExtendedCost, type);
else
sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has duplicate items %u (with extended cost %u, type %u) for vendor (Entry: %u), ignoring", id, ExtendedCost, type, vendor_entry);
return false;
@@ -8255,7 +8287,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (vItems->GetItemCount() >= MAX_VENDOR_ITEMS) // FIXME: GetItemCount range 0...255 MAX_VENDOR_ITEMS = 300
{
if (player)
- ChatHandler(player).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
+ ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
else
sLog->outError(LOG_FILTER_SQL, "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
return false;
@@ -8801,3 +8833,15 @@ VehicleAccessoryList const* ObjectMgr::GetVehicleAccessoryList(Vehicle* veh) con
return &itr->second;
return NULL;
}
+
+PlayerInfo const* ObjectMgr::GetPlayerInfo(uint32 race, uint32 class_) const
+{
+ if (race >= MAX_RACES)
+ return NULL;
+ if (class_ >= MAX_CLASSES)
+ return NULL;
+ PlayerInfo const* info = _playerInfo[race][class_];
+ if (!info)
+ return NULL;
+ return info;
+}
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index e7575bec5d8..ab4306bbc87 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -23,7 +23,6 @@
#include "Object.h"
#include "Bag.h"
#include "Creature.h"
-#include "Player.h"
#include "DynamicObject.h"
#include "GameObject.h"
#include "Corpse.h"
@@ -46,6 +45,9 @@
class Item;
class PhaseMgr;
+struct AccessRequirement;
+struct PlayerInfo;
+struct PlayerLevelInfo;
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
#if defined(__GNUC__)
@@ -608,7 +610,7 @@ class ObjectMgr
typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
- typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementContainer;
+ typedef UNORDERED_MAP<uint32, AccessRequirement*> AccessRequirementContainer;
typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer;
typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer;
@@ -647,17 +649,7 @@ class ObjectMgr
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& baseHP, uint32& baseMana) const;
- PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const
- {
- if (race >= MAX_RACES)
- return NULL;
- if (class_ >= MAX_CLASSES)
- return NULL;
- PlayerInfo const* info = &_playerInfo[race][class_];
- if (info->displayId_m == 0 || info->displayId_f == 0)
- return NULL;
- return info;
- }
+ PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const;
void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const;
@@ -718,7 +710,7 @@ class ObjectMgr
{
AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
if (itr != _accessRequirementStore.end())
- return &itr->second;
+ return itr->second;
return NULL;
}
@@ -1249,7 +1241,7 @@ class ObjectMgr
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
- PlayerInfo _playerInfo[MAX_RACES][MAX_CLASSES];
+ PlayerInfo* _playerInfo[MAX_RACES][MAX_CLASSES];
typedef std::vector<uint32> PlayerXPperLevel; // [level]
PlayerXPperLevel _playerXPperLevel;
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index 626cba7bb2f..357f5db7136 100755
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -19,16 +19,14 @@
#ifndef TRINITYCORE_GROUP_H
#define TRINITYCORE_GROUP_H
-#include "Battleground.h"
#include "DBCEnums.h"
#include "GroupRefManager.h"
#include "LootMgr.h"
#include "QueryResult.h"
#include "SharedDefines.h"
-#include "Player.h"
-#include "Battlefield.h"
-#include "BattlefieldMgr.h"
+class Battlefield;
+class Battleground;
class Creature;
class GroupReference;
class InstanceSave;
diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp
index 77b3a304f6b..8283075a226 100644
--- a/src/server/game/Groups/GroupMgr.cpp
+++ b/src/server/game/Groups/GroupMgr.cpp
@@ -18,6 +18,8 @@
#include "Common.h"
#include "GroupMgr.h"
#include "InstanceSaveMgr.h"
+#include "World.h"
+#include "DBCStores.h"
GroupMgr::GroupMgr()
{
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 1a73974b906..3d06b266afb 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -27,6 +27,7 @@
#include "Log.h"
#include "AccountMgr.h"
#include "AchievementMgr.h"
+#include "CalendarMgr.h"
#define MAX_GUILD_BANK_TAB_TEXT_LEN 500
#define EMBLEM_PRICE 10 * GOLD
@@ -1833,6 +1834,8 @@ void Guild::HandleLeaveMember(WorldSession* session)
SendCommandResult(session, GUILD_COMMAND_QUIT, ERR_GUILD_COMMAND_SUCCESS, m_name);
}
+
+ sCalendarMgr->RemovePlayerGuildEventsAndSignups(player->GetGUID(), GetId());
}
void Guild::HandleRemoveMember(WorldSession* session, uint64 guid)
@@ -2541,6 +2544,39 @@ void Guild::BroadcastPacket(WorldPacket* packet) const
player->GetSession()->SendPacket(packet);
}
+void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 maxLevel, uint32 minRank)
+{
+ uint32 count = 0;
+
+ WorldPacket data(SMSG_CALENDAR_FILTER_GUILD);
+ data << uint32(count); // count placeholder
+
+ for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ {
+ // not sure if needed, maybe client checks it as well
+ if (count >= CALENDAR_MAX_INVITES)
+ {
+ if (Player* player = session->GetPlayer())
+ sCalendarMgr->SendCalendarCommandResult(player->GetGUID(), CALENDAR_ERROR_INVITES_EXCEEDED);
+ return;
+ }
+
+ Member* member = itr->second;
+ uint32 level = Player::GetLevelFromDB(member->GetGUID());
+
+ if (member->GetGUID() != session->GetPlayer()->GetGUID() && level >= minLevel && level <= maxLevel && member->IsRankNotLower(minRank))
+ {
+ data.appendPackGUID(member->GetGUID());
+ data << uint8(0); // unk
+ ++count;
+ }
+ }
+
+ data.put<uint32>(0, count);
+
+ session->SendPacket(&data);
+}
+
// Members handling
bool Guild::AddMember(uint64 guid, uint8 rankId)
{
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index 36d8d56b30c..fc90a492399 100755
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -826,6 +826,8 @@ public:
void BroadcastPacketToRank(WorldPacket* packet, uint8 rankId) const;
void BroadcastPacket(WorldPacket* packet) const;
+ void MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 maxLevel, uint32 minRank);
+
template<class Do>
void BroadcastWorker(Do& _do, Player* except = NULL)
{
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index 0cecd3d615a..3301b821f2b 100755
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -19,131 +19,116 @@
/*
----- Opcodes Not Used yet -----
-SMSG_CALENDAR_CLEAR_PENDING_ACTION SendCalendarClearPendingAction()
-SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save)
-
------ Opcodes without Sniffs -----
-SMSG_CALENDAR_FILTER_GUILD [ for (... uint32(count) { packguid(???), uint8(???) } ]
-SMSG_CALENDAR_ARENA_TEAM [ for (... uint32(count) { packguid(???), uint8(???) } ]
-CMSG_CALENDAR_EVENT_INVITE_NOTES [ packguid(Invitee), uint64(inviteId), string(Text), Boolean(Unk) ]
-SMSG_CALENDAR_EVENT_INVITE_NOTES [ uint32(unk1), uint32(unk2), uint32(unk3), uint32(unk4), uint32(unk5) ]
+SMSG_CALENDAR_EVENT_INVITE_NOTES [ packguid(Invitee), uint64(inviteId), string(Text), Boolean(Unk) ]
+?CMSG_CALENDAR_EVENT_INVITE_NOTES [ uint32(unk1), uint32(unk2), uint32(unk3), uint32(unk4), uint32(unk5) ]
SMSG_CALENDAR_EVENT_INVITE_NOTES_ALERT [ uint64(inviteId), string(Text) ]
-SMSG_CALENDAR_EVENT_INVITE_STATUS_ALERT [ Structure unkown ]
+SMSG_CALENDAR_EVENT_INVITE_STATUS_ALERT [ uint64(eventId), uint32(eventTime), uint32(unkFlag), uint8(deletePending) ]
+SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save)
-*/
+----- TODO -----
-#include "Common.h"
-#include "WorldPacket.h"
-#include "WorldSession.h"
+Finish complains' handling - what to do with received complains and how to respond?
+Find out what to do with all "not used yet" opcodes
+Correct errors sending (event/invite not found, invites exceeded, event already passed, permissions etc.)
+Fix locked events to be displayed properly and response time shouldn't be shown for people that haven't respond yet
+Copied events should probably have a new owner
+
+*/
#include "InstanceSaveMgr.h"
#include "Log.h"
#include "Opcodes.h"
#include "Player.h"
+#include "SocialMgr.h"
#include "CalendarMgr.h"
#include "ObjectMgr.h"
#include "ObjectAccessor.h"
#include "DatabaseEnv.h"
+#include "GuildMgr.h"
+#include "ArenaTeamMgr.h"
+#include "WorldSession.h"
void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
{
uint64 guid = _player->GetGUID();
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_CALENDAR [" UI64FMTD "]", guid);
- time_t cur_time = time_t(time(NULL));
+ time_t currTime = time(NULL);
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_CALENDAR [" UI64FMTD "]", guid);
- WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR, 1000); // Impossible to get the correct size without doing a double iteration of some elements
+ WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR, 1000); // Average size if no instance
- CalendarInviteIdList const& invites = sCalendarMgr->GetPlayerInvites(guid);
+ std::vector<CalendarInvite*> invites = sCalendarMgr->GetPlayerInvites(guid);
data << uint32(invites.size());
- for (CalendarInviteIdList::const_iterator it = invites.begin(); it != invites.end(); ++it)
+ for (std::vector<CalendarInvite*>::const_iterator itr = invites.begin(); itr != invites.end(); ++itr)
{
- CalendarInvite* invite = sCalendarMgr->GetInvite(*it);
- CalendarEvent* calendarEvent = invite ? sCalendarMgr->GetEvent(invite->GetEventId()) : NULL;
+ data << uint64((*itr)->GetEventId());
+ data << uint64((*itr)->GetInviteId());
+ data << uint8((*itr)->GetStatus());
+ data << uint8((*itr)->GetRank());
- if (calendarEvent)
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent((*itr)->GetEventId()))
{
- data << uint64(invite->GetEventId());
- data << uint64(invite->GetInviteId());
- data << uint8(invite->GetStatus());
- data << uint8(invite->GetRank());
- data << uint8(calendarEvent->GetGuildId() != 0);
+ data << uint8(calendarEvent->IsGuildEvent());
data.appendPackGUID(calendarEvent->GetCreatorGUID());
}
else
{
- sLog->outError(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_CALENDAR: No Invite found with id [" UI64FMTD "]", *it);
- data << uint64(0);
- data << uint64(0);
- data << uint8(0);
data << uint8(0);
- data << uint8(0);
- data.appendPackGUID(0);
+ data.appendPackGUID((*itr)->GetSenderGUID());
}
}
- CalendarEventIdList const& events = sCalendarMgr->GetPlayerEvents(guid);
- data << uint32(events.size());
- for (CalendarEventIdList::const_iterator it = events.begin(); it != events.end(); ++it)
+ CalendarEventStore playerEvents = sCalendarMgr->GetPlayerEvents(guid);
+ data << uint32(playerEvents.size());
+ for (CalendarEventStore::const_iterator itr = playerEvents.begin(); itr != playerEvents.end(); ++itr)
{
- if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(*it))
- {
- data << uint64(*it);
- data << calendarEvent->GetTitle();
- data << uint32(calendarEvent->GetType());
- data.AppendPackedTime(calendarEvent->GetTime());
- data << uint32(calendarEvent->GetFlags());
- data << uint32(calendarEvent->GetDungeonId());
- data.appendPackGUID(calendarEvent->GetCreatorGUID());
- }
- else
- {
- sLog->outError(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_CALENDAR: No Event found with id [" UI64FMTD "]", *it);
- data << uint64(0);
- data << uint8(0);
- data << uint32(0);
- data << uint32(0);
- data << uint32(0);
- data << uint32(0);
- data.appendPackGUID(0);
- }
+ CalendarEvent* calendarEvent = *itr;
+
+ data << uint64(calendarEvent->GetEventId());
+ data << calendarEvent->GetTitle();
+ data << uint32(calendarEvent->GetType());
+ data.AppendPackedTime(calendarEvent->GetEventTime());
+ data << uint32(calendarEvent->GetFlags());
+ data << int32(calendarEvent->GetDungeonId());
+ data.appendPackGUID(calendarEvent->GetCreatorGUID());
}
- data << uint32(cur_time); // server time
- data.AppendPackedTime(cur_time); // server time
-
- uint32 counter = 0;
- size_t p_counter = data.wpos();
- data << uint32(counter); // instance save count
+ data << uint32(currTime); // server time
+ data.AppendPackedTime(currTime); // zone time
+ ByteBuffer dataBuffer;
+ uint32 boundCounter = 0;
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
- for (Player::BoundInstancesMap::const_iterator itr = _player->m_boundInstances[i].begin(); itr != _player->m_boundInstances[i].end(); ++itr)
+ {
+ Player::BoundInstancesMap boundInstances = _player->GetBoundInstances(Difficulty(i));
+ for (Player::BoundInstancesMap::const_iterator itr = boundInstances.begin(); itr != boundInstances.end(); ++itr)
+ {
if (itr->second.perm)
{
InstanceSave const* save = itr->second.save;
- data << uint32(save->GetMapId());
- data << uint32(save->GetDifficulty());
- data << uint32(save->GetResetTime() - cur_time);
- data << uint64(save->GetInstanceId()); // instance save id as unique instance copy id
- ++counter;
+ dataBuffer << uint32(save->GetMapId());
+ dataBuffer << uint32(save->GetDifficulty());
+ dataBuffer << uint32(save->GetResetTime() - currTime);
+ dataBuffer << uint64(save->GetInstanceId()); // instance save id as unique instance copy id
+ ++boundCounter;
}
+ }
+ }
- data.put<uint32>(p_counter, counter);
-
- data << uint32(1135753200); // unk (28.12.2005 07:00)
+ data << uint32(boundCounter);
+ data.append(dataBuffer);
- counter = 0;
- p_counter = data.wpos();
- data << uint32(counter); // raid reset count
+ data << uint32(1135753200); // Constant date, unk (28.12.2005 07:00)
+ // Reuse variables
+ boundCounter = 0;
std::set<uint32> sentMaps;
+ dataBuffer.clear();
ResetTimeByMapDifficultyMap const& resets = sInstanceSaveMgr->GetResetTimeMap();
for (ResetTimeByMapDifficultyMap::const_iterator itr = resets.begin(); itr != resets.end(); ++itr)
{
uint32 mapId = PAIR32_LOPART(itr->first);
-
if (sentMaps.find(mapId) != sentMaps.end())
continue;
@@ -153,12 +138,14 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
sentMaps.insert(mapId);
- data << uint32(mapId);
- data << uint32(itr->second - cur_time);
- data << uint32(mapEntry->unk_time);
- ++counter;
+ dataBuffer << int32(mapId);
+ dataBuffer << int32(itr->second - currTime);
+ dataBuffer << int32(0); // Never seen anything else in sniffs - still unknown
+ ++boundCounter;
}
- data.put<uint32>(p_counter, counter);
+
+ data << uint32(boundCounter);
+ data.append(dataBuffer);
// TODO: Fix this, how we do know how many and what holidays to send?
uint32 holidayCount = 0;
@@ -174,7 +161,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
data << uint32(holiday->CalendarFilterType); // m_calendarFilterType
for (uint8 j = 0; j < MAX_HOLIDAY_DATES; ++j)
- data << uint32(holiday->Date[j]); // 26 * m_date
+ data << uint32(holiday->Date[j]); // 26 * m_date -- WritePackedTime ?
for (uint8 j = 0; j < MAX_HOLIDAY_DURATIONS; ++j)
data << uint32(holiday->Duration[j]); // 10 * m_duration
@@ -193,133 +180,114 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
uint64 eventId;
recvData >> eventId;
- sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_EVENT. Event: ["
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_EVENT. Player ["
UI64FMTD "] Event [" UI64FMTD "]", _player->GetGUID(), eventId);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
- SendCalendarEvent(*calendarEvent, CALENDAR_SENDTYPE_GET);
+ sCalendarMgr->SendCalendarEvent(_player->GetGUID(), *calendarEvent, CALENDAR_SENDTYPE_GET);
+ else
+ sCalendarMgr->SendCalendarCommandResult(_player->GetGUID(), CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarGuildFilter(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GUILD_FILTER [" UI64FMTD "]", _player->GetGUID());
- int32 unk1, unk2, unk3;
- recvData >> unk1;
- recvData >> unk2;
- recvData >> unk3;
+ uint32 minLevel;
+ uint32 maxLevel;
+ uint32 minRank;
+
+ recvData >> minLevel >> maxLevel >> minRank;
+
+ if (Guild* guild = sGuildMgr->GetGuildById(_player->GetGuildId()))
+ guild->MassInviteToEvent(this, minLevel, maxLevel, minRank);
- sLog->outDebug(LOG_FILTER_NETWORKIO, "Calendar: CMSG_CALENDAR_GUILD_FILTER - unk1: %d unk2: %d unk3: %d", unk1, unk2, unk3);
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GUILD_FILTER: Min level [%d], Max level [%d], Min rank [%d]", minLevel, maxLevel, minRank);
}
void WorldSession::HandleCalendarArenaTeam(WorldPacket& recvData)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_ARENA_TEAM [" UI64FMTD "]", _player->GetGUID());
- int32 unk1;
- recvData >> unk1;
+ uint32 arenaTeamId;
+ recvData >> arenaTeamId;
- sLog->outDebug(LOG_FILTER_NETWORKIO, "Calendar: CMSG_CALENDAR_ARENA_TEAM - unk1: %d", unk1);
+ if (ArenaTeam* team = sArenaTeamMgr->GetArenaTeamById(arenaTeamId))
+ team->MassInviteToEvent(this);
}
void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData)
{
uint64 guid = _player->GetGUID();
+
std::string title;
std::string description;
uint8 type;
- bool repeatable;
+ uint8 repeatable;
uint32 maxInvites;
int32 dungeonId;
uint32 eventPackedTime;
uint32 unkPackedTime;
uint32 flags;
- uint64 inviteId = 0;
- uint64 invitee = 0;
- uint8 status;
- uint8 rank;
- recvData >> title >> description >> type >> repeatable >> maxInvites;
- recvData >> dungeonId;
+ recvData >> title >> description >> type >> repeatable >> maxInvites >> dungeonId;
recvData.ReadPackedTime(eventPackedTime);
recvData.ReadPackedTime(unkPackedTime);
recvData >> flags;
- if (!(flags & CALENDAR_FLAG_WITHOUT_INVITES))
+ CalendarEvent* calendarEvent = new CalendarEvent(sCalendarMgr->GetFreeEventId(), guid, 0, CalendarEventType(type), dungeonId,
+ time_t(eventPackedTime), flags, time_t(unkPackedTime), title, description);
+
+ if (calendarEvent->IsGuildEvent() || calendarEvent->IsGuildAnnouncement())
+ if (Player* creator = ObjectAccessor::FindPlayer(guid))
+ calendarEvent->SetGuildId(creator->GetGuildId());
+
+ if (calendarEvent->IsGuildAnnouncement())
+ {
+ // 946684800 is 01/01/2000 00:00:00 - default response time
+ CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), calendarEvent->GetEventId(), 0, guid, 946684800, CALENDAR_STATUS_NOT_SIGNED_UP, CALENDAR_RANK_PLAYER, "");
+ sCalendarMgr->AddInvite(calendarEvent, invite);
+ }
+ else
{
uint32 inviteCount;
recvData >> inviteCount;
- recvData.readPackGUID(invitee);
- recvData >> status >> rank;
- if (inviteCount != 1 || invitee != guid)
+ for (uint32 i = 0; i < inviteCount; ++i)
{
- sLog->outError(LOG_FILTER_NETWORKIO, "HandleCalendarAddEvent: [" UI64FMTD
- "]: More than one invite (%d) or Invitee [" UI64FMTD
- "] differs", guid, inviteCount, invitee);
- return;
+ uint64 invitee = 0;
+ uint8 status = 0;
+ uint8 rank = 0;
+ recvData.readPackGUID(invitee);
+ recvData >> status >> rank;
+
+ // 946684800 is 01/01/2000 00:00:00 - default response time
+ CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), calendarEvent->GetEventId(), invitee, guid, 946684800, CalendarInviteStatus(status), CalendarModerationRank(rank), "");
+ sCalendarMgr->AddInvite(calendarEvent, invite);
}
-
- inviteId = sCalendarMgr->GetFreeInviteId();
- }
- else
- {
- inviteId = 0;
- status = CALENDAR_STATUS_NO_OWNER;
- rank = CALENDAR_RANK_PLAYER;
}
- sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_ADD_EVENT: [" UI64FMTD "] "
- "Title %s, Description %s, type %u, Repeatable %u, MaxInvites %u, "
- "Dungeon ID %d, Time %u, Time2 %u, Flags %u, Invitee [" UI64FMTD "] "
- "Status %d, Rank %d", guid, title.c_str(), description.c_str(),
- type, repeatable, maxInvites, dungeonId, eventPackedTime,
- unkPackedTime, flags, invitee, status, rank);
-
- CalendarAction action;
-
- action.SetAction(CALENDAR_ACTION_ADD_EVENT);
- action.SetPlayer(_player);
- action.Event.SetEventId(sCalendarMgr->GetFreeEventId());
- action.Event.SetCreatorGUID(guid);
- action.Event.SetType((CalendarEventType) type);
- action.Event.SetFlags(flags);
- action.Event.SetTime(eventPackedTime);
- action.Event.SetTimeZoneTime(unkPackedTime);
- action.Event.SetRepeatable(repeatable);
- action.Event.SetMaxInvites(maxInvites);
- action.Event.SetDungeonId(dungeonId);
- action.Event.SetGuildId((flags & CALENDAR_FLAG_GUILD_ONLY) ? GetPlayer()->GetGuildId() : 0);
- action.Event.SetTitle(title);
- action.Event.SetDescription(description);
- action.Event.AddInvite(inviteId);
- action.Invite.SetEventId(action.Event.GetEventId());
- action.Invite.SetInviteId(inviteId);
- action.Invite.SetInvitee(invitee);
- action.Invite.SetStatus((CalendarInviteStatus) status);
- action.Invite.SetRank((CalendarModerationRank) rank);
- action.Invite.SetSenderGUID(guid);
-
- sCalendarMgr->AddAction(action);
+ sCalendarMgr->AddEvent(calendarEvent, CALENDAR_SENDTYPE_ADD);
}
void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData)
{
uint64 guid = _player->GetGUID();
+ time_t oldEventTime;
+
uint64 eventId;
uint64 inviteId;
std::string title;
std::string description;
uint8 type;
- bool repeatable;
+ uint8 repetitionType;
uint32 maxInvites;
int32 dungeonId;
uint32 eventPackedTime;
uint32 timeZoneTime;
uint32 flags;
- recvData >> eventId >> inviteId >> title >> description >> type;
- recvData >> repeatable >> maxInvites >> dungeonId;
+ recvData >> eventId >> inviteId >> title >> description >> type >> repetitionType >> maxInvites >> dungeonId;
recvData.ReadPackedTime(eventPackedTime);
recvData.ReadPackedTime(timeZoneTime);
recvData >> flags;
@@ -328,46 +296,37 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData)
"], InviteId [" UI64FMTD "] Title %s, Description %s, type %u "
"Repeatable %u, MaxInvites %u, Dungeon ID %d, Time %u "
"Time2 %u, Flags %u", guid, eventId, inviteId, title.c_str(),
- description.c_str(), type, repeatable, maxInvites, dungeonId,
+ description.c_str(), type, repetitionType, maxInvites, dungeonId,
eventPackedTime, timeZoneTime, flags);
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_MODIFY_EVENT);
- action.SetPlayer(_player);
- action.SetInviteId(inviteId);
- action.Event.SetEventId(eventId);
- action.Event.SetType((CalendarEventType) type);
- action.Event.SetFlags((CalendarFlags) flags);
- action.Event.SetTime(eventPackedTime);
- action.Event.SetTimeZoneTime(timeZoneTime);
- action.Event.SetRepeatable(repeatable);
- action.Event.SetDungeonId(dungeonId);
- action.Event.SetTitle(title);
- action.Event.SetDescription(description);
- action.Event.SetMaxInvites(maxInvites);
-
- sCalendarMgr->AddAction(action);
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ oldEventTime = calendarEvent->GetEventTime();
+
+ calendarEvent->SetType(CalendarEventType(type));
+ calendarEvent->SetFlags(flags);
+ calendarEvent->SetEventTime(time_t(eventPackedTime));
+ calendarEvent->SetTimeZoneTime(time_t(timeZoneTime)); // Not sure, seems constant from the little sniffs we have
+ calendarEvent->SetDungeonId(dungeonId);
+ calendarEvent->SetTitle(title);
+ calendarEvent->SetDescription(description);
+
+ sCalendarMgr->UpdateEvent(calendarEvent);
+ sCalendarMgr->SendCalendarEventUpdateAlert(*calendarEvent, oldEventTime);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarRemoveEvent(WorldPacket& recvData)
{
uint64 guid = _player->GetGUID();
uint64 eventId;
- uint64 inviteId;
- uint32 flags;
- recvData >> eventId >> inviteId >> flags;
- sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_REMOVE_EVENT [" UI64FMTD "], EventId [" UI64FMTD
- "] inviteId [" UI64FMTD "] Flags?: %u", guid, eventId, inviteId, flags);
-
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_REMOVE_EVENT);
- action.SetPlayer(_player);
- action.SetInviteId(inviteId);
- action.Event.SetEventId(eventId);
- action.Event.SetFlags((CalendarFlags) flags);
+ recvData >> eventId;
+ recvData.rfinish(); // Skip flags & invite ID, we don't use them
- sCalendarMgr->AddAction(action);
+ sCalendarMgr->RemoveEvent(eventId, guid);
}
void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
@@ -382,94 +341,140 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COPY_EVENT [" UI64FMTD "], EventId [" UI64FMTD
"] inviteId [" UI64FMTD "] Time: %u", guid, eventId, inviteId, time);
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_COPY_EVENT);
- action.SetPlayer(_player);
- action.SetInviteId(inviteId);
- action.Event.SetEventId(eventId);
- action.Event.SetTime(time);
+ if (CalendarEvent* oldEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ CalendarEvent* newEvent = new CalendarEvent(*oldEvent, sCalendarMgr->GetFreeEventId());
+ newEvent->SetEventTime(time_t(time));
+ sCalendarMgr->AddEvent(newEvent, CALENDAR_SENDTYPE_COPY);
+
+ std::vector<CalendarInvite*> invites = sCalendarMgr->GetEventInvites(eventId);
+
+ for (std::vector<CalendarInvite*>::const_iterator itr = invites.begin(); itr != invites.end(); ++itr)
+ sCalendarMgr->AddInvite(newEvent, new CalendarInvite(**itr, sCalendarMgr->GetFreeInviteId(), newEvent->GetEventId()));
- sCalendarMgr->AddAction(action);
+ // should we change owner when somebody makes a copy of event owned by another person?
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
{
- uint64 guid = _player->GetGUID();
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_INVITE");
+
+ uint64 playerGuid = _player->GetGUID();
+
uint64 eventId;
uint64 inviteId;
std::string name;
- uint8 status;
- uint8 rank;
- uint64 invitee = 0;
- uint32 team = 0;
+ bool isPreInvite;
+ bool isGuildEvent;
+
+ uint64 inviteeGuid = 0;
+ uint32 inviteeTeam = 0;
+ uint32 inviteeGuildId = 0;
- recvData >> eventId >> inviteId >> name >> status >> rank;
- if (Player* player = sObjectAccessor->FindPlayerByName(name))
+ recvData >> eventId >> inviteId >> name >> isPreInvite >> isGuildEvent;
+
+ if (Player* player = sObjectAccessor->FindPlayerByName(name.c_str()))
{
- invitee = player->GetGUID();
- team = player->GetTeam();
+ // Invitee is online
+ inviteeGuid = player->GetGUID();
+ inviteeTeam = player->GetTeam();
+ inviteeGuildId = player->GetGuildId();
}
else
{
+ // Invitee offline, get data from database
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_RACE_ACC_BY_NAME);
stmt->setString(0, name);
if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
{
Field* fields = result->Fetch();
- invitee = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
- team = Player::TeamForRace(fields[1].GetUInt8());
+ inviteeGuid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
+ inviteeTeam = Player::TeamForRace(fields[1].GetUInt8());
+ inviteeGuildId = Player::GetGuildIdFromDB(inviteeGuid);
}
}
- sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_INVITE [" UI64FMTD "], EventId ["
- UI64FMTD "] InviteId [" UI64FMTD "] Name %s ([" UI64FMTD "]), status %u, "
- "Rank %u", guid, eventId, inviteId, name.c_str(), invitee, status, rank);
-
- if (!invitee)
+ if (!inviteeGuid)
{
- SendCalendarCommandResult(CALENDAR_ERROR_PLAYER_NOT_FOUND);
+ sCalendarMgr->SendCalendarCommandResult(playerGuid, CALENDAR_ERROR_PLAYER_NOT_FOUND);
return;
}
- if (_player->GetTeam() != team && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR))
+ if (_player->GetTeam() != inviteeTeam && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR))
{
- SendCalendarCommandResult(CALENDAR_ERROR_NOT_ALLIED);
+ sCalendarMgr->SendCalendarCommandResult(playerGuid, CALENDAR_ERROR_NOT_ALLIED);
return;
}
- // TODO: Check ignore, even if offline (db query)
+ if (QueryResult result = CharacterDatabase.PQuery("SELECT flags FROM character_social WHERE guid = " UI64FMTD " AND friend = " UI64FMTD, inviteeGuid, playerGuid))
+ {
+ Field* fields = result->Fetch();
+ if (fields[0].GetUInt8() & SOCIAL_FLAG_IGNORED)
+ {
+ sCalendarMgr->SendCalendarCommandResult(playerGuid, CALENDAR_ERROR_IGNORING_YOU_S, name.c_str());
+ return;
+ }
+ }
+
+ if (!isPreInvite)
+ {
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ if (calendarEvent->IsGuildEvent() && calendarEvent->GetGuildId() == inviteeGuildId)
+ {
+ // we can't invite guild members to guild events
+ sCalendarMgr->SendCalendarCommandResult(playerGuid, CALENDAR_ERROR_NO_GUILD_INVITES);
+ return;
+ }
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_ADD_EVENT_INVITE);
- action.SetPlayer(_player);
- action.SetInviteId(inviteId);
- action.Invite.SetEventId(eventId);
- action.Invite.SetInviteId(sCalendarMgr->GetFreeInviteId());
- action.Invite.SetSenderGUID(_player->GetGUID());
- action.Invite.SetInvitee(invitee);
- action.Invite.SetRank((CalendarModerationRank) rank);
- action.Invite.SetStatus((CalendarInviteStatus) status);
+ // 946684800 is 01/01/2000 00:00:00 - default response time
+ CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), eventId, inviteeGuid, playerGuid, 946684800, CALENDAR_STATUS_INVITED, CALENDAR_RANK_PLAYER, "");
+ sCalendarMgr->AddInvite(calendarEvent, invite);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(playerGuid, CALENDAR_ERROR_EVENT_INVALID);
+ }
+ else
+ {
+ if (isGuildEvent && inviteeGuildId == _player->GetGuildId())
+ {
+ sCalendarMgr->SendCalendarCommandResult(inviteeGuid, CALENDAR_ERROR_NO_GUILD_INVITES);
+ return;
+ }
- sCalendarMgr->AddAction(action);
+ // 946684800 is 01/01/2000 00:00:00 - default response time
+ CalendarInvite* invite = new CalendarInvite(inviteId, 0, inviteeGuid, playerGuid, 946684800, CALENDAR_STATUS_INVITED, CALENDAR_RANK_PLAYER, "");
+ sCalendarMgr->SendCalendarEventInvite(*invite);
+ }
}
void WorldSession::HandleCalendarEventSignup(WorldPacket& recvData)
{
uint64 guid = _player->GetGUID();
uint64 eventId;
- uint8 status;
+ bool tentative;
+
+ recvData >> eventId >> tentative;
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_SIGNUP [" UI64FMTD "] EventId [" UI64FMTD "] Tentative %u", guid, eventId, tentative);
- recvData >> eventId >> status;
- sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_SIGNUP [" UI64FMTD "] EventId ["
- UI64FMTD "] Status %u", guid, eventId, status);
-
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_SIGNUP_TO_EVENT);
- action.SetPlayer(_player);
- action.SetExtraData(GetPlayer()->GetGuildId());
- action.Event.SetEventId(eventId);
- action.Invite.SetStatus((CalendarInviteStatus) status);
- sCalendarMgr->AddAction(action);
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ if (calendarEvent->IsGuildEvent() && calendarEvent->GetGuildId() != _player->GetGuildId())
+ {
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_GUILD_PLAYER_NOT_IN_GUILD);
+ return;
+ }
+
+ CalendarInviteStatus status = tentative ? CALENDAR_STATUS_TENTATIVE : CALENDAR_STATUS_SIGNED_UP;
+ CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), eventId, guid, guid, time(NULL), status, CALENDAR_RANK_PLAYER, "");
+ sCalendarMgr->AddInvite(calendarEvent, invite);
+ sCalendarMgr->SendCalendarClearPendingAction(guid);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarEventRsvp(WorldPacket& recvData)
@@ -477,22 +482,36 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket& recvData)
uint64 guid = _player->GetGUID();
uint64 eventId;
uint64 inviteId;
- uint8 status;
+ uint32 status;
recvData >> eventId >> inviteId >> status;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_RSVP [" UI64FMTD"] EventId ["
UI64FMTD "], InviteId [" UI64FMTD "], status %u", guid, eventId,
inviteId, status);
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_MODIFY_EVENT_INVITE);
- action.SetPlayer(_player);
- action.SetInviteId(inviteId);
- action.Invite.SetInviteId(inviteId);
- action.Invite.SetEventId(eventId);
- action.Invite.SetStatus((CalendarInviteStatus) status);
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ // i think we still should be able to remove self from locked events
+ if (status != CALENDAR_STATUS_REMOVED && calendarEvent->GetFlags() & CALENDAR_FLAG_INVITES_LOCKED)
+ {
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_LOCKED);
+ return;
+ }
+
+ if (CalendarInvite* invite = sCalendarMgr->GetInvite(inviteId))
+ {
+ invite->SetStatus(CalendarInviteStatus(status));
+ invite->SetStatusTime(time(NULL));
- sCalendarMgr->AddAction(action);
+ sCalendarMgr->UpdateInvite(invite);
+ sCalendarMgr->SendCalendarEventStatus(*calendarEvent, *invite);
+ sCalendarMgr->SendCalendarClearPendingAction(guid);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_NO_INVITE); // correct?
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket& recvData)
@@ -500,26 +519,29 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket& recvData)
uint64 guid = _player->GetGUID();
uint64 invitee;
uint64 eventId;
- uint64 owninviteId;
+ uint64 ownerInviteId; // isn't it sender's inviteId?
uint64 inviteId;
recvData.readPackGUID(invitee);
- recvData >> inviteId >> owninviteId >> eventId;
+ recvData >> inviteId >> ownerInviteId >> eventId;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_REMOVE_INVITE ["
- UI64FMTD "] EventId [" UI64FMTD "], OwnInviteId ["
+ UI64FMTD "] EventId [" UI64FMTD "], ownerInviteId ["
UI64FMTD "], Invitee ([" UI64FMTD "] id: [" UI64FMTD "])",
- guid, eventId, owninviteId, invitee, inviteId);
+ guid, eventId, ownerInviteId, invitee, inviteId);
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_REMOVE_EVENT_INVITE);
- action.SetPlayer(_player);
- action.SetInviteId(owninviteId);
- action.Invite.SetInviteId(inviteId);
- action.Invite.SetEventId(eventId);
- action.Invite.SetInvitee(invitee);
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ if (calendarEvent->GetCreatorGUID() == invitee)
+ {
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_DELETE_CREATOR_FAILED);
+ return;
+ }
- sCalendarMgr->AddAction(action);
+ sCalendarMgr->RemoveInvite(inviteId, eventId, guid);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_NO_INVITE);
}
void WorldSession::HandleCalendarEventStatus(WorldPacket& recvData)
@@ -528,25 +550,32 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket& recvData)
uint64 invitee;
uint64 eventId;
uint64 inviteId;
- uint64 owninviteId;
+ uint64 ownerInviteId; // isn't it sender's inviteId?
uint8 status;
recvData.readPackGUID(invitee);
- recvData >> eventId >> inviteId >> owninviteId >> status;
+ recvData >> eventId >> inviteId >> ownerInviteId >> status;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_STATUS [" UI64FMTD"] EventId ["
- UI64FMTD "] OwnInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
- UI64FMTD "], status %u", guid, eventId, owninviteId, invitee, inviteId, status);
-
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_MODIFY_EVENT_INVITE);
- action.SetPlayer(_player);
- action.SetInviteId(owninviteId);
- action.Invite.SetInviteId(inviteId);
- action.Invite.SetEventId(eventId);
- action.Invite.SetInvitee(invitee);
- action.Invite.SetStatus((CalendarInviteStatus) status);
-
- sCalendarMgr->AddAction(action);
+ UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
+ UI64FMTD "], status %u", guid, eventId, ownerInviteId, invitee, inviteId, status);
+
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ if (CalendarInvite* invite = sCalendarMgr->GetInvite(inviteId))
+ {
+ invite->SetStatus((CalendarInviteStatus)status);
+ // not sure if we should set response time when moderator changes invite status
+ //invite->SetStatusTime(time(NULL));
+
+ sCalendarMgr->UpdateInvite(invite);
+ sCalendarMgr->SendCalendarEventStatus(*calendarEvent, *invite);
+ sCalendarMgr->SendCalendarClearPendingAction(invitee);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_NO_INVITE); // correct?
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recvData)
@@ -555,25 +584,28 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recvData)
uint64 invitee;
uint64 eventId;
uint64 inviteId;
- uint64 owninviteId;
- uint8 status;
+ uint64 ownerInviteId; // isn't it sender's inviteId?
+ uint8 rank;
recvData.readPackGUID(invitee);
- recvData >> eventId >> inviteId >> owninviteId >> status;
+ recvData >> eventId >> inviteId >> ownerInviteId >> rank;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_MODERATOR_STATUS [" UI64FMTD "] EventId ["
- UI64FMTD "] OwnInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
- UI64FMTD "], status %u", guid, eventId, owninviteId, invitee, inviteId, status);
-
- CalendarAction action;
- action.SetAction(CALENDAR_ACTION_MODIFY_MODERATOR_EVENT_INVITE);
- action.SetPlayer(_player);
- action.SetInviteId(owninviteId);
- action.Invite.SetInviteId(inviteId);
- action.Invite.SetEventId(eventId);
- action.Invite.SetInvitee(invitee);
- action.Invite.SetStatus((CalendarInviteStatus) status);
-
- sCalendarMgr->AddAction(action);
+ UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
+ UI64FMTD "], rank %u", guid, eventId, ownerInviteId, invitee, inviteId, rank);
+
+ if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
+ {
+ if (CalendarInvite* invite = sCalendarMgr->GetInvite(inviteId))
+ {
+ invite->SetRank(CalendarModerationRank(rank));
+ sCalendarMgr->UpdateInvite(invite);
+ sCalendarMgr->SendCalendarEventModeratorStatusAlert(*calendarEvent, *invite);
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_NO_INVITE); // correct?
+ }
+ else
+ sCalendarMgr->SendCalendarCommandResult(guid, CALENDAR_ERROR_EVENT_INVALID);
}
void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
@@ -585,6 +617,8 @@ void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
recvData >> eventId >> complainGUID;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COMPLAIN [" UI64FMTD "] EventId ["
UI64FMTD "] guid [" UI64FMTD "]", guid, eventId, complainGUID);
+
+ // what to do with complains?
}
void WorldSession::HandleCalendarGetNumPending(WorldPacket& /*recvData*/)
@@ -600,279 +634,25 @@ void WorldSession::HandleCalendarGetNumPending(WorldPacket& /*recvData*/)
SendPacket(&data);
}
-// ----------------------------------- SEND ------------------------------------
-
-void WorldSession::SendCalendarEvent(CalendarEvent const& calendarEvent, CalendarSendEventType sendEventType)
-{
- uint64 eventId = calendarEvent.GetEventId();
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_EVENT [" UI64FMTD "] EventId ["
- UI64FMTD "] SendType %u", _player->GetGUID(), eventId, sendEventType);
-
- WorldPacket data(SMSG_CALENDAR_SEND_EVENT);
- data << uint8(sendEventType);
- data.appendPackGUID(calendarEvent.GetCreatorGUID());
- data << uint64(eventId);
- data << calendarEvent.GetTitle();
- data << calendarEvent.GetDescription();
- data << uint8(calendarEvent.GetType());
- data << uint8(calendarEvent.GetRepeatable());
- data << uint32(calendarEvent.GetMaxInvites());
- data << int32(calendarEvent.GetDungeonId());
- data << uint32(calendarEvent.GetFlags());
- data.AppendPackedTime(calendarEvent.GetTime());
- data.AppendPackedTime(calendarEvent.GetTimeZoneTime());
- data << uint32(calendarEvent.GetGuildId());
-
- CalendarInviteIdList const& invites = calendarEvent.GetInviteIdList();
- data << uint32(invites.size());
- for (CalendarInviteIdList::const_iterator it = invites.begin(); it != invites.end(); ++it)
- {
- if (CalendarInvite* invite = sCalendarMgr->GetInvite(*it))
- {
- uint64 guid = invite->GetInvitee();
- Player* player = ObjectAccessor::FindPlayer(guid);
- uint8 level = player ? player->getLevel() : Player::GetLevelFromDB(guid);
-
- data.appendPackGUID(guid);
- data << uint8(level);
- data << uint8(invite->GetStatus());
- data << uint8(invite->GetRank());
- data << uint8(calendarEvent.GetGuildId() != 0);
- data << uint64(invite->GetInviteId());
- data << uint32(invite->GetStatusTime());
- data << invite->GetText();
- }
- else
- {
- data.appendPackGUID(_player->GetGUID());
- data << uint8(0) << uint8(0) << uint8(0) << uint8(0)
- << uint64(0) << uint32(0) << uint8(0);
-
- sLog->outError(LOG_FILTER_NETWORKIO, "SendCalendarEvent: No Invite found with id [" UI64FMTD "]", *it);
- }
- }
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventInvite(CalendarInvite const& invite, bool pending)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = invite.GetEventId();
- uint64 inviteId = invite.GetInviteId();
- uint64 invitee = invite.GetInvitee();
- uint8 status = invite.GetStatus();
- uint32 statusTime = invite.GetStatusTime();
- Player* player = ObjectAccessor::FindPlayer(invitee);
- uint8 level = player ? player->getLevel() : Player::GetLevelFromDB(invitee);
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_INVITE [" UI64FMTD "] EventId ["
- UI64FMTD "] InviteId [" UI64FMTD "] Invitee [" UI64FMTD "] "
- " Level %u, Status %u, StatusTime %u" , guid, eventId, inviteId,
- invitee, level, status, statusTime);
-
- WorldPacket data(SMSG_CALENDAR_EVENT_INVITE, 8 + 8 + 8 + 1 + 1 + 1 + (statusTime ? 4 : 0) + 1);
- data.appendPackGUID(invitee);
- data << uint64(eventId);
- data << uint64(inviteId);
- data << uint8(level);
- data << uint8(status);
- if (statusTime)
- data << uint8(1) << uint32(statusTime);
- else
- data << uint8(0);
- data << uint8(pending);
-
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventInviteAlert(CalendarEvent const& calendarEvent, CalendarInvite const& invite)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = calendarEvent.GetEventId();
- uint64 inviteId = invite.GetInviteId();
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_INVITE_ALERT [" UI64FMTD "] EventId ["
- UI64FMTD "] InviteId [" UI64FMTD "]", guid, eventId, inviteId);
-
- WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_ALERT);
- data << uint64(eventId);
- data << calendarEvent.GetTitle().c_str();
- data.AppendPackedTime(calendarEvent.GetTime());
- data << uint32(calendarEvent.GetFlags());
- data << uint32(calendarEvent.GetType());
- data << uint32(calendarEvent.GetDungeonId());
- data << uint64(inviteId);
- data << uint8(invite.GetStatus());
- data << uint8(invite.GetRank());
- data.appendPackGUID(calendarEvent.GetCreatorGUID());
- data.appendPackGUID(invite.GetSenderGUID());
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventUpdateAlert(CalendarEvent const& calendarEvent, CalendarSendEventType sendEventType)
+void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
{
- uint64 guid = _player->GetGUID();
- uint64 eventId = calendarEvent.GetEventId();
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_UPDATED_ALERT ["
- UI64FMTD "] EventId [" UI64FMTD "]", guid, eventId);
-
-
- WorldPacket data(SMSG_CALENDAR_EVENT_UPDATED_ALERT, 1 + 8 + 4 + 4 + 4 + 1 + 4 +
- calendarEvent.GetTitle().size() + calendarEvent.GetDescription().size() + 1 + 4 + 4);
- data << uint8(sendEventType);
- data << uint64(eventId);
- data.AppendPackedTime(calendarEvent.GetTime());
- data << uint32(calendarEvent.GetFlags());
- data.AppendPackedTime(calendarEvent.GetTime());
- data << uint8(calendarEvent.GetType());
- data << uint32(calendarEvent.GetDungeonId());
- data << calendarEvent.GetTitle().c_str();
- data << calendarEvent.GetDescription().c_str();
- data << uint8(calendarEvent.GetRepeatable());
- data << uint32(calendarEvent.GetMaxInvites());
- data << uint32(0); // FIXME
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventRemovedAlert(CalendarEvent const& calendarEvent)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = calendarEvent.GetEventId();
- uint32 eventTime = calendarEvent.GetTime();
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_REMOVED_ALERT [" UI64FMTD "] EventId ["
- UI64FMTD "] Time %u", guid, eventId, eventTime);
-
- WorldPacket data(SMSG_CALENDAR_EVENT_REMOVED_ALERT, 1 + 8 + 1);
- data << uint8(1); // FIXME: If true does not SignalEvent(EVENT_CALENDAR_ACTION_PENDING)
- data << uint64(eventId);
- data.AppendPackedTime(eventTime);
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventStatus(CalendarEvent const& calendarEvent, CalendarInvite const& invite)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = calendarEvent.GetEventId();
- uint64 inviteId = invite.GetInviteId();
- uint64 invitee = invite.GetInvitee();
- uint32 eventTime = calendarEvent.GetTime();
- uint32 flags = calendarEvent.GetFlags();
- uint8 status = invite.GetStatus();
- uint8 rank = invite.GetRank();
- uint32 statusTime = invite.GetStatusTime();
-
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_STATUS [" UI64FMTD "] EventId ["
- UI64FMTD "] InviteId [" UI64FMTD "] Invitee [" UI64FMTD "] Time %u "
- "Flags %u, Status %u, Rank %u, StatusTime %u",
- guid, eventId, inviteId, invitee, eventTime, flags, status, rank,
- statusTime);
-
- WorldPacket data(SMSG_CALENDAR_EVENT_STATUS, 8 + 8 + 4 + 4 + 1 + 1 + 4);
- data.appendPackGUID(invitee);
- data << uint64(eventId);
- data.AppendPackedTime(eventTime);
- data << uint32(flags);
- data << uint8(status);
- data << uint8(rank);
- data.AppendPackedTime(statusTime);
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventModeratorStatusAlert(CalendarInvite const& invite)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = invite.GetEventId();
- uint64 invitee = invite.GetInvitee();
- uint8 status = invite.GetStatus();
-
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT [" UI64FMTD
- "] Invitee [" UI64FMTD "] EventId [" UI64FMTD "] Status %u ", guid,
- invitee, eventId, status);
-
-
- WorldPacket data(SMSG_CALENDAR_EVENT_MODERATOR_STATUS_ALERT, 8 + 8 + 1 + 1);
- data.appendPackGUID(invitee);
- data << uint64(eventId);
- data << uint8(status);
- data << uint8(1); // FIXME
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventInviteRemoveAlert(CalendarEvent const& calendarEvent, CalendarInviteStatus status)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = calendarEvent.GetEventId();
- uint32 eventTime = calendarEvent.GetTime();
- uint32 flags = calendarEvent.GetFlags();
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT ["
- UI64FMTD "] EventId [" UI64FMTD "] Time %u, Flags %u, Status %u",
- guid, eventId, eventTime, flags, status);
-
- WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT, 8 + 4 + 4 + 1);
- data << uint64(eventId);
- data.AppendPackedTime(eventTime);
- data << uint32(flags);
- data << uint8(status);
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarEventInviteRemove(CalendarInvite const& invite, uint32 flags)
-{
- uint64 guid = _player->GetGUID();
- uint64 eventId = invite.GetEventId();
- uint64 invitee = invite.GetInvitee();
-
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_INVITE_REMOVED ["
- UI64FMTD "] Invitee [" UI64FMTD "] EventId [" UI64FMTD
- "] Flags %u", guid, invitee, eventId, flags);
-
- WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_REMOVED, 8 + 4 + 4 + 1);
- data.appendPackGUID(invitee);
- data << uint32(eventId);
- data << uint32(flags);
- data << uint8(1); // FIXME
- SendPacket(&data);
-}
-
-void WorldSession::SendCalendarClearPendingAction()
-{
- uint64 guid = _player->GetGUID();
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_CLEAR_PENDING_ACTION [" UI64FMTD "]", guid);
+ uint32 mapId, difficulty;
+ uint8 toggleExtend;
+ recvData >> mapId >> difficulty>> toggleExtend;
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_SAVED_INSTANCE_EXTEND - MapId: %u, Difficulty: %u, ToggleExtend: %s", mapId, difficulty, toggleExtend ? "On" : "Off");
+
+ /*
+ InstancePlayerBind* instanceBind = _player->GetBoundInstance(mapId, Difficulty(difficulty));
+ if (!instanceBind || !instanceBind->save)
+ return;
- WorldPacket data(SMSG_CALENDAR_CLEAR_PENDING_ACTION, 0);
- SendPacket(&data);
+ InstanceSave* save = instanceBind->save;
+ // http://www.wowwiki.com/Instance_Lock_Extension
+ // SendCalendarRaidLockoutUpdated(save);
+ */
}
-void WorldSession::SendCalendarCommandResult(CalendarError err, char const* param /*= NULL*/)
-{
- uint64 guid = _player->GetGUID();
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_COMMAND_RESULT [" UI64FMTD "] Value: %u", guid, err);
-
- WorldPacket data(SMSG_CALENDAR_COMMAND_RESULT, 0);
- data << uint32(0);
- data << uint8(0);
- switch (err)
- {
- case CALENDAR_ERROR_OTHER_INVITES_EXCEEDED:
- case CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S:
- case CALENDAR_ERROR_IGNORING_YOU_S:
- data << param;
- break;
- default:
- data << uint8(0);
- break;
- }
-
- data << uint32(err);
-
- SendPacket(&data);
-}
+// ----------------------------------- SEND ------------------------------------
void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
{
@@ -902,13 +682,13 @@ void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
"] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty());
- time_t cur_time = time_t(time(NULL));
+ time_t currTime = time(NULL);
WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8);
- data.AppendPackedTime(cur_time);
+ data.AppendPackedTime(currTime);
data << uint32(save->GetMapId());
data << uint32(save->GetDifficulty());
data << uint32(0); // Amount of seconds that has changed to the reset time
- data << uint32(save->GetResetTime() - cur_time);
+ data << uint32(save->GetResetTime() - currTime);
SendPacket(&data);
}
diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 7db49e50fa2..6e2314c2e16 100755
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
@@ -18,6 +18,7 @@
#include "ObjectMgr.h" // for normalizePlayerName
#include "ChannelMgr.h"
+#include "Player.h"
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
{
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index a285b38f46f..5017a2a7c9d 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -45,6 +45,7 @@
#include "AccountMgr.h"
#include "DBCStores.h"
#include "LFGMgr.h"
+#include "CalendarMgr.h"
class LoginQueryHolder : public SQLQueryHolder
{
@@ -753,6 +754,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
}
sGuildFinderMgr->RemoveAllMembershipRequestsFromPlayer(guid);
+ sCalendarMgr->RemoveAllPlayerEventsAndInvites(guid);
Player::DeleteFromDB(guid, GetAccountId());
WorldPacket data(SMSG_CHAR_DELETE, 1);
@@ -827,7 +829,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
Player* pCurrChar = new Player(this);
// for send server info and strings (config)
- ChatHandler chH = ChatHandler(pCurrChar);
+ ChatHandler chH = ChatHandler(pCurrChar->GetSession());
// "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp
index 1cd86afc6d2..391a6fc0831 100755
--- a/src/server/game/Handlers/CombatHandler.cpp
+++ b/src/server/game/Handlers/CombatHandler.cpp
@@ -25,6 +25,7 @@
#include "ObjectDefines.h"
#include "Vehicle.h"
#include "VehicleDefines.h"
+#include "Player.h"
void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData)
{
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index 5df7b20b596..428eee37db0 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -645,10 +645,8 @@ void WorldSession::HandleGetMailList(WorldPacket& recvData)
case MAIL_CREATURE:
case MAIL_GAMEOBJECT:
case MAIL_AUCTION:
- data << uint32((*itr)->sender); // creature/gameobject entry, auction id
- break;
- case MAIL_ITEM: // item entry (?) sender = "Unknown", NYI
- data << uint32(0); // item entry
+ case MAIL_CALENDAR:
+ data << uint32((*itr)->sender); // creature/gameobject entry, auction id, calendar event id?
break;
}
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index bf260743d6a..2d34727bfbe 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -887,7 +887,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
}
if (player->isDebugAreaTriggers)
- ChatHandler(player).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, triggerId);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, triggerId);
if (sScriptMgr->OnAreaTrigger(player, atEntry))
return;
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 2d3af13597a..785f39c4a8e 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -31,6 +31,7 @@
#include "World.h"
#include "Group.h"
#include "SpellInfo.h"
+#include "Player.h"
void WorldSession::HandleDismissCritter(WorldPacket& recvData)
{
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 33824fa0b49..d221a8ac80d 100755
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -33,6 +33,7 @@
#include "ScriptMgr.h"
#include "GameObjectAI.h"
#include "SpellAuraEffects.h"
+#include "Player.h"
void WorldSession::HandleClientCastFlags(WorldPacket& recvPacket, uint8 castFlags, SpellCastTargets& targets)
{
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 904f571c9d3..68f6626b3b1 100755
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -25,6 +25,7 @@
#include "SpellMgr.h"
#include "SpellInfo.h"
#include "Group.h"
+#include "Player.h"
static Rates const qualityToRate[MAX_ITEM_QUALITY] =
{
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 929a1d81d57..108856d81b6 100755
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -26,6 +26,7 @@
#include "BattlegroundMgr.h"
#include "Item.h"
#include "AuctionHouseMgr.h"
+#include "CalendarMgr.h"
MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery(stationery)
{
@@ -39,10 +40,10 @@ MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery
m_messageType = MAIL_GAMEOBJECT;
m_senderId = sender->GetEntry();
break;
- case TYPEID_ITEM:
+ /*case TYPEID_ITEM:
m_messageType = MAIL_ITEM;
m_senderId = sender->GetEntry();
- break;
+ break;*/
case TYPEID_PLAYER:
m_messageType = MAIL_NORMAL;
m_senderId = sender->GetGUIDLow();
@@ -55,6 +56,11 @@ MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery
}
}
+MailSender::MailSender(CalendarEvent* sender)
+ : m_messageType(MAIL_CALENDAR), m_senderId(sender->GetEventId()), m_stationery(MAIL_STATIONERY_DEFAULT) // what stationery we should use here?
+{
+}
+
MailSender::MailSender(AuctionEntry* sender)
: m_messageType(MAIL_AUCTION), m_senderId(sender->GetHouseId()), m_stationery(MAIL_STATIONERY_AUCTION)
{
diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h
index a514315f748..74394ced53a 100755
--- a/src/server/game/Mails/Mail.h
+++ b/src/server/game/Mails/Mail.h
@@ -23,6 +23,7 @@
#include <map>
struct AuctionEntry;
+struct CalendarEvent;
class Item;
class Object;
class Player;
@@ -36,7 +37,7 @@ enum MailMessageType
MAIL_AUCTION = 2,
MAIL_CREATURE = 3, // client send CMSG_CREATURE_QUERY on this mailmessagetype
MAIL_GAMEOBJECT = 4, // client send CMSG_GAMEOBJECT_QUERY on this mailmessagetype
- MAIL_ITEM = 5 // client send CMSG_ITEM_QUERY on this mailmessagetype
+ MAIL_CALENDAR = 5
};
enum MailCheckMask
@@ -85,6 +86,7 @@ class MailSender
{
}
MailSender(Object* sender, MailStationery stationery = MAIL_STATIONERY_DEFAULT);
+ MailSender(CalendarEvent* sender);
MailSender(AuctionEntry* sender);
MailSender(Player* sender);
public: // Accessors
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index f3c1a335f5e..cf773ba7ead 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -33,6 +33,7 @@
#include "LFGMgr.h"
#include "DynamicTree.h"
#include "Vehicle.h"
+#include "Battleground.h"
union u_map_magic
{
@@ -144,7 +145,7 @@ void Map::LoadMap(int gx, int gy, bool reload)
// load grid map for base map
if (!m_parentMap->GridMaps[gx][gy])
- m_parentMap->EnsureGridCreated(GridCoord(63-gx, 63-gy));
+ m_parentMap->EnsureGridCreated_i(GridCoord(63-gx, 63-gy));
((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy));
GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy];
@@ -307,32 +308,34 @@ void Map::DeleteFromWorld(Player* player)
delete player;
}
+void Map::EnsureGridCreated(const GridCoord &p)
+{
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
+ EnsureGridCreated_i(p);
+}
+
//Create NGrid so the object can be added to it
//But object data is not loaded here
-void Map::EnsureGridCreated(const GridCoord &p)
+void Map::EnsureGridCreated_i(const GridCoord &p)
{
if (!getNGrid(p.x_coord, p.y_coord))
{
- TRINITY_GUARD(ACE_Thread_Mutex, Lock);
- if (!getNGrid(p.x_coord, p.y_coord))
- {
- sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
+ sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
- setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)),
- p.x_coord, p.y_coord);
+ setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)),
+ p.x_coord, p.y_coord);
- // build a linkage between this map and NGridType
- buildNGridLinkage(getNGrid(p.x_coord, p.y_coord));
+ // build a linkage between this map and NGridType
+ buildNGridLinkage(getNGrid(p.x_coord, p.y_coord));
- getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE);
+ getNGrid(p.x_coord, p.y_coord)->SetGridState(GRID_STATE_IDLE);
- //z coord
- int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord;
- int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord;
+ //z coord
+ int gx = (MAX_NUMBER_OF_GRIDS - 1) - p.x_coord;
+ int gy = (MAX_NUMBER_OF_GRIDS - 1) - p.y_coord;
- if (!GridMaps[gx][gy])
- LoadMapAndVMap(gx, gy);
- }
+ if (!GridMaps[gx][gy])
+ LoadMapAndVMap(gx, gy);
}
}
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 53588c527e3..e3fa1ac6ae4 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -500,6 +500,7 @@ class Map : public GridRefManager<NGridType>
bool IsGridLoaded(const GridCoord &) const;
void EnsureGridCreated(const GridCoord &);
+ void EnsureGridCreated_i(const GridCoord &);
bool EnsureGridLoaded(Cell const&);
void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object);
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 5fcca05361b..9ca8155e83b 100755
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -24,6 +24,7 @@
#include "InstanceSaveMgr.h"
#include "World.h"
#include "Group.h"
+#include "Player.h"
MapInstanced::MapInstanced(uint32 id, time_t expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL)
{
@@ -280,4 +281,4 @@ bool MapInstanced::CanEnter(Player* /*player*/)
{
//ASSERT(false);
return true;
-} \ No newline at end of file
+}
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 71f45a8b04e..0ead173ed95 100755
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -33,6 +33,7 @@
#include "Language.h"
#include "WorldPacket.h"
#include "Group.h"
+#include "Player.h"
extern GridState* si_GridStates[]; // debugging code, should be deleted some day
@@ -439,4 +440,4 @@ void MapManager::FreeInstanceId(uint32 instanceId)
SetNextInstanceId(instanceId);
_instanceIds[instanceId] = false;
-} \ No newline at end of file
+}
diff --git a/src/server/game/Maps/PhaseMgr.cpp b/src/server/game/Maps/PhaseMgr.cpp
index 194c89fc5c8..38c9b3fc6e9 100644
--- a/src/server/game/Maps/PhaseMgr.cpp
+++ b/src/server/game/Maps/PhaseMgr.cpp
@@ -18,6 +18,7 @@
#include "PhaseMgr.h"
#include "Chat.h"
#include "ObjectMgr.h"
+#include "Player.h"
//////////////////////////////////////////////////////////////////
// Updating
@@ -174,31 +175,31 @@ void PhaseMgr::UnRegisterPhasingAuraEffect(AuraEffect const* auraEffect)
void PhaseMgr::SendDebugReportToPlayer(Player* const debugger)
{
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_REPORT_STATUS, player->GetName().c_str(), player->GetZoneId(), player->getLevel(), player->GetTeamId(), _UpdateFlags);
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_REPORT_STATUS, player->GetName().c_str(), player->GetZoneId(), player->getLevel(), player->GetTeamId(), _UpdateFlags);
PhaseDefinitionStore::const_iterator itr = _PhaseDefinitionStore->find(player->GetZoneId());
if (itr == _PhaseDefinitionStore->end())
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_NO_DEFINITIONS, player->GetZoneId());
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_NO_DEFINITIONS, player->GetZoneId());
else
{
for (PhaseDefinitionContainer::const_iterator phase = itr->second.begin(); phase != itr->second.end(); ++phase)
{
if (CheckDefinition(&(*phase)))
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_SUCCESS, phase->entry, phase->IsNegatingPhasemask() ? "negated Phase" : "Phase", phase->phasemask);
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_SUCCESS, phase->entry, phase->IsNegatingPhasemask() ? "negated Phase" : "Phase", phase->phasemask);
else
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_FAILED, phase->phasemask, phase->entry, phase->zoneId);
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_FAILED, phase->phasemask, phase->entry, phase->zoneId);
if (phase->IsLastDefinition())
{
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_LAST_PHASE, phase->phasemask, phase->entry, phase->zoneId);
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_LAST_PHASE, phase->phasemask, phase->entry, phase->zoneId);
break;
}
}
}
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_LIST, phaseData._PhasemaskThroughDefinitions, phaseData._PhasemaskThroughAuras, phaseData._CustomPhasemask);
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_LIST, phaseData._PhasemaskThroughDefinitions, phaseData._PhasemaskThroughAuras, phaseData._CustomPhasemask);
- ChatHandler(debugger).PSendSysMessage(LANG_PHASING_PHASEMASK, phaseData.GetPhaseMaskForSpawn(), player->GetPhaseMask());
+ ChatHandler(debugger->GetSession()).PSendSysMessage(LANG_PHASING_PHASEMASK, phaseData.GetPhaseMaskForSpawn(), player->GetPhaseMask());
}
void PhaseMgr::SetCustomPhase(uint32 const phaseMask)
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 3cf4b1f96b7..6e6668ba4d6 100755
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -22,6 +22,7 @@
#include "World.h"
#include "SharedDefines.h"
#include "ScriptMgr.h"
+#include "Player.h"
namespace Trinity
{
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index b5b7bb4a6cf..057895898e5 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -3731,106 +3731,82 @@ enum ProfessionUI
MAX_SECONDARY_SKILLS = 5
};
-// Calendar - start
-
-enum CalendarFlags
-{
- CALENDAR_FLAG_ALL_ALLOWED = 0x001,
- CALENDAR_FLAG_INVITES_LOCKED = 0x010,
- CALENDAR_FLAG_WITHOUT_INVITES = 0x040,
- CALENDAR_FLAG_GUILD_ONLY = 0x400
-};
-
-enum CalendarActionData
-{
- CALENDAR_ACTION_NONE,
- CALENDAR_ACTION_ADD_EVENT,
- CALENDAR_ACTION_MODIFY_EVENT,
- CALENDAR_ACTION_REMOVE_EVENT,
- CALENDAR_ACTION_COPY_EVENT,
- CALENDAR_ACTION_ADD_EVENT_INVITE,
- CALENDAR_ACTION_MODIFY_EVENT_INVITE,
- CALENDAR_ACTION_MODIFY_MODERATOR_EVENT_INVITE,
- CALENDAR_ACTION_REMOVE_EVENT_INVITE,
- CALENDAR_ACTION_SIGNUP_TO_EVENT
-};
-
-enum CalendarModerationRank
-{
- CALENDAR_RANK_PLAYER,
- CALENDAR_RANK_MODERATOR,
- CALENDAR_RANK_OWNER
-};
-
-enum CalendarSendEventType
-{
- CALENDAR_SENDTYPE_GET,
- CALENDAR_SENDTYPE_ADD,
- CALENDAR_SENDTYPE_COPY
-};
-
-enum CalendarEventType
-{
- CALENDAR_TYPE_RAID,
- CALENDAR_TYPE_DUNGEON,
- CALENDAR_TYPE_PVP,
- CALENDAR_TYPE_MEETING,
- CALENDAR_TYPE_OTHER
-};
-
-enum CalendarInviteStatus
-{
- CALENDAR_STATUS_INVITED,
- CALENDAR_STATUS_ACCEPTED,
- CALENDAR_STATUS_DECLINED,
- CALENDAR_STATUS_TENTATIVE,
- CALENDAR_STATUS_OUT,
- CALENDAR_STATUS_STANDBY,
- CALENDAR_STATUS_CONFIRMED,
- CALENDAR_STATUS_NO_OWNER,
- CALENDAR_STATUS_8,
- CALENDAR_STATUS_9
-};
-
-enum CalendarError
-{
- CALENDAR_OK = 0,
- CALENDAR_ERROR_GUILD_EVENTS_EXCEEDED = 1,
- CALENDAR_ERROR_EVENTS_EXCEEDED = 2,
- CALENDAR_ERROR_SELF_INVITES_EXCEEDED = 3,
- CALENDAR_ERROR_OTHER_INVITES_EXCEEDED = 4,
- CALENDAR_ERROR_PERMISSIONS = 5,
- CALENDAR_ERROR_EVENT_INVALID = 6,
- CALENDAR_ERROR_NOT_INVITED = 7,
- CALENDAR_ERROR_INTERNAL = 8,
- CALENDAR_ERROR_GUILD_PLAYER_NOT_IN_GUILD = 9,
- CALENDAR_ERROR_ALREADY_INVITED_TO_EVENT_S = 10,
- CALENDAR_ERROR_PLAYER_NOT_FOUND = 11,
- CALENDAR_ERROR_NOT_ALLIED = 12,
- CALENDAR_ERROR_IGNORING_YOU_S = 13,
- CALENDAR_ERROR_INVITES_EXCEEDED = 14,
- CALENDAR_ERROR_INVALID_DATE = 16,
- CALENDAR_ERROR_INVALID_TIME = 17,
-
- CALENDAR_ERROR_NEEDS_TITLE = 19,
- CALENDAR_ERROR_EVENT_PASSED = 20,
- CALENDAR_ERROR_EVENT_LOCKED = 21,
- CALENDAR_ERROR_DELETE_CREATOR_FAILED = 22,
- CALENDAR_ERROR_SYSTEM_DISABLED = 24,
- CALENDAR_ERROR_RESTRICTED_ACCOUNT = 25,
- CALENDAR_ERROR_ARENA_EVENTS_EXCEEDED = 26,
- CALENDAR_ERROR_RESTRICTED_LEVEL = 27,
- CALENDAR_ERROR_USER_SQUELCHED = 28,
- CALENDAR_ERROR_NO_INVITE = 29,
-
- CALENDAR_ERROR_EVENT_WRONG_SERVER = 36,
- CALENDAR_ERROR_INVITE_WRONG_SERVER = 37,
- CALENDAR_ERROR_NO_GUILD_INVITES = 38,
- CALENDAR_ERROR_INVALID_SIGNUP = 39,
- CALENDAR_ERROR_NO_MODERATOR = 40
-};
-
-// Calendar - end
+enum DuelCompleteType
+{
+ DUEL_INTERRUPTED = 0,
+ DUEL_WON = 1,
+ DUEL_FLED = 2
+};
+// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
+enum BattlegroundQueueTypeId
+{
+ BATTLEGROUND_QUEUE_NONE = 0,
+ BATTLEGROUND_QUEUE_AV = 1,
+ BATTLEGROUND_QUEUE_WS = 2,
+ BATTLEGROUND_QUEUE_AB = 3,
+ BATTLEGROUND_QUEUE_EY = 4,
+ BATTLEGROUND_QUEUE_SA = 5,
+ BATTLEGROUND_QUEUE_IC = 6,
+ BATTLEGROUND_QUEUE_TP = 7,
+ BATTLEGROUND_QUEUE_BFG = 8,
+ BATTLEGROUND_QUEUE_RB = 9,
+ BATTLEGROUND_QUEUE_2v2 = 10,
+ BATTLEGROUND_QUEUE_3v3 = 11,
+ BATTLEGROUND_QUEUE_5v5 = 12,
+ MAX_BATTLEGROUND_QUEUE_TYPES
+};
+
+enum GroupJoinBattlegroundResult
+{
+ // positive values are indexes in BattlemasterList.dbc
+ ERR_GROUP_JOIN_BATTLEGROUND_FAIL = 0, // Your group has joined a battleground queue, but you are not eligible (showed for non existing BattlemasterList.dbc indexes)
+ ERR_BATTLEGROUND_NONE = -1, // not show anything
+ ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = -2, // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter.
+ ERR_ARENA_TEAM_PARTY_SIZE = -3, // Incorrect party size for this arena.
+ ERR_BATTLEGROUND_TOO_MANY_QUEUES = -4, // You can only be queued for 2 battles at once
+ ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = -5, // You cannot queue for a rated match while queued for other battles
+ ERR_BATTLEDGROUND_QUEUED_FOR_RATED = -6, // You cannot queue for another battle while queued for a rated arena match
+ ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = -7, // Your team has left the arena queue
+ ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = -8, // You can't do that in a battleground.
+ ERR_BATTLEGROUND_JOIN_XP_GAIN = -9, // wtf, doesn't exist in client...
+ ERR_BATTLEGROUND_JOIN_RANGE_INDEX = -10, // Cannot join the queue unless all members of your party are in the same battleground level range.
+ ERR_BATTLEGROUND_JOIN_TIMED_OUT = -11, // %s was unavailable to join the queue. (uint64 guid exist in client cache)
+ ERR_BATTLEGROUND_JOIN_FAILED = -12, // Join as a group failed (uint64 guid doesn't exist in client cache)
+ ERR_LFG_CANT_USE_BATTLEGROUND = -13, // You cannot queue for a battleground or arena while using the dungeon system.
+ ERR_IN_RANDOM_BG = -14, // Can't do that while in a Random Battleground queue.
+ ERR_IN_NON_RANDOM_BG = -15 // Can't queue for Random Battleground while in another Battleground queue.
+};
+
+enum PetNameInvalidReason
+{
+ // custom, not send
+ PET_NAME_SUCCESS = 0,
+
+ PET_NAME_INVALID = 1,
+ PET_NAME_NO_NAME = 2,
+ PET_NAME_TOO_SHORT = 3,
+ PET_NAME_TOO_LONG = 4,
+ PET_NAME_MIXED_LANGUAGES = 6,
+ PET_NAME_PROFANE = 7,
+ PET_NAME_RESERVED = 8,
+ PET_NAME_THREE_CONSECUTIVE = 11,
+ PET_NAME_INVALID_SPACE = 12,
+ PET_NAME_CONSECUTIVE_SPACES = 13,
+ PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14,
+ PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15,
+ PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
+};
+
+enum DungeonStatusFlag
+{
+ DUNGEON_STATUSFLAG_NORMAL = 0x01,
+ DUNGEON_STATUSFLAG_HEROIC = 0x02,
+
+ RAID_STATUSFLAG_10MAN_NORMAL = 0x01,
+ RAID_STATUSFLAG_25MAN_NORMAL = 0x02,
+ RAID_STATUSFLAG_10MAN_HEROIC = 0x04,
+ RAID_STATUSFLAG_25MAN_HEROIC = 0x08
+};
#define VOID_STORAGE_UNLOCK 100*GOLD
#define VOID_STORAGE_STORE_ITEM 25*GOLD
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
index 313a29a1b59..b070e21ed5b 100755
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
@@ -23,6 +23,7 @@
#include "ObjectAccessor.h"
#include "MoveSplineInit.h"
#include "MoveSpline.h"
+#include "Player.h"
#define MIN_QUIET_DISTANCE 28.0f
#define MAX_QUIET_DISTANCE 43.0f
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 93dae4c63f2..570a508f7d2 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -30,6 +30,7 @@
#include "SpellScript.h"
#include "GossipDef.h"
#include "CreatureAI.h"
+#include "Player.h"
// This is the global static registry of scripts.
template<class TScript>
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index b245039dc92..22625d74e10 100755
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -24,7 +24,6 @@
#include <ace/Atomic_Op.h>
#include "DBCStores.h"
-#include "Player.h"
#include "SharedDefines.h"
#include "World.h"
#include "Weather.h"
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 116f953b2a3..93efc8d2132 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -493,7 +493,7 @@ void OpcodeTable::Initialize()
DEFINE_OPCODE_HANDLER(CMSG_SET_PREFERED_CEMETERY, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
DEFINE_OPCODE_HANDLER(CMSG_SET_PRIMARY_TALENT_TREE, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
DEFINE_OPCODE_HANDLER(CMSG_SET_RELATIVE_POSITION, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
- DEFINE_OPCODE_HANDLER(CMSG_SET_SAVED_INSTANCE_EXTEND, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
+ DEFINE_OPCODE_HANDLER(CMSG_SET_SAVED_INSTANCE_EXTEND, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleSetSavedInstanceExtend );
DEFINE_OPCODE_HANDLER(CMSG_SET_SELECTION, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleSetSelectionOpcode );
DEFINE_OPCODE_HANDLER(CMSG_SET_TAXI_BENCHMARK_MODE, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleSetTaxiBenchmarkOpcode );
DEFINE_OPCODE_HANDLER(CMSG_SET_TITLE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleSetTitleOpcode );
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 885c7017d62..0c4220e9ea6 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -32,8 +32,6 @@
#include "Cryptography/BigNumber.h"
#include "Opcodes.h"
-class CalendarEvent;
-class CalendarInvite;
class Creature;
class GameObject;
class InstanceSave;
@@ -933,19 +931,9 @@ class WorldSession
void HandleCalendarGetNumPending(WorldPacket& recvData);
void HandleCalendarEventSignup(WorldPacket& recvData);
- void SendCalendarEvent(CalendarEvent const& calendarEvent, CalendarSendEventType sendEventType);
- void SendCalendarEventInvite(CalendarInvite const& invite, bool pending);
- void SendCalendarEventInviteAlert(CalendarEvent const& calendarEvent, CalendarInvite const& calendarInvite);
- void SendCalendarEventInviteRemove(CalendarInvite const& invite, uint32 flags);
- void SendCalendarEventInviteRemoveAlert(CalendarEvent const& calendarEvent, CalendarInviteStatus status);
- void SendCalendarEventRemovedAlert(CalendarEvent const& calendarEvent);
- void SendCalendarEventUpdateAlert(CalendarEvent const& calendarEvent, CalendarSendEventType sendEventType);
- void SendCalendarEventStatus(CalendarEvent const& calendarEvent, CalendarInvite const& invite);
- void SendCalendarEventModeratorStatusAlert(CalendarInvite const& invite);
- void SendCalendarClearPendingAction();
void SendCalendarRaidLockout(InstanceSave const* save, bool add);
void SendCalendarRaidLockoutUpdated(InstanceSave const* save);
- void SendCalendarCommandResult(CalendarError err, char const* param = NULL);
+ void HandleSetSavedInstanceExtend(WorldPacket& recvData);
// Void Storage
void HandleVoidStorageUnlock(WorldPacket& recvData);
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index df3c2d77c02..73f19ba3f3c 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -29,7 +29,7 @@
#include "WorldSocket.h"
#include "Common.h"
-
+#include "Player.h"
#include "Util.h"
#include "World.h"
#include "WorldPacket.h"
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index d66d60fece9..4c22328cd26 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5476,7 +5476,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (target->GetCharmerGUID())
return SPELL_FAILED_CHARMED;
-
+
if (target->GetOwner() && target->GetOwner()->GetTypeId() == TYPEID_PLAYER)
return SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED;
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 9faf9a1f850..65eea69714a 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -21,7 +21,8 @@
#include "Spell.h"
#include "DBCStores.h"
#include "ConditionMgr.h"
-#include "Object.h"
+#include "Player.h"
+#include "Battleground.h"
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
{
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 636ef607e2b..9abb82bbc4b 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -21,6 +21,7 @@
#include "SharedDefines.h"
#include "Util.h"
#include "DBCStructure.h"
+#include "SpellAuraDefines.h"
class Unit;
class Player;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 600b9dc65a3..38e2155ba4a 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -32,6 +32,7 @@
#include "BattlegroundIC.h"
#include "BattlefieldWG.h"
#include "BattlefieldMgr.h"
+#include "Player.h"
bool IsPrimaryProfessionSkill(uint32 skill)
{
@@ -80,6 +81,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
// Gnaw
else if (spellproto->Id == 47481)
return DIMINISHING_CONTROLLED_STUN;
+ // ToC Icehowl Arctic Breath
+ else if (spellproto->SpellVisual[0] == 14153)
+ return DIMINISHING_NONE;
break;
}
// Event spells
@@ -373,7 +377,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (msg)
{
if (player)
- ChatHandler(player).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
+ ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
else
sLog->outError(LOG_FILTER_SQL, "Craft spell %u not have create item entry.", spellInfo->Id);
}
@@ -387,7 +391,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (msg)
{
if (player)
- ChatHandler(player).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
+ ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
else
sLog->outError(LOG_FILTER_SQL, "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
}
@@ -405,7 +409,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (msg)
{
if (player)
- ChatHandler(player).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
+ ChatHandler(player->GetSession()).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
else
sLog->outError(LOG_FILTER_SQL, "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
}
@@ -425,7 +429,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (msg)
{
if (player)
- ChatHandler(player).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
+ ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
else
sLog->outError(LOG_FILTER_SQL, "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
}
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index ffcb65bb14b..89dd28f6a30 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -24,6 +24,7 @@
#include "WorldSession.h"
#include "Chat.h"
#include "World.h"
+#include "Player.h"
inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; }
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index fce078a0a14..6148005ca6b 100755
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -25,6 +25,7 @@
#include "Log.h"
#include "ObjectMgr.h"
#include "AutoPtr.h"
+#include "Player.h"
namespace WeatherMgr
{
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 15a724e69d1..6b6e94f75fb 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "AccountMgr.h"
#include "Chat.h"
+#include "Player.h"
class account_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp
index a5dacc7bb00..01246630f62 100644
--- a/src/server/scripts/Commands/cs_achievement.cpp
+++ b/src/server/scripts/Commands/cs_achievement.cpp
@@ -24,6 +24,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
+#include "Player.h"
class achievement_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp
index bfb52d342e1..af04a3b7989 100644
--- a/src/server/scripts/Commands/cs_ban.cpp
+++ b/src/server/scripts/Commands/cs_ban.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "AccountMgr.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
+#include "Player.h"
class ban_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_cast.cpp b/src/server/scripts/Commands/cs_cast.cpp
index 70cfb8cb830..5a45f980c2c 100644
--- a/src/server/scripts/Commands/cs_cast.cpp
+++ b/src/server/scripts/Commands/cs_cast.cpp
@@ -24,6 +24,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
+#include "Player.h"
class cast_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp
index d0bd7503216..16f0537d5c6 100644
--- a/src/server/scripts/Commands/cs_character.cpp
+++ b/src/server/scripts/Commands/cs_character.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "AccountMgr.h"
#include "ObjectMgr.h"
#include "PlayerDump.h"
+#include "Player.h"
class character_commandscript : public CommandScript
{
@@ -238,11 +239,11 @@ public:
if (handler->needReportToTarget(player))
{
if (oldLevel == newLevel)
- ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
else if (oldLevel < newLevel)
- ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
else // if (oldlevel > newlevel)
- ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
}
}
else
diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp
index 57293ef5e84..12a3b1bfb7d 100644
--- a/src/server/scripts/Commands/cs_cheat.cpp
+++ b/src/server/scripts/Commands/cs_cheat.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
+#include "Player.h"
class cheat_commandscript : public CommandScript
{
@@ -233,7 +234,7 @@ public:
chr->SetTaxiCheater(true);
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
- ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
+ ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
return true;
}
@@ -242,7 +243,7 @@ public:
chr->SetTaxiCheater(false);
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
- ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
+ ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
return true;
}
@@ -271,13 +272,13 @@ public:
{
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
- ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
+ ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
}
else
{
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
- ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
+ ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
}
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp
index 00214ed4b0f..061914d24ff 100644
--- a/src/server/scripts/Commands/cs_disable.cpp
+++ b/src/server/scripts/Commands/cs_disable.cpp
@@ -27,6 +27,8 @@ EndScriptData */
#include "Chat.h"
#include "DisableMgr.h"
#include "OutdoorPvP.h"
+#include "SpellMgr.h"
+#include "Player.h"
class disable_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp
index 4f6acd7b629..8d053a2f061 100644
--- a/src/server/scripts/Commands/cs_event.cpp
+++ b/src/server/scripts/Commands/cs_event.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "GameEventMgr.h"
#include "Chat.h"
+#include "Player.h"
class event_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index 087a72764dc..d355edc9514 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "Chat.h"
#include "AccountMgr.h"
#include "World.h"
+#include "Player.h"
class gm_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp
index b0f1eed5d5c..34e28d4bec3 100644
--- a/src/server/scripts/Commands/cs_go.cpp
+++ b/src/server/scripts/Commands/cs_go.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "MapManager.h"
#include "TicketMgr.h"
#include "Chat.h"
+#include "Player.h"
class go_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index fd24e618ef0..c957db3f22a 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "PoolMgr.h"
#include "MapManager.h"
#include "Chat.h"
+#include "Player.h"
class gobject_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp
index 4edc5f6fea0..76f5badb707 100644
--- a/src/server/scripts/Commands/cs_honor.cpp
+++ b/src/server/scripts/Commands/cs_honor.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
+#include "Player.h"
class honor_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp
index f51727af2ef..ffd8a5a7cf7 100644
--- a/src/server/scripts/Commands/cs_instance.cpp
+++ b/src/server/scripts/Commands/cs_instance.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "InstanceSaveMgr.h"
#include "InstanceScript.h"
#include "MapManager.h"
+#include "Player.h"
class instance_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp
index dcfa6b6b04c..459bc492f1b 100644
--- a/src/server/scripts/Commands/cs_learn.cpp
+++ b/src/server/scripts/Commands/cs_learn.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ObjectMgr.h"
#include "SpellMgr.h"
#include "SpellInfo.h"
+#include "Player.h"
class learn_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp
index 5f1ed59176f..6739694f228 100644
--- a/src/server/scripts/Commands/cs_lfg.cpp
+++ b/src/server/scripts/Commands/cs_lfg.cpp
@@ -19,6 +19,7 @@
#include "Chat.h"
#include "LFGMgr.h"
#include "Group.h"
+#include "Player.h"
void GetPlayerInfo(ChatHandler* handler, Player* player)
{
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 5a0fd28e81a..641c28c3dd3 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "SpellAuraEffects.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
+#include "Player.h"
class list_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp
index e1bf34fb6cf..92246184fe1 100644
--- a/src/server/scripts/Commands/cs_lookup.cpp
+++ b/src/server/scripts/Commands/cs_lookup.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "GameEventMgr.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
+#include "Player.h"
class lookup_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp
index de2fcf26943..d7c2f6117ac 100644
--- a/src/server/scripts/Commands/cs_message.cpp
+++ b/src/server/scripts/Commands/cs_message.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "ChannelMgr.h"
+#include "Player.h"
class message_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index cfa5f6d6f3d..0db7c9994cf 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -29,6 +29,7 @@
#include "TargetedMovementGenerator.h"
#include "WeatherMgr.h"
#include "ace/INET_Addr.h"
+#include "Player.h"
class misc_commandscript : public CommandScript
{
@@ -495,7 +496,7 @@ public:
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
if (handler->needReportToTarget(target))
- ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
// stop flight if need
if (target->isInFlight())
@@ -606,7 +607,7 @@ public:
handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
if (handler->needReportToTarget(player))
- ChatHandler(player).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
// stop flight if need
if (player->isInFlight())
@@ -1809,7 +1810,7 @@ public:
int64 muteTime = time(NULL) + notSpeakTime * MINUTE;
target->GetSession()->m_muteTime = muteTime;
stmt->setInt64(0, muteTime);
- ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str());
}
else
{
@@ -1865,7 +1866,7 @@ public:
LoginDatabase.Execute(stmt);
if (target)
- ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
std::string nameLink = handler->playerLink(targetName);
@@ -2142,7 +2143,7 @@ public:
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- ChatHandler(target).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str());
return true;
}
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 5c9280e5956..9799062d80c 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ObjectMgr.h"
#include "Chat.h"
#include <stdlib.h>
+#include "Player.h"
class modify_commandscript : public CommandScript
{
@@ -107,7 +108,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), hp, hpm);
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm);
target->SetMaxHealth(hpm);
target->SetHealth(hp);
@@ -145,7 +146,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), mana, manam);
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
target->SetMaxPower(POWER_MANA, manam);
target->SetPower(POWER_MANA, mana);
@@ -194,7 +195,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energy/10, energym/10);
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
target->SetMaxPower(POWER_ENERGY, energym);
target->SetPower(POWER_ENERGY, energy);
@@ -245,7 +246,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), rage/10, ragem/10);
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
target->SetMaxPower(POWER_RAGE, ragem);
target->SetPower(POWER_RAGE, rage);
@@ -279,7 +280,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target).c_str(), rune/10, runem/10);
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
target->SetMaxPower(POWER_RUNIC_POWER, runem);
target->SetPower(POWER_RUNIC_POWER, rune);
@@ -409,7 +410,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellflatid, val, mark, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark);
WorldPacket data(SMSG_SET_FLAT_SPELL_MODIFIER, (1+1+2+2));
data << uint8(spellflatid);
@@ -505,7 +506,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_ASPEED, ASpeed, targetNameLink.c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
target->SetSpeed(MOVE_WALK, ASpeed, true);
target->SetSpeed(MOVE_RUN, ASpeed, true);
@@ -553,7 +554,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SPEED, Speed, targetNameLink.c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
target->SetSpeed(MOVE_RUN, Speed, true);
@@ -598,7 +599,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SWIM_SPEED, Swim, targetNameLink.c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
target->SetSpeed(MOVE_SWIM, Swim, true);
@@ -643,7 +644,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_BACK_SPEED, BSpeed, targetNameLink.c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
target->SetSpeed(MOVE_RUN_BACK, BSpeed, true);
@@ -679,7 +680,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, FSpeed, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
target->SetSpeed(MOVE_FLIGHT, FSpeed, true);
@@ -716,7 +717,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str());
if (handler->needReportToTarget(player))
- (ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
}
target->SetObjectScale(Scale);
@@ -964,7 +965,7 @@ public:
handler->PSendSysMessage(LANG_YOU_GIVE_MOUNT, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str());
target->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP);
target->Mount(mId);
@@ -1020,7 +1021,7 @@ public:
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
target->SetMoney(0);
}
@@ -1032,7 +1033,7 @@ public:
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, moneyToAddMsg, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), moneyToAddMsg);
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), moneyToAddMsg);
target->SetMoney(newmoney);
}
}
@@ -1040,7 +1041,7 @@ public:
{
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, uint32(moneyToAdd), handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(moneyToAdd));
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(moneyToAdd));
if (moneyToAdd >= MAX_MONEY_AMOUNT)
target->SetMoney(MAX_MONEY_AMOUNT);
@@ -1381,7 +1382,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target).c_str(), gender_full);
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
return true;
}
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index d4d4adad6a0..f4eab77c5b6 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -29,6 +29,7 @@ EndScriptData */
#include "CreatureGroups.h"
#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand
#include "CreatureAI.h"
+#include "Player.h"
class npc_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp
index c2ec563b3c7..5776022e59f 100644
--- a/src/server/scripts/Commands/cs_quest.cpp
+++ b/src/server/scripts/Commands/cs_quest.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
+#include "Player.h"
class quest_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index b147543bb1a..265f5f5f5ce 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "ObjectAccessor.h"
+#include "Player.h"
class reset_commandscript : public CommandScript
{
@@ -165,7 +166,7 @@ public:
{
target->resetSpells(/* bool myClassOnly */);
- ChatHandler(target).SendSysMessage(LANG_RESET_SPELLS);
+ ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str());
}
@@ -217,7 +218,7 @@ public:
creature->ToPet()->resetTalents();
owner->ToPlayer()->SendTalentsInfoData(true);
- ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS);
+ ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer())
handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str());
}
@@ -233,7 +234,7 @@ public:
{
target->ResetTalents(true);
target->SendTalentsInfoData(false);
- ChatHandler(target).SendSysMessage(LANG_RESET_TALENTS);
+ ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str());
diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp
index db1995ebb6e..131d7a4149a 100644
--- a/src/server/scripts/Commands/cs_server.cpp
+++ b/src/server/scripts/Commands/cs_server.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "SystemConfig.h"
#include "Config.h"
#include "ObjectAccessor.h"
+#include "Player.h"
class server_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index 8f390d17cd4..553559afd1c 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "MapManager.h"
#include "Chat.h"
#include "Group.h"
+#include "Player.h"
class tele_commandscript : public CommandScript
{
@@ -178,7 +179,7 @@ public:
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", tele->name.c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
+ ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
// stop flight if need
if (target->isInFlight())
@@ -274,7 +275,7 @@ public:
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
if (handler->needReportToTarget(player))
- (ChatHandler(player)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
+ ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
// stop flight if need
if (player->isInFlight())
diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp
index c99931a90fb..72804ed5727 100644
--- a/src/server/scripts/Commands/cs_ticket.cpp
+++ b/src/server/scripts/Commands/cs_ticket.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "AccountMgr.h"
#include "ObjectMgr.h"
#include "TicketMgr.h"
+#include "Player.h"
class ticket_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp
index 046841128e8..6ab1b952f50 100644
--- a/src/server/scripts/Commands/cs_titles.cpp
+++ b/src/server/scripts/Commands/cs_titles.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
+#include "Player.h"
class titles_commandscript : public CommandScript
{
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index 259845d82ae..86b1a300afd 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ObjectMgr.h"
#include "WaypointManager.h"
#include "Chat.h"
+#include "Player.h"
class wp_commandscript : public CommandScript
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index 263897edfad..5c65531c615 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -20,6 +20,7 @@
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "blackrock_depths.h"
+#include "Player.h"
//go_shadowforge_brazier
class go_shadowforge_brazier : public GameObjectScript
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
index 347aff2ce0b..ecdcb4b0b82 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -20,6 +20,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "blackrock_depths.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
index 8cc42baff8e..359f218cd5c 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
enum Says
{
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
index 30638e9edeb..a93519bcbe7 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
enum Says
{
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
index 888171c5415..ae9071f3fd0 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "deadmines.h"
#include "Spell.h"
+#include "Player.h"
/*#####
# item_Defias_Gunpowder
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
index c2dab8d6c9e..7d7329ae255 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "deadmines.h"
+#include "TemporarySummon.h"
enum Sounds
{
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
index 8f79c4973f7..71cd69caeb5 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
@@ -27,6 +27,7 @@ Script Data End */
#include "ScriptedGossip.h"
#include "gnomeregan.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
#define GOSSIP_START_EVENT "I am ready to being"
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
index 931c0bb90fc..2e520351150 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "gnomeregan.h"
+#include "Player.h"
#define MAX_ENCOUNTER 1
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
index c6587c3cd8a..c3e571ad376 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "karazhan.h"
+#include "Player.h"
#define EMOTE_PHASE_PORTAL -1532089
#define EMOTE_PHASE_BANISH -1532090
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index a4f4f603206..2c1d4ac0e71 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "karazhan.h"
+#include "Player.h"
/***********************************/
/*** OPERA WIZARD OF OZ EVENT *****/
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 3bdfeab30da..d2b83c6ac54 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "karazhan.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
# npc_barnesAI
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index 7fbd329ab87..047809286f7 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -140,12 +140,7 @@ public:
Phase = 0;
if (instance)
- {
instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
- instance->HandleGameObject(instance->GetData64(DATA_KAEL_DOOR), true);
- // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
- // Small door opened after event are expected to be closed by default
- }
}
void JustDied(Unit* /*killer*/)
@@ -155,12 +150,11 @@ public:
if (!instance)
return;
- // Open the encounter door
- instance->HandleGameObject(instance->GetData64(DATA_KAEL_DOOR), true);
+ instance->SetData(DATA_KAELTHAS_EVENT, DONE);
// Enable the Translocation Orb Exit
if (GameObject* escapeOrb = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ESCAPE_ORB)))
- escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
@@ -173,9 +167,8 @@ public:
{
if (!instance)
return;
-
- //Close the encounter door, open it in JustDied/Reset
- instance->HandleGameObject(instance->GetData64(DATA_KAEL_DOOR), false);
+
+ instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
}
void MoveInLineOfSight(Unit* who)
@@ -367,14 +360,10 @@ public:
FirstGravityLapse = false;
if (instance)
- {
- instance->HandleGameObject(instance->GetData64(DATA_KAEL_STATUE_LEFT), true);
- instance->HandleGameObject(instance->GetData64(DATA_KAEL_STATUE_RIGHT), true);
- }
- }else
- {
- DoScriptText(SAY_RECAST_GRAVITY, me);
+ instance->SetData(DATA_KAELTHAS_STATUES, 1);
}
+ else
+ DoScriptText(SAY_RECAST_GRAVITY, me);
DoCast(me, SPELL_GRAVITY_LAPSE_INITIAL);
GravityLapseTimer = 2000 + diff;// Don't interrupt the visual spell
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 430bbb79bde..74d1b5b9f1b 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -115,10 +115,6 @@ public:
}
}
- instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), true);
- // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
- // Small door opened after event are expected to be closed by default
-
// Set Inst data for encounter
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
} else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA);
@@ -196,10 +192,8 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
-
if (instance)
- instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), false);
- //Close the encounter door, open it in JustDied/Reset
+ instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/)
@@ -237,8 +231,6 @@ public:
return;
instance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete!
- instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), true); // Open the encounter door
- instance->HandleGameObject(instance->GetData64(DATA_SELIN_DOOR), true); // Open the door leading further in
ShatterRemainingCrystals();
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index da8b24c3985..da15f9020da 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -84,6 +84,7 @@ public:
uint64 KaelDoorGUID;
uint64 KaelStatue[2];
uint64 EscapeOrbGUID;
+ uint32 StatuesState;
bool InitializedItr;
@@ -105,6 +106,7 @@ public:
KaelStatue[0] = 0;
KaelStatue[1] = 0;
EscapeOrbGUID = 0;
+ StatuesState = 0;
InitializedItr = false;
}
@@ -142,21 +144,35 @@ public:
switch (identifier)
{
case DATA_SELIN_EVENT:
+ if (data == DONE)
+ {
+ HandleGameObject(SelinEncounterDoorGUID, true);
+ HandleGameObject(SelinDoorGUID, true);
+ }
+ else if (data == IN_PROGRESS)
+ HandleGameObject(SelinEncounterDoorGUID, false);
+ else if (data == NOT_STARTED)
+ HandleGameObject(SelinEncounterDoorGUID, true);
+
Encounter[0] = data;
break;
case DATA_VEXALLUS_EVENT:
if (data == DONE)
- DoUseDoorOrButton(VexallusDoorGUID);
+ HandleGameObject(VexallusDoorGUID, true);
Encounter[1] = data;
break;
case DATA_DELRISSA_EVENT:
if (data == DONE)
- DoUseDoorOrButton(DelrissaDoorGUID);
+ HandleGameObject(DelrissaDoorGUID, true);
if (data == IN_PROGRESS)
DelrissaDeathCount = 0;
Encounter[2] = data;
break;
case DATA_KAELTHAS_EVENT:
+ if (data == NOT_STARTED || data == DONE)
+ HandleGameObject(KaelDoorGUID, true);
+ else if (data == IN_PROGRESS)
+ HandleGameObject(KaelDoorGUID, false);
Encounter[3] = data;
break;
case DATA_DELRISSA_DEATH_COUNT:
@@ -165,7 +181,14 @@ public:
else
DelrissaDeathCount = 0;
break;
+ case DATA_KAELTHAS_STATUES:
+ HandleGameObject(KaelStatue[0], data);
+ HandleGameObject(KaelStatue[1], data);
+ StatuesState = data;
+ break;
}
+
+ SaveToDB();
}
void OnCreatureCreate(Creature* creature)
@@ -215,6 +238,44 @@ public:
}
}
+ std::string GetSaveData()
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << Encounter[0] << ' ' << Encounter[1] << ' ' << Encounter[2] << ' ' << Encounter[3] << ' ' << StatuesState;
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
+ }
+
+ void Load(const char* str)
+ {
+ if (!str)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(str);
+
+ std::istringstream loadStream(str);
+
+ for (uint32 i = 0; i < MAX_ENCOUNTER; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetData(i, tmpState);
+ }
+
+ loadStream >> StatuesState;
+ SetData(DATA_KAELTHAS_STATUES, StatuesState);
+
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
+
uint64 GetData64(uint32 identifier)
{
switch (identifier)
@@ -225,10 +286,6 @@ public:
return DelrissaGUID;
case DATA_VEXALLUS_DOOR:
return VexallusDoorGUID;
- case DATA_SELIN_DOOR:
- return SelinDoorGUID;
- case DATA_SELIN_ENCOUNTER_DOOR:
- return SelinEncounterDoorGUID;
case DATA_DELRISSA_DOOR:
return DelrissaDoorGUID;
case DATA_KAEL_DOOR:
@@ -239,7 +296,6 @@ public:
return KaelStatue[1];
case DATA_ESCAPE_ORB:
return EscapeOrbGUID;
-
case DATA_FEL_CRYSTAL:
{
if (FelCrystals.empty())
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
index 64b6c8d75b2..37b2dd18afe 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*######
## npc_kalecgos
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
index 660e58d325a..41b847635d7 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
@@ -23,28 +23,26 @@
enum Data
{
- DATA_SELIN_EVENT = 0,
- DATA_VEXALLUS_EVENT = 1,
- DATA_DELRISSA_EVENT = 2,
- DATA_KAELTHAS_EVENT = 3,
-
- DATA_SELIN = 4,
- DATA_FEL_CRYSTAL = 5,
- DATA_FEL_CRYSTAL_SIZE = 6,
-
- DATA_VEXALLUS_DOOR = 7,
- DATA_SELIN_DOOR = 8,
- DATA_DELRISSA = 9,
- DATA_DELRISSA_DOOR = 10,
- DATA_SELIN_ENCOUNTER_DOOR = 11,
-
- DATA_KAEL_DOOR = 12,
- DATA_KAEL_STATUE_LEFT = 13,
- DATA_KAEL_STATUE_RIGHT = 14,
-
- DATA_DELRISSA_DEATH_COUNT = 15,
-
- DATA_ESCAPE_ORB = 16
+ DATA_SELIN_EVENT,
+ DATA_VEXALLUS_EVENT,
+ DATA_DELRISSA_EVENT,
+ DATA_KAELTHAS_EVENT,
+
+ DATA_SELIN,
+ DATA_FEL_CRYSTAL,
+ DATA_FEL_CRYSTAL_SIZE,
+
+ DATA_VEXALLUS_DOOR,
+ DATA_DELRISSA,
+ DATA_DELRISSA_DOOR,
+
+ DATA_KAEL_DOOR,
+ DATA_KAEL_STATUE_LEFT,
+ DATA_KAEL_STATUE_RIGHT,
+
+ DATA_DELRISSA_DEATH_COUNT,
+ DATA_KAELTHAS_STATUES,
+ DATA_ESCAPE_ORB
};
#endif
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
index f085e15fcb7..c7d6b31d2ea 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "molten_core.h"
+#include "Player.h"
enum Texts
{
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
index f6a6e647a1d..33719f8f1f6 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "InstanceScript.h"
#include "CreatureAI.h"
#include "molten_core.h"
+#include "TemporarySummon.h"
Position const SummonPositions[10] =
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index c17a059d007..a65edcd63bc 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -23,6 +23,7 @@
#include "ScriptedEscortAI.h"
#include "CombatAI.h"
#include "PassiveAI.h"
+#include "Player.h"
/*######
##Quest 12848
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index b4c6268a43e..51581b53e5f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
//How to win friends and influence enemies
// texts signed for creature 28939 but used for 28939, 28940, 28610
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 4d1552b932e..686f5954e77 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
#define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell
//Light of Dawn
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
index 81211f36df3..6e7f7e103c5 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "PassiveAI.h"
+#include "Player.h"
/*####
## npc_valkyr_battle_maiden
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 34c1c9b2c83..40c8d4ee649 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "SpellMgr.h"
#include "scarlet_monastery.h"
#include "LFGMgr.h"
+#include "Player.h"
//this texts are already used by 3975 and 3976
enum Says
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index b405f9eba85..f219875b057 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "shadowfang_keep.h"
+#include "TemporarySummon.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
index 9ee3428c7dd..5fc41b3b267 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "SpellAuraEffects.h"
#include "ScriptedEscortAI.h"
#include "shadowfang_keep.h"
+#include "Player.h"
/*######
## npc_shadowfang_prisoner
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp
index 47c6b66f4bb..96e59a657a3 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "stratholme.h"
+#include "Player.h"
/*#####
# Additional:
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index 98df9638bae..17eedb87896 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "stratholme.h"
+#include "Player.h"
#define GO_SERVICE_ENTRANCE 175368
#define GO_GAUNTLET_GATE1 175357
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index 9b4591bc633..188739a934d 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "stratholme.h"
#include "Group.h"
+#include "Player.h"
/*######
## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist)
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
index 83ff86f5b88..040e2153c2d 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "sunken_temple.h"
+#include "Player.h"
/*#####
# at_malfurion_Stormrage_trigger
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 3e503a547d8..53696fbed7a 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "sunwell_plateau.h"
+#include "Player.h"
enum Yells
{
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 8dabe2b842d..febbc8bc18e 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "sunwell_plateau.h"
#include <math.h>
+#include "Player.h"
/*** Speech and sounds***/
enum Yells
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index 9fd0a5eb5d8..6ce1bf7a414 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -24,6 +24,7 @@ SDComment: all sounds, black hole effect triggers to often (46228)
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "sunwell_plateau.h"
+#include "Player.h"
// Muru & Entropius's spells
enum Spells
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index bea73837304..bf31557d8a8 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "sunwell_plateau.h"
+#include "Player.h"
#define MAX_ENCOUNTER 6
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index 74fad4f94d8..0b7a62f6563 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -29,6 +29,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "uldaman.h"
+#include "Player.h"
#define SAY_AGGRO "Who dares awaken Archaedas? Who dares the wrath of the makers!"
#define SOUND_AGGRO 5855
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
index 2b8d4e37b65..d86da3efce5 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "uldaman.h"
+#include "Player.h"
/*######
## mob_jadespine_basilisk
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
index 235bec7cc8a..b113c7c68b9 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "zulaman.h"
+#include "Player.h"
#define MAX_ENCOUNTER 6
#define RAND_VENDOR 2
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
index f0bea065eb6..2c9b838a2ed 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "zulaman.h"
+#include "Player.h"
/*######
## npc_forest_frog
diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
index 1847de91d14..604a88fc70a 100644
--- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_professor_phizzlethorpe
diff --git a/src/server/scripts/EasternKingdoms/blasted_lands.cpp b/src/server/scripts/EasternKingdoms/blasted_lands.cpp
index 75109f3a2f6..47fb8298ca7 100644
--- a/src/server/scripts/EasternKingdoms/blasted_lands.cpp
+++ b/src/server/scripts/EasternKingdoms/blasted_lands.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*######
## npc_deathly_usher
diff --git a/src/server/scripts/EasternKingdoms/burning_steppes.cpp b/src/server/scripts/EasternKingdoms/burning_steppes.cpp
index 2ef43ee67ed..740d01fd9e6 100644
--- a/src/server/scripts/EasternKingdoms/burning_steppes.cpp
+++ b/src/server/scripts/EasternKingdoms/burning_steppes.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
void AddSC_burning_steppes()
diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp
index e5af5344dc1..fbb98979e77 100644
--- a/src/server/scripts/EasternKingdoms/duskwood.cpp
+++ b/src/server/scripts/EasternKingdoms/duskwood.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
enum Yells
{
diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp
index 7ca76e38fce..c5dcbaba01d 100644
--- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
class mobs_ghoul_flayer : public CreatureScript
{
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index d69ae3454b4..f62273e583d 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -35,6 +35,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## Quest 9686 Second Trial
diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp
index 93141f2d82c..17e5a418c6e 100644
--- a/src/server/scripts/EasternKingdoms/ghostlands.cpp
+++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp
@@ -32,6 +32,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_rathis_tomber
diff --git a/src/server/scripts/EasternKingdoms/hinterlands.cpp b/src/server/scripts/EasternKingdoms/hinterlands.cpp
index 096c0f2e2a6..0398779655f 100644
--- a/src/server/scripts/EasternKingdoms/hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/hinterlands.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_00x09hl
diff --git a/src/server/scripts/EasternKingdoms/ironforge.cpp b/src/server/scripts/EasternKingdoms/ironforge.cpp
index 9cb9ef63693..26006d3bed9 100644
--- a/src/server/scripts/EasternKingdoms/ironforge.cpp
+++ b/src/server/scripts/EasternKingdoms/ironforge.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
void AddSC_ironforge()
{
diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
index e448ccda14c..ca5385caffe 100644
--- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
/*######
## npc_converted_sentry
diff --git a/src/server/scripts/EasternKingdoms/loch_modan.cpp b/src/server/scripts/EasternKingdoms/loch_modan.cpp
index c5571560b54..b74ac1b5de9 100644
--- a/src/server/scripts/EasternKingdoms/loch_modan.cpp
+++ b/src/server/scripts/EasternKingdoms/loch_modan.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
void AddSC_loch_modan()
{
diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
index 3d47a8e8ed6..1b694f10958 100644
--- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
@@ -24,6 +24,7 @@ Script Data End */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
void AddSC_redridge_mountains()
{
diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp
index 954f21f73f5..e56a1e72294 100644
--- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp
+++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
/*#######
# npc_blood_knight_stillblade
diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
index 8f5925405ec..3a6fac58945 100644
--- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_deathstalker_erland
diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
index f6afed67dff..2f3c00cf67a 100644
--- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
void AddSC_stormwind_city()
diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp
index 40f046a5075..26e0dffb5af 100644
--- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp
+++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
/*######
## mob_yenniku
diff --git a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp
index 9724588039f..78e4e055ff2 100644
--- a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp
+++ b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp
@@ -19,6 +19,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
void AddSC_swamp_of_sorrows()
{
diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
index cbefd115739..6a8845ee8b4 100644
--- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
@@ -28,6 +28,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
void AddSC_tirisfal_glades()
diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp
index 0d44db01592..6aaf2df0b22 100644
--- a/src/server/scripts/EasternKingdoms/undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/undercity.cpp
@@ -32,6 +32,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*######
## npc_lady_sylvanas_windrunner
diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
index 31dea10453a..285e5bb4e17 100644
--- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npcs_dithers_and_arbington
diff --git a/src/server/scripts/EasternKingdoms/westfall.cpp b/src/server/scripts/EasternKingdoms/westfall.cpp
index 478c5f6c0d6..c6cf1b4361c 100644
--- a/src/server/scripts/EasternKingdoms/westfall.cpp
+++ b/src/server/scripts/EasternKingdoms/westfall.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_daphne_stilwell
diff --git a/src/server/scripts/EasternKingdoms/wetlands.cpp b/src/server/scripts/EasternKingdoms/wetlands.cpp
index 34e6e7c9ddf..98f7b0ac967 100644
--- a/src/server/scripts/EasternKingdoms/wetlands.cpp
+++ b/src/server/scripts/EasternKingdoms/wetlands.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_tapoke_slim_jahn
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp
index 763961271d8..28d033f9d48 100644
--- a/src/server/scripts/Events/childrens_week.cpp
+++ b/src/server/scripts/Events/childrens_week.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellAuras.h"
+#include "Player.h"
enum Orphans
{
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 17b9aae732b..1ef15c0ca61 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
// **** This script is designed as an example for others to build on ****
// **** Please modify whatever you'd like to as this script is only for developement ****
diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp
index 20e4c5614e9..8cf0dad25d2 100644
--- a/src/server/scripts/Examples/example_escort.cpp
+++ b/src/server/scripts/Examples/example_escort.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
enum eEnums
{
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index d6936c8fb9e..352c43fc1de 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
#include <cstring>
enum eEnums
diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp
index 3aa4bac3f1e..5ff66c4a7ed 100644
--- a/src/server/scripts/Examples/example_misc.cpp
+++ b/src/server/scripts/Examples/example_misc.cpp
@@ -24,6 +24,7 @@ SDCategory: Script Examples
EndScriptData */
#include "ScriptMgr.h"
+#include "Player.h"
enum eSay
{
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index cc27392919f..35e61a5300d 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -26,6 +26,7 @@
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index a70d05fa0ef..9cc515c1b0d 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -20,6 +20,7 @@
#include "ScriptedGossip.h"
#include "blackfathom_deeps.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index 1c91d78cd29..afd7603a506 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "hyjal.h"
#include "SpellAuras.h"
#include "hyjal_trash.h"
+#include "Player.h"
enum Texts
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 48dd847b190..3ab06642fb5 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "hyjalAI.h"
+#include "Player.h"
#define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore."
#define GOSSIP_ITEM_ANETHERON "We are ready for whatever Archimonde might send our way, Lady Proudmoore."
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index caff71c7320..6ab3e42dcb9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "InstanceScript.h"
#include "ScriptedCreature.h"
#include "hyjal_trash.h"
+#include "Player.h"
enum Misc
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index e74ba833908..22ae808e348 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -21,6 +21,7 @@
#include "culling_of_stratholme.h"
#include "ScriptedEscortAI.h"
#include "PassiveAI.h"
+#include "Player.h"
enum Says
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
index ea02e8f50b5..9a5bc95853c 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
@@ -19,6 +19,7 @@
#include "InstanceScript.h"
#include "CreatureTextMgr.h"
#include "culling_of_stratholme.h"
+#include "Player.h"
#define MAX_ENCOUNTER 5
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
index bed3cde6fa4..8fa6c239858 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "dark_portal.h"
+#include "Player.h"
#define SAY_ENTER -1269020 //where does this belong?
#define SAY_INTRO -1269021
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
index da34eff7b77..926f48a17a2 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "dark_portal.h"
+#include "Player.h"
#define MAX_ENCOUNTER 2
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
index 7f7cbeaf566..6995ca5add5 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "old_hillsbrad.h"
+#include "Player.h"
#define MAX_ENCOUNTER 6
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index 0158d470ef9..2000d8a52f8 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "old_hillsbrad.h"
+#include "Player.h"
#define QUEST_ENTRY_HILLSBRAD 10282
#define QUEST_ENTRY_DIVERSION 10283
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
index a0a8bb02d90..a90d465c1ca 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "razorfen_downs.h"
+#include "Player.h"
#define MAX_ENCOUNTER 1
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index 3a147007fce..443c9f73cfb 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "razorfen_downs.h"
+#include "Player.h"
/*###
# npc_henry_stern
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index cce0f8b180e..152c38a6b58 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "razorfen_kraul.h"
+#include "Player.h"
#define WARD_KEEPERS_NR 2
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 374059c46ac..7b3cd9f9900 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "razorfen_kraul.h"
+#include "Player.h"
#define SAY_READY -1047000
#define SAY_POINT -1047001
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
index 36a1ff1bade..e6c5243819a 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
@@ -19,6 +19,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ruins_of_ahnqiraj.h"
+#include "CreatureTextMgr.h"
enum Spells
{
@@ -38,6 +39,11 @@ enum Events
EVENT_WIDE_SLASH = 4
};
+enum Texts
+{
+ SAY_KURINAXX_DEATH = 5, // Yelled by Ossirian the Unscarred
+};
+
class boss_kurinnaxx : public CreatureScript
{
public:
@@ -45,7 +51,7 @@ class boss_kurinnaxx : public CreatureScript
struct boss_kurinnaxxAI : public BossAI
{
- boss_kurinnaxxAI(Creature* creature) : BossAI(creature, BOSS_KURINNAXX)
+ boss_kurinnaxxAI(Creature* creature) : BossAI(creature, DATA_KURINNAXX)
{
}
@@ -68,6 +74,13 @@ class boss_kurinnaxx : public CreatureScript
}
}
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ if (Creature* Ossirian = me->GetMap()->GetCreature(instance->GetData64(DATA_OSSIRIAN)))
+ sCreatureTextMgr->SendChat(Ossirian, SAY_KURINAXX_DEATH, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);
+ }
+
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
index c05613d387f..4abbf99d4ef 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
@@ -58,7 +58,7 @@ class boss_moam : public CreatureScript
struct boss_moamAI : public BossAI
{
- boss_moamAI(Creature* creature) : BossAI(creature, BOSS_MOAM)
+ boss_moamAI(Creature* creature) : BossAI(creature, DATA_MOAM)
{
}
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
index e9bb8be67b7..2040ee8b58c 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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
@@ -16,39 +15,259 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Ossirian
-SD%Complete: 0
-SDComment: Place holder
-SDCategory: Ruins of Ahn'Qiraj
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ruins_of_ahnqiraj.h"
+#include "Player.h"
+
+enum Texts
+{
+ SAY_SUPREME = 0,
+ SAY_INTRO = 1,
+ SAY_AGGRO = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+};
+
+enum Spells
+{
+ SPELL_SILENCE = 25195,
+ SPELL_CYCLONE = 25189,
+ SPELL_STOMP = 25188,
+ SPELL_SUPREME = 25176,
+ SPELL_SUMMON = 20477,
+ SPELL_SAND_STORM = 25160,
+ SPELL_SUMMON_CRYSTAL = 25192,
+};
+
+enum Actions
+{
+ ACTION_TRIGGER_WEAKNESS = 1,
+};
-enum Yells
+enum Events
{
- SAY_SURPREME2 = -1509019,
- SAY_SURPREME3 = -1509020,
- SAY_RAND_INTRO1 = -1509021,
- SAY_RAND_INTRO2 = -1509022,
- SAY_RAND_INTRO3 = -1509023,
- SAY_RAND_INTRO4 = -1509024, //possibly old?
- SAY_AGGRO = -1509025,
- SAY_SLAY = -1509026,
- SAY_DEATH = -1509027
+ EVENT_SILENCE = 1,
+ EVENT_CYCLONE = 2,
+ EVENT_STOMP = 3
};
+const uint8 NUM_CRYSTALS = 9;
+
+// You spin me right round, baby
+// right round like a record, baby
+// right round round round
+Position CrystalCoordinates[NUM_CRYSTALS] =
+{
+ { -9394.230469, 1951.808594, 85.97733, 0.0 },
+ { -9357.931641, 1930.596802, 85.556198, 0.0 },
+ { -9383.113281, 2011.042725, 85.556389, 0.0 },
+ { -9243.36, 1979.04, 85.556, 0.0 },
+ { -9281.68, 1886.66, 85.5558, 0.0 },
+ { -9241.8, 1806.39, 85.5557, 0.0 },
+ { -9366.78, 1781.76, 85.5561, 0.0 },
+ { -9430.37, 1786.86, 85.557, 0.0 },
+ { -9406.73, 1863.13, 85.5558, 0.0 }
+};
+
+float RoomRadius = 165.0f;
+const uint8 NUM_TORNADOS = 5; // TODO: This number is completly random!
+const uint8 NUM_WEAKNESS = 5;
+const uint32 SpellWeakness[NUM_WEAKNESS] = { 25177, 25178, 25180, 25181, 25183 };
+const Position RoomCenter = { -9343.041992f, 1923.278198f, 85.555984f, 0.0 };
+
class boss_ossirian : public CreatureScript
{
public:
boss_ossirian() : CreatureScript("boss_ossirian") { }
- struct boss_ossirianAI : public ScriptedAI
+ struct boss_ossirianAI : public BossAI
{
- boss_ossirianAI(Creature* creature) : ScriptedAI(creature)
+ boss_ossirianAI(Creature* creature) : BossAI(creature, DATA_OSSIRIAN)
+ {
+ SaidIntro = false;
+ Reset();
+ }
+
+ uint64 TriggerGUID;
+ uint64 CrystalGUID;
+ uint8 CrystalIterator;
+ bool SaidIntro;
+
+ void Reset()
{
+ _Reset();
+ CrystalIterator = 0;
+ TriggerGUID = 0;
+ CrystalGUID = 0;
+ }
+
+ void SpellHit(Unit* caster, SpellInfo const* spell)
+ {
+ for (uint8 i = 0; i < NUM_WEAKNESS; ++i)
+ {
+ if (spell->Id == SpellWeakness[i])
+ {
+ me->RemoveAurasDueToSpell(SPELL_SUPREME);
+ ((TempSummon*)caster)->UnSummon();
+ SpawnNextCrystal();
+ }
+ }
+ }
+
+ void DoAction(const int32 action)
+ {
+ if (action == ACTION_TRIGGER_WEAKNESS)
+ {
+ if (Creature* Trigger = me->GetMap()->GetCreature(TriggerGUID))
+ {
+ if (!Trigger->HasUnitState(UNIT_STATE_CASTING))
+ Trigger->CastSpell(Trigger, SpellWeakness[urand(0, 4)], false);
+ }
+ }
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ events.Reset();
+ events.ScheduleEvent(EVENT_SILENCE, 30000);
+ events.ScheduleEvent(EVENT_CYCLONE, 20000);
+ events.ScheduleEvent(EVENT_STOMP, 30000);
+
+ DoCast(me, SPELL_SUPREME);
+ Talk(SAY_AGGRO);
+
+ if (instance)
+ {
+ Map* map = me->GetMap();
+ if (!map->IsDungeon())
+ return;
+
+ WorldPacket data(SMSG_WEATHER, (4+4+4));
+ data << uint32(WEATHER_STATE_HEAVY_SANDSTORM) << float(1) << uint8(0);
+ map->SendToPlayers(&data);
+
+ for (uint8 i = 0; i < NUM_TORNADOS; ++i)
+ {
+ Position Point;
+ me->GetRandomPoint(RoomCenter, RoomRadius, Point);
+ if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point))
+ Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true);
+ }
+
+ SpawnNextCrystal();
+ }
+ }
+
+ void KilledUnit(Unit* /*victim*/)
+ {
+ Talk(SAY_SLAY);
+ }
+
+ void EnterEvadeMode()
+ {
+ Cleanup();
+ summons.DespawnAll();
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ Cleanup();
+ _JustDied();
+ }
+
+ void Cleanup()
+ {
+ if (GameObject* Crystal = me->GetMap()->GetGameObject(CrystalGUID))
+ Crystal->Use(me);
+ }
+
+ void SpawnNextCrystal()
+ {
+ if (CrystalIterator == NUM_CRYSTALS)
+ CrystalIterator = 0;
+
+ if (Creature* Trigger = me->GetMap()->SummonCreature(NPC_OSSIRIAN_TRIGGER, CrystalCoordinates[CrystalIterator]))
+ {
+ TriggerGUID = Trigger->GetGUID();
+ if (GameObject* Crystal = Trigger->SummonGameObject(GO_OSSIRIAN_CRYSTAL,
+ CrystalCoordinates[CrystalIterator].GetPositionX(),
+ CrystalCoordinates[CrystalIterator].GetPositionY(),
+ CrystalCoordinates[CrystalIterator].GetPositionZ(),
+ 0, 0, 0, 0, 0, -1))
+ {
+ CrystalGUID = Crystal->GetGUID();
+ ++CrystalIterator;
+ }
+ }
+ }
+
+ void MoveInLineOfSight(Unit* /*who*/)
+ {
+ if (!SaidIntro)
+ {
+ Talk(SAY_INTRO);
+ SaidIntro = true;
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ // No kiting!
+ if (me->GetDistance(me->getVictim()) > 60.00f && me->GetDistance(me->getVictim()) < 120.00f)
+ DoCast(me->getVictim(), SPELL_SUMMON);
+
+ bool ApplySupreme = true;
+
+ if (me->HasAura(SPELL_SUPREME))
+ {
+ ApplySupreme = false;
+ }
+ else
+ {
+ for (uint8 i = 0; i < NUM_WEAKNESS; ++i)
+ {
+ if (me->HasAura(SpellWeakness[i]))
+ {
+ ApplySupreme = false;
+ break;
+ }
+ }
+ }
+
+ if (ApplySupreme)
+ {
+ DoCast(me, SPELL_SUPREME);
+ Talk(SAY_SUPREME);
+ }
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SILENCE:
+ DoCast(me, SPELL_SILENCE);
+ events.ScheduleEvent(EVENT_SILENCE, urand(20000, 30000));
+ break;
+ case EVENT_CYCLONE:
+ DoCast(me->getVictim(), SPELL_CYCLONE);
+ events.ScheduleEvent(EVENT_CYCLONE, 20000);
+ break;
+ case EVENT_STOMP:
+ DoCast(me, SPELL_STOMP);
+ events.ScheduleEvent(EVENT_STOMP, 30000);
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
}
};
@@ -58,7 +277,32 @@ class boss_ossirian : public CreatureScript
}
};
+class go_ossirian_crystal : public GameObjectScript
+{
+ public:
+ go_ossirian_crystal() : GameObjectScript("go_ossirian_crystal")
+ {
+ }
+
+ bool OnGossipHello(Player* player, GameObject* /*go*/)
+ {
+ InstanceScript* Instance = player->GetInstanceScript();
+
+ if (!Instance)
+ return false;
+
+ Creature* Ossirian = player->FindNearestCreature(NPC_OSSIRIAN, 30.0f);
+
+ if (!Ossirian || Instance->GetBossState(DATA_OSSIRIAN) != IN_PROGRESS)
+ return false;
+
+ Ossirian->AI()->DoAction(ACTION_TRIGGER_WEAKNESS);
+ return true;
+ }
+};
+
void AddSC_boss_ossirian()
{
new boss_ossirian();
+ new go_ossirian_crystal();
}
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index afa8eff5823..da67f93f968 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -63,7 +63,7 @@ class boss_rajaxx : public CreatureScript
struct boss_rajaxxAI : public BossAI
{
- boss_rajaxxAI(Creature* creature) : BossAI(creature, BOSS_RAJAXX)
+ boss_rajaxxAI(Creature* creature) : BossAI(creature, DATA_RAJAXX)
{
}
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
index 2dbd52f7e42..1fa2f8bc713 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
@@ -28,7 +28,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
{
instance_ruins_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map)
{
- SetBossNumber(MAX_ENCOUNTER);
+ SetBossNumber(NUM_ENCOUNTER);
_kurinaxxGUID = 0;
_rajaxxGUID = 0;
@@ -75,17 +75,17 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
{
switch (type)
{
- case BOSS_KURINNAXX:
+ case DATA_KURINNAXX:
return _kurinaxxGUID;
- case BOSS_RAJAXX:
+ case DATA_RAJAXX:
return _rajaxxGUID;
- case BOSS_MOAM:
+ case DATA_MOAM:
return _moamGUID;
- case BOSS_BURU:
+ case DATA_BURU:
return _buruGUID;
- case BOSS_AYAMISS:
+ case DATA_AYAMISS:
return _ayamissGUID;
- case BOSS_OSSIRIAN:
+ case DATA_OSSIRIAN:
return _ossirianGUID;
}
@@ -120,7 +120,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
if (dataHead1 == 'R' && dataHead2 == 'A')
{
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < NUM_ENCOUNTER; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
index 14d129a7468..7f7efc83eb5 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
@@ -18,15 +18,15 @@
#ifndef DEF_RUINS_OF_AHNQIRAJ_H
#define DEF_RUINS_OF_AHNQIRAJ_H
-enum Encounters
+enum DataTypes
{
- BOSS_KURINNAXX = 0,
- BOSS_RAJAXX = 1,
- BOSS_MOAM = 2,
- BOSS_BURU = 3,
- BOSS_AYAMISS = 4,
- BOSS_OSSIRIAN = 5,
- MAX_ENCOUNTER,
+ DATA_KURINNAXX = 0,
+ DATA_RAJAXX = 1,
+ DATA_MOAM = 2,
+ DATA_BURU = 3,
+ DATA_AYAMISS = 4,
+ DATA_OSSIRIAN = 5,
+ NUM_ENCOUNTER = 6
};
enum Creatures
@@ -40,6 +40,13 @@ enum Creatures
NPC_HIVEZARA_HORNET = 15934,
NPC_HIVEZARA_SWARMER = 15546,
NPC_HIVEZARA_LARVA = 15555,
+ NPC_SAND_VORTEX = 15428,
+ NPC_OSSIRIAN_TRIGGER = 15590,
+};
+
+enum GameObjects
+{
+ GO_OSSIRIAN_CRYSTAL = 180619,
};
#endif
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 95c6d033aab..6b569bbd3e5 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "temple_of_ahnqiraj.h"
+#include "Player.h"
/*
* This is a 2 phases events. Here follows an explanation of the main events and transition between phases and sub-phases.
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 36388cfbe9c..917c790f42b 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "temple_of_ahnqiraj.h"
#include "Group.h"
+#include "Player.h"
#define SAY_AGGRO1 -1531000
#define SAY_AGGRO2 -1531001
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index aa7dfb4a864..cc80812a58f 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "wailing_caverns.h"
+#include "Player.h"
/*######
## npc_disciple_of_naralex
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
index 3a6a3f6241c..4e1508d7cc9 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "zulfarrak.h"
+#include "Player.h"
#define NPC_GAHZRILLA 7273
#define PATH_ADDS 81553
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index 03e3756f964..f288db920f4 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -32,6 +32,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "zulfarrak.h"
+#include "Player.h"
/*######
## npc_sergeant_bly
diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp
index 6a9dd77433a..0e44da371d6 100644
--- a/src/server/scripts/Kalimdor/ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/ashenvale.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*####
# npc_torek
diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp
index fdc00e04a09..154b497f0ad 100644
--- a/src/server/scripts/Kalimdor/azshara.cpp
+++ b/src/server/scripts/Kalimdor/azshara.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
void AddSC_azshara()
{
diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
index 3883b740d02..339cd02c2e3 100644
--- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*######
## mob_webbed_creature
diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp
index 3330898ebe4..0cd9e2eafc7 100644
--- a/src/server/scripts/Kalimdor/darkshore.cpp
+++ b/src/server/scripts/Kalimdor/darkshore.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
+#include "Player.h"
void AddSC_darkshore()
{
diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp
index a3da0019a8b..70fed255dfa 100644
--- a/src/server/scripts/Kalimdor/desolace.cpp
+++ b/src/server/scripts/Kalimdor/desolace.cpp
@@ -32,6 +32,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
enum DyingKodo
{
diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp
index 3c66da1917e..126651facc6 100644
--- a/src/server/scripts/Kalimdor/durotar.cpp
+++ b/src/server/scripts/Kalimdor/durotar.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
+#include "Player.h"
/*######
## Quest 25134: Lazy Peons
diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
index c2953ba38ef..3baa6908219 100644
--- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "SpellScript.h"
+#include "Player.h"
/*######
## npc_stinky
diff --git a/src/server/scripts/Kalimdor/felwood.cpp b/src/server/scripts/Kalimdor/felwood.cpp
index 1d504c02149..e0a28ea86a0 100644
--- a/src/server/scripts/Kalimdor/felwood.cpp
+++ b/src/server/scripts/Kalimdor/felwood.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
void AddSC_felwood()
{
diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp
index a3b153f5ebb..f2d41e2ae22 100644
--- a/src/server/scripts/Kalimdor/feralas.cpp
+++ b/src/server/scripts/Kalimdor/feralas.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "SpellScript.h"
+#include "Player.h"
void AddSC_feralas()
{
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index 3afed715c09..89c3eb1898c 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*####
# npc_omen
diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp
index 9aea03de09d..a58ba537fba 100644
--- a/src/server/scripts/Kalimdor/mulgore.cpp
+++ b/src/server/scripts/Kalimdor/mulgore.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*######
# npc_skorn_whitecloud
diff --git a/src/server/scripts/Kalimdor/orgrimmar.cpp b/src/server/scripts/Kalimdor/orgrimmar.cpp
index 48f0396c5fb..5b8eaeb2c5c 100644
--- a/src/server/scripts/Kalimdor/orgrimmar.cpp
+++ b/src/server/scripts/Kalimdor/orgrimmar.cpp
@@ -29,6 +29,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
void AddSC_orgrimmar()
{
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index 570c95a0737..dc06f6f96f3 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Group.h"
+#include "Player.h"
/*###
## npc_highlord_demitrian
diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
index 2ac9903aa18..3f0361bb0b4 100644
--- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
void AddSC_stonetalon_mountains()
{
diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp
index 7053f48c851..cbb6339cb9a 100644
--- a/src/server/scripts/Kalimdor/tanaris.cpp
+++ b/src/server/scripts/Kalimdor/tanaris.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
+#include "Player.h"
/*######
## npc_custodian_of_time
diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp
index 7f2b2fc7f05..6c1993d6447 100644
--- a/src/server/scripts/Kalimdor/teldrassil.cpp
+++ b/src/server/scripts/Kalimdor/teldrassil.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedFollowerAI.h"
+#include "Player.h"
/*####
# npc_mist
diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp
index 5b13fe9591f..04e1f82cf44 100644
--- a/src/server/scripts/Kalimdor/the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/the_barrens.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*#####
## npc_wizzlecrank_shredder
diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp
index 2abef548a94..7db37ff2f5b 100644
--- a/src/server/scripts/Kalimdor/thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/thousand_needles.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
void AddSC_thousand_needles()
diff --git a/src/server/scripts/Kalimdor/thunder_bluff.cpp b/src/server/scripts/Kalimdor/thunder_bluff.cpp
index 4feca5929b5..dab7b861019 100644
--- a/src/server/scripts/Kalimdor/thunder_bluff.cpp
+++ b/src/server/scripts/Kalimdor/thunder_bluff.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*#####
# npc_cairne_bloodhoof
diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp
index d8d6acf3605..6fd19d754d4 100644
--- a/src/server/scripts/Kalimdor/ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
+#include "Player.h"
void AddSC_ungoro_crater()
{
diff --git a/src/server/scripts/Kalimdor/winterspring.cpp b/src/server/scripts/Kalimdor/winterspring.cpp
index 2c4da0fdf7c..483ee472721 100644
--- a/src/server/scripts/Kalimdor/winterspring.cpp
+++ b/src/server/scripts/Kalimdor/winterspring.cpp
@@ -30,6 +30,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*######
## npc_rivern_frostwind
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
index 3a937942118..ff05d6c62d7 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
@@ -22,6 +22,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ahnkahet.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 6b9b388b8d7..9acfb49efa5 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -23,12 +23,13 @@
#include "GameObjectAI.h"
#include "ScriptedCreature.h"
#include "ruby_sanctum.h"
+#include "Player.h"
/* ScriptData
SDName: ruby_sanctum
SDAuthors: Kaelima, Warpten
SD%Complete: 90%
-SDComment: Based on Kaelima's initial work (nearly half of it). Corporeality handling is a pure guess, we lack info.
+SDComment: Based on Kaelima's initial work (half of it). Corporeality handling is a pure guess, we lack info.
SDCategory: Chamber of Aspects
EndScriptData */
@@ -122,13 +123,12 @@ enum Events
// Halion
EVENT_ACTIVATE_FIREWALL = 1,
EVENT_CLEAVE = 2,
- EVENT_FLAME_BREATH = 3,
+ EVENT_BREATH = 3,
EVENT_METEOR_STRIKE = 4,
EVENT_FIERY_COMBUSTION = 5,
EVENT_TAIL_LASH = 6,
// Twilight Halion
- EVENT_DARK_BREATH = 7,
EVENT_SOUL_CONSUMPTION = 8,
// Meteor Strike
@@ -152,12 +152,10 @@ enum Actions
ACTION_METEOR_STRIKE_AOE = 2,
// Halion Controller
- ACTION_PHASE_TWO = 3,
- ACTION_PHASE_THREE = 4,
- ACTION_CLEANUP = 5,
+ ACTION_MONITOR_CORPOREALITY = 3,
// Orb Carrier
- ACTION_SHOOT = 6
+ ACTION_SHOOT = 4
};
enum Phases
@@ -230,9 +228,11 @@ struct generic_halionAI : public BossAI
void EnterCombat(Unit* who)
{
BossAI::EnterCombat(who);
+ me->AddAura(SPELL_TWILIGHT_PRECISION, me);
_canEvade = false;
events.ScheduleEvent(EVENT_CLEAVE, urand(8000, 10000));
events.ScheduleEvent(EVENT_TAIL_LASH, 10000);
+ events.ScheduleEvent(EVENT_BREATH, urand(10000, 15000));
}
void Reset()
@@ -259,19 +259,20 @@ struct generic_halionAI : public BossAI
DoCastAOE(SPELL_TAIL_LASH);
events.ScheduleEvent(EVENT_TAIL_LASH, 10000);
break;
+ case EVENT_BREATH:
+ DoCast(me, me->GetEntry() == NPC_HALION ? SPELL_FLAME_BREATH : SPELL_DARK_BREATH);
+ events.ScheduleEvent(EVENT_BREATH, urand(10000, 12000));
+ break;
}
}
void UpdateAI(uint32 const diff)
{
- if (!UpdateVictim())
+ if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING))
return;
events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
-
while (uint32 eventId = events.ExecuteEvent())
ExecuteEvent(eventId);
@@ -318,7 +319,6 @@ class boss_halion : public CreatureScript
me->SetReactState(REACT_DEFENSIVE);
me->RemoveAurasDueToSpell(SPELL_TWILIGHT_PHASING);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->AddAura(SPELL_TWILIGHT_PRECISION, me);
}
void EnterEvadeMode()
@@ -341,7 +341,6 @@ class boss_halion : public CreatureScript
instance->SetBossState(DATA_HALION, IN_PROGRESS);
events.ScheduleEvent(EVENT_ACTIVATE_FIREWALL, 5000);
- events.ScheduleEvent(EVENT_FLAME_BREATH, urand(10000, 12000));
events.ScheduleEvent(EVENT_METEOR_STRIKE, urand(20000, 25000));
events.ScheduleEvent(EVENT_FIERY_COMBUSTION, urand(15000, 18000));
@@ -407,10 +406,6 @@ class boss_halion : public CreatureScript
if (GameObject* flameRing = ObjectAccessor::GetGameObject(*me, instance->GetData64(i)))
instance->HandleGameObject(instance->GetData64(DATA_FLAME_RING), false, flameRing);
break;
- case EVENT_FLAME_BREATH:
- DoCast(me, SPELL_FLAME_BREATH);
- events.ScheduleEvent(EVENT_FLAME_BREATH, 25000);
- break;
case EVENT_METEOR_STRIKE:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_TWILIGHT_REALM))
@@ -489,7 +484,6 @@ class boss_twilight_halion : public CreatureScript
generic_halionAI::EnterCombat(who);
- events.ScheduleEvent(EVENT_DARK_BREATH, urand(10000, 15000));
events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, 20000);
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 2);
@@ -553,7 +547,7 @@ class boss_twilight_halion : public CreatureScript
{
case SPELL_TWILIGHT_DIVISION:
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HALION_CONTROLLER)))
- controller->AI()->SetData(DATA_FIGHT_PHASE, PHASE_THREE);
+ controller->AI()->DoAction(ACTION_MONITOR_CORPOREALITY);
break;
default:
generic_halionAI::SpellHit(who, spell);
@@ -565,10 +559,6 @@ class boss_twilight_halion : public CreatureScript
{
switch (eventId)
{
- case EVENT_DARK_BREATH:
- DoCast(me, SPELL_DARK_BREATH);
- events.ScheduleEvent(EVENT_DARK_BREATH, urand(10000, 15000));
- break;
case EVENT_SOUL_CONSUMPTION:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, SPELL_TWILIGHT_REALM))
DoCast(target, SPELL_SOUL_CONSUMPTION);
@@ -609,6 +599,8 @@ class npc_halion_controller : public CreatureScript
_summons.DespawnAll();
_events.Reset();
_materialCorporealityValue = 5;
+ _materialDamageTaken = 0;
+ _twilightDamageTaken = 0;
DoCast(me, SPELL_CLEAR_DEBUFFS);
}
@@ -657,6 +649,34 @@ class npc_halion_controller : public CreatureScript
_events.SetPhase(PHASE_INTRO);
_events.ScheduleEvent(EVENT_START_INTRO, 2000);
break;
+ case ACTION_MONITOR_CORPOREALITY:
+ {
+ for (uint8 itr = DATA_HALION; itr <= DATA_TWILIGHT_HALION; itr++)
+ {
+ Creature* halion = ObjectAccessor::GetCreature(*me, _instance->GetData64(itr));
+ if (!halion)
+ continue;
+
+ halion->CastSpell(halion, GetSpell(_materialCorporealityValue, itr == DATA_TWILIGHT_HALION), false);
+ halion->AI()->SetData(DATA_FIGHT_PHASE, PHASE_THREE);
+
+ if (itr == DATA_TWILIGHT_HALION)
+ continue;
+
+ halion->RemoveAurasDueToSpell(SPELL_TWILIGHT_PHASING);
+ halion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ // Summon Twilight portals
+ DoCast(me, SPELL_SUMMON_EXIT_PORTALS);
+
+ _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_TOGGLE, 1);
+ // Hardcoding doesn't really matter here.
+ _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_MATERIAL, 50);
+ _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_TWILIGHT, 50);
+
+ _events.ScheduleEvent(EVENT_CHECK_CORPOREALITY, 7500);
+ }
default:
break;
}
@@ -747,36 +767,8 @@ class npc_halion_controller : public CreatureScript
DoZoneInCombat();
break;
case PHASE_TWO:
- // Timer taken from a 4.3.4 solo video and confirmed by TankSpot's 3.3.5 guide. http://www.tankspot.com/showthread.php?67195-Halion-Encounter-Guide-Live
_events.ScheduleEvent(EVENT_SHADOW_PULSARS_SHOOT, 29000);
break;
- case PHASE_THREE:
- _events.ScheduleEvent(EVENT_CHECK_CORPOREALITY, 5000);
- // Load up corporeality data.
- for (uint8 itr = DATA_HALION; itr <= DATA_TWILIGHT_HALION; itr++)
- {
- Creature* halion = ObjectAccessor::GetCreature(*me, _instance->GetData64(itr));
- if (!halion)
- continue;
-
- halion->CastSpell(halion, GetSpell(_materialCorporealityValue, itr == DATA_TWILIGHT_HALION), false);
- halion->AI()->SetData(DATA_FIGHT_PHASE, PHASE_THREE);
-
- if (itr == DATA_TWILIGHT_HALION)
- continue;
-
- halion->RemoveAurasDueToSpell(SPELL_TWILIGHT_PHASING);
- halion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- }
-
- // Summon Twilight portals
- DoCast(me, SPELL_SUMMON_EXIT_PORTALS);
-
- _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_TOGGLE, 1);
- // Hardcoding doesn't really matter here.
- _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_MATERIAL, 50);
- _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_TWILIGHT, 50);
- break;
default:
break;
}
@@ -807,17 +799,21 @@ class npc_halion_controller : public CreatureScript
float damageRatio = float(_materialDamageTaken) / float(_twilightDamageTaken);
CorporealityEvent action = CORPOREALITY_NONE;
- if (damageRatio < 0.98f) // [0 , 0.98[: Corporeality goes down
+ if (damageRatio < 0.98f) // [0 , 0.98[: Corporeality goes down
action = CORPOREALITY_DECREASE;
- else if (0.99f < damageRatio && damageRatio < 1.0f) // ]0.99, 1.01[: Twilight Mending
+ else if (0.99f < damageRatio && damageRatio < 1.01f) // ]0.99, 1.01[: Twilight Mending
action = CORPOREALITY_TWILIGHT_MENDING;
- else if (1.02f < damageRatio) // ]1.02, +oo [: Corporeality goes up
+ else if (1.02f < damageRatio) // ]1.02, +oo [: Corporeality goes up
action = CORPOREALITY_INCREASE;
switch (action)
{
case CORPOREALITY_NONE:
+ {
+ _materialDamageTaken = 0;
+ _twilightDamageTaken = 0;
return;
+ }
case CORPOREALITY_INCREASE:
{
if (_materialCorporealityValue >= (MAX_CORPOREALITY_STATE - 1))
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
index bf48132b2b2..3f710d7fedd 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
@@ -18,7 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "ruby_sanctum.h"
-
+#include "Player.h"
DoorData const doorData[] =
{
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp
index 273c860a2ad..ce543b95fd5 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ruby_sanctum.h"
+#include "Player.h"
enum Texts
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
index 0e781c6ddc0..b0db72b53c5 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedEscortAI.h"
#include "Vehicle.h"
#include "trial_of_the_champion.h"
+#include "Player.h"
enum eSpells
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
index 310dd1003c3..412951b17d4 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "trial_of_the_champion.h"
+#include "Player.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
index a2488513d63..ffda3d12e2f 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "trial_of_the_champion.h"
#include "Vehicle.h"
+#include "Player.h"
#define GOSSIP_START_EVENT1 "I'm ready to start challenge."
#define GOSSIP_START_EVENT2 "I'm ready for the next challenge."
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index 564df34462b..a77f341a49b 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -16,24 +16,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: boss_anubarak_trial
-SD%Complete: ??%
-SDComment: based on /dev/rsa
-SDCategory:
-EndScriptData */
-
// Known bugs:
// Anubarak - underground phase partially not worked
// - tele after impale hit a permafrost doesn't work (the entire tele spell should be better)
-// Burrow - visual is vanishing
-// Burrower - Spider Frenzy not working as it should (frenzy not stacking)
// Scarab - Kill credit isn't crediting?
-// FrostSph - often they are casting Permafrost a little above the ground
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
+#include "SpellScript.h"
+#include <limits>
enum Yells
{
@@ -47,7 +39,7 @@ enum Yells
SAY_KILL_PLAYER = 7,
SAY_DEATH = 8,
- EMOTE_SPIKE = 0,
+ EMOTE_SPIKE = 0
};
enum Summons
@@ -56,7 +48,7 @@ enum Summons
NPC_BURROW = 34862,
NPC_BURROWER = 34607,
NPC_SCARAB = 34605,
- NPC_SPIKE = 34660,
+ NPC_SPIKE = 34660
};
enum BossSpells
@@ -86,8 +78,9 @@ enum BossSpells
SPELL_EXPOSE_WEAKNESS = 67720, //Passive - Triggered
SPELL_SHADOW_STRIKE = 66134,
SPELL_SUBMERGE_EFFECT = 68394,
- SPELL_EMERGE_EFFECT = 65982,
SPELL_AWAKENED = 66311,
+ SPELL_EMERGE_EFFECT = 65982,
+
SPELL_PERSISTENT_DIRT = 68048,
SUMMON_SCARAB = NPC_SCARAB,
@@ -107,15 +100,15 @@ enum BossSpells
SPELL_SPIKE_SPEED2 = 65922,
SPELL_SPIKE_SPEED3 = 65923,
SPELL_SPIKE_FAIL = 66181,
- SPELL_SPIKE_TELE = 66170,
+ SPELL_SPIKE_TELE = 66170
};
#define SPELL_PERMAFROST_HELPER RAID_MODE<uint32>(66193, 67855, 67856, 67857)
enum SummonActions
{
- ACTION_SHADOW_STRIKE,
- ACTION_SCARAB_SUBMERGE,
+ ACTION_SHADOW_STRIKE = 0,
+ ACTION_SCARAB_SUBMERGE = 1
};
const Position SphereSpawn[6] =
@@ -133,446 +126,468 @@ enum MovementPoints
POINT_FALL_GROUND = 1
};
-class boss_anubarak_trial : public CreatureScript
+enum PursuingSpikesPhases
{
-public:
- boss_anubarak_trial() : CreatureScript("boss_anubarak_trial") { }
+ PHASE_NO_MOVEMENT = 0,
+ PHASE_IMPALE_NORMAL = 1,
+ PHASE_IMPALE_MIDDLE = 2,
+ PHASE_IMPALE_FAST = 3
+};
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_anubarak_trialAI(creature);
- };
+enum Events
+{
+ // Anub'arak
+ EVENT_FREEZE_SLASH = 1,
+ EVENT_PENETRATING_COLD = 2,
+ EVENT_SUMMON_NERUBIAN = 3,
+ EVENT_NERUBIAN_SHADOW_STRIKE = 4,
+ EVENT_SUBMERGE = 5,
+ EVENT_EMERGE = 6,
+ EVENT_PURSUING_SPIKE = 7,
+ EVENT_SUMMON_SCARAB = 8,
+ EVENT_SUMMON_FROST_SPHERE = 9,
+ EVENT_BERSERK = 10
+};
- struct boss_anubarak_trialAI : public ScriptedAI
- {
- boss_anubarak_trialAI(Creature* creature) : ScriptedAI(creature), Summons(me)
- {
- instance = creature->GetInstanceScript();
- }
+enum Phases
+{
+ // Anub'arak
+ PHASE_MELEE = 1,
+ PHASE_SUBMERGED = 2,
- InstanceScript* instance;
-
- SummonList Summons;
- std::list<uint64> m_vBurrowGUID;
- uint64 m_aSphereGUID[6];
-
- uint32 m_uiFreezeSlashTimer;
- uint32 m_uiPenetratingColdTimer;
- uint32 m_uiSummonNerubianTimer;
- uint32 m_uiNerubianShadowStrikeTimer;
- uint32 m_uiSubmergeTimer;
- uint32 m_uiPursuingSpikeTimer;
- uint32 m_uiSummonScarabTimer;
- uint32 m_uiSummonFrostSphereTimer;
- uint32 m_uiBerserkTimer;
-
- uint8 m_uiStage;
- bool m_bIntro;
- bool m_bReachedPhase3;
- uint64 m_uiTargetGUID;
- uint8 m_uiScarabSummoned;
-
- void Reset()
- {
- m_uiFreezeSlashTimer = 15*IN_MILLISECONDS;
- m_uiPenetratingColdTimer = 20*IN_MILLISECONDS;
- m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
- m_uiSummonNerubianTimer = 10*IN_MILLISECONDS;
- m_uiSubmergeTimer = 80*IN_MILLISECONDS;
-
- m_uiPursuingSpikeTimer = 2*IN_MILLISECONDS;
- m_uiSummonScarabTimer = 2*IN_MILLISECONDS;
-
- m_uiSummonFrostSphereTimer = 20*IN_MILLISECONDS;
-
- m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS;
- m_uiStage = 0;
- m_uiScarabSummoned = 0;
- m_bIntro = true;
- m_bReachedPhase3 = false;
- m_uiTargetGUID = 0;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- Summons.DespawnAll();
- m_vBurrowGUID.clear();
- }
+ PHASE_MASK_MELEE = 1 << PHASE_MELEE
+};
- void KilledUnit(Unit* who)
+class boss_anubarak_trial : public CreatureScript
+{
+ public:
+ boss_anubarak_trial() : CreatureScript("boss_anubarak_trial") { }
+
+ struct boss_anubarak_trialAI : public BossAI
{
- if (who->GetTypeId() == TYPEID_PLAYER)
+ boss_anubarak_trialAI(Creature* creature) : BossAI(creature, BOSS_ANUBARAK)
{
- Talk(SAY_KILL_PLAYER);
- if (instance)
- instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
- }
- void MoveInLineOfSight(Unit* /*who*/)
- {
- if (!m_bIntro)
+ void Reset()
{
- Talk(SAY_INTRO);
- m_bIntro = false;
+ _Reset();
+ events.SetPhase(PHASE_MELEE);
+ events.ScheduleEvent(EVENT_FREEZE_SLASH, 15*IN_MILLISECONDS, 0, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_PENETRATING_COLD, 20*IN_MILLISECONDS, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_SUMMON_NERUBIAN, 10*IN_MILLISECONDS, 0, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_SUBMERGE, 80*IN_MILLISECONDS, 0, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_BERSERK, 10*MINUTE*IN_MILLISECONDS);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_NERUBIAN_SHADOW_STRIKE, 30*IN_MILLISECONDS, 0, PHASE_MELEE);
+
+ if (!IsHeroic())
+ events.ScheduleEvent(EVENT_SUMMON_FROST_SPHERE, 20*IN_MILLISECONDS);
+
+ _intro = true;
+ _reachedPhase3 = false;
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ // clean up spawned Frost Spheres
+ std::list<Creature*> FrostSphereList;
+ me->GetCreatureListWithEntryInGrid(FrostSphereList, NPC_FROST_SPHERE, 150.0f);
+ if (!FrostSphereList.empty())
+ for (std::list<Creature*>::iterator itr = FrostSphereList.begin(); itr != FrostSphereList.end(); itr++)
+ (*itr)->DespawnOrUnsummon();
+
+ _burrowGUID.clear();
}
- }
- void JustReachedHome()
- {
- if (instance)
- instance->SetData(TYPE_ANUBARAK, FAIL);
- //Summon Scarab Swarms neutral at random places
- for (int i=0; i < 10; i++)
- if (Creature* temp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
+ void KilledUnit(Unit* who)
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER)
{
- temp->setFaction(31);
- temp->GetMotionMaster()->MoveRandom(10);
+ Talk(SAY_KILL_PLAYER);
+ if (instance)
+ instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
- }
-
- void JustDied(Unit* /*killer*/)
- {
- Summons.DespawnAll();
- Talk(SAY_DEATH);
- if (instance)
- instance->SetData(TYPE_ANUBARAK, DONE);
- }
-
- void JustSummoned(Creature* summoned)
- {
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true);
- switch (summoned->GetEntry())
- {
- case NPC_BURROW:
- m_vBurrowGUID.push_back(summoned->GetGUID());
- summoned->SetReactState(REACT_PASSIVE);
- summoned->CastSpell(summoned, SPELL_CHURNING_GROUND, false);
- break;
- case NPC_SPIKE:
- summoned->CombatStart(target);
- Talk(EMOTE_SPIKE, target->GetGUID());
- break;
- }
- Summons.Summon(summoned);
- }
+ }
- void SummonedCreatureDespawn(Creature* summoned)
- {
- switch (summoned->GetEntry())
+ void MoveInLineOfSight(Unit* /*who*/)
{
- case NPC_SPIKE:
- m_uiPursuingSpikeTimer = 2*IN_MILLISECONDS;
- break;
+ if (!_intro)
+ {
+ Talk(SAY_INTRO);
+ _intro = false;
+ }
}
- }
-
- void EnterCombat(Unit* /*who*/)
- {
- Talk(SAY_AGGRO);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->SetInCombatWithZone();
- if (instance)
- instance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
- //Despawn Scarab Swarms neutral
- EntryCheckPredicate pred(NPC_SCARAB);
- Summons.DoAction(ACTION_SCARAB_SUBMERGE, pred);
- //Spawn Burrow
- for (int i=0; i < 4; i++)
- me->SummonCreature(NPC_BURROW, AnubarakLoc[i+2]);
- //Spawn Frost Spheres
- for (int i=0; i < 6; i++)
- if (Unit* summoned = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
- m_aSphereGUID[i] = summoned->GetGUID();
- }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
+ void JustReachedHome()
+ {
+ if (instance)
+ instance->SetBossState(BOSS_ANUBARAK, FAIL);
+ //Summon Scarab Swarms neutral at random places
+ for (int i = 0; i < 10; i++)
+ if (Creature* temp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
+ {
+ temp->setFaction(31);
+ temp->GetMotionMaster()->MoveRandom(10);
+ }
+ }
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+
+ // despawn frostspheres and Burrowers on death
+ std::list<Creature*> AddList;
+ me->GetCreatureListWithEntryInGrid(AddList, NPC_FROST_SPHERE, 150.0f);
+ me->GetCreatureListWithEntryInGrid(AddList, NPC_BURROWER, 150.0f);
+ if (!AddList.empty())
+ for (std::list<Creature*>::iterator itr = AddList.begin(); itr != AddList.end(); itr++)
+ (*itr)->DespawnOrUnsummon();
+ }
- switch (m_uiStage)
+ void JustSummoned(Creature* summoned)
{
- case 0:
- if (m_uiFreezeSlashTimer <= uiDiff)
- {
- DoCastVictim(SPELL_FREEZE_SLASH);
- m_uiFreezeSlashTimer = 15*IN_MILLISECONDS;
- } else m_uiFreezeSlashTimer -= uiDiff;
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true);
+ switch (summoned->GetEntry())
+ {
+ case NPC_BURROW:
+ _burrowGUID.push_back(summoned->GetGUID());
+ summoned->SetReactState(REACT_PASSIVE);
+ summoned->CastSpell(summoned, SPELL_CHURNING_GROUND, false);
+ summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid2);
+ break;
+ case NPC_SPIKE:
+ summoned->CombatStart(target);
+ summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid1);
+ Talk(EMOTE_SPIKE, target->GetGUID());
+ break;
+ default:
+ break;
+ }
+ summons.Summon(summoned);
+ }
- if (m_uiPenetratingColdTimer <= uiDiff)
- {
- me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5, 2, 5));
- m_uiPenetratingColdTimer = 20*IN_MILLISECONDS;
- } else m_uiPenetratingColdTimer -= uiDiff;
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ Talk(SAY_AGGRO);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+
+ // Despawn Scarab Swarms neutral
+ EntryCheckPredicate pred(NPC_SCARAB);
+ summons.DoAction(ACTION_SCARAB_SUBMERGE, pred);
+
+ // Spawn Burrow
+ for (int i = 0; i < 4; i++)
+ me->SummonCreature(NPC_BURROW, AnubarakLoc[i + 2]);
+
+ // Spawn 6 Frost Spheres at start
+ for (int i = 0; i < 6; i++)
+ if (Unit* summoned = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
+ _sphereGUID[i] = summoned->GetGUID();
+ }
- if (m_uiSummonNerubianTimer <= uiDiff && (IsHeroic() || !m_bReachedPhase3))
- {
- me->CastCustomSpell(SPELL_SUMMON_BURROWER, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 2, 2, 4));
- m_uiSummonNerubianTimer = 45*IN_MILLISECONDS;
- } else m_uiSummonNerubianTimer -= uiDiff;
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
- if (IsHeroic() && m_uiNerubianShadowStrikeTimer <= uiDiff)
- {
- EntryCheckPredicate pred(NPC_BURROWER);
- Summons.DoAction(ACTION_SHADOW_STRIKE, pred);
- m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
- } else m_uiNerubianShadowStrikeTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiSubmergeTimer <= uiDiff && !m_bReachedPhase3 && !me->HasAura(SPELL_BERSERK))
- {
- m_uiStage = 1;
- m_uiSubmergeTimer = 60*IN_MILLISECONDS;
- } else m_uiSubmergeTimer -= uiDiff;
- break;
- case 1:
- DoCast(me, SPELL_SUBMERGE_ANUBARAK);
- DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- Talk(EMOTE_BURROWER);
- m_uiScarabSummoned = 0;
- m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
- m_uiStage = 2;
- break;
- case 2:
- if (m_uiPursuingSpikeTimer <= uiDiff)
- {
- DoCast(SPELL_SPIKE_CALL);
- // Just to make sure it won't happen again in this phase
- m_uiPursuingSpikeTimer = 90*IN_MILLISECONDS;
- } else m_uiPursuingSpikeTimer -= uiDiff;
+ events.Update(diff);
- if (m_uiSummonScarabTimer <= uiDiff)
- {
- /* WORKAROUND
- * - The correct implementation is more likely the comment below but it needs spell knowledge
- */
- std::list<uint64>::iterator i = m_vBurrowGUID.begin();
- uint32 at = urand(0, m_vBurrowGUID.size()-1);
- for (uint32 k = 0; k < at; k++)
- ++i;
- if (Creature* pBurrow = Unit::GetCreature(*me, *i))
- pBurrow->CastSpell(pBurrow, 66340, false);
- m_uiScarabSummoned++;
- m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
- if (m_uiScarabSummoned == 4) m_uiSummonScarabTimer = RAID_MODE(4, 20)*IN_MILLISECONDS;
-
- /*It seems that this spell have something more that needs to be taken into account
- //Need more sniff info
- DoCast(SPELL_SUMMON_BEATLES);
- // Just to make sure it won't happen again in this phase
- m_uiSummonScarabTimer = 90*IN_MILLISECONDS;*/
- } else m_uiSummonScarabTimer -= uiDiff;
-
- if (m_uiSubmergeTimer <= uiDiff)
- {
- m_uiStage = 3;
- m_uiSubmergeTimer = 80*IN_MILLISECONDS;
- } else m_uiSubmergeTimer -= uiDiff;
- break;
- case 3:
- m_uiStage = 0;
- DoCast(SPELL_SPIKE_TELE);
- Summons.DespawnEntry(NPC_SPIKE);
- me->RemoveAurasDueToSpell(SPELL_SUBMERGE_ANUBARAK);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- DoCast(me, SPELL_EMERGE_ANUBARAK);
- me->GetMotionMaster()->MoveChase(me->getVictim());
- m_uiSummonNerubianTimer = 10*IN_MILLISECONDS;
- m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
- m_uiSummonScarabTimer = 2*IN_MILLISECONDS;
- break;
- }
-
- if (!IsHeroic())
- {
- if (m_uiSummonFrostSphereTimer <= uiDiff)
+ while (uint32 eventId = events.ExecuteEvent())
{
- uint8 startAt = urand(0, 5);
- uint8 i = startAt;
- do
+ switch (eventId)
{
- if (Unit* pSphere = Unit::GetCreature(*me, m_aSphereGUID[i]))
+ case EVENT_FREEZE_SLASH:
+ DoCastVictim(SPELL_FREEZE_SLASH);
+ events.ScheduleEvent(EVENT_FREEZE_SLASH, 15*IN_MILLISECONDS, 0, PHASE_MELEE);
+ return;
+ case EVENT_PENETRATING_COLD:
+ me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5, 2, 5));
+ events.ScheduleEvent(EVENT_PENETRATING_COLD, 20*IN_MILLISECONDS, 0, PHASE_MELEE);
+ return;
+ case EVENT_SUMMON_NERUBIAN:
+ if (IsHeroic() || !_reachedPhase3)
+ me->CastCustomSpell(SPELL_SUMMON_BURROWER, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 2, 2, 4));
+ events.ScheduleEvent(EVENT_SUMMON_NERUBIAN, 45*IN_MILLISECONDS, 0, PHASE_MELEE);
+ return;
+ case EVENT_NERUBIAN_SHADOW_STRIKE:
{
- if (!pSphere->HasAura(SPELL_FROST_SPHERE))
+ EntryCheckPredicate pred(NPC_BURROWER);
+ summons.DoAction(ACTION_SHADOW_STRIKE, pred);
+ events.ScheduleEvent(EVENT_NERUBIAN_SHADOW_STRIKE, 30*IN_MILLISECONDS, 0, PHASE_MELEE);
+ break;
+ }
+ case EVENT_SUBMERGE:
+ if (!_reachedPhase3 && !me->HasAura(SPELL_BERSERK))
{
- if (Creature* summon = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
- m_aSphereGUID[i] = summon->GetGUID();
- break;
+ DoCast(me, SPELL_SUBMERGE_ANUBARAK);
+ DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ Talk(EMOTE_BURROWER);
+ events.SetPhase(PHASE_SUBMERGED);
+ events.ScheduleEvent(EVENT_PURSUING_SPIKE, 2*IN_MILLISECONDS, 0, PHASE_SUBMERGED);
+ events.ScheduleEvent(EVENT_SUMMON_SCARAB, 4*IN_MILLISECONDS, 0, PHASE_SUBMERGED);
+ events.ScheduleEvent(EVENT_EMERGE, 1*MINUTE*IN_MILLISECONDS, 0, PHASE_SUBMERGED);
}
+ break;
+ case EVENT_PURSUING_SPIKE:
+ DoCast(SPELL_SPIKE_CALL);
+ break;
+ case EVENT_SUMMON_SCARAB:
+ {
+ /* WORKAROUND
+ * - The correct implementation is more likely the comment below but it needs spell knowledge
+ */
+ std::list<uint64>::iterator i = _burrowGUID.begin();
+ uint32 at = urand(0, _burrowGUID.size()-1);
+ for (uint32 k = 0; k < at; k++)
+ ++i;
+ if (Creature* pBurrow = Unit::GetCreature(*me, *i))
+ pBurrow->CastSpell(pBurrow, 66340, false);
+
+ events.ScheduleEvent(EVENT_SUMMON_SCARAB, 4*IN_MILLISECONDS, 0, PHASE_SUBMERGED);
+
+ /*It seems that this spell have something more that needs to be taken into account
+ //Need more sniff info
+ DoCast(SPELL_SUMMON_BEATLES);
+ // Just to make sure it won't happen again in this phase
+ m_uiSummonScarabTimer = 90*IN_MILLISECONDS;*/
+ break;
}
- i = (i+1)%6;
- } while (i != startAt);
- m_uiSummonFrostSphereTimer = urand(20, 30)*IN_MILLISECONDS;
- } else m_uiSummonFrostSphereTimer -= uiDiff;
- }
+ case EVENT_EMERGE:
+ events.ScheduleEvent(EVENT_SUBMERGE, 80*IN_MILLISECONDS, 0, PHASE_MELEE);
+ DoCast(SPELL_SPIKE_TELE);
+ summons.DespawnEntry(NPC_SPIKE);
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE_ANUBARAK);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ DoCast(me, SPELL_EMERGE_ANUBARAK);
+ events.SetPhase(PHASE_MELEE);
+ events.ScheduleEvent(EVENT_FREEZE_SLASH, 15*IN_MILLISECONDS, 0, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_PENETRATING_COLD, 20*IN_MILLISECONDS, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_SUMMON_NERUBIAN, 10*IN_MILLISECONDS, 0, PHASE_MELEE);
+ events.ScheduleEvent(EVENT_SUBMERGE, 80*IN_MILLISECONDS, 0, PHASE_MELEE);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_NERUBIAN_SHADOW_STRIKE, 30*IN_MILLISECONDS, 0, PHASE_MELEE);
+ return;
+ case EVENT_SUMMON_FROST_SPHERE:
+ {
+ uint8 startAt = urand(0, 5);
+ uint8 i = startAt;
+ do
+ {
+ if (Unit* pSphere = Unit::GetCreature(*me, _sphereGUID[i]))
+ {
+ if (!pSphere->HasAura(SPELL_FROST_SPHERE))
+ {
+ if (Creature* summon = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
+ _sphereGUID[i] = summon->GetGUID();
+ break;
+ }
+ }
+ i = (i + 1) % 6;
+ }
+ while
+ (i != startAt);
+ events.ScheduleEvent(EVENT_SUMMON_FROST_SPHERE, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ break;
+ }
+ case EVENT_BERSERK:
+ DoCast(me, SPELL_BERSERK);
+ break;
+ default:
+ break;
+ }
- if (HealthBelowPct(30) && m_uiStage == 0 && !m_bReachedPhase3)
- {
- m_bReachedPhase3 = true;
- DoCastAOE(SPELL_LEECHING_SWARM);
- Talk(EMOTE_LEECHING_SWARM);
- Talk(SAY_LEECHING_SWARM);
- }
+ }
- if (m_uiBerserkTimer <= uiDiff && !me->HasAura(SPELL_BERSERK))
- {
- DoCast(me, SPELL_BERSERK);
- } else m_uiBerserkTimer -= uiDiff;
+ if (HealthBelowPct(30) && events.GetPhaseMask() & PHASE_MASK_MELEE && !_reachedPhase3)
+ {
+ _reachedPhase3 = true;
+ DoCastAOE(SPELL_LEECHING_SWARM);
+ Talk(EMOTE_LEECHING_SWARM);
+ Talk(SAY_LEECHING_SWARM);
+ }
- DoMeleeAttackIfReady();
- }
- };
+ if (events.GetPhaseMask() & PHASE_MASK_MELEE)
+ DoMeleeAttackIfReady();
+ }
+ private:
+ std::list<uint64> _burrowGUID;
+ uint64 _sphereGUID[6];
+ bool _intro;
+ bool _reachedPhase3;
+ uint32 _frostSphereTimer;
+ uint32 _berserkTimer;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_anubarak_trialAI(creature);
+ };
};
class mob_swarm_scarab : public CreatureScript
{
-public:
- mob_swarm_scarab() : CreatureScript("mob_swarm_scarab") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_swarm_scarabAI(creature);
- };
-
- struct mob_swarm_scarabAI : public ScriptedAI
- {
- mob_swarm_scarabAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
-
- uint32 m_uiDeterminationTimer;
+ public:
+ mob_swarm_scarab() : CreatureScript("mob_swarm_scarab") { }
- void Reset()
+ struct mob_swarm_scarabAI : public ScriptedAI
{
- me->SetCorpseDelay(0);
- m_uiDeterminationTimer = urand(5*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- DoCast(me, SPELL_ACID_MANDIBLE);
- me->SetInCombatWithZone();
- if (me->isInCombat())
- if (Creature* Anubarak = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANUBARAK)))
- Anubarak->AI()->JustSummoned(me);
- }
+ mob_swarm_scarabAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ }
- void DoAction(const int32 actionId)
- {
- switch (actionId)
+ void Reset()
{
- case ACTION_SCARAB_SUBMERGE:
- DoCast(SPELL_SUBMERGE_EFFECT);
- me->DespawnOrUnsummon(1000);
- break;
+ me->SetCorpseDelay(0);
+ _determinationTimer = urand(5*IN_MILLISECONDS, 60*IN_MILLISECONDS);
+ DoCast(me, SPELL_ACID_MANDIBLE);
+ me->SetInCombatWithZone();
+ if (me->isInCombat())
+ if (Creature* Anubarak = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_ANUBARAK)))
+ Anubarak->AI()->JustSummoned(me);
}
- }
- void JustDied(Unit* killer)
- {
- DoCast(killer, RAID_MODE(SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25));
- }
+ void DoAction(const int32 actionId)
+ {
+ switch (actionId)
+ {
+ case ACTION_SCARAB_SUBMERGE:
+ DoCast(SPELL_SUBMERGE_EFFECT);
+ me->DespawnOrUnsummon(1*IN_MILLISECONDS);
+ break;
+ default:
+ break;
+ }
+ }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
+ void JustDied(Unit* killer)
+ {
+ DoCast(killer, RAID_MODE(SPELL_TRAITOR_KING_10, SPELL_TRAITOR_KING_25));
+ }
- /* Bosskillers don't recognize */
- if (m_uiDeterminationTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- DoCast(me, SPELL_DETERMINATION);
- m_uiDeterminationTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- } else m_uiDeterminationTimer -= uiDiff;
+ if (_instance && _instance->GetBossState(BOSS_ANUBARAK) != IN_PROGRESS)
+ me->DisappearAndDie();
- DoMeleeAttackIfReady();
- }
- };
+ if (!UpdateVictim())
+ return;
-};
+ /* Bosskillers don't recognize */
+ if (_determinationTimer <= diff)
+ {
+ DoCast(me, SPELL_DETERMINATION);
+ _determinationTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
+ }
+ else
+ _determinationTimer -= diff;
-class mob_nerubian_burrower : public CreatureScript
-{
-public:
- mob_nerubian_burrower() : CreatureScript("mob_nerubian_burrower") { }
+ DoMeleeAttackIfReady();
+ }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_nerubian_burrowerAI(creature);
- };
+ private:
+ InstanceScript* _instance;
+ uint32 _determinationTimer;
+ };
- struct mob_nerubian_burrowerAI : public ScriptedAI
- {
- mob_nerubian_burrowerAI(Creature* creature) : ScriptedAI(creature)
+ CreatureAI* GetAI(Creature* creature) const
{
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
-
- uint32 m_uiSpiderFrenzyTimer;
- uint32 m_uiSubmergeTimer;
+ return new mob_swarm_scarabAI(creature);
+ };
+};
- void Reset()
- {
- me->SetCorpseDelay(10);
- m_uiSpiderFrenzyTimer = urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- m_uiSubmergeTimer = 30*IN_MILLISECONDS;
- DoCast(me, SPELL_EXPOSE_WEAKNESS);
- DoCast(me, SPELL_SPIDER_FRENZY);
- DoCast(me, SPELL_AWAKENED);
- me->SetInCombatWithZone();
- if (me->isInCombat())
- if (Creature* Anubarak = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_ANUBARAK)))
- Anubarak->AI()->JustSummoned(me);
- }
+class mob_nerubian_burrower : public CreatureScript
+{
+ public:
+ mob_nerubian_burrower() : CreatureScript("mob_nerubian_burrower") { }
- void DoAction(const int32 actionId)
+ struct mob_nerubian_burrowerAI : public ScriptedAI
{
- switch (actionId)
+ mob_nerubian_burrowerAI(Creature* creature) : ScriptedAI(creature)
{
- case ACTION_SHADOW_STRIKE:
- if (!me->HasAura(SPELL_AWAKENED))
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOW_STRIKE);
- break;
+ _instance = creature->GetInstanceScript();
}
- }
-
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ void Reset()
+ {
+ me->SetCorpseDelay(10);
+ _submergeTimer = 30*IN_MILLISECONDS;
+ DoCast(me, SPELL_EXPOSE_WEAKNESS);
+ DoCast(me, SPELL_SPIDER_FRENZY);
+ DoCast(me, SPELL_AWAKENED);
+ me->SetInCombatWithZone();
+ if (me->isInCombat())
+ if (Creature* Anubarak = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_ANUBARAK)))
+ Anubarak->AI()->JustSummoned(me);
+ }
- if ((m_uiSubmergeTimer <= uiDiff) && HealthBelowPct(80))
+ void DoAction(const int32 actionId)
{
- if (me->HasAura(SPELL_SUBMERGE_EFFECT))
+ switch (actionId)
{
- me->RemoveAurasDueToSpell(SPELL_SUBMERGE_EFFECT);
- DoCast(me, SPELL_EMERGE_EFFECT);
- DoCast(me, SPELL_AWAKENED);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ case ACTION_SHADOW_STRIKE:
+ if (!me->HasAura(SPELL_AWAKENED))
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_SHADOW_STRIKE);
+ break;
+ default:
+ break;
}
- else
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (_instance && _instance->GetBossState(BOSS_ANUBARAK) != IN_PROGRESS)
+ me->DisappearAndDie();
+
+ if (!UpdateVictim() && !me->HasAura(SPELL_SUBMERGE_EFFECT))
+ return;
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ if ((_submergeTimer <= diff) && HealthBelowPct(80))
{
- if (!me->HasAura(SPELL_PERMAFROST_HELPER))
+ if (me->HasAura(SPELL_SUBMERGE_EFFECT))
{
- DoCast(me, SPELL_SUBMERGE_EFFECT);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoCast(me, SPELL_PERSISTENT_DIRT, true);
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE_EFFECT);
+ DoCast(me, SPELL_EMERGE_EFFECT);
+ DoCast(me, SPELL_AWAKENED);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+ else
+ {
+ if (!me->HasAura(SPELL_PERMAFROST_HELPER))
+ {
+ DoCast(me, SPELL_SUBMERGE_EFFECT);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ DoCast(me, SPELL_PERSISTENT_DIRT, true);
+ }
}
+ _submergeTimer = 20*IN_MILLISECONDS;
}
- m_uiSubmergeTimer = 20*IN_MILLISECONDS;
- } else m_uiSubmergeTimer -= uiDiff;
+ else
+ _submergeTimer -= diff;
- DoMeleeAttackIfReady();
- }
- };
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ uint32 _submergeTimer;
+ Phases _phase;
+ EventMap _events;
+ InstanceScript* _instance;
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_nerubian_burrowerAI(creature);
+ };
};
class mob_frost_sphere : public CreatureScript
@@ -636,6 +651,8 @@ class mob_frost_sphere : public CreatureScript
DoCast(SPELL_PERMAFROST);
me->SetObjectScale(2.0f);
break;
+ default:
+ break;
}
}
};
@@ -648,92 +665,180 @@ class mob_frost_sphere : public CreatureScript
class mob_anubarak_spike : public CreatureScript
{
-public:
- mob_anubarak_spike() : CreatureScript("mob_anubarak_spike") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_anubarak_spikeAI(creature);
- };
+ public:
+ mob_anubarak_spike() : CreatureScript("mob_anubarak_spike") { }
- struct mob_anubarak_spikeAI : public ScriptedAI
- {
- mob_anubarak_spikeAI(Creature* creature) : ScriptedAI(creature)
+ struct mob_anubarak_spikeAI : public ScriptedAI
{
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
- uint32 m_uiIncreaseSpeedTimer;
- uint8 m_uiSpeed;
- uint64 m_uiTargetGUID;
+ mob_anubarak_spikeAI(Creature* creature) : ScriptedAI(creature)
+ {
+ }
- void Reset()
- {
- // For an unknown reason this npc isn't recognize the Aura of Permafrost with this flags =/
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
- m_uiTargetGUID = 0;
- }
+ void Reset()
+ {
+ _phase = PHASE_NO_MOVEMENT;
+ _phaseSwitchTimer = 1;
+ // make sure the spike has everyone on threat list
+ me->SetInCombatWithZone();
+ }
- bool CanAIAttack(Unit const* victim) const
- {
- return victim->GetTypeId() == TYPEID_PLAYER;
- }
+ bool CanAIAttack(Unit const* victim) const
+ {
+ return victim->GetTypeId() == TYPEID_PLAYER;
+ }
- void EnterCombat(Unit* who)
- {
- m_uiTargetGUID = who->GetGUID();
- DoCast(who, SPELL_MARK);
- Talk(EMOTE_SPIKE, who->GetGUID());
- me->SetSpeed(MOVE_RUN, 0.5f);
- m_uiSpeed = 0;
- m_uiIncreaseSpeedTimer = 1*IN_MILLISECONDS;
- me->TauntApply(who);
- }
+ void EnterCombat(Unit* who)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ StartChase(target);
+ Talk(EMOTE_SPIKE, who->GetGUID());
+ }
+ }
- void DamageTaken(Unit* /*who*/, uint32& uiDamage)
- {
- uiDamage = 0;
- }
+ void DamageTaken(Unit* /*who*/, uint32& uiDamage)
+ {
+ uiDamage = 0;
+ }
- void UpdateAI(const uint32 uiDiff)
- {
- Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID);
- if (!target || !target->isAlive() || !target->HasAura(SPELL_MARK))
+ void UpdateAI(const uint32 diff)
{
- if (Creature* pAnubarak = Unit::GetCreature((*me), instance->GetData64(NPC_ANUBARAK)))
- pAnubarak->CastSpell(pAnubarak, SPELL_SPIKE_TELE, false);
- me->DisappearAndDie();
- return;
+ if (!UpdateVictim())
+ {
+ me->DisappearAndDie();
+ return;
+ }
+
+ if (_phaseSwitchTimer)
+ {
+ if (_phaseSwitchTimer <= diff)
+ {
+ switch (_phase)
+ {
+ case PHASE_NO_MOVEMENT:
+ DoCast(me, SPELL_SPIKE_SPEED1);
+ DoCast(me, SPELL_SPIKE_TRAIL);
+ _phase = PHASE_IMPALE_NORMAL;
+ if (Unit* target2 = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ StartChase(target2);
+ Talk(EMOTE_SPIKE, target2->GetGUID());
+ }
+ _phaseSwitchTimer = 7*IN_MILLISECONDS;
+ return;
+ case PHASE_IMPALE_NORMAL:
+ DoCast(me, SPELL_SPIKE_SPEED2);
+ _phase = PHASE_IMPALE_MIDDLE;
+ _phaseSwitchTimer = 7*IN_MILLISECONDS;
+ return;
+ case PHASE_IMPALE_MIDDLE:
+ DoCast(me, SPELL_SPIKE_SPEED3);
+ _phase = PHASE_IMPALE_FAST;
+ _phaseSwitchTimer = 0;
+ return;
+ default:
+ return;
+ }
+ }
+ else
+ _phaseSwitchTimer -= diff;
+ }
}
- if (m_uiIncreaseSpeedTimer)
+ void MoveInLineOfSight(Unit* pWho)
{
- if (m_uiIncreaseSpeedTimer <= uiDiff)
+ if (!pWho)
+ return;
+
+ if (pWho->GetEntry() != NPC_FROST_SPHERE)
+ return;
+
+ if (_phase == PHASE_NO_MOVEMENT)
+ return;
+
+ if (me->IsWithinDist(pWho, 7.0f))
{
- switch (m_uiSpeed)
+ switch (_phase)
{
- case 0:
- DoCast(me, SPELL_SPIKE_SPEED1);
- DoCast(me, SPELL_SPIKE_TRAIL);
- m_uiSpeed = 1;
- m_uiIncreaseSpeedTimer = 7*IN_MILLISECONDS;
+ case PHASE_IMPALE_NORMAL:
+ me->RemoveAurasDueToSpell(SPELL_SPIKE_SPEED1);
+ break;
+ case PHASE_IMPALE_MIDDLE:
+ me->RemoveAurasDueToSpell(SPELL_SPIKE_SPEED2);
break;
- case 1:
- DoCast(me, SPELL_SPIKE_SPEED2);
- m_uiSpeed = 2;
- m_uiIncreaseSpeedTimer = 7*IN_MILLISECONDS;
+ case PHASE_IMPALE_FAST:
+ me->RemoveAurasDueToSpell(SPELL_SPIKE_SPEED3);
break;
- case 2:
- DoCast(me, SPELL_SPIKE_SPEED3);
- m_uiIncreaseSpeedTimer = 0;
+ default:
break;
}
- } else m_uiIncreaseSpeedTimer -= uiDiff;
+
+ me->CastSpell(me, SPELL_SPIKE_FAIL, true);
+
+ pWho->ToCreature()->DespawnOrUnsummon(3*IN_MILLISECONDS);
+
+ // After the spikes hit the icy surface they can't move for about ~5 seconds
+ _phase = PHASE_NO_MOVEMENT;
+ _phaseSwitchTimer = 5*IN_MILLISECONDS;
+ SetCombatMovement(false);
+ me->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->Clear();
+ }
+ }
+
+ void StartChase(Unit* who)
+ {
+ DoCast(who, SPELL_MARK);
+ me->SetSpeed(MOVE_RUN, 0.5f);
+ // make sure the Spine will really follow the one he should
+ me->getThreatManager().clearReferences();
+ me->SetInCombatWithZone();
+ me->getThreatManager().addThreat(who, std::numeric_limits<float>::max());
+ me->GetMotionMaster()->Clear(true);
+ me->GetMotionMaster()->MoveChase(who);
+ me->TauntApply(who);
+ }
+
+ private:
+ uint32 _phaseSwitchTimer;
+ PursuingSpikesPhases _phase;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_anubarak_spikeAI(creature);
+ };
+};
+
+class spell_impale : public SpellScriptLoader
+{
+ public:
+ spell_impale() : SpellScriptLoader("spell_impale") { }
+
+ class spell_impale_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_impale_SpellScript);
+
+ void HandleDamageCalc(SpellEffIndex /*effIndex*/)
+ {
+ Unit* target = GetHitUnit();
+ uint32 permafrost = sSpellMgr->GetSpellIdForDifficulty(SPELL_PERMAFROST, target);
+
+ // make sure Impale doesnt do damage if we are standing on permafrost
+ if (target && target->HasAura(permafrost))
+ SetHitDamage(0);
}
- }
- };
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_impale_SpellScript::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_impale_SpellScript();
+ }
};
void AddSC_boss_anubarak_trial()
@@ -743,4 +848,6 @@ void AddSC_boss_anubarak_trial()
new mob_nerubian_burrower();
new mob_anubarak_spike();
new mob_frost_sphere();
+
+ new spell_impale();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index c662daf3671..70fd93df824 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -16,26 +16,17 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: faction_champions
-SD%Complete: ??%
-SDComment: Scripts by Selector, modified by /dev/rsa
-SDCategory: Crusader Coliseum
-EndScriptData */
-
-// Known bugs:
-// All - untested
-// Pets aren't being summoned by their masters
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "trial_of_the_crusader.h"
+#include "Player.h"
+#include "GridNotifiers.h"
enum Yells
{
- SAY_KILL_PLAYER = 6,
+ SAY_KILL_PLAYER = 6
};
enum eAIs
@@ -43,234 +34,527 @@ enum eAIs
AI_MELEE = 0,
AI_RANGED = 1,
AI_HEALER = 2,
- AI_PET = 3,
+ AI_PET = 3
};
enum eSpells
{
- SPELL_ANTI_AOE = 68595,
- SPELL_PVP_TRINKET = 65547,
+ // generic
+ SPELL_ANTI_AOE = 68595,
+ SPELL_PVP_TRINKET = 65547,
+
+ // druid healer
+ SPELL_LIFEBLOOM = 66093,
+ SPELL_NOURISH = 66066,
+ SPELL_REGROWTH = 66067,
+ SPELL_REJUVENATION = 66065,
+ SPELL_TRANQUILITY = 66086,
+ SPELL_BARKSKIN = 65860,
+ SPELL_THORNS = 66068,
+ SPELL_NATURE_GRASP = 66071,
+
+ // shaman healer
+ SPELL_HEALING_WAVE = 66055,
+ SPELL_RIPTIDE = 66053,
+ SPELL_SPIRIT_CLEANSE = 66056, //friendly only
+ SPELL_HEROISM = 65983,
+ SPELL_BLOODLUST = 65980,
+ SPELL_HEX = 66054,
+ SPELL_EARTH_SHIELD = 66063,
+ SPELL_EARTH_SHOCK = 65973,
+ AURA_EXHAUSTION = 57723,
+ AURA_SATED = 57724,
+
+ // paladin healer
+ SPELL_HAND_OF_FREEDOM = 68757,
+ SPELL_DIVINE_SHIELD = 66010,
+ SPELL_CLEANSE = 66116,
+ SPELL_FLASH_OF_LIGHT = 66113,
+ SPELL_HOLY_LIGHT = 66112,
+ SPELL_HOLY_SHOCK = 66114,
+ SPELL_HAND_OF_PROTECTION = 66009,
+ SPELL_HAMMER_OF_JUSTICE = 66613,
+ SPELL_FORBEARANCE = 25771,
+
+ // priest healer
+ SPELL_RENEW = 66177,
+ SPELL_SHIELD = 66099,
+ SPELL_FLASH_HEAL = 66104,
+ SPELL_DISPEL = 65546,
+ SPELL_PSYCHIC_SCREAM = 65543,
+ SPELL_MANA_BURN = 66100,
+ SPELL_PENANCE = 66097,
+
+ // priest dps
+ SPELL_SILENCE = 65542,
+ SPELL_VAMPIRIC_TOUCH = 65490,
+ SPELL_SW_PAIN = 65541,
+ SPELL_MIND_FLAY = 65488,
+ SPELL_MIND_BLAST = 65492,
+ SPELL_HORROR = 65545,
+ SPELL_DISPERSION = 65544,
+ SPELL_SHADOWFORM = 16592,
+
+ // warlock
+ SPELL_HELLFIRE = 65816,
+ SPELL_CORRUPTION = 65810,
+ SPELL_CURSE_OF_AGONY = 65814,
+ SPELL_CURSE_OF_EXHAUSTION = 65815,
+ SPELL_FEAR = 65809,
+ SPELL_SEARING_PAIN = 65819,
+ SPELL_SHADOW_BOLT = 65821,
+ SPELL_UNSTABLE_AFFLICTION = 65812,
+ SPELL_UNSTABLE_AFFLICTION_DISPEL = 65813,
+ SPELL_SUMMON_FELHUNTER = 67514,
+
+ // mage
+ SPELL_ARCANE_BARRAGE = 65799,
+ SPELL_ARCANE_BLAST = 65791,
+ SPELL_ARCANE_EXPLOSION = 65800,
+ SPELL_BLINK = 65793,
+ SPELL_COUNTERSPELL = 65790,
+ SPELL_FROST_NOVA = 65792,
+ SPELL_FROSTBOLT = 65807,
+ SPELL_ICE_BLOCK = 65802,
+ SPELL_POLYMORPH = 65801,
+
+ // hunter
+ SPELL_AIMED_SHOT = 65883,
+ SPELL_DETERRENCE = 65871,
+ SPELL_DISENGAGE = 65869,
+ SPELL_EXPLOSIVE_SHOT = 65866,
+ SPELL_FROST_TRAP = 65880,
+ SPELL_SHOOT = 65868,
+ SPELL_STEADY_SHOT = 65867,
+ SPELL_WING_CLIP = 66207,
+ SPELL_WYVERN_STING = 65877,
+ SPELL_CALL_PET = 67777,
+
+ // druid dps
+ SPELL_CYCLONE = 65859,
+ SPELL_ENTANGLING_ROOTS = 65857,
+ SPELL_FAERIE_FIRE = 65863,
+ SPELL_FORCE_OF_NATURE = 65861,
+ SPELL_INSECT_SWARM = 65855,
+ SPELL_MOONFIRE = 65856,
+ SPELL_STARFIRE = 65854,
+ SPELL_WRATH = 65862,
+
+ // warrior
+ SPELL_BLADESTORM = 65947,
+ SPELL_INTIMIDATING_SHOUT = 65930,
+ SPELL_MORTAL_STRIKE = 65926,
+ SPELL_CHARGE = 68764,
+ SPELL_DISARM = 65935,
+ SPELL_OVERPOWER = 65924,
+ SPELL_SUNDER_ARMOR = 65936,
+ SPELL_SHATTERING_THROW = 65940,
+ SPELL_RETALIATION = 65932,
+
+ // death knight
+ SPELL_CHAINS_OF_ICE = 66020,
+ SPELL_DEATH_COIL = 66019,
+ SPELL_DEATH_GRIP = 66017,
+ SPELL_FROST_STRIKE = 66047,
+ SPELL_ICEBOUND_FORTITUDE = 66023,
+ SPELL_ICY_TOUCH = 66021,
+ SPELL_STRANGULATE = 66018,
+ SPELL_DEATH_GRIP_PULL = 64431, // used at spellscript
+
+ // rogue
+ SPELL_FAN_OF_KNIVES = 65955,
+ SPELL_BLIND = 65960,
+ SPELL_CLOAK = 65961,
+ SPELL_BLADE_FLURRY = 65956,
+ SPELL_SHADOWSTEP = 66178,
+ SPELL_HEMORRHAGE = 65954,
+ SPELL_EVISCERATE = 65957,
+ SPELL_WOUND_POISON = 65962,
+
+ // shaman dps (some spells taken from shaman healer)
+ SPELL_LAVA_LASH = 65974,
+ SPELL_STORMSTRIKE = 65970,
+ SPELL_WINDFURY = 65976,
+
+ // paladin dps
+ SPELL_AVENGING_WRATH = 66011,
+ SPELL_CRUSADER_STRIKE = 66003,
+ SPELL_DIVINE_STORM = 66006,
+ SPELL_HAMMER_OF_JUSTICE_RET = 66007,
+ SPELL_JUDGEMENT_OF_COMMAND = 66005,
+ SPELL_REPENTANCE = 66008,
+ SPELL_SEAL_OF_COMMAND = 66004,
+
+ // warlock pet
+ SPELL_DEVOUR_MAGIC = 67518,
+ SPELL_SPELL_LOCK = 67519,
+
+ // hunter pet
+ SPELL_CLAW = 67793
};
-class boss_toc_champion_controller : public CreatureScript
+enum Events
{
-public:
- boss_toc_champion_controller() : CreatureScript("boss_toc_champion_controller") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_toc_champion_controllerAI (creature);
- }
-
- struct boss_toc_champion_controllerAI : public ScriptedAI
- {
- boss_toc_champion_controllerAI(Creature* creature) : ScriptedAI(creature), Summons(me)
- {
- instance = creature->GetInstanceScript();
- }
+ // generic
+ EVENT_THREAT = 1,
+ EVENT_REMOVE_CC = 2,
+
+ // druid healer
+ EVENT_LIFEBLOOM = 1,
+ EVENT_NOURISH = 2,
+ EVENT_REGROWTH = 3,
+ EVENT_REJUVENATION = 4,
+ EVENT_TRANQUILITY = 5,
+ EVENT_HEAL_BARKSKIN = 6,
+ EVENT_THORNS = 7,
+ EVENT_NATURE_GRASP = 8,
+
+ // shaman healer
+ EVENT_HEALING_WAVE = 1,
+ EVENT_RIPTIDE = 2,
+ EVENT_SPIRIT_CLEANSE = 3,
+ EVENT_HEAL_BLOODLUST_HEROISM = 4,
+ EVENT_HEX = 5,
+ EVENT_EARTH_SHIELD = 6,
+ EVENT_HEAL_EARTH_SHOCK = 7,
+
+ // paladin healer
+ EVENT_HAND_OF_FREEDOM = 1,
+ EVENT_HEAL_DIVINE_SHIELD = 2,
+ EVENT_CLEANSE = 3,
+ EVENT_FLASH_OF_LIGHT = 4,
+ EVENT_HOLY_LIGHT = 5,
+ EVENT_HOLY_SHOCK = 6,
+ EVENT_HEAL_HAND_OF_PROTECTION = 7,
+ EVENT_HAMMER_OF_JUSTICE = 8,
+
+ // priest healer
+ EVENT_RENEW = 1,
+ EVENT_SHIELD = 2,
+ EVENT_FLASH_HEAL = 3,
+ EVENT_HEAL_DISPEL = 4,
+ EVENT_HEAL_PSYCHIC_SCREAM = 5,
+ EVENT_MANA_BURN = 6,
+ EVENT_PENANCE = 7,
+
+ // priest dps
+ EVENT_SILENCE = 1,
+ EVENT_VAMPIRIC_TOUCH = 2,
+ EVENT_SW_PAIN = 3,
+ EVENT_MIND_BLAST = 4,
+ EVENT_HORROR = 5,
+ EVENT_DISPERSION = 6,
+ EVENT_DPS_DISPEL = 7,
+ EVENT_DPS_PSYCHIC_SCREAM = 8,
+
+ // warlock
+ EVENT_HELLFIRE = 1,
+ EVENT_CORRUPTION = 2,
+ EVENT_CURSE_OF_AGONY = 3,
+ EVENT_CURSE_OF_EXHAUSTION = 4,
+ EVENT_FEAR = 5,
+ EVENT_SEARING_PAIN = 6,
+ EVENT_UNSTABLE_AFFLICTION = 7,
+
+ // mage
+ EVENT_ARCANE_BARRAGE = 1,
+ EVENT_ARCANE_BLAST = 2,
+ EVENT_ARCANE_EXPLOSION = 3,
+ EVENT_BLINK = 4,
+ EVENT_COUNTERSPELL = 5,
+ EVENT_FROST_NOVA = 6,
+ EVENT_ICE_BLOCK = 7,
+ EVENT_POLYMORPH = 8,
+
+ // hunter
+ EVENT_AIMED_SHOT = 1,
+ EVENT_DETERRENCE = 2,
+ EVENT_DISENGAGE = 3,
+ EVENT_EXPLOSIVE_SHOT = 4,
+ EVENT_FROST_TRAP = 5,
+ EVENT_STEADY_SHOT = 6,
+ EVENT_WING_CLIP = 7,
+ EVENT_WYVERN_STING = 8,
+
+ // druid dps
+ EVENT_CYCLONE = 1,
+ EVENT_ENTANGLING_ROOTS = 2,
+ EVENT_FAERIE_FIRE = 3,
+ EVENT_FORCE_OF_NATURE = 4,
+ EVENT_INSECT_SWARM = 5,
+ EVENT_MOONFIRE = 6,
+ EVENT_STARFIRE = 7,
+ EVENT_DPS_BARKSKIN = 8,
+
+ // warrior
+ EVENT_BLADESTORM = 1,
+ EVENT_INTIMIDATING_SHOUT = 2,
+ EVENT_MORTAL_STRIKE = 3,
+ EVENT_WARR_CHARGE = 4,
+ EVENT_DISARM = 5,
+ EVENT_OVERPOWER = 6,
+ EVENT_SUNDER_ARMOR = 7,
+ EVENT_SHATTERING_THROW = 8,
+ EVENT_RETALIATION = 9,
+
+ // death knight
+ EVENT_CHAINS_OF_ICE = 1,
+ EVENT_DEATH_COIL = 2,
+ EVENT_DEATH_GRIP = 3,
+ EVENT_FROST_STRIKE = 4,
+ EVENT_ICEBOUND_FORTITUDE = 5,
+ EVENT_ICY_TOUCH = 6,
+ EVENT_STRANGULATE = 7,
+
+ // rogue
+ EVENT_FAN_OF_KNIVES = 1,
+ EVENT_BLIND = 2,
+ EVENT_CLOAK = 3,
+ EVENT_BLADE_FLURRY = 4,
+ EVENT_SHADOWSTEP = 5,
+ EVENT_HEMORRHAGE = 6,
+ EVENT_EVISCERATE = 7,
+ EVENT_WOUND_POISON = 8,
+
+ // shaman dps
+ EVENT_DPS_EARTH_SHOCK = 1,
+ EVENT_LAVA_LASH = 2,
+ EVENT_STORMSTRIKE = 3,
+ EVENT_DPS_BLOODLUST_HEROISM = 4,
+ EVENT_DEPLOY_TOTEM = 5,
+ EVENT_WINDFURY = 6,
+
+ // paladin dps
+ EVENT_AVENGING_WRATH = 1,
+ EVENT_CRUSADER_STRIKE = 2,
+ EVENT_DIVINE_STORM = 3,
+ EVENT_HAMMER_OF_JUSTICE_RET = 4,
+ EVENT_JUDGEMENT_OF_COMMAND = 5,
+ EVENT_REPENTANCE = 6,
+ EVENT_DPS_HAND_OF_PROTECTION = 7,
+ EVENT_DPS_DIVINE_SHIELD = 8,
+
+ // warlock pet
+ EVENT_DEVOUR_MAGIC = 1,
+ EVENT_SPELL_LOCK = 2
+};
- InstanceScript* instance;
- SummonList Summons;
- uint32 m_uiChampionsNotStarted;
- uint32 m_uiChampionsFailed;
- uint32 m_uiChampionsKilled;
- bool m_bInProgress;
+class boss_toc_champion_controller : public CreatureScript
+{
+ public:
+ boss_toc_champion_controller() : CreatureScript("boss_toc_champion_controller") { }
- void Reset()
+ struct boss_toc_champion_controllerAI : public ScriptedAI
{
- m_uiChampionsNotStarted = 0;
- m_uiChampionsFailed = 0;
- m_uiChampionsKilled = 0;
- m_bInProgress = false;
- }
+ boss_toc_champion_controllerAI(Creature* creature) : ScriptedAI(creature), _summons(me)
+ {
+ _instance = creature->GetInstanceScript();
+ }
- std::vector<uint32> SelectChampions(Team playerTeam)
- {
- std::vector<uint32> vHealersEntries;
- vHealersEntries.clear();
- vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_DRUID_RESTORATION : NPC_ALLIANCE_DRUID_RESTORATION);
- vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_PALADIN_HOLY : NPC_ALLIANCE_PALADIN_HOLY);
- vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_PRIEST_DISCIPLINE : NPC_ALLIANCE_PRIEST_DISCIPLINE);
- vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_SHAMAN_RESTORATION : NPC_ALLIANCE_SHAMAN_RESTORATION);
-
- std::vector<uint32> vOtherEntries;
- vOtherEntries.clear();
- vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_DEATH_KNIGHT : NPC_ALLIANCE_DEATH_KNIGHT);
- vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_HUNTER : NPC_ALLIANCE_HUNTER);
- vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_MAGE : NPC_ALLIANCE_MAGE);
- vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_ROGUE : NPC_ALLIANCE_ROGUE);
- vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_WARLOCK : NPC_ALLIANCE_WARLOCK);
- vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_WARRIOR : NPC_ALLIANCE_WARRIOR);
-
- uint8 healersSubtracted = 2;
- if (instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL || instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
- healersSubtracted = 1;
- for (uint8 i = 0; i < healersSubtracted; ++i)
+ void Reset()
{
- uint8 pos = urand(0, vHealersEntries.size()-1);
- switch (vHealersEntries[pos])
+ _championsNotStarted = 0;
+ _championsFailed = 0;
+ _championsKilled = 0;
+ _inProgress = false;
+ }
+
+ std::vector<uint32> SelectChampions(Team playerTeam)
+ {
+ std::vector<uint32> vHealersEntries;
+ vHealersEntries.clear();
+ vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_DRUID_RESTORATION : NPC_ALLIANCE_DRUID_RESTORATION);
+ vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_PALADIN_HOLY : NPC_ALLIANCE_PALADIN_HOLY);
+ vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_PRIEST_DISCIPLINE : NPC_ALLIANCE_PRIEST_DISCIPLINE);
+ vHealersEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_SHAMAN_RESTORATION : NPC_ALLIANCE_SHAMAN_RESTORATION);
+
+ std::vector<uint32> vOtherEntries;
+ vOtherEntries.clear();
+ vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_DEATH_KNIGHT : NPC_ALLIANCE_DEATH_KNIGHT);
+ vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_HUNTER : NPC_ALLIANCE_HUNTER);
+ vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_MAGE : NPC_ALLIANCE_MAGE);
+ vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_ROGUE : NPC_ALLIANCE_ROGUE);
+ vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_WARLOCK : NPC_ALLIANCE_WARLOCK);
+ vOtherEntries.push_back(playerTeam == ALLIANCE ? NPC_HORDE_WARRIOR : NPC_ALLIANCE_WARRIOR);
+
+ uint8 healersSubtracted = 2;
+ if (_instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL || _instance->instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
+ healersSubtracted = 1;
+ for (uint8 i = 0; i < healersSubtracted; ++i)
{
- case NPC_ALLIANCE_DRUID_RESTORATION:
- vOtherEntries.push_back(NPC_ALLIANCE_DRUID_BALANCE);
- break;
- case NPC_HORDE_DRUID_RESTORATION:
- vOtherEntries.push_back(NPC_HORDE_DRUID_BALANCE);
- break;
- case NPC_ALLIANCE_PALADIN_HOLY:
- vOtherEntries.push_back(NPC_ALLIANCE_PALADIN_RETRIBUTION);
- break;
- case NPC_HORDE_PALADIN_HOLY:
- vOtherEntries.push_back(NPC_HORDE_PALADIN_RETRIBUTION);
- break;
- case NPC_ALLIANCE_PRIEST_DISCIPLINE:
- vOtherEntries.push_back(NPC_ALLIANCE_PRIEST_SHADOW);
- break;
- case NPC_HORDE_PRIEST_DISCIPLINE:
- vOtherEntries.push_back(NPC_HORDE_PRIEST_SHADOW);
- break;
- case NPC_ALLIANCE_SHAMAN_RESTORATION:
- vOtherEntries.push_back(NPC_ALLIANCE_SHAMAN_ENHANCEMENT);
- break;
- case NPC_HORDE_SHAMAN_RESTORATION:
- vOtherEntries.push_back(NPC_HORDE_SHAMAN_ENHANCEMENT);
- break;
+ uint8 pos = urand(0, vHealersEntries.size() - 1);
+ switch (vHealersEntries[pos])
+ {
+ case NPC_ALLIANCE_DRUID_RESTORATION:
+ vOtherEntries.push_back(NPC_ALLIANCE_DRUID_BALANCE);
+ break;
+ case NPC_HORDE_DRUID_RESTORATION:
+ vOtherEntries.push_back(NPC_HORDE_DRUID_BALANCE);
+ break;
+ case NPC_ALLIANCE_PALADIN_HOLY:
+ vOtherEntries.push_back(NPC_ALLIANCE_PALADIN_RETRIBUTION);
+ break;
+ case NPC_HORDE_PALADIN_HOLY:
+ vOtherEntries.push_back(NPC_HORDE_PALADIN_RETRIBUTION);
+ break;
+ case NPC_ALLIANCE_PRIEST_DISCIPLINE:
+ vOtherEntries.push_back(NPC_ALLIANCE_PRIEST_SHADOW);
+ break;
+ case NPC_HORDE_PRIEST_DISCIPLINE:
+ vOtherEntries.push_back(NPC_HORDE_PRIEST_SHADOW);
+ break;
+ case NPC_ALLIANCE_SHAMAN_RESTORATION:
+ vOtherEntries.push_back(NPC_ALLIANCE_SHAMAN_ENHANCEMENT);
+ break;
+ case NPC_HORDE_SHAMAN_RESTORATION:
+ vOtherEntries.push_back(NPC_HORDE_SHAMAN_ENHANCEMENT);
+ break;
+ default:
+ break;
+ }
+ vHealersEntries.erase(vHealersEntries.begin() + pos);
}
- vHealersEntries.erase(vHealersEntries.begin()+pos);
- }
- if (instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL || instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
- for (uint8 i = 0; i < 4; ++i)
- vOtherEntries.erase(vOtherEntries.begin()+urand(0, vOtherEntries.size()-1));
+ if (_instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL || _instance->instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
+ for (uint8 i = 0; i < 4; ++i)
+ vOtherEntries.erase(vOtherEntries.begin() + urand(0, vOtherEntries.size() - 1));
- std::vector<uint32> vChampionEntries;
- vChampionEntries.clear();
- for (uint8 i = 0; i < vHealersEntries.size(); ++i)
- vChampionEntries.push_back(vHealersEntries[i]);
- for (uint8 i = 0; i < vOtherEntries.size(); ++i)
- vChampionEntries.push_back(vOtherEntries[i]);
+ std::vector<uint32> vChampionEntries;
+ vChampionEntries.clear();
+ for (uint8 i = 0; i < vHealersEntries.size(); ++i)
+ vChampionEntries.push_back(vHealersEntries[i]);
+ for (uint8 i = 0; i < vOtherEntries.size(); ++i)
+ vChampionEntries.push_back(vOtherEntries[i]);
- return vChampionEntries;
- }
+ return vChampionEntries;
+ }
- void SummonChampions(Team playerTeam)
- {
- std::vector<Position> vChampionJumpOrigin;
- if (playerTeam == ALLIANCE)
- for (uint8 i = 0; i < 5; i++)
- vChampionJumpOrigin.push_back(FactionChampionLoc[i]);
- else
- for (uint8 i = 5; i < 10; i++)
- vChampionJumpOrigin.push_back(FactionChampionLoc[i]);
+ void SummonChampions(Team playerTeam)
+ {
+ std::vector<Position> vChampionJumpOrigin;
+ if (playerTeam == ALLIANCE)
+ for (uint8 i = 0; i < 5; i++)
+ vChampionJumpOrigin.push_back(FactionChampionLoc[i]);
+ else
+ for (uint8 i = 5; i < 10; i++)
+ vChampionJumpOrigin.push_back(FactionChampionLoc[i]);
- std::vector<Position> vChampionJumpTarget;
- for (uint8 i = 10; i < 20; i++)
- vChampionJumpTarget.push_back(FactionChampionLoc[i]);
- std::vector<uint32> vChampionEntries = SelectChampions(playerTeam);
+ std::vector<Position> vChampionJumpTarget;
+ for (uint8 i = 10; i < 20; i++)
+ vChampionJumpTarget.push_back(FactionChampionLoc[i]);
+ std::vector<uint32> vChampionEntries = SelectChampions(playerTeam);
- for (uint8 i = 0; i < vChampionEntries.size(); ++i)
- {
- uint8 pos = urand(0, vChampionJumpTarget.size()-1);
- if (Creature* temp = me->SummonCreature(vChampionEntries[i], vChampionJumpOrigin[urand(0, vChampionJumpOrigin.size()-1)], TEMPSUMMON_MANUAL_DESPAWN))
+ for (uint8 i = 0; i < vChampionEntries.size(); ++i)
{
- Summons.Summon(temp);
- temp->SetReactState(REACT_PASSIVE);
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
- if (playerTeam == ALLIANCE)
+ uint8 pos = urand(0, vChampionJumpTarget.size()-1);
+ if (Creature* temp = me->SummonCreature(vChampionEntries[i], vChampionJumpOrigin[urand(0, vChampionJumpOrigin.size()-1)], TEMPSUMMON_MANUAL_DESPAWN))
{
- temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0);
- temp->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f);
- temp->SetOrientation(0);
- }
- else
- {
- temp->SetHomePosition((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3);
- temp->GetMotionMaster()->MoveJump((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f);
- temp->SetOrientation(3);
+ _summons.Summon(temp);
+ temp->SetReactState(REACT_PASSIVE);
+ temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
+ if (playerTeam == ALLIANCE)
+ {
+ temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0);
+ temp->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f);
+ temp->SetOrientation(0);
+ }
+ else
+ {
+ temp->SetHomePosition((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3);
+ temp->GetMotionMaster()->MoveJump((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f);
+ temp->SetOrientation(3);
+ }
}
+ vChampionJumpTarget.erase(vChampionJumpTarget.begin()+pos);
}
- vChampionJumpTarget.erase(vChampionJumpTarget.begin()+pos);
}
- }
- void SetData(uint32 uiType, uint32 uiData)
- {
- switch (uiType)
+ void SetData(uint32 uiType, uint32 uiData)
{
- case 0:
- SummonChampions((Team)uiData);
- break;
- case 1:
- for (std::list<uint64>::iterator i = Summons.begin(); i != Summons.end(); ++i)
- {
- if (Creature* temp = Unit::GetCreature(*me, *i))
+ switch (uiType)
+ {
+ case 0:
+ SummonChampions((Team)uiData);
+ break;
+ case 1:
+ for (std::list<uint64>::iterator i = _summons.begin(); i != _summons.end(); ++i)
{
- temp->SetReactState(REACT_AGGRESSIVE);
- temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
- }
- }
- break;
- case 2:
- switch (uiData)
- {
- case FAIL:
- m_uiChampionsFailed++;
- if (m_uiChampionsFailed + m_uiChampionsKilled >= Summons.size())
- {
- instance->SetData(TYPE_CRUSADERS, FAIL);
- Summons.DespawnAll();
- me->DespawnOrUnsummon();
- }
- break;
- case IN_PROGRESS:
- if (!m_bInProgress)
- {
- m_uiChampionsNotStarted = 0;
- m_uiChampionsFailed = 0;
- m_uiChampionsKilled = 0;
- m_bInProgress = true;
- Summons.DoZoneInCombat();
- instance->SetData(TYPE_CRUSADERS, IN_PROGRESS);
- }
- break;
- case DONE:
- m_uiChampionsKilled++;
- if (m_uiChampionsKilled == 1)
- instance->SetData(TYPE_CRUSADERS, SPECIAL);
- else if (m_uiChampionsKilled >= Summons.size())
+ if (Creature* temp = Unit::GetCreature(*me, *i))
{
- instance->SetData(TYPE_CRUSADERS, DONE);
- Summons.DespawnAll();
- me->DespawnOrUnsummon();
+ temp->SetReactState(REACT_AGGRESSIVE);
+ temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
- break;
- }
- break;
+ }
+ break;
+ case 2:
+ switch (uiData)
+ {
+ case FAIL:
+ _championsFailed++;
+ if (_championsFailed + _championsKilled >= _summons.size())
+ {
+ _instance->SetBossState(BOSS_CRUSADERS, FAIL);
+ _summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+ break;
+ case IN_PROGRESS:
+ if (!_inProgress)
+ {
+ _championsNotStarted = 0;
+ _championsFailed = 0;
+ _championsKilled = 0;
+ _inProgress = true;
+ _summons.DoZoneInCombat();
+ _instance->SetBossState(BOSS_CRUSADERS, IN_PROGRESS);
+ }
+ break;
+ case DONE:
+ _championsKilled++;
+ if (_championsKilled == 1)
+ _instance->SetBossState(BOSS_CRUSADERS, SPECIAL);
+ else if (_championsKilled >= _summons.size())
+ {
+ _instance->SetBossState(BOSS_CRUSADERS, DONE);
+ _summons.DespawnAll();
+ me->DespawnOrUnsummon();
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
}
- }
- };
+ private:
+ InstanceScript* _instance;
+ SummonList _summons;
+ uint32 _championsNotStarted;
+ uint32 _championsFailed;
+ uint32 _championsKilled;
+ bool _inProgress;
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_toc_champion_controllerAI (creature);
+ }
};
-struct boss_faction_championsAI : public ScriptedAI
+struct boss_faction_championsAI : public BossAI
{
- boss_faction_championsAI(Creature* creature, uint32 aitype) : ScriptedAI(creature)
+ boss_faction_championsAI(Creature* creature, uint32 aitype) : BossAI(creature, BOSS_CRUSADERS)
{
- instance = creature->GetInstanceScript();
- mAIType = aitype;
+ _aiType = aitype;
}
- InstanceScript* instance;
-
- uint64 championControllerGUID;
- uint32 mAIType;
- uint32 ThreatTimer;
- uint32 CCTimer;
-
void Reset()
{
- championControllerGUID = 0;
- CCTimer = rand()%10000;
- ThreatTimer = 5000;
+ _events.ScheduleEvent(EVENT_THREAT, 5*IN_MILLISECONDS);
+ if (IsHeroic() && (_aiType != AI_PET))
+ _events.ScheduleEvent(EVENT_REMOVE_CC, 5*IN_MILLISECONDS);
}
void JustReachedHome()
@@ -283,9 +567,9 @@ struct boss_faction_championsAI : public ScriptedAI
float CalculateThreat(float distance, float armor, uint32 health)
{
- float dist_mod = (mAIType == AI_MELEE || mAIType == AI_PET) ? 15.0f/(15.0f + distance) : 1.0f;
- float armor_mod = (mAIType == AI_MELEE || mAIType == AI_PET) ? armor / 16635.0f : 0.0f;
- float eh = (health+1) * (1.0f + armor_mod);
+ float dist_mod = (_aiType == AI_MELEE || _aiType == AI_PET) ? 15.0f / (15.0f + distance) : 1.0f;
+ float armor_mod = (_aiType == AI_MELEE || _aiType == AI_PET) ? armor / 16635.0f : 0.0f;
+ float eh = (health + 1) * (1.0f + armor_mod);
return dist_mod * 30000.0f / eh;
}
@@ -297,7 +581,7 @@ struct boss_faction_championsAI : public ScriptedAI
Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid());
if (unit && me->getThreatManager().getThreat(unit))
{
- if (unit->GetTypeId()==TYPEID_PLAYER)
+ if (unit->GetTypeId() == TYPEID_PLAYER)
{
float threat = CalculateThreat(me->GetDistance2d(unit), (float)unit->GetArmor(), unit->GetHealth());
me->getThreatManager().modifyThreatPercent(unit, -100);
@@ -311,8 +595,6 @@ struct boss_faction_championsAI : public ScriptedAI
{
if (me->getPowerType() == POWER_MANA)
me->ModifyPower(POWER_MANA, me->GetMaxPower(POWER_MANA) / 3);
- //else if (me->getPowerType() == POWER_ENERGY)
- // me->ModifyPower(POWER_ENERGY, 100);
}
void RemoveCC()
@@ -327,7 +609,7 @@ struct boss_faction_championsAI : public ScriptedAI
void JustDied(Unit* /*killer*/)
{
- if (mAIType != AI_PET)
+ if (_aiType != AI_PET)
if (instance)
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, DONE);
@@ -336,7 +618,7 @@ struct boss_faction_championsAI : public ScriptedAI
void EnterCombat(Unit* /*who*/)
{
DoCast(me, SPELL_ANTI_AOE, true);
- me->SetInCombatWithZone();
+ _EnterCombat();
if (instance)
if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, IN_PROGRESS);
@@ -376,7 +658,7 @@ struct boss_faction_championsAI : public ScriptedAI
std::list<Creature*>::const_iterator itr = lst.begin();
if (lst.empty())
return NULL;
- advance(itr, rand()%lst.size());
+ advance(itr, rand() % lst.size());
return (*itr);
}
@@ -400,7 +682,7 @@ struct boss_faction_championsAI : public ScriptedAI
std::list<HostileReference*>::const_iterator iter;
uint32 count = 0;
Unit* target;
- for (iter = tList.begin(); iter!=tList.end(); ++iter)
+ for (iter = tList.begin(); iter != tList.end(); ++iter)
{
target = Unit::GetUnit(*me, (*iter)->getUnitGuid());
if (target && me->GetDistance2d(target) < distance)
@@ -420,7 +702,7 @@ struct boss_faction_championsAI : public ScriptedAI
me->SetInCombatWith(who);
who->SetInCombatWith(me);
- if (mAIType == AI_MELEE || mAIType == AI_PET)
+ if (_aiType == AI_MELEE || _aiType == AI_PET)
DoStartMovement(who);
else
DoStartMovement(who, 20.0f);
@@ -428,1642 +710,1666 @@ struct boss_faction_championsAI : public ScriptedAI
}
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (ThreatTimer < uiDiff)
- {
- UpdatePower();
- UpdateThreat();
- ThreatTimer = 4000;
- }
- else ThreatTimer -= uiDiff;
+ _events.Update(diff);
- if (mAIType != AI_PET)
+ while (uint32 eventId = _events.ExecuteEvent())
{
- if (CCTimer < uiDiff)
- {
- RemoveCC();
- CCTimer = 8000+rand()%2000;
+ switch (eventId)
+ {
+ case EVENT_THREAT:
+ UpdatePower();
+ UpdateThreat();
+ _events.ScheduleEvent(EVENT_THREAT, 4*IN_MILLISECONDS);
+ return;
+ case EVENT_REMOVE_CC:
+ if (me->HasBreakableByDamageCrowdControlAura())
+ {
+ RemoveCC();
+ _events.RescheduleEvent(EVENT_REMOVE_CC, 2*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ _events.RescheduleEvent(EVENT_REMOVE_CC, 3*IN_MILLISECONDS);
+ return;
+ default:
+ return;
}
- else CCTimer -= uiDiff;
}
- if (mAIType == AI_MELEE || mAIType == AI_PET) DoMeleeAttackIfReady();
+ if (_aiType == AI_MELEE || _aiType == AI_PET)
+ DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 _aiType;
+ // make sure that every bosses separate events dont mix with these _events
+ EventMap _events;
};
/********************************************************************
HEALERS
********************************************************************/
-enum eDruidSpells
-{
- SPELL_LIFEBLOOM = 66093,
- SPELL_NOURISH = 66066,
- SPELL_REGROWTH = 66067,
- SPELL_REJUVENATION = 66065,
- SPELL_TRANQUILITY = 66086,
- SPELL_BARKSKIN = 65860, //1 min cd
- SPELL_THORNS = 66068,
- SPELL_NATURE_GRASP = 66071, //1 min cd, self buff
-};
-
class mob_toc_druid : public CreatureScript
{
-public:
- mob_toc_druid() : CreatureScript("mob_toc_druid") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_druidAI (creature);
- }
-
- struct mob_toc_druidAI : public boss_faction_championsAI
- {
- mob_toc_druidAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
-
- uint32 m_uiNatureGraspTimer;
- uint32 m_uiTranquilityTimer;
- uint32 m_uiBarkskinTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiNatureGraspTimer = IN_MILLISECONDS;
- m_uiTranquilityTimer = IN_MILLISECONDS;
- m_uiBarkskinTimer = IN_MILLISECONDS;
- m_uiCommonTimer = IN_MILLISECONDS;
- SetEquipmentSlots(false, 51799, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_druid() : CreatureScript("mob_toc_druid") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_druidAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_druidAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_LIFEBLOOM, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_NOURISH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_REGROWTH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_REJUVENATION, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_TRANQUILITY, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEAL_BARKSKIN, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_THORNS, 2*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_NATURE_GRASP, urand(3*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 51799, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- if (m_uiNatureGraspTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- DoCast(me, SPELL_NATURE_GRASP);
- m_uiNatureGraspTimer = urand(40*IN_MILLISECONDS, 80*IN_MILLISECONDS);
- } else m_uiNatureGraspTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiTranquilityTimer <= uiDiff)
- {
- DoCastAOE(SPELL_TRANQUILITY);
- m_uiTranquilityTimer = urand(40*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- } else m_uiTranquilityTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiBarkskinTimer <= uiDiff)
- {
- if (HealthBelowPct(50))
- DoCast(me, SPELL_BARKSKIN);
- m_uiBarkskinTimer = urand(45*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- } else m_uiBarkskinTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 4))
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0:
- DoCast(me, SPELL_LIFEBLOOM);
- break;
- case 1:
- DoCast(me, SPELL_NOURISH);
- break;
- case 2:
- DoCast(me, SPELL_REGROWTH);
- break;
- case 3:
- DoCast(me, SPELL_REJUVENATION);
- break;
- case 4:
- if (Creature* target = SelectRandomFriendlyMissingBuff(SPELL_THORNS))
- DoCast(target, SPELL_THORNS);
- break;
+ switch (eventId)
+ {
+ case EVENT_LIFEBLOOM:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_LIFEBLOOM);
+ events.ScheduleEvent(EVENT_LIFEBLOOM, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_NOURISH:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_NOURISH);
+ events.ScheduleEvent(EVENT_NOURISH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_REGROWTH:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_REGROWTH);
+ events.ScheduleEvent(EVENT_REGROWTH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_REJUVENATION:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_REJUVENATION);
+ events.ScheduleEvent(EVENT_REJUVENATION, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_TRANQUILITY:
+ DoCastAOE(SPELL_TRANQUILITY);
+ events.ScheduleEvent(EVENT_TRANQUILITY, urand(15*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_BARKSKIN:
+ if (HealthBelowPct(30))
+ {
+ DoCast(me, SPELL_BARKSKIN);
+ events.RescheduleEvent(EVENT_HEAL_BARKSKIN, 60*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_HEAL_BARKSKIN, 3*IN_MILLISECONDS);
+ return;
+ case EVENT_THORNS:
+ if (Creature* target = SelectRandomFriendlyMissingBuff(SPELL_THORNS))
+ DoCast(target, SPELL_THORNS);
+ events.ScheduleEvent(EVENT_THORNS, urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ return;
+ case EVENT_NATURE_GRASP:
+ DoCast(me, SPELL_NATURE_GRASP);
+ events.ScheduleEvent(EVENT_NATURE_GRASP, 60*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_druidAI (creature);
}
- };
-
-};
-
-enum eShamanSpells
-{
- SPELL_HEALING_WAVE = 66055,
- SPELL_RIPTIDE = 66053,
- SPELL_SPIRIT_CLEANSE = 66056, //friendly only
- SPELL_HEROISM = 65983,
- SPELL_BLOODLUST = 65980,
- SPELL_HEX = 66054,
- SPELL_EARTH_SHIELD = 66063,
- SPELL_EARTH_SHOCK = 65973,
- AURA_EXHAUSTION = 57723,
- AURA_SATED = 57724,
};
class mob_toc_shaman : public CreatureScript
{
-public:
- mob_toc_shaman() : CreatureScript("mob_toc_shaman") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_shamanAI (creature);
- }
-
- struct mob_toc_shamanAI : public boss_faction_championsAI
- {
- mob_toc_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
-
- uint32 m_uiHeroismOrBloodlustTimer;
- uint32 m_uiHexTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiHeroismOrBloodlustTimer = IN_MILLISECONDS;
- m_uiHexTimer = IN_MILLISECONDS;
- m_uiCommonTimer = IN_MILLISECONDS;
- SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_shaman() : CreatureScript("mob_toc_shaman") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_shamanAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_HEALING_WAVE, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_RIPTIDE, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SPIRIT_CLEANSE, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEAL_BLOODLUST_HEROISM, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_HEX, urand(5*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_EARTH_SHIELD, 1*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_HEAL_EARTH_SHOCK, urand(5*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- if (m_uiHeroismOrBloodlustTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (me->getFaction()) //Am i alliance?
- {
- if (!me->HasAura(AURA_EXHAUSTION))
- DoCastAOE(SPELL_HEROISM);
- }
- else
- if (!me->HasAura(AURA_SATED))
- DoCastAOE(SPELL_BLOODLUST);
- m_uiHeroismOrBloodlustTimer = 300*IN_MILLISECONDS;
- } else m_uiHeroismOrBloodlustTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiHexTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_HEX);
- m_uiHexTimer = urand(10*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiHexTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 5))
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0: case 1:
- DoCast(me, SPELL_HEALING_WAVE);
- break;
- case 2:
- DoCast(me, SPELL_RIPTIDE);
- break;
- case 3:
- DoCast(me, SPELL_EARTH_SHOCK);
- break;
- case 4:
- DoCast(me, SPELL_SPIRIT_CLEANSE);
- break;
- case 5:
- if (Unit* target = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD))
- DoCast(target, SPELL_EARTH_SHIELD);
- break;
+ switch (eventId)
+ {
+ case EVENT_HEALING_WAVE:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_HEALING_WAVE);
+ events.ScheduleEvent(EVENT_HEALING_WAVE, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ return;
+ case EVENT_RIPTIDE:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_RIPTIDE);
+ events.ScheduleEvent(EVENT_RIPTIDE, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_SPIRIT_CLEANSE:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_SPIRIT_CLEANSE);
+ events.ScheduleEvent(EVENT_SPIRIT_CLEANSE, urand(15*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_BLOODLUST_HEROISM:
+ if (me->getFaction()) // alliance = 1
+ {
+ if (!me->HasAura(AURA_EXHAUSTION))
+ DoCastAOE(SPELL_HEROISM);
+ }
+ else
+ {
+ if (!me->HasAura(AURA_SATED))
+ DoCastAOE(SPELL_BLOODLUST);
+ }
+ events.ScheduleEvent(EVENT_HEAL_BLOODLUST_HEROISM, 5*MINUTE*IN_MILLISECONDS);
+ return;
+ case EVENT_HEX:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ DoCast(target, SPELL_HEX);
+ events.ScheduleEvent(EVENT_HEX, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_EARTH_SHIELD:
+ if (Creature* target = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD))
+ DoCast(target, SPELL_EARTH_SHIELD);
+ events.ScheduleEvent(EVENT_EARTH_SHIELD, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_EARTH_SHOCK:
+ if (Unit* target = SelectEnemyCaster(true))
+ DoCast(target, SPELL_EARTH_SHOCK);
+ events.ScheduleEvent(EVENT_HEAL_EARTH_SHOCK, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_shamanAI (creature);
}
- };
-
-};
-
-enum ePaladinSpells
-{
- SPELL_HAND_OF_FREEDOM = 68757, //25 sec cd
- SPELL_BUBBLE = 66010, //5 min cd
- SPELL_CLEANSE = 66116,
- SPELL_FLASH_OF_LIGHT = 66113,
- SPELL_HOLY_LIGHT = 66112,
- SPELL_HOLY_SHOCK = 66114,
- SPELL_HAND_OF_PROTECTION = 66009,
- SPELL_HAMMER_OF_JUSTICE = 66613,
};
class mob_toc_paladin : public CreatureScript
{
-public:
- mob_toc_paladin() : CreatureScript("mob_toc_paladin") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_paladinAI (creature);
- }
-
- struct mob_toc_paladinAI : public boss_faction_championsAI
- {
- mob_toc_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
-
- uint32 m_uiBubbleTimer;
- uint32 m_uiHandOfProtectionTimer;
- uint32 m_uiHolyShockTimer;
- uint32 m_uiHandOfFreedomTimer;
- uint32 m_uiHammerOfJusticeTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiBubbleTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- m_uiHandOfProtectionTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- m_uiHolyShockTimer = urand(6*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiHandOfFreedomTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- m_uiHammerOfJusticeTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 50771, 47079, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_paladin() : CreatureScript("mob_toc_paladin") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_paladinAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
-
- if (m_uiBubbleTimer <= uiDiff)
- {
- //cast bubble at 20% hp
- if (HealthBelowPct(20))
- DoCast(me, SPELL_BUBBLE);
- m_uiBubbleTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- } else m_uiBubbleTimer -= uiDiff;
+ mob_toc_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_HAND_OF_FREEDOM, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEAL_DIVINE_SHIELD, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEANSE, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FLASH_OF_LIGHT, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HOLY_LIGHT, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HOLY_SHOCK, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEAL_HAND_OF_PROTECTION, urand(30*IN_MILLISECONDS, 60*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HAMMER_OF_JUSTICE, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 50771, 47079, EQUIP_NO_CHANGE);
+ }
- if (m_uiHandOfProtectionTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (Unit* target = DoSelectLowestHpFriendly(40.0f))
- if (target->HealthBelowPct(15))
- DoCast(target, SPELL_HAND_OF_PROTECTION);
- m_uiHandOfProtectionTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- } else m_uiHandOfProtectionTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiHolyShockTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_HOLY_SHOCK);
- m_uiHolyShockTimer = urand(6*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiHolyShockTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiHandOfFreedomTimer <= uiDiff)
- {
- if (Unit* target = SelectRandomFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM))
- DoCast(target, SPELL_HAND_OF_FREEDOM);
- m_uiHandOfFreedomTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiHandOfFreedomTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiHammerOfJusticeTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_HAMMER_OF_JUSTICE);
- m_uiHammerOfJusticeTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiHammerOfJusticeTimer -= uiDiff;
-
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 4))
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0: case 1:
- DoCast(me, SPELL_FLASH_OF_LIGHT);
- break;
- case 2: case 3:
- DoCast(me, SPELL_HOLY_LIGHT);
- break;
- case 4:
- DoCast(me, SPELL_CLEANSE);
- break;
+ switch (eventId)
+ {
+ case EVENT_HAND_OF_FREEDOM:
+ if (Unit* target = SelectRandomFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM))
+ DoCast(target, SPELL_HAND_OF_FREEDOM);
+ events.ScheduleEvent(EVENT_HAND_OF_FREEDOM, urand(15*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_DIVINE_SHIELD:
+ if (HealthBelowPct(30) && !me->HasAura(SPELL_FORBEARANCE))
+ {
+ DoCast(me, SPELL_DIVINE_SHIELD);
+ events.RescheduleEvent(EVENT_HEAL_DIVINE_SHIELD, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_HEAL_DIVINE_SHIELD, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_CLEANSE:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_CLEANSE);
+ events.ScheduleEvent(EVENT_CLEANSE, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_FLASH_OF_LIGHT:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_FLASH_OF_LIGHT);
+ events.ScheduleEvent(EVENT_FLASH_OF_LIGHT, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ return;
+ case EVENT_HOLY_LIGHT:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_HOLY_LIGHT);
+ events.ScheduleEvent(EVENT_HOLY_LIGHT, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_HOLY_SHOCK:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_HOLY_SHOCK);
+ events.ScheduleEvent(EVENT_HOLY_SHOCK, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_HAND_OF_PROTECTION:
+ if (Unit* target = DoSelectLowestHpFriendly(30.0f))
+ {
+ if (!target->HasAura(SPELL_FORBEARANCE))
+ {
+ DoCast(target, SPELL_HAND_OF_PROTECTION);
+ events.RescheduleEvent(EVENT_HEAL_HAND_OF_PROTECTION, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_HEAL_HAND_OF_PROTECTION, 3*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_HEAL_HAND_OF_PROTECTION, 10*IN_MILLISECONDS);
+ return;
+ case EVENT_HAMMER_OF_JUSTICE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 15.0f, true))
+ DoCast(target, SPELL_HAMMER_OF_JUSTICE);
+ events.ScheduleEvent(EVENT_HAMMER_OF_JUSTICE, 40*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_paladinAI (creature);
}
- };
-
-};
-
-enum ePriestSpells
-{
- SPELL_RENEW = 66177,
- SPELL_SHIELD = 66099,
- SPELL_FLASH_HEAL = 66104,
- SPELL_DISPEL = 65546,
- SPELL_PSYCHIC_SCREAM = 65543,
- SPELL_MANA_BURN = 66100,
};
class mob_toc_priest : public CreatureScript
{
-public:
- mob_toc_priest() : CreatureScript("mob_toc_priest") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_priestAI (creature);
- }
-
- struct mob_toc_priestAI : public boss_faction_championsAI
- {
- mob_toc_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
-
- uint32 m_uiPsychicScreamTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiPsychicScreamTimer = IN_MILLISECONDS;
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_priest() : CreatureScript("mob_toc_priest") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_priestAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_RENEW, urand(3*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SHIELD, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FLASH_HEAL, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEAL_DISPEL, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEAL_PSYCHIC_SCREAM, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_MANA_BURN, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_PENANCE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- if (m_uiPsychicScreamTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (EnemiesInRange(10.0f) > 2)
- DoCastAOE(SPELL_PSYCHIC_SCREAM);
- m_uiPsychicScreamTimer = urand(5*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiPsychicScreamTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 5))
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0:
- DoCast(me, SPELL_RENEW);
- break;
- case 1:
- DoCast(me, SPELL_SHIELD);
- break;
- case 2: case 3:
- DoCast(me, SPELL_FLASH_HEAL);
- break;
- case 4:
- if (Unit* target = urand(0, 1) ? SelectTarget(SELECT_TARGET_RANDOM, 0) : DoSelectLowestHpFriendly(40.0f))
- DoCast(target, SPELL_DISPEL);
- break;
- case 5:
- DoCast(me, SPELL_MANA_BURN);
- break;
+ switch (eventId)
+ {
+ case EVENT_RENEW:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_RENEW);
+ events.ScheduleEvent(EVENT_RENEW, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ return;
+ case EVENT_SHIELD:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_SHIELD);
+ events.ScheduleEvent(EVENT_SHIELD, urand(15*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_FLASH_HEAL:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_FLASH_HEAL);
+ events.ScheduleEvent(EVENT_FLASH_HEAL, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_DISPEL:
+ if (Unit* target = urand(0, 1) ? SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f, true) : DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_DISPEL);
+ events.ScheduleEvent(EVENT_HEAL_DISPEL, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_HEAL_PSYCHIC_SCREAM:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_PSYCHIC_SCREAM);
+ events.ScheduleEvent(EVENT_HEAL_PSYCHIC_SCREAM, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_MANA_BURN:
+ if (Unit* target = SelectEnemyCaster(false))
+ DoCast(target, SPELL_MANA_BURN);
+ events.ScheduleEvent(EVENT_MANA_BURN, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_PENANCE:
+ if (Unit* target = DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_PENANCE);
+ events.ScheduleEvent(EVENT_PENANCE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_priestAI (creature);
}
- };
-
};
/********************************************************************
RANGED
********************************************************************/
-enum eShadowPriestSpells
-{
- SPELL_SILENCE = 65542,
- SPELL_VAMPIRIC_TOUCH = 65490,
- SPELL_SW_PAIN = 65541,
- SPELL_MIND_FLAY = 65488,
- SPELL_MIND_BLAST = 65492,
- SPELL_HORROR = 65545,
- SPELL_DISPERSION = 65544,
- SPELL_SHADOWFORM = 16592,
-};
-
class mob_toc_shadow_priest : public CreatureScript
{
-public:
- mob_toc_shadow_priest() : CreatureScript("mob_toc_shadow_priest") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_shadow_priestAI (creature);
- }
-
- struct mob_toc_shadow_priestAI : public boss_faction_championsAI
- {
- mob_toc_shadow_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
-
- uint32 m_uiPsychicScreamTimer;
- uint32 m_uiDispersionTimer;
- uint32 m_uiSilenceTimer;
- uint32 m_uiMindBlastTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiPsychicScreamTimer = urand(5*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiDispersionTimer = urand(1*IN_MILLISECONDS, 180*IN_MILLISECONDS);
- m_uiSilenceTimer = urand(8*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiMindBlastTimer = urand(3*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 50040, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- DoCast(me, SPELL_SHADOWFORM);
- }
-
- void EnterCombat(Unit* who)
- {
- boss_faction_championsAI::EnterCombat(who);
- }
+ public:
+ mob_toc_shadow_priest() : CreatureScript("mob_toc_shadow_priest") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_shadow_priestAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
-
- if (m_uiPsychicScreamTimer <= uiDiff)
- {
- if (EnemiesInRange(10.0f) > 2)
- DoCastAOE(SPELL_PSYCHIC_SCREAM);
- m_uiPsychicScreamTimer = urand(5*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiPsychicScreamTimer -= uiDiff;
+ mob_toc_shadow_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_SILENCE, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_VAMPIRIC_TOUCH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SW_PAIN, urand(3*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_MIND_BLAST, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HORROR, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DISPERSION, urand(20*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DPS_DISPEL, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DPS_PSYCHIC_SCREAM, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 50040, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ DoCast(me, SPELL_SHADOWFORM);
+ }
- if (m_uiDispersionTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (HealthBelowPct(20))
- DoCast(me, SPELL_DISPERSION);
- m_uiDispersionTimer = urand(1*IN_MILLISECONDS, 180*IN_MILLISECONDS);
- } else m_uiDispersionTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiSilenceTimer <= uiDiff)
- {
- if (Unit* target = SelectEnemyCaster(false))
- DoCast(target, SPELL_SILENCE);
- m_uiSilenceTimer = urand(8*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiSilenceTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiMindBlastTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_MIND_BLAST);
- m_uiMindBlastTimer = urand(3*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- } else m_uiMindBlastTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 4))
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0: case 1:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_MIND_FLAY);
- break;
- case 2:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_VAMPIRIC_TOUCH);
- break;
- case 3:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SW_PAIN);
- break;
- case 4:
- if (Unit* target = urand(0, 1) ? SelectTarget(SELECT_TARGET_RANDOM, 0) : DoSelectLowestHpFriendly(40.0f))
- DoCast(target, SPELL_DISPEL);
- break;
+ switch (eventId)
+ {
+ case EVENT_SILENCE:
+ if (Unit* target = SelectEnemyCaster(true))
+ DoCast(target, SPELL_SILENCE);
+ events.ScheduleEvent(EVENT_SILENCE, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_VAMPIRIC_TOUCH:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f, true))
+ DoCast(target, SPELL_VAMPIRIC_TOUCH);
+ events.ScheduleEvent(EVENT_VAMPIRIC_TOUCH, urand(10*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_SW_PAIN:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
+ DoCast(target, SPELL_SW_PAIN);
+ events.ScheduleEvent(EVENT_SW_PAIN, urand(10*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_MIND_BLAST:
+ DoCastVictim(SPELL_MIND_BLAST);
+ events.ScheduleEvent(EVENT_MIND_BLAST, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_HORROR:
+ DoCastVictim(SPELL_HORROR);
+ events.ScheduleEvent(EVENT_HORROR, urand(15*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_DISPERSION:
+ if (HealthBelowPct(40))
+ {
+ DoCast(me, SPELL_DISPERSION);
+ events.RescheduleEvent(EVENT_DISPERSION, 180*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DISPERSION, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_DPS_DISPEL:
+ if (Unit* target = urand(0, 1) ? SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f, true) : DoSelectLowestHpFriendly(40.0f))
+ DoCast(target, SPELL_DISPEL);
+ events.ScheduleEvent(EVENT_DPS_DISPEL, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_DPS_PSYCHIC_SCREAM:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_PSYCHIC_SCREAM);
+ events.ScheduleEvent(EVENT_DPS_PSYCHIC_SCREAM, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ DoSpellAttackIfReady(SPELL_MIND_FLAY);
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_shadow_priestAI (creature);
}
- };
-
-};
-
-enum WarlockSpells
-{
- SPELL_HELLFIRE = 65816,
- SPELL_CORRUPTION = 65810,
- SPELL_CURSE_OF_AGONY = 65814,
- SPELL_CURSE_OF_EXHAUSTION = 65815,
- SPELL_FEAR = 65809, // 8s
- SPELL_SEARING_PAIN = 65819,
- SPELL_SHADOW_BOLT = 65821,
- SPELL_UNSTABLE_AFFLICTION = 65812, // 15s
- SPELL_UNSTABLE_AFFLICTION_DISPEL = 65813,
- SPELL_SUMMON_FELHUNTER = 67514,
};
class mob_toc_warlock : public CreatureScript
{
-public:
- mob_toc_warlock() : CreatureScript("mob_toc_warlock") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_warlockAI (creature);
- }
-
- struct mob_toc_warlockAI : public boss_faction_championsAI
- {
- mob_toc_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED), Summons(me) {}
-
- SummonList Summons;
-
- uint32 m_uiFearTimer;
- uint32 m_uiHellfireTimer;
- uint32 m_uiUnstableAfflictionTimer;
- uint32 m_uiCommonTimer;
- uint32 m_uiSummonPetTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiFearTimer = urand(4*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiHellfireTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- m_uiUnstableAfflictionTimer = urand(2*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
-
- m_uiSummonPetTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- DoCast(SPELL_SUMMON_FELHUNTER);
- }
+ public:
+ mob_toc_warlock() : CreatureScript("mob_toc_warlock") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_warlockAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_HELLFIRE, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_CORRUPTION, urand(2*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_CURSE_OF_AGONY, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_CURSE_OF_EXHAUSTION, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FEAR, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SEARING_PAIN, urand(5*IN_MILLISECONDS, 12*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_UNSTABLE_AFFLICTION, urand(7*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- if (m_uiFearTimer <= uiDiff)
+ void EnterCombat(Unit* who)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_FEAR);
- m_uiFearTimer = urand(4*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiFearTimer -= uiDiff;
+ boss_faction_championsAI::EnterCombat(who);
+ DoCast(SPELL_SUMMON_FELHUNTER);
+ }
- if (m_uiHellfireTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (EnemiesInRange(10.0f) > 2)
- DoCastAOE(SPELL_HELLFIRE);
- m_uiHellfireTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiHellfireTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiUnstableAfflictionTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_UNSTABLE_AFFLICTION);
- m_uiUnstableAfflictionTimer = urand(2*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- } else m_uiUnstableAfflictionTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiSummonPetTimer <= uiDiff)
- {
- m_uiSummonPetTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiSummonPetTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 5))
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0: case 1:
- DoCastVictim(SPELL_SHADOW_BOLT);
- break;
- case 2:
- DoCastVictim(SPELL_SEARING_PAIN);
- break;
- case 3:
- DoCastVictim(SPELL_CORRUPTION);
- break;
- case 4:
- DoCastVictim(SPELL_CURSE_OF_AGONY);
- break;
- case 5:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_CURSE_OF_EXHAUSTION);
- break;
+ switch (eventId)
+ {
+ case EVENT_HELLFIRE:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_HELLFIRE);
+ events.ScheduleEvent(EVENT_HELLFIRE, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_CORRUPTION:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
+ DoCast(target, SPELL_CORRUPTION);
+ events.ScheduleEvent(EVENT_CORRUPTION, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_CURSE_OF_AGONY:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
+ DoCast(target, SPELL_CURSE_OF_AGONY);
+ events.ScheduleEvent(EVENT_CURSE_OF_AGONY, urand(20*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_CURSE_OF_EXHAUSTION:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
+ DoCast(target, SPELL_CURSE_OF_EXHAUSTION);
+ events.ScheduleEvent(EVENT_CURSE_OF_EXHAUSTION, urand(20*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_FEAR:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f, true))
+ DoCast(target, SPELL_FEAR);
+ events.ScheduleEvent(EVENT_FEAR, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_SEARING_PAIN:
+ DoCastVictim(SPELL_SEARING_PAIN);
+ events.ScheduleEvent(EVENT_SEARING_PAIN, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_UNSTABLE_AFFLICTION:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f, true))
+ DoCast(target, SPELL_UNSTABLE_AFFLICTION);
+ events.ScheduleEvent(EVENT_UNSTABLE_AFFLICTION, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
- boss_faction_championsAI::UpdateAI(uiDiff);
- }
- };
-
-};
+ DoSpellAttackIfReady(SPELL_SHADOW_BOLT);
+ }
+ };
-enum eMageSpells
-{
- SPELL_ARCANE_BARRAGE = 65799, //3s
- SPELL_ARCANE_BLAST = 65791,
- SPELL_ARCANE_EXPLOSION = 65800,
- SPELL_BLINK = 65793, //15s
- SPELL_COUNTERSPELL = 65790, //24s
- SPELL_FROST_NOVA = 65792, //25s
- SPELL_FROSTBOLT = 65807,
- SPELL_ICE_BLOCK = 65802, //5min
- SPELL_POLYMORPH = 65801, //15s
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_warlockAI (creature);
+ }
};
class mob_toc_mage : public CreatureScript
{
-public:
- mob_toc_mage() : CreatureScript("mob_toc_mage") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_mageAI (creature);
- }
-
- struct mob_toc_mageAI : public boss_faction_championsAI
- {
- mob_toc_mageAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
-
- uint32 m_uiCounterspellTimer;
- uint32 m_uiBlinkTimer;
- uint32 m_uiIceBlockTimer;
- uint32 m_uiPolymorphTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiCounterspellTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiBlinkTimer = urand(7*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiIceBlockTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- m_uiPolymorphTimer = urand(15*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 47524, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_mage() : CreatureScript("mob_toc_mage") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_mageAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_mageAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(1*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_BLINK, urand(15*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_COUNTERSPELL, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FROST_NOVA, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ICE_BLOCK, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_POLYMORPH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 47524, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- if (m_uiCounterspellTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (Unit* target = SelectEnemyCaster(false))
- DoCast(target, SPELL_COUNTERSPELL);
- m_uiCounterspellTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiCounterspellTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiBlinkTimer <= uiDiff)
- {
- if (HealthBelowPct(50) && EnemiesInRange(10.0f) > 3)
- {
- DoCastAOE(SPELL_FROST_NOVA);
- DoCast(SPELL_BLINK);
- }
- m_uiBlinkTimer = urand(7*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiBlinkTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiIceBlockTimer <= uiDiff)
- {
- if (HealthBelowPct(20))
- DoCast(me, SPELL_ICE_BLOCK);
- m_uiIceBlockTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- } else m_uiIceBlockTimer -= uiDiff;
-
- if (m_uiPolymorphTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_POLYMORPH);
- m_uiPolymorphTimer = urand(15*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiPolymorphTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 2))
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0:
- DoCast(me, SPELL_ARCANE_BARRAGE);
- break;
- case 1:
- DoCastVictim(SPELL_ARCANE_BLAST);
- break;
- case 2:
- DoCastVictim(SPELL_FROSTBOLT);
- break;
+ switch (eventId)
+ {
+ case EVENT_ARCANE_BARRAGE:
+ DoCastVictim(SPELL_ARCANE_BARRAGE);
+ events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(5*IN_MILLISECONDS, 7*IN_MILLISECONDS));
+ return;
+ case EVENT_ARCANE_BLAST:
+ DoCastVictim(SPELL_ARCANE_BLAST);
+ events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_ARCANE_EXPLOSION:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_ARCANE_EXPLOSION);
+ events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_BLINK:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCast(SPELL_BLINK);
+ events.ScheduleEvent(EVENT_BLINK, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_COUNTERSPELL:
+ if (Unit* target = SelectEnemyCaster(true))
+ DoCast(target, SPELL_COUNTERSPELL);
+ events.ScheduleEvent(EVENT_COUNTERSPELL, 24*IN_MILLISECONDS);
+ return;
+ case EVENT_FROST_NOVA:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_FROST_NOVA);
+ events.ScheduleEvent(EVENT_FROST_NOVA, 25*IN_MILLISECONDS);
+ return;
+ case EVENT_ICE_BLOCK:
+ if (HealthBelowPct(30))
+ {
+ DoCast(SPELL_ICE_BLOCK);
+ events.RescheduleEvent(EVENT_ICE_BLOCK, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_ICE_BLOCK, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_POLYMORPH:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ DoCast(target, SPELL_POLYMORPH);
+ events.ScheduleEvent(EVENT_POLYMORPH, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ DoSpellAttackIfReady(SPELL_FROSTBOLT);
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_mageAI (creature);
}
- };
-
-};
-
-enum eHunterSpells
-{
- SPELL_AIMED_SHOT = 65883,
- SPELL_DETERRENCE = 65871, //90s
- SPELL_DISENGAGE = 65869, //30s
- SPELL_EXPLOSIVE_SHOT = 65866,
- SPELL_FROST_TRAP = 65880, //30s
- SPELL_SHOOT = 65868, //1.7s
- SPELL_STEADY_SHOT = 65867, //3s
- SPELL_WING_CLIP = 66207, //6s
- SPELL_WYVERN_STING = 65877, //60s
- SPELL_CALL_PET = 67777,
};
class mob_toc_hunter : public CreatureScript
{
-public:
- mob_toc_hunter() : CreatureScript("mob_toc_hunter") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_hunterAI (creature);
- }
-
- struct mob_toc_hunterAI : public boss_faction_championsAI
- {
- mob_toc_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED), Summons(me) {}
-
- SummonList Summons;
-
- uint32 m_uiDisengageTimer;
- uint32 m_uiDeterrenceTimer;
- uint32 m_uiWyvernStingTimer;
- uint32 m_uiFrostTrapTimer;
- uint32 m_uiWingClipTimer;
- uint32 m_uiCommonTimer;
- uint32 m_uiSummonPetTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiDisengageTimer = urand(12*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- m_uiDeterrenceTimer = urand(20*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- m_uiWyvernStingTimer = urand(7*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- m_uiFrostTrapTimer = urand(12*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- m_uiWingClipTimer = urand(4*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711);
-
- m_uiSummonPetTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- DoCast(SPELL_CALL_PET);
- }
+ public:
+ mob_toc_hunter() : CreatureScript("mob_toc_hunter") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_hunterAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
-
- if (m_uiDisengageTimer <= uiDiff)
- {
- if (EnemiesInRange(10.0f) > 3)
- DoCast(SPELL_DISENGAGE);
- m_uiDisengageTimer = urand(12*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- } else m_uiDisengageTimer -= uiDiff;
+ mob_toc_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_AIMED_SHOT, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DETERRENCE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DISENGAGE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_EXPLOSIVE_SHOT, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FROST_TRAP, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_STEADY_SHOT, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_WING_CLIP, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_WYVERN_STING, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711);
+ }
- if (m_uiDeterrenceTimer <= uiDiff)
+ void EnterCombat(Unit* who)
{
- if (HealthBelowPct(20))
- DoCast(SPELL_DETERRENCE);
- m_uiDeterrenceTimer = urand(20*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- } else m_uiDeterrenceTimer -= uiDiff;
+ boss_faction_championsAI::EnterCombat(who);
+ DoCast(SPELL_CALL_PET);
+ }
- if (m_uiWyvernStingTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- DoCastVictim(SPELL_WYVERN_STING);
- m_uiWyvernStingTimer = urand(7*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- } else m_uiWyvernStingTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiFrostTrapTimer <= uiDiff)
- {
- DoCast(SPELL_FROST_TRAP);
- m_uiFrostTrapTimer = urand(12*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiFrostTrapTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiWingClipTimer <= uiDiff)
- {
- if (me->GetDistance2d(me->getVictim()) < 5.0f)
- DoCastVictim(SPELL_WING_CLIP);
- m_uiWingClipTimer = urand(4*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- } else m_uiWingClipTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiSummonPetTimer <= uiDiff)
- {
- m_uiSummonPetTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiSummonPetTimer -= uiDiff;
-
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 3))
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0: case 1:
- DoCastVictim(SPELL_SHOOT);
- break;
- case 2:
- DoCastVictim(SPELL_EXPLOSIVE_SHOT);
- break;
- case 3:
- DoCastVictim(SPELL_AIMED_SHOT);
- break;
+ switch (eventId)
+ {
+ case EVENT_AIMED_SHOT:
+ DoCastVictim(SPELL_AIMED_SHOT);
+ events.ScheduleEvent(EVENT_AIMED_SHOT, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_DETERRENCE:
+ if (HealthBelowPct(30))
+ {
+ DoCast(SPELL_DETERRENCE);
+ events.RescheduleEvent(EVENT_DETERRENCE, 150*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DETERRENCE, 10*IN_MILLISECONDS);
+ return;
+ case EVENT_DISENGAGE:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCast(SPELL_DISENGAGE);
+ events.ScheduleEvent(EVENT_DISENGAGE, 30*IN_MILLISECONDS);
+ return;
+ case EVENT_EXPLOSIVE_SHOT:
+ DoCastVictim(SPELL_EXPLOSIVE_SHOT);
+ events.ScheduleEvent(EVENT_EXPLOSIVE_SHOT, urand(6*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_FROST_TRAP:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_FROST_TRAP);
+ events.ScheduleEvent(EVENT_FROST_TRAP, 30*IN_MILLISECONDS);
+ return;
+ case EVENT_STEADY_SHOT:
+ DoCastVictim(SPELL_STEADY_SHOT);
+ events.ScheduleEvent(EVENT_STEADY_SHOT, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_WING_CLIP:
+ if (me->GetDistance2d(me->getVictim()) < 6.0f)
+ DoCastVictim(SPELL_WING_CLIP);
+ events.ScheduleEvent(EVENT_WING_CLIP, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_WYVERN_STING:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ DoCast(target, SPELL_WYVERN_STING);
+ events.ScheduleEvent(EVENT_WYVERN_STING, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ DoSpellAttackIfReady(SPELL_SHOOT);
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_hunterAI (creature);
}
- };
-
-};
-
-enum eBoomkinSpells
-{
- SPELL_CYCLONE = 65859, //6s
- SPELL_ENTANGLING_ROOTS = 65857, //10s
- SPELL_FAERIE_FIRE = 65863,
- SPELL_FORCE_OF_NATURE = 65861, //180s
- SPELL_INSECT_SWARM = 65855,
- SPELL_MOONFIRE = 65856, //5s
- SPELL_STARFIRE = 65854,
- SPELL_WRATH = 65862,
};
class mob_toc_boomkin : public CreatureScript
{
-public:
- mob_toc_boomkin() : CreatureScript("mob_toc_boomkin") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_boomkinAI (creature);
- }
-
- struct mob_toc_boomkinAI : public boss_faction_championsAI
- {
- mob_toc_boomkinAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
-
- uint32 m_uiBarkskinTimer;
- uint32 m_uiCycloneTimer;
- uint32 m_uiEntanglingRootsTimer;
- uint32 m_uiFaerieFireTimer;
- uint32 m_uiCommonTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiBarkskinTimer = urand(5*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- m_uiCycloneTimer = urand(5*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- m_uiEntanglingRootsTimer = urand(5*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- m_uiFaerieFireTimer = urand(10*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- SetEquipmentSlots(false, 50966, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_boomkin() : CreatureScript("mob_toc_boomkin") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_boomkinAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_boomkinAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
- if (m_uiBarkskinTimer <= uiDiff)
+ void Reset()
{
- if (HealthBelowPct(50))
- DoCast(me, SPELL_BARKSKIN);
- m_uiBarkskinTimer = urand(5*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- } else m_uiBarkskinTimer -= uiDiff;
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_CYCLONE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ENTANGLING_ROOTS, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FAERIE_FIRE, urand(2*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FORCE_OF_NATURE, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_INSECT_SWARM, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_MOONFIRE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_STARFIRE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DPS_BARKSKIN, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
- if (m_uiCycloneTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_CYCLONE);
- m_uiCycloneTimer = urand(5*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiCycloneTimer -= uiDiff;
+ SetEquipmentSlots(false, 50966, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- if (m_uiEntanglingRootsTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_ENTANGLING_ROOTS);
- m_uiEntanglingRootsTimer = urand(5*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiEntanglingRootsTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiFaerieFireTimer <= uiDiff)
- {
- DoCastVictim(SPELL_FAERIE_FIRE);
- m_uiFaerieFireTimer = urand(10*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiFaerieFireTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiCommonTimer <= uiDiff)
- {
- switch (urand(0, 6))
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- case 0: case 1:
- DoCastVictim(SPELL_MOONFIRE);
- break;
- case 2:
- DoCastVictim(SPELL_INSECT_SWARM);
- break;
- case 3:
- DoCastVictim(SPELL_STARFIRE);
- break;
- case 4: case 5: case 6:
- DoCastVictim(SPELL_WRATH);
- break;
+ switch (eventId)
+ {
+ case EVENT_CYCLONE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ DoCast(target, SPELL_CYCLONE);
+ events.ScheduleEvent(EVENT_CYCLONE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_ENTANGLING_ROOTS:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f, true))
+ DoCast(target, SPELL_ENTANGLING_ROOTS);
+ events.ScheduleEvent(EVENT_ENTANGLING_ROOTS, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_FAERIE_FIRE:
+ DoCastVictim(SPELL_FAERIE_FIRE);
+ events.ScheduleEvent(EVENT_FAERIE_FIRE, urand(30*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ return;
+ case EVENT_FORCE_OF_NATURE:
+ DoCastVictim(SPELL_FORCE_OF_NATURE);
+ events.ScheduleEvent(EVENT_FORCE_OF_NATURE, 180*IN_MILLISECONDS);
+ return;
+ case EVENT_INSECT_SWARM:
+ DoCastVictim(SPELL_INSECT_SWARM);
+ events.ScheduleEvent(EVENT_INSECT_SWARM, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_MOONFIRE:
+ DoCastVictim(SPELL_MOONFIRE);
+ events.ScheduleEvent(EVENT_MOONFIRE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_STARFIRE:
+ DoCastVictim(SPELL_STARFIRE);
+ events.ScheduleEvent(EVENT_STARFIRE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_DPS_BARKSKIN:
+ if (HealthBelowPct(30))
+ {
+ DoCast(me, SPELL_BARKSKIN);
+ events.RescheduleEvent(EVENT_DPS_BARKSKIN, 60*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DPS_BARKSKIN, 5*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
}
- m_uiCommonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiCommonTimer -= uiDiff;
+ DoSpellAttackIfReady(SPELL_WRATH);
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_boomkinAI (creature);
}
- };
-
};
/********************************************************************
MELEE
********************************************************************/
-enum eWarriorSpells
-{
- SPELL_BLADESTORM = 65947,
- SPELL_INTIMIDATING_SHOUT = 65930,
- SPELL_MORTAL_STRIKE = 65926,
- SPELL_CHARGE = 68764,
- SPELL_DISARM = 65935,
- SPELL_OVERPOWER = 65924,
- SPELL_SUNDER_ARMOR = 65936,
- SPELL_SHATTERING_THROW = 65940,
- SPELL_RETALIATION = 65932,
-};
-
class mob_toc_warrior : public CreatureScript
{
-public:
- mob_toc_warrior() : CreatureScript("mob_toc_warrior") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_warriorAI (creature);
- }
-
- struct mob_toc_warriorAI : public boss_faction_championsAI
- {
- mob_toc_warriorAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
-
- uint32 m_uiBladestormTimer;
- uint32 m_uiIntimidatingShoutTimer;
- uint32 m_uiMortalStrikeTimer;
- uint32 m_uiSunderArmorTimer;
- uint32 m_uiChargeTimer;
- uint32 m_uiRetaliationTimer;
- uint32 m_uiOverpowerTimer;
- uint32 m_uiShatteringThrowTimer;
- uint32 m_uiDisarmTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiBladestormTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- m_uiIntimidatingShoutTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- m_uiMortalStrikeTimer = urand(6*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiSunderArmorTimer = urand(5*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiChargeTimer = urand(3*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiRetaliationTimer = urand(30*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- m_uiOverpowerTimer = urand(30*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- m_uiShatteringThrowTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiDisarmTimer = urand(20*IN_MILLISECONDS, 80*IN_MILLISECONDS);
- SetEquipmentSlots(false, 47427, 46964, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_warrior() : CreatureScript("mob_toc_warrior") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_warriorAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
-
- if (m_uiBladestormTimer <= uiDiff)
- {
- DoCastVictim(SPELL_BLADESTORM);
- m_uiBladestormTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiBladestormTimer -= uiDiff;
-
- if (m_uiIntimidatingShoutTimer <= uiDiff)
- {
- DoCast(me, SPELL_INTIMIDATING_SHOUT);
- m_uiIntimidatingShoutTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- } else m_uiIntimidatingShoutTimer -= uiDiff;
-
- if (m_uiMortalStrikeTimer <= uiDiff)
- {
- DoCastVictim(SPELL_MORTAL_STRIKE);
- m_uiMortalStrikeTimer = urand(6*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiMortalStrikeTimer -= uiDiff;
-
- if (m_uiSunderArmorTimer <= uiDiff)
- {
- DoCastVictim(SPELL_SUNDER_ARMOR);
- m_uiSunderArmorTimer = urand(5*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiSunderArmorTimer -= uiDiff;
-
- if (m_uiChargeTimer <= uiDiff)
- {
- DoCastVictim(SPELL_CHARGE);
- m_uiChargeTimer = urand(3*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiChargeTimer -= uiDiff;
+ mob_toc_warriorAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_BLADESTORM, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_INTIMIDATING_SHOUT, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_WARR_CHARGE, 1*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_DISARM, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_OVERPOWER, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SUNDER_ARMOR, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SHATTERING_THROW, urand(20*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_RETALIATION, urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 47427, 46964, EQUIP_NO_CHANGE);
+ }
- if (m_uiRetaliationTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- DoCastVictim(SPELL_RETALIATION);
- m_uiRetaliationTimer = urand(30*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- } else m_uiRetaliationTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiOverpowerTimer <= uiDiff)
- {
- DoCastVictim(SPELL_OVERPOWER);
- m_uiOverpowerTimer = urand(30*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- } else m_uiOverpowerTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiShatteringThrowTimer <= uiDiff)
- {
- DoCastVictim(SPELL_SHATTERING_THROW);
- m_uiShatteringThrowTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiShatteringThrowTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiDisarmTimer <= uiDiff)
- {
- DoCastVictim(SPELL_DISARM);
- m_uiDisarmTimer = urand(20*IN_MILLISECONDS, 80*IN_MILLISECONDS);
- } else m_uiDisarmTimer -= uiDiff;
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_BLADESTORM:
+ DoCastVictim(SPELL_BLADESTORM);
+ events.ScheduleEvent(EVENT_BLADESTORM, 150*IN_MILLISECONDS);
+ return;
+ case EVENT_INTIMIDATING_SHOUT:
+ DoCastAOE(SPELL_INTIMIDATING_SHOUT);
+ events.ScheduleEvent(EVENT_INTIMIDATING_SHOUT, 120*IN_MILLISECONDS);
+ return;
+ case EVENT_MORTAL_STRIKE:
+ DoCastVictim(SPELL_MORTAL_STRIKE);
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_WARR_CHARGE:
+ DoCastVictim(SPELL_CHARGE);
+ events.ScheduleEvent(EVENT_WARR_CHARGE, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_DISARM:
+ DoCastVictim(SPELL_DISARM);
+ events.ScheduleEvent(EVENT_DISARM, urand(15*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ return;
+ case EVENT_OVERPOWER:
+ DoCastVictim(SPELL_OVERPOWER);
+ events.ScheduleEvent(EVENT_OVERPOWER, urand(20*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ return;
+ case EVENT_SUNDER_ARMOR:
+ DoCastVictim(SPELL_SUNDER_ARMOR);
+ events.ScheduleEvent(EVENT_SUNDER_ARMOR, urand(2*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ return;
+ case EVENT_SHATTERING_THROW:
+ if (me->getVictim()->HasAuraWithMechanic(1<<MECHANIC_IMMUNE_SHIELD))
+ {
+ DoCastVictim(SPELL_SHATTERING_THROW);
+ events.RescheduleEvent(EVENT_SHATTERING_THROW, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_SHATTERING_THROW, 3*IN_MILLISECONDS);
+ return;
+ case EVENT_RETALIATION:
+ if (HealthBelowPct(50))
+ {
+ DoCast(SPELL_RETALIATION);
+ events.RescheduleEvent(EVENT_RETALIATION, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_RETALIATION, 5*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
+ }
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_warriorAI (creature);
}
- };
-
-};
-
-enum eDeathKnightSpells
-{
- SPELL_CHAINS_OF_ICE = 66020, //8sec
- SPELL_DEATH_COIL = 66019, //5sec
- SPELL_DEATH_GRIP = 66017, //35sec
- SPELL_FROST_STRIKE = 66047, //6sec
- SPELL_ICEBOUND_FORTITUDE = 66023, //1min
- SPELL_ICY_TOUCH = 66021, //8sec
- SPELL_STRANGULATE = 66018, //2min
};
class mob_toc_dk : public CreatureScript
{
-public:
- mob_toc_dk() : CreatureScript("mob_toc_dk") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_dkAI (creature);
- }
-
- struct mob_toc_dkAI : public boss_faction_championsAI
- {
- mob_toc_dkAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
-
- uint32 m_uiIceboundFortitudeTimer;
- uint32 m_uiChainsOfIceTimer;
- uint32 m_uiDeathCoilTimer;
- uint32 m_uiStrangulateTimer;
- uint32 m_uiFrostStrikeTimer;
- uint32 m_uiIcyTouchTimer;
- uint32 m_uiDeathGripTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiIceboundFortitudeTimer = urand(5*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- m_uiChainsOfIceTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiDeathCoilTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiStrangulateTimer = urand(10*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- m_uiFrostStrikeTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiIcyTouchTimer = urand(8*IN_MILLISECONDS, 12*IN_MILLISECONDS);
- m_uiDeathGripTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- SetEquipmentSlots(false, 47518, 51021, EQUIP_NO_CHANGE);
- }
+ public:
+ mob_toc_dk() : CreatureScript("mob_toc_dk") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_dkAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
-
- if (m_uiIceboundFortitudeTimer <= uiDiff)
- {
- if (HealthBelowPct(50))
- DoCast(me, SPELL_ICEBOUND_FORTITUDE);
- m_uiIceboundFortitudeTimer = urand(5*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- } else m_uiIceboundFortitudeTimer -= uiDiff;
-
- if (m_uiChainsOfIceTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_CHAINS_OF_ICE);
- m_uiChainsOfIceTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiChainsOfIceTimer -= uiDiff;
-
- if (m_uiDeathCoilTimer <= uiDiff)
- {
- DoCastVictim(SPELL_DEATH_COIL);
- m_uiDeathCoilTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiDeathCoilTimer -= uiDiff;
+ mob_toc_dkAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_CHAINS_OF_ICE, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DEATH_COIL, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DEATH_GRIP, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_FROST_STRIKE, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ICEBOUND_FORTITUDE, urand(25*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ICY_TOUCH, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_STRANGULATE, urand(5*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 47518, 51021, EQUIP_NO_CHANGE);
+ }
- if (m_uiStrangulateTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (Unit* target = SelectEnemyCaster(false))
- DoCast(target, SPELL_STRANGULATE);
- m_uiStrangulateTimer = urand(10*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- } else m_uiStrangulateTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiFrostStrikeTimer <= uiDiff)
- {
- DoCastVictim(SPELL_FROST_STRIKE);
- m_uiFrostStrikeTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiFrostStrikeTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiIcyTouchTimer <= uiDiff)
- {
- DoCastVictim(SPELL_ICY_TOUCH);
- m_uiIcyTouchTimer = urand(8*IN_MILLISECONDS, 12*IN_MILLISECONDS);
- } else m_uiIcyTouchTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiDeathGripTimer <= uiDiff)
- {
- if (me->IsInRange(me->getVictim(), 10.0f, 30.0f, false))
- DoCastVictim(SPELL_DEATH_GRIP);
- m_uiDeathGripTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiDeathGripTimer -= uiDiff;
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_CHAINS_OF_ICE:
+ DoCastVictim(SPELL_CHAINS_OF_ICE);
+ events.ScheduleEvent(EVENT_CHAINS_OF_ICE, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_DEATH_COIL:
+ DoCastVictim(SPELL_DEATH_COIL);
+ events.ScheduleEvent(EVENT_DEATH_COIL, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_DEATH_GRIP:
+ if (me->IsInRange(me->getVictim(), 5.0f, 30.0f, false))
+ {
+ DoCast(me->getVictim(), SPELL_DEATH_GRIP);
+ events.RescheduleEvent(EVENT_DEATH_GRIP, 35*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DEATH_GRIP, 3*IN_MILLISECONDS);
+ return;
+ case EVENT_FROST_STRIKE:
+ DoCastVictim(SPELL_FROST_STRIKE);
+ events.ScheduleEvent(EVENT_FROST_STRIKE, urand(6*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_ICEBOUND_FORTITUDE:
+ if (HealthBelowPct(50))
+ {
+ DoCast(SPELL_ICEBOUND_FORTITUDE);
+ events.RescheduleEvent(EVENT_ICEBOUND_FORTITUDE, 60*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_ICEBOUND_FORTITUDE, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_ICY_TOUCH:
+ DoCastVictim(SPELL_ICY_TOUCH);
+ events.ScheduleEvent(EVENT_ICY_TOUCH, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_STRANGULATE:
+ if (Unit* target = SelectEnemyCaster(false))
+ {
+ DoCast(target, SPELL_STRANGULATE);
+ events.RescheduleEvent(EVENT_STRANGULATE, 120*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_STRANGULATE, 5*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
+ }
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_dkAI (creature);
}
- };
-
-};
-
-enum eRogueSpells
-{
- SPELL_FAN_OF_KNIVES = 65955, //2sec
- SPELL_BLIND = 65960, //2min
- SPELL_CLOAK = 65961, //90sec
- SPELL_BLADE_FLURRY = 65956, //2min
- SPELL_SHADOWSTEP = 66178, //30sec
- SPELL_HEMORRHAGE = 65954,
- SPELL_EVISCERATE = 65957,
};
class mob_toc_rogue : public CreatureScript
{
-public:
- mob_toc_rogue() : CreatureScript("mob_toc_rogue") { }
+ public:
+ mob_toc_rogue() : CreatureScript("mob_toc_rogue") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_rogueAI (creature);
- }
+ struct mob_toc_rogueAI : public boss_faction_championsAI
+ {
+ mob_toc_rogueAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_FAN_OF_KNIVES, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_BLIND, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_CLOAK, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_BLADE_FLURRY, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SHADOWSTEP, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HEMORRHAGE, urand(3*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_EVISCERATE, urand(20*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_WOUND_POISON, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 47422, 49982, EQUIP_NO_CHANGE);
+ me->setPowerType(POWER_ENERGY);
+ me->SetMaxPower(POWER_ENERGY, 100);
+ }
- struct mob_toc_rogueAI : public boss_faction_championsAI
- {
- mob_toc_rogueAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- uint32 m_uiFanOfKnivesTimer;
- uint32 m_uiHemorrhageTimer;
- uint32 m_uiEviscerateTimer;
- uint32 m_uiShadowstepTimer;
- uint32 m_uiBlindTimer;
- uint32 m_uiCloakTimer;
- uint32 m_uiBladeFlurryTimer;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FAN_OF_KNIVES:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCastAOE(SPELL_FAN_OF_KNIVES);
+ events.ScheduleEvent(EVENT_FAN_OF_KNIVES, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_BLIND:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ DoCast(target, SPELL_BLIND);
+ events.ScheduleEvent(EVENT_BLIND, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_CLOAK:
+ if (HealthBelowPct(50))
+ {
+ DoCast(SPELL_CLOAK);
+ events.RescheduleEvent(EVENT_CLOAK, 90*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_CLOAK, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_BLADE_FLURRY:
+ if (EnemiesInRange(10.0f) >= 2)
+ {
+ DoCast(SPELL_BLADE_FLURRY);
+ events.RescheduleEvent(EVENT_BLADE_FLURRY, 120*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_BLADE_FLURRY, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_SHADOWSTEP:
+ if (me->IsInRange(me->getVictim(), 10.0f, 40.0f, false))
+ {
+ DoCast(me->getVictim(), SPELL_SHADOWSTEP);
+ events.RescheduleEvent(EVENT_SHADOWSTEP, 30*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_SHADOWSTEP, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_HEMORRHAGE:
+ DoCastVictim(SPELL_HEMORRHAGE);
+ events.ScheduleEvent(EVENT_HEMORRHAGE, urand(3*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_EVISCERATE:
+ DoCastVictim(SPELL_EVISCERATE);
+ events.ScheduleEvent(EVENT_EVISCERATE, urand(30*IN_MILLISECONDS, 40*IN_MILLISECONDS));
+ return;
+ case EVENT_WOUND_POISON:
+ DoCastVictim(SPELL_WOUND_POISON);
+ events.ScheduleEvent(EVENT_WOUND_POISON, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
+ }
+ }
+ };
- void Reset()
+ CreatureAI* GetAI(Creature* creature) const
{
- boss_faction_championsAI::Reset();
- m_uiFanOfKnivesTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- m_uiHemorrhageTimer = urand(5*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- m_uiEviscerateTimer = urand(15*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- m_uiShadowstepTimer = urand(10*IN_MILLISECONDS, 80*IN_MILLISECONDS);
- m_uiBlindTimer = urand(7*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- m_uiCloakTimer = urand(20*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- m_uiBladeFlurryTimer = urand(12*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- SetEquipmentSlots(false, 47422, 49982, EQUIP_NO_CHANGE);
+ return new mob_toc_rogueAI (creature);
}
+};
+
+class mob_toc_enh_shaman : public CreatureScript
+{
+ public:
+ mob_toc_enh_shaman() : CreatureScript("mob_toc_enh_shaman") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_toc_enh_shamanAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_enh_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_DPS_EARTH_SHOCK, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_LAVA_LASH, urand(3*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_STORMSTRIKE, urand(2*IN_MILLISECONDS, 5*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DPS_BLOODLUST_HEROISM, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_DEPLOY_TOTEM, 1*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_WINDFURY, urand(20*IN_MILLISECONDS, 50*IN_MILLISECONDS));
+
+ _totemCount = 0;
+ _totemOldCenterX = me->GetPositionX();
+ _totemOldCenterY = me->GetPositionY();
+ SetEquipmentSlots(false, 51803, 48013, EQUIP_NO_CHANGE);
+ summons.DespawnAll();
+ }
- if (m_uiFanOfKnivesTimer <= uiDiff)
+ void JustSummoned(Creature* summoned)
{
- if (EnemiesInRange(15.0f) > 2)
- DoCastAOE(SPELL_FAN_OF_KNIVES);
- m_uiFanOfKnivesTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- } else m_uiFanOfKnivesTimer -= uiDiff;
+ summons.Summon(summoned);
+ }
- if (m_uiHemorrhageTimer <= uiDiff)
+ void SummonedCreatureDespawn(Creature* /*pSummoned*/)
{
- DoCastVictim(SPELL_HEMORRHAGE);
- m_uiHemorrhageTimer = urand(5*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- } else m_uiHemorrhageTimer -= uiDiff;
+ --_totemCount;
+ }
- if (m_uiEviscerateTimer <= uiDiff)
+ void DeployTotem()
{
- DoCastVictim(SPELL_EVISCERATE);
- m_uiEviscerateTimer = urand(15*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- } else m_uiEviscerateTimer -= uiDiff;
+ _totemCount = 4;
+ _totemOldCenterX = me->GetPositionX();
+ _totemOldCenterY = me->GetPositionY();
+ /*
+ -Windfury (16% melee haste)
+ -Grounding (redirects one harmful magic spell to the totem)
- if (m_uiShadowstepTimer <= uiDiff)
- {
- if (me->IsInRange(me->getVictim(), 10.0f, 40.0f))
- DoCastVictim(SPELL_SHADOWSTEP);
- m_uiShadowstepTimer = urand(10*IN_MILLISECONDS, 80*IN_MILLISECONDS);
- } else m_uiShadowstepTimer -= uiDiff;
+ -Healing Stream (unable to find amount of healing in our logs)
- if (m_uiBlindTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
- if (me->IsInRange(target, 0.0f, 15.0f, false))
- DoCast(target, SPELL_BLIND);
- m_uiBlindTimer = urand(7*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- } else m_uiBlindTimer -= uiDiff;
+ -Tremor (prevents fear effects)
+ -Strength of Earth (155 strength and agil for the opposing team)
- if (m_uiCloakTimer <= uiDiff)
- {
- if (HealthBelowPct(50))
- DoCast(me, SPELL_CLOAK);
- m_uiCloakTimer = urand(20*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- } else m_uiCloakTimer -= uiDiff;
+ -Searing (average ~3500 damage on a random target every ~3.5 seconds)
+ */
+ }
- if (m_uiBladeFlurryTimer <= uiDiff)
+ void JustDied(Unit* killer)
{
- DoCastVictim(SPELL_BLADE_FLURRY);
- m_uiBladeFlurryTimer = urand(12*IN_MILLISECONDS, 120*IN_MILLISECONDS);
- } else m_uiBladeFlurryTimer -= uiDiff;
-
- boss_faction_championsAI::UpdateAI(uiDiff);
- }
- };
-
-};
-
-enum eEnhShamanSpells
-{
- SPELL_EARTH_SHOCK_ENH = 65973,
- SPELL_LAVA_LASH = 65974,
- SPELL_STORMSTRIKE = 65970,
-};
-
-class mob_toc_enh_shaman : public CreatureScript
-{
-public:
- mob_toc_enh_shaman() : CreatureScript("mob_toc_enh_shaman") { }
+ boss_faction_championsAI::JustDied(killer);
+ summons.DespawnAll();
+ }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_enh_shamanAI (creature);
- }
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
- struct mob_toc_enh_shamanAI : public boss_faction_championsAI
- {
- mob_toc_enh_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE), Summons(me) {}
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- SummonList Summons;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- uint32 m_uiHeroismOrBloodlustTimer;
- uint32 m_uiEarthShockTimer;
- uint32 m_uiStormstrikeTimer;
- uint32 m_uiLavaLashTimer;
- uint32 m_uiDeployTotemTimer;
- uint8 m_uiTotemCount;
- float m_fTotemOldCenterX, m_fTotemOldCenterY;
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DPS_EARTH_SHOCK:
+ if (Unit* target = SelectEnemyCaster(true))
+ DoCast(target, SPELL_EARTH_SHOCK);
+ events.ScheduleEvent(EVENT_DPS_EARTH_SHOCK, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_LAVA_LASH:
+ DoCastVictim(SPELL_LAVA_LASH);
+ events.ScheduleEvent(EVENT_LAVA_LASH, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_STORMSTRIKE:
+ DoCastVictim(SPELL_STORMSTRIKE);
+ events.ScheduleEvent(EVENT_STORMSTRIKE, urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_DPS_BLOODLUST_HEROISM:
+ if (me->getFaction()) //Am i alliance?
+ {
+ if (!me->HasAura(AURA_EXHAUSTION))
+ DoCastAOE(SPELL_HEROISM);
+ }
+ else
+ {
+ if (!me->HasAura(AURA_SATED))
+ DoCastAOE(SPELL_BLOODLUST);
+ }
+ events.ScheduleEvent(EVENT_DPS_BLOODLUST_HEROISM, 5*MINUTE*IN_MILLISECONDS);
+ return;
+ case EVENT_DEPLOY_TOTEM:
+ if (_totemCount < 4 || me->GetDistance2d(_totemOldCenterX, _totemOldCenterY) > 20.0f)
+ DeployTotem();
+ events.ScheduleEvent(EVENT_DEPLOY_TOTEM, 1*IN_MILLISECONDS);
+ return;
+ case EVENT_WINDFURY:
+ DoCastVictim(SPELL_WINDFURY);
+ events.ScheduleEvent(EVENT_WINDFURY, urand(20*IN_MILLISECONDS, 60*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
+ }
+ }
+ private:
+ uint8 _totemCount;
+ float _totemOldCenterX, _totemOldCenterY;
+ };
- void Reset()
+ CreatureAI* GetAI(Creature* creature) const
{
- boss_faction_championsAI::Reset();
- m_uiHeroismOrBloodlustTimer = urand(25*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- m_uiEarthShockTimer = urand(5*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- m_uiStormstrikeTimer = urand(5*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- m_uiLavaLashTimer = urand(5*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- m_uiDeployTotemTimer = urand(1*IN_MILLISECONDS, 3*IN_MILLISECONDS);
- m_uiTotemCount = 0;
- m_fTotemOldCenterX = me->GetPositionX();
- m_fTotemOldCenterY = me->GetPositionY();
- SetEquipmentSlots(false, 51803, 48013, EQUIP_NO_CHANGE);
- Summons.DespawnAll();
+ return new mob_toc_enh_shamanAI (creature);
}
+};
- void JustSummoned(Creature* summoned)
- {
- Summons.Summon(summoned);
- }
+class mob_toc_retro_paladin : public CreatureScript
+{
+ public:
+ mob_toc_retro_paladin() : CreatureScript("mob_toc_retro_paladin") { }
- void SummonedCreatureDespawn(Creature* /*pSummoned*/)
+ struct mob_toc_retro_paladinAI : public boss_faction_championsAI
{
- --m_uiTotemCount;
- }
+ mob_toc_retro_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_AVENGING_WRATH, urand(25*IN_MILLISECONDS, 35*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_CRUSADER_STRIKE, urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DIVINE_STORM, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_HAMMER_OF_JUSTICE_RET, urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_JUDGEMENT_OF_COMMAND, urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_REPENTANCE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DPS_HAND_OF_PROTECTION, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_DPS_DIVINE_SHIELD, urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ SetEquipmentSlots(false, 47519, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ }
- void DeployTotem()
- {
- m_uiTotemCount = 4;
- m_fTotemOldCenterX = me->GetPositionX();
- m_fTotemOldCenterY = me->GetPositionY();
- /*
- -Windfury (16% melee haste)
- -Grounding (redirects one harmful magic spell to the totem)
+ void EnterCombat(Unit* who)
+ {
+ boss_faction_championsAI::EnterCombat(who);
+ DoCast(SPELL_SEAL_OF_COMMAND);
+ }
- -Healing Stream (unable to find amount of healing in our logs)
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
- -Tremor (prevents fear effects)
- -Strength of Earth (155 strength and agil for the opposing team)
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- -Searing (average ~3500 damage on a random target every ~3.5 seconds)
- */
- }
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_AVENGING_WRATH:
+ DoCast(SPELL_AVENGING_WRATH);
+ events.ScheduleEvent(EVENT_AVENGING_WRATH, 180*IN_MILLISECONDS);
+ return;
+ case EVENT_CRUSADER_STRIKE:
+ DoCastVictim(SPELL_CRUSADER_STRIKE);
+ events.ScheduleEvent(EVENT_CRUSADER_STRIKE, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_DIVINE_STORM:
+ if (EnemiesInRange(10.0f) >= 2)
+ DoCast(SPELL_DIVINE_STORM);
+ events.ScheduleEvent(EVENT_DIVINE_STORM, urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS));
+ return;
+ case EVENT_HAMMER_OF_JUSTICE_RET:
+ DoCastVictim(SPELL_HAMMER_OF_JUSTICE_RET);
+ events.ScheduleEvent(EVENT_HAMMER_OF_JUSTICE_RET, 40*IN_MILLISECONDS);
+ return;
+ case EVENT_JUDGEMENT_OF_COMMAND:
+ DoCastVictim(SPELL_JUDGEMENT_OF_COMMAND);
+ events.ScheduleEvent(EVENT_JUDGEMENT_OF_COMMAND, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_REPENTANCE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
+ DoCast(target, SPELL_REPENTANCE);
+ events.ScheduleEvent(EVENT_REPENTANCE, 60*IN_MILLISECONDS);
+ return;
+ case EVENT_DPS_HAND_OF_PROTECTION:
+ if (Unit* target = DoSelectLowestHpFriendly(30.0f))
+ {
+ if (!target->HasAura(SPELL_FORBEARANCE))
+ {
+ DoCast(target, SPELL_HAND_OF_PROTECTION);
+ events.RescheduleEvent(EVENT_DPS_HAND_OF_PROTECTION, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DPS_HAND_OF_PROTECTION, 5*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DPS_HAND_OF_PROTECTION, 5*IN_MILLISECONDS);
+ return;
+ case EVENT_DPS_DIVINE_SHIELD:
+ if (HealthBelowPct(30) && !me->HasAura(SPELL_FORBEARANCE))
+ {
+ DoCast(me, SPELL_DIVINE_SHIELD);
+ events.RescheduleEvent(EVENT_DPS_DIVINE_SHIELD, 5*MINUTE*IN_MILLISECONDS);
+ }
+ else
+ events.RescheduleEvent(EVENT_DPS_DIVINE_SHIELD, 5*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
+ }
+ }
+ };
- void JustDied(Unit* killer)
+ CreatureAI* GetAI(Creature* creature) const
{
- boss_faction_championsAI::JustDied(killer);
- Summons.DespawnAll();
+ return new mob_toc_retro_paladinAI (creature);
}
+};
- void UpdateAI(const uint32 uiDiff)
+class mob_toc_pet_warlock : public CreatureScript
+{
+ public:
+ mob_toc_pet_warlock() : CreatureScript("mob_toc_pet_warlock") { }
+
+ struct mob_toc_pet_warlockAI : public boss_faction_championsAI
{
- if (!UpdateVictim())
- return;
+ mob_toc_pet_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) {}
- if (m_uiHeroismOrBloodlustTimer <= uiDiff)
+ void Reset()
{
- if (me->getFaction()) //Am i alliance?
- {
- if (!me->HasAura(AURA_EXHAUSTION))
- DoCastAOE(SPELL_HEROISM);
- }
- else
- if (!me->HasAura(AURA_SATED))
- DoCastAOE(SPELL_BLOODLUST);
- m_uiHeroismOrBloodlustTimer = urand(25*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- } else m_uiHeroismOrBloodlustTimer -= uiDiff;
+ boss_faction_championsAI::Reset();
+ events.ScheduleEvent(EVENT_DEVOUR_MAGIC, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_SPELL_LOCK, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ }
- if (m_uiEarthShockTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- DoCastVictim(SPELL_EARTH_SHOCK_ENH);
- m_uiEarthShockTimer = urand(5*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- } else m_uiEarthShockTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiStormstrikeTimer <= uiDiff)
- {
- DoCastVictim(SPELL_STORMSTRIKE);
- m_uiStormstrikeTimer = urand(5*IN_MILLISECONDS, 90*IN_MILLISECONDS);
- } else m_uiStormstrikeTimer -= uiDiff;
+ events.Update(diff);
+ boss_faction_championsAI::UpdateAI(diff);
- if (m_uiLavaLashTimer <= uiDiff)
- {
- DoCastVictim(SPELL_LAVA_LASH);
- m_uiLavaLashTimer = urand(5*IN_MILLISECONDS, 8*IN_MILLISECONDS);
- } else m_uiLavaLashTimer -= uiDiff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (m_uiDeployTotemTimer <= uiDiff)
- {
- if (m_uiTotemCount < 4 || me->GetDistance2d(m_fTotemOldCenterX, m_fTotemOldCenterY) > 20.0f)
- DeployTotem();
- m_uiDeployTotemTimer = urand(1*IN_MILLISECONDS, 3*IN_MILLISECONDS);
- } else m_uiDeployTotemTimer -= uiDiff;
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DEVOUR_MAGIC:
+ DoCastVictim(SPELL_DEVOUR_MAGIC);
+ events.ScheduleEvent(EVENT_DEVOUR_MAGIC, urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_SPELL_LOCK:
+ DoCast(SPELL_SPELL_LOCK);
+ events.ScheduleEvent(EVENT_SPELL_LOCK, urand(24*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
+ }
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_toc_pet_warlockAI (creature);
}
- };
-
};
-enum eRetroPaladinSpells
+class mob_toc_pet_hunter : public CreatureScript
{
- SPELL_AVENGING_WRATH = 66011, //3min cd
- SPELL_CRUSADER_STRIKE = 66003, //6sec cd
- SPELL_DIVINE_SHIELD = 66010, //5min cd
- SPELL_DIVINE_STORM = 66006, //10sec cd
- SPELL_HAMMER_OF_JUSTICE_RET = 66007, //40sec cd
- SPELL_HAND_OF_PROTECTION_RET = 66009, //5min cd
- SPELL_JUDGEMENT_OF_COMMAND = 66005, //8sec cd
- SPELL_REPENTANCE = 66008, //60sec cd
- SPELL_SEAL_OF_COMMAND = 66004, //no cd
-};
+ public:
+ mob_toc_pet_hunter() : CreatureScript("mob_toc_pet_hunter") { }
-class mob_toc_retro_paladin : public CreatureScript
-{
-public:
- mob_toc_retro_paladin() : CreatureScript("mob_toc_retro_paladin") { }
+ struct mob_toc_pet_hunterAI : public boss_faction_championsAI
+ {
+ mob_toc_pet_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) {}
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_retro_paladinAI (creature);
- }
+ void Reset()
+ {
+ boss_faction_championsAI::Reset();
+ _clawTimer = urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS);
+ }
- struct mob_toc_retro_paladinAI : public boss_faction_championsAI
- {
- mob_toc_retro_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
- uint32 m_uiRepeteanceTimer;
- uint32 m_uiCrusaderStrikeTimer;
- uint32 m_uiAvengingWrathTimer;
- uint32 m_uiDivineShieldTimer;
- uint32 m_uiDivineStormTimer;
- uint32 m_uiJudgementOfCommandTimer;
+ boss_faction_championsAI::UpdateAI(diff);
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiRepeteanceTimer = 60*IN_MILLISECONDS;
- m_uiCrusaderStrikeTimer = urand(6*IN_MILLISECONDS, 18*IN_MILLISECONDS);
- m_uiAvengingWrathTimer = 180*IN_MILLISECONDS;
- m_uiDivineShieldTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- m_uiDivineStormTimer = 10*IN_MILLISECONDS;
- m_uiJudgementOfCommandTimer = urand(8*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- SetEquipmentSlots(false, 47519, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- }
+ if (_clawTimer <= diff)
+ {
+ DoCastVictim(SPELL_CLAW);
+ _clawTimer = urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS);
+ }
+ else
+ _clawTimer -= diff;
+ }
+ private:
+ uint32 _clawTimer;
+ };
- void EnterCombat(Unit* who)
+ CreatureAI* GetAI(Creature* creature) const
{
- boss_faction_championsAI::EnterCombat(who);
- DoCast(SPELL_SEAL_OF_COMMAND);
+ return new mob_toc_pet_hunterAI (creature);
}
+};
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
-
- if (m_uiRepeteanceTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_REPENTANCE);
- m_uiRepeteanceTimer = 60*IN_MILLISECONDS;
- } else m_uiRepeteanceTimer -= uiDiff;
-
- if (m_uiCrusaderStrikeTimer <= uiDiff)
- {
- DoCastVictim(SPELL_CRUSADER_STRIKE);
- m_uiCrusaderStrikeTimer = urand(6*IN_MILLISECONDS, 18*IN_MILLISECONDS);
- } else m_uiCrusaderStrikeTimer -= uiDiff;
+class spell_faction_champion_warl_unstable_affliction : public SpellScriptLoader
+{
+ public:
+ spell_faction_champion_warl_unstable_affliction() : SpellScriptLoader("spell_faction_champion_warl_unstable_affliction") { }
- if (m_uiAvengingWrathTimer <= uiDiff)
- {
- DoCastVictim(SPELL_AVENGING_WRATH);
- m_uiAvengingWrathTimer = 180*IN_MILLISECONDS;
- } else m_uiAvengingWrathTimer -= uiDiff;
+ class spell_faction_champion_warl_unstable_affliction_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_AuraScript);
- if (m_uiDivineShieldTimer <= uiDiff)
+ bool Validate(SpellInfo const* /*spell*/)
{
- if (HealthBelowPct(20))
- DoCast(me, SPELL_DIVINE_SHIELD);
- m_uiDivineShieldTimer = urand(0*IN_MILLISECONDS, 360*IN_MILLISECONDS);
- } else m_uiDivineShieldTimer -= uiDiff;
+ if (!sSpellMgr->GetSpellInfo(SPELL_UNSTABLE_AFFLICTION_DISPEL))
+ return false;
+ return true;
+ }
- if (m_uiDivineStormTimer <= uiDiff)
+ void HandleDispel(DispelInfo* dispelInfo)
{
- DoCastVictim(SPELL_DIVINE_STORM);
- m_uiDivineStormTimer = 10*IN_MILLISECONDS;
- } else m_uiDivineStormTimer -= uiDiff;
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(dispelInfo->GetDispeller(), SPELL_UNSTABLE_AFFLICTION_DISPEL, true, NULL, GetEffect(EFFECT_0));
+ }
- if (m_uiJudgementOfCommandTimer <= uiDiff)
+ void Register()
{
- DoCastVictim(SPELL_JUDGEMENT_OF_COMMAND);
- m_uiJudgementOfCommandTimer = urand(8*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiJudgementOfCommandTimer -= uiDiff;
+ AfterDispel += AuraDispelFn(spell_faction_champion_warl_unstable_affliction_AuraScript::HandleDispel);
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_faction_champion_warl_unstable_affliction_AuraScript();
}
- };
-
-};
-
-enum eWarlockPetSpells
-{
- SPELL_DEVOUR_MAGIC = 67518,
- SPELL_SPELL_LOCK = 67519,
};
-class mob_toc_pet_warlock : public CreatureScript
+class spell_faction_champion_death_grip : public SpellScriptLoader
{
-public:
- mob_toc_pet_warlock() : CreatureScript("mob_toc_pet_warlock") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_pet_warlockAI (creature);
- }
-
- struct mob_toc_pet_warlockAI : public boss_faction_championsAI
- {
- mob_toc_pet_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) {}
-
- uint32 m_uiDevourMagicTimer;
- uint32 m_uiSpellLockTimer;
-
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiDevourMagicTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- m_uiSpellLockTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- }
+ public:
+ spell_faction_champion_death_grip() : SpellScriptLoader("spell_faction_champion_death_grip") { }
- void UpdateAI(const uint32 uiDiff)
+ class spell_faction_champion_death_grip_SpellScript : public SpellScript
{
- if (!UpdateVictim())
- return;
+ PrepareSpellScript(spell_faction_champion_death_grip_SpellScript);
- if (m_uiDevourMagicTimer <= uiDiff)
+ bool Validate(SpellInfo const* /*spell*/)
{
- DoCastVictim(SPELL_DEVOUR_MAGIC);
- m_uiDevourMagicTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiDevourMagicTimer -= uiDiff;
+ if (!sSpellMgr->GetSpellInfo(SPELL_DEATH_GRIP_PULL))
+ return false;
+ return true;
+ }
- if (m_uiSpellLockTimer <= uiDiff)
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
- DoCastVictim(SPELL_SPELL_LOCK);
- m_uiSpellLockTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiSpellLockTimer -= uiDiff;
+ if (Unit* target = GetHitUnit())
+ {
+ if (Unit* caster = GetCaster())
+ target->CastSpell(caster, SPELL_DEATH_GRIP_PULL);
+ }
+ }
- boss_faction_championsAI::UpdateAI(uiDiff);
- }
- };
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_faction_champion_death_grip_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
-};
+ };
-enum eHunterPetSpells
-{
- SPELL_CLAW = 67793,
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_faction_champion_death_grip_SpellScript();
+ }
};
-class mob_toc_pet_hunter : public CreatureScript
+class spell_toc_bloodlust : public SpellScriptLoader
{
-public:
- mob_toc_pet_hunter() : CreatureScript("mob_toc_pet_hunter") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_toc_pet_hunterAI (creature);
- }
+ public:
+ spell_toc_bloodlust() : SpellScriptLoader("spell_toc_bloodlust") { }
- struct mob_toc_pet_hunterAI : public boss_faction_championsAI
- {
- mob_toc_pet_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) {}
+ class spell_toc_bloodlust_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_toc_bloodlust_SpellScript);
- uint32 m_uiClawTimer;
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(AURA_SATED))
+ return false;
+ return true;
+ }
- void Reset()
- {
- boss_faction_championsAI::Reset();
- m_uiClawTimer = urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- }
+ void RemoveInvalidTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove_if(Trinity::UnitAuraCheck(true, AURA_SATED));
+ }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
+ void ApplyDebuff()
+ {
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(target, AURA_SATED, true);
+ }
- if (m_uiClawTimer <= uiDiff)
+ void Register()
{
- DoCastVictim(SPELL_CLAW);
- m_uiClawTimer = urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- } else m_uiClawTimer -= uiDiff;
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_toc_bloodlust_SpellScript::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_toc_bloodlust_SpellScript::RemoveInvalidTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ALLY);
+ AfterHit += SpellHitFn(spell_toc_bloodlust_SpellScript::ApplyDebuff);
+ }
+ };
- boss_faction_championsAI::UpdateAI(uiDiff);
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_toc_bloodlust_SpellScript();
}
- };
};
-class spell_faction_champion_warl_unstable_affliction : public SpellScriptLoader
+class spell_toc_heroism : public SpellScriptLoader
{
public:
- spell_faction_champion_warl_unstable_affliction() : SpellScriptLoader("spell_faction_champion_warl_unstable_affliction") { }
+ spell_toc_heroism() : SpellScriptLoader("spell_toc_heroism") { }
- class spell_faction_champion_warl_unstable_affliction_AuraScript : public AuraScript
+ class spell_toc_heroism_SpellScript : public SpellScript
{
- PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_AuraScript);
+ PrepareSpellScript(spell_toc_heroism_SpellScript);
- bool Validate(SpellInfo const* /*spell*/)
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_UNSTABLE_AFFLICTION_DISPEL))
+ if (!sSpellMgr->GetSpellInfo(AURA_EXHAUSTION))
return false;
return true;
}
- void HandleDispel(DispelInfo* dispelInfo)
+ void RemoveInvalidTargets(std::list<WorldObject*>& targets)
{
- if (Unit* caster = GetCaster())
- caster->CastSpell(dispelInfo->GetDispeller(), SPELL_UNSTABLE_AFFLICTION_DISPEL, true, NULL, GetEffect(EFFECT_0));
+ targets.remove_if(Trinity::UnitAuraCheck(true, AURA_EXHAUSTION));
+ }
+
+ void ApplyDebuff()
+ {
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(target, AURA_EXHAUSTION, true);
}
void Register()
{
- AfterDispel += AuraDispelFn(spell_faction_champion_warl_unstable_affliction_AuraScript::HandleDispel);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_toc_heroism_SpellScript::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_toc_heroism_SpellScript::RemoveInvalidTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ALLY);
+ AfterHit += SpellHitFn(spell_toc_heroism_SpellScript::ApplyDebuff);
}
};
- AuraScript* GetAuraScript() const
+ SpellScript* GetSpellScript() const
{
- return new spell_faction_champion_warl_unstable_affliction_AuraScript();
+ return new spell_toc_heroism_SpellScript();
}
};
@@ -2086,5 +2392,9 @@ void AddSC_boss_faction_champions()
new mob_toc_retro_paladin();
new mob_toc_pet_warlock();
new mob_toc_pet_hunter();
+
new spell_faction_champion_warl_unstable_affliction();
+ new spell_faction_champion_death_grip();
+ new spell_toc_bloodlust();
+ new spell_toc_heroism();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 87e7801566e..f8017980766 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -16,23 +16,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: trial_of_the_crusader
-SD%Complete: ??%
-SDComment: based on /dev/rsa
-SDCategory: Crusader Coliseum
-EndScriptData */
-
-// Known bugs:
-// Some visuals aren't appearing right sometimes
-//
-// TODO:
-// Redone summon's scripts in SAI
-// Add immunities to the boss and summons
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
+#include "SpellScript.h"
enum Yells
{
@@ -47,15 +34,7 @@ enum Yells
SAY_INFERNAL_ERUPTION = 8,
SAY_KILL_PLAYER = 9,
SAY_DEATH = 10,
- SAY_BERSERK = 11,
-};
-
-enum Equipment
-{
- EQUIP_MAIN = 47266,
- EQUIP_OFFHAND = 46996,
- EQUIP_RANGED = 47267,
- EQUIP_DONE = EQUIP_NO_CHANGE,
+ SAY_BERSERK = 11
};
enum Summons
@@ -64,7 +43,7 @@ enum Summons
NPC_INFERNAL_VOLCANO = 34813,
NPC_FEL_INFERNAL = 34815, // immune to all CC on Heroic (stuns, banish, interrupt, etc)
NPC_NETHER_PORTAL = 34825,
- NPC_MISTRESS_OF_PAIN = 34826,
+ NPC_MISTRESS_OF_PAIN = 34826
};
enum BossSpells
@@ -84,442 +63,530 @@ enum BossSpells
SPELL_BERSERK = 64238, // unused
// Mistress of Pain spells
- SPELL_SHIVAN_SLASH = 67098,
- SPELL_SPINNING_STRIKE = 66283,
- SPELL_MISTRESS_KISS = 67077,
- SPELL_FEL_INFERNO = 67047,
- SPELL_FEL_STREAK = 66494,
+ SPELL_SHIVAN_SLASH = 67098,
+ SPELL_SPINNING_STRIKE = 66283,
+ SPELL_MISTRESS_KISS = 66336,
+ SPELL_FEL_INFERNO = 67047,
+ SPELL_FEL_STREAK = 66494,
+ SPELL_LORD_HITTIN = 66326, // special effect preventing more specific spells be cast on the same player within 10 seconds
+ SPELL_MISTRESS_KISS_DEBUFF = 66334,
+ SPELL_MISTRESS_KISS_DAMAGE_SILENCE = 66359
};
-/*######
-## boss_jaraxxus
-######*/
+enum Events
+{
+ // Lord Jaraxxus
+ EVENT_FEL_FIREBALL = 1,
+ EVENT_FEL_LIGHTNING = 2,
+ EVENT_INCINERATE_FLESH = 3,
+ EVENT_NETHER_POWER = 4,
+ EVENT_LEGION_FLAME = 5,
+ EVENT_SUMMONO_NETHER_PORTAL = 6,
+ EVENT_SUMMON_INFERNAL_ERUPTION = 7,
+
+ // Mistress of Pain
+ EVENT_SHIVAN_SLASH = 8,
+ EVENT_SPINNING_STRIKE = 9,
+ EVENT_MISTRESS_KISS = 10
+};
class boss_jaraxxus : public CreatureScript
{
-public:
- boss_jaraxxus() : CreatureScript("boss_jaraxxus") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_jaraxxusAI(creature);
- }
-
- struct boss_jaraxxusAI : public ScriptedAI
- {
- boss_jaraxxusAI(Creature* creature) : ScriptedAI(creature), Summons(me)
- {
- instance = creature->GetInstanceScript();
- Reset();
- }
-
- InstanceScript* instance;
+ public:
+ boss_jaraxxus() : CreatureScript("boss_jaraxxus") { }
- SummonList Summons;
-
- uint32 m_uiFelFireballTimer;
- uint32 m_uiFelLightningTimer;
- uint32 m_uiIncinerateFleshTimer;
- uint32 m_uiNetherPowerTimer;
- uint32 m_uiLegionFlameTimer;
- uint32 m_uiSummonNetherPortalTimer;
- uint32 m_uiSummonInfernalEruptionTimer;
-
- void Reset()
+ struct boss_jaraxxusAI : public BossAI
{
- if (instance)
- instance->SetData(TYPE_JARAXXUS, NOT_STARTED);
- SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED);
- m_uiFelFireballTimer = 5*IN_MILLISECONDS;
- m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
- m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
- m_uiSummonNetherPortalTimer = 1*MINUTE*IN_MILLISECONDS;
- m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
- Summons.DespawnAll();
- }
+ boss_jaraxxusAI(Creature* creature) : BossAI(creature, BOSS_JARAXXUS)
+ {
+ }
- void JustReachedHome()
- {
- if (instance)
- instance->SetData(TYPE_JARAXXUS, FAIL);
- DoCast(me, SPELL_JARAXXUS_CHAINS);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetReactState(REACT_PASSIVE);
- }
+ void Reset()
+ {
+ _Reset();
+ events.ScheduleEvent(EVENT_FEL_FIREBALL, 5*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FEL_LIGHTNING, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_INCINERATE_FLESH, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_NETHER_POWER, 40*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_LEGION_FLAME, 30*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMONO_NETHER_PORTAL, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMON_INFERNAL_ERUPTION, 80*IN_MILLISECONDS);
+ }
- void KilledUnit(Unit* who)
- {
- if (who->GetTypeId() == TYPEID_PLAYER)
+ void JustReachedHome()
{
+ _JustReachedHome();
if (instance)
- instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
+ instance->SetBossState(BOSS_JARAXXUS, FAIL);
+ DoCast(me, SPELL_JARAXXUS_CHAINS);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
- }
- void JustDied(Unit* /*killer*/)
- {
- Summons.DespawnAll();
- Talk(SAY_DEATH);
- if (instance)
- instance->SetData(TYPE_JARAXXUS, DONE);
- }
-
- void JustSummoned(Creature* summoned)
- {
- Summons.Summon(summoned);
- }
-
- void EnterCombat(Unit* /*who*/)
- {
- me->SetInCombatWithZone();
- if (instance)
- instance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
- Talk(SAY_AGGRO);
- }
-
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
-
- if (m_uiSummonInfernalEruptionTimer <= uiDiff)
+ void KilledUnit(Unit* who)
{
- Talk(EMOTE_INFERNAL_ERUPTION);
- Talk(SAY_INFERNAL_ERUPTION);
- DoCast(SPELL_INFERNAL_ERUPTION);
- m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
- } else m_uiSummonInfernalEruptionTimer -= uiDiff;
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ {
+ Talk(SAY_KILL_PLAYER);
+ if (instance)
+ instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
+ }
+ }
- if (m_uiSummonNetherPortalTimer <= uiDiff)
+ void JustDied(Unit* /*killer*/)
{
- Talk(EMOTE_NETHER_PORTAL);
- Talk(SAY_MISTRESS_OF_PAIN);
- DoCast(SPELL_NETHER_PORTAL);
- m_uiSummonNetherPortalTimer = 2*MINUTE*IN_MILLISECONDS;
- } else m_uiSummonNetherPortalTimer -= uiDiff;
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
- if (m_uiFelFireballTimer <= uiDiff)
+ void JustSummoned(Creature* summoned)
{
- DoCastVictim(SPELL_FEL_FIREBALL);
- m_uiFelFireballTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiFelFireballTimer -= uiDiff;
+ summons.Summon(summoned);
+ }
- if (m_uiFelLightningTimer <= uiDiff)
+ void EnterCombat(Unit* /*who*/)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
- DoCast(target, SPELL_FEL_LIGHTING);
- m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiFelLightningTimer -= uiDiff;
+ _EnterCombat();
+ Talk(SAY_AGGRO);
+ }
- if (m_uiIncinerateFleshTimer <= uiDiff)
+ void UpdateAI(const uint32 diff)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true))
- {
- Talk(EMOTE_INCINERATE, target->GetGUID());
- Talk(SAY_INCINERATE);
- DoCast(target, SPELL_INCINERATE_FLESH);
- }
- m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiIncinerateFleshTimer -= uiDiff;
+ if (!UpdateVictim())
+ return;
- if (m_uiNetherPowerTimer <= uiDiff)
- {
- me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5,10), me, true);
- m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
- } else m_uiNetherPowerTimer -= uiDiff;
+ events.Update(diff);
- if (m_uiLegionFlameTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true))
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- Talk(EMOTE_LEGION_FLAME, target->GetGUID());
- DoCast(target, SPELL_LEGION_FLAME);
+ switch (eventId)
+ {
+ case EVENT_FEL_FIREBALL:
+ DoCastVictim(SPELL_FEL_FIREBALL);
+ events.ScheduleEvent(EVENT_FEL_FIREBALL, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_FEL_LIGHTNING:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_LORD_HITTIN))
+ DoCast(target, SPELL_FEL_LIGHTING);
+ events.ScheduleEvent(EVENT_FEL_LIGHTNING, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
+ return;
+ case EVENT_INCINERATE_FLESH:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_LORD_HITTIN))
+ {
+ Talk(EMOTE_INCINERATE, target->GetGUID());
+ Talk(SAY_INCINERATE);
+ DoCast(target, SPELL_INCINERATE_FLESH);
+ }
+ events.ScheduleEvent(EVENT_INCINERATE_FLESH, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ return;
+ case EVENT_NETHER_POWER:
+ me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5,10), me, true);
+ events.ScheduleEvent(EVENT_NETHER_POWER, 40*IN_MILLISECONDS);
+ return;
+ case EVENT_LEGION_FLAME:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_LORD_HITTIN))
+ {
+ Talk(EMOTE_LEGION_FLAME, target->GetGUID());
+ DoCast(target, SPELL_LEGION_FLAME);
+ }
+ events.ScheduleEvent(EVENT_LEGION_FLAME, 30*IN_MILLISECONDS);
+ return;
+ case EVENT_SUMMONO_NETHER_PORTAL:
+ Talk(EMOTE_NETHER_PORTAL);
+ Talk(SAY_MISTRESS_OF_PAIN);
+ DoCast(SPELL_NETHER_PORTAL);
+ events.ScheduleEvent(EVENT_SUMMONO_NETHER_PORTAL, 2*MINUTE*IN_MILLISECONDS);
+ return;
+ case EVENT_SUMMON_INFERNAL_ERUPTION:
+ Talk(EMOTE_INFERNAL_ERUPTION);
+ Talk(SAY_INFERNAL_ERUPTION);
+ DoCast(SPELL_INFERNAL_ERUPTION);
+ events.ScheduleEvent(EVENT_SUMMON_INFERNAL_ERUPTION, 2*MINUTE*IN_MILLISECONDS);
+ return;
+ }
}
- m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
- } else m_uiLegionFlameTimer -= uiDiff;
- DoMeleeAttackIfReady();
- }
- };
+ DoMeleeAttackIfReady();
+ }
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_jaraxxusAI(creature);
+ }
};
class mob_legion_flame : public CreatureScript
{
-public:
- mob_legion_flame() : CreatureScript("mob_legion_flame") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_legion_flameAI(creature);
- }
+ public:
+ mob_legion_flame() : CreatureScript("mob_legion_flame") { }
- struct mob_legion_flameAI : public Scripted_NoMovementAI
- {
- mob_legion_flameAI(Creature* creature) : Scripted_NoMovementAI(creature)
+ struct mob_legion_flameAI : public Scripted_NoMovementAI
{
- Reset();
- }
+ mob_legion_flameAI(Creature* creature) : Scripted_NoMovementAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ }
- void Reset()
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->SetInCombatWithZone();
- DoCast(SPELL_LEGION_FLAME_EFFECT);
- }
+ void Reset()
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetInCombatWithZone();
+ DoCast(SPELL_LEGION_FLAME_EFFECT);
+ }
+
+ void UpdateAI(const uint32 /*diff*/)
+ {
+ UpdateVictim();
+ if (_instance && _instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
+ me->DespawnOrUnsummon();
+ }
+ private:
+ InstanceScript* _instance;
+ };
- void UpdateAI(const uint32 /*uiDiff*/)
+ CreatureAI* GetAI(Creature* creature) const
{
- UpdateVictim();
+ return new mob_legion_flameAI(creature);
}
- };
-
};
class mob_infernal_volcano : public CreatureScript
{
-public:
- mob_infernal_volcano() : CreatureScript("mob_infernal_volcano") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_infernal_volcanoAI(creature);
- }
+ public:
+ mob_infernal_volcano() : CreatureScript("mob_infernal_volcano") { }
- struct mob_infernal_volcanoAI : public Scripted_NoMovementAI
- {
- mob_infernal_volcanoAI(Creature* creature) : Scripted_NoMovementAI(creature), Summons(me)
+ struct mob_infernal_volcanoAI : public Scripted_NoMovementAI
{
- instance = creature->GetInstanceScript();
- Reset();
- }
+ mob_infernal_volcanoAI(Creature* creature) : Scripted_NoMovementAI(creature), _summons(me)
+ {
+ }
- InstanceScript* instance;
+ void Reset()
+ {
+ me->SetReactState(REACT_PASSIVE);
- SummonList Summons;
+ if (!IsHeroic())
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
+ else
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
+ _summons.DespawnAll();
+ }
- if (!IsHeroic())
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
- else
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
+ void IsSummonedBy(Unit* /*summoner*/)
+ {
+ DoCast(SPELL_INFERNAL_ERUPTION_EFFECT);
+ }
- Summons.DespawnAll();
- }
+ void JustSummoned(Creature* summoned)
+ {
+ _summons.Summon(summoned);
+ // makes immediate corpse despawn of summoned Felflame Infernals
+ summoned->SetCorpseDelay(0);
+ }
- void IsSummonedBy(Unit* /*summoner*/)
- {
- DoCast(SPELL_INFERNAL_ERUPTION_EFFECT);
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ // used to despawn corpse immediately
+ me->DespawnOrUnsummon();
+ }
- void JustSummoned(Creature* summoned)
- {
- Summons.Summon(summoned);
- // makes immediate corpse despawn of summoned Felflame Infernals
- summoned->SetCorpseDelay(0);
- }
+ void UpdateAI(uint32 const /*diff*/) {}
+
+ private:
+ SummonList _summons;
+ };
- void JustDied(Unit* /*killer*/)
+ CreatureAI* GetAI(Creature* creature) const
{
- // used to despawn corpse immediately
- me->DespawnOrUnsummon();
+ return new mob_infernal_volcanoAI(creature);
}
-
- void UpdateAI(uint32 const /*diff*/) {}
- };
-
};
class mob_fel_infernal : public CreatureScript
{
-public:
- mob_fel_infernal() : CreatureScript("mob_fel_infernal") { }
+ public:
+ mob_fel_infernal() : CreatureScript("mob_fel_infernal") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_fel_infernalAI(creature);
- }
-
- struct mob_fel_infernalAI : public ScriptedAI
- {
- mob_fel_infernalAI(Creature* creature) : ScriptedAI(creature)
+ struct mob_fel_infernalAI : public ScriptedAI
{
- instance = creature->GetInstanceScript();
- Reset();
- }
-
- InstanceScript* instance;
- uint32 m_uiFelStreakTimer;
+ mob_fel_infernalAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ }
- void Reset()
- {
- m_uiFelStreakTimer = 30*IN_MILLISECONDS;
- me->SetInCombatWithZone();
- }
+ void Reset()
+ {
+ _felStreakTimer = 30*IN_MILLISECONDS;
+ me->SetInCombatWithZone();
+ }
- /*void SpellHitTarget(Unit* target, const SpellInfo* pSpell)
- {
- if (pSpell->Id == SPELL_FEL_STREAK)
- DoCastAOE(SPELL_FEL_INFERNO); //66517
- }*/
+ void UpdateAI(const uint32 diff)
+ {
+ if (_instance && _instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
+ {
+ me->DespawnOrUnsummon();
+ return;
+ }
- void UpdateAI(const uint32 uiDiff)
- {
- if (!UpdateVictim())
- return;
+ if (!UpdateVictim())
+ return;
- if (instance && instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
- me->DespawnOrUnsummon();
+ if (_felStreakTimer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ DoCast(target, SPELL_FEL_STREAK);
+ _felStreakTimer = 30*IN_MILLISECONDS;
+ }
+ else
+ _felStreakTimer -= diff;
- if (m_uiFelStreakTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_FEL_STREAK);
- m_uiFelStreakTimer = 30*IN_MILLISECONDS;
- } else m_uiFelStreakTimer -= uiDiff;
+ DoMeleeAttackIfReady();
+ }
+ private:
+ uint32 _felStreakTimer;
+ InstanceScript* _instance;
+ };
- DoMeleeAttackIfReady();
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_fel_infernalAI(creature);
}
- };
-
};
class mob_nether_portal : public CreatureScript
{
-public:
- mob_nether_portal() : CreatureScript("mob_nether_portal") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_nether_portalAI(creature);
- }
+ public:
+ mob_nether_portal() : CreatureScript("mob_nether_portal") { }
- struct mob_nether_portalAI : public ScriptedAI
- {
- mob_nether_portalAI(Creature* creature) : ScriptedAI(creature), Summons(me)
+ struct mob_nether_portalAI : public ScriptedAI
{
- instance = creature->GetInstanceScript();
- Reset();
- }
+ mob_nether_portalAI(Creature* creature) : ScriptedAI(creature), _summons(me)
+ {
+ }
- InstanceScript* instance;
+ void Reset()
+ {
+ me->SetReactState(REACT_PASSIVE);
- SummonList Summons;
+ if (!IsHeroic())
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
+ else
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
- void Reset()
- {
- me->SetReactState(REACT_PASSIVE);
+ _summons.DespawnAll();
+ }
- if (!IsHeroic())
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
- else
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
+ void IsSummonedBy(Unit* /*summoner*/)
+ {
+ DoCast(SPELL_NETHER_PORTAL_EFFECT);
+ }
- Summons.DespawnAll();
- }
+ void JustSummoned(Creature* summoned)
+ {
+ _summons.Summon(summoned);
+ // makes immediate corpse despawn of summoned Mistress of Pain
+ summoned->SetCorpseDelay(0);
+ }
- void IsSummonedBy(Unit* /*summoner*/)
- {
- DoCast(SPELL_NETHER_PORTAL_EFFECT);
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ // used to despawn corpse immediately
+ me->DespawnOrUnsummon();
+ }
- void JustSummoned(Creature* summoned)
- {
- Summons.Summon(summoned);
- // makes immediate corpse despawn of summoned Mistress of Pain
- summoned->SetCorpseDelay(0);
- }
+ void UpdateAI(uint32 const /*diff*/) {}
+
+ private:
+ SummonList _summons;
+ };
- void JustDied(Unit* /*killer*/)
+ CreatureAI* GetAI(Creature* creature) const
{
- // used to despawn corpse immediately
- me->DespawnOrUnsummon();
+ return new mob_nether_portalAI(creature);
}
-
- void UpdateAI(uint32 const /*diff*/) {}
- };
-
};
class mob_mistress_of_pain : public CreatureScript
{
-public:
- mob_mistress_of_pain() : CreatureScript("mob_mistress_of_pain") { }
+ public:
+ mob_mistress_of_pain() : CreatureScript("mob_mistress_of_pain") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_mistress_of_painAI(creature);
- }
+ struct mob_mistress_of_painAI : public ScriptedAI
+ {
+ mob_mistress_of_painAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ if (_instance)
+ _instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, INCREASE);
+ }
+
+ void Reset()
+ {
+ _events.ScheduleEvent(EVENT_SHIVAN_SLASH, 30*IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_SPINNING_STRIKE, 30*IN_MILLISECONDS);
+ if (IsHeroic())
+ _events.ScheduleEvent(EVENT_MISTRESS_KISS, 15*IN_MILLISECONDS);
+ me->SetInCombatWithZone();
+ }
- struct mob_mistress_of_painAI : public ScriptedAI
- {
- mob_mistress_of_painAI(Creature* creature) : ScriptedAI(creature)
+ void JustDied(Unit* /*killer*/)
+ {
+ if (_instance)
+ _instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (_instance && _instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
+ {
+ me->DespawnOrUnsummon();
+ return;
+ }
+
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SHIVAN_SLASH:
+ DoCastVictim(SPELL_SHIVAN_SLASH);
+ _events.ScheduleEvent(EVENT_SHIVAN_SLASH, 30*IN_MILLISECONDS);
+ return;
+ case EVENT_SPINNING_STRIKE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ DoCast(target, SPELL_SPINNING_STRIKE);
+ _events.ScheduleEvent(EVENT_SPINNING_STRIKE, 30*IN_MILLISECONDS);
+ return;
+ case EVENT_MISTRESS_KISS:
+ DoCast(me, SPELL_MISTRESS_KISS);
+ _events.ScheduleEvent(EVENT_MISTRESS_KISS, 30*IN_MILLISECONDS);
+ return;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ private:
+ InstanceScript* _instance;
+ EventMap _events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
{
- instance = creature->GetInstanceScript();
- if (instance)
- instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, INCREASE);
- Reset();
+ return new mob_mistress_of_painAI(creature);
}
+};
- InstanceScript* instance;
- uint32 m_uiShivanSlashTimer;
- uint32 m_uiSpinningStrikeTimer;
- uint32 m_uiMistressKissTimer;
+class spell_mistress_kiss : public SpellScriptLoader
+{
+ public:
+ spell_mistress_kiss() : SpellScriptLoader("spell_mistress_kiss") { }
- void Reset()
+ class spell_mistress_kiss_AuraScript : public AuraScript
{
- m_uiShivanSlashTimer = 30*IN_MILLISECONDS;
- m_uiSpinningStrikeTimer = 30*IN_MILLISECONDS;
- m_uiMistressKissTimer = 15*IN_MILLISECONDS;
- me->SetInCombatWithZone();
- }
+ PrepareAuraScript(spell_mistress_kiss_AuraScript);
- void JustDied(Unit* /*killer*/)
+ bool Load()
+ {
+ if (GetCaster())
+ if (sSpellMgr->GetSpellIdForDifficulty(SPELL_MISTRESS_KISS_DAMAGE_SILENCE, GetCaster()))
+ return true;
+ return false;
+ }
+
+ void HandleDummyTick(AuraEffect const* /*aurEff*/)
+ {
+ Unit* caster = GetCaster();
+ Unit* target = GetTarget();
+ if (caster && target)
+ {
+ if (target->HasUnitState(UNIT_STATE_CASTING))
+ {
+ caster->CastSpell(target, SPELL_MISTRESS_KISS_DAMAGE_SILENCE, true);
+ target->RemoveAurasDueToSpell(GetSpellInfo()->Id);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_mistress_kiss_AuraScript::HandleDummyTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
{
- if (instance)
- instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE);
+ return new spell_mistress_kiss_AuraScript();
}
+};
- void UpdateAI(const uint32 uiDiff)
+class spell_mistress_kiss_area : public SpellScriptLoader
+{
+ public:
+ spell_mistress_kiss_area() : SpellScriptLoader("spell_mistress_kiss_area") {}
+
+ class spell_mistress_kiss_area_SpellScript : public SpellScript
{
- if (instance && instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
+ PrepareSpellScript(spell_mistress_kiss_area_SpellScript)
+
+ bool Load()
{
- me->DespawnOrUnsummon();
- return;
+ if (GetCaster())
+ if (sSpellMgr->GetSpellIdForDifficulty(SPELL_MISTRESS_KISS_DEBUFF, GetCaster()))
+ return true;
+ return false;
}
- if (!UpdateVictim())
- return;
-
- if (m_uiShivanSlashTimer <= uiDiff)
+ void HandleScript(SpellEffIndex /*effIndex*/)
{
- DoCastVictim(SPELL_SHIVAN_SLASH);
- m_uiShivanSlashTimer = 30*IN_MILLISECONDS;
- } else m_uiShivanSlashTimer -= uiDiff;
+ Unit* caster = GetCaster();
+ Unit* target = GetHitUnit();
+ if (caster && target)
+ caster->CastSpell(target, SPELL_MISTRESS_KISS_DEBUFF, true);
+ }
- if (m_uiSpinningStrikeTimer <= uiDiff)
+ void FilterTargets(std::list<WorldObject*>& targets)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
- DoCast(target, SPELL_SPINNING_STRIKE);
- m_uiSpinningStrikeTimer = 30*IN_MILLISECONDS;
- } else m_uiSpinningStrikeTimer -= uiDiff;
+ // get a list of players with mana
+ std::list<WorldObject*> _targets;
+ for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ if ((*itr)->ToUnit()->getPowerType() == POWER_MANA)
+ _targets.push_back(*itr);
+
+ // pick a random target and kiss him
+ if (WorldObject* _target = Trinity::Containers::SelectRandomContainerElement(_targets))
+ {
+ // correctly fill "targets" for the visual effect
+ targets.clear();
+ targets.push_back(_target);
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(_target->ToUnit(), SPELL_MISTRESS_KISS_DEBUFF, true);
+ }
+ }
- if (IsHeroic() && m_uiMistressKissTimer <= uiDiff)
+ void Register()
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
- DoCast(target, SPELL_MISTRESS_KISS);
- m_uiMistressKissTimer = 30*IN_MILLISECONDS;
- } else m_uiMistressKissTimer -= uiDiff;
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mistress_kiss_area_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ }
+ };
- DoMeleeAttackIfReady();
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_mistress_kiss_area_SpellScript();
}
- };
-
};
void AddSC_boss_jaraxxus()
@@ -530,4 +597,7 @@ void AddSC_boss_jaraxxus()
new mob_fel_infernal();
new mob_nether_portal();
new mob_mistress_of_pain();
+
+ new spell_mistress_kiss();
+ new spell_mistress_kiss_area();
}
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 88e0fe5ba66..106abe6fa52 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -15,23 +15,16 @@
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: northrend_beasts
-SD%Complete: 90%
-SDComment: based on /dev/rsa
-SDCategory:
-EndScriptData */
// Known bugs:
-// Gormok - Not implemented as a vehicle
-// - Snobold Firebomb
-// - Snobolled (creature at back)
-// Snakes - miss the 1-hitkill from emerging
-// - visual changes between mobile and stationary models seems not to work sometimes
+// Gormok - Snobolled (creature at back)
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
+#include "Vehicle.h"
+#include "Player.h"
+#include "SpellScript.h"
enum Yells
{
@@ -44,7 +37,7 @@ enum Yells
// Icehowl
EMOTE_TRAMPLE_START = 0,
EMOTE_TRAMPLE_CRASH = 1,
- EMOTE_TRAMPLE_FAIL = 2,
+ EMOTE_TRAMPLE_FAIL = 2
};
enum Equipment
@@ -52,7 +45,7 @@ enum Equipment
EQUIP_MAIN = 50760,
EQUIP_OFFHAND = 48040,
EQUIP_RANGED = 47267,
- EQUIP_DONE = EQUIP_NO_CHANGE,
+ EQUIP_DONE = EQUIP_NO_CHANGE
};
enum Model
@@ -60,13 +53,15 @@ enum Model
MODEL_ACIDMAW_STATIONARY = 29815,
MODEL_ACIDMAW_MOBILE = 29816,
MODEL_DREADSCALE_STATIONARY = 26935,
- MODEL_DREADSCALE_MOBILE = 24564,
+ MODEL_DREADSCALE_MOBILE = 24564
};
-enum Summons
+enum BeastSummons
{
NPC_SNOBOLD_VASSAL = 34800,
+ NPC_FIRE_BOMB = 34854,
NPC_SLIME_POOL = 35176,
+ MAX_SNOBOLDS = 4
};
enum BossSpells
@@ -107,332 +102,446 @@ enum BossSpells
SPELL_ARCTIC_BREATH = 66689,
SPELL_TRAMPLE = 66734,
SPELL_FROTHING_RAGE = 66759,
- SPELL_STAGGERED_DAZE = 66758,
+ SPELL_STAGGERED_DAZE = 66758
};
-class boss_gormok : public CreatureScript
+enum MyActions
{
-public:
- boss_gormok() : CreatureScript("boss_gormok") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_gormokAI(creature);
- }
+ ACTION_ENABLE_FIRE_BOMB = 1,
+ ACTION_DISABLE_FIRE_BOMB = 2
+};
- struct boss_gormokAI : public ScriptedAI
- {
- boss_gormokAI(Creature* creature) : ScriptedAI(creature), Summons(me)
- {
- instance = creature->GetInstanceScript();
- }
+enum Events
+{
+ // Gormok
+ EVENT_IMPALE = 1,
+ EVENT_STAGGERING_STOMP = 2,
+ EVENT_THROW = 3,
- InstanceScript* instance;
+ // Snobold
+ EVENT_FIRE_BOMB = 4,
+ EVENT_BATTER = 5,
+ EVENT_HEAD_CRACK = 6,
- uint32 m_uiImpaleTimer;
- uint32 m_uiStaggeringStompTimer;
- SummonList Summons;
- uint32 m_uiSummonTimer;
- uint32 m_uiSummonCount;
+ // Acidmaw & Dreadscale
+ EVENT_BITE = 7,
+ EVENT_SPEW = 8,
+ EVENT_SLIME_POOL = 9,
+ EVENT_SPIT = 10,
+ EVENT_SPRAY = 11,
+ EVENT_SWEEP = 12,
+ EVENT_SUBMERGE = 13,
+ EVENT_EMERGE = 14,
+ EVENT_SUMMON_ACIDMAW = 15,
- void Reset()
- {
- m_uiImpaleTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- m_uiStaggeringStompTimer = 15*IN_MILLISECONDS;
- m_uiSummonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
+ // Icehowl
+ EVENT_FEROCIOUS_BUTT = 16,
+ EVENT_MASSIVE_CRASH = 17,
+ EVENT_WHIRL = 18,
+ EVENT_ARCTIC_BREATH = 19,
+ EVENT_TRAMPLE = 20
+};
- if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL ||
- GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
- m_uiSummonCount = 5;
- else
- m_uiSummonCount = 4;
+enum Phases
+{
+ PHASE_MOBILE = 1,
+ PHASE_STATIONARY = 2,
+ PHASE_SUBMERGED = 3,
- Summons.DespawnAll();
- }
+ PHASE_MASK_MOBILE = 1 << PHASE_MOBILE,
+ PHASE_MASK_STATIONARY = 1 << PHASE_STATIONARY
+};
- void EnterEvadeMode()
- {
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- ScriptedAI::EnterEvadeMode();
- }
+class boss_gormok : public CreatureScript
+{
+ public:
+ boss_gormok() : CreatureScript("boss_gormok") { }
- void MovementInform(uint32 type, uint32 pointId)
+ struct boss_gormokAI : public BossAI
{
- if (type != POINT_MOTION_TYPE)
- return;
-
- switch (pointId)
+ boss_gormokAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
{
- case 0:
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetInCombatWithZone();
- break;
}
- }
- void JustDied(Unit* /*killer*/)
- {
- if (instance)
- instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
- }
+ void Reset()
+ {
+ events.ScheduleEvent(EVENT_IMPALE, urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_STAGGERING_STOMP, 15*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THROW, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
- void JustReachedHome()
- {
- if (instance)
+ summons.DespawnAll();
+ }
+
+ void EnterEvadeMode()
{
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
+ ScriptedAI::EnterEvadeMode();
}
- me->DespawnOrUnsummon();
- }
- void EnterCombat(Unit* /*who*/)
- {
- me->SetInCombatWithZone();
- instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
- }
-
- void JustSummoned(Creature* summon)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
+ void MovementInform(uint32 type, uint32 pointId)
{
- if (summon->GetEntry() == NPC_SNOBOLD_VASSAL)
+ if (type != POINT_MOTION_TYPE)
+ return;
+
+ switch (pointId)
{
- summon->GetMotionMaster()->MoveJump(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 10.0f, 20.0f);
- DoCast(me, SPELL_RISING_ANGER);
- --m_uiSummonCount;
+ case 0:
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->SetInCombatWithZone();
+ break;
+ default:
+ break;
}
- summon->AI()->AttackStart(target);
}
- Summons.Summon(summon);
- }
- void SummonedCreatureDespawn(Creature* summon)
- {
- if (summon->GetEntry() == NPC_SNOBOLD_VASSAL)
- if (summon->isAlive())
- ++m_uiSummonCount;
- Summons.Despawn(summon);
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ if (instance)
+ instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE);
+ }
- void UpdateAI(uint32 const diff)
- {
- if (!UpdateVictim())
- return;
+ void JustReachedHome()
+ {
+ if (instance)
+ {
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
+ }
+ me->DespawnOrUnsummon();
+ }
- if (m_uiImpaleTimer <= diff)
+ void EnterCombat(Unit* /*who*/)
{
- DoCastVictim(SPELL_IMPALE);
- m_uiImpaleTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- } else m_uiImpaleTimer -= diff;
+ _EnterCombat();
+ me->SetInCombatWithZone();
+ instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS);
- if (m_uiStaggeringStompTimer <= diff)
+ for (uint8 i = 0; i < MAX_SNOBOLDS; i++)
+ {
+ if (Creature* pSnobold = DoSpawnCreature(NPC_SNOBOLD_VASSAL, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ {
+ pSnobold->EnterVehicle(me, i);
+ pSnobold->SetInCombatWithZone();
+ pSnobold->AI()->DoAction(ACTION_ENABLE_FIRE_BOMB);
+ }
+ }
+ }
+
+ void DamageTaken(Unit* /*who*/, uint32& damage)
{
- DoCastVictim(SPELL_STAGGERING_STOMP);
- m_uiStaggeringStompTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiStaggeringStompTimer -= diff;
+ // despawn the remaining passengers on death
+ if (damage >= me->GetHealth())
+ for (uint8 i = 0; i < MAX_SNOBOLDS; ++i)
+ if (Unit* pSnobold = me->GetVehicleKit()->GetPassenger(i))
+ pSnobold->ToCreature()->DespawnOrUnsummon();
+ }
- if (m_uiSummonTimer <= diff)
+ void UpdateAI(uint32 const diff)
{
- if (m_uiSummonCount > 0)
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- me->SummonCreature(NPC_SNOBOLD_VASSAL, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN);
- Talk(EMOTE_SNOBOLLED);
+ switch (eventId)
+ {
+ case EVENT_IMPALE:
+ DoCastVictim(SPELL_IMPALE);
+ events.ScheduleEvent(EVENT_IMPALE, urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS));
+ return;
+ case EVENT_STAGGERING_STOMP:
+ DoCastVictim(SPELL_STAGGERING_STOMP);
+ events.ScheduleEvent(EVENT_STAGGERING_STOMP, 15*IN_MILLISECONDS);
+ return;
+ case EVENT_THROW:
+ for (uint8 i = 0; i < MAX_SNOBOLDS; ++i)
+ {
+ if (Unit* pSnobold = me->GetVehicleKit()->GetPassenger(i))
+ {
+ pSnobold->ExitVehicle();
+ pSnobold->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ pSnobold->ToCreature()->SetReactState(REACT_AGGRESSIVE);
+ pSnobold->ToCreature()->AI()->DoAction(ACTION_DISABLE_FIRE_BOMB);
+ pSnobold->CastSpell(me, SPELL_RISING_ANGER, true);
+ Talk(EMOTE_SNOBOLLED);
+ break;
+ }
+ }
+ events.ScheduleEvent(EVENT_THROW, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ default:
+ return;
+ }
}
- m_uiSummonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiSummonTimer -= diff;
- DoMeleeAttackIfReady();
- }
- };
+ DoMeleeAttackIfReady();
+ }
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_gormokAI(creature);
+ }
};
class mob_snobold_vassal : public CreatureScript
{
-public:
- mob_snobold_vassal() : CreatureScript("mob_snobold_vassal") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_snobold_vassalAI(creature);
- }
+ public:
+ mob_snobold_vassal() : CreatureScript("mob_snobold_vassal") { }
- struct mob_snobold_vassalAI : public ScriptedAI
- {
- mob_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
+ struct mob_snobold_vassalAI : public ScriptedAI
{
- instance = creature->GetInstanceScript();
- if (instance)
- instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
- }
+ mob_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ if (_instance)
+ _instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
+ }
- InstanceScript* instance;
- uint32 m_uiFireBombTimer;
- uint32 m_uiBatterTimer;
- uint32 m_uiHeadCrackTimer;
- uint64 m_uiBossGUID;
- uint64 m_uiTargetGUID;
- bool m_bTargetDied;
+ void Reset()
+ {
+ _events.ScheduleEvent(EVENT_BATTER, 5*IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_HEAD_CRACK, 25*IN_MILLISECONDS);
- void Reset()
- {
- m_uiFireBombTimer = 15000;
- m_uiBatterTimer = 5000;
- m_uiHeadCrackTimer = 25000;
+ _targetGUID = 0;
+ _targetDied = false;
- m_uiTargetGUID = 0;
- m_bTargetDied = false;
- if (instance)
- m_uiBossGUID = instance->GetData64(NPC_GORMOK);
- //Workaround for Snobold
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- }
-
- void EnterEvadeMode()
- {
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- ScriptedAI::EnterEvadeMode();
- }
+ if (_instance)
+ _bossGUID = _instance->GetData64(NPC_GORMOK);
+ //Workaround for Snobold
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ }
- void EnterCombat(Unit* who)
- {
- m_uiTargetGUID = who->GetGUID();
- me->TauntApply(who);
- DoCast(who, SPELL_SNOBOLLED);
- }
+ void EnterEvadeMode()
+ {
+ ScriptedAI::EnterEvadeMode();
+ }
- void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
- {
- if (pDoneBy->GetGUID()==m_uiTargetGUID)
- uiDamage = 0;
- }
+ void EnterCombat(Unit* who)
+ {
+ _targetGUID = who->GetGUID();
+ me->TauntApply(who);
+ DoCast(who, SPELL_SNOBOLLED);
+ }
- void MovementInform(uint32 type, uint32 pointId)
- {
- if (type != POINT_MOTION_TYPE)
- return;
+ void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
+ {
+ if (pDoneBy->GetGUID() == _targetGUID)
+ uiDamage = 0;
+ }
- switch (pointId)
+ void MovementInform(uint32 type, uint32 pointId)
{
- case 0:
- if (m_bTargetDied)
- me->DespawnOrUnsummon();
- break;
+ if (type != POINT_MOTION_TYPE)
+ return;
+
+ switch (pointId)
+ {
+ case 0:
+ if (_targetDied)
+ me->DespawnOrUnsummon();
+ break;
+ default:
+ break;
+ }
}
- }
- void JustDied(Unit* /*killer*/)
- {
- if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
- if (target->isAlive())
- target->RemoveAurasDueToSpell(SPELL_SNOBOLLED);
- if (instance)
- instance->SetData(DATA_SNOBOLD_COUNT, DECREASE);
- }
+ void JustDied(Unit* /*killer*/)
+ {
+ if (Unit* target = Unit::GetPlayer(*me, _targetGUID))
+ if (target->isAlive())
+ target->RemoveAurasDueToSpell(SPELL_SNOBOLLED);
+ if (_instance)
+ _instance->SetData(DATA_SNOBOLD_COUNT, DECREASE);
+ }
- void UpdateAI(uint32 const diff)
- {
- if (m_bTargetDied || !UpdateVictim())
- return;
+ void DoAction(int32 const action)
+ {
+ switch (action)
+ {
+ case ACTION_ENABLE_FIRE_BOMB:
+ _events.ScheduleEvent(EVENT_FIRE_BOMB, urand(5*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ break;
+ case ACTION_DISABLE_FIRE_BOMB:
+ _events.CancelEvent(EVENT_FIRE_BOMB);
+ break;
+ default:
+ break;
+ }
+ }
- if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
+ void UpdateAI(uint32 const diff)
{
- if (!target->isAlive())
+ if (!UpdateVictim() || _targetDied)
+ return;
+
+ if (Unit* target = Unit::GetPlayer(*me, _targetGUID))
{
- if (instance)
+ if (!target->isAlive())
{
- Unit* gormok = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_GORMOK));
- if (gormok && gormok->isAlive())
+ if (_instance)
{
- SetCombatMovement(false);
- m_bTargetDied = true;
- me->GetMotionMaster()->MoveJump(gormok->GetPositionX(), gormok->GetPositionY(), gormok->GetPositionZ(), 15.0f, 15.0f);
- }
- else if (Unit* target2 = SelectTarget(SELECT_TARGET_RANDOM, 0))
- {
- m_uiTargetGUID = target2->GetGUID();
- me->GetMotionMaster()->MoveJump(target2->GetPositionX(), target2->GetPositionY(), target2->GetPositionZ(), 15.0f, 15.0f);
+ Unit* gormok = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_GORMOK));
+ if (gormok && gormok->isAlive())
+ {
+ SetCombatMovement(false);
+ _targetDied = true;
+
+ // looping through Gormoks seats
+ for (uint8 i = 0; i < MAX_SNOBOLDS; i++)
+ {
+ if (!gormok->GetVehicleKit()->GetPassenger(i))
+ {
+ me->EnterVehicle(gormok, i);
+ DoAction(ACTION_ENABLE_FIRE_BOMB);
+ break;
+ }
+ }
+ }
+ else if (Unit* target2 = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ {
+ _targetGUID = target2->GetGUID();
+ me->GetMotionMaster()->MoveJump(target2->GetPositionX(), target2->GetPositionY(), target2->GetPositionZ(), 15.0f, 15.0f);
+ }
}
}
}
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FIRE_BOMB:
+ if (me->GetVehicleBase())
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, -me->GetVehicleBase()->GetCombatReach(), true))
+ me->CastSpell(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), SPELL_FIRE_BOMB, true);
+ _events.ScheduleEvent(EVENT_FIRE_BOMB, 20*IN_MILLISECONDS);
+ return;
+ case EVENT_HEAD_CRACK:
+ // commented out while SPELL_SNOBOLLED gets fixed
+ //if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
+ DoCastVictim(SPELL_HEAD_CRACK);
+ _events.ScheduleEvent(EVENT_HEAD_CRACK, 30*IN_MILLISECONDS);
+ return;
+ case EVENT_BATTER:
+ // commented out while SPELL_SNOBOLLED gets fixed
+ //if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
+ DoCastVictim(SPELL_BATTER);
+ _events.ScheduleEvent(EVENT_BATTER, 10*IN_MILLISECONDS);
+ return;
+ default:
+ return;
+ }
+ }
+
+ // do melee attack only when not on Gormoks back
+ if (!me->GetVehicleBase())
+ DoMeleeAttackIfReady();
}
+ private:
+ EventMap _events;
+ InstanceScript* _instance;
+ uint64 _bossGUID;
+ uint64 _targetGUID;
+ bool _targetDied;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new mob_snobold_vassalAI(creature);
+ }
+};
+
+class npc_firebomb : public CreatureScript
+{
+ public:
+ npc_firebomb() : CreatureScript("npc_firebomb") { }
- if (m_uiFireBombTimer < diff)
+ struct npc_firebombAI : public ScriptedAI
+ {
+ npc_firebombAI(Creature* creature) : ScriptedAI(creature)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_FIRE_BOMB);
- m_uiFireBombTimer = 20000;
+ _instance = creature->GetInstanceScript();
}
- else m_uiFireBombTimer -= diff;
- if (m_uiBatterTimer < diff)
+ void Reset()
{
- if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
- DoCast(target, SPELL_BATTER);
- m_uiBatterTimer = 10000;
+ DoCast(me, SPELL_FIRE_BOMB_DOT, true);
+ SetCombatMovement(false);
+ me->SetReactState(REACT_PASSIVE);
+ me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
}
- else m_uiBatterTimer -= diff;
- if (m_uiHeadCrackTimer < diff)
+ void UpdateAI(uint32 const /*diff*/)
{
- if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
- DoCast(target, SPELL_HEAD_CRACK);
- m_uiHeadCrackTimer = 35000;
+ if (_instance->GetData(TYPE_NORTHREND_BEASTS) != GORMOK_IN_PROGRESS)
+ me->DespawnOrUnsummon();
}
- else m_uiHeadCrackTimer -= diff;
- DoMeleeAttackIfReady();
- }
- };
+ private:
+ InstanceScript* _instance;
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_firebombAI(creature);
+ }
};
-struct boss_jormungarAI : public ScriptedAI
+struct boss_jormungarAI : public BossAI
{
- boss_jormungarAI(Creature* creature) : ScriptedAI(creature)
+ boss_jormungarAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
{
- instanceScript = creature->GetInstanceScript();
}
void Reset()
{
- enraged = false;
- biteTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- spewTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- slimePoolTimer = 15*IN_MILLISECONDS;
- spitTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- sprayTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- sweepTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
+ Enraged = false;
+
+ events.ScheduleEvent(EVENT_SPIT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_SPRAY, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_SWEEP, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_BITE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_SPEW, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_SLIME_POOL, 15*IN_MILLISECONDS, 0, PHASE_MOBILE);
}
void JustDied(Unit* /*killer*/)
{
- if (instanceScript)
+ if (instance)
{
- if (Creature* otherWorm = Unit::GetCreature(*me, instanceScript->GetData64(otherWormEntry)))
+ if (Creature* otherWorm = Unit::GetCreature(*me, instance->GetData64(OtherWormEntry)))
{
if (!otherWorm->isAlive())
{
- instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
+ instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
me->DespawnOrUnsummon();
otherWorm->DespawnOrUnsummon();
}
else
- instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
+ instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
}
}
}
void JustReachedHome()
{
- if (instanceScript && instanceScript->GetData(TYPE_NORTHREND_BEASTS) != FAIL)
- {
- instanceScript->SetData(TYPE_NORTHREND_BEASTS, FAIL);
- }
+ // prevent losing 2 attempts at once on heroics
+ if (instance && instance->GetData(TYPE_NORTHREND_BEASTS) != FAIL)
+ instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
me->DespawnOrUnsummon();
}
@@ -440,17 +549,16 @@ struct boss_jormungarAI : public ScriptedAI
void KilledUnit(Unit* who)
{
if (who->GetTypeId() == TYPEID_PLAYER)
- {
- if (instanceScript)
- instanceScript->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
- }
+ if (instance)
+ instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
void EnterCombat(Unit* /*who*/)
{
+ _EnterCombat();
me->SetInCombatWithZone();
- if (instanceScript)
- instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
+ if (instance)
+ instance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
}
void UpdateAI(uint32 const diff)
@@ -458,563 +566,597 @@ struct boss_jormungarAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (instanceScript && instanceScript->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged)
+ if (!Enraged && instance && instance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL)
{
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoCast(SPELL_ENRAGE);
- enraged = true;
+ Enraged = true;
Talk(EMOTE_ENRAGE);
- switch (stage)
- {
- case 0:
- break;
- case 4:
- stage = 5;
- submergeTimer = 5*IN_MILLISECONDS;
- break;
- default:
- stage = 7;
- }
}
- switch (stage)
- {
- case 0: // Mobile
- if (biteTimer <= diff)
- {
- DoCastVictim(biteSpell);
- biteTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else biteTimer -= diff;
+ events.Update(diff);
- if (spewTimer <= diff)
- {
- DoCastAOE(spewSpell);
- spewTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else spewTimer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (slimePoolTimer <= diff)
- {
- /* Spell summon has only 30s duration */
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_EMERGE:
+ Emerge();
+ return;
+ case EVENT_SUBMERGE:
+ Submerge();
+ return;
+ case EVENT_BITE:
+ DoCastVictim(BiteSpell);
+ events.ScheduleEvent(EVENT_BITE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE);
+ return;
+ case EVENT_SPEW:
+ DoCastAOE(SpewSpell);
+ events.ScheduleEvent(EVENT_SPEW, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE);
+ return;
+ case EVENT_SLIME_POOL:
DoCast(me, SUMMON_SLIME_POOL);
- slimePoolTimer = 30*IN_MILLISECONDS;
- } else slimePoolTimer -= diff;
-
- if (submergeTimer <= diff && !enraged)
- {
- stage = 1;
- submergeTimer = 5*IN_MILLISECONDS;
- } else submergeTimer -= diff;
-
- DoMeleeAttackIfReady();
- break;
- case 1: // Submerge
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- DoCast(me, SPELL_SUBMERGE_0);
- me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+ frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ());
- stage = 2;
- case 2: // Wait til emerge
- if (submergeTimer <= diff)
- {
- stage = 3;
- submergeTimer = 50*IN_MILLISECONDS;
- } else submergeTimer -= diff;
- break;
- case 3: // Emerge
- me->SetDisplayId(modelStationary);
- me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
- DoCast(me, SPELL_EMERGE_0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
- SetCombatMovement(false);
- me->GetMotionMaster()->MoveIdle();
- stage = 4;
- break;
- case 4: // Stationary
- if (sprayTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, spraySpell);
- sprayTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else sprayTimer -= diff;
-
- if (sweepTimer <= diff)
- {
+ events.ScheduleEvent(EVENT_SLIME_POOL, 30*IN_MILLISECONDS, 0, PHASE_MOBILE);
+ return;
+ case EVENT_SUMMON_ACIDMAW:
+ if (Creature* acidmaw = me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
+ {
+ acidmaw->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ acidmaw->SetReactState(REACT_AGGRESSIVE);
+ acidmaw->SetInCombatWithZone();
+ acidmaw->CastSpell(acidmaw, SPELL_EMERGE_0);
+ }
+ return;
+ case EVENT_SPRAY:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ DoCast(target, SpraySpell);
+ events.ScheduleEvent(EVENT_SPRAY, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ return;
+ case EVENT_SWEEP:
DoCastAOE(SPELL_SWEEP_0);
- sweepTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else sweepTimer -= diff;
-
- if (submergeTimer <= diff)
- {
- stage = 5;
- submergeTimer = 10*IN_MILLISECONDS;
- } else submergeTimer -= diff;
-
- DoSpellAttackIfReady(spitSpell);
- break;
- case 5: // Submerge
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- DoCast(me, SPELL_SUBMERGE_0);
- me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ());
- stage = 6;
- case 6: // Wait til emerge
- if (submergeTimer <= diff)
- {
- stage = 7;
- submergeTimer = 45*IN_MILLISECONDS;
- } else submergeTimer -= diff;
- break;
- case 7: // Emerge
- me->SetDisplayId(modelMobile);
- me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
- DoCast(me, SPELL_EMERGE_0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
- SetCombatMovement(true);
- me->GetMotionMaster()->MoveChase(me->getVictim());
- stage = 0;
- break;
+ events.ScheduleEvent(EVENT_SWEEP, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ return;
+ default:
+ return;
+ }
}
+ if (events.GetPhaseMask() & PHASE_MASK_MOBILE)
+ DoMeleeAttackIfReady();
+ if (events.GetPhaseMask() & PHASE_MASK_STATIONARY)
+ DoSpellAttackIfReady(SpitSpell);
}
- InstanceScript* instanceScript;
+ void Submerge()
+ {
+ DoCast(me, SPELL_SUBMERGE_0);
+ me->RemoveAurasDueToSpell(SPELL_EMERGE_0);
+ me->SetInCombatWithZone();
+ events.SetPhase(PHASE_SUBMERGED);
+ events.ScheduleEvent(EVENT_EMERGE, 5*IN_MILLISECONDS, 0, PHASE_SUBMERGED);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+ frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ());
+ WasMobile = !WasMobile;
+ }
- uint32 otherWormEntry;
+ void Emerge()
+ {
+ DoCast(me, SPELL_EMERGE_0);
+ me->SetDisplayId(ModelMobile);
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->GetMotionMaster()->Clear();
+
+ // if the worm was mobile before submerging, make him stationary now
+ if (WasMobile)
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
+ SetCombatMovement(false);
+ me->SetDisplayId(ModelStationary);
+ events.SetPhase(PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_SUBMERGE, 45*IN_MILLISECONDS, 0, PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_SPIT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_SPRAY, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ events.ScheduleEvent(EVENT_SWEEP, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY);
+ }
+ else
+ {
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
+ SetCombatMovement(true);
+ me->GetMotionMaster()->MoveChase(me->getVictim());
+ me->SetDisplayId(ModelMobile);
+ events.SetPhase(PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_SUBMERGE, 45*IN_MILLISECONDS, 0, PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_BITE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_SPEW, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_SLIME_POOL, 15*IN_MILLISECONDS, 0, PHASE_MOBILE);
+ }
+ }
- uint32 modelStationary;
- uint32 modelMobile;
+ protected:
+ uint32 OtherWormEntry;
+ uint32 ModelStationary;
+ uint32 ModelMobile;
- uint32 biteSpell;
- uint32 spewSpell;
- uint32 spitSpell;
- uint32 spraySpell;
+ uint32 BiteSpell;
+ uint32 SpewSpell;
+ uint32 SpitSpell;
+ uint32 SpraySpell;
- uint32 biteTimer;
- uint32 spewTimer;
- uint32 slimePoolTimer;
- uint32 spitTimer;
- uint32 sprayTimer;
- uint32 sweepTimer;
- uint32 submergeTimer;
- uint8 stage;
- bool enraged;
+ Phases Phase;
+ bool Enraged;
+ bool WasMobile;
};
class boss_acidmaw : public CreatureScript
{
public:
- boss_acidmaw() : CreatureScript("boss_acidmaw") { }
+ boss_acidmaw() : CreatureScript("boss_acidmaw") { }
- struct boss_acidmawAI : public boss_jormungarAI
- {
- boss_acidmawAI(Creature* creature) : boss_jormungarAI(creature) { }
+ struct boss_acidmawAI : public boss_jormungarAI
+ {
+ boss_acidmawAI(Creature* creature) : boss_jormungarAI(creature) { }
- void Reset()
+ void Reset()
+ {
+ boss_jormungarAI::Reset();
+ BiteSpell = SPELL_PARALYTIC_BITE;
+ SpewSpell = SPELL_ACID_SPEW;
+ SpitSpell = SPELL_ACID_SPIT;
+ SpraySpell = SPELL_PARALYTIC_SPRAY;
+ ModelStationary = MODEL_ACIDMAW_STATIONARY;
+ ModelMobile = MODEL_ACIDMAW_MOBILE;
+ OtherWormEntry = NPC_DREADSCALE;
+
+ WasMobile = true;
+ Emerge();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
{
- boss_jormungarAI::Reset();
- biteSpell = SPELL_PARALYTIC_BITE;
- spewSpell = SPELL_ACID_SPEW;
- spitSpell = SPELL_ACID_SPIT;
- spraySpell = SPELL_PARALYTIC_SPRAY;
- modelStationary = MODEL_ACIDMAW_STATIONARY;
- modelMobile = MODEL_ACIDMAW_MOBILE;
- otherWormEntry = NPC_DREADSCALE;
-
- submergeTimer = 500;
- DoCast(me, SPELL_SUBMERGE_0);
- stage = 2;
+ return new boss_acidmawAI(creature);
}
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_acidmawAI(creature);
- }
};
class boss_dreadscale : public CreatureScript
{
-public:
- boss_dreadscale() : CreatureScript("boss_dreadscale") { }
+ public:
+ boss_dreadscale() : CreatureScript("boss_dreadscale") { }
- struct boss_dreadscaleAI : public boss_jormungarAI
- {
- boss_dreadscaleAI(Creature* creature) : boss_jormungarAI(creature)
+ struct boss_dreadscaleAI : public boss_jormungarAI
{
- instanceScript = creature->GetInstanceScript();
- }
+ boss_dreadscaleAI(Creature* creature) : boss_jormungarAI(creature)
+ {
+ }
- InstanceScript* instanceScript;
+ void Reset()
+ {
+ boss_jormungarAI::Reset();
+ BiteSpell = SPELL_BURNING_BITE;
+ SpewSpell = SPELL_MOLTEN_SPEW;
+ SpitSpell = SPELL_FIRE_SPIT;
+ SpraySpell = SPELL_BURNING_SPRAY;
+ ModelStationary = MODEL_DREADSCALE_STATIONARY;
+ ModelMobile = MODEL_DREADSCALE_MOBILE;
+ OtherWormEntry = NPC_ACIDMAW;
+
+ events.SetPhase(PHASE_MOBILE);
+ events.ScheduleEvent(EVENT_SUMMON_ACIDMAW, 3*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUBMERGE, 45*IN_MILLISECONDS, 0, PHASE_MOBILE);
+ WasMobile = false;
+ }
- void Reset()
- {
- boss_jormungarAI::Reset();
- biteSpell = SPELL_BURNING_BITE;
- spewSpell = SPELL_MOLTEN_SPEW;
- spitSpell = SPELL_FIRE_SPIT;
- spraySpell = SPELL_BURNING_SPRAY;
- modelStationary = MODEL_DREADSCALE_STATIONARY;
- modelMobile = MODEL_DREADSCALE_MOBILE;
- otherWormEntry = NPC_ACIDMAW;
-
- submergeTimer = 45 * IN_MILLISECONDS;
- stage = 0;
- }
+ void MovementInform(uint32 type, uint32 pointId)
+ {
+ if (type != POINT_MOTION_TYPE)
+ return;
- void MovementInform(uint32 type, uint32 pointId)
- {
- if (type != POINT_MOTION_TYPE)
- return;
+ switch (pointId)
+ {
+ case 0:
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->SetInCombatWithZone();
+ break;
+ default:
+ break;
+ }
+ }
- switch (pointId)
+ void EnterEvadeMode()
{
- case 0:
- instanceScript->DoUseDoorOrButton(instanceScript->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetInCombatWithZone();
- if (Creature* otherWorm = Unit::GetCreature(*me, instanceScript->GetData64(otherWormEntry)))
- {
- otherWorm->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- otherWorm->SetReactState(REACT_AGGRESSIVE);
- otherWorm->SetVisible(true);
- otherWorm->SetInCombatWithZone();
- }
- break;
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ boss_jormungarAI::EnterEvadeMode();
}
- }
- void EnterEvadeMode()
- {
- instanceScript->DoUseDoorOrButton(instanceScript->GetData64(GO_MAIN_GATE_DOOR));
- boss_jormungarAI::EnterEvadeMode();
- }
+ void JustReachedHome()
+ {
+ if (instance)
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- void JustReachedHome()
- {
- if (instanceScript)
- instanceScript->DoUseDoorOrButton(instanceScript->GetData64(GO_MAIN_GATE_DOOR));
+ boss_jormungarAI::JustReachedHome();
+ }
+ };
- boss_jormungarAI::JustReachedHome();
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_dreadscaleAI(creature);
}
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_dreadscaleAI(creature);
- }
};
class mob_slime_pool : public CreatureScript
{
-public:
- mob_slime_pool() : CreatureScript("mob_slime_pool") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_slime_poolAI(creature);
- }
-
- struct mob_slime_poolAI : public ScriptedAI
- {
- mob_slime_poolAI(Creature* creature) : ScriptedAI(creature)
- {
- }
+ public:
+ mob_slime_pool() : CreatureScript("mob_slime_pool") { }
- bool casted;
- void Reset()
+ struct mob_slime_poolAI : public ScriptedAI
{
- casted = false;
- me->SetReactState(REACT_PASSIVE);
- }
+ mob_slime_poolAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ }
- void UpdateAI(uint32 const /*diff*/)
- {
- if (!casted)
+ void Reset()
{
- casted = true;
- DoCast(me, SPELL_SLIME_POOL_EFFECT);
+ _cast = false;
+ me->SetReactState(REACT_PASSIVE);
}
- }
- };
-};
+ void UpdateAI(uint32 const /*diff*/)
+ {
+ if (!_cast)
+ {
+ _cast = true;
+ DoCast(me, SPELL_SLIME_POOL_EFFECT);
+ }
-class boss_icehowl : public CreatureScript
-{
-public:
- boss_icehowl() : CreatureScript("boss_icehowl") { }
+ if (_instance->GetData(TYPE_NORTHREND_BEASTS) != SNAKES_IN_PROGRESS && _instance->GetData(TYPE_NORTHREND_BEASTS) != SNAKES_SPECIAL)
+ me->DespawnOrUnsummon();
+ }
+ private:
+ InstanceScript* _instance;
+ bool _cast;
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_icehowlAI(creature);
- }
+ };
- struct boss_icehowlAI : public ScriptedAI
- {
- boss_icehowlAI(Creature* creature) : ScriptedAI(creature)
+ CreatureAI* GetAI(Creature* creature) const
{
- instance = creature->GetInstanceScript();
+ return new mob_slime_poolAI(creature);
}
+};
- InstanceScript* instance;
-
- uint32 m_uiFerociousButtTimer;
- uint32 m_uiArticBreathTimer;
- uint32 m_uiWhirlTimer;
- uint32 m_uiMassiveCrashTimer;
- uint32 m_uiTrampleTimer;
- float m_fTrampleTargetX, m_fTrampleTargetY, m_fTrampleTargetZ;
- uint64 m_uiTrampleTargetGUID;
- bool m_bMovementStarted;
- bool m_bMovementFinish;
- bool m_bTrampleCasted;
- uint8 m_uiStage;
- Unit* target;
-
- void Reset()
+class spell_gormok_fire_bomb : public SpellScriptLoader
+{
+ public:
+ spell_gormok_fire_bomb() : SpellScriptLoader("spell_gormok_fire_bomb") {}
+
+ class spell_gormok_fire_bomb_SpellScript : public SpellScript
{
- m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- m_uiArticBreathTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- m_uiWhirlTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- m_uiMassiveCrashTimer = 30*IN_MILLISECONDS;
- m_uiTrampleTimer = IN_MILLISECONDS;
- m_bMovementStarted = false;
- m_bMovementFinish = false;
- m_bTrampleCasted = false;
- m_uiTrampleTargetGUID = 0;
- m_fTrampleTargetX = 0;
- m_fTrampleTargetY = 0;
- m_fTrampleTargetZ = 0;
- m_uiStage = 0;
- }
+ PrepareSpellScript(spell_gormok_fire_bomb_SpellScript);
+
+ void TriggerFireBomb(SpellEffIndex /*effIndex*/)
+ {
+ if (const WorldLocation* pos = GetExplTargetDest())
+ {
+ if (Unit* caster = GetCaster())
+ caster->SummonCreature(NPC_FIRE_BOMB, pos->GetPositionX(), pos->GetPositionY(), pos->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30*IN_MILLISECONDS);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_gormok_fire_bomb_SpellScript::TriggerFireBomb, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE);
+ }
+ };
- void JustDied(Unit* /*killer*/)
+ SpellScript* GetSpellScript() const
{
- if (instance)
- instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
+ return new spell_gormok_fire_bomb_SpellScript();
}
+};
+
+class boss_icehowl : public CreatureScript
+{
+ public:
+ boss_icehowl() : CreatureScript("boss_icehowl") { }
- void MovementInform(uint32 type, uint32 pointId)
+ struct boss_icehowlAI : public BossAI
{
- if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
- return;
+ boss_icehowlAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
+ {
+ }
- switch (pointId)
+ void Reset()
{
- case 0:
- if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()) < 6.0f)
- {
- // Middle of the room
- m_uiStage = 1;
- }
- else
- {
- // Landed from Hop backwards (start trample)
- if (Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
+ events.ScheduleEvent(EVENT_FEROCIOUS_BUTT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_ARCTIC_BREATH, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_WHIRL, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ events.ScheduleEvent(EVENT_MASSIVE_CRASH, 30*IN_MILLISECONDS);
+ _movementStarted = false;
+ _movementFinish = false;
+ _trampleCasted = false;
+ _trampleTargetGUID = 0;
+ _trampleTargetX = 0;
+ _trampleTargetY = 0;
+ _trampleTargetZ = 0;
+ _stage = 0;
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ _JustDied();
+ if (instance)
+ instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
+ }
+
+ void MovementInform(uint32 type, uint32 pointId)
+ {
+ if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
+ return;
+
+ switch (pointId)
+ {
+ case 0:
+ if (_stage != 0)
{
- m_uiStage = 4;
+ if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()) < 6.0f)
+ // Middle of the room
+ _stage = 1;
+ else
+ {
+ // Landed from Hop backwards (start trample)
+ if (Unit::GetPlayer(*me, _trampleTargetGUID))
+ _stage = 4;
+ else
+ _stage = 6;
+ }
}
- else
- m_uiStage = 6;
- }
- break;
- case 1: // Finish trample
- m_bMovementFinish = true;
- break;
- case 2:
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetInCombatWithZone();
- break;
+ break;
+ case 1: // Finish trample
+ _movementFinish = true;
+ break;
+ case 2:
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->SetInCombatWithZone();
+ break;
+ default:
+ break;
+ }
}
- }
- void EnterEvadeMode()
- {
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- ScriptedAI::EnterEvadeMode();
- }
-
- void JustReachedHome()
- {
- if (instance)
+ void EnterEvadeMode()
{
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
+ ScriptedAI::EnterEvadeMode();
}
- me->DespawnOrUnsummon();
- }
- void KilledUnit(Unit* who)
- {
- if (who->GetTypeId() == TYPEID_PLAYER)
+ void JustReachedHome()
{
if (instance)
- instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
+ {
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ instance->SetData(TYPE_NORTHREND_BEASTS, FAIL);
+ }
+ me->DespawnOrUnsummon();
}
- }
-
- void EnterCombat(Unit* /*who*/)
- {
- if (instance)
- instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
- me->SetInCombatWithZone();
- }
- void SpellHitTarget(Unit* target, SpellInfo const* spell)
- {
- if (spell->Id == SPELL_TRAMPLE && target->GetTypeId() == TYPEID_PLAYER)
+ void KilledUnit(Unit* who)
{
- if (!m_bTrampleCasted)
+ if (who->GetTypeId() == TYPEID_PLAYER)
{
- DoCast(me, SPELL_FROTHING_RAGE, true);
- m_bTrampleCasted = true;
+ if (instance)
+ instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
}
- }
- void UpdateAI(uint32 const diff)
- {
- if (!UpdateVictim())
- return;
+ void EnterCombat(Unit* /*who*/)
+ {
+ _EnterCombat();
+ if (instance)
+ instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
+ }
- switch (m_uiStage)
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
{
- case 0:
- if (m_uiFerociousButtTimer <= diff)
+ if (spell->Id == SPELL_TRAMPLE && target->GetTypeId() == TYPEID_PLAYER)
+ {
+ if (!_trampleCasted)
{
- DoCastVictim(SPELL_FEROCIOUS_BUTT);
- m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiFerociousButtTimer -= diff;
+ DoCast(me, SPELL_FROTHING_RAGE, true);
+ _trampleCasted = true;
+ }
+ }
+ }
- if (m_uiArticBreathTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_ARCTIC_BREATH);
- m_uiArticBreathTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiArticBreathTimer -= diff;
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
- if (m_uiWhirlTimer <= diff)
- {
- DoCastAOE(SPELL_WHIRL);
- m_uiWhirlTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiWhirlTimer -= diff;
+ events.Update(diff);
- if (m_uiMassiveCrashTimer <= diff)
- {
- me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 10.0f, 20.0f); // 1: Middle of the room
- SetCombatMovement(false);
- me->AttackStop();
- m_uiStage = 7; //Invalid (Do nothing more than move)
- m_uiMassiveCrashTimer = 30*IN_MILLISECONDS;
- } else m_uiMassiveCrashTimer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- DoMeleeAttackIfReady();
- break;
- case 1:
- DoCastAOE(SPELL_MASSIVE_CRASH);
- me->StopMoving();
- me->AttackStop();
- m_uiStage = 2;
- break;
- case 2:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
+ switch (_stage)
+ {
+ case 0:
{
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FEROCIOUS_BUTT:
+ DoCastVictim(SPELL_FEROCIOUS_BUTT);
+ events.ScheduleEvent(EVENT_FEROCIOUS_BUTT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_ARCTIC_BREATH:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
+ DoCast(target, SPELL_ARCTIC_BREATH);
+ return;
+ case EVENT_WHIRL:
+ DoCastAOE(SPELL_WHIRL);
+ events.ScheduleEvent(EVENT_WHIRL, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
+ return;
+ case EVENT_MASSIVE_CRASH:
+ me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 20.0f, 20.0f); // 1: Middle of the room
+ SetCombatMovement(false);
+ me->AttackStop();
+ _stage = 7; //Invalid (Do nothing more than move)
+ return;
+ default:
+ break;
+ }
+ }
+ DoMeleeAttackIfReady();
+ break;
+ }
+ case 1:
+ DoCastAOE(SPELL_MASSIVE_CRASH);
me->StopMoving();
me->AttackStop();
- m_uiTrampleTargetGUID = target->GetGUID();
- me->SetTarget(m_uiTrampleTargetGUID);
- m_bTrampleCasted = false;
- //SetCombatMovement(false);
- //me->GetMotionMaster()->MoveIdle();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_uiTrampleTimer = 4*IN_MILLISECONDS;
- m_uiStage = 3;
- } else m_uiStage = 6;
- break;
- case 3:
- me->StopMoving();
- me->AttackStop();
- if (m_uiTrampleTimer <= diff)
- {
- if (Unit* target = Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
+ _stage = 2;
+ break;
+ case 2:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
{
- m_bTrampleCasted = false;
- m_bMovementStarted = true;
- m_fTrampleTargetX = target->GetPositionX();
- m_fTrampleTargetY = target->GetPositionY();
- m_fTrampleTargetZ = target->GetPositionZ();
- me->GetMotionMaster()->MoveJump(2*me->GetPositionX()-m_fTrampleTargetX,
- 2*me->GetPositionY()-m_fTrampleTargetY,
- me->GetPositionZ(),
- 20.0f, 30.0f); // 2: Hop Backwards
- m_uiStage = 7; //Invalid (Do nothing more than move)
- } else m_uiStage = 6;
- } else m_uiTrampleTimer -= diff;
- break;
- case 4:
- me->StopMoving();
- me->AttackStop();
- Talk(EMOTE_TRAMPLE_START, m_uiTrampleTargetGUID);
- me->GetMotionMaster()->MoveCharge(m_fTrampleTargetX, m_fTrampleTargetY, m_fTrampleTargetZ+2, 42, 1);
- me->SetTarget(0);
- m_uiStage = 5;
- break;
- case 5:
- if (m_bMovementFinish)
- {
- if (m_uiTrampleTimer <= diff) DoCastAOE(SPELL_TRAMPLE);
- m_bMovementFinish = false;
- m_uiStage = 6;
- return;
- }
- if (m_uiTrampleTimer <= diff)
- {
- Map::PlayerList const &lPlayers = me->GetMap()->GetPlayers();
- for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
+ me->StopMoving();
+ me->AttackStop();
+ _trampleTargetGUID = target->GetGUID();
+ me->SetTarget(_trampleTargetGUID);
+ _trampleCasted = false;
+ SetCombatMovement(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ events.ScheduleEvent(EVENT_TRAMPLE, 4*IN_MILLISECONDS);
+ _stage = 3;
+ }
+ else
+ _stage = 6;
+ break;
+ case 3:
+ while (uint32 eventId = events.ExecuteEvent())
{
- if (Unit* player = itr->getSource())
- if (player->isAlive() && player->IsWithinDistInMap(me, 6.0f))
+ switch (eventId)
+ {
+ case EVENT_TRAMPLE:
{
- DoCastAOE(SPELL_TRAMPLE);
- m_uiTrampleTimer = IN_MILLISECONDS;
+ if (Unit* target = Unit::GetPlayer(*me, _trampleTargetGUID))
+ {
+ me->StopMoving();
+ me->AttackStop();
+ _trampleCasted = false;
+ _movementStarted = true;
+ _trampleTargetX = target->GetPositionX();
+ _trampleTargetY = target->GetPositionY();
+ _trampleTargetZ = target->GetPositionZ();
+ // 2: Hop Backwards
+ me->GetMotionMaster()->MoveJump(2*me->GetPositionX() - _trampleTargetX, 2*me->GetPositionY() - _trampleTargetY, me->GetPositionZ(), 30.0f, 20.0f);
+ _stage = 7; //Invalid (Do nothing more than move)
+ }
+ else
+ _stage = 6;
break;
}
+ default:
+ break;
+ }
}
- } else m_uiTrampleTimer -= diff;
- break;
- case 6:
- if (!m_bTrampleCasted)
- {
- DoCast(me, SPELL_STAGGERED_DAZE);
- Talk(EMOTE_TRAMPLE_CRASH);
- }
- else
- {
- DoCast(me, SPELL_FROTHING_RAGE, true);
- Talk(EMOTE_TRAMPLE_FAIL);
- }
- m_bMovementStarted = false;
- me->GetMotionMaster()->MovementExpired();
- me->GetMotionMaster()->MoveChase(me->getVictim());
- SetCombatMovement(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_uiStage = 0;
- break;
+ break;
+ case 4:
+ me->StopMoving();
+ me->AttackStop();
+ Talk(EMOTE_TRAMPLE_START, _trampleTargetGUID);
+ me->GetMotionMaster()->MoveCharge(_trampleTargetX, _trampleTargetY, _trampleTargetZ, 42, 1);
+ me->SetTarget(0);
+ _stage = 5;
+ break;
+ case 5:
+ if (_movementFinish)
+ {
+ DoCastAOE(SPELL_TRAMPLE);
+ _movementFinish = false;
+ _stage = 6;
+ return;
+ }
+ if (events.ExecuteEvent() == EVENT_TRAMPLE)
+ {
+ Map::PlayerList const &lPlayers = me->GetMap()->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
+ {
+ if (Unit* player = itr->getSource())
+ {
+ if (player->isAlive() && player->IsWithinDistInMap(me, 6.0f))
+ {
+ DoCastAOE(SPELL_TRAMPLE);
+ events.ScheduleEvent(EVENT_TRAMPLE, 4*IN_MILLISECONDS);
+ break;
+ }
+ }
+ }
+ }
+ break;
+ case 6:
+ if (!_trampleCasted)
+ {
+ DoCast(me, SPELL_STAGGERED_DAZE);
+ Talk(EMOTE_TRAMPLE_CRASH);
+ }
+ else
+ {
+ DoCast(me, SPELL_FROTHING_RAGE, true);
+ Talk(EMOTE_TRAMPLE_FAIL);
+ }
+ _movementStarted = false;
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
+ SetCombatMovement(true);
+ me->GetMotionMaster()->MovementExpired();
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(me->getVictim());
+ AttackStart(me->getVictim());
+ events.ScheduleEvent(EVENT_MASSIVE_CRASH, 40*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_ARCTIC_BREATH, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
+ _stage = 0;
+ break;
+ default:
+ break;
+ }
}
- }
- };
+ private:
+ float _trampleTargetX, _trampleTargetY, _trampleTargetZ;
+ uint64 _trampleTargetGUID;
+ bool _movementStarted;
+ bool _movementFinish;
+ bool _trampleCasted;
+ uint8 _stage;
+ Unit* _target;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_icehowlAI(creature);
+ }
};
void AddSC_boss_northrend_beasts()
{
new boss_gormok();
new mob_snobold_vassal();
+ new npc_firebomb();
+ new spell_gormok_fire_bomb();
+
new boss_acidmaw();
new boss_dreadscale();
new mob_slime_pool();
+
new boss_icehowl();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index a65eaebbc0c..4d99429bcb8 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: trial_of_the_crusader
-SD%Complete: ??%
-SDComment: based on /dev/rsa
-SDCategory: Crusader Coliseum
-EndScriptData */
-
// Known bugs:
// - They should be floating but they aren't respecting the floor =(
// - Hardcoded bullets spawner
@@ -48,13 +41,13 @@ enum Yells
SAY_TWINK_PACT = 5,
SAY_KILL_PLAYER = 6,
SAY_BERSERK = 7,
- SAY_DEATH = 8,
+ SAY_DEATH = 8
};
enum Equipment
{
EQUIP_MAIN_1 = 9423,
- EQUIP_MAIN_2 = 37377,
+ EQUIP_MAIN_2 = 37377
};
enum Summons
@@ -62,7 +55,7 @@ enum Summons
NPC_BULLET_CONTROLLER = 34743,
NPC_BULLET_DARK = 34628,
- NPC_BULLET_LIGHT = 34630,
+ NPC_BULLET_LIGHT = 34630
};
enum BossSpells
@@ -72,6 +65,7 @@ enum BossSpells
SPELL_LIGHT_SHIELD = 65858,
SPELL_LIGHT_TWIN_PACT = 65876,
SPELL_LIGHT_VORTEX = 66046,
+ SPELL_LIGHT_VORTEX_DAMAGE = 66048,
SPELL_LIGHT_TOUCH = 67297,
SPELL_LIGHT_ESSENCE = 65686,
SPELL_EMPOWERED_LIGHT = 65748,
@@ -83,17 +77,18 @@ enum BossSpells
SPELL_DARK_SHIELD = 65874,
SPELL_DARK_TWIN_PACT = 65875,
SPELL_DARK_VORTEX = 66058,
+ SPELL_DARK_VORTEX_DAMAGE = 66059,
SPELL_DARK_TOUCH = 67282,
SPELL_DARK_ESSENCE = 65684,
SPELL_EMPOWERED_DARK = 65724,
SPELL_TWIN_EMPATHY_DARK = 66132,
SPELL_UNLEASHED_DARK = 65808,
- SPELL_CONTROLLER_PERIODIC = 66149,
+ SPELL_CONTROLLER_PERIODIC = 66149,
SPELL_POWER_TWINS = 65879,
SPELL_BERSERK = 64238,
SPELL_POWERING_UP = 67590,
- SPELL_SURGE_OF_SPEED = 65828,
+ SPELL_SURGE_OF_SPEED = 65828
};
#define SPELL_DARK_ESSENCE_HELPER RAID_MODE<uint32>(65684, 67176, 67177, 67178)
@@ -106,13 +101,12 @@ enum BossSpells
enum Actions
{
- ACTION_VORTEX,
- ACTION_PACT
+ ACTION_VORTEX = 0,
+ ACTION_PACT = 1
};
-/*######
-## boss_twin_base
-######*/
+#define ESSENCE_REMOVE 0
+#define ESSENCE_APPLY 1
class OrbsDespawner : public BasicEvent
{
@@ -145,61 +139,36 @@ class OrbsDespawner : public BasicEvent
Creature* _creature;
};
-struct boss_twin_baseAI : public ScriptedAI
+struct boss_twin_baseAI : public BossAI
{
- boss_twin_baseAI(Creature* creature) : ScriptedAI(creature), Summons(me)
+ boss_twin_baseAI(Creature* creature) : BossAI(creature, BOSS_VALKIRIES)
{
- instance = creature->GetInstanceScript();
}
- InstanceScript* instance;
- SummonList Summons;
-
- AuraStateType m_uiAuraState;
-
- uint8 m_uiStage;
- bool m_bIsBerserk;
- uint32 m_uiWeapon;
- uint32 m_uiSpecialAbilityTimer;
- uint32 m_uiSpikeTimer;
- uint32 m_uiTouchTimer;
- uint32 m_uiBerserkTimer;
-
- int32 m_uiVortexEmote;
- uint32 m_uiSisterNpcId;
- uint32 m_uiMyEmphatySpellId;
- uint32 m_uiOtherEssenceSpellId;
- uint32 m_uiSurgeSpellId;
- uint32 m_uiVortexSpellId;
- uint32 m_uiShieldSpellId;
- uint32 m_uiTwinPactSpellId;
- uint32 m_uiSpikeSpellId;
- uint32 m_uiTouchSpellId;
-
void Reset()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
- me->ModifyAuraState(m_uiAuraState, true);
- /* Uncomment this once that they are flying above the ground
+ me->ModifyAuraState(AuraState, true);
+ /* Uncomment this once that they are floating above the ground
me->SetLevitate(true);
me->SetFlying(true); */
- m_bIsBerserk = false;
+ IsBerserk = false;
- m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
- m_uiSpikeTimer = 20*IN_MILLISECONDS;
- m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
- m_uiBerserkTimer = IsHeroic() ? 6*MINUTE*IN_MILLISECONDS : 10*MINUTE*IN_MILLISECONDS;
+ SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
+ SpikeTimer = 20*IN_MILLISECONDS;
+ TouchTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
+ BerserkTimer = IsHeroic() ? 6*MINUTE*IN_MILLISECONDS : 10*MINUTE*IN_MILLISECONDS;
- Summons.DespawnAll();
+ summons.DespawnAll();
}
void JustReachedHome()
{
if (instance)
- instance->SetData(TYPE_VALKIRIES, FAIL);
+ instance->SetBossState(BOSS_VALKIRIES, FAIL);
- Summons.DespawnAll();
+ summons.DespawnAll();
me->DespawnOrUnsummon();
}
@@ -211,10 +180,11 @@ struct boss_twin_baseAI : public ScriptedAI
switch (uiId)
{
case 1:
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
break;
+ default:
+ break;
}
}
@@ -230,7 +200,7 @@ struct boss_twin_baseAI : public ScriptedAI
void JustSummoned(Creature* summoned)
{
- Summons.Summon(summoned);
+ summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* summoned)
@@ -248,8 +218,10 @@ struct boss_twin_baseAI : public ScriptedAI
case NPC_BULLET_CONTROLLER:
me->m_Events.AddEvent(new OrbsDespawner(me), me->m_Events.CalculateTime(100));
break;
+ default:
+ break;
}
- Summons.Despawn(summoned);
+ summons.Despawn(summoned);
}
void JustDied(Unit* /*killer*/)
@@ -263,24 +235,22 @@ struct boss_twin_baseAI : public ScriptedAI
{
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
-
- instance->SetData(TYPE_VALKIRIES, DONE);
- Summons.DespawnAll();
+ _JustDied();
}
else
{
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
- instance->SetData(TYPE_VALKIRIES, SPECIAL);
+ instance->SetBossState(BOSS_VALKIRIES, SPECIAL);
}
}
}
- Summons.DespawnAll();
+ summons.DespawnAll();
}
// Called when sister pointer needed
Creature* GetSister()
{
- return Unit::GetCreature((*me), instance->GetData64(m_uiSisterNpcId));
+ return Unit::GetCreature((*me), instance->GetData64(SisterNpcId));
}
void EnterCombat(Unit* /*who*/)
@@ -290,14 +260,14 @@ struct boss_twin_baseAI : public ScriptedAI
{
if (Creature* pSister = GetSister())
{
- me->AddAura(m_uiMyEmphatySpellId, pSister);
+ me->AddAura(MyEmphatySpellId, pSister);
pSister->SetInCombatWithZone();
}
- instance->SetData(TYPE_VALKIRIES, IN_PROGRESS);
+ instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
}
Talk(SAY_AGGRO);
- DoCast(me, m_uiSurgeSpellId);
+ DoCast(me, SurgeSpellId);
}
void DoAction(const int32 action)
@@ -305,45 +275,50 @@ struct boss_twin_baseAI : public ScriptedAI
switch (action)
{
case ACTION_VORTEX:
- m_uiStage = me->GetEntry() == NPC_LIGHTBANE ? 2 : 1;
+ Stage = me->GetEntry() == NPC_LIGHTBANE ? 2 : 1;
break;
case ACTION_PACT:
- m_uiStage = me->GetEntry() == NPC_LIGHTBANE ? 1 : 2;
+ Stage = me->GetEntry() == NPC_LIGHTBANE ? 1 : 2;
+ break;
+ default:
break;
}
}
void EnableDualWield(bool mode = true)
{
- SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
+ SetEquipmentSlots(false, Weapon, mode ? Weapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
me->SetCanDualWield(mode);
me->UpdateDamagePhysical(mode ? OFF_ATTACK : BASE_ATTACK);
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(const uint32 diff)
{
if (!instance || !UpdateVictim())
return;
- switch (m_uiStage)
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ switch (Stage)
{
case 0:
break;
case 1: // Vortex
- if (m_uiSpecialAbilityTimer <= uiDiff)
+ if (SpecialAbilityTimer <= diff)
{
if (Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_VORTEX);
- Talk(m_uiVortexEmote);
- DoCastAOE(m_uiVortexSpellId);
- m_uiStage = 0;
- m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
+ Talk(VortexEmote);
+ DoCastAOE(VortexSpellId);
+ Stage = 0;
+ SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
}
else
- m_uiSpecialAbilityTimer -= uiDiff;
+ SpecialAbilityTimer -= diff;
break;
- case 2: // Shield+Pact
- if (m_uiSpecialAbilityTimer <= uiDiff)
+ case 2: // Shield + Pact
+ if (SpecialAbilityTimer <= diff)
{
Talk(EMOTE_TWINK_PACT);
Talk(SAY_TWINK_PACT);
@@ -352,164 +327,169 @@ struct boss_twin_baseAI : public ScriptedAI
pSister->AI()->DoAction(ACTION_PACT);
pSister->CastSpell(pSister, SPELL_POWER_TWINS, false);
}
- DoCast(me, m_uiShieldSpellId);
- DoCast(me, m_uiTwinPactSpellId);
- m_uiStage = 0;
- m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
+ DoCast(me, ShieldSpellId);
+ DoCast(me, TwinPactSpellId);
+ Stage = 0;
+ SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
}
else
- m_uiSpecialAbilityTimer -= uiDiff;
+ SpecialAbilityTimer -= diff;
break;
default:
break;
}
- if (m_uiSpikeTimer <= uiDiff)
+ if (SpikeTimer <= diff)
{
- DoCastVictim(m_uiSpikeSpellId);
- m_uiSpikeTimer = 20*IN_MILLISECONDS;
+ DoCastVictim(SpikeSpellId);
+ SpikeTimer = 20*IN_MILLISECONDS;
}
else
- m_uiSpikeTimer -= uiDiff;
+ SpikeTimer -= diff;
- if (IsHeroic() && m_uiTouchTimer <= uiDiff)
+ if (IsHeroic() && TouchTimer <= diff)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true, m_uiOtherEssenceSpellId))
- me->CastCustomSpell(m_uiTouchSpellId, SPELLVALUE_MAX_TARGETS, 1, target, false);
- m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true, OtherEssenceSpellId))
+ me->CastCustomSpell(TouchSpellId, SPELLVALUE_MAX_TARGETS, 1, target, false);
+ TouchTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
}
else
- m_uiTouchTimer -= uiDiff;
+ TouchTimer -= diff;
- if (!m_bIsBerserk && m_uiBerserkTimer <= uiDiff)
+ if (!IsBerserk && BerserkTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
Talk(SAY_BERSERK);
- m_bIsBerserk = true;
+ IsBerserk = true;
}
else
- m_uiBerserkTimer -= uiDiff;
+ BerserkTimer -= diff;
DoMeleeAttackIfReady();
}
-};
-/*######
-## boss_fjola
-######*/
+ protected:
+ AuraStateType AuraState;
+
+ uint8 Stage;
+ bool IsBerserk;
+
+ uint32 Weapon;
+ uint32 SpecialAbilityTimer;
+ uint32 SpikeTimer;
+ uint32 TouchTimer;
+ uint32 BerserkTimer;
+
+ int32 VortexEmote;
+ uint32 SisterNpcId;
+ uint32 MyEmphatySpellId;
+ uint32 OtherEssenceSpellId;
+ uint32 SurgeSpellId;
+ uint32 VortexSpellId;
+ uint32 ShieldSpellId;
+ uint32 TwinPactSpellId;
+ uint32 SpikeSpellId;
+ uint32 TouchSpellId;
+};
class boss_fjola : public CreatureScript
{
-public:
- boss_fjola() : CreatureScript("boss_fjola") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_fjolaAI(creature);
- }
+ public:
+ boss_fjola() : CreatureScript("boss_fjola") { }
- struct boss_fjolaAI : public boss_twin_baseAI
- {
- boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature)
+ struct boss_fjolaAI : public boss_twin_baseAI
{
- instance = creature->GetInstanceScript();
- }
+ boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature)
+ {
+ }
- InstanceScript* instance;
-
- void Reset() {
- boss_twin_baseAI::Reset();
- SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
- m_uiStage = 0;
- m_uiWeapon = EQUIP_MAIN_1;
- m_uiAuraState = AURA_STATE_UNKNOWN22;
- m_uiVortexEmote = EMOTE_VORTEX;
- m_uiSisterNpcId = NPC_DARKBANE;
- m_uiMyEmphatySpellId = SPELL_TWIN_EMPATHY_DARK;
- m_uiOtherEssenceSpellId = SPELL_DARK_ESSENCE_HELPER;
- m_uiSurgeSpellId = SPELL_LIGHT_SURGE;
- m_uiVortexSpellId = SPELL_LIGHT_VORTEX;
- m_uiShieldSpellId = SPELL_LIGHT_SHIELD;
- m_uiTwinPactSpellId = SPELL_LIGHT_TWIN_PACT;
- m_uiTouchSpellId = SPELL_LIGHT_TOUCH;
- m_uiSpikeSpellId = SPELL_LIGHT_TWIN_SPIKE;
+ void Reset()
+ {
+ SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
+ Stage = 0;
+ Weapon = EQUIP_MAIN_1;
+ AuraState = AURA_STATE_UNKNOWN22;
+ VortexEmote = EMOTE_VORTEX;
+ SisterNpcId = NPC_DARKBANE;
+ MyEmphatySpellId = SPELL_TWIN_EMPATHY_DARK;
+ OtherEssenceSpellId = SPELL_DARK_ESSENCE_HELPER;
+ SurgeSpellId = SPELL_LIGHT_SURGE;
+ VortexSpellId = SPELL_LIGHT_VORTEX;
+ ShieldSpellId = SPELL_LIGHT_SHIELD;
+ TwinPactSpellId = SPELL_LIGHT_TWIN_PACT;
+ TouchSpellId = SPELL_LIGHT_TOUCH;
+ SpikeSpellId = SPELL_LIGHT_TWIN_SPIKE;
+
+ if (instance)
+ instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
+ boss_twin_baseAI::Reset();
+ }
- if (instance)
+ void EnterCombat(Unit* who)
{
- instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
+ if (instance)
+ instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
+
+ me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
+ boss_twin_baseAI::EnterCombat(who);
}
- }
- void EnterCombat(Unit* who)
- {
- if (instance)
+ void EnterEvadeMode()
{
- instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ boss_twin_baseAI::EnterEvadeMode();
}
- me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
- boss_twin_baseAI::EnterCombat(who);
- }
+ void JustReachedHome()
+ {
+ if (instance)
+ instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- void EnterEvadeMode()
- {
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- boss_twin_baseAI::EnterEvadeMode();
- }
+ boss_twin_baseAI::JustReachedHome();
+ }
+ };
- void JustReachedHome()
+ CreatureAI* GetAI(Creature* creature) const
{
- if (instance)
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
-
- boss_twin_baseAI::JustReachedHome();
+ return new boss_fjolaAI(creature);
}
- };
-
};
-/*######
-## boss_eydis
-######*/
-
class boss_eydis : public CreatureScript
{
-public:
- boss_eydis() : CreatureScript("boss_eydis") { }
+ public:
+ boss_eydis() : CreatureScript("boss_eydis") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_eydisAI(creature);
- }
+ struct boss_eydisAI : public boss_twin_baseAI
+ {
+ boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) {}
- struct boss_eydisAI : public boss_twin_baseAI
- {
- boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) {}
-
- void Reset() {
- boss_twin_baseAI::Reset();
- SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
- m_uiStage = 1;
- m_uiWeapon = EQUIP_MAIN_2;
- m_uiAuraState = AURA_STATE_UNKNOWN19;
- m_uiVortexEmote = EMOTE_VORTEX;
- m_uiSisterNpcId = NPC_LIGHTBANE;
- m_uiMyEmphatySpellId = SPELL_TWIN_EMPATHY_LIGHT;
- m_uiOtherEssenceSpellId = SPELL_LIGHT_ESSENCE_HELPER;
- m_uiSurgeSpellId = SPELL_DARK_SURGE;
- m_uiVortexSpellId = SPELL_DARK_VORTEX;
- m_uiShieldSpellId = SPELL_DARK_SHIELD;
- m_uiTwinPactSpellId = SPELL_DARK_TWIN_PACT;
- m_uiTouchSpellId = SPELL_DARK_TOUCH;
- m_uiSpikeSpellId = SPELL_DARK_TWIN_SPIKE;
- }
- };
+ void Reset()
+ {
+ SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
+ Stage = 1;
+ Weapon = EQUIP_MAIN_2;
+ AuraState = AURA_STATE_UNKNOWN19;
+ VortexEmote = EMOTE_VORTEX;
+ SisterNpcId = NPC_LIGHTBANE;
+ MyEmphatySpellId = SPELL_TWIN_EMPATHY_LIGHT;
+ OtherEssenceSpellId = SPELL_LIGHT_ESSENCE_HELPER;
+ SurgeSpellId = SPELL_DARK_SURGE;
+ VortexSpellId = SPELL_DARK_VORTEX;
+ ShieldSpellId = SPELL_DARK_SHIELD;
+ TwinPactSpellId = SPELL_DARK_TWIN_PACT;
+ TouchSpellId = SPELL_DARK_TOUCH;
+ SpikeSpellId = SPELL_DARK_TWIN_SPIKE;
+ boss_twin_baseAI::Reset();
+ }
+ };
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_eydisAI(creature);
+ }
};
-#define ESSENCE_REMOVE 0
-#define ESSENCE_APPLY 1
-
class mob_essence_of_twin : public CreatureScript
{
public:
@@ -525,10 +505,10 @@ class mob_essence_of_twin : public CreatureScript
switch (me->GetEntry())
{
case NPC_LIGHT_ESSENCE:
- spellReturned = data == ESSENCE_REMOVE? SPELL_DARK_ESSENCE_HELPER : SPELL_LIGHT_ESSENCE_HELPER;
+ spellReturned = (data == ESSENCE_REMOVE) ? SPELL_DARK_ESSENCE_HELPER : SPELL_LIGHT_ESSENCE_HELPER;
break;
case NPC_DARK_ESSENCE:
- spellReturned = data == ESSENCE_REMOVE? SPELL_LIGHT_ESSENCE_HELPER : SPELL_DARK_ESSENCE_HELPER;
+ spellReturned = (data == ESSENCE_REMOVE) ? SPELL_LIGHT_ESSENCE_HELPER : SPELL_DARK_ESSENCE_HELPER;
break;
default:
break;
@@ -556,12 +536,8 @@ struct mob_unleashed_ballAI : public ScriptedAI
{
mob_unleashed_ballAI(Creature* creature) : ScriptedAI(creature)
{
- instance = creature->GetInstanceScript();
}
- InstanceScript* instance;
- uint32 m_uiRangeCheckTimer;
-
void MoveToNextPoint()
{
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
@@ -578,13 +554,13 @@ struct mob_unleashed_ballAI : public ScriptedAI
void Reset()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
me->SetDisableGravity(true);
me->SetCanFly(true);
SetCombatMovement(false);
MoveToNextPoint();
- m_uiRangeCheckTimer = IN_MILLISECONDS;
+ RangeCheckTimer = 0.5*IN_MILLISECONDS;
}
void MovementInform(uint32 uiType, uint32 uiId)
@@ -600,160 +576,112 @@ struct mob_unleashed_ballAI : public ScriptedAI
else
me->DisappearAndDie();
break;
+ default:
+ break;
}
}
+
+ protected:
+ uint32 RangeCheckTimer;
};
class mob_unleashed_dark : public CreatureScript
{
-public:
- mob_unleashed_dark() : CreatureScript("mob_unleashed_dark") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_unleashed_darkAI(creature);
- }
-
- struct mob_unleashed_darkAI : public mob_unleashed_ballAI
- {
- mob_unleashed_darkAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
+ public:
+ mob_unleashed_dark() : CreatureScript("mob_unleashed_dark") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_unleashed_darkAI : public mob_unleashed_ballAI
{
- if (m_uiRangeCheckTimer < uiDiff)
+ mob_unleashed_darkAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
+
+ void UpdateAI(const uint32 diff)
{
- if (me->SelectNearestPlayer(2.0f))
+ if (RangeCheckTimer < diff)
+ {
+ if (me->SelectNearestPlayer(3.0f))
{
- DoCastAOE(SPELL_UNLEASHED_DARK);
+ DoCastAOE(SPELL_UNLEASHED_DARK_HELPER);
me->GetMotionMaster()->MoveIdle();
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(1*IN_MILLISECONDS);
}
- m_uiRangeCheckTimer = IN_MILLISECONDS;
+ RangeCheckTimer = 0.5*IN_MILLISECONDS;
+ }
+ else
+ RangeCheckTimer -= diff;
}
- else m_uiRangeCheckTimer -= uiDiff;
- }
+ };
- void SpellHitTarget(Unit* who, SpellInfo const* spell)
+ CreatureAI* GetAI(Creature* creature) const
{
- if (spell->Id == SPELL_UNLEASHED_DARK_HELPER)
- {
- if (who->HasAura(SPELL_DARK_ESSENCE_HELPER))
- who->CastSpell(who, SPELL_POWERING_UP, true);
- }
+ return new mob_unleashed_darkAI(creature);
}
- };
-
};
class mob_unleashed_light : public CreatureScript
{
-public:
- mob_unleashed_light() : CreatureScript("mob_unleashed_light") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_unleashed_lightAI(creature);
- }
-
- struct mob_unleashed_lightAI : public mob_unleashed_ballAI
- {
- mob_unleashed_lightAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
+ public:
+ mob_unleashed_light() : CreatureScript("mob_unleashed_light") { }
- void UpdateAI(const uint32 uiDiff)
+ struct mob_unleashed_lightAI : public mob_unleashed_ballAI
{
- if (m_uiRangeCheckTimer < uiDiff)
+ mob_unleashed_lightAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
+
+ void UpdateAI(const uint32 diff)
{
- if (me->SelectNearestPlayer(2.0f))
+ if (RangeCheckTimer < diff)
+ {
+ if (me->SelectNearestPlayer(3.0f))
{
- DoCastAOE(SPELL_UNLEASHED_LIGHT);
+ DoCastAOE(SPELL_UNLEASHED_LIGHT_HELPER);
me->GetMotionMaster()->MoveIdle();
- me->DespawnOrUnsummon(500);
+ me->DespawnOrUnsummon(1*IN_MILLISECONDS);
}
- m_uiRangeCheckTimer = IN_MILLISECONDS;
+ RangeCheckTimer = 0.5*IN_MILLISECONDS;
+ }
+ else
+ RangeCheckTimer -= diff;
}
- else m_uiRangeCheckTimer -= uiDiff;
- }
+ };
- void SpellHitTarget(Unit* who, SpellInfo const* spell)
+ CreatureAI* GetAI(Creature* creature) const
{
- if (spell->Id == SPELL_UNLEASHED_LIGHT_HELPER)
- {
- if (who->HasAura(SPELL_LIGHT_ESSENCE_HELPER))
- who->CastSpell(who, SPELL_POWERING_UP, true);
- }
+ return new mob_unleashed_lightAI(creature);
}
- };
-
};
class mob_bullet_controller : public CreatureScript
{
-public:
- mob_bullet_controller() : CreatureScript("mob_bullet_controller") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_bullet_controllerAI(creature);
- }
-
- struct mob_bullet_controllerAI : public Scripted_NoMovementAI
- {
- mob_bullet_controllerAI(Creature* creature) : Scripted_NoMovementAI(creature)
- {
- Reset();
- }
-
- void Reset()
- {
- DoCastAOE(SPELL_CONTROLLER_PERIODIC);
- }
-
- void UpdateAI(const uint32 /*uiDiff*/)
- {
- UpdateVictim();
- }
- };
-};
-
-class spell_powering_up : public SpellScriptLoader
-{
public:
- spell_powering_up() : SpellScriptLoader("spell_powering_up") { }
+ mob_bullet_controller() : CreatureScript("mob_bullet_controller") { }
- class spell_powering_up_AuraScript : public AuraScript
+ struct mob_bullet_controllerAI : public Scripted_NoMovementAI
{
- PrepareAuraScript(spell_powering_up_AuraScript);
-
- void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ mob_bullet_controllerAI(Creature* creature) : Scripted_NoMovementAI(creature)
{
- if (Unit* target = GetTarget())
- {
- if (Aura* pAura = target->GetAura(GetId()))
- {
- if (pAura->GetStackAmount() == 100)
- {
- if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2206, EFFECT_1))
- target->CastSpell(target, SPELL_EMPOWERED_DARK, true);
-
- if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2845, EFFECT_1))
- target->CastSpell(target, SPELL_EMPOWERED_LIGHT, true);
+ Reset();
+ }
- target->RemoveAurasDueToSpell(GetId());
- }
- }
- }
+ void Reset()
+ {
+ DoCastAOE(SPELL_CONTROLLER_PERIODIC);
}
- void Register()
+ void UpdateAI(const uint32 /*diff*/)
{
- OnEffectApply += AuraEffectApplyFn(spell_powering_up_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ UpdateVictim();
}
};
- AuraScript* GetAuraScript() const
+ CreatureAI* GetAI(Creature* creature) const
{
- return new spell_powering_up_AuraScript();
+ return new mob_bullet_controllerAI(creature);
}
+};
+
+class spell_powering_up : public SpellScriptLoader
+{
+ public:
+ spell_powering_up() : SpellScriptLoader("spell_powering_up") { }
class spell_powering_up_SpellScript : public SpellScript
{
@@ -761,20 +689,39 @@ class spell_powering_up : public SpellScriptLoader
PrepareSpellScript(spell_powering_up_SpellScript)
uint32 spellId;
+ uint32 poweringUp;
bool Load()
{
spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_SURGE_OF_SPEED, GetCaster());
if (!sSpellMgr->GetSpellInfo(spellId))
return false;
+
+ poweringUp = sSpellMgr->GetSpellIdForDifficulty(SPELL_POWERING_UP, GetCaster());
+ if (!sSpellMgr->GetSpellInfo(poweringUp))
+ return false;
+
return true;
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
- if (Unit* target = GetExplTargetUnit())
- if (urand(0, 99) < 15)
- target->CastSpell(target, spellId, true);
+ if (Unit* target = GetHitUnit())
+ {
+ if (Aura* pAura = target->GetAura(poweringUp))
+ {
+ if (pAura->GetStackAmount() >= 100)
+ {
+ if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2206, EFFECT_1))
+ target->CastSpell(target, SPELL_EMPOWERED_DARK, true);
+
+ if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2845, EFFECT_1))
+ target->CastSpell(target, SPELL_EMPOWERED_LIGHT, true);
+
+ target->RemoveAurasDueToSpell(poweringUp);
+ }
+ }
+ }
}
void Register()
@@ -808,10 +755,68 @@ class spell_valkyr_essences : public SpellScriptLoader
return true;
}
- void Absorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & /*absorbAmount*/)
+ void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & /*absorbAmount*/)
{
- if (urand(0, 99) < 5)
- GetTarget()->CastSpell(GetTarget(), spellId, true);
+ if (Unit* owner = GetUnitOwner())
+ {
+ if (dmgInfo.GetSpellInfo())
+ {
+ if (uint32 poweringUp = sSpellMgr->GetSpellIdForDifficulty(SPELL_POWERING_UP, owner))
+ {
+ if (urand(0, 99) < 5)
+ GetTarget()->CastSpell(GetTarget(), spellId, true);
+
+ // Twin Vortex part
+ uint32 lightVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHT_VORTEX_DAMAGE, owner);
+ uint32 darkVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_DARK_VORTEX_DAMAGE, owner);
+ int32 stacksCount = int32(dmgInfo.GetSpellInfo()->Effects[EFFECT_0].CalcValue()) * 0.001 - 1;
+
+ if (lightVortex && darkVortex && stacksCount)
+ {
+ if (dmgInfo.GetSpellInfo()->Id == darkVortex || dmgInfo.GetSpellInfo()->Id == lightVortex)
+ {
+ Aura* pAura = owner->GetAura(poweringUp);
+ if (pAura)
+ {
+ pAura->ModStackAmount(stacksCount);
+ owner->CastSpell(owner, poweringUp, true);
+ }
+ else
+ {
+ owner->CastSpell(owner, poweringUp, true);
+ if (Aura* pTemp = owner->GetAura(poweringUp))
+ pTemp->ModStackAmount(stacksCount);
+ }
+ }
+ }
+
+ // Picking floating balls
+ uint32 unleashedDark = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNLEASHED_DARK, owner);
+ uint32 unleashedLight = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNLEASHED_LIGHT, owner);
+
+ if (unleashedDark && unleashedLight)
+ {
+ if (dmgInfo.GetSpellInfo()->Id == unleashedDark || dmgInfo.GetSpellInfo()->Id == unleashedLight)
+ {
+ // need to do the things in this order, else players might have 100 charges of Powering Up without anything happening
+ Aura* pAura = owner->GetAura(poweringUp);
+ if (pAura)
+ {
+ // 2 lines together add the correct amount of buff stacks
+ pAura->ModStackAmount(stacksCount);
+ owner->CastSpell(owner, poweringUp, true);
+ }
+ else
+ {
+ owner->CastSpell(owner, poweringUp, true);
+ if (Aura* pTemp = owner->GetAura(poweringUp))
+ pTemp->ModStackAmount(stacksCount);
+ }
+ }
+ }
+ }
+ }
+ }
}
void Register()
@@ -880,6 +885,7 @@ void AddSC_boss_twin_valkyr()
new mob_unleashed_dark();
new mob_essence_of_twin();
new mob_bullet_controller();
+
new spell_powering_up();
new spell_valkyr_essences();
new spell_power_of_the_twins();
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index af6104008ff..7b0cd31bc67 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
@@ -16,16 +16,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: instance_trial_of_the_crusader
-SD%Complete: 80%
-SDComment: by /dev/rsa
-SDCategory: Trial of the Crusader
-EndScriptData */
-
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "trial_of_the_crusader.h"
+#include "Player.h"
class instance_trial_of_the_crusader : public InstanceMapScript
{
@@ -36,82 +30,55 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map) {}
- uint32 EncounterStatus[MAX_ENCOUNTERS];
- uint32 TrialCounter;
- uint32 EventStage;
- uint32 EventTimer;
- uint32 EventNPCId;
- uint32 NorthrendBeasts;
- std::string SaveDataBuffer;
- bool NeedSave;
-
- uint64 BarrentGUID;
- uint64 TirionGUID;
- uint64 TirionFordringGUID;
- uint64 FizzlebangGUID;
- uint64 GarroshGUID;
- uint64 VarianGUID;
-
- uint64 GormokGUID;
- uint64 AcidmawGUID;
- uint64 DreadscaleGUID;
- uint64 IcehowlGUID;
- uint64 JaraxxusGUID;
- uint64 ChampionsControllerGUID;
- uint64 DarkbaneGUID;
- uint64 LightbaneGUID;
- uint64 AnubarakGUID;
-
- uint64 CrusadersCacheGUID;
- uint64 FloorGUID;
-
- uint64 TributeChestGUID;
-
- uint64 MainGateDoorGUID;
- uint64 EastPortcullisGUID;
- uint64 WebDoorGUID;
-
- // Achievement stuff
- uint32 NotOneButTwoJormungarsTimer;
- uint32 ResilienceWillFixItTimer;
- uint8 SnoboldCount;
- uint8 MistressOfPainCount;
- bool TributeToImmortalityElegible;
-
void Initialize()
{
- for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
- EncounterStatus[i] = NOT_STARTED;
-
+ SetBossNumber(MAX_ENCOUNTERS);
TrialCounter = 50;
EventStage = 0;
-
- TirionFordringGUID = 0;
-
- TributeChestGUID = 0;
-
- MainGateDoorGUID = 0;
- EastPortcullisGUID = 0;
- WebDoorGUID = 0;
-
NorthrendBeasts = NOT_STARTED;
-
EventTimer = 1000;
-
NotOneButTwoJormungarsTimer = 0;
ResilienceWillFixItTimer = 0;
SnoboldCount = 0;
MistressOfPainCount = 0;
TributeToImmortalityElegible = true;
-
NeedSave = false;
+ EventNPCId = 0;
+
+ TirionFordringGUID = 0;
+ BarrentGUID = 0;
+ TirionGUID = 0;
+ FizzlebangGUID = 0;
+ GarroshGUID = 0;
+ VarianGUID = 0;
+ GormokGUID = 0;
+ AcidmawGUID = 0;
+ DreadscaleGUID = 0;
+ IcehowlGUID = 0;
+ JaraxxusGUID = 0;
+ ChampionsControllerGUID = 0;
+ DarkbaneGUID = 0;
+ LightbaneGUID = 0;
+ AnubarakGUID = 0;
+
+ TributeChestGUID = 0;
+ MainGateDoorGUID = 0;
+ EastPortcullisGUID = 0;
+ WebDoorGUID = 0;
+ CrusadersCacheGUID = 0;
+ FloorGUID = 0;
}
bool IsEncounterInProgress() const
{
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
- if (EncounterStatus[i] == IN_PROGRESS)
+ if (GetBossState(i) == IN_PROGRESS)
return true;
+
+ // Special state is set at Faction Champions after first champ dead, encounter is still in combat
+ if (GetBossState(BOSS_CRUSADERS) == SPECIAL)
+ return true;
+
return false;
}
@@ -122,12 +89,26 @@ class instance_trial_of_the_crusader : public InstanceMapScript
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 1);
player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER));
}
+ else
+ player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);
+
+ // make sure Anub'arak isnt missing and floor is destroyed after a crash
+ if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
+ {
+ Creature* anubArak = Unit::GetCreature(*player, GetData64(NPC_ANUBARAK));
+ if (!anubArak)
+ anubArak = player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
+
+ if (GameObject* floor = GameObject::GetGameObject(*player, GetData64(GO_ARGENT_COLISEUM_FLOOR)))
+ floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
+ }
}
void OpenDoor(uint64 guid)
{
if (!guid)
return;
+
if (GameObject* go = instance->GetGameObject(guid))
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
}
@@ -136,6 +117,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
if (!guid)
return;
+
if (GameObject* go = instance->GetGameObject(guid))
go->SetGoState(GO_STATE_READY);
}
@@ -146,6 +128,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
case NPC_BARRENT:
BarrentGUID = creature->GetGUID();
+ if (!TrialCounter)
+ creature->DespawnOrUnsummon();
break;
case NPC_TIRION:
TirionGUID = creature->GetGUID();
@@ -190,6 +174,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case NPC_ANUBARAK:
AnubarakGUID = creature->GetGUID();
break;
+ default:
+ break;
}
}
@@ -236,34 +222,41 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case GO_TRIBUTE_CHEST_25H_99:
TributeChestGUID = go->GetGUID();
break;
+ default:
+ break;
}
}
- void SetData(uint32 type, uint32 data)
+ bool SetBossState(uint32 type, EncounterState state)
{
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
+
switch (type)
{
- case TYPE_JARAXXUS:
+ case BOSS_BEASTS:
+ break;
+ case BOSS_JARAXXUS:
// Cleanup Icehowl
if (Creature* icehowl = instance->GetCreature(IcehowlGUID))
icehowl->DespawnOrUnsummon();
- if (data == DONE)
+ if (state == DONE)
EventStage = 2000;
break;
- case TYPE_CRUSADERS:
+ case BOSS_CRUSADERS:
// Cleanup Jaraxxus
if (Creature* jaraxxus = instance->GetCreature(JaraxxusGUID))
jaraxxus->DespawnOrUnsummon();
if (Creature* fizzlebang = instance->GetCreature(FizzlebangGUID))
fizzlebang->DespawnOrUnsummon();
- switch (data)
+ switch (state)
{
case IN_PROGRESS:
ResilienceWillFixItTimer = 0;
break;
case SPECIAL: //Means the first blood
ResilienceWillFixItTimer = 60*IN_MILLISECONDS;
- data = IN_PROGRESS;
+ state = IN_PROGRESS;
break;
case DONE:
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_DEFEAT_FACTION_CHAMPIONS);
@@ -272,21 +265,23 @@ class instance_trial_of_the_crusader : public InstanceMapScript
DoRespawnGameObject(CrusadersCacheGUID, 7*DAY);
EventStage = 3100;
break;
+ default:
+ break;
}
break;
- case TYPE_VALKIRIES:
+ case BOSS_VALKIRIES:
// Cleanup chest
if (GameObject* cache = instance->GetGameObject(CrusadersCacheGUID))
cache->Delete();
- switch (data)
+ switch (state)
{
case FAIL:
- if (EncounterStatus[TYPE_VALKIRIES] == NOT_STARTED)
- data = NOT_STARTED;
+ if (GetBossState(BOSS_VALKIRIES) == NOT_STARTED)
+ state = NOT_STARTED;
break;
case SPECIAL:
- if (EncounterStatus[TYPE_VALKIRIES] == SPECIAL)
- data = DONE;
+ if (GetBossState(BOSS_VALKIRIES) == SPECIAL)
+ state = DONE;
break;
case DONE:
if (instance->GetPlayers().getFirst()->getSource()->GetTeam() == ALLIANCE)
@@ -294,50 +289,122 @@ class instance_trial_of_the_crusader : public InstanceMapScript
else
EventStage = 4030;
break;
+ default:
+ break;
}
break;
- case TYPE_ANUBARAK:
- switch (data)
+ case BOSS_LICH_KING:
+ break;
+ case BOSS_ANUBARAK:
+ switch (state)
{
case DONE:
+ {
EventStage = 6000;
- break;
- case SPECIAL:
uint32 tributeChest = 0;
if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
{
if (TrialCounter >= 50)
tributeChest = GO_TRIBUTE_CHEST_10H_99;
else
+ {
if (TrialCounter >= 45)
tributeChest = GO_TRIBUTE_CHEST_10H_50;
else
+ {
if (TrialCounter >= 25)
tributeChest = GO_TRIBUTE_CHEST_10H_45;
else
tributeChest = GO_TRIBUTE_CHEST_10H_25;
+ }
+ }
}
else if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
{
if (TrialCounter >= 50)
tributeChest = GO_TRIBUTE_CHEST_25H_99;
else
+ {
if (TrialCounter >= 45)
tributeChest = GO_TRIBUTE_CHEST_25H_50;
else
+ {
if (TrialCounter >= 25)
tributeChest = GO_TRIBUTE_CHEST_25H_45;
else
tributeChest = GO_TRIBUTE_CHEST_25H_25;
+ }
+ }
}
+
if (tributeChest)
if (Creature* tirion = instance->GetCreature(TirionGUID))
- // need proper location.this one is guessed based on videos
- if (GameObject* chest = tirion->SummonGameObject(tributeChest, 643.814f, 136.027f, 141.295f, 0, 0, 0, 0, 0, 90000000))
+ if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, WEEK))
chest->SetRespawnTime(chest->GetRespawnDelay());
break;
+ }
+ default:
+ break;
}
break;
+ default:
+ break;
+ }
+
+ if (IsEncounterInProgress())
+ {
+ CloseDoor(GetData64(GO_EAST_PORTCULLIS));
+ CloseDoor(GetData64(GO_WEB_DOOR));
+ }
+ else
+ {
+ OpenDoor(GetData64(GO_EAST_PORTCULLIS));
+ OpenDoor(GetData64(GO_WEB_DOOR));
+ }
+
+ if (type < MAX_ENCOUNTERS)
+ {
+ sLog->outInfo(LOG_FILTER_TSCR, "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
+ if (state == FAIL)
+ {
+ if (instance->IsHeroic())
+ {
+ --TrialCounter;
+ // decrease attempt counter at wipe
+ Map::PlayerList const &PlayerList = instance->GetPlayers();
+ for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
+ if (Player* player = itr->getSource())
+ player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, TrialCounter);
+
+ // if theres no more attemps allowed
+ if (!TrialCounter)
+ {
+ if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
+ announcer->ToCreature()->DespawnOrUnsummon();
+
+ if (Creature* anubArak = instance->GetCreature(GetData64(NPC_ANUBARAK)))
+ anubArak->DespawnOrUnsummon();
+ }
+ }
+ NeedSave = true;
+ EventStage = (type == BOSS_BEASTS ? 666 : 0);
+ state = NOT_STARTED;
+ }
+
+ if (state == DONE || NeedSave)
+ {
+ if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
+ announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ Save();
+ }
+ }
+ return true;
+ }
+
+ void SetData(uint32 type, uint32 data)
+ {
+ switch (type)
+ {
case TYPE_COUNTER:
TrialCounter = data;
data = DONE;
@@ -357,7 +424,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case GORMOK_DONE:
EventStage = 200;
SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS);
- SetData(TYPE_BEASTS, IN_PROGRESS);
break;
case SNAKES_IN_PROGRESS:
NotOneButTwoJormungarsTimer = 0;
@@ -370,15 +436,16 @@ class instance_trial_of_the_crusader : public InstanceMapScript
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_WORMS_KILLED_IN_10_SECONDS);
EventStage = 300;
SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS);
- SetData(TYPE_BEASTS, IN_PROGRESS);
break;
case ICEHOWL_DONE:
EventStage = 400;
SetData(TYPE_NORTHREND_BEASTS, DONE);
- SetData(TYPE_BEASTS, DONE);
+ SetBossState(BOSS_BEASTS, DONE);
break;
case FAIL:
- SetData(TYPE_BEASTS, FAIL);
+ SetBossState(BOSS_BEASTS, FAIL);
+ break;
+ default:
break;
}
break;
@@ -398,37 +465,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE:
TributeToImmortalityElegible = false;
break;
- }
- if (IsEncounterInProgress())
- {
- CloseDoor(GetData64(GO_EAST_PORTCULLIS));
- CloseDoor(GetData64(GO_WEB_DOOR));
- }
- else
- {
- OpenDoor(GetData64(GO_EAST_PORTCULLIS));
- OpenDoor(GetData64(GO_WEB_DOOR));
- }
-
- if (type < MAX_ENCOUNTERS)
- {
- sLog->outInfo(LOG_FILTER_TSCR, "[ToCr] EncounterStatus[type %u] %u = data %u;", type, EncounterStatus[type], data);
- if (data == FAIL)
- {
- --TrialCounter;
- NeedSave = true;
- EventStage = (type == TYPE_BEASTS ? 666 : 0);
- data = NOT_STARTED;
- }
-
- EncounterStatus[type] = data;
-
- if (data == DONE || NeedSave == true)
- {
- if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
- announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- Save();
- }
+ default:
+ break;
}
}
@@ -487,18 +525,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
switch (type)
{
- case TYPE_BEASTS:
- return EncounterStatus[TYPE_BEASTS];
- case TYPE_JARAXXUS:
- return EncounterStatus[TYPE_JARAXXUS];
- case TYPE_CRUSADERS:
- return EncounterStatus[TYPE_CRUSADERS];
- case TYPE_VALKIRIES:
- return EncounterStatus[TYPE_VALKIRIES];
- case TYPE_LICH_KING:
- return EncounterStatus[TYPE_LICH_KING];
- case TYPE_ANUBARAK:
- return EncounterStatus[TYPE_ANUBARAK];
case TYPE_COUNTER:
return TrialCounter;
case TYPE_EVENT:
@@ -612,7 +638,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
NotOneButTwoJormungarsTimer -= diff;
}
- if (GetData(TYPE_CRUSADERS) == IN_PROGRESS && ResilienceWillFixItTimer)
+ if (GetBossState(BOSS_CRUSADERS) == SPECIAL && ResilienceWillFixItTimer)
{
if (ResilienceWillFixItTimer <= diff)
ResilienceWillFixItTimer = 0;
@@ -628,7 +654,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
std::ostringstream saveStream;
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
- saveStream << EncounterStatus[i] << ' ';
+ saveStream << GetBossState(i) << ' ';
saveStream << TrialCounter;
SaveDataBuffer = saveStream.str();
@@ -657,10 +683,11 @@ class instance_trial_of_the_crusader : public InstanceMapScript
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
{
- loadStream >> EncounterStatus[i];
-
- if (EncounterStatus[i] == IN_PROGRESS)
- EncounterStatus[i] = NOT_STARTED;
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
}
loadStream >> TrialCounter;
@@ -699,10 +726,52 @@ class instance_trial_of_the_crusader : public InstanceMapScript
return TrialCounter == 50 && TributeToImmortalityElegible;
case A_TRIBUTE_TO_DEDICATED_INSANITY:
return false/*uiGrandCrusaderAttemptsLeft == 50 && !bHasAtAnyStagePlayerEquippedTooGoodItem*/;
+ default:
+ break;
}
return false;
}
+
+ protected:
+ uint32 TrialCounter;
+ uint32 EventStage;
+ uint32 EventTimer;
+ uint32 EventNPCId;
+ uint32 NorthrendBeasts;
+ bool NeedSave;
+ std::string SaveDataBuffer;
+
+ uint64 BarrentGUID;
+ uint64 TirionGUID;
+ uint64 TirionFordringGUID;
+ uint64 FizzlebangGUID;
+ uint64 GarroshGUID;
+ uint64 VarianGUID;
+
+ uint64 GormokGUID;
+ uint64 AcidmawGUID;
+ uint64 DreadscaleGUID;
+ uint64 IcehowlGUID;
+ uint64 JaraxxusGUID;
+ uint64 ChampionsControllerGUID;
+ uint64 DarkbaneGUID;
+ uint64 LightbaneGUID;
+ uint64 AnubarakGUID;
+
+ uint64 CrusadersCacheGUID;
+ uint64 FloorGUID;
+ uint64 TributeChestGUID;
+ uint64 MainGateDoorGUID;
+ uint64 EastPortcullisGUID;
+ uint64 WebDoorGUID;
+
+ // Achievement stuff
+ uint32 NotOneButTwoJormungarsTimer;
+ uint32 ResilienceWillFixItTimer;
+ uint8 SnoboldCount;
+ uint8 MistressOfPainCount;
+ bool TributeToImmortalityElegible;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index 0476b2cbacb..b4d35afa8fb 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Trial Of the crusader
-SD%Complete: ??%
-SDComment: event script based on /dev/rsa
-SDCategory: trial_of_the_crusader
-EndScriptData */
-
//Known Bugs:
// - Need better implementation of Gossip and correct gossip text and option
@@ -30,6 +23,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "trial_of_the_crusader.h"
+#include "Player.h"
enum eYells
{
@@ -84,7 +78,7 @@ enum eYells
// Highlord Tirion Fordring - 36095
SAY_STAGE_4_06 = 0,
- SAY_STAGE_4_07 = 1,
+ SAY_STAGE_4_07 = 1
};
struct _Messages
@@ -97,23 +91,22 @@ struct _Messages
static _Messages _GossipMessage[]=
{
- {MSG_BEASTS, GOSSIP_ACTION_INFO_DEF+1, false, TYPE_BEASTS},
- {MSG_JARAXXUS, GOSSIP_ACTION_INFO_DEF+2, false, TYPE_JARAXXUS},
- {MSG_CRUSADERS, GOSSIP_ACTION_INFO_DEF+3, false, TYPE_CRUSADERS},
- {MSG_VALKIRIES, GOSSIP_ACTION_INFO_DEF+4, false, TYPE_VALKIRIES},
- {MSG_LICH_KING, GOSSIP_ACTION_INFO_DEF+5, false, TYPE_ANUBARAK},
- {MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF+6, true, TYPE_ANUBARAK}
+ {MSG_BEASTS, GOSSIP_ACTION_INFO_DEF + 1, false, BOSS_BEASTS},
+ {MSG_JARAXXUS, GOSSIP_ACTION_INFO_DEF + 2, false, BOSS_JARAXXUS},
+ {MSG_CRUSADERS, GOSSIP_ACTION_INFO_DEF + 3, false, BOSS_CRUSADERS},
+ {MSG_VALKIRIES, GOSSIP_ACTION_INFO_DEF + 4, false, BOSS_VALKIRIES},
+ {MSG_LICH_KING, GOSSIP_ACTION_INFO_DEF + 5, false, BOSS_ANUBARAK},
+ {MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF + 6, true, BOSS_ANUBARAK}
};
enum
{
- NUM_MESSAGES = 6,
+ NUM_MESSAGES = 6
};
class npc_announcer_toc10 : public CreatureScript
{
public:
-
npc_announcer_toc10() : CreatureScript("npc_announcer_toc10") { }
struct npc_announcer_toc10AI : public ScriptedAI
@@ -136,20 +129,20 @@ class npc_announcer_toc10 : public CreatureScript
bool OnGossipHello(Player* player, Creature* creature)
{
- InstanceScript* instanceScript = creature->GetInstanceScript();
- if (!instanceScript)
+ InstanceScript* instance = creature->GetInstanceScript();
+ if (!instance)
return true;
char const* _message = "We are ready!";
- if (player->isInCombat() || instanceScript->IsEncounterInProgress() || instanceScript->GetData(TYPE_EVENT))
+ if (player->isInCombat() || instance->IsEncounterInProgress() || instance->GetData(TYPE_EVENT))
return true;
uint8 i = 0;
for (; i < NUM_MESSAGES; ++i)
{
- if ((!_GossipMessage[i].state && instanceScript->GetData(_GossipMessage[i].encounter) != DONE)
- || (_GossipMessage[i].state && instanceScript->GetData(_GossipMessage[i].encounter) == DONE))
+ if ((!_GossipMessage[i].state && instance->GetBossState(_GossipMessage[i].encounter) != DONE)
+ || (_GossipMessage[i].state && instance->GetBossState(_GossipMessage[i].encounter) == DONE))
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message, GOSSIP_SENDER_MAIN, _GossipMessage[i].id);
break;
@@ -160,75 +153,65 @@ class npc_announcer_toc10 : public CreatureScript
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/)
{
player->PlayerTalkClass->ClearMenus();
player->CLOSE_GOSSIP_MENU();
- InstanceScript* instanceScript = creature->GetInstanceScript();
- if (!instanceScript)
+ InstanceScript* instance = creature->GetInstanceScript();
+ if (!instance)
return true;
- switch (action)
+ if (instance->GetBossState(BOSS_BEASTS) != DONE)
{
- case GOSSIP_ACTION_INFO_DEF+1:
- if (instanceScript->GetData(TYPE_BEASTS) != DONE)
- {
- instanceScript->SetData(TYPE_EVENT, 110);
- instanceScript->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED);
- instanceScript->SetData(TYPE_BEASTS, NOT_STARTED);
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- if (Creature* jaraxxus = Unit::GetCreature(*player, instanceScript->GetData64(NPC_JARAXXUS)))
- {
- jaraxxus->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS);
- jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- jaraxxus->SetReactState(REACT_AGGRESSIVE);
- jaraxxus->SetInCombatWithZone();
- }
- else if (instanceScript->GetData(TYPE_JARAXXUS) != DONE)
- {
- instanceScript->SetData(TYPE_EVENT, 1010);
- instanceScript->SetData(TYPE_JARAXXUS, NOT_STARTED);
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+3:
- if (instanceScript->GetData(TYPE_CRUSADERS) != DONE)
- {
- if (player->GetTeam() == ALLIANCE)
- instanceScript->SetData(TYPE_EVENT, 3000);
- else
- instanceScript->SetData(TYPE_EVENT, 3001);
- instanceScript->SetData(TYPE_CRUSADERS, NOT_STARTED);
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+4:
- if (instanceScript->GetData(TYPE_VALKIRIES) != DONE)
- {
- instanceScript->SetData(TYPE_EVENT, 4000);
- instanceScript->SetData(TYPE_VALKIRIES, NOT_STARTED);
- }
- break;
- case GOSSIP_ACTION_INFO_DEF+5:
+ instance->SetData(TYPE_EVENT, 110);
+ instance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED);
+ instance->SetBossState(BOSS_BEASTS, NOT_STARTED);
+ }
+ else if (instance->GetBossState(BOSS_JARAXXUS) != DONE)
+ {
+ // if Jaraxxus is spawned, but the raid wiped
+ if (Creature* jaraxxus = Unit::GetCreature(*player, instance->GetData64(NPC_JARAXXUS)))
{
- if (instanceScript->GetData(TYPE_LICH_KING) != DONE && !player->isGameMaster())
- return true;
-
- if (GameObject* floor = GameObject::GetGameObject(*player, instanceScript->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
- floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
+ jaraxxus->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS);
+ jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ jaraxxus->SetReactState(REACT_DEFENSIVE);
+ jaraxxus->SetInCombatWithZone();
+ }
+ else
+ {
+ instance->SetData(TYPE_EVENT, 1010);
+ instance->SetBossState(BOSS_JARAXXUS, NOT_STARTED);
+ }
+ }
+ else if (instance->GetBossState(BOSS_CRUSADERS) != DONE)
+ {
+ if (player->GetTeam() == ALLIANCE)
+ instance->SetData(TYPE_EVENT, 3000);
+ else
+ instance->SetData(TYPE_EVENT, 3001);
+ instance->SetBossState(BOSS_CRUSADERS, NOT_STARTED);
+ }
+ else if (instance->GetBossState(BOSS_VALKIRIES) != DONE)
+ {
+ instance->SetData(TYPE_EVENT, 4000);
+ instance->SetBossState(BOSS_VALKIRIES, NOT_STARTED);
+ }
+ else if (instance->GetBossState(BOSS_LICH_KING) != DONE)
+ {
+ if (GameObject* floor = GameObject::GetGameObject(*player, instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
+ floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
- creature->CastSpell(creature, 69016, false);
+ creature->CastSpell(creature, SPELL_CORPSE_TELEPORT, false);
+ creature->CastSpell(creature, SPELL_DESTROY_FLOOR_KNOCKUP, false);
- Creature* anubArak = Unit::GetCreature(*creature, instanceScript->GetData64(NPC_ANUBARAK));
- if (!anubArak || !anubArak->isAlive())
- anubArak = creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
+ Creature* anubArak = Unit::GetCreature(*creature, instance->GetData64(NPC_ANUBARAK));
+ if (!anubArak || !anubArak->isAlive())
+ anubArak = creature->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
- instanceScript->SetData(TYPE_ANUBARAK, NOT_STARTED);
+ instance->SetBossState(BOSS_ANUBARAK, NOT_STARTED);
- if (creature->IsVisible())
- creature->SetVisible(false);
- break;
- }
+ if (creature->IsVisible())
+ creature->SetVisible(false);
}
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
return true;
@@ -243,112 +226,130 @@ class npc_announcer_toc10 : public CreatureScript
class boss_lich_king_toc : public CreatureScript
{
public:
-
boss_lich_king_toc() : CreatureScript("boss_lich_king_toc") { }
struct boss_lich_king_tocAI : public ScriptedAI
{
boss_lich_king_tocAI(Creature* creature) : ScriptedAI(creature)
{
- instance = creature->GetInstanceScript();
+ _instance = creature->GetInstanceScript();
}
- InstanceScript* instance;
- uint32 m_uiUpdateTimer;
-
void Reset()
{
- m_uiUpdateTimer = 0;
+ _updateTimer = 0;
me->SetReactState(REACT_PASSIVE);
- if (Creature* summoned = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5, TEMPSUMMON_TIMED_DESPAWN, 60000))
+ if (Creature* summoned = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5, TEMPSUMMON_TIMED_DESPAWN, 1*MINUTE*IN_MILLISECONDS))
{
summoned->CastSpell(summoned, 51807, false);
- summoned->SetDisplayId(11686);
+ summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid2);
}
- if (instance) instance->SetData(TYPE_LICH_KING, IN_PROGRESS);
+ if (_instance)
+ _instance->SetBossState(BOSS_LICH_KING, IN_PROGRESS);
me->SetWalk(true);
}
void MovementInform(uint32 uiType, uint32 uiId)
{
- if (uiType != POINT_MOTION_TYPE || !instance)
+ if (uiType != POINT_MOTION_TYPE || !_instance)
return;
+
switch (uiId)
{
case 0:
- instance->SetData(TYPE_EVENT, 5030);
+ _instance->SetData(TYPE_EVENT, 5030);
break;
case 1:
- instance->SetData(TYPE_EVENT, 5050);
+ _instance->SetData(TYPE_EVENT, 5050);
+ break;
+ default:
break;
}
}
void UpdateAI(const uint32 uiDiff)
{
- if (!instance)
+ if (!_instance)
return;
- if (instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1)
+ if (_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1)
return;
- m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
- if (m_uiUpdateTimer <= uiDiff)
+ _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
+ if (_updateTimer <= uiDiff)
{
- switch (instance->GetData(TYPE_EVENT))
+ switch (_instance->GetData(TYPE_EVENT))
{
case 5010:
Talk(SAY_STAGE_4_02);
- m_uiUpdateTimer = 3000;
+ _updateTimer = 3*IN_MILLISECONDS;
me->GetMotionMaster()->MovePoint(0, LichKingLoc[0]);
- instance->SetData(TYPE_EVENT, 5020);
+ _instance->SetData(TYPE_EVENT, 5020);
break;
case 5030:
Talk(SAY_STAGE_4_04);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
- m_uiUpdateTimer = 10000;
- instance->SetData(TYPE_EVENT, 5040);
+ _updateTimer = 10*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5040);
break;
case 5040:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
me->GetMotionMaster()->MovePoint(1, LichKingLoc[1]);
- m_uiUpdateTimer = 1000;
- instance->SetData(TYPE_EVENT, 0);
+ _updateTimer = 1*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 5050:
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 5060);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5060);
break;
case 5060:
Talk(SAY_STAGE_4_05);
me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
- m_uiUpdateTimer = 2500;
- instance->SetData(TYPE_EVENT, 5070);
+ _updateTimer = 2.5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5070);
break;
case 5070:
me->CastSpell(me, 68198, false);
- m_uiUpdateTimer = 1500;
- instance->SetData(TYPE_EVENT, 5080);
+ _updateTimer = 1.5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5080);
break;
case 5080:
- if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
- go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
- me->CastSpell(me, 69016, false);
- instance->SetData(TYPE_LICH_KING, DONE);
- Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_ANUBARAK));
- if (!temp || !temp->isAlive())
- temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
-
- instance->SetData(TYPE_EVENT, 0);
+ if (GameObject* go = _instance->instance->GetGameObject(_instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
+ {
+ go->SetDisplayId(DISPLAYID_DESTROYED_FLOOR);
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN);
+ go->SetGoState(GO_STATE_ACTIVE);
+ }
+
+ me->CastSpell(me, SPELL_CORPSE_TELEPORT, false);
+ me->CastSpell(me, SPELL_DESTROY_FLOOR_KNOCKUP, false);
+
+ if (_instance)
+ {
+ _instance->SetBossState(BOSS_LICH_KING, DONE);
+ Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_ANUBARAK));
+ if (!temp || !temp->isAlive())
+ temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
+
+ _instance->SetData(TYPE_EVENT, 0);
+ }
me->DespawnOrUnsummon();
- m_uiUpdateTimer = 20000;
+ _updateTimer = 20*IN_MILLISECONDS;
+ break;
+ default:
break;
}
- } else m_uiUpdateTimer -= uiDiff;
+ }
+ else
+ _updateTimer -= uiDiff;
- instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
+ _instance->SetData(TYPE_EVENT_TIMER, _updateTimer);
}
+
+ private:
+ InstanceScript* _instance;
+ uint32 _updateTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -360,27 +361,20 @@ class boss_lich_king_toc : public CreatureScript
class npc_fizzlebang_toc : public CreatureScript
{
public:
-
npc_fizzlebang_toc() : CreatureScript("npc_fizzlebang_toc") { }
struct npc_fizzlebang_tocAI : public ScriptedAI
{
- npc_fizzlebang_tocAI(Creature* creature) : ScriptedAI(creature), Summons(me)
+ npc_fizzlebang_tocAI(Creature* creature) : ScriptedAI(creature), _summons(me)
{
- instance = me->GetInstanceScript();
+ _instance = me->GetInstanceScript();
}
- InstanceScript* instance;
- SummonList Summons;
- uint32 m_uiUpdateTimer;
- uint64 m_uiPortalGUID;
- uint64 m_uiTriggerGUID;
-
void JustDied(Unit* killer)
{
Talk(SAY_STAGE_1_06, killer->GetGUID());
- instance->SetData(TYPE_EVENT, 1180);
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
+ _instance->SetData(TYPE_EVENT, 1180);
+ if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
temp->SetReactState(REACT_AGGRESSIVE);
@@ -391,7 +385,7 @@ class npc_fizzlebang_toc : public CreatureScript
void Reset()
{
me->SetWalk(true);
- m_uiPortalGUID = 0;
+ _portalGUID = 0;
me->GetMotionMaster()->MovePoint(1, ToCCommonLoc[10].GetPositionX(), ToCCommonLoc[10].GetPositionY()-60, ToCCommonLoc[10].GetPositionZ());
}
@@ -404,42 +398,44 @@ class npc_fizzlebang_toc : public CreatureScript
{
case 1:
me->SetWalk(false);
- if (instance)
+ if (_instance)
{
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- instance->SetData(TYPE_EVENT, 1120);
- instance->SetData(TYPE_EVENT_TIMER, 1000);
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
+ _instance->SetData(TYPE_EVENT, 1120);
+ _instance->SetData(TYPE_EVENT_TIMER, 1*IN_MILLISECONDS);
}
break;
+ default:
+ break;
}
}
void JustSummoned(Creature* summoned)
{
- Summons.Summon(summoned);
+ _summons.Summon(summoned);
}
void UpdateAI(const uint32 uiDiff)
{
- if (!instance)
+ if (!_instance)
return;
- if (instance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG)
+ if (_instance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG)
return;
- m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
- if (m_uiUpdateTimer <= uiDiff)
+ _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
+ if (_updateTimer <= uiDiff)
{
- switch (instance->GetData(TYPE_EVENT))
+ switch (_instance->GetData(TYPE_EVENT))
{
case 1110:
- instance->SetData(TYPE_EVENT, 1120);
- m_uiUpdateTimer = 4000;
+ _instance->SetData(TYPE_EVENT, 1120);
+ _updateTimer = 4*IN_MILLISECONDS;
break;
case 1120:
Talk(SAY_STAGE_1_02);
- instance->SetData(TYPE_EVENT, 1130);
- m_uiUpdateTimer = 12000;
+ _instance->SetData(TYPE_EVENT, 1130);
+ _updateTimer = 12*IN_MILLISECONDS;
break;
case 1130:
me->GetMotionMaster()->MovementExpired();
@@ -447,18 +443,18 @@ class npc_fizzlebang_toc : public CreatureScript
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI);
if (Unit* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN))
{
- m_uiTriggerGUID = pTrigger->GetGUID();
+ _triggerGUID = pTrigger->GetGUID();
pTrigger->SetObjectScale(2.0f);
- pTrigger->SetDisplayId(22862);
+ pTrigger->SetDisplayId(pTrigger->ToCreature()->GetCreatureTemplate()->Modelid1);
pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false);
}
- instance->SetData(TYPE_EVENT, 1132);
- m_uiUpdateTimer = 4000;
+ _instance->SetData(TYPE_EVENT, 1132);
+ _updateTimer = 4*IN_MILLISECONDS;
break;
case 1132:
me->GetMotionMaster()->MovementExpired();
- instance->SetData(TYPE_EVENT, 1134);
- m_uiUpdateTimer = 4000;
+ _instance->SetData(TYPE_EVENT, 1134);
+ _updateTimer = 4*IN_MILLISECONDS;
break;
case 1134:
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI);
@@ -467,14 +463,14 @@ class npc_fizzlebang_toc : public CreatureScript
pPortal->SetReactState(REACT_PASSIVE);
pPortal->SetObjectScale(2.0f);
pPortal->CastSpell(pPortal, SPELL_WILFRED_PORTAL, false);
- m_uiPortalGUID = pPortal->GetGUID();
+ _portalGUID = pPortal->GetGUID();
}
- m_uiUpdateTimer = 4000;
- instance->SetData(TYPE_EVENT, 1135);
+ _updateTimer = 4*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 1135);
break;
case 1135:
- instance->SetData(TYPE_EVENT, 1140);
- m_uiUpdateTimer = 3000;
+ _instance->SetData(TYPE_EVENT, 1140);
+ _updateTimer = 3*IN_MILLISECONDS;
break;
case 1140:
Talk(SAY_STAGE_1_04);
@@ -484,27 +480,27 @@ class npc_fizzlebang_toc : public CreatureScript
temp->SetReactState(REACT_PASSIVE);
temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()-10, ToCCommonLoc[1].GetPositionZ());
}
- instance->SetData(TYPE_EVENT, 1142);
- m_uiUpdateTimer = 5000;
+ _instance->SetData(TYPE_EVENT, 1142);
+ _updateTimer = 5*IN_MILLISECONDS;
break;
case 1142:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
temp->SetTarget(me->GetGUID());
- if (Creature* pTrigger = Unit::GetCreature(*me, m_uiTriggerGUID))
+ if (Creature* pTrigger = Unit::GetCreature(*me, _triggerGUID))
pTrigger->DespawnOrUnsummon();
- if (Creature* pPortal = Unit::GetCreature(*me, m_uiPortalGUID))
+ if (Creature* pPortal = Unit::GetCreature(*me, _portalGUID))
pPortal->DespawnOrUnsummon();
- instance->SetData(TYPE_EVENT, 1144);
- m_uiUpdateTimer = 10000;
+ _instance->SetData(TYPE_EVENT, 1144);
+ _updateTimer = 10*IN_MILLISECONDS;
break;
case 1144:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
temp->AI()->Talk(SAY_STAGE_1_05);
- instance->SetData(TYPE_EVENT, 1150);
- m_uiUpdateTimer = 5000;
+ _instance->SetData(TYPE_EVENT, 1150);
+ _updateTimer = 5*IN_MILLISECONDS;
break;
case 1150:
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_JARAXXUS)))
+ if (Creature* temp = Unit::GetCreature(*me, _instance->GetData64(NPC_JARAXXUS)))
{
//1-shot Fizzlebang
temp->CastSpell(me, 67888, false);
@@ -512,13 +508,22 @@ class npc_fizzlebang_toc : public CreatureScript
temp->AddThreat(me, 1000.0f);
temp->AI()->AttackStart(me);
}
- instance->SetData(TYPE_EVENT, 1160);
- m_uiUpdateTimer = 3000;
+ _instance->SetData(TYPE_EVENT, 1160);
+ _updateTimer = 3*IN_MILLISECONDS;
break;
}
- } else m_uiUpdateTimer -= uiDiff;
- instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
+ }
+ else
+ _updateTimer -= uiDiff;
+ _instance->SetData(TYPE_EVENT_TIMER, _updateTimer);
}
+
+ private:
+ InstanceScript* _instance;
+ SummonList _summons;
+ uint32 _updateTimer;
+ uint64 _portalGUID;
+ uint64 _triggerGUID;
};
CreatureAI* GetAI(Creature* creature) const
@@ -530,53 +535,49 @@ class npc_fizzlebang_toc : public CreatureScript
class npc_tirion_toc : public CreatureScript
{
public:
-
npc_tirion_toc() : CreatureScript("npc_tirion_toc") { }
struct npc_tirion_tocAI : public ScriptedAI
{
npc_tirion_tocAI(Creature* creature) : ScriptedAI(creature)
{
- instance = me->GetInstanceScript();
+ _instance = me->GetInstanceScript();
}
- InstanceScript* instance;
- uint32 m_uiUpdateTimer;
-
void Reset() {}
void AttackStart(Unit* /*who*/) {}
void UpdateAI(const uint32 uiDiff)
{
- if (!instance)
+ if (!_instance)
return;
- if (instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION)
+ if (_instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION)
return;
- m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
- if (m_uiUpdateTimer <= uiDiff)
+ _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
+ if (_updateTimer <= uiDiff)
{
- switch (instance->GetData(TYPE_EVENT))
+ switch (_instance->GetData(TYPE_EVENT))
{
case 110:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
Talk(SAY_STAGE_0_01);
- m_uiUpdateTimer = 22000;
- instance->SetData(TYPE_EVENT, 120);
+ _updateTimer = 22*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 120);
break;
case 140:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
Talk(SAY_STAGE_0_02);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 150);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 150);
break;
case 150:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
- if (instance->GetData(TYPE_BEASTS) != DONE)
+ if (_instance->GetBossState(BOSS_BEASTS) != DONE)
{
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
if (Creature* temp = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS))
{
@@ -585,154 +586,133 @@ class npc_tirion_toc : public CreatureScript
temp->SetReactState(REACT_PASSIVE);
}
}
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 155);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 155);
break;
case 155:
- instance->SetData(TYPE_BEASTS, IN_PROGRESS);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 160);
+ // keep the raid in combat for the whole encounter, pauses included
+ me->SetInCombatWithZone();
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 160);
break;
case 200:
Talk(SAY_STAGE_0_04);
- m_uiUpdateTimer = 8000;
- instance->SetData(TYPE_EVENT, 205);
- break;
- case 205:
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 210);
- break;
- case 210:
- if (instance->GetData(TYPE_BEASTS) != DONE)
+ if (_instance->GetBossState(BOSS_BEASTS) != DONE)
{
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
if (Creature* temp = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
{
- temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- temp->SetReactState(REACT_PASSIVE);
- }
- if (Creature* temp = me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
- {
- temp->SetVisible(true);
+ temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
temp->SetReactState(REACT_PASSIVE);
}
}
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 220);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 220);
break;
case 220:
- instance->SetData(TYPE_EVENT, 230);
+ _instance->SetData(TYPE_EVENT, 230);
break;
case 300:
Talk(SAY_STAGE_0_05);
- m_uiUpdateTimer = 8000;
- instance->SetData(TYPE_EVENT, 305);
- break;
- case 305:
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 310);
- break;
- case 310:
- if (instance->GetData(TYPE_BEASTS) != DONE)
+ if (_instance->GetBossState(BOSS_BEASTS) != DONE)
{
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
if (Creature* temp = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN))
{
temp->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
-
}
}
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 315);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 315);
break;
case 315:
- instance->SetData(TYPE_EVENT, 320);
+ _instance->SetData(TYPE_EVENT, 320);
break;
case 400:
Talk(SAY_STAGE_0_06);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 0);
+ me->getThreatManager().clearReferences();
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 666:
Talk(SAY_STAGE_0_WIPE);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 0);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 1010:
Talk(SAY_STAGE_1_01);
- m_uiUpdateTimer = 7000;
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
+ _updateTimer = 7*IN_MILLISECONDS;
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
me->SummonCreature(NPC_FIZZLEBANG, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
- instance->SetData(TYPE_EVENT, 0);
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 1180:
Talk(SAY_STAGE_1_07);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 0);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 2000:
Talk(SAY_STAGE_1_08);
- m_uiUpdateTimer = 18000;
- instance->SetData(TYPE_EVENT, 2010);
+ _updateTimer = 18*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 2010);
break;
case 2030:
Talk(SAY_STAGE_1_11);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 0);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 3000:
Talk(SAY_STAGE_2_01);
- m_uiUpdateTimer = 12000;
- instance->SetData(TYPE_EVENT, 3050);
+ _updateTimer = 12*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3050);
break;
case 3001:
Talk(SAY_STAGE_2_01);
- m_uiUpdateTimer = 12000;
- instance->SetData(TYPE_EVENT, 3051);
+ _updateTimer = 10*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3051);
break;
case 3060:
Talk(SAY_STAGE_2_03);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 3070);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3070);
break;
case 3061:
Talk(SAY_STAGE_2_03);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 3071);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3071);
break;
//Summoning crusaders
case 3091:
if (Creature* pChampionController = me->SummonCreature(NPC_CHAMPIONS_CONTROLLER, ToCCommonLoc[1]))
pChampionController->AI()->SetData(0, HORDE);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 3092);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3092);
break;
//Summoning crusaders
case 3090:
if (Creature* pChampionController = me->SummonCreature(NPC_CHAMPIONS_CONTROLLER, ToCCommonLoc[1]))
pChampionController->AI()->SetData(0, ALLIANCE);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 3092);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3092);
break;
case 3092:
- if (Creature* pChampionController = Unit::GetCreature((*me), instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
+ if (Creature* pChampionController = Unit::GetCreature((*me), _instance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(1, NOT_STARTED);
- instance->SetData(TYPE_EVENT, 3095);
+ _instance->SetData(TYPE_EVENT, 3095);
break;
//Crusaders battle end
case 3100:
Talk(SAY_STAGE_2_06);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 0);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 4000:
Talk(SAY_STAGE_3_01);
- m_uiUpdateTimer = 13000;
- instance->SetData(TYPE_EVENT, 4010);
+ _updateTimer = 13*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 4010);
break;
case 4010:
Talk(SAY_STAGE_3_02);
@@ -750,78 +730,88 @@ class npc_tirion_toc : public CreatureScript
temp->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[2].GetPositionX(), TwinValkyrsLoc[2].GetPositionY(), TwinValkyrsLoc[2].GetPositionZ());
temp->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[3].GetPositionX(), TwinValkyrsLoc[3].GetPositionY(), TwinValkyrsLoc[3].GetPositionZ());
}
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 4015);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 4015);
break;
case 4015:
- instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
- if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(NPC_LIGHTBANE)))
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
+ if (Creature* temp = Unit::GetCreature((*me), _instance->GetData64(NPC_LIGHTBANE)))
{
temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
temp->SetVisible(true);
}
- if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(NPC_DARKBANE)))
+ if (Creature* temp = Unit::GetCreature((*me), _instance->GetData64(NPC_DARKBANE)))
{
temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ());
temp->SetVisible(true);
}
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 4016);
+ _updateTimer = 10*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 4016);
break;
case 4016:
- instance->SetData(TYPE_EVENT, 4017);
+ _instance->DoUseDoorOrButton(_instance->GetData64(GO_MAIN_GATE_DOOR));
+ _instance->SetData(TYPE_EVENT, 4017);
break;
case 4040:
- m_uiUpdateTimer = 60000;
- instance->SetData(TYPE_EVENT, 5000);
+ _updateTimer = 1*MINUTE*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5000);
break;
case 5000:
Talk(SAY_STAGE_4_01);
- m_uiUpdateTimer = 10000;
- instance->SetData(TYPE_EVENT, 5005);
+ _updateTimer = 10*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5005);
break;
case 5005:
- m_uiUpdateTimer = 8000;
- instance->SetData(TYPE_EVENT, 5010);
+ _updateTimer = 8*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 5010);
me->SummonCreature(NPC_LICH_KING_1, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5);
break;
case 5020:
Talk(SAY_STAGE_4_03);
- m_uiUpdateTimer = 1000;
- instance->SetData(TYPE_EVENT, 0);
+ _updateTimer = 1*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 0);
break;
case 6000:
me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0].GetPositionX(), EndSpawnLoc[0].GetPositionY(), EndSpawnLoc[0].GetPositionZ());
me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1].GetPositionX(), EndSpawnLoc[1].GetPositionY(), EndSpawnLoc[1].GetPositionZ());
me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2].GetPositionX(), EndSpawnLoc[2].GetPositionY(), EndSpawnLoc[2].GetPositionZ(), 5, 0, 0, 0, 0, 0);
- m_uiUpdateTimer = 20000;
- instance->SetData(TYPE_EVENT, 6005);
+ _updateTimer = 20*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 6005);
break;
case 6005:
- if (Creature* tirionFordring = Unit::GetCreature((*me), instance->GetData64(NPC_TIRION_FORDRING)))
+ if (Creature* tirionFordring = Unit::GetCreature((*me), _instance->GetData64(NPC_TIRION_FORDRING)))
tirionFordring->AI()->Talk(SAY_STAGE_4_06);
- m_uiUpdateTimer = 20000;
- instance->SetData(TYPE_EVENT, 6010);
+ _updateTimer = 20*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 6010);
break;
case 6010:
if (IsHeroic())
{
- if (Creature* tirionFordring = Unit::GetCreature((*me), instance->GetData64(NPC_TIRION_FORDRING)))
+ if (Creature* tirionFordring = Unit::GetCreature((*me), _instance->GetData64(NPC_TIRION_FORDRING)))
tirionFordring->AI()->Talk(SAY_STAGE_4_07);
- m_uiUpdateTimer = 60000;
- instance->SetData(TYPE_ANUBARAK, SPECIAL);
- instance->SetData(TYPE_EVENT, 6020);
- } else instance->SetData(TYPE_EVENT, 6030);
+ _updateTimer = 1*MINUTE*IN_MILLISECONDS;
+ _instance->SetBossState(BOSS_ANUBARAK, SPECIAL);
+ _instance->SetData(TYPE_EVENT, 6020);
+ }
+ else
+ _instance->SetData(TYPE_EVENT, 6030);
break;
case 6020:
me->DespawnOrUnsummon();
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 6030);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 6030);
+ break;
+ default:
break;
}
- } else m_uiUpdateTimer -= uiDiff;
- instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
+ }
+ else
+ _updateTimer -= uiDiff;
+ _instance->SetData(TYPE_EVENT_TIMER, _updateTimer);
}
+ private:
+ InstanceScript* _instance;
+ uint32 _updateTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -833,76 +823,79 @@ class npc_tirion_toc : public CreatureScript
class npc_garrosh_toc : public CreatureScript
{
public:
-
npc_garrosh_toc() : CreatureScript("npc_garrosh_toc") { }
struct npc_garrosh_tocAI : public ScriptedAI
{
npc_garrosh_tocAI(Creature* creature) : ScriptedAI(creature)
{
- instance = me->GetInstanceScript();
+ _instance = me->GetInstanceScript();
}
- InstanceScript* instance;
- uint32 m_uiUpdateTimer;
-
void Reset() {}
void AttackStart(Unit* /*who*/) {}
void UpdateAI(const uint32 uiDiff)
{
- if (!instance)
+ if (!_instance)
return;
- if (instance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH)
+ if (_instance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH)
return;
- m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
- if (m_uiUpdateTimer <= uiDiff)
+ _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
+ if (_updateTimer <= uiDiff)
{
- switch (instance->GetData(TYPE_EVENT))
+ switch (_instance->GetData(TYPE_EVENT))
{
case 130:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
Talk(SAY_STAGE_0_03h);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 132);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 132);
break;
case 132:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 140);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 140);
break;
case 2010:
Talk(SAY_STAGE_1_09);
- m_uiUpdateTimer = 9000;
- instance->SetData(TYPE_EVENT, 2020);
+ _updateTimer = 9*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 2020);
break;
case 3050:
Talk(SAY_STAGE_2_02h);
- m_uiUpdateTimer = 15000;
- instance->SetData(TYPE_EVENT, 3060);
+ _updateTimer = 15*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3060);
break;
case 3070:
Talk(SAY_STAGE_2_04h);
- m_uiUpdateTimer = 6000;
- instance->SetData(TYPE_EVENT, 3080);
+ _updateTimer = 6*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3080);
break;
case 3081:
Talk(SAY_STAGE_2_05h);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 3091);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3091);
break;
case 4030:
Talk(SAY_STAGE_3_03h);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 4040);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 4040);
+ break;
+ default:
break;
}
- } else m_uiUpdateTimer -= uiDiff;
- instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
+ }
+ else
+ _updateTimer -= uiDiff;
+ _instance->SetData(TYPE_EVENT_TIMER, _updateTimer);
}
+ private:
+ InstanceScript* _instance;
+ uint32 _updateTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -914,76 +907,79 @@ class npc_garrosh_toc : public CreatureScript
class npc_varian_toc : public CreatureScript
{
public:
-
npc_varian_toc() : CreatureScript("npc_varian_toc") { }
struct npc_varian_tocAI : public ScriptedAI
{
npc_varian_tocAI(Creature* creature) : ScriptedAI(creature)
{
- instance = me->GetInstanceScript();
+ _instance = me->GetInstanceScript();
}
- InstanceScript* instance;
- uint32 m_uiUpdateTimer;
-
void Reset() {}
void AttackStart(Unit* /*who*/) {}
void UpdateAI(const uint32 uiDiff)
{
- if (!instance)
+ if (!_instance)
return;
- if (instance->GetData(TYPE_EVENT_NPC) != NPC_VARIAN)
+ if (_instance->GetData(TYPE_EVENT_NPC) != NPC_VARIAN)
return;
- m_uiUpdateTimer = instance->GetData(TYPE_EVENT_TIMER);
- if (m_uiUpdateTimer <= uiDiff)
+ _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
+ if (_updateTimer <= uiDiff)
{
- switch (instance->GetData(TYPE_EVENT))
+ switch (_instance->GetData(TYPE_EVENT))
{
case 120:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK);
Talk(SAY_STAGE_0_03a);
- m_uiUpdateTimer = 2000;
- instance->SetData(TYPE_EVENT, 122);
+ _updateTimer = 2*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 122);
break;
case 122:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 130);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 130);
break;
case 2020:
Talk(SAY_STAGE_1_10);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 2030);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 2030);
break;
case 3051:
Talk(SAY_STAGE_2_02a);
- m_uiUpdateTimer = 10000;
- instance->SetData(TYPE_EVENT, 3061);
+ _updateTimer = 17*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3061);
break;
case 3071:
Talk(SAY_STAGE_2_04a);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 3081);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3081);
break;
case 3080:
Talk(SAY_STAGE_2_05a);
- m_uiUpdateTimer = 3000;
- instance->SetData(TYPE_EVENT, 3090);
+ _updateTimer = 3*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 3090);
break;
case 4020:
Talk(SAY_STAGE_3_03a);
- m_uiUpdateTimer = 5000;
- instance->SetData(TYPE_EVENT, 4040);
+ _updateTimer = 5*IN_MILLISECONDS;
+ _instance->SetData(TYPE_EVENT, 4040);
+ break;
+ default:
break;
}
- } else m_uiUpdateTimer -= uiDiff;
- instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
+ }
+ else
+ _updateTimer -= uiDiff;
+ _instance->SetData(TYPE_EVENT_TIMER, _updateTimer);
}
+ private:
+ InstanceScript* _instance;
+ uint32 _updateTimer;
};
CreatureAI* GetAI(Creature* creature) const
@@ -994,8 +990,8 @@ class npc_varian_toc : public CreatureScript
void AddSC_trial_of_the_crusader()
{
- new npc_announcer_toc10();
new boss_lich_king_toc();
+ new npc_announcer_toc10();
new npc_fizzlebang_toc();
new npc_tirion_toc();
new npc_garrosh_toc();
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
index 58cbd727963..fa38b6b46c1 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
@@ -7,12 +7,12 @@
enum
{
- TYPE_BEASTS = 0,
- TYPE_JARAXXUS = 1,
- TYPE_CRUSADERS = 2,
- TYPE_VALKIRIES = 3,
- TYPE_LICH_KING = 4,
- TYPE_ANUBARAK = 5,
+ BOSS_BEASTS = 0,
+ BOSS_JARAXXUS = 1,
+ BOSS_CRUSADERS = 2,
+ BOSS_VALKIRIES = 3,
+ BOSS_LICH_KING = 4, // not really a boss but oh well
+ BOSS_ANUBARAK = 5,
MAX_ENCOUNTERS = 6,
TYPE_COUNTER = 8,
@@ -31,15 +31,19 @@ enum
SPELL_WILFRED_PORTAL = 68424,
SPELL_JARAXXUS_CHAINS = 67924,
+ SPELL_CORPSE_TELEPORT = 69016,
+ SPELL_DESTROY_FLOOR_KNOCKUP = 68193,
DESPAWN_TIME = 300000,
+
+ DISPLAYID_DESTROYED_FLOOR = 9060
};
const Position ToCSpawnLoc[]=
{
{563.912f, 261.625f, 394.73f, 4.70437f}, // 0 Center
{575.451f, 261.496f, 394.73f, 4.6541f}, // 1 Left
- {549.951f, 261.55f, 394.73f, 4.74835f}, // 2 Right
+ {549.951f, 261.55f, 394.73f, 4.74835f} // 2 Right
};
const Position ToCCommonLoc[]=
@@ -68,7 +72,7 @@ const Position ToCCommonLoc[]=
{558.811610f, 195.985779f, 394.671661f, 0}, // 13
{567.641724f, 195.351501f, 394.659943f, 0}, // 14
{560.633972f, 195.391708f, 395.137543f, 0}, // 15
- {565.816956f, 195.477921f, 395.136810f, 0}, // 16
+ {565.816956f, 195.477921f, 395.136810f, 0} // 16
};
const Position JaraxxusLoc[]=
@@ -76,7 +80,7 @@ const Position JaraxxusLoc[]=
{508.104767f, 138.247345f, 395.128052f, 0}, // 0 - Fizzlebang start location
{548.610596f, 139.807800f, 394.321838f, 0}, // 1 - fizzlebang end
{581.854187f, 138.0f, 394.319f, 0}, // 2 - Portal Right
- {550.558838f, 138.0f, 394.319f, 0}, // 3 - Portal Left
+ {550.558838f, 138.0f, 394.319f, 0} // 3 - Portal Left
};
const Position FactionChampionLoc[]=
@@ -102,21 +106,21 @@ const Position FactionChampionLoc[]=
{528.958f, 131.47f, 394.73f, 0}, // 16 - Horde Final Pos 6
{526.309f, 116.667f, 394.833f, 0}, // 17 - Horde Final Pos 7
{524.238f, 122.411f, 394.819f, 0}, // 18 - Horde Final Pos 8
- {521.901f, 128.488f, 394.832f, 0}, // 19 - Horde Final Pos 9
+ {521.901f, 128.488f, 394.832f, 0} // 19 - Horde Final Pos 9
};
const Position TwinValkyrsLoc[]=
{
- {586.060242f, 117.514809f, 394.314026f, 0}, // 0 - Dark essence 1
- {541.602112f, 161.879837f, 394.587952f, 0}, // 1 - Dark essence 2
- {541.021118f, 117.262932f, 395.314819f, 0}, // 2 - Light essence 1
- {586.200562f, 162.145523f, 394.626129f, 0}, // 3 - Light essence 2
+ {586.060242f, 117.514809f, 394.41f, 0}, // 0 - Dark essence 1
+ {541.602112f, 161.879837f, 394.41f, 0}, // 1 - Dark essence 2
+ {541.021118f, 117.262932f, 394.41f, 0}, // 2 - Light essence 1
+ {586.200562f, 162.145523f, 394.41f, 0} // 3 - Light essence 2
};
const Position LichKingLoc[]=
{
{563.549f, 152.474f, 394.393f, 0}, // 0 - Lich king start
- {563.547f, 141.613f, 393.908f, 0}, // 1 - Lich king end
+ {563.547f, 141.613f, 393.908f, 0} // 1 - Lich king end
};
const Position AnubarakLoc[]=
@@ -126,20 +130,20 @@ const Position AnubarakLoc[]=
{694.886353f, 102.484665f, 142.119614f, 0}, // 3 - Nerub Spawn
{694.500671f, 185.363968f, 142.117905f, 0}, // 5 - Nerub Spawn
{731.987244f, 83.3824690f, 142.119614f, 0}, // 2 - Nerub Spawn
- {740.184509f, 193.443390f, 142.117584f, 0}, // 4 - Nerub Spawn
+ {740.184509f, 193.443390f, 142.117584f, 0} // 4 - Nerub Spawn
};
const Position EndSpawnLoc[]=
{
{648.9167f, 131.0208f, 141.6161f, 0}, // 0 - Highlord Tirion Fordring
{649.1614f, 142.0399f, 141.3057f ,0}, // 1 - Argent Mage
- {644.6250f, 149.2743f, 140.6015f ,0}, // 2 - Portal to Dalaran
+ {644.6250f, 149.2743f, 140.6015f ,0} // 2 - Portal to Dalaran
};
enum euiWorldStates
{
UPDATE_STATE_UI_SHOW = 4390,
- UPDATE_STATE_UI_COUNT = 4389,
+ UPDATE_STATE_UI_COUNT = 4389
};
enum eNorthrendBeasts
@@ -152,7 +156,7 @@ enum eNorthrendBeasts
SNAKES_SPECIAL = 2003,
SNAKES_DONE = 2004,
ICEHOWL_IN_PROGRESS = 3000,
- ICEHOWL_DONE = 3001,
+ ICEHOWL_DONE = 3001
};
enum eAnnouncerMessages
@@ -162,7 +166,7 @@ enum eAnnouncerMessages
MSG_CRUSADERS = 724003,
MSG_VALKIRIES = 724004,
MSG_LICH_KING = 724005,
- MSG_ANUBARAK = 724006,
+ MSG_ANUBARAK = 724006
};
enum eCreature
@@ -227,7 +231,7 @@ enum eCreature
NPC_DARK_ESSENCE = 34567,
NPC_LIGHT_ESSENCE = 34568,
- NPC_ANUBARAK = 34564,
+ NPC_ANUBARAK = 34564
};
enum eGameObject
@@ -253,7 +257,7 @@ enum eGameObject
GO_MAIN_GATE_DOOR = 195647,
GO_EAST_PORTCULLIS = 195648,
GO_WEB_DOOR = 195485,
- GO_PORTAL_TO_DALARAN = 195682,
+ GO_PORTAL_TO_DALARAN = 195682
};
enum eAchievementData
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
index 969ccf4a059..79739280055 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "drak_tharon_keep.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
index 4fdcf96192b..9bd0bfc8f6a 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "forge_of_souls.h"
+#include "Player.h"
/*
* TODO:
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
index c23479eea22..2f89d3bd503 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "forge_of_souls.h"
+#include "Player.h"
enum Events
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
index 618b2b6a9a6..135976dde18 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "forge_of_souls.h"
+#include "Player.h"
#define MAX_ENCOUNTER 2
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 26ec9e53213..4f80fd746ee 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "halls_of_reflection.h"
+#include "Player.h"
enum Yells
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
index e3604890e39..db2f2051f94 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "halls_of_reflection.h"
+#include "Player.h"
#define MAX_ENCOUNTER 3
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index 0d6e779c006..41cfc300958 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -21,6 +21,7 @@
#include "SpellAuraEffects.h"
#include "pit_of_saron.h"
#include "Vehicle.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
index ef4d9182f82..44d9230a8d2 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -21,6 +21,7 @@
#include "SpellAuraEffects.h"
#include "pit_of_saron.h"
#include "Vehicle.h"
+#include "Player.h"
enum Yells
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
index a6537c45d6f..dcca892358d 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "pit_of_saron.h"
+#include "Player.h"
// positions for Martin Victus (37591) and Gorkun Ironskull (37592)
Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f};
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index 251c9ec2b83..f35228d44d9 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "SpellAuras.h"
#include "gundrak.h"
+#include "Player.h"
//Spells
enum Spells
@@ -324,4 +325,4 @@ void AddSC_boss_slad_ran()
new mob_slad_ran_constrictor();
new mob_slad_ran_viper();
new achievement_snakes_whyd_it_have_to_be_snakes();
-} \ No newline at end of file
+}
diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
index 15315c721d7..ae3447b9c68 100644
--- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
+++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "gundrak.h"
+#include "Player.h"
#define MAX_ENCOUNTER 5
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 1b12f17ce64..f28b94c858e 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -20,6 +20,7 @@
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "icecrown_citadel.h"
+#include "Player.h"
enum Texts
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index 9017509781f..6c7caf49f0c 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -21,6 +21,7 @@
#include "ScriptedGossip.h"
#include "SpellAuras.h"
#include "icecrown_citadel.h"
+#include "Player.h"
enum ScriptTexts
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 0515ba83480..d635854da8b 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -22,6 +22,7 @@
#include "Group.h"
#include "icecrown_citadel.h"
#include "SpellInfo.h"
+#include "Player.h"
enum ScriptTexts
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index 89a26bde6ff..79d7abfef18 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -21,6 +21,7 @@
#include "SpellAuras.h"
#include "MapManager.h"
#include "icecrown_citadel.h"
+#include "Player.h"
enum ScriptTexts
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 31639a698ef..4e117d9f3e3 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
@@ -21,6 +21,7 @@
#include "SpellScript.h"
#include "Map.h"
#include "Creature.h"
+#include "SpellMgr.h"
#define ICCScriptName "instance_icecrown_citadel"
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index af8aba57a6d..7ff995d4bcf 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
@@ -20,6 +20,7 @@
#include "InstanceScript.h"
#include "icecrown_citadel.h"
#include "Spell.h"
+#include "Player.h"
#define GOSSIP_SENDER_ICC_PORT 631
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 650f426d29c..dd0068f6327 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -23,6 +23,7 @@
#include "PoolMgr.h"
#include "AccountMgr.h"
#include "icecrown_citadel.h"
+#include "Player.h"
enum EventIds
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index 93eab5df237..95839ef134f 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "naxxramas.h"
+#include "Player.h"
#define SAY_AGGRO RAND(-1533109, -1533110, -1533111)
#define SAY_SLAY -1533112
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index c88377da3f3..9167db45d20 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "naxxramas.h"
+#include "Player.h"
enum Yells
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
index 9822146984f..8af0e63dbe5 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "naxxramas.h"
+#include "Player.h"
#define EMOTE_BREATH -1533082
#define EMOTE_ENRAGE -1533083
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index e45700ebd72..75b851a2b22 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -18,7 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
-
+#include "Player.h"
#include "naxxramas.h"
//Stalagg
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 28f73ed14b0..ab9ed76cb1f 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -34,6 +34,7 @@ Script Data End */
#include "PassiveAI.h"
#include "eye_of_eternity.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
enum Achievements
{
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
index f6a12eee519..6e85e701a27 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "eye_of_eternity.h"
+#include "Player.h"
class instance_eye_of_eternity : public InstanceMapScript
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index 9e6930118f7..bbd86ec6a9f 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -21,6 +21,7 @@
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "nexus.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index eb0b3692f01..b17494800f1 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -19,96 +19,86 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "nexus.h"
+#include "SpellScript.h"
enum Spells
{
- SPELL_CRYSTAL_SPIKES = 47958, //Don't work, using walkaround
- H_SPELL_CRYSTAL_SPIKES = 57082, //Don't work, using walkaround
- SPELL_CRYSTALL_SPIKE_DAMAGE = 47944,
- H_SPELL_CRYSTALL_SPIKE_DAMAGE = 57067,
- SPELL_CRYSTAL_SPIKE_PREVISUAL = 50442,
- MOB_CRYSTAL_SPIKE = 27099,
- SPELL_SPELL_REFLECTION = 47981,
- SPELL_TRAMPLE = 48016,
- H_SPELL_TRAMPLE = 57066,
- SPELL_FRENZY = 48017,
- SPELL_SUMMON_CRYSTALLINE_TANGLER = 61564, //summons npc 32665
- SPELL_ROOTS = 28858 //proper spell id is unknown
+ SPELL_SPELL_REFLECTION = 47981,
+ SPELL_TRAMPLE = 48016,
+ SPELL_FRENZY = 48017,
+ SPELL_SUMMON_CRYSTALLINE_TANGLER = 61564,
+ SPELL_CRYSTAL_SPIKES = 47958,
};
enum Yells
{
- SAY_AGGRO = -1576020,
- SAY_DEATH = -1576021,
- SAY_REFLECT = -1576022,
- SAY_CRYSTAL_SPIKES = -1576023,
- SAY_KILL = -1576024
+ SAY_AGGRO = 1,
+ SAY_DEATH = 2,
+ SAY_REFLECT = 3,
+ SAY_CRYSTAL_SPIKES = 4,
+ SAY_KILL = 5,
};
-enum Creatures
+
+enum Events
{
- MOB_CRYSTALLINE_TANGLER = 32665
+ EVENT_CRYSTAL_SPIKES = 1,
+ EVENT_TRAMPLE = 2,
+ EVENT_SPELL_REFLECTION = 3,
+ EVENT_CRYSTALLINE_TANGLER = 4,
};
-#define SPIKE_DISTANCE 5.0f
+class OrmorokTanglerPredicate
+{
+ public:
+ OrmorokTanglerPredicate(Unit* unit) : me(unit) {}
+
+ bool operator() (WorldObject* object) const
+ {
+ return object->GetDistance2d(me) >= 5.0f;
+ }
+
+ private:
+ Unit* me;
+};
class boss_ormorok : public CreatureScript
{
public:
boss_ormorok() : CreatureScript("boss_ormorok") { }
- CreatureAI* GetAI(Creature* creature) const
+ struct boss_ormorokAI : public BossAI
{
- return new boss_ormorokAI (creature);
- }
+ boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT) {}
- struct boss_ormorokAI : public ScriptedAI
- {
- boss_ormorokAI(Creature* creature) : ScriptedAI(creature)
+ void EnterCombat(Unit* /*who*/)
{
- instance = creature->GetInstanceScript();
- }
+ _EnterCombat();
- InstanceScript* instance;
-
- bool bFrenzy;
- bool bCrystalSpikes;
- uint8 uiCrystalSpikesCount;
- float fBaseX;
- float fBaseY;
- float fBaseZ;
- float fBaseO;
- float fSpikeXY[4][2];
-
- uint32 uiCrystalSpikesTimer;
- uint32 uiCrystalSpikesTimer2;
- uint32 uiTrampleTimer;
- uint32 uiFrenzyTimer;
- uint32 uiSpellReflectionTimer;
- uint32 uiSummonCrystallineTanglerTimer;
-
- void Reset()
- {
- uiCrystalSpikesTimer = 12*IN_MILLISECONDS;
- uiTrampleTimer = 10*IN_MILLISECONDS;
- uiSpellReflectionTimer = 30*IN_MILLISECONDS;
- uiSummonCrystallineTanglerTimer = 17*IN_MILLISECONDS;
- bFrenzy = false;
- bCrystalSpikes = false;
+ events.ScheduleEvent(EVENT_CRYSTAL_SPIKES, 12000);
+ events.ScheduleEvent(EVENT_TRAMPLE, 10000);
+ events.ScheduleEvent(EVENT_SPELL_REFLECTION, 30000);
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_CRYSTALLINE_TANGLER, 17000);
+
+ Talk(SAY_AGGRO);
if (instance)
- instance->SetData(DATA_ORMOROK_EVENT, NOT_STARTED);
+ instance->SetData(DATA_ORMOROK_EVENT, IN_PROGRESS);
}
- void EnterCombat(Unit* /*who*/)
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
{
- DoScriptText(SAY_AGGRO, me);
-
- if (instance)
- instance->SetData(DATA_ORMOROK_EVENT, IN_PROGRESS);
+ if (!frenzy && HealthBelowPct(25))
+ {
+ DoCast(me, SPELL_FRENZY);
+ frenzy = true;
+ }
}
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ _JustDied();
+
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_ORMOROK_EVENT, DONE);
@@ -116,195 +106,181 @@ public:
void KilledUnit(Unit* /*victim*/)
{
- DoScriptText(SAY_KILL, me);
+ Talk(SAY_KILL);
}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
- {
return;
- }
- if (bCrystalSpikes)
- {
- if (uiCrystalSpikesTimer2 <= diff)
- {
- fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO));
- fSpikeXY[0][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO));
- fSpikeXY[1][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO));
- fSpikeXY[1][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO));
- fSpikeXY[2][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO-(M_PI/2)));
- fSpikeXY[2][1] = fBaseY+(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO-(M_PI/2)));
- fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::cos(fBaseO-(M_PI/2)));
- fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount* std::sin(fBaseO-(M_PI/2)));
- for (uint8 i = 0; i < 4; ++i)
- me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILLISECONDS);
- if (++uiCrystalSpikesCount >= 13)
- bCrystalSpikes = false;
- uiCrystalSpikesTimer2 = 200;
- } else uiCrystalSpikesTimer2 -= diff;
- }
- if (!bFrenzy && HealthBelowPct(25))
- {
- DoCast(me, SPELL_FRENZY);
- bFrenzy = true;
- }
+ events.Update(diff);
- if (uiTrampleTimer <= diff)
- {
- DoCast(me, SPELL_TRAMPLE);
- uiTrampleTimer = 10*IN_MILLISECONDS;
- } else uiTrampleTimer -= diff;
-
- if (uiSpellReflectionTimer <= diff)
- {
- DoScriptText(SAY_REFLECT, me);
- DoCast(me, SPELL_SPELL_REFLECTION);
- uiSpellReflectionTimer = 30*IN_MILLISECONDS;
- } else uiSpellReflectionTimer -= diff;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- if (uiCrystalSpikesTimer <= diff)
- {
- DoScriptText(SAY_CRYSTAL_SPIKES, me);
- bCrystalSpikes = true;
- uiCrystalSpikesCount = 1;
- uiCrystalSpikesTimer2 = 0;
- fBaseX = me->GetPositionX();
- fBaseY = me->GetPositionY();
- fBaseZ = me->GetPositionZ();
- fBaseO = me->GetOrientation();
- uiCrystalSpikesTimer = 20*IN_MILLISECONDS;
- } else uiCrystalSpikesTimer -= diff;
-
- if (IsHeroic() && (uiSummonCrystallineTanglerTimer <= diff))
+ while (uint32 eventId = events.ExecuteEvent())
{
- Creature* Crystalline_Tangler = me->SummonCreature(MOB_CRYSTALLINE_TANGLER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
- if (Crystalline_Tangler)
+ switch (eventId)
{
- Unit* target = NULL;
- uint8 Healer = 0;
- for (uint8 j = 1; j <= 4; j++)
- {
- switch (j)
- {
- case 1: Healer = CLASS_PRIEST; break;
- case 2: Healer = CLASS_PALADIN; break;
- case 3: Healer = CLASS_DRUID; break;
- case 4: Healer = CLASS_SHAMAN; break;
- }
- std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
- for (; i != me->getThreatManager().getThreatList().end(); ++i)
- {
- Unit* temp = Unit::GetUnit(*me, (*i)->getUnitGuid());
- if (temp && temp->GetTypeId() == TYPEID_PLAYER && temp->getClass() == Healer)
- {
- target = temp;
- break;
- }
- }
- if (target)
- break;
- }
- if (!target)
- target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- if (target)
- {
- Crystalline_Tangler->AI()->AttackStart(target);
- Crystalline_Tangler->getThreatManager().addThreat(target, 1000000000.0f);
- }
+ case EVENT_TRAMPLE:
+ DoCast(me, SPELL_TRAMPLE);
+ events.ScheduleEvent(EVENT_TRAMPLE, 10000);
+ break;
+ case EVENT_SPELL_REFLECTION:
+ Talk(SAY_REFLECT);
+ DoCast(me, SPELL_SPELL_REFLECTION);
+ events.ScheduleEvent(EVENT_SPELL_REFLECTION, 30000);
+ break;
+ case EVENT_CRYSTAL_SPIKES:
+ Talk(SAY_CRYSTAL_SPIKES);
+ DoCast(SPELL_CRYSTAL_SPIKES);
+ events.ScheduleEvent(EVENT_CRYSTAL_SPIKES, 12000);
+ break;
+ case EVENT_CRYSTALLINE_TANGLER:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, OrmorokTanglerPredicate(me)))
+ DoCast(target, SPELL_SUMMON_CRYSTALLINE_TANGLER);
+ events.ScheduleEvent(EVENT_CRYSTALLINE_TANGLER, 17000);
+ break;
+ default:
+ break;
}
- uiSummonCrystallineTanglerTimer = 17*IN_MILLISECONDS;
- } else uiSummonCrystallineTanglerTimer -= diff;
+ }
DoMeleeAttackIfReady();
}
+
+ private:
+ bool frenzy;
+
};
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new boss_ormorokAI (creature);
+ }
+};
+
+enum CrystalSpikes
+{
+ NPC_CRYSTAL_SPIKE_INITIAL = 27101,
+ NPC_CRYSTAL_SPIKE_TRIGGER = 27079,
+
+ DATA_COUNT = 1,
+ MAX_COUNT = 5,
+
+ SPELL_CRYSTAL_SPIKE_DAMAGE = 47944,
+
+ GO_CRYSTAL_SPIKE_TRAP = 188537,
+};
+
+uint32 const crystalSpikeSummon[3] =
+{
+ 47936,
+ 47942,
+ 47943
};
-class mob_crystal_spike : public CreatureScript
+class npc_crystal_spike_trigger : public CreatureScript
{
public:
- mob_crystal_spike() : CreatureScript("mob_crystal_spike") { }
+ npc_crystal_spike_trigger() : CreatureScript("npc_crystal_spike_trigger") { }
- CreatureAI* GetAI(Creature* creature) const
+ struct npc_crystal_spike_triggerAI : public ScriptedAI
{
- return new mob_crystal_spikeAI (creature);
- }
+ npc_crystal_spike_triggerAI(Creature* creature) : ScriptedAI(creature) {}
- struct mob_crystal_spikeAI : public Scripted_NoMovementAI
- {
- mob_crystal_spikeAI(Creature* creature) : Scripted_NoMovementAI(creature)
+ void IsSummonedBy(Unit* owner)
{
- }
+ switch (me->GetEntry())
+ {
+ case NPC_CRYSTAL_SPIKE_INITIAL:
+ _count = 0;
+ me->SetFacingToObject(owner);
+ break;
+ case NPC_CRYSTAL_SPIKE_TRIGGER:
+ if (Creature* trigger = owner->ToCreature())
+ _count = trigger->AI()->GetData(DATA_COUNT) + 1;
+ break;
+ default:
+ _count = MAX_COUNT;
+ break;
+ }
- uint32 SpellCrystalSpikeDamageTimer;
- uint32 SpellCrystalSpikePrevisualTimer;
+ if (me->GetEntry() == NPC_CRYSTAL_SPIKE_TRIGGER)
+ if (GameObject* trap = me->FindNearestGameObject(GO_CRYSTAL_SPIKE_TRAP, 1.0f))
+ trap->Use(me);
- void Reset()
+ _despawntimer = 2000;
+ }
+
+ uint32 GetData(uint32 type)
{
- SpellCrystalSpikeDamageTimer = 3700;
- SpellCrystalSpikePrevisualTimer = 1*IN_MILLISECONDS;
+ return type == DATA_COUNT ? _count : 0;
}
void UpdateAI(const uint32 diff)
{
- if (SpellCrystalSpikePrevisualTimer <= diff)
+ if (_despawntimer <= diff)
{
- DoCast(me, SPELL_CRYSTAL_SPIKE_PREVISUAL);
- SpellCrystalSpikePrevisualTimer = 10*IN_MILLISECONDS;
- } else SpellCrystalSpikePrevisualTimer -= diff;
+ if (me->GetEntry() == NPC_CRYSTAL_SPIKE_TRIGGER)
+ if (GameObject* trap = me->FindNearestGameObject(GO_CRYSTAL_SPIKE_TRAP, 1.0f))
+ trap->Delete();
- if (SpellCrystalSpikeDamageTimer <= diff)
- {
- DoCast(me, SPELL_CRYSTALL_SPIKE_DAMAGE);
- SpellCrystalSpikeDamageTimer = 10*IN_MILLISECONDS;
- } else SpellCrystalSpikeDamageTimer -= diff;
+ me->DespawnOrUnsummon();
+ }
+ else
+ _despawntimer -= diff;
}
- };
-};
+ private:
+ uint32 _count;
+ uint32 _despawntimer;
-class mob_crystalline_tangler : public CreatureScript
-{
-public:
- mob_crystalline_tangler() : CreatureScript("mob_crystalline_tangler") { }
+ };
CreatureAI* GetAI(Creature* creature) const
{
- return new mob_crystalline_tanglerAI (creature);
+ return new npc_crystal_spike_triggerAI(creature);
}
+};
- struct mob_crystalline_tanglerAI : public ScriptedAI
- {
- mob_crystalline_tanglerAI(Creature* creature) : ScriptedAI(creature) {}
-
- uint32 uiRootsTimer;
+class spell_crystal_spike : public SpellScriptLoader
+{
+ public:
+ spell_crystal_spike() : SpellScriptLoader("spell_crystal_spike") { }
- void Reset()
+ class spell_crystal_spike_AuraScript : public AuraScript
{
- uiRootsTimer = 1*IN_MILLISECONDS;
- }
+ PrepareAuraScript(spell_crystal_spike_AuraScript);
- void UpdateAI(const uint32 diff)
- {
- if (uiRootsTimer <= diff)
+ void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
- if (me->IsWithinDist(me->getVictim(), 5.0f, false))
- {
- DoCast(me->getVictim(), SPELL_ROOTS);
- uiRootsTimer = 15*IN_MILLISECONDS;
- }
- } else uiRootsTimer -= diff;
- }
- };
+ Unit* target = GetTarget();
+ if (target->GetEntry() == NPC_CRYSTAL_SPIKE_INITIAL || target->GetEntry() == NPC_CRYSTAL_SPIKE_TRIGGER)
+ if (Creature* trigger = target->ToCreature())
+ {
+ uint32 spell = target->GetEntry() == NPC_CRYSTAL_SPIKE_INITIAL ? crystalSpikeSummon[0] : crystalSpikeSummon[urand(0, 2)];
+ if (trigger->AI()->GetData(DATA_COUNT) < MAX_COUNT)
+ trigger->CastSpell(trigger, spell, true);
+ }
+ }
+ void Register()
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_crystal_spike_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_crystal_spike_AuraScript();
+ }
};
void AddSC_boss_ormorok()
{
new boss_ormorok();
- new mob_crystal_spike();
- new mob_crystalline_tangler();
+ new npc_crystal_spike_trigger();
+ new spell_crystal_spike();
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
index 5d430ae048d..c571def96d7 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
@@ -19,6 +19,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "nexus.h"
+#include "Player.h"
#define NUMBER_OF_ENCOUNTERS 4
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
index a0b5aded315..0543a317ffa 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "oculus.h"
+#include "Player.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index f00369fd9e2..0e73e929aef 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -23,6 +23,7 @@
#include "Vehicle.h"
#include "CombatAI.h"
#include "oculus.h"
+#include "Player.h"
#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
#define GOSSIP_ITEM_BELGARISTRASZ1 "I want to fly on the wings of the Red Flight"
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
index 707ea7f138d..f94ae37cdc2 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "halls_of_lightning.h"
+#include "Player.h"
enum eEnums
{
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
index a90c346e470..3f5f2deb631 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
@@ -20,6 +20,7 @@
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "halls_of_stone.h"
+#include "Player.h"
enum Texts
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index 89d2f752721..afd31331b7d 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -24,6 +24,7 @@
#include "MapManager.h"
#include "MoveSplineInit.h"
#include "ulduar.h"
+#include "Player.h"
enum Texts
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
index 8090b9e8a3e..845e694e842 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
@@ -20,6 +20,7 @@
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "ulduar.h"
+#include "Player.h"
enum VezaxYells
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index b414a3fcdcb..9c77bb298a5 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -21,6 +21,7 @@
#include "SpellAuraEffects.h"
#include "ulduar.h"
#include "Vehicle.h"
+#include "Player.h"
/* ScriptData
SDName: boss_kologarn
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index 6038b7ed9d6..2830e3ada04 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -23,6 +23,7 @@
#include "SpellScript.h"
#include "ulduar.h"
#include "SpellInfo.h"
+#include "Player.h"
enum Says
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 79e4684f3a6..e8180057cec 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -29,6 +29,7 @@
#include "SpellAuraEffects.h"
#include "ulduar.h"
#include "Vehicle.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 2f37fb06f24..cc8ff9996f3 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "ulduar.h"
+#include "Player.h"
static DoorData const doorData[] =
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
index 29eb5ad3367..ab2f778ba9d 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
@@ -20,6 +20,7 @@
#include "ScriptedGossip.h"
#include "ulduar.h"
#include "InstanceScript.h"
+#include "Player.h"
/*
The teleporter appears to be active and stable.
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
index 1e79cc1c5bf..919b0da5fc0 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "utgarde_keep.h"
+#include "Player.h"
#define MAX_ENCOUNTER 3
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index c694aa88338..e587a864fd6 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -143,17 +143,10 @@ public:
}
}
}
-
- switch (near_f)
- {
- case 1: return 1;
- case 2: return 2;
- case 3: return 3;
- default: return 0;
- }
+ return near_f > 0 && near_f < 4 ? near_f : 0;
}
- void UpdateAI(const uint32 /*diff*/)
+ void UpdateAI(uint32 const /* diff */)
{
if (fm_Type == 0)
fm_Type = GetForgeMasterType();
@@ -239,9 +232,115 @@ class spell_fixate : public SpellScriptLoader
return new spell_fixate_SpellScript();
}
};
+
+enum EnslavedProtoDrake
+{
+ TYPE_PROTODRAKE_AT = 28,
+ DATA_PROTODRAKE_MOVE = 6,
+
+ PATH_PROTODRAKE = 125946,
+
+ EVENT_REND = 1,
+ EVENT_FLAME_BREATH = 2,
+ EVENT_KNOCKAWAY = 3,
+
+ SPELL_REND = 43931,
+ SPELL_FLAME_BREATH = 50653,
+ SPELL_KNOCK_AWAY = 49722,
+
+ POINT_LAST = 5,
+};
+
+const Position protodrakeCheckPos = {206.24f, -190.28f, 200.11f, 0.f};
+
+class npc_enslaved_proto_drake : public CreatureScript
+{
+public:
+ npc_enslaved_proto_drake() : CreatureScript("npc_enslaved_proto_drake") { }
+
+ struct npc_enslaved_proto_drakeAI : public ScriptedAI
+ {
+ npc_enslaved_proto_drakeAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _setData = false;
+ }
+
+ void Reset()
+ {
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_REND, urand(2000, 3000));
+ _events.ScheduleEvent(EVENT_FLAME_BREATH, urand(5500, 7000));
+ _events.ScheduleEvent(EVENT_KNOCKAWAY, urand(3500, 6000));
+ }
+
+ void MovementInform(uint32 type, uint32 id)
+ {
+ if (type == WAYPOINT_MOTION_TYPE && id == POINT_LAST)
+ {
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ }
+ }
+
+ void SetData(uint32 type, uint32 data)
+ {
+ if (type == TYPE_PROTODRAKE_AT && data == DATA_PROTODRAKE_MOVE && !_setData && me->GetDistance(protodrakeCheckPos) < 5.0f)
+ {
+ _setData = true;
+ me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
+ me->GetMotionMaster()->MovePath(PATH_PROTODRAKE, false);
+ }
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventid = _events.ExecuteEvent())
+ {
+ switch (eventid)
+ {
+ case EVENT_REND:
+ DoCast(SPELL_REND);
+ _events.ScheduleEvent(EVENT_REND, urand(15000, 20000));
+ break;
+ case EVENT_FLAME_BREATH:
+ DoCast(SPELL_FLAME_BREATH);
+ _events.ScheduleEvent(EVENT_FLAME_BREATH, urand(11000, 12000));
+ break;
+ case EVENT_KNOCKAWAY:
+ DoCast(SPELL_KNOCK_AWAY);
+ _events.ScheduleEvent(EVENT_KNOCKAWAY, urand(7000, 8500));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool _setData;
+ EventMap _events;
+
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_enslaved_proto_drakeAI(creature);
+ }
+};
+
void AddSC_utgarde_keep()
{
new npc_dragonflayer_forge_master();
+ new npc_enslaved_proto_drake();
new spell_ticking_time_bomb();
new spell_fixate();
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index a6ad7befc38..1635aaac918 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -28,6 +28,7 @@ Script Data End */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "utgarde_pinnacle.h"
+#include "Player.h"
//Yell
enum eYells
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index a01b41bfbcf..58d7b59c7dd 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "violet_hold.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 4b6fed181e4..ed039728bb4 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "violet_hold.h"
+#include "Player.h"
#define MAX_ENCOUNTER 3
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index 870ea893b78..c73cb97f2d1 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -20,6 +20,7 @@
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "violet_hold.h"
+#include "Player.h"
#define GOSSIP_START_EVENT "Get your people to safety, we'll keep the Blue Dragonflight's forces at bay."
#define GOSSIP_ITEM_1 "Activate the crystals when we get in trouble, right"
diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp
index 224d06e9d3c..2a83a03caff 100644
--- a/src/server/scripts/Northrend/borean_tundra.cpp
+++ b/src/server/scripts/Northrend/borean_tundra.cpp
@@ -42,6 +42,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
+#include "Player.h"
/*######
## npc_sinkhole_kill_credit
diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp
index 7b8eb331702..09df0acc467 100644
--- a/src/server/scripts/Northrend/crystalsong_forest.cpp
+++ b/src/server/scripts/Northrend/crystalsong_forest.cpp
@@ -25,6 +25,7 @@ Script Data End */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
/*******************************************************
* npc_warmage_violetstand
@@ -108,4 +109,4 @@ public:
void AddSC_crystalsong_forest()
{
new npc_warmage_violetstand;
-} \ No newline at end of file
+}
diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp
index c19effbab1b..371ac897e4e 100644
--- a/src/server/scripts/Northrend/dalaran.cpp
+++ b/src/server/scripts/Northrend/dalaran.cpp
@@ -26,6 +26,7 @@ Script Data End */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*******************************************************
* npc_mageguard_dalaran
diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp
index a26ee4e9270..13a8370690e 100644
--- a/src/server/scripts/Northrend/dragonblight.cpp
+++ b/src/server/scripts/Northrend/dragonblight.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
enum eEnums
{
diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp
index 4ca12bc82a1..400fe58d4c4 100644
--- a/src/server/scripts/Northrend/grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/grizzly_hills.cpp
@@ -19,6 +19,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## Quest 12027: Mr. Floppy's Perilous Adventure
diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp
index ffe38d6aade..e04531954ea 100644
--- a/src/server/scripts/Northrend/howling_fjord.cpp
+++ b/src/server/scripts/Northrend/howling_fjord.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_apothecary_hanes
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 5989b5bad2e..030df23028c 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -31,6 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuras.h"
+#include "Player.h"
/*######
## npc_arete
diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp
index 1cf8f54b4fe..88d262a1579 100644
--- a/src/server/scripts/Northrend/isle_of_conquest.cpp
+++ b/src/server/scripts/Northrend/isle_of_conquest.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "PassiveAI.h"
#include "BattlegroundIC.h"
+#include "Player.h"
// TO-DO: This should be done with SmartAI, but yet it does not correctly support vehicles's AIs.
// Even adding ReactState Passive we still have issues using SmartAI.
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index 63960f13bb7..8404413ad9d 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "SpellScript.h"
#include "SpellAuras.h"
+#include "Player.h"
/*######
## npc_injured_rainspeaker_oracle
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp
index 1733af17580..7cd87be8370 100644
--- a/src/server/scripts/Northrend/storm_peaks.cpp
+++ b/src/server/scripts/Northrend/storm_peaks.cpp
@@ -23,6 +23,7 @@
#include "SpellAuraEffects.h"
#include "Vehicle.h"
#include "CombatAI.h"
+#include "Player.h"
/*######
## npc_agnetta_tyrsdottar
diff --git a/src/server/scripts/Northrend/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp
index b7901f1a44a..8935c77b30e 100644
--- a/src/server/scripts/Northrend/wintergrasp.cpp
+++ b/src/server/scripts/Northrend/wintergrasp.cpp
@@ -25,6 +25,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellScript.h"
+#include "Player.h"
#define GOSSIP_HELLO_DEMO1 "Build catapult."
#define GOSSIP_HELLO_DEMO2 "Build demolisher."
diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp
index 6af96f3fdfd..7acdcae8a77 100644
--- a/src/server/scripts/Northrend/zuldrak.cpp
+++ b/src/server/scripts/Northrend/zuldrak.cpp
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*####
## npc_drakuru_shackles
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index f678cf9c198..d6465bfe006 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
#define SPELL_INHIBITMAGIC 32264
#define SPELL_ATTRACTMAGIC 32265
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
index a1780d1d4a8..303a30bea8f 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "shadow_labyrinth.h"
+#include "Player.h"
#define SAY_INTRO -1555028
#define SAY_AGGRO1 -1555029
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index 5fe5b8aab0c..a100f5848af 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -29,8 +29,9 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
- #include "ScriptedGossip.h"
+#include "ScriptedGossip.h"
#include "black_temple.h"
+#include "Player.h"
/*###
# npc_spirit_of_olum
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index f812b1b35cd..18145df7302 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedGossip.h"
#include "PassiveAI.h"
#include "black_temple.h"
+#include "Player.h"
#define GETGO(obj, guid) GameObject* obj = instance->instance->GetGameObject(guid)
#define GETUNIT(unit, guid) Unit* unit = Unit::GetUnit(*me, guid)
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 2757a862c93..6e770249cf0 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "black_temple.h"
+#include "Player.h"
#define SAY_DEATH -1564013
#define SAY_LOW_HEALTH -1564014
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index e8bee95865f..10f787bee88 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "black_temple.h"
+#include "Player.h"
enum eEnums
{
diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
index 98d90aa1818..a1e45fa4d15 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "black_temple.h"
+#include "Player.h"
#define MAX_ENCOUNTER 9
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index 3b94feda02b..ffb4ed3aa12 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "serpent_shrine.h"
#include "Spell.h"
+#include "Player.h"
#define SAY_INTRO -1548042
#define SAY_AGGRO1 -1548043
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 9b739a1a6ac..0c6917b320f 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "serpent_shrine.h"
+#include "Player.h"
// --- Spells used by Leotheras The Blind
#define SPELL_WHIRLWIND 37640
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index b9e530996af..5bc2344fd70 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "serpent_shrine.h"
#include "Spell.h"
+#include "Player.h"
#define SPELL_SPOUT 37433
#define SPELL_SPOUT_ANIM 42835
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
index 87053d1de1c..e1cd3e69887 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "serpent_shrine.h"
+#include "Player.h"
#define MAX_ENCOUNTER 6
#define SPELL_SCALDINGWATER 37284
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index 714ea275471..56365216be5 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -25,6 +25,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
enum eSays
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index bbf03e39f9b..ebe30166902 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "magtheridons_lair.h"
+#include "Player.h"
struct Yell
{
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index d2b0475fa77..697d2c9f9f9 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -20,6 +20,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
+#include "Player.h"
enum Spells
{
diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp
index 4c44d4e828e..4c0ed3c1d4e 100644
--- a/src/server/scripts/Outland/hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/hellfire_peninsula.cpp
@@ -37,6 +37,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_aeranas
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index 977ec57e2df..13adf9182a3 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -32,6 +32,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_greatmother_geyah
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index 8533491c15f..eaea4960712 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -36,6 +36,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_manaforge_control_console
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index c84df2ee3d4..5ec017d88b0 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -46,6 +46,7 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "Group.h"
#include "SpellScript.h"
+#include "Player.h"
/*#####
# mob_mature_netherwing_drake
diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp
index 8ad2c311fc5..e9264233621 100644
--- a/src/server/scripts/Outland/shattrath_city.cpp
+++ b/src/server/scripts/Outland/shattrath_city.cpp
@@ -38,6 +38,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npc_raliq_the_drunk
diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp
index 707cabfcf0c..0963ac63556 100644
--- a/src/server/scripts/Outland/terokkar_forest.cpp
+++ b/src/server/scripts/Outland/terokkar_forest.cpp
@@ -38,6 +38,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "Group.h"
+#include "Player.h"
/*######
## mob_unkor_the_ruthless
diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp
index a48866a2f83..0d38a49e11d 100644
--- a/src/server/scripts/Outland/zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zangarmarsh.cpp
@@ -36,6 +36,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
+#include "Player.h"
/*######
## npcs_ashyen_and_keleth
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index b46d2083ecd..224e909ca57 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_dk_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index f8adb13d058..84639322819 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_dru_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 3bca0d088a4..3183cf7ff5a 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -33,6 +33,7 @@
#include "InstanceScript.h"
#include "Group.h"
#include "LFGMgr.h"
+#include "Battleground.h"
class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader
{
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index a1ecac6256a..5b1cbe0c36a 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -20,6 +20,7 @@
* Scriptnames in this file should be prefixed with "spell_#holidayname_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 9d0e084cfb8..0f8fa9614a7 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_hun_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "Cell.h"
#include "CellImpl.h"
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index ef810b50b6f..e0c88ad6846 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -21,11 +21,13 @@
* Scriptnames of files in this file should be prefixed with "spell_item_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "SkillDiscovery.h"
+#include "Battleground.h"
// Generic script for handling item dummy effects which trigger another spell.
class spell_item_trigger_spell : public SpellScriptLoader
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 35f0e98eef2..1d94cb6caf8 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -21,11 +21,11 @@
* Scriptnames of files in this file should be prefixed with "spell_mage_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
-
enum MageSpells
{
SPELL_MAGE_COLD_SNAP = 11958,
@@ -399,7 +399,7 @@ public:
{
PrepareSpellScript(spell_mage_cone_of_cold_SpellScript);
- void HandleConeOfColdScript(SpellEffIndex effIndex)
+ void HandleConeOfColdScript(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index e09fc074ce9..2a3fcd88778 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -21,12 +21,12 @@
* Scriptnames of files in this file should be prefixed with "spell_pal_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "Group.h"
-
enum PaladinSpells
{
PALADIN_SPELL_DIVINE_PLEA = 54428,
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 645ac164aef..01598f12166 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_pri_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 06d3602d8e8..da80ec8f1da 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_q#questID_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index d456f2a1f56..39f23fc0516 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_rog_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index af508dd1fca..939e6371d98 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_sha_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "GridNotifiers.h"
#include "Unit.h"
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 42296154634..1150970e8fc 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_warl_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index ac0e124f53b..fd82171bc68 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -21,6 +21,7 @@
* Scriptnames of files in this file should be prefixed with "spell_warr_".
*/
+#include "Player.h"
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index a6f4f7f64f9..665acbe86c8 100755
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -23,6 +23,7 @@
#include "BattlegroundSA.h"
#include "BattlegroundAV.h"
#include "Vehicle.h"
+#include "Player.h"
class achievement_resilient_victory : public AchievementCriteriaScript
{
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 67aeda314bf..db3c6dd2274 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -37,6 +37,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Player.h"
/*######
## at_coilfang_waterfall
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index ddb0044a888..4abb06198ba 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -55,6 +55,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "GameObjectAI.h"
#include "Spell.h"
+#include "Player.h"
/*######
## go_cat_figurine
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 4b0433fe0c7..5ca3984f92a 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -32,6 +32,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "GuardAI.h"
+#include "Player.h"
enum GuardGeneric
{
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index e7883f4f11f..5e68507c9fa 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -33,6 +33,7 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "Spell.h"
+#include "Player.h"
/*#####
# item_only_for_flight
diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp
index f57af517db2..e02e67e97f6 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "GameEventMgr.h"
+#include "Player.h"
#define HALLOWEEN_EVENTID 12
#define SPELL_TRICK_OR_TREATED 24755
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index e6ac4a3a2a1..3f2e66bd232 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
/*
A few notes for future developement:
diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp
index 18f776e7171..5414d896dd0 100644
--- a/src/server/scripts/World/npc_taxi.cpp
+++ b/src/server/scripts/World/npc_taxi.cpp
@@ -27,6 +27,7 @@ EndScriptData
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Player.h"
#define GOSSIP_SUSURRUS "I am ready."
#define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!"
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index 91941a02df6..f28f62e6410 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -566,4 +566,10 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_DEL_GUILD_FINDER_APPLICANT, "DELETE FROM guild_finder_applicant WHERE guildId = ? AND playerGuid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_REP_GUILD_FINDER_GUILD_SETTINGS, "REPLACE INTO guild_finder_guild_settings (guildId, availability, classRoles, interests, level, listed, comment) VALUES(?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_GUILD_FINDER_GUILD_SETTINGS, "DELETE FROM guild_finder_guild_settings WHERE guildId = ?", CONNECTION_ASYNC);
+
+ // Calendar
+ PREPARE_STATEMENT(CHAR_REP_CALENDAR_EVENT, "REPLACE INTO calendar_events (id, creator, title, description, type, dungeon, eventtime, flags, time2) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_DEL_CALENDAR_EVENT, "DELETE FROM calendar_events WHERE id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_REP_CALENDAR_INVITE, "REPLACE INTO calendar_invites (id, event, invitee, sender, status, statustime, rank, text) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_DEL_CALENDAR_INVITE, "DELETE FROM calendar_invites WHERE id = ?", CONNECTION_ASYNC);
}
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 5a03ee4767c..06721232ad5 100755
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -522,6 +522,11 @@ enum CharacterDatabaseStatements
CHAR_REP_GUILD_FINDER_GUILD_SETTINGS,
CHAR_DEL_GUILD_FINDER_GUILD_SETTINGS,
+ CHAR_REP_CALENDAR_EVENT,
+ CHAR_DEL_CALENDAR_EVENT,
+ CHAR_REP_CALENDAR_INVITE,
+ CHAR_DEL_CALENDAR_INVITE,
+
MAX_CHARACTERDATABASE_STATEMENTS
};
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index e1e0a62db01..c4f709d23dd 100755
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -514,7 +514,7 @@ class ByteBuffer
lt.tm_mon = (packedDate >> 20) & 0xF;
lt.tm_year = ((packedDate >> 24) & 0x1F) + 100;
- return mktime(&lt) + timezone;
+ return uint32(mktime(&lt) + timezone);
}
ByteBuffer& ReadPackedTime(uint32& time)