aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/old/3.3.5a/2011_08_27_00_world_version.sql (renamed from sql/updates/world/2011_08_27_00_world_version.sql)0
-rw-r--r--sql/old/3.3.5a/2011_08_27_01_world_spell_script_names.sql (renamed from sql/updates/world/2011_08_27_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_08_28_00_world_instance_misc.sql (renamed from sql/updates/world/2011_08_28_00_world_instance_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_08_29_00_world_instance_misc.sql (renamed from sql/updates/world/2011_08_29_00_world_instance_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_08_30_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_08_30_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_01_00_world_disables.sql (renamed from sql/updates/world/2011_09_01_00_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_02_00_world_misc.sql (renamed from sql/updates/world/2011_09_02_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_02_02_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_02_02_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_03_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_01_world_conditions.sql (renamed from sql/updates/world/2011_09_03_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_02_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_03_02_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_03_world_creature_template.sql (renamed from sql/updates/world/2011_09_03_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_04_world_misc.sql (renamed from sql/updates/world/2011_09_03_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql (renamed from sql/updates/world/2011_09_03_05_world_gossip_menu_option.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql (renamed from sql/updates/world/2011_09_03_06_world_spell_threat.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_07_world_achievement_criteria_data.sql (renamed from sql/updates/world/2011_09_03_07_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_08_world_spell_dbc.sql (renamed from sql/updates/world/2011_09_03_08_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_09_world_spell_dbc.sql (renamed from sql/updates/world/2011_09_03_09_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_03_10_world_spell_dbc.sql (renamed from sql/updates/world/2011_09_03_10_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_04_00_world_quest_template.sql (renamed from sql/updates/world/2011_09_04_00_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_04_01_world_trinity_string.sql (renamed from sql/updates/world/2011_09_04_01_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_04_02_world_trinity_string.sql (renamed from sql/updates/world/2011_09_04_02_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_05_00_characters_character_quest_status.sql (renamed from sql/updates/characters/2011_09_05_00_characters_character_quest_status.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_05_00_world_spell_target_position.sql (renamed from sql/updates/world/2011_09_05_00_world_spell_target_position.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_05_01_world_gossip.sql (renamed from sql/updates/world/2011_09_05_01_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_06_00_world_sai.sql (renamed from sql/updates/world/2011_09_06_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_06_01_world_misc.sql (renamed from sql/updates/world/2011_09_06_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_07_00_world_spell_linked_spell.sql (renamed from sql/updates/world/2011_09_07_00_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_07_01_world_sai.sql (renamed from sql/updates/world/2011_09_07_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_08_00_world_conditions.sql (renamed from sql/updates/world/2011_09_08_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_08_01_world_spell_target_position.sql (renamed from sql/updates/world/2011_09_08_01_world_spell_target_position.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_08_02_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_08_02_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_08_03_world_item_template.sql (renamed from sql/updates/world/2011_09_08_03_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_10_00_world_spell_linked_spell.sql (renamed from sql/updates/world/2011_09_10_00_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_00_world_creature_template.sql (renamed from sql/updates/world/2011_09_11_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_01_world_sai.sql (renamed from sql/updates/world/2011_09_11_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_02_world_creature_template.sql (renamed from sql/updates/world/2011_09_11_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_03_world_gameobject.sql (renamed from sql/updates/world/2011_09_11_03_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql (renamed from sql/updates/world/2011_09_11_04_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_05_world_misc.sql (renamed from sql/updates/world/2011_09_11_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql (renamed from sql/updates/world/2011_09_11_06_world_spell_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_07_world_sai.sql (renamed from sql/updates/world/2011_09_11_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_08_world_creature.sql (renamed from sql/updates/world/2011_09_11_08_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_11_09_world_script_texts.sql (renamed from sql/updates/world/2011_09_11_09_world_script_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_00_world_misc.sql (renamed from sql/updates/world/2011_09_12_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_01_world_misc.sql (renamed from sql/updates/world/2011_09_12_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_02_world_instance_template.sql (renamed from sql/updates/world/2011_09_12_02_world_instance_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_03_world_conditions.sql (renamed from sql/updates/world/2011_09_12_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql (renamed from sql/updates/world/2011_09_12_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_05_world_misc.sql (renamed from sql/updates/world/2011_09_12_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_06_world_event_scripts.sql (renamed from sql/updates/world/2011_09_12_06_world_event_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_12_07_world_creature.sql (renamed from sql/updates/world/2011_09_12_07_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_13_00_world_spells.sql (renamed from sql/updates/world/2011_09_13_00_world_spells.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_00_world_spawns.sql (renamed from sql/updates/world/2011_09_14_00_world_spawns.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_01_world_quest.sql (renamed from sql/updates/world/2011_09_14_01_world_quest.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_02_world_gossip_menu_option.sql (renamed from sql/updates/world/2011_09_14_02_world_gossip_menu_option.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_03_world_script_texts.sql (renamed from sql/updates/world/2011_09_14_03_world_script_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_04_world_creature.sql (renamed from sql/updates/world/2011_09_14_04_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_05_world_creature_text.sql (renamed from sql/updates/world/2011_09_14_05_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql (renamed from sql/updates/world/2011_09_14_06_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_15_00_world_creature.sql (renamed from sql/updates/world/2011_09_15_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_15_01_world_creature_template.sql (renamed from sql/updates/world/2011_09_15_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_15_02_world_misc.sql (renamed from sql/updates/world/2011_09_15_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_15_03_world_creature_template.sql (renamed from sql/updates/world/2011_09_15_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_15_04_world_misc.sql (renamed from sql/updates/world/2011_09_15_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_15_05_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_15_05_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_16_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_16_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_19_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_19_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_21_00_world_misc.sql (renamed from sql/updates/world/2011_09_21_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_21_01_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_21_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_21_02_world_command.sql (renamed from sql/updates/world/2011_09_21_02_world_command.sql)6
-rw-r--r--sql/old/3.3.5a/2011_09_21_02_world_trinity_string.sql (renamed from sql/updates/world/2011_09_21_02_world_trinity_string.sql)8
-rw-r--r--sql/old/3.3.5a/2011_09_22_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_22_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_24_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_24_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_24_01_world_sai.sql (renamed from sql/updates/world/2011_09_24_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_25_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_25_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_09_26_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_28_00_characters_characters.sql (renamed from sql/updates/characters/2011_09_28_00_characters_characters.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_28_00_world_achievement_reward.sql (renamed from sql/updates/world/2011_09_28_00_world_achievement_reward.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_28_01_world_spell_dbc.sql (renamed from sql/updates/world/2011_09_28_01_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_09_28_02_world_game_event.sql (renamed from sql/updates/world/2011_09_28_02_world_game_event.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_00_world_creature_template.sql (renamed from sql/updates/world/2011_10_01_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_01_world_gameobject_template.sql (renamed from sql/updates/world/2011_10_01_01_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql (renamed from sql/updates/world/2011_10_01_02_world_game_event_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_03_world_conditions.sql (renamed from sql/updates/world/2011_10_01_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_04_world_sai.sql (renamed from sql/updates/world/2011_10_01_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_05_world_sai.sql (renamed from sql/updates/world/2011_10_01_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_06_world_misc.sql (renamed from sql/updates/world/2011_10_01_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_07_world_sai.sql (renamed from sql/updates/world/2011_10_01_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_08_world_sai.sql (renamed from sql/updates/world/2011_10_01_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_09_world_creatures.sql (renamed from sql/updates/world/2011_10_01_09_world_creatures.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_10_world_questrelation.sql (renamed from sql/updates/world/2011_10_01_10_world_questrelation.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_11_world_loot.sql (renamed from sql/updates/world/2011_10_01_11_world_loot.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_12_world_creatures.sql (renamed from sql/updates/world/2011_10_01_12_world_creatures.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_01_13_world_dbc.sql (renamed from sql/updates/world/2011_10_01_13_world_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_00_world_creature_template.sql (renamed from sql/updates/world/2011_10_02_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql (renamed from sql/updates/world/2011_10_02_01_world_factionchange.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_03_world_sai.sql (renamed from sql/updates/world/2011_10_02_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_04_world_sai.sql (renamed from sql/updates/world/2011_10_02_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_05_world_sai.sql (renamed from sql/updates/world/2011_10_02_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_06_world_misc.sql (renamed from sql/updates/world/2011_10_02_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_07_world_sai.sql (renamed from sql/updates/world/2011_10_02_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_08_world_sai.sql (renamed from sql/updates/world/2011_10_02_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_09_world_creatures.sql (renamed from sql/updates/world/2011_10_02_09_world_creatures.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_10_world_sai.sql (renamed from sql/updates/world/2011_10_02_10_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_11_world_sai.sql (renamed from sql/updates/world/2011_10_02_11_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_12_world_sai.sql (renamed from sql/updates/world/2011_10_02_12_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_13_world_sai.sql (renamed from sql/updates/world/2011_10_02_13_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_14_world_sai.sql (renamed from sql/updates/world/2011_10_02_14_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_02_15_world_sai.sql (renamed from sql/updates/world/2011_10_02_15_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_04_00_world_creature_loot_template.sql (renamed from sql/updates/world/2011_10_04_00_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_05_00_world_spell_linked_spell.sql (renamed from sql/updates/world/2011_10_05_00_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_05_01_world_instance_misc.sql (renamed from sql/updates/world/2011_10_05_01_world_instance_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_05_01_world_scriptname.sql (renamed from sql/updates/world/2011_10_05_01_world_scriptname.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_05_01_world_spell_script_names.sql (renamed from sql/updates/world/2011_10_05_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_06_00_world_creature_template.sql (renamed from sql/updates/world/2011_10_06_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_06_01_world_misc.sql (renamed from sql/updates/world/2011_10_06_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_07_00_world_spell_script_names.sql (renamed from sql/updates/world/2011_10_07_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_07_01_world_command.sql (renamed from sql/updates/world/2011_10_07_01_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql (renamed from sql/updates/world/2011_10_07_02_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/2011_10_08_00_world_page_text.sql128
-rw-r--r--sql/old/3.3.5a/2011_10_09_00_characters_character_aura.sql1
-rw-r--r--sql/old/3.3.5a/2011_10_11_00_world_creature_template.sql1
-rw-r--r--sql/old/3.3.5a/2011_10_12_00_world_spell_script_names.sql6
-rw-r--r--sql/old/3.3.5a/2011_10_15_00_world_waypoint_data.sql1
-rw-r--r--sql/old/3.3.5a/2011_10_18_00_world_spell_group.sql9
-rw-r--r--sql/old/3.3.5a/2011_10_18_01_world_spell_group_stack_rules.sql3
-rw-r--r--sql/old/3.3.5a/2011_10_19_00_world_spell_script_names.sql3
-rw-r--r--sql/old/3.3.5a/2011_10_21_00_world_creature_template_addon.sql3
-rw-r--r--sql/old/3.3.5a/2011_10_22_00_world_sai.sql44
-rw-r--r--sql/old/3.3.5a/2011_10_22_01_world_quest_relation.sql36
-rw-r--r--sql/old/3.3.5a/2011_10_22_02_world_gameobject_template.sql4
-rw-r--r--sql/old/3.3.5a/2011_10_22_03_world_sai.sql69
-rw-r--r--sql/old/3.3.5a/2011_10_22_04_world_sai.sql145
-rw-r--r--sql/old/3.3.5a/2011_10_22_05_world_misc.sql14
-rw-r--r--sql/old/3.3.5a/2011_10_22_06_world_sai.sql19
-rw-r--r--sql/old/3.3.5a/2011_10_22_07_world_sai.sql51
-rw-r--r--sql/old/3.3.5a/2011_10_22_08_world_sai.sql108
-rw-r--r--sql/old/3.3.5a/2011_10_22_09_world_sai.sql47
-rw-r--r--sql/old/3.3.5a/2011_10_22_10_world_sai.sql28
-rw-r--r--sql/old/3.3.5a/2011_10_22_11_world_sai.sql17
-rw-r--r--sql/old/3.3.5a/2011_10_22_12_world_sai.sql21
-rw-r--r--sql/old/3.3.5a/2011_10_22_13_world_sai.sql62
-rw-r--r--sql/old/3.3.5a/2011_10_22_14_world_sai.sql56
-rw-r--r--sql/old/3.3.5a/2011_10_22_15_world_core_script_support.sql36
-rw-r--r--sql/old/3.3.5a/2011_10_22_16_world_core_script_support.sql10
-rw-r--r--sql/old/3.3.5a/2011_10_22_17_world_conditions.sql5
-rw-r--r--sql/old/3.3.5a/2011_10_22_18_world_misc.sql104
-rw-r--r--sql/old/3.3.5a/2011_10_22_19_world_sai.sql20
-rw-r--r--sql/old/3.3.5a/2011_10_23_00_world_sai.sql57
-rw-r--r--sql/old/3.3.5a/2011_10_23_01_world_sai.sql8
-rw-r--r--sql/old/3.3.5a/2011_10_23_02_world_sai.sql9
-rw-r--r--sql/old/3.3.5a/2011_10_23_03_world_sai.sql159
-rw-r--r--sql/old/3.3.5a/2011_10_23_04_world_sai.sql50
-rw-r--r--sql/old/3.3.5a/2011_10_23_05_world_misc.sql16
-rw-r--r--sql/old/3.3.5a/2011_10_23_06_world_sai.sql44
-rw-r--r--sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql98
-rw-r--r--sql/old/3.3.5a/2011_10_23_07_world_sai.sql53
-rw-r--r--sql/old/3.3.5a/2011_10_23_08_world_sai.sql175
-rw-r--r--sql/old/3.3.5a/2011_10_24_00_world_sai.sql20
-rw-r--r--sql/old/3.3.5a/2011_10_24_01_world_creature_text.sql9
-rw-r--r--sql/old/3.3.5a/2011_10_24_02_world_core_script_support.sql22
-rw-r--r--sql/old/3.3.5a/2011_10_28_00_world_version.sql1
-rw-r--r--sql/updates/world/2011_10_29_00_world_version.sql1
-rw-r--r--sql/updates/world/2011_10_29_01_world_gameobject_template.sql9
-rw-r--r--sql/updates/world/2011_10_29_02_world_gameobject_template.sql1
-rw-r--r--sql/updates/world/2011_10_29_03_world_gameobject_template.sql5
-rw-r--r--sql/updates/world/2011_10_29_04_world_linked_respawn.sql7
-rw-r--r--sql/updates/world/2011_10_29_05_world_sai.sql26
-rw-r--r--sql/updates/world/2011_10_29_06_world_misc.sql11
-rw-r--r--sql/updates/world/2011_10_29_06_world_sai.sql6
-rw-r--r--sql/updates/world/2011_10_29_07_world_gameobjects.sql13
-rw-r--r--sql/updates/world/2011_10_30_00_world_misc.sql20
-rw-r--r--sql/updates/world/2011_10_30_01_world_misc.sql54
-rw-r--r--sql/updates/world/2011_10_30_02_world_creature_template.sql33
-rw-r--r--sql/updates/world/2011_10_30_02_world_player_factionchange_achievement.sql63
-rw-r--r--sql/updates/world/2011_11_01_00_world_sai.sql9
-rw-r--r--sql/updates/world/2011_11_07_00_world_player_factionchange_items.sql7
-rw-r--r--sql/updates/world/2011_11_07_01_world_areatrigger_teleport.sql3
-rw-r--r--sql/updates/world/2011_11_07_02_world_misc.sql10
-rw-r--r--sql/updates/world/2011_11_07_03_world_misc.sql6
-rw-r--r--sql/updates/world/2011_11_11_00_world_spell_proc_event.sql1
-rw-r--r--sql/updates/world/2011_11_11_01_world_misc.sql14
-rw-r--r--sql/updates/world/2011_11_13_00_world_spell_proc_event.sql4
-rw-r--r--sql/updates/world/2011_11_13_01_world_sai.sql38
-rw-r--r--sql/updates/world/2011_11_13_02_world_pool_template.sql6095
-rw-r--r--sql/updates/world/2011_11_13_03_world_npc_trainer.sql5
-rw-r--r--sql/updates/world/2011_11_13_04_world_creature_loot_template.sql4
-rw-r--r--sql/updates/world/2011_11_13_05_world_creature_loot_template.sql4
-rw-r--r--sql/updates/world/2011_11_13_06_world_reference_loot_template.sql9
-rw-r--r--sql/updates/world/2011_11_13_07_world_creature_loot_template.sql5
-rw-r--r--sql/updates/world/2011_11_13_08_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2011_11_13_09_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2011_11_13_10_world_creature_loot_template.sql2
-rw-r--r--sql/updates/world/2011_11_13_11_world_creature_loot_template.sql6
-rw-r--r--sql/updates/world/2011_11_13_12_world_creature_loot_template.sql4
-rw-r--r--sql/updates/world/2011_11_20_00_world_command.sql1
-rw-r--r--sql/updates/world/2011_11_20_01_world_sai.sql45
-rw-r--r--sql/updates/world/2011_11_20_02_world_sai.sql45
-rw-r--r--sql/updates/world/2011_11_20_03_world_sai.sql49
-rw-r--r--sql/updates/world/2011_11_20_04_world_sai.sql24
-rw-r--r--sql/updates/world/2011_11_20_05_world_sai.sql78
-rw-r--r--sql/updates/world/2011_11_20_06_world_sai.sql57
-rw-r--r--sql/updates/world/2011_11_20_07_world_sai.sql212
-rw-r--r--sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql5
-rw-r--r--sql/updates/world/2011_11_20_09_world_sai.sql35
-rw-r--r--sql/updates/world/2011_11_20_10_world_sai.sql55
-rw-r--r--sql/updates/world/2011_11_20_11_world_sai.sql9
-rw-r--r--sql/updates/world/2011_11_20_12_world_sai.sql30
-rw-r--r--sql/updates/world/2011_11_20_13_world_sai.sql15
-rw-r--r--sql/updates/world/2011_11_20_14_world_revert.sql4
-rw-r--r--sql/updates/world/2011_11_20_15_world_sai.sql41
-rw-r--r--sql/updates/world/2011_11_21_00_world_db_errors.sql11
-rw-r--r--sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql1
-rw-r--r--sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql11
-rw-r--r--sql/updates/world/2011_11_21_03_pilgrim_misc.sql145
-rwxr-xr-xsrc/server/authserver/Server/AuthSocket.cpp1
-rwxr-xr-xsrc/server/collision/BoundingIntervalHierarchy.h1
-rw-r--r--src/server/collision/Models/WorldModel.cpp3
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp6
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.h2
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAI.cpp13
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp5
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp33
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp121
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h18
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp68
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h27
-rwxr-xr-xsrc/server/game/Achievements/AchievementMgr.cpp7
-rwxr-xr-xsrc/server/game/Achievements/AchievementMgr.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.cpp38
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp286
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.h12
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundMgr.cpp46
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundMgr.h8
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundQueue.cpp161
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundQueue.h1
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAA.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAA.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.cpp16
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAV.cpp28
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAV.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundBE.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundBE.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundDS.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundDS.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.cpp50
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundIC.cpp318
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundIC.h9
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundNA.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundNA.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRB.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRB.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRL.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRL.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRV.cpp8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRV.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundSA.cpp74
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundSA.h6
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundWS.cpp36
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundWS.h4
-rwxr-xr-xsrc/server/game/Chat/Channels/Channel.cpp86
-rwxr-xr-xsrc/server/game/Chat/Chat.cpp29
-rwxr-xr-xsrc/server/game/Chat/Chat.h2
-rwxr-xr-xsrc/server/game/Chat/Commands/Level1.cpp28
-rwxr-xr-xsrc/server/game/Chat/Commands/Level2.cpp10
-rwxr-xr-xsrc/server/game/Chat/Commands/Level3.cpp61
-rwxr-xr-xsrc/server/game/DataStores/DBCStores.cpp2
-rwxr-xr-xsrc/server/game/DataStores/DBCStores.h1
-rwxr-xr-xsrc/server/game/DataStores/DBCStructure.h24
-rwxr-xr-xsrc/server/game/DataStores/DBCfmt.h3
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp208
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.h12
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp25
-rwxr-xr-xsrc/server/game/Entities/Corpse/Corpse.cpp4
-rwxr-xr-xsrc/server/game/Entities/Corpse/Corpse.h6
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp90
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.h49
-rwxr-xr-xsrc/server/game/Entities/Creature/GossipDef.cpp2
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp110
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.h5
-rwxr-xr-xsrc/server/game/Entities/Item/Item.cpp34
-rwxr-xr-xsrc/server/game/Entities/Item/Item.h3
-rwxr-xr-xsrc/server/game/Entities/Item/ItemPrototype.h1
-rwxr-xr-xsrc/server/game/Entities/Object/Object.cpp114
-rwxr-xr-xsrc/server/game/Entities/Object/Object.h50
-rwxr-xr-xsrc/server/game/Entities/Object/ObjectPosSelector.cpp22
-rwxr-xr-xsrc/server/game/Entities/Object/ObjectPosSelector.h4
-rwxr-xr-xsrc/server/game/Entities/Object/Updates/UpdateMask.h3
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp6
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp296
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h64
-rwxr-xr-xsrc/server/game/Entities/Player/SocialMgr.cpp10
-rwxr-xr-xsrc/server/game/Entities/Player/SocialMgr.h2
-rwxr-xr-xsrc/server/game/Entities/Totem/Totem.cpp5
-rwxr-xr-xsrc/server/game/Entities/Transport/Transport.cpp18
-rwxr-xr-xsrc/server/game/Entities/Unit/StatSystem.cpp69
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp291
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h63
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp8
-rwxr-xr-xsrc/server/game/Events/GameEventMgr.cpp14
-rwxr-xr-xsrc/server/game/Events/GameEventMgr.h4
-rwxr-xr-xsrc/server/game/Globals/ObjectAccessor.cpp68
-rwxr-xr-xsrc/server/game/Globals/ObjectAccessor.h91
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp66
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h6
-rwxr-xr-xsrc/server/game/Grids/Cells/Cell.h103
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/Cells/CellImpl.h196
-rwxr-xr-xsrc/server/game/Grids/Grid.h49
-rw-r--r--[-rwxr-xr-x]src/server/game/Grids/GridDefines.h88
-rwxr-xr-xsrc/server/game/Grids/GridLoader.h13
-rwxr-xr-xsrc/server/game/Grids/GridStates.cpp27
-rwxr-xr-xsrc/server/game/Grids/GridStates.h14
-rwxr-xr-xsrc/server/game/Grids/NGrid.h63
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.cpp53
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h17
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiersImpl.h6
-rwxr-xr-xsrc/server/game/Grids/ObjectGridLoader.cpp172
-rwxr-xr-xsrc/server/game/Grids/ObjectGridLoader.h78
-rwxr-xr-xsrc/server/game/Groups/Group.cpp55
-rwxr-xr-xsrc/server/game/Groups/Group.h16
-rwxr-xr-xsrc/server/game/Guilds/Guild.cpp14
-rwxr-xr-xsrc/server/game/Guilds/Guild.h8
-rwxr-xr-xsrc/server/game/Instances/InstanceSaveMgr.h6
-rwxr-xr-xsrc/server/game/Instances/InstanceScript.cpp16
-rwxr-xr-xsrc/server/game/Loot/LootMgr.cpp34
-rwxr-xr-xsrc/server/game/Loot/LootMgr.h2
-rwxr-xr-xsrc/server/game/Maps/Map.cpp511
-rwxr-xr-xsrc/server/game/Maps/Map.h105
-rwxr-xr-xsrc/server/game/Maps/MapInstanced.cpp4
-rwxr-xr-xsrc/server/game/Maps/MapInstanced.h8
-rwxr-xr-xsrc/server/game/Maps/MapManager.cpp10
-rw-r--r--src/server/game/Maps/MapUpdater.cpp6
-rwxr-xr-xsrc/server/game/Miscellaneous/Formulas.h6
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h12
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp31
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp10
-rwxr-xr-xsrc/server/game/Movement/Traveller.h4
-rwxr-xr-xsrc/server/game/Movement/Waypoints/WaypointManager.cpp24
-rwxr-xr-xsrc/server/game/Movement/Waypoints/WaypointManager.h2
-rwxr-xr-xsrc/server/game/OutdoorPvP/OutdoorPvP.cpp80
-rwxr-xr-xsrc/server/game/OutdoorPvP/OutdoorPvP.h42
-rwxr-xr-xsrc/server/game/OutdoorPvP/OutdoorPvPMgr.cpp38
-rwxr-xr-xsrc/server/game/OutdoorPvP/OutdoorPvPMgr.h12
-rwxr-xr-xsrc/server/game/Pools/PoolMgr.cpp16
-rwxr-xr-xsrc/server/game/Quests/QuestDef.cpp5
-rwxr-xr-xsrc/server/game/Quests/QuestDef.h2
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.cpp2
-rwxr-xr-xsrc/server/game/Scripting/MapScripts.cpp41
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp1
-rwxr-xr-xsrc/server/game/Scripting/ScriptSystem.cpp19
-rw-r--r--src/server/game/Scripting/ScriptSystem.h1
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp62
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CalendarHandler.cpp75
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CharacterHandler.cpp10
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ChatHandler.cpp7
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/DuelHandler.cpp14
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/GroupHandler.cpp14
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ItemHandler.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/LFGHandler.cpp8
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/LootHandler.cpp4
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MailHandler.cpp162
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MiscHandler.cpp28
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MovementHandler.cpp10
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/QueryHandler.cpp76
-rw-r--r--src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp20
-rwxr-xr-xsrc/server/game/Server/Protocol/WorldLog.cpp4
-rwxr-xr-xsrc/server/game/Server/WorldSession.cpp19
-rwxr-xr-xsrc/server/game/Server/WorldSession.h170
-rwxr-xr-xsrc/server/game/Server/WorldSocket.cpp2
-rwxr-xr-xsrc/server/game/Server/WorldSocketMgr.cpp6
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp65
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp9
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp79
-rwxr-xr-xsrc/server/game/Spells/Spell.h4
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp139
-rw-r--r--src/server/game/Spells/SpellInfo.cpp11
-rw-r--r--src/server/game/Spells/SpellInfo.h1
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp158
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.h69
-rwxr-xr-xsrc/server/game/Texts/CreatureTextMgr.cpp8
-rw-r--r--src/server/game/Tools/PlayerDump.cpp12
-rwxr-xr-xsrc/server/game/World/World.cpp70
-rwxr-xr-xsrc/server/game/World/World.h17
-rw-r--r--src/server/scripts/Commands/cs_account.cpp291
-rw-r--r--src/server/scripts/Commands/cs_achievement.cpp10
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp441
-rw-r--r--src/server/scripts/Commands/cs_event.cpp68
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp60
-rw-r--r--src/server/scripts/Commands/cs_go.cpp330
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp425
-rw-r--r--src/server/scripts/Commands/cs_gps.cpp86
-rw-r--r--src/server/scripts/Commands/cs_honor.cpp11
-rw-r--r--src/server/scripts/Commands/cs_learn.cpp124
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp14
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp47
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp76
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp36
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp62
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp62
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp52
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp214
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp23
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp39
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp137
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp32
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp5
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp9
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp5
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp86
-rw-r--r--src/server/scripts/EasternKingdoms/undercity.cpp6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp8
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp15
-rw-r--r--src/server/scripts/Kalimdor/azshara.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp (renamed from src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp)0
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp2
-rw-r--r--src/server/scripts/Northrend/CMakeLists.txt48
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp4
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp9
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp4
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h1
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp37
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp4
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp8
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp54
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp7
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp17
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp7
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp6
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp3
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp)24
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp)5
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp)98
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h (renamed from src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h)0
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp (renamed from src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp)0
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp3
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp2
-rw-r--r--src/server/scripts/Northrend/dalaran.cpp5
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp4
-rwxr-xr-xsrc/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp2
-rwxr-xr-xsrc/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp4
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp249
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp4
-rw-r--r--src/server/scripts/Outland/nagrand.cpp730
-rw-r--r--src/server/scripts/Outland/shattrath_city.cpp2
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp51
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp114
-rw-r--r--src/server/scripts/World/go_scripts.cpp83
-rw-r--r--src/server/scripts/World/npc_professions.cpp4
-rwxr-xr-xsrc/server/shared/Common.h25
-rwxr-xr-xsrc/server/shared/Cryptography/ARC4.h2
-rwxr-xr-xsrc/server/shared/Cryptography/Authentication/AuthCrypt.cpp3
-rwxr-xr-xsrc/server/shared/Cryptography/Authentication/AuthCrypt.h1
-rwxr-xr-xsrc/server/shared/Cryptography/BigNumber.cpp23
-rwxr-xr-xsrc/server/shared/Cryptography/BigNumber.h2
-rwxr-xr-xsrc/server/shared/Cryptography/HMACSHA1.h3
-rwxr-xr-xsrc/server/shared/Cryptography/SHA1.h4
-rwxr-xr-xsrc/server/shared/Dynamic/TypeContainer.h10
-rwxr-xr-xsrc/server/shared/Dynamic/TypeContainerFunctions.h51
-rwxr-xr-xsrc/server/shared/Dynamic/UnorderedMap.h1
-rwxr-xr-xsrc/server/shared/Logging/Log.cpp2
-rwxr-xr-xsrc/server/shared/Logging/Log.h6
-rwxr-xr-xsrc/server/shared/Utilities/Util.cpp7
-rwxr-xr-xsrc/server/worldserver/CommandLine/CliRunnable.cpp34
-rwxr-xr-xsrc/server/worldserver/Master.cpp1
-rw-r--r--src/server/worldserver/RemoteAccess/RARunnable.cpp11
529 files changed, 14891 insertions, 6216 deletions
diff --git a/sql/updates/world/2011_08_27_00_world_version.sql b/sql/old/3.3.5a/2011_08_27_00_world_version.sql
index 47acc763681..47acc763681 100644
--- a/sql/updates/world/2011_08_27_00_world_version.sql
+++ b/sql/old/3.3.5a/2011_08_27_00_world_version.sql
diff --git a/sql/updates/world/2011_08_27_01_world_spell_script_names.sql b/sql/old/3.3.5a/2011_08_27_01_world_spell_script_names.sql
index 7ca3c9f4d64..7ca3c9f4d64 100644
--- a/sql/updates/world/2011_08_27_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_08_27_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_08_28_00_world_instance_misc.sql b/sql/old/3.3.5a/2011_08_28_00_world_instance_misc.sql
index 751321d1187..751321d1187 100644
--- a/sql/updates/world/2011_08_28_00_world_instance_misc.sql
+++ b/sql/old/3.3.5a/2011_08_28_00_world_instance_misc.sql
diff --git a/sql/updates/world/2011_08_29_00_world_instance_misc.sql b/sql/old/3.3.5a/2011_08_29_00_world_instance_misc.sql
index 51a5e651d74..51a5e651d74 100644
--- a/sql/updates/world/2011_08_29_00_world_instance_misc.sql
+++ b/sql/old/3.3.5a/2011_08_29_00_world_instance_misc.sql
diff --git a/sql/updates/world/2011_08_30_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_08_30_00_world_spell_script_names.sql
index ebfc8f0cc6e..ebfc8f0cc6e 100644
--- a/sql/updates/world/2011_08_30_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_08_30_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_01_00_world_disables.sql b/sql/old/3.3.5a/2011_09_01_00_world_disables.sql
index ee952215204..ee952215204 100644
--- a/sql/updates/world/2011_09_01_00_world_disables.sql
+++ b/sql/old/3.3.5a/2011_09_01_00_world_disables.sql
diff --git a/sql/updates/world/2011_09_02_00_world_misc.sql b/sql/old/3.3.5a/2011_09_02_00_world_misc.sql
index fa5c2a7ba7b..fa5c2a7ba7b 100644
--- a/sql/updates/world/2011_09_02_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_02_00_world_misc.sql
diff --git a/sql/updates/world/2011_09_02_02_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_02_02_world_spell_script_names.sql
index b95cd2c17d6..b95cd2c17d6 100644
--- a/sql/updates/world/2011_09_02_02_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_02_02_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_03_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_03_00_world_spell_script_names.sql
index 6cec12b63fd..6cec12b63fd 100644
--- a/sql/updates/world/2011_09_03_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_03_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_03_01_world_conditions.sql b/sql/old/3.3.5a/2011_09_03_01_world_conditions.sql
index c830d3ad18e..c830d3ad18e 100644
--- a/sql/updates/world/2011_09_03_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_09_03_01_world_conditions.sql
diff --git a/sql/updates/world/2011_09_03_02_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_03_02_world_spell_script_names.sql
index b7b6907b7f1..b7b6907b7f1 100644
--- a/sql/updates/world/2011_09_03_02_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_03_02_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_03_03_world_creature_template.sql b/sql/old/3.3.5a/2011_09_03_03_world_creature_template.sql
index 73bd1687ef6..73bd1687ef6 100644
--- a/sql/updates/world/2011_09_03_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_03_03_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_03_04_world_misc.sql b/sql/old/3.3.5a/2011_09_03_04_world_misc.sql
index f35cebe2014..f35cebe2014 100644
--- a/sql/updates/world/2011_09_03_04_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_03_04_world_misc.sql
diff --git a/sql/updates/world/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..53bc3104c50 100644
--- a/sql/updates/world/2011_09_03_05_world_gossip_menu_option.sql
+++ b/sql/old/3.3.5a/2011_09_03_05_world_gossip_menu_option.sql
diff --git a/sql/updates/world/2011_09_03_06_world_spell_threat.sql b/sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql
index a59a7739350..a59a7739350 100644
--- a/sql/updates/world/2011_09_03_06_world_spell_threat.sql
+++ b/sql/old/3.3.5a/2011_09_03_06_world_spell_threat.sql
diff --git a/sql/updates/world/2011_09_03_07_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2011_09_03_07_world_achievement_criteria_data.sql
index 7ae27745be6..7ae27745be6 100644
--- a/sql/updates/world/2011_09_03_07_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2011_09_03_07_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2011_09_03_08_world_spell_dbc.sql b/sql/old/3.3.5a/2011_09_03_08_world_spell_dbc.sql
index 4d57e320822..4d57e320822 100644
--- a/sql/updates/world/2011_09_03_08_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2011_09_03_08_world_spell_dbc.sql
diff --git a/sql/updates/world/2011_09_03_09_world_spell_dbc.sql b/sql/old/3.3.5a/2011_09_03_09_world_spell_dbc.sql
index 31d4b19b1ca..31d4b19b1ca 100644
--- a/sql/updates/world/2011_09_03_09_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2011_09_03_09_world_spell_dbc.sql
diff --git a/sql/updates/world/2011_09_03_10_world_spell_dbc.sql b/sql/old/3.3.5a/2011_09_03_10_world_spell_dbc.sql
index 119bf863a8b..119bf863a8b 100644
--- a/sql/updates/world/2011_09_03_10_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2011_09_03_10_world_spell_dbc.sql
diff --git a/sql/updates/world/2011_09_04_00_world_quest_template.sql b/sql/old/3.3.5a/2011_09_04_00_world_quest_template.sql
index 4ff774b65b4..4ff774b65b4 100644
--- a/sql/updates/world/2011_09_04_00_world_quest_template.sql
+++ b/sql/old/3.3.5a/2011_09_04_00_world_quest_template.sql
diff --git a/sql/updates/world/2011_09_04_01_world_trinity_string.sql b/sql/old/3.3.5a/2011_09_04_01_world_trinity_string.sql
index 0f36a362db9..0f36a362db9 100644
--- a/sql/updates/world/2011_09_04_01_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_09_04_01_world_trinity_string.sql
diff --git a/sql/updates/world/2011_09_04_02_world_trinity_string.sql b/sql/old/3.3.5a/2011_09_04_02_world_trinity_string.sql
index 36722947feb..36722947feb 100644
--- a/sql/updates/world/2011_09_04_02_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_09_04_02_world_trinity_string.sql
diff --git a/sql/updates/characters/2011_09_05_00_characters_character_quest_status.sql b/sql/old/3.3.5a/2011_09_05_00_characters_character_quest_status.sql
index 08ee801c9d1..08ee801c9d1 100644
--- a/sql/updates/characters/2011_09_05_00_characters_character_quest_status.sql
+++ b/sql/old/3.3.5a/2011_09_05_00_characters_character_quest_status.sql
diff --git a/sql/updates/world/2011_09_05_00_world_spell_target_position.sql b/sql/old/3.3.5a/2011_09_05_00_world_spell_target_position.sql
index ae0a69c6e99..ae0a69c6e99 100644
--- a/sql/updates/world/2011_09_05_00_world_spell_target_position.sql
+++ b/sql/old/3.3.5a/2011_09_05_00_world_spell_target_position.sql
diff --git a/sql/updates/world/2011_09_05_01_world_gossip.sql b/sql/old/3.3.5a/2011_09_05_01_world_gossip.sql
index 0d7a193eb95..0d7a193eb95 100644
--- a/sql/updates/world/2011_09_05_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2011_09_05_01_world_gossip.sql
diff --git a/sql/updates/world/2011_09_06_00_world_sai.sql b/sql/old/3.3.5a/2011_09_06_00_world_sai.sql
index fdc77bea6bb..fdc77bea6bb 100644
--- a/sql/updates/world/2011_09_06_00_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_06_00_world_sai.sql
diff --git a/sql/updates/world/2011_09_06_01_world_misc.sql b/sql/old/3.3.5a/2011_09_06_01_world_misc.sql
index 45ba8556ddc..45ba8556ddc 100644
--- a/sql/updates/world/2011_09_06_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_06_01_world_misc.sql
diff --git a/sql/updates/world/2011_09_07_00_world_spell_linked_spell.sql b/sql/old/3.3.5a/2011_09_07_00_world_spell_linked_spell.sql
index 584ef63c4ad..584ef63c4ad 100644
--- a/sql/updates/world/2011_09_07_00_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2011_09_07_00_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2011_09_07_01_world_sai.sql b/sql/old/3.3.5a/2011_09_07_01_world_sai.sql
index aba3bdfe578..aba3bdfe578 100644
--- a/sql/updates/world/2011_09_07_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_07_01_world_sai.sql
diff --git a/sql/updates/world/2011_09_08_00_world_conditions.sql b/sql/old/3.3.5a/2011_09_08_00_world_conditions.sql
index 07eebd56c7e..07eebd56c7e 100644
--- a/sql/updates/world/2011_09_08_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_09_08_00_world_conditions.sql
diff --git a/sql/updates/world/2011_09_08_01_world_spell_target_position.sql b/sql/old/3.3.5a/2011_09_08_01_world_spell_target_position.sql
index 5b9fb09d14c..5b9fb09d14c 100644
--- a/sql/updates/world/2011_09_08_01_world_spell_target_position.sql
+++ b/sql/old/3.3.5a/2011_09_08_01_world_spell_target_position.sql
diff --git a/sql/updates/world/2011_09_08_02_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_08_02_world_spell_script_names.sql
index b97a1ef299a..b97a1ef299a 100644
--- a/sql/updates/world/2011_09_08_02_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_08_02_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_08_03_world_item_template.sql b/sql/old/3.3.5a/2011_09_08_03_world_item_template.sql
index c5809d798fa..c5809d798fa 100644
--- a/sql/updates/world/2011_09_08_03_world_item_template.sql
+++ b/sql/old/3.3.5a/2011_09_08_03_world_item_template.sql
diff --git a/sql/updates/world/2011_09_10_00_world_spell_linked_spell.sql b/sql/old/3.3.5a/2011_09_10_00_world_spell_linked_spell.sql
index 93365589b44..93365589b44 100644
--- a/sql/updates/world/2011_09_10_00_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2011_09_10_00_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2011_09_11_00_world_creature_template.sql b/sql/old/3.3.5a/2011_09_11_00_world_creature_template.sql
index a4bf485350b..a4bf485350b 100644
--- a/sql/updates/world/2011_09_11_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_11_00_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_11_01_world_sai.sql b/sql/old/3.3.5a/2011_09_11_01_world_sai.sql
index 453acf60dd9..453acf60dd9 100644
--- a/sql/updates/world/2011_09_11_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_11_01_world_sai.sql
diff --git a/sql/updates/world/2011_09_11_02_world_creature_template.sql b/sql/old/3.3.5a/2011_09_11_02_world_creature_template.sql
index 1784e983832..1784e983832 100644
--- a/sql/updates/world/2011_09_11_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_11_02_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_11_03_world_gameobject.sql b/sql/old/3.3.5a/2011_09_11_03_world_gameobject.sql
index b72898ba8a9..b72898ba8a9 100644
--- a/sql/updates/world/2011_09_11_03_world_gameobject.sql
+++ b/sql/old/3.3.5a/2011_09_11_03_world_gameobject.sql
diff --git a/sql/updates/world/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..120378bd3e2 100644
--- a/sql/updates/world/2011_09_11_04_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2011_09_11_04_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2011_09_11_05_world_misc.sql b/sql/old/3.3.5a/2011_09_11_05_world_misc.sql
index 7357d9acda6..7357d9acda6 100644
--- a/sql/updates/world/2011_09_11_05_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_11_05_world_misc.sql
diff --git a/sql/updates/world/2011_09_11_06_world_spell_conditions.sql b/sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql
index a4608599452..a4608599452 100644
--- a/sql/updates/world/2011_09_11_06_world_spell_conditions.sql
+++ b/sql/old/3.3.5a/2011_09_11_06_world_spell_conditions.sql
diff --git a/sql/updates/world/2011_09_11_07_world_sai.sql b/sql/old/3.3.5a/2011_09_11_07_world_sai.sql
index 02a593eb9b4..02a593eb9b4 100644
--- a/sql/updates/world/2011_09_11_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_11_07_world_sai.sql
diff --git a/sql/updates/world/2011_09_11_08_world_creature.sql b/sql/old/3.3.5a/2011_09_11_08_world_creature.sql
index de608e7cdff..de608e7cdff 100644
--- a/sql/updates/world/2011_09_11_08_world_creature.sql
+++ b/sql/old/3.3.5a/2011_09_11_08_world_creature.sql
diff --git a/sql/updates/world/2011_09_11_09_world_script_texts.sql b/sql/old/3.3.5a/2011_09_11_09_world_script_texts.sql
index 49bbca06877..49bbca06877 100644
--- a/sql/updates/world/2011_09_11_09_world_script_texts.sql
+++ b/sql/old/3.3.5a/2011_09_11_09_world_script_texts.sql
diff --git a/sql/updates/world/2011_09_12_00_world_misc.sql b/sql/old/3.3.5a/2011_09_12_00_world_misc.sql
index 18ead48b821..18ead48b821 100644
--- a/sql/updates/world/2011_09_12_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_12_00_world_misc.sql
diff --git a/sql/updates/world/2011_09_12_01_world_misc.sql b/sql/old/3.3.5a/2011_09_12_01_world_misc.sql
index f2fa54b1b17..f2fa54b1b17 100644
--- a/sql/updates/world/2011_09_12_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_12_01_world_misc.sql
diff --git a/sql/updates/world/2011_09_12_02_world_instance_template.sql b/sql/old/3.3.5a/2011_09_12_02_world_instance_template.sql
index 2fe38236e28..2fe38236e28 100644
--- a/sql/updates/world/2011_09_12_02_world_instance_template.sql
+++ b/sql/old/3.3.5a/2011_09_12_02_world_instance_template.sql
diff --git a/sql/updates/world/2011_09_12_03_world_conditions.sql b/sql/old/3.3.5a/2011_09_12_03_world_conditions.sql
index 757bdbf255e..757bdbf255e 100644
--- a/sql/updates/world/2011_09_12_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_09_12_03_world_conditions.sql
diff --git a/sql/updates/world/2011_09_12_04_world_creature_template.sql b/sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql
index 6b5a124540d..6b5a124540d 100644
--- a/sql/updates/world/2011_09_12_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_12_04_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_12_05_world_misc.sql b/sql/old/3.3.5a/2011_09_12_05_world_misc.sql
index ffb183b31e4..ffb183b31e4 100644
--- a/sql/updates/world/2011_09_12_05_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_12_05_world_misc.sql
diff --git a/sql/updates/world/2011_09_12_06_world_event_scripts.sql b/sql/old/3.3.5a/2011_09_12_06_world_event_scripts.sql
index eb6b26bc8a0..eb6b26bc8a0 100644
--- a/sql/updates/world/2011_09_12_06_world_event_scripts.sql
+++ b/sql/old/3.3.5a/2011_09_12_06_world_event_scripts.sql
diff --git a/sql/updates/world/2011_09_12_07_world_creature.sql b/sql/old/3.3.5a/2011_09_12_07_world_creature.sql
index d2496cb1eab..d2496cb1eab 100644
--- a/sql/updates/world/2011_09_12_07_world_creature.sql
+++ b/sql/old/3.3.5a/2011_09_12_07_world_creature.sql
diff --git a/sql/updates/world/2011_09_13_00_world_spells.sql b/sql/old/3.3.5a/2011_09_13_00_world_spells.sql
index 63e7b295831..63e7b295831 100644
--- a/sql/updates/world/2011_09_13_00_world_spells.sql
+++ b/sql/old/3.3.5a/2011_09_13_00_world_spells.sql
diff --git a/sql/updates/world/2011_09_14_00_world_spawns.sql b/sql/old/3.3.5a/2011_09_14_00_world_spawns.sql
index 4933af1b735..4933af1b735 100644
--- a/sql/updates/world/2011_09_14_00_world_spawns.sql
+++ b/sql/old/3.3.5a/2011_09_14_00_world_spawns.sql
diff --git a/sql/updates/world/2011_09_14_01_world_quest.sql b/sql/old/3.3.5a/2011_09_14_01_world_quest.sql
index 1b6c53f7d9d..1b6c53f7d9d 100644
--- a/sql/updates/world/2011_09_14_01_world_quest.sql
+++ b/sql/old/3.3.5a/2011_09_14_01_world_quest.sql
diff --git a/sql/updates/world/2011_09_14_02_world_gossip_menu_option.sql b/sql/old/3.3.5a/2011_09_14_02_world_gossip_menu_option.sql
index cb150388ffb..cb150388ffb 100644
--- a/sql/updates/world/2011_09_14_02_world_gossip_menu_option.sql
+++ b/sql/old/3.3.5a/2011_09_14_02_world_gossip_menu_option.sql
diff --git a/sql/updates/world/2011_09_14_03_world_script_texts.sql b/sql/old/3.3.5a/2011_09_14_03_world_script_texts.sql
index 8640b403a9a..8640b403a9a 100644
--- a/sql/updates/world/2011_09_14_03_world_script_texts.sql
+++ b/sql/old/3.3.5a/2011_09_14_03_world_script_texts.sql
diff --git a/sql/updates/world/2011_09_14_04_world_creature.sql b/sql/old/3.3.5a/2011_09_14_04_world_creature.sql
index 10ef4b7dbb3..10ef4b7dbb3 100644
--- a/sql/updates/world/2011_09_14_04_world_creature.sql
+++ b/sql/old/3.3.5a/2011_09_14_04_world_creature.sql
diff --git a/sql/updates/world/2011_09_14_05_world_creature_text.sql b/sql/old/3.3.5a/2011_09_14_05_world_creature_text.sql
index 9d91056d8db..9d91056d8db 100644
--- a/sql/updates/world/2011_09_14_05_world_creature_text.sql
+++ b/sql/old/3.3.5a/2011_09_14_05_world_creature_text.sql
diff --git a/sql/updates/world/2011_09_14_06_world_creature_template.sql b/sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql
index 4c7474895ad..4c7474895ad 100644
--- a/sql/updates/world/2011_09_14_06_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_14_06_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_15_00_world_creature.sql b/sql/old/3.3.5a/2011_09_15_00_world_creature.sql
index 12269e4744d..12269e4744d 100644
--- a/sql/updates/world/2011_09_15_00_world_creature.sql
+++ b/sql/old/3.3.5a/2011_09_15_00_world_creature.sql
diff --git a/sql/updates/world/2011_09_15_01_world_creature_template.sql b/sql/old/3.3.5a/2011_09_15_01_world_creature_template.sql
index 97303fcbe50..97303fcbe50 100644
--- a/sql/updates/world/2011_09_15_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_15_01_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_15_02_world_misc.sql b/sql/old/3.3.5a/2011_09_15_02_world_misc.sql
index 5d482feba80..5d482feba80 100644
--- a/sql/updates/world/2011_09_15_02_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_15_02_world_misc.sql
diff --git a/sql/updates/world/2011_09_15_03_world_creature_template.sql b/sql/old/3.3.5a/2011_09_15_03_world_creature_template.sql
index 82f6138f17a..82f6138f17a 100644
--- a/sql/updates/world/2011_09_15_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_09_15_03_world_creature_template.sql
diff --git a/sql/updates/world/2011_09_15_04_world_misc.sql b/sql/old/3.3.5a/2011_09_15_04_world_misc.sql
index 125bd7626f0..125bd7626f0 100644
--- a/sql/updates/world/2011_09_15_04_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_15_04_world_misc.sql
diff --git a/sql/updates/world/2011_09_15_05_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_15_05_world_spell_script_names.sql
index 418c05a4438..418c05a4438 100644
--- a/sql/updates/world/2011_09_15_05_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_15_05_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_16_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_16_00_world_spell_script_names.sql
index 98f268ec74f..98f268ec74f 100644
--- a/sql/updates/world/2011_09_16_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_16_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_19_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_19_00_world_spell_script_names.sql
index 5360210cef1..5360210cef1 100644
--- a/sql/updates/world/2011_09_19_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_19_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_21_00_world_misc.sql b/sql/old/3.3.5a/2011_09_21_00_world_misc.sql
index 730e27fb2b2..730e27fb2b2 100644
--- a/sql/updates/world/2011_09_21_00_world_misc.sql
+++ b/sql/old/3.3.5a/2011_09_21_00_world_misc.sql
diff --git a/sql/updates/world/2011_09_21_01_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_21_01_world_spell_script_names.sql
index d3c16bec947..d3c16bec947 100644
--- a/sql/updates/world/2011_09_21_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_21_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_21_02_world_command.sql b/sql/old/3.3.5a/2011_09_21_02_world_command.sql
index 629f0c9ab32..8b21f3434cc 100644
--- a/sql/updates/world/2011_09_21_02_world_command.sql
+++ b/sql/old/3.3.5a/2011_09_21_02_world_command.sql
@@ -1,3 +1,3 @@
-DELETE FROM command WHERE name = 'dev';
-INSERT INTO command VALUES
-('dev', 3, 'Syntax: .dev [on/off]\r\n\r\nEnable or Disable in game Dev tag or show current state if on/off not provided.');
+DELETE FROM command WHERE name = 'dev';
+INSERT INTO command VALUES
+('dev', 3, 'Syntax: .dev [on/off]\r\n\r\nEnable or Disable in game Dev tag or show current state if on/off not provided.');
diff --git a/sql/updates/world/2011_09_21_02_world_trinity_string.sql b/sql/old/3.3.5a/2011_09_21_02_world_trinity_string.sql
index 954c4a7eded..01795ebb916 100644
--- a/sql/updates/world/2011_09_21_02_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_09_21_02_world_trinity_string.sql
@@ -1,4 +1,4 @@
-DELETE FROM trinity_string WHERE entry IN (1137, 1138);
-INSERT INTO trinity_string (`entry`,`content_default`) VALUES
-(1137, 'Dev mode is ON'),
-(1138, 'Dev mode is OFF');
+DELETE FROM trinity_string WHERE entry IN (1137, 1138);
+INSERT INTO trinity_string (`entry`,`content_default`) VALUES
+(1137, 'Dev mode is ON'),
+(1138, 'Dev mode is OFF');
diff --git a/sql/updates/world/2011_09_22_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_22_00_world_spell_script_names.sql
index af75822087e..af75822087e 100644
--- a/sql/updates/world/2011_09_22_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_22_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_24_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_24_00_world_spell_script_names.sql
index d0f5b286739..d0f5b286739 100644
--- a/sql/updates/world/2011_09_24_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_24_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_09_24_01_world_sai.sql b/sql/old/3.3.5a/2011_09_24_01_world_sai.sql
index 7f4c79d5c74..7f4c79d5c74 100644
--- a/sql/updates/world/2011_09_24_01_world_sai.sql
+++ b/sql/old/3.3.5a/2011_09_24_01_world_sai.sql
diff --git a/sql/updates/world/2011_09_25_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_09_25_00_world_spell_script_names.sql
index a7c65ac75dd..a7c65ac75dd 100644
--- a/sql/updates/world/2011_09_25_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_25_00_world_spell_script_names.sql
diff --git a/sql/updates/world/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..4896990bb5b 100644
--- a/sql/updates/world/2011_09_26_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_09_26_00_world_spell_script_names.sql
diff --git a/sql/updates/characters/2011_09_28_00_characters_characters.sql b/sql/old/3.3.5a/2011_09_28_00_characters_characters.sql
index 800afc60622..800afc60622 100644
--- a/sql/updates/characters/2011_09_28_00_characters_characters.sql
+++ b/sql/old/3.3.5a/2011_09_28_00_characters_characters.sql
diff --git a/sql/updates/world/2011_09_28_00_world_achievement_reward.sql b/sql/old/3.3.5a/2011_09_28_00_world_achievement_reward.sql
index da170d86672..da170d86672 100644
--- a/sql/updates/world/2011_09_28_00_world_achievement_reward.sql
+++ b/sql/old/3.3.5a/2011_09_28_00_world_achievement_reward.sql
diff --git a/sql/updates/world/2011_09_28_01_world_spell_dbc.sql b/sql/old/3.3.5a/2011_09_28_01_world_spell_dbc.sql
index 3c0f9f38324..3c0f9f38324 100644
--- a/sql/updates/world/2011_09_28_01_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2011_09_28_01_world_spell_dbc.sql
diff --git a/sql/updates/world/2011_09_28_02_world_game_event.sql b/sql/old/3.3.5a/2011_09_28_02_world_game_event.sql
index 3e211e26119..3e211e26119 100644
--- a/sql/updates/world/2011_09_28_02_world_game_event.sql
+++ b/sql/old/3.3.5a/2011_09_28_02_world_game_event.sql
diff --git a/sql/updates/world/2011_10_01_00_world_creature_template.sql b/sql/old/3.3.5a/2011_10_01_00_world_creature_template.sql
index 14fe26ba476..14fe26ba476 100644
--- a/sql/updates/world/2011_10_01_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_10_01_00_world_creature_template.sql
diff --git a/sql/updates/world/2011_10_01_01_world_gameobject_template.sql b/sql/old/3.3.5a/2011_10_01_01_world_gameobject_template.sql
index 2df109e25e8..2df109e25e8 100644
--- a/sql/updates/world/2011_10_01_01_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/2011_10_01_01_world_gameobject_template.sql
diff --git a/sql/updates/world/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..9c332ccc3b2 100644
--- a/sql/updates/world/2011_10_01_02_world_game_event_creature.sql
+++ b/sql/old/3.3.5a/2011_10_01_02_world_game_event_creature.sql
diff --git a/sql/updates/world/2011_10_01_03_world_conditions.sql b/sql/old/3.3.5a/2011_10_01_03_world_conditions.sql
index 832a1d9bdf9..832a1d9bdf9 100644
--- a/sql/updates/world/2011_10_01_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2011_10_01_03_world_conditions.sql
diff --git a/sql/updates/world/2011_10_01_04_world_sai.sql b/sql/old/3.3.5a/2011_10_01_04_world_sai.sql
index f16e846d2c5..f16e846d2c5 100644
--- a/sql/updates/world/2011_10_01_04_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_01_04_world_sai.sql
diff --git a/sql/updates/world/2011_10_01_05_world_sai.sql b/sql/old/3.3.5a/2011_10_01_05_world_sai.sql
index a6380f6c991..a6380f6c991 100644
--- a/sql/updates/world/2011_10_01_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_01_05_world_sai.sql
diff --git a/sql/updates/world/2011_10_01_06_world_misc.sql b/sql/old/3.3.5a/2011_10_01_06_world_misc.sql
index 8bc5e09605e..8bc5e09605e 100644
--- a/sql/updates/world/2011_10_01_06_world_misc.sql
+++ b/sql/old/3.3.5a/2011_10_01_06_world_misc.sql
diff --git a/sql/updates/world/2011_10_01_07_world_sai.sql b/sql/old/3.3.5a/2011_10_01_07_world_sai.sql
index 59ab0e98d1b..59ab0e98d1b 100644
--- a/sql/updates/world/2011_10_01_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_01_07_world_sai.sql
diff --git a/sql/updates/world/2011_10_01_08_world_sai.sql b/sql/old/3.3.5a/2011_10_01_08_world_sai.sql
index 0f524b7b0c0..0f524b7b0c0 100644
--- a/sql/updates/world/2011_10_01_08_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_01_08_world_sai.sql
diff --git a/sql/updates/world/2011_10_01_09_world_creatures.sql b/sql/old/3.3.5a/2011_10_01_09_world_creatures.sql
index 6c6c5eb577b..6c6c5eb577b 100644
--- a/sql/updates/world/2011_10_01_09_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_10_01_09_world_creatures.sql
diff --git a/sql/updates/world/2011_10_01_10_world_questrelation.sql b/sql/old/3.3.5a/2011_10_01_10_world_questrelation.sql
index 089471f193e..089471f193e 100644
--- a/sql/updates/world/2011_10_01_10_world_questrelation.sql
+++ b/sql/old/3.3.5a/2011_10_01_10_world_questrelation.sql
diff --git a/sql/updates/world/2011_10_01_11_world_loot.sql b/sql/old/3.3.5a/2011_10_01_11_world_loot.sql
index 533d6714cf8..533d6714cf8 100644
--- a/sql/updates/world/2011_10_01_11_world_loot.sql
+++ b/sql/old/3.3.5a/2011_10_01_11_world_loot.sql
diff --git a/sql/updates/world/2011_10_01_12_world_creatures.sql b/sql/old/3.3.5a/2011_10_01_12_world_creatures.sql
index c6e63c19595..c6e63c19595 100644
--- a/sql/updates/world/2011_10_01_12_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_10_01_12_world_creatures.sql
diff --git a/sql/updates/world/2011_10_01_13_world_dbc.sql b/sql/old/3.3.5a/2011_10_01_13_world_dbc.sql
index 96c34eced1c..96c34eced1c 100644
--- a/sql/updates/world/2011_10_01_13_world_dbc.sql
+++ b/sql/old/3.3.5a/2011_10_01_13_world_dbc.sql
diff --git a/sql/updates/world/2011_10_02_00_world_creature_template.sql b/sql/old/3.3.5a/2011_10_02_00_world_creature_template.sql
index f9f20f3b593..f9f20f3b593 100644
--- a/sql/updates/world/2011_10_02_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_10_02_00_world_creature_template.sql
diff --git a/sql/updates/world/2011_10_02_01_world_factionchange.sql b/sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql
index b25622e1441..b25622e1441 100644
--- a/sql/updates/world/2011_10_02_01_world_factionchange.sql
+++ b/sql/old/3.3.5a/2011_10_02_01_world_factionchange.sql
diff --git a/sql/updates/world/2011_10_02_03_world_sai.sql b/sql/old/3.3.5a/2011_10_02_03_world_sai.sql
index 9ccda8d5403..9ccda8d5403 100644
--- a/sql/updates/world/2011_10_02_03_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_03_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_04_world_sai.sql b/sql/old/3.3.5a/2011_10_02_04_world_sai.sql
index fbec8e12b55..fbec8e12b55 100644
--- a/sql/updates/world/2011_10_02_04_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_04_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_05_world_sai.sql b/sql/old/3.3.5a/2011_10_02_05_world_sai.sql
index 042b59626d0..042b59626d0 100644
--- a/sql/updates/world/2011_10_02_05_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_05_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_06_world_misc.sql b/sql/old/3.3.5a/2011_10_02_06_world_misc.sql
index 03a2bf96b7d..03a2bf96b7d 100644
--- a/sql/updates/world/2011_10_02_06_world_misc.sql
+++ b/sql/old/3.3.5a/2011_10_02_06_world_misc.sql
diff --git a/sql/updates/world/2011_10_02_07_world_sai.sql b/sql/old/3.3.5a/2011_10_02_07_world_sai.sql
index bbbfb3f233a..bbbfb3f233a 100644
--- a/sql/updates/world/2011_10_02_07_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_07_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_08_world_sai.sql b/sql/old/3.3.5a/2011_10_02_08_world_sai.sql
index fc49cd24425..fc49cd24425 100644
--- a/sql/updates/world/2011_10_02_08_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_08_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_09_world_creatures.sql b/sql/old/3.3.5a/2011_10_02_09_world_creatures.sql
index 5287fc45ab3..5287fc45ab3 100644
--- a/sql/updates/world/2011_10_02_09_world_creatures.sql
+++ b/sql/old/3.3.5a/2011_10_02_09_world_creatures.sql
diff --git a/sql/updates/world/2011_10_02_10_world_sai.sql b/sql/old/3.3.5a/2011_10_02_10_world_sai.sql
index 3880699aa69..3880699aa69 100644
--- a/sql/updates/world/2011_10_02_10_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_10_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_11_world_sai.sql b/sql/old/3.3.5a/2011_10_02_11_world_sai.sql
index 6ed9fcf83c6..6ed9fcf83c6 100644
--- a/sql/updates/world/2011_10_02_11_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_11_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_12_world_sai.sql b/sql/old/3.3.5a/2011_10_02_12_world_sai.sql
index 93779a01172..93779a01172 100644
--- a/sql/updates/world/2011_10_02_12_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_12_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_13_world_sai.sql b/sql/old/3.3.5a/2011_10_02_13_world_sai.sql
index c8736f5284a..c8736f5284a 100644
--- a/sql/updates/world/2011_10_02_13_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_13_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_14_world_sai.sql b/sql/old/3.3.5a/2011_10_02_14_world_sai.sql
index d4c48dde3cc..d4c48dde3cc 100644
--- a/sql/updates/world/2011_10_02_14_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_14_world_sai.sql
diff --git a/sql/updates/world/2011_10_02_15_world_sai.sql b/sql/old/3.3.5a/2011_10_02_15_world_sai.sql
index 980874c8eea..980874c8eea 100644
--- a/sql/updates/world/2011_10_02_15_world_sai.sql
+++ b/sql/old/3.3.5a/2011_10_02_15_world_sai.sql
diff --git a/sql/updates/world/2011_10_04_00_world_creature_loot_template.sql b/sql/old/3.3.5a/2011_10_04_00_world_creature_loot_template.sql
index 0a6cfc1073f..0a6cfc1073f 100644
--- a/sql/updates/world/2011_10_04_00_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2011_10_04_00_world_creature_loot_template.sql
diff --git a/sql/updates/world/2011_10_05_00_world_spell_linked_spell.sql b/sql/old/3.3.5a/2011_10_05_00_world_spell_linked_spell.sql
index 762a07620f9..762a07620f9 100644
--- a/sql/updates/world/2011_10_05_00_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2011_10_05_00_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2011_10_05_01_world_instance_misc.sql b/sql/old/3.3.5a/2011_10_05_01_world_instance_misc.sql
index 656cdd575d2..656cdd575d2 100644
--- a/sql/updates/world/2011_10_05_01_world_instance_misc.sql
+++ b/sql/old/3.3.5a/2011_10_05_01_world_instance_misc.sql
diff --git a/sql/updates/world/2011_10_05_01_world_scriptname.sql b/sql/old/3.3.5a/2011_10_05_01_world_scriptname.sql
index 742d74f4029..742d74f4029 100644
--- a/sql/updates/world/2011_10_05_01_world_scriptname.sql
+++ b/sql/old/3.3.5a/2011_10_05_01_world_scriptname.sql
diff --git a/sql/updates/world/2011_10_05_01_world_spell_script_names.sql b/sql/old/3.3.5a/2011_10_05_01_world_spell_script_names.sql
index 03d4b649e78..03d4b649e78 100644
--- a/sql/updates/world/2011_10_05_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_10_05_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_10_06_00_world_creature_template.sql b/sql/old/3.3.5a/2011_10_06_00_world_creature_template.sql
index a17b7bc3c7c..a17b7bc3c7c 100644
--- a/sql/updates/world/2011_10_06_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/2011_10_06_00_world_creature_template.sql
diff --git a/sql/updates/world/2011_10_06_01_world_misc.sql b/sql/old/3.3.5a/2011_10_06_01_world_misc.sql
index 3fccce79f7b..3fccce79f7b 100644
--- a/sql/updates/world/2011_10_06_01_world_misc.sql
+++ b/sql/old/3.3.5a/2011_10_06_01_world_misc.sql
diff --git a/sql/updates/world/2011_10_07_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_10_07_00_world_spell_script_names.sql
index 94d4f1fd8fc..94d4f1fd8fc 100644
--- a/sql/updates/world/2011_10_07_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2011_10_07_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2011_10_07_01_world_command.sql b/sql/old/3.3.5a/2011_10_07_01_world_command.sql
index c3767c7dc00..c3767c7dc00 100644
--- a/sql/updates/world/2011_10_07_01_world_command.sql
+++ b/sql/old/3.3.5a/2011_10_07_01_world_command.sql
diff --git a/sql/updates/world/2011_10_07_02_world_trinity_string.sql b/sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql
index 2dff16050e4..2dff16050e4 100644
--- a/sql/updates/world/2011_10_07_02_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2011_10_07_02_world_trinity_string.sql
diff --git a/sql/old/3.3.5a/2011_10_08_00_world_page_text.sql b/sql/old/3.3.5a/2011_10_08_00_world_page_text.sql
new file mode 100644
index 00000000000..aa9aeee6ba4
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_08_00_world_page_text.sql
@@ -0,0 +1,128 @@
+-- Repair all page_text with HTML format content (Now you can see maps, centered titles and graphics in GO and items with page_texts)
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1>Horde Conscription Registration</H1>\n<BR></BR>\n<P>This person has demonstrated incredible feats of strength and skill in the name of the Horde. They should immediately be assigned to work in the Crossroads.</P>\n<BR></BR>\n<BR></BR>\n<P>Respectfully yours:</P>\n<BR></BR>\n<BR></BR>\n<BR></BR>\n<BR></BR>\n<P>Looks good to me.<BR></BR>\n- Takrin Pathseeker</P>\n</BODY>\n</HTML>' WHERE `entry`=340;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1>Horde Conscription Registration</H1>\n<BR></BR>\n<P>This person has demonstrated incredible feats of strength and skill in the name of the Horde. They should immediately be assigned to work in the Crossroads.</P>\n<BR></BR>\n<BR></BR>\n<P>Respectfully yours:\n<BR></BR>- Kargal Battlescar</P>\n<BR></BR>\n<BR></BR>\n<BR></BR>\n<P>Looks good to me.<BR></BR>\n- Takrin Pathseeker</P>\n</BODY>\n</HTML>' WHERE `entry`=341;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<BR/>\n<H1 align=\"center\">\nEliza\n</H1>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<P align=\"center\">\nBeloved wife, may the earth sate your hunger.\n</P>\n</BODY>\n</HTML>\n' WHERE `entry`=731;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<BR/>\n<H1 align=\"center\">\nEliza\n</H1>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<P align=\"center\">\nBeloved wife, may the earth sate your hunger.\n</P>\n</BODY>\n</HTML>\n' WHERE `entry`=750;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<BR/>\n<P>\nIn memory of my dear mentor, Horatio M. Montgomery, M.D. Healer, Teacher, Friend.\n</P>\n<BR/>\n<H1 align=\"center\">\n50 BTFT - 25 ATFT\n</H1>\n<BR/>\n<P>\n\"The world is full of the sick and weary. It is our job, as healers, NAY, as men and women of medicine, to cleanse them ALL of the ''itis.''\"\n</P>\n<BR/>\n<P>\n- H.M.M., M.D., PhD, JD, Grandmaster Farmer, Dancer Extraordinaire, Friend to the Animals\n</P>\n<BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=1031;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<BR/>\n<P>\nIn memory of my dear mentor, Horatio M. Montgomery, M.D. Healer, Teacher, Friend.\n</P>\n<BR/>\n<H1 align=\"center\">\n50 BTFT - 25 ATFT\n</H1>\n<BR/>\n<P>\n\"The world is full of the sick and weary. It is our job, as healers, NAY, as men and women of medicine, to cleanse them ALL of the ''itis.''\"\n</P>\n<BR/>\n<P>\n- H.M.M., M.D., PhD, JD, Grandmaster Farmer, Dancer Extraordinaire, Friend to the Animals\n</P>\n<BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=1050;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\9330_Gammerita_sepia_256\"/>\n</BODY>\n</HTML>' WHERE `entry`=1171;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\9330_Gammerita_sepia_256\"/>\n</BODY>\n</HTML>' WHERE `entry`=1190;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\Linken_sepia_256px\"/>\n</BODY>\n</HTML>' WHERE `entry`=1371;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\Linken_sepia_256px\"/>\n</BODY>\n</HTML>' WHERE `entry`=1391;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nCRYSTAL PYLON USER''S MANUAL\n</H1>\n<BR/>\n<P align=\"center\">\n\"A guide to collecting and using the power crystals of Un''Goro Crater\"\n</P>\n<BR/>\n<BR/>\n<P align=\"left\">\nChapter 1: The Northern Pylon\n</P>\n<BR/>\n<P align=\"left\">\nChapter 2: The Eastern Pylon\n</P>\n<BR/>\n<P align=\"left\">\nChapter 3: The Western Pylon\n</P>\n<BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=1491;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nCRYSTAL PYLON USER''S MANUAL\n</H1>\n<BR/>\n<P align=\"center\">\n\"A guide to collecting and using the power crystals of Un''Goro Crater\"\n</P>\n<BR/>\n<BR/>\n<P align=\"left\">\nChapter 1: The Northern Pylon\n</P>\n<BR/>\n<P align=\"left\">\nChapter 2: The Eastern Pylon\n</P>\n<BR/>\n<P align=\"left\">\nChapter 3: The Western Pylon\n</P>\n<BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=1510;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nChapter 1: THE NORTHERN PYLON\n</H1>\n<BR/>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_mini_north\" align=\"left\"/>\n<P align=\"right\">\nThe Northern\n<BR/>\nPylon accepts\n<BR/>\nyellow, red,\n<BR/>\nand green\n<BR/>\ncrystals.\n</P>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<P align=\"left\">\nThe Pylon focuses on the energy that can be created using yellow crystals as the main source of power.\n</P>\n</BODY>\n</HTML>\n' WHERE `entry`=1511;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nNorthern Crystal Combinations\n</H1>\n<BR/>\n<P align=\"left\">\nThere are two possible effects: one that will produce damage, and one that will negate damage.\n</P>\n<BR/>\n<P align=\"left\">\nCRYSTAL CHARGE: Requires red and yellow crystals.\n<BR/>\nThis will produce a large explosion.\n</P>\n<BR/>\n<P align=\"left\">\nCRYSTAL RESTORE: Requires yellow and green crystals.\n<BR/>\nThis will provide you with a healing aura.\n</P>\n</BODY>\n</HTML>\n' WHERE `entry`=1512;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nNORTHERN PYLON TABLE DIAGRAM\n</H1>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_north\"/>\n</BODY>\n</HTML>' WHERE `entry`=1513;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nChapter 2: THE EASTERN PYLON\n</H1>\n<BR/>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_mini_east\" align=\"left\"/>\n<P align=\"right\">\nThe Eastern\n<BR/>\nPylon accepts\n<BR/>\nblue, yellow,\n<BR/>\nand green\n<BR/>\ncrystals.\n</P>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<P align=\"left\">\nThe Pylon focuses on the energy that can be created using blue crystals as the main source of power.\n</P>\n</BODY>\n</HTML>\n' WHERE `entry`=1514;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nEastern Crystal Combinations\n</H1>\n<BR/>\n<P align=\"left\">\nThere are two possible effects: one provides bonus to spirit, and one that creates a damaging shield.\n</P>\n<BR/>\n<P align=\"left\">\nCRYSTAL FORCE: Requires blue and green crystals.\n<BR/>\nThis will provide you with an increase in spirit.\n</P>\n<BR/>\n<P align=\"left\">\nCRYSTAL SPIRE: Requires blue and yellow crystals.\n<BR/>\nThis will create a shield that does damage to attackers.\n</P>\n</BODY>\n</HTML>\n' WHERE `entry`=1515;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nEASTERN PYLON TABLE DIAGRAM\n</H1>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_east\"/>\n</BODY>\n</HTML>' WHERE `entry`=1516;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nEASTERN PYLON TABLE DIAGRAM\n</H1>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_east\"/>\n</BODY>\n</HTML>' WHERE `entry`=1530;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nChapter 3: THE WESTERN PYLON\n</H1>\n<BR/>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_mini_west\" align=\"left\"/>\n<P align=\"right\">\nThe Western\n<BR/>\nPylon accepts\n<BR/>\nred, green,\n<BR/>\nand blue\n<BR/>\ncrystals.\n</P>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<P align=\"left\">\nThe Pylon focuses on the energy that can be created using red crystals as the main source of power.\n</P>\n</BODY>\n</HTML>' WHERE `entry`=1531;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nWestern Crystal Combinations\n</H1>\n<BR/>\n<P align=\"left\">\nThere are two possible effects: one that increases your protection from damage, and one that weakens an enemy''s defenses.\n</P>\n<BR/>\n<P align=\"left\">\nCRYSTAL WARD: Requires red and green crystals.\n<BR/>\nThis will provide you with an increase to armor.\n</P>\n<BR/>\n<P align=\"left\">\nCRYSTAL YIELD: Requires blue and red crystals.\n<BR/>\nThis can lower the armor of a specific target.\n</P>\n</BODY>\n</HTML>' WHERE `entry`=1532;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nWESTERN PYLON TABLE DIAGRAM\n</H1>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_west\"/>\n</BODY>\n</HTML>' WHERE `entry`=1533;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nWESTERN PYLON TABLE DIAGRAM\n</H1>\n<BR/>\n<IMG src=\"Interface\\Pictures\\11482_crystals_west\"/>\n</BODY>\n</HTML>' WHERE `entry`=1550;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blackrock_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1635;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blasted_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1636;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_ungoro_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1637;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_nightdragon_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1638;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blackrock_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1639;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_bldbank_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1640;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_ungoro_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1641;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blackrock_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1642;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blasted_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1643;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_ungoro_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1644;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blackrock_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1645;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_bldbank_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1646;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blasted_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1647;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_ungoro_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1648;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_blackrock_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1649;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_bldbank_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1650;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_whipper_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1651;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_ungoro_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1652;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\11733_ungoro_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=1690;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\14679_Tirion_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=2351;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\14679_Tirion_256\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=2370;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">A TREATISE ON MILITARY RANKS</H1><BR/>\n<IMG src=\"Interface\\PvPRankBadges\\PvPRankAlliance\" align=\"left\"/><BR/>\n<P align=\"right\">What follows are</P>\n<P align=\"right\">the military ranks</P>\n<P align=\"right\">of the Alliance,</P>\n<P align=\"right\">proceeded by such</P>\n<P align=\"right\">information as is</P>\n<P align=\"right\">known for the races</P>\n<P align=\"right\">of the Horde. Each</P>\n<P align=\"right\">is presented in two</P>\n<P align=\"right\">sections, the officers and then the enlisted, with the ranks of each listed in descending order from highest to lowest. Long live the Alliance!</P>\n</BODY>\n</HTML>' WHERE `entry`=2654;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE ALLIANCE</H1><BR/>\n<P align="center">Part 1</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank14" align="left"/><BR/>\n<P align="right">Grand Marshal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank13" align="left"/><BR/>\n<P align="right">Field Marshal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank12" align="left"/><BR/>\n<P align="right">Marshal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank11" align="left"/><BR/>\n<P align="right">Commander</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank10" align="left"/><BR/>\n<P align="right">Lieutenant Commander</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2655;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE ALLIANCE</H1><BR/>\n<P align="center">Part 2</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank09" align="left"/><BR/>\n<P align="right">Knight-Champion</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank08" align="left"/><BR/>\n<P align="right">Knight-Captain</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank07" align="left"/><BR/>\n<P align="right">Knight-Lieutenant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank06" align="left"/><BR/>\n<P align="right">Knight</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2656;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">ENLISTED RANKS OF THE ALLIANCE</H1><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank05" align="left"/><BR/>\n<P align="right">Sergeant Major</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank04" align="left"/><BR/>\n<P align="right">Master Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank03" align="left"/><BR/>\n<P align="right">Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank02" align="left"/><BR/>\n<P align="right">Corporal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank01" align="left"/><BR/>\n<P align="right">Private</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2657;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE HORDE</H1><BR/>\n<P align="center">Part 1</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank14" align="left"/><BR/>\n<P align="right">High Warlord</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank13" align="left"/><BR/>\n<P align="right">Warlord</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank12" align="left"/><BR/>\n<P align="right">General</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank11" align="left"/><BR/>\n<P align="right">Lieutenant General</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank10" align="left"/><BR/>\n<P align="right">Champion</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2658;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">ENLISTED RANKS OF THE HORDE</H1><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank05" align="left"/><BR/>\n<P align="right">First Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank04" align="left"/><BR/>\n<P align="right">Senior Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank03" align="left"/><BR/>\n<P align="right">Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank02" align="left"/><BR/>\n<P align="right">Grunt</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank01" align="left"/><BR/>\n<P align="right">Scout</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2660;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">MILITARY RANKS OF THE HORDE &amp; ALLIANCE</H1>\n<BR/>\n<BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRankHorde" align="left"/>\n<BR/>\n<P align="right">Throm''ka! In this</P>\n<P align="right">book you will find</P>\n<P align="right">many listings of</P>\n<P align="right">the military ranks</P>\n<P align="right">of the Horde and</P>\n<P align="right">the puny Alliance.</P>\n<P align="right">First will come the</P>\n<P align="right">Horde, then the Alliance,</P>\n<P align="right">each with listings of officers and enlisted ranks. As is fitting, the strongest are listed at the top, with the weaker listed below them.</P>\n</BODY>\n</HTML>' WHERE `entry`=2661;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE HORDE</H1><BR/>\n<P align="center">Part 1</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank14" align="left"/><BR/>\n<P align="right">High Warlord</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank13" align="left"/><BR/>\n<P align="right">Warlord</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank12" align="left"/><BR/>\n<P align="right">General</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank11" align="left"/><BR/>\n<P align="right">Lieutenant General</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank10" align="left"/><BR/>\n<P align="right">Champion</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2662;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE HORDE</H1><BR/>\n<P align="center">Part 2</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank09" align="left"/><BR/>\n<P align="right">Centurion</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank08" align="left"/><BR/>\n<P align="right">Legionnaire</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank07" align="left"/><BR/>\n<P align="right">Blood Guard</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank06" align="left"/><BR/>\n<P align="right">Stone Guard</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2663;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">HORDE ENLISTED RANKS</H1><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank05" align="left"/><BR/>\n<P align="right">First Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank04" align="left"/><BR/>\n<P align="right">Senior Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank03" align="left"/><BR/>\n<P align="right">Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank02" align="left"/><BR/>\n<P align="right">Grunt</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank01" align="left"/><BR/>\n<P align="right">Scout</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2664;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE ALLIANCE</H1><BR/>\n<P align="center">Part 1</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank14" align="left"/><BR/>\n<P align="right">Grand Marshal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank13" align="left"/><BR/>\n<P align="right">Field Marshal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank12" align="left"/><BR/>\n<P align="right">Marshal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank11" align="left"/><BR/>\n<P align="right">Commander</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank10" align="left"/><BR/>\n<P align="right">Lieutenant Commander</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2665;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">ALLIANCE MILITARY RANKS</H1><BR/>\n<P align=\"center\">OFFICERS</P><BR/>\n<P align=\"center\">Grand Marshal</P>\n<P align=\"center\">Field Marshal</P>\n<P align=\"center\">Marshal</P>\n<P align=\"center\">Commander</P>\n<P align=\"center\">Lieutenant Commander</P>\n<P align=\"center\">Knight-Champion</P>\n<P align=\"center\">Knight-Captain</P>\n<P align=\"center\">Knight-Lieutenant</P>\n<P align=\"center\">Knight</P><BR/>\n<P align=\"center\">ENLISTED</P><BR/>\n<P align=\"center\">Sergeant Major</P>\n<P align=\"center\">Master Sergeant</P>\n<P align=\"center\">Sergeant</P>\n<P align=\"center\">Corporal</P>\n<P align=\"center\">Private</P><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2676;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">HORDE MILITARY RANKS</H1><BR/>\n<P align=\"center\">OFFICERS</P><BR/>\n<P align=\"center\">High Warlord</P>\n<P align=\"center\">Warlord</P>\n<P align=\"center\">General</P>\n<P align=\"center\">Lieutenant General</P>\n<P align=\"center\">Champion</P>\n<P align=\"center\">Centurion</P>\n<P align=\"center\">Legionnaire</P>\n<P align=\"center\">Blood Guard</P>\n<P align=\"center\">Stone Guard</P><BR/>\n<P align=\"center\">ENLISTED</P><BR/>\n<P align=\"center\">First Sergeant</P>\n<P align=\"center\">Senior Sergeant</P>\n<P align=\"center\">Sergeant</P>\n<P align=\"center\">Grunt</P>\n<P align=\"center\">Scout</P><BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=2677;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<BR/>\n<P align=\"left\">Here lies Durotan - first Chieftain of the Frostwolf Clan, and father of our honored Warchief, Thrall. He was the bravest of our kind - betrayed by those who would see our people enslaved. Durotan gave his life that our freedom might be gained. We honor him - and the legacy he passed on to us through his son.</P><BR/>\n<P align=\"left\">Drek''Thar, Far Seer of the Frostwolves </P>\n</BODY>\n</HTML>' WHERE `entry`=2731;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">HORDE MILITARY RANKS</H1><BR/>\n<P align=\"center\">OFFICERS</P><BR/>\n<P align=\"center\">High Warlord</P>\n<P align=\"center\">Warlord</P>\n<P align=\"center\">General</P>\n<P align=\"center\">Lieutenant General</P>\n<P align=\"center\">Champion</P>\n<P align=\"center\">Centurion</P>\n<P align=\"center\">Legionnaire</P>\n<P align=\"center\">Blood Guard</P>\n<P align=\"center\">Stone Guard</P><BR/>\n<P align=\"center\">ENLISTED</P><BR/>\n<P align=\"center\">First Sergeant</P>\n<P align=\"center\">Senior Sergeant</P>\n<P align=\"center\">Sergeant</P>\n<P align=\"center\">Grunt</P>\n<P align=\"center\">Scout</P><BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=2770;
+UPDATE `page_text` SET `text`='You cannot understand a single word on this ledger. You don''t even know what language it is written in!' WHERE `entry`=2822;
+UPDATE `page_text` SET `text`='<HTML>\r\n<BODY>\r\n<IMG src=\"Interface\\Pictures\\21037_crudemap_256\"/>\r\n</BODY>\r\n</HTML>\r\n' WHERE `entry`=2828;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE HORDE</H1><BR/>\n<P align="center">Part 2</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank09" align="left"/><BR/>\n<P align="right">Centurion</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank08" align="left"/><BR/>\n<P align="right">Legionnaire</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank07" align="left"/><BR/>\n<P align="right">Blood Guard</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank06" align="left"/><BR/>\n<P align="right">Stone Guard</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2854;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">ENLISTED RANKS OF THE HORDE</H1><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank05" align="left"/><BR/>\n<P align="right">First Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank04" align="left"/><BR/>\n<P align="right">Senior Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank03" align="left"/><BR/>\n<P align="right">Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank02" align="left"/><BR/>\n<P align="right">Grunt</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank01" align="left"/><BR/>\n<P align="right">Scout</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2855;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">OFFICER RANKS OF THE ALLIANCE</H1><BR/>\n<P align="center">Part 2</P>\n<IMG src="Interface\\PvPRankBadges\\PvPRank09" align="left"/><BR/>\n<P align="right">Knight-Champion</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank08" align="left"/><BR/>\n<P align="right">Knight-Captain</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank07" align="left"/><BR/>\n<P align="right">Knight-Lieutenant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank06" align="left"/><BR/>\n<P align="right">Knight</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2856;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align="center">ALLIANCE ENLISTED RANKS</H1><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank05" align="left"/><BR/>\n<P align="right">Sergeant Major</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank04" align="left"/><BR/>\n<P align="right">Master Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank03" align="left"/><BR/>\n<P align="right">Sergeant</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank02" align="left"/><BR/>\n<P align="right">Corporal</P><BR/><BR/>\n<IMG src="Interface\\PvPRankBadges\\PvPRank01" align="left"/><BR/>\n<P align="right">Private</P><BR/><BR/>\n</BODY>\n</HTML>' WHERE `entry`=2857;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">\nAnthony Ray Stark\n</H1>\n<H2 align=\"center\">\n1961 - 2005\n</H2>\n</BODY>\n</HTML>' WHERE `entry`=2858;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">BRAZIER OF INVOCATION: USER''S MANUAL</H1><BR/><P align=\"center\">Where to find Haunted Loci</P><BR/><P align=\"center\">INTRODUCTION</P><BR/><P align=\"left\">Contained within these pages are the locations of the fallen and corrupted spirits and souls involved in the Lord Valthalak''s Amulet Incident. Though you have already saved these former companions of mine, it would be my conjecture that repugnant echoes of the evil that once twisted their spirits still linger at those haunted loci. Such was the malevolent power of Lord Valthalak''s spirit.</P><BR/><P align=\"left\">Additionally, the brazier can be used to summon forth Lord Valathalak, though as before, extreme caution should be taken in doing so.</P><BR/></BODY></HTML>' WHERE `entry`=2859;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">INTRODUCTION, continued...</H1><BR/><P align=\"left\">The brazier itself functions just as the Brazier of Beckoning did. Simply place it within range of any of the five haunted loci and it will invoke the spirits of the dead.</P><BR/><P align=\"left\">As a side note, because I know that you''ll be interested in knowing, the Banner of Provocation can be used in similar fashion at the arena in Blackrock Depths. Be sure to teach Theldren and his goons a lesson for me every time you get a chance when you''re there.</P><BR/><P align=\"left\">Read on should you desire further enlightment.</P><BR/></BODY></HTML>' WHERE `entry`=2860;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">ISALIEN</H1><BR/><P align=\"center\">Night Elven Priestess of the Moon</P><BR/><P align=\"left\">When Isalien decided to take her leave of the company, she did so with the intention of making a pilgrimage to Dire Maul, the fallen, ancestral night elven city once known as Eldre''Thalas. Therein still stands a library of great knowledge, a sanctum that a small number of night elves have been able to hold back the tide from. She was intent upon finding answers both to her heritage and possibly concerning the amulet pieces. It should be noted that she was also a good friend of Falrin Treeshaper.</P><BR/></BODY></HTML>' WHERE `entry`=2861;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">ISALIEN, continued...</H1><BR/><P align=\"left\">Unfortunately, as she and her companion hippogryph, Empyrean, were entering the city, they were assailed by Alzzin the Wildshaper and his minions. There she fell, never to rise again. Perhaps it is for the best that Isalien never unlocked any further secrets from the evil magic that Lord Valthalak put into containing a portion of his essence in the amulet.</P><BR/><P align=\"left\">The open-aired chamber where Alzzin resides is one of these haunted loci.</P><BR/></BODY></HTML>' WHERE `entry`=2862;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">MOR GRAYHOOF</H1><BR/><P align=\"center\">Tauren Druid and First to Fall</P><BR/><P align=\"left\">Mor Grayhoof was ever a stalwart and trusted companion within The Veiled Blade. It is unfortunate that he was the first to fall to Lord Valthalak''s evil minions.</P><BR/><P align=\"left\">As we fled from Valthalak, we were being pursued by a veritable army of his spectral assassins and stalkers. The flight from Blackrock Spire was chaotic, to say the least. Unfortunately along the way, Mor somehow lost his footing, though I suspect that he was pushed. In any case, he fell down in to the recesses of the lower portion of the spire.</P><BR/></BODY></HTML>' WHERE `entry`=2863;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">MOR GRAYHOOF, continued...</H1><BR/><P align=\"left\">Later, we discovered that Mor had actually survived the fall. But there was to be no happy ending for my good friend; he was taken prisoner by the trolls of Tazz''Alaor. Not long after, as he was being tortured by War Master Voone, a group of Valthalak''s assassins jumped in and finished the job.</P><BR/><P align=\"left\">Should you seek to raise the echo of Mor Grayhoof''s spirit, War Master Voone''s chamber is a haunted location.</P><BR/></BODY></HTML>' WHERE `entry`=2864;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">JARIEN AND SOTHOS</H1><BR/><P align=\"center\">Siblings and would-be members of the Scarlet Crusade</P><BR/><P align=\"left\">Jarien and Sothos were two of the most intolerant people that I knew. Yet their skills as combatants were exceptional, and they came from money, which I suppose is why Anthion, the leader of The Veiled Blade, kept them on.</P><BR/><P align=\"left\">The siblings eventually found themselves enamored with the teachings and philosophy of the Scarlet Crusade. They had always exhibited a certain zeal in vanquishing any of the Scourge that we ran across in our travels, and it was suspected that their family had ties to the organization.</P><BR/></BODY></HTML>' WHERE `entry`=2865;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">JARIEN AND SOTHOS, continued...</H1><BR/><P align=\"left\">So it was that they found themselves facing the trials that are required of those that seek to join the Crusade. Of particular interest to them was a position of knighthood within the ranks; something that required more difficult testing apparently. For it was later discovered that Sothos actually failed his final test. Jarien would not have it though, and in open defiance she insisted that he be able to join her amongst the knights. From what we have gathered, Grand Crusader Dathrohan slew them both right on the spot in the middle of his chambers.</P><BR/><P align=\"left\">Thus it is that another of these haunted loci is The Crimson Throne inside The Scarlet Bastion at Stratholme.</P><BR/></BODY></HTML>' WHERE `entry`=2866;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">KORMOK</H1><BR/><P align=\"center\">Two-Headed Ogre Necromancer</P><BR/><P align=\"left\">What can be said about Kormok? He was a two-headed ogre of the caster variety who didn''t used to be all that bad. When we first took him into the fold it was as a prisoner on some job we''d accepted in Burning Steppes. He proved himself invaluable in helping us to get out of a sticky situation we fell into there, however, and so he came on as one of the company''s premier mages.</P><BR/><P align=\"left\">The odd thing about him though was the completely different nature of his two heads. One was always cheerful if not a little foolish, while the other was sly, calculating and had an almost dead look to its eyes. Kind of creepy really.</P><BR/></BODY></HTML>' WHERE `entry`=2867;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">KORMOK, continued...</H1><BR/><P align=\"left\">Later, through the course of our travels, Kormok became exposed to the necromantic side of magic. Unfortunately the creepy head exhibited an affinity for raising dead spirits, and took a perverse pleasure in it, especially in summoning forth the exiled spirits of Purgation Isle to do his bidding.</P><BR/><P align=\"left\">After the company disbanded, Kormok enrolled at the Scholomance to further his ''education''. The spectral assassins found entrance to the school all too easy, and slew him right there in front of his new master, Ras Frostwhisper.</P><BR/><P align=\"left\">This makes Ras Frostwhisper''s chamber one of the haunted locations where the brazier can be successfully utilized.</P><BR/></BODY></HTML>' WHERE `entry`=2868;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">LORD VALTHALAK</H1><BR/><P align=\"center\">Draconid Noble and former General of Blackrock Spire</P><BR/><P align=\"left\">Before General Drakkisath, there was Lord Valthalak, a draconid warlock of immense power. It is common for the leadership of the Spire to change hands, and unfortunately for us, we were going to play a part in the latest shift in power.</P><BR/><P align=\"left\">We''d been commissioned by a goblin smuggler-wizard out of Booty Bay, Gremnik Rizzlesprang, to steal Valthalak''s spellbook. We don''t know if he wanted to study it or sell it (or both), and it doesn''t matter now. What does matter is that we infiltrated the upper reaches of Blackrock Spire and slew Lord Valthalak in his lair. That''s when the fun really began.</P><BR/></BODY></HTML>' WHERE `entry`=2869;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">LORD VALTHALAK, continued...</H1><BR/><P align=\"left\">We had no idea of the depths of Valthalak''s magical knowledge where soul-manipulation was concerned, or we probably would never have taken on the job in the first place. But take it we did, and it proved to be the last job we ever would take.</P><BR/><P align=\"left\">Having slain Lord Valthalak, and taken his spellbook, Kormok must have sensed something about his amulet. He insisted on taking it as his share of the loot, which quickly devolved into a heated argument, and almost a fight, over the thing. We didn''t know at the time that the amulet actually housed a good portion of Valthalak''s spirit; we found that out later, much to our displeasure.</P><BR/></BODY></HTML>' WHERE `entry`=2870;
+UPDATE `page_text` SET `text`='<HTML><BODY><H1 align=\"center\">LORD VALTHALAK, continued...</H1><BR/><P align=\"left\">Splitting the amulet into pieces, we fled from the newly risen ghost of Valthalak, as well his army of spectral assassins. And the noise we made fighting over the amulet had roused a number of the Spire''s remaining defenders!</P><BR/><P align=\"left\">Almost all of us made it out of Blackrock and thought we were safe. But, even from the beyond, Valthalak sent his minions at us no matter where we hid. The Veiled Blade soon broke apart after that mission, and then we were really easy pickings.</P><BR/><P align=\"left\">As you must know, this makes Lord Valthalak''s abode, what is now The Beast''s chamber in Blackrock Spire, the last of the haunted locations.</P><BR/></BODY></HTML>' WHERE `entry`=2871;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<IMG src=\"Interface\\Pictures\\24475_gordawg_256\"/>\n</BODY>\n</HTML>' WHERE `entry`=2944;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<BR/>\n<H1 align=\"center\">\nTHE GREEN HILLS OF STRANGLETHORN\n</H1>\n<BR/>\n<H3 align=\"center\">\nby Hemet Nesingwary\n</H3>\n</BODY>\n</HTML>' WHERE `entry`=2945;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<H1 align=\"center\">\nLAMENT OF THE HIGHBORNE\n</H1>\n<BR/>\n<IMG src=\"Interface\\FlavorImages\\BloodElfLogo-small\"/>\n</BODY>\n</HTML>' WHERE `entry`=2990;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>Loosely translated version...</P>\n<BR/>\n<P>By the light, by the light of the sun,</P>\n<P>Children of the blood,</P>\n<P>Our enemies are breaking through.</P>\n<P>Children of the blood,</P>\n<P>By the light,</P>\n<P>Failing children of the blood,</P>\n<P>They are breaking through.</P>\n<P>O children of the blood,</P>\n<P>By the light of the sun.</P>\n<P>Failing children of the blood,</P>\n<P>They are breaking through.</P>\n<P>O children of the blood,</P>\n<P>By the light of the sun,</P>\n<P>The sun.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=2991;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>Thalassian version...</P>\n<BR/>\n<P>Anar''alah, anar''alah belore,</P>\n<P>Sin''dorei,</P>\n<P>Shindu fallah na.</P>\n<P>Sin''dorei,</P>\n<P>Anar''alah,</P>\n<P>Shindu sin''dorei,</P>\n<P>Shindu fallah na.</P>\n<P>Sin''dorei,</P>\n<P>Anar''alah belore.</P>\n<P>Shindu sin''dorei,</P>\n<P>Shindu fallah na.</P>\n<P>Sin''dorei,</P>\n<P>Anar''alah belore,</P>\n<P>Belore.</P>\n</BODY>\n</HTML>' WHERE `entry`=2992;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>Okay, $N, this is a list of all the stuff that I''m going to need for our new super-secret, er..., super weapon. For now, let''s just call it \"Crafty''s Ultra-Advanced Proto-Typical Shortening Blaster\".</P>\n<BR/>\n<P>Trust me, it''s going to be far more revolutionary than that old, hokey world enlarger!</P>\n<BR/>\n<P>Anyway, don''t think too hard about it right now. Just get me this stuff and we''ll be golden!</P>\n</BODY>\n</HTML>' WHERE `entry`=3040;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<H1 align=\"center\">My Tools</H1>\n<BR/>\n<P>First things first... I need my tools. For a project this intricate no others will do!</P>\n<BR/>\n<P>When we had to run for our lives to escape from the pumping station -- that''s a whole different story -- I didn''t have time to pick them up. I mean, come on, I was running for my life! But I do remember that I left them under the pumping station to the east.</P>\n</BODY>\n</HTML>' WHERE `entry`=3041;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<H1 align=\"center\">An Overcharged Capacitor</H1>\n<BR/>\n<P>Any engineering hack worth their salt should be able to whip one of these up for you if you can''t create it yourself. Hell, I''d make one for you, but I''m missing my tools at the moment, remember?</P>\n<BR/>\n<P>So, do whatever it takes, but get me one. The project''s going nowhere without it. If you have to, head back to the southern continents and scour the auction house!</P>\n</BODY>\n</HTML>' WHERE `entry`=3042;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<H1 align=\"center\">A Handful of Rocknar''s Grit</H1>\n<BR/>\n<P>This last bit might be a little tricky to get, but it''s necessary to fashion the blaster''s lens from only the finest sand. That means obtaining it from a top-notch elemental.</P>\n<BR/>\n<P>Rocknar will do nicely. He was spotted to the southeast in the Frozen Reach between Unu''pe and the Wailing Ziggurat. Go break down his icy exterior to get to his rocky core and bring me back a handful.</P>\n</BODY>\n</HTML>' WHERE `entry`=3043;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">WANTED: HEMET NESINGWARY</H1>\n<H1 align=\"center\">FOR CRIMES AGAINST NATURE!</H1>\n<BR/>\n<IMG src=\"Interface\\Pictures\\obj_nesingwary_256\" align=\"center\"/>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<BR/>\n<H1 align=\"center\">Artist''s rendition of \"The Extinctionator\" in his natural habitat: the burning hellfire of the underworld.</H1>\n<BR/>\n<H1 align=\"left\">Last Wildlife Holocaust Location: Nagrand, Outland</H1>\n<BR/>\n<H1 align=\"left\">Also Known As: The Great Game Hunter, The Butcher of Badlands, The Stranglethorn Ripper, Old Man Death, Hemet, Nessie, Ol'' Dirty, Ol'' Dirty D, Father of the Bounty, The Extinctionator</H1>\n<BR/>\n</BODY>\n</HTML>\n' WHERE `entry`=3057;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<H1 align=\"center\">The Diary of High General Abbendis</H1>\n<BR/>\n<IMG src=\"Interface\\FlavorImages\\ScarletCrusadeLogo\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=3092;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>The voice whispered, \"Come to me.\" From the very beginning I knew that it was the Holy Light speaking to me in dreams. At last! After all of my years of prayers and good deeds, the cleansing of the blight of the unliving from the face of Azeroth. After all of the failures and resurrections.</P>\n<BR/>\n<P>Finally!</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3093;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>It happened again. \"Come to me...\", the Light commanded.</P>\n<BR/>\n<P>I woke up freezing, but it wasn''t cold in my chambers. I''m going to redouble my efforts! I''ll tell the high abbot tomorrow that I want prayers increased. No more half-measures!</P>\n<BR/>\n<P>The Holy Light has taken notice of our good work. I can feel it!</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3094;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>This time I was awake! It was very vivid, and yet for over a minute, in the middle of the warm, sunny day, my breath came out misted and chill. One of the priests noticed and dropped to his knees in prayer.</P>\n<BR/>\n<P>No one else heard the voice, though. At least the witness proves that I''m not going insane. Maybe I should ask Landgren to pray on the matter?</P>\n<BR/>\n<P>I''ll get Jordan and Street to scrutinize their recruiting efforts tomorrow. We''ve grown bloated with ranks of unbelievers who yearn only to destroy the undead. That''s not enough!</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3095;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>The commander and the bishop were both receptive. Not that they had any choice. Bishop Street in particular seemed very enthusiastic. He spoke of a revival for the crusade and swore to ferret out the weak of faith within our ranks.</P>\n<BR/>\n<P>I told him to go easy. I''ve no intention of destroying the Crusade. However, I do like the sound of forming an elite cadre of the most faithful to do the Light''s bidding in Northrend. I fear the man''s friendship with LeCraft is slowly twisting him. They both have their uses, though.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3096;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>I will leave most of the Crusade here to continue mopping-up operations on the undead in our backyard. I imagine that once they have finished what we began, most will disband and go back to their homes to live in peace.</P>\n<BR/>\n<P>That somehow seems right. At our finest, we have always been the salt of the earth, rising up to take back our homes from the filth of the Scourge corruption, to return our Lordaeron to its former glory. To a time before the Scourge, before Arthas and regicide... before the Lich King.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3097;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>There have been whispers amongst the men about a day soon to come that will change everything for the Scarlet Crusade. Bishop Street has put a name to it, calling it the Crimson Dawn.</P>\n<BR/>\n<P>I will put some thought to this, though I can feel the truth of it in my bones. I pray that it will bring weal for us rather than woe.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3098;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>The Light has spoken again with a great deal of urgency. I came away from the dream with a sense of impatience. I will not disappoint. There must be no more delays. We must soon be underway!</P>\n<BR/>\n<P>What a great coincidence then - and I had to control myself from showing my relief - this afternoon Captain Shely procured for us a number of new ships for the voyage. Perhaps it was no coincidence at all? The Holy Light expresses its will in ways that we are not meant to understand.</P>\n<BR/>\n<P>I will take the Sinner''s Folly as my flag. I think the name is most fitting.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3099;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Now I know why the Light has been pushing me to be underway. In the dead of night a Scourge necropolis appeared in the sky over us and out poured the minions of hell!</P>\n<BR/>\n<P>A new breed of death knight leads the assault. Already the casualties we''ve suffered have been catastrophic. With the Scourge able to strike at us anywhere and at will from above, there seems no way to mount a proper defense.</P>\n<BR/>\n<P>I fear that our intended expedition to Northrend is over before it has begun.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3100;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>I''ve been informed that Hearthglen and the surrounding area have already begun to assemble a host. High Commander Galvar Pureblood himself intends to lead them to save us. His efforts will be for naught.</P>\n<BR/>\n<P>I must see to it that my best couriers get through the enemy lines and warn him off. Hearthglen must prepare to dig in and rally the rest of the Crusade.</P>\n<BR/>\n<P>With any luck they''ll get through before nightfall.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3101;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<H1 align=\"center\">The Path of Redemption</H1>\n<BR/>\n<IMG src=\"Interface\\FlavorImages\\ScarletCrusadeLogo\"/>\n</BODY>\n</HTML>\n' WHERE `entry`=3121;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>The voice whispered, \"Come to me.\" From the very beginning I knew that it was the Holy Light speaking to me in dreams. At last! After all of my years of prayers and good deeds, the cleansing of the blight of the unliving from the face of Azeroth. After all of the failures and resurrections.</P>\n<BR/>\n<P>Finally!</P>\n</BODY>\n</HTML>' WHERE `entry`=3122;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>It happened again. \"Come to me...\", the Light commanded.</P>\n<BR/>\n<P>This time I woke up freezing, but it wasn''t cold in my chambers. I''m going to redouble my efforts! I''ll tell the high abbot tomorrow that I want prayers increased. No more half-measures!</P>\n<BR/>\n<P>The Holy Light has taken notice of our good work. I can feel it!</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3123;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>This time I was awake! It was very vivid, and yet for over a minute, in the middle of the warm, sunny day, my breath came out misted and chill. One of the priests noticed and dropped to his knees in prayer.</P>\n<BR/>\n<P>No one else heard the voice, though. At least the witness proves that I''m not going insane. Maybe I should ask Landgren to pray on the matter?</P>\n<BR/>\n<P>I''ll get Jordan and Street to scrutinize their recruiting efforts tomorrow. We''ve grown bloated with ranks of unbelievers who yearn only to destroy the undead. That''s not enough!</P>\n<BR/>\n</BODY>\n</HTML>\n\n\n\n' WHERE `entry`=3124;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>The commander and the bishop were both receptive. Not that they had any choice. Bishop Street in particular seemed very enthusiastic. He spoke of a new crusade and swore to ferret out the weak of faith within our ranks.</P>\n<BR/>\n<P>I told him to go easy. We''re not destroying the Crusade so much as forming an elite cadre of the most faithful to do the Light''s bidding in Northrend. I fear the man''s friendship with LeCraft is slowly twisting him. They both have their uses, though.</P>\n<BR/>\n<P>Street''s talk of a new crusade, however, has me thinking. I believe that when this new force is assembled, I will give us a new name. It''ll have to be evocative of our new mission, yet still provide a tie to the past. I will pray with the high abbot on this.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3125;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>Our prayers have been answered. The high abbot was particularly moved by the force of the Light''s voice, its clarity, and sense of purpose.</P>\n<BR/>\n<P>Those of us going north - the most faithful - shall be known as the Scarlet Onslaught.</P>\n<BR/>\n<P>And an onslaught upon Northrend we shall be! The cancer of the Scourge threatens to overflow in the crown of the world and drown the rest of us. The time has come to take the fight directly to the Lich King''s doorstep.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3126;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>It is with trepidation that I gaze upon New Avalon, I somehow suspect for the last time. The fate of our cause lies in Northrend. I am filled with a sense of ominous foreboding for some reason. The mission ahead should shake away these concerns. I will put them out of my mind.</P>\n<BR/>\n<P>The Crimson Dawn is upon us.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3127;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<BR/>\n<P>It is with trepidation that I gaze upon New Avalon, I somehow suspect for the last time. The fate of our cause lies in Northrend. I am filled with a sense of ominous foreboding for some reason. The mission ahead should shake away these concerns. I will put them out of my mind.</P>\n<BR/>\n<P>The Crimson Dawn is upon us.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3129;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>There''s been no word from any of my couriers this morning. It''s clear that none of them made it through to Hearthglen. The Plaguelands are lost. Pureblood will come with his forces and they''ll be annihilated out in the open.</P>\n<BR/>\n<P>This afternoon I received a vision from the Light. In it, I saw the utter destruction of everything that we''ve built here. The message was clear - I was being told to take the remainder of the most faithful and abandon the Crusade to their doom.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3143;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Landgren later told me that he''d received the same vision. I cannot comprehend how the Light would tell us to take such a dishonorable action, but it is not my place to question - I am to obey, and obey I shall.</P>\n<BR/>\n<P>It was with trepidation that I gazed upon New Avalon, I suspect for the last time. Our fate lies in Northrend. I am filled with a sense of ominous foreboding for some reason. The mission ahead should shake away these concerns. I will put them out of my mind.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3144;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Perhaps with luck, High Commander Pureblood will somehow endure and marshal the survivors. I''m a coward - a dog running away with my tail tucked between my legs!</P>\n<BR/>\n<P>Two months they tell me that this journey is going to take. The other ships aren''t built for speed like the Folly. They''re carrying most of our forces and equipment, and they''re not much more than single sail freighters, but they''ll get there safely.</P>\n<BR/>\n<P>I''m not looking forward to this, but for the Light I will endure the sea sickness. I simply mustn''t let the others see.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3145;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>I''ve not written in a while. It''s as much as I can do to stand upright and not get sick. The men are beginning to wonder why I keep myself holed up in my cabin most of the time. It wouldn''t be good for morale for them to see me this way.</P>\n<BR/>\n<P>It shouldn''t be long now. I pray that it won''t be. Six weeks already and every day it seems that the weather gets worse. I can only hope that Northrend itself does not have such horrible weather. I wasn''t built for the cold.</P>\n<BR/>\n<P>The Holy Light has been silent for a very long time.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3146;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>We were attacked with no warning whatsoever! Giants in massive oared longships came out of the mist like ghosts! They were silent as the dead.</P>\n<BR/>\n<P>I lost a ship and all of the men on it. We fought with great courage and skill considering that we have only the most rudimentary naval combat training.</P>\n<BR/>\n<P>Afterward, the screams of our men who''d been taken captive by the giants echoed across the water. After a while it grew silent again. Bishop Street led the men in prayers.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3147;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>I awoke this morning in the middle of making adjustments to my maps. The Light was guiding my hand, showing me exactly where we must go.</P>\n<BR/>\n<P>We are close!</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3148;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Landfall!</P>\n<BR/>\n<P>Exiting the rowboat upon the beach, I planted our banner and was overcome by the Holy Light, which spoke through me. Today is the Crimson Dawn - the great day that we''ve waited for. This is to be the site of New Hearthglen. We are no longer the Scarlet Crusade. We are now the Scarlet Onslaught!</P>\n<BR/>\n<P>And an onslaught upon Northrend we shall be! The cancer of the Scourge threatens to overflow in the crown of the world and drown the rest of us. The time has come to take the fight directly to the Lich King''s doorstep!</P>\n</BODY>\n</HTML>' WHERE `entry`=3149;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>It''s been almost a month now and construction has proceeded apace. I''ve been too busy to write. My scouts tell me that this land is full of dragons and other strange beasts. We''ll keep to ourselves until we''re ready.</P>\n<BR/>\n<P>In the middle of services today, the high abbot proclaimed that a visitor would arrive soon - one that the Light was sending to lead us to victory.</P>\n<BR/>\n<P>I don''t know how I feel about that. Why didn''t the Light tell me? Have I not served faithfully? Now I''m to be replaced by some outsider?</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3150;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Admiral Barean Westwind showed up on my doorstep tonight! By all accounts he''d died upon these shores an age ago.</P>\n<BR/>\n<P>He didn''t look old enough and yet I knew that it was him. He claimed that he was the only survivor of his doomed fleet and that he''d survived only through the good graces of the Light.</P>\n</BODY>\n</HTML>' WHERE `entry`=3151;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>We stayed up speaking through the night and into the morning. He assured me that he had no intention of taking my place, but that the Light had instructed him to travel across the Great Dragonblight to serve as my advisor and commander in title only. He claimed that great change was coming to Northrend. The Alliance and the Horde were going to come en masse in response to a great plague that the Lich King was about to unleash upon them.</P>\n</BODY>\n</HTML>' WHERE `entry`=3152;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>The men have taken to the grand admiral with great zeal, especially High Abbot Landgren and Bishop Street. Apparently the Holy Light whispered a new blessing to the admiral in his sleep, which he passed on to Landgren. Some of the men have converted to the priesthood and are now being called \"raven priests\".</P>\n<BR/>\n<P>Only Jordan seems unimpressed. I suppose that''s understandable. He probably feels his position is threatened if mine is.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3153;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Something doesn''t seem right. I can''t put my finger on it, but I cannot make myself fully trust the admiral. He''s done nothing wrong. Quite the contrary! And yet, I have to trust my gut.</P>\n<BR/>\n<P>I will pray for understanding. The Light delivered the admiral to lead us to victory and it is not my place to question its decisions. I will continue to obey. I am faithful.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3154;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>Another couple of months have passed. We''ve made great strides in the construction of New Hearthglen. The wall is almost complete as is the barracks. Kaleiki''s men are miracle workers.</P>\n<BR/>\n<P>My heart hasn''t been into writing. I''ve been avoiding putting my thoughts here for some reason. The Light hasn''t visited me of late, though the admiral assures me that this is nothing to worry about.</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3155;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>My men report that a small group of Forsaken have broken ground on a camp along the hillside to the north. On the other side of the hill, the Alliance have apparently begun the construction of a much larger base.</P>\n<BR/>\n<P>The admiral says that we should leave them be. There are other Horde forces gathered to the west that would surely come to their aid if we were to attack. I don''t feel good about it, but I see the logic in his reasoning.</P>\n</BODY>\n</HTML>' WHERE `entry`=3156;
+UPDATE `page_text` SET `text`='<HTML>\n<BODY>\n<P>The first phase of construction is done. Admiral Westwind has ordered a group of my men to establish a toehold further to the north. He wouldn''t go into detail, claiming that he was being \"guided\" to do so.</P>\n<BR/>\n<P>We caught four spies from the Forsaken town, Venomspite, this afternoon. I''m going to have LeCraft torture them for information. If we only caught four, how many more have slipped in amongst us?</P>\n<BR/>\n<P>Why do I feel as if things are beginning to unravel?</P>\n</BODY>\n</HTML>\n' WHERE `entry`=3558;
+
+-- Missing gameobject "MILITARY RANKS OF THE HORDE & ALLIANCE" in Hall of Legends - Orgrimmar (map 1)
+DELETE FROM `gameobject` WHERE `guid`=203 AND `id`=179707;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(203,179707,1,1,1,1655.29,-4213.86,56.469,1.95064,0,0,0.696499,0.717557,180,100,1);
diff --git a/sql/old/3.3.5a/2011_10_09_00_characters_character_aura.sql b/sql/old/3.3.5a/2011_10_09_00_characters_character_aura.sql
new file mode 100644
index 00000000000..a8223fa06d6
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_09_00_characters_character_aura.sql
@@ -0,0 +1 @@
+DELETE FROM `character_aura` WHERE `spell` = 73001;
diff --git a/sql/old/3.3.5a/2011_10_11_00_world_creature_template.sql b/sql/old/3.3.5a/2011_10_11_00_world_creature_template.sql
new file mode 100644
index 00000000000..a86e5e53ea5
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_11_00_world_creature_template.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `scale`=1 WHERE `entry`=37690; -- Growing Ooze Puddle
diff --git a/sql/old/3.3.5a/2011_10_12_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_10_12_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..cf2ea31306d
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_12_00_world_spell_script_names.sql
@@ -0,0 +1,6 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_putricide_slime_puddle';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(70346,'spell_putricide_slime_puddle'),
+(72456,'spell_putricide_slime_puddle'),
+(72868,'spell_putricide_slime_puddle'),
+(72869,'spell_putricide_slime_puddle');
diff --git a/sql/old/3.3.5a/2011_10_15_00_world_waypoint_data.sql b/sql/old/3.3.5a/2011_10_15_00_world_waypoint_data.sql
new file mode 100644
index 00000000000..de8445b630c
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_15_00_world_waypoint_data.sql
@@ -0,0 +1 @@
+ALTER TABLE `waypoint_data` ADD `orientation` float NOT NULL DEFAULT '0' AFTER `position_z`;
diff --git a/sql/old/3.3.5a/2011_10_18_00_world_spell_group.sql b/sql/old/3.3.5a/2011_10_18_00_world_spell_group.sql
new file mode 100644
index 00000000000..fc11e3f365b
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_18_00_world_spell_group.sql
@@ -0,0 +1,9 @@
+DELETE FROM `spell_group` WHERE `id` = 1114;
+INSERT INTO `spell_group` (`id`, `spell_id`) VALUES
+(1114,1490),
+(1114,60431),
+(1114,60432),
+(1114,60433),
+(1114,51726),
+(1114,51734),
+(1114,51735);
diff --git a/sql/old/3.3.5a/2011_10_18_01_world_spell_group_stack_rules.sql b/sql/old/3.3.5a/2011_10_18_01_world_spell_group_stack_rules.sql
new file mode 100644
index 00000000000..20044aa6241
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_18_01_world_spell_group_stack_rules.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_group_stack_rules` WHERE `group_id` = 1114;
+INSERT INTO `spell_group_stack_rules` (`group_id`, `stack_rule`) VALUES
+(1114,3);
diff --git a/sql/old/3.3.5a/2011_10_19_00_world_spell_script_names.sql b/sql/old/3.3.5a/2011_10_19_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..900d26c4e84
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_19_00_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pri_shadowfiend';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(34433,'spell_pri_shadowfiend');
diff --git a/sql/old/3.3.5a/2011_10_21_00_world_creature_template_addon.sql b/sql/old/3.3.5a/2011_10_21_00_world_creature_template_addon.sql
new file mode 100644
index 00000000000..fed232a29d2
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_21_00_world_creature_template_addon.sql
@@ -0,0 +1,3 @@
+-- Move Shadowfiend's Mana Leech Aura from spellscript to creature addon.
+DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_pri_shadowfiend';
+UPDATE `creature_template_addon` SET `auras`= '28305' WHERE `entry`=19668;
diff --git a/sql/old/3.3.5a/2011_10_22_00_world_sai.sql b/sql/old/3.3.5a/2011_10_22_00_world_sai.sql
new file mode 100644
index 00000000000..534e57297ef
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_00_world_sai.sql
@@ -0,0 +1,44 @@
+-- [Q] A Taste of Flame
+
+-- Cyrus Therepentous SAI
+SET @ENTRY := 9459;
+SET @GOSSIP := 40060;
+UPDATE `creature_template` SET `AIName`='SmartAI',`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
+(@ENTRY,0,0,1,62,0,100,0,@GOSSIP,0,0,0,12,9461,1,360000,0,0,0,8,0,0,0,-7656.939941,-3009.474121,133.205612,4.830283,"Cyrus Therepentous - On Gossip Select - Summon Frenzied Black Drake"),
+(@ENTRY,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,"Cyrus Therepentous - On Gossip Select (Link) - Close Gossip");
+
+-- Actual gossip option and text for Cyrus Therepentous
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=2494;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,2494);
+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
+(@GOSSIP,0,0,"I present you with proof...",1,1,0,0,0,0,NULL);
+
+-- Frenzied Black Drake SAI
+SET @ENTRY := 9461;
+SET @SPELL_FRENZY := 8269;
+SET @SPELL_DECIMATE := 13459;
+SET @SPELL_FLAME_BREATH := 9573;
+SET @SPELL_FLAME_BUFFET := 9574;
+UPDATE `creature_template` SET `AIName`='SmartAI',`mechanic_immune_mask`=1104 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
+(@ENTRY,0,0,0,0,0,100,0,2300,2900,19500,46300,11,@SPELL_FLAME_BREATH,0,0,0,0,0,2,0,0,0,0,0,0,0,"Frenzied Black Drake - In Combat - Cast Flame Breath"),
+(@ENTRY,0,1,0,0,0,100,0,1100,3800,2300,6100,11,@SPELL_FLAME_BUFFET,0,0,0,0,0,2,0,0,0,0,0,0,0,"Frenzied Black Drake - In Combat - Cast Flame Buffet"),
+(@ENTRY,0,2,0,0,0,100,0,28500,31600,70100,74400,11,@SPELL_DECIMATE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Frenzied Black Drake - In Combat - Cast Decimate"),
+(@ENTRY,0,3,4,2,0,100,1,0,30,0,0,11,@SPELL_FRENZY,1,0,0,0,0,1,0,0,0,0,0,0,0,"Frenzied Black Drake - At 30% HP - Cast Frenzy"),
+(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Frenzied Black Drake - At 30% HP - Emote Line 0");
+-- Text
+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,"%s goes into a frenzy!",16,0,100,0,0,0,"Frenzied Black Drake");
+
+-- Conditions for the gossip option
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`Comment`) VALUES
+(15,@GOSSIP,0,0,9,4022, 'Show gossip if on quest A Taste of Flame (1) OR'),
+(15,@GOSSIP,0,1,9,4023, 'Show gossip if on quest A Taste of Flame (2) OR'),
+(15,@GOSSIP,0,2,9,4024, 'Show gossip if on quest A Taste of Flame (3) OR');
diff --git a/sql/old/3.3.5a/2011_10_22_01_world_quest_relation.sql b/sql/old/3.3.5a/2011_10_22_01_world_quest_relation.sql
new file mode 100644
index 00000000000..f0d15832b98
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_01_world_quest_relation.sql
@@ -0,0 +1,36 @@
+-- corrected quests in creature_involvedrelation and creature_questrelation
+-- Horde npcs 14726 Rashona Straglash
+UPDATE `creature_involvedrelation` SET `quest` = 7824 WHERE `id` =14726 AND `quest` =7836;
+UPDATE `creature_questrelation` SET `quest` = 7824 WHERE `id` =14726 AND `quest` =7836;
+UPDATE `creature_involvedrelation` SET `quest` = 7832 WHERE `id` =14726 AND `quest` =7837;
+UPDATE `creature_questrelation` SET `quest` = 7832 WHERE `id` =14726 AND `quest` =7837;
+
+-- NPC 14727 Vehena
+UPDATE `creature_involvedrelation` SET `quest` = 7836 WHERE `id` =14727 AND `quest` =7832;
+UPDATE `creature_questrelation` SET `quest` = 7836 WHERE `id` =14727 AND `quest` =7832;
+UPDATE `creature_involvedrelation` SET `quest` = 7837 WHERE `id` =14727 AND `quest` =7824;
+UPDATE `creature_questrelation` SET `quest` = 7837 WHERE `id` =14727 AND `quest` =7824;
+
+-- Alliance npcs 14725 Raedon Dustriker
+UPDATE `creature_involvedrelation` SET `quest` = 10352 WHERE `id` =14725 AND `quest` =7792;
+UPDATE `creature_questrelation` SET `quest` = 10352 WHERE `id` =14725 AND `quest` =7792;
+UPDATE `creature_involvedrelation` SET `quest` = 10354 WHERE `id` =14725 AND `quest` =7798;
+UPDATE `creature_questrelation` SET `quest` = 10354 WHERE `id` =14725 AND `quest` =7798;
+
+-- NPC 20604 Dugiru
+UPDATE `creature_involvedrelation` SET `quest` = 7792 WHERE `id` =20604 AND `quest` =10352;
+UPDATE `creature_questrelation` SET `quest` = 7792 WHERE `id` =20604 AND `quest` =10352;
+UPDATE `creature_involvedrelation` SET `quest` = 7798 WHERE `id` =20604 AND `quest` =10354;
+UPDATE `creature_questrelation` SET `quest` = 7798 WHERE `id` =20604 AND `quest` =10354;
+
+-- NPC 14723 Mistina Steelshield
+UPDATE `creature_involvedrelation` SET `quest` = 7802 WHERE `id` =14723 AND `quest` =7807;
+UPDATE `creature_questrelation` SET `quest` = 7802 WHERE `id` =14723 AND `quest` =7807;
+UPDATE `creature_involvedrelation` SET `quest` = 7803 WHERE `id` =14723 AND `quest` =7808;
+UPDATE `creature_questrelation` SET `quest` = 7803 WHERE `id` =14723 AND `quest` =7808;
+
+-- NPC 14724 Bublo Acerbus
+UPDATE `creature_involvedrelation` SET `quest` = 7807 WHERE `id` =14724 AND `quest` =7802;
+UPDATE `creature_questrelation` SET `quest` = 7807 WHERE `id` =14724 AND `quest` =7802;
+UPDATE `creature_involvedrelation` SET `quest` = 7808 WHERE `id` =14724 AND `quest` =7803;
+UPDATE `creature_questrelation` SET `quest` = 7808 WHERE `id` =14724 AND `quest` =7803;
diff --git a/sql/old/3.3.5a/2011_10_22_02_world_gameobject_template.sql b/sql/old/3.3.5a/2011_10_22_02_world_gameobject_template.sql
new file mode 100644
index 00000000000..8effad58ca6
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_02_world_gameobject_template.sql
@@ -0,0 +1,4 @@
+DELETE FROM `gameobject_template` WHERE `entry` IN (180211,180213);
+INSERT INTO `gameobject_template`(`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `AIName`, `ScriptName`, `WDBVerified`) VALUES
+(180211,5,6314,'Uther''s Gnome Tribute','','','',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,'','',12340),
+(180213,5,6315,'Uther''s Night Elf Tribute','','','',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,'','',12340);
diff --git a/sql/old/3.3.5a/2011_10_22_03_world_sai.sql b/sql/old/3.3.5a/2011_10_22_03_world_sai.sql
new file mode 100644
index 00000000000..6003e1d365b
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_03_world_sai.sql
@@ -0,0 +1,69 @@
+-- [Q] A Meeting With The Magister
+-- [Q] An Audience With The Arcanist
+SET @ENTRY_HATHOREL := 36670;
+SET @ENTRY_TYBALIN := 36669;
+SET @QUEST_A := 20439;
+SET @QUEST_H := 24451;
+SET @GOSSIP_A := 10857;
+SET @GOSSIP_H := 10858;
+SET @SPELL_SUNREAVER_DISGUISE := 70973;
+SET @SPELL_COVENANT_DISGUISE := 70971;
+SET @SPELL_CREATE_BLADES := 69722;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_HATHOREL,@ENTRY_TYBALIN);
+UPDATE `quest_template` SET `OfferRewardText`="Excellent work. Now that this is in our hands, we must get it to Caladis Brightspear as soon as possible. We can't risk the book falling back into Sunreaver hands.$BI'll ensure that Shandy Glossgleam gets his tabard back without incident, along with a healthy reward for his help",`RequestItemsText`="Have you recovered that book?" WHERE `entry`=@QUEST_A;
+UPDATE `quest_template` SET `OfferRewardText`="Excellent work. Now that this is in our hands, we must get it to Myralion Sunblaze as soon as possible. We can't risk the Silver Covenant taking the book from us again.$BI'll get that tabard back to Shandy and see that he's well compensated for his assistance. Once the book is in Myralion's hands, the Silver Covenant won't be a threat anymore.",`RequestItemsText`="Have you recovered that book?" WHERE `entry`=@QUEST_H;
+DELETE FROM `creature` WHERE `guid`=150186 AND `id`=@ENTRY_HATHOREL; -- Double-spawned Hathorel
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_HATHOREL,@ENTRY_HATHOREL*100,@ENTRY_TYBALIN,@ENTRY_TYBALIN*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_TYBALIN,0,0,0,19,0,100,0,@QUEST_A,0,0,0,11,@SPELL_SUNREAVER_DISGUISE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Quest Accept - Cast Sunreaver Disguise"),
+(@ENTRY_TYBALIN,0,1,0,20,0,100,0,@QUEST_A,0,0,0,28,@SPELL_SUNREAVER_DISGUISE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Quest Reward - Remove Aura Sunreaver Disguise"),
+(@ENTRY_TYBALIN,0,2,3,62,0,100,0,@GOSSIP_A,1,0,0,11,@SPELL_SUNREAVER_DISGUISE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Quest Accept - Cast Sunreaver Disguise"),
+(@ENTRY_TYBALIN,0,3,0,61,0,100,0,@GOSSIP_A,1,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Gossip Select - Close Gossip"),
+(@ENTRY_TYBALIN,0,4,0,62,0,100,0,@GOSSIP_H,0,0,0,80,@ENTRY_TYBALIN*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arcanist Tybalin - On Gossip Select - Run Script"),
+(@ENTRY_TYBALIN*100,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,"Arcanist Tybalin - On Script - Close Gossip"),
+(@ENTRY_TYBALIN*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Script - Say text 0"),
+(@ENTRY_TYBALIN*100,9,2,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Script - Say text 1"),
+(@ENTRY_TYBALIN*100,9,3,0,0,0,100,0,0,0,0,0,11,@SPELL_CREATE_BLADES,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Script - Cast Create Ancient Dragonforged Blades"),
+(@ENTRY_TYBALIN*100,9,4,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arcanist Tybalin - On Script - Say text 2"),
+
+(@ENTRY_HATHOREL,0,0,0,19,0,100,0,@QUEST_H,0,0,0,11,@SPELL_COVENANT_DISGUISE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Quest Accept - Cast Covenant Disguise"),
+(@ENTRY_HATHOREL,0,1,0,20,0,100,0,@QUEST_H,0,0,0,28,@SPELL_COVENANT_DISGUISE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Quest Reward - Remove Aura Covenant Disguise"),
+(@ENTRY_HATHOREL,0,2,3,62,0,100,0,@GOSSIP_H,1,0,0,11,@SPELL_COVENANT_DISGUISE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Quest Accept - Cast Covenant Disguise"),
+(@ENTRY_HATHOREL,0,3,0,61,0,100,0,@GOSSIP_H,1,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Gossip Select - Close Gossip"),
+(@ENTRY_HATHOREL,0,4,0,62,0,100,0,@GOSSIP_A,0,0,0,80,@ENTRY_HATHOREL*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Magister Hathorel - On Gossip Select - Run Script"),
+(@ENTRY_HATHOREL*100,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,"Magister Hathorel - On Script - Close Gossip"),
+(@ENTRY_HATHOREL*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Script - Say text 0"),
+(@ENTRY_HATHOREL*100,9,2,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Script - Say text 1"),
+(@ENTRY_HATHOREL*100,9,3,0,0,0,100,0,0,0,0,0,11,@SPELL_CREATE_BLADES,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Script - Cast Create Ancient Dragonforged Blades"),
+(@ENTRY_HATHOREL*100,9,4,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Magister Hathorel - On Script - Say text 2");
+
+-- Actual gossip option
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIP_A,@GOSSIP_H);
+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_A,0,0,"I'm ready to deliver the tome, Magister Hathorel.",1,1,0,0,0,0,NULL),
+(@GOSSIP_A,1,0,"Would you renew my Sunreaver disguise?",1,1,0,0,0,0,NULL),
+(@GOSSIP_H,0,0,"I'm ready to deliver the tome, Arcanist Tybalin.",1,1,0,0,0,0,NULL),
+(@GOSSIP_H,1,0,"Would you renew my Covenant disguise?",1,1,0,0,0,0,NULL);
+
+-- Magister Hathorel
+DELETE FROM `creature_text` WHERE `entry` IN (@ENTRY_HATHOREL,@ENTRY_TYBALIN);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@ENTRY_HATHOREL,0,0,"You're late, courier. No, I don't want any excuses; this errand is far too important.",12,0,100,1,0,0,"Magister Hathorel"),
+(@ENTRY_HATHOREL,1,0,"Here's the tome our representative brought from Wyrmrest. Get this to Myralion Sunblaze immediately.",12,0,100,1,0,0,"Magister Hathorel"),
+(@ENTRY_HATHOREL,2,0,"Watch your back, courier. I needn't remind you of the value of the book, nor the fact that the Silver Covenant will stop at nothing to take it from us.",12,0,100,1,0,0,"Magister Hathorel"),
+-- Arcanist Tybalin
+(@ENTRY_TYBALIN,0,0,"It's good to finally see you, courier. Krasus has entrusted us with one of the few remaining copies of Ancient Dragonforged Blades.",12,0,100,1,0,0,"Arcanist Tybalin"),
+(@ENTRY_TYBALIN,1,0,"Here is the book. You must ensure it gets to Caladis Brightspear in Icecrown before the Sunreavers realize what is happening.",12,0,100,1,0,0,"Arcanist Tybalin"),
+(@ENTRY_TYBALIN,2,0,"Travel quickly! The Sunreavers will not waste any time once they realize that we have the information they seek.",12,0,100,1,0,0,"Arcanist Tybalin");
+
+-- Conditions for the gossip options
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (15) AND `SourceGroup` IN (@GOSSIP_A,@GOSSIP_H);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`) VALUES
+(15,@GOSSIP_A,0,9,@QUEST_A),
+(15,@GOSSIP_H,0,9,@QUEST_H),
+
+(15,@GOSSIP_A,1,11,@SPELL_COVENANT_DISGUISE),
+(15,@GOSSIP_H,1,11,@SPELL_SUNREAVER_DISGUISE),
+
+(15,@GOSSIP_A,1,9,@QUEST_A),
+(15,@GOSSIP_H,1,9,@QUEST_H);
diff --git a/sql/old/3.3.5a/2011_10_22_04_world_sai.sql b/sql/old/3.3.5a/2011_10_22_04_world_sai.sql
new file mode 100644
index 00000000000..71aac7a302b
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_04_world_sai.sql
@@ -0,0 +1,145 @@
+-- [Q] Still At It
+-- "Tipsy" McManus SAI
+SET @ENTRY := 28566;
+SET @GOSSIP := 9713;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100+0,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,@ENTRY*100+4,@ENTRY*100+5,@ENTRY*100+6,@ENTRY*100+7,@ENTRY*100+8);
+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,@GOSSIP,0,0,0,80,@ENTRY*100+0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - On gossip option select - Run script"),
+(@ENTRY,0,1,0,1,1,100,0,5000,5000,11000,11000,88,@ENTRY*100+1,@ENTRY*100+5,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - After 5 Sec - Run Random Script"),
+(@ENTRY,0,2,0,38,1,100,0,1,1,0,0,80,@ENTRY*100+6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - On Data Set 1 1 - Run Completion Script"),
+(@ENTRY,0,3,0,1,1,100,1,103900,103900,0,0,80,@ENTRY*100+8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Call Script Quest successful (phase 1) after some time (104s=9tasks)"),
+(@ENTRY,0,4,0,1,2,100,1,0,0,0,0,80,@ENTRY*100+7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Timed - Run Failure Script"),
+(@ENTRY,0,5,0,1,4,100,1,8000,8000,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Timed - Set Back Gossip & Quest Flags"),
+(@ENTRY,0,6,0,1,4,100,1,8010,8010,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Timed - Reset script"),
+-- Start Script
+(@ENTRY*100+0,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,"Tipsy McManus - Script 0 - Close Gossip"),
+(@ENTRY*100+0,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,"Tipsy McManus - Script 0 - Turn of Gossip & Questgiver flags"),
+(@ENTRY*100+0,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,"Tipsy McManus - Script 0 - Say Text 0"),
+(@ENTRY*100+0,9,3,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 0 - Set Phase 1"),
+-- Wants Orange
+(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 1 - Say Text 1"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,12,28535,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,"Tipsy McManus - Script 1 - Summon Wants Orange"),
+(@ENTRY*100+1,9,2,0,0,0,100,0,10000,10000,10000,10000,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 1 - set phase 2"),
+-- Wants Papaya
+(@ENTRY*100+2,9,0,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 2 - Say Text 2"),
+(@ENTRY*100+2,9,1,0,0,0,100,0,0,0,0,0,12,28536,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,"Tipsy McManus - Script 2 - Summon Wants Papaya"),
+(@ENTRY*100+2,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 2 - set phase 2"),
+-- Wants Bananas
+(@ENTRY*100+3,9,0,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 3 - Say Text 3"),
+(@ENTRY*100+3,9,1,0,0,0,100,0,0,0,0,0,12,28537,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,"Tipsy McManus - Script 3 - Summon Wants Bananas"),
+(@ENTRY*100+3,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 3 - set phase 2"),
+-- Steaming Valve
+(@ENTRY*100+4,9,0,0,0,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 4 - Say Text 4"),
+(@ENTRY*100+4,9,1,0,0,0,100,0,0,0,0,0,12,28539,1,10000,0,0,0,8,0,0,0,5548.1,5767.4,-76.2673,-2.1293,"Tipsy McManus - Script 4 - Summon Steaming Valve"),
+(@ENTRY*100+4,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 4 - set phase 2"),
+-- Wants Fire
+(@ENTRY*100+5,9,0,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 5 - Say Text 5"),
+(@ENTRY*100+5,9,1,0,0,0,100,0,0,0,0,0,12,28540,1,10000,0,0,0,8,0,0,0,5552.58,5765.66,-78.0212,-3.00195,"Tipsy McManus - Script 5 - Summon Wants Fire"),
+(@ENTRY*100+5,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 5 - Set Phase 2"),
+-- Task successful
+(@ENTRY*100+6,9,0,0,0,0,100,0,0,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 6 - Say Text 6"),
+-- End failure
+(@ENTRY*100+7,9,0,0,0,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 7 - Say Text 7"),
+(@ENTRY*100+7,9,1,0,0,0,100,0,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 7 - Set Phase 4"),
+-- Completion script
+(@ENTRY*100+8,9,0,0,0,0,100,0,0,0,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 8 - Say Text 8"),
+(@ENTRY*100+8,9,1,0,0,0,100,0,0,0,0,0,50,190643,30000,0,0,0,0,8,0,0,0,5547.13525,5767.09961,-78.025856,2.25147343,"Tipsy McManus - Script 8 - Summon Thunderbrew's Jungle Punch"),
+(@ENTRY*100+8,9,2,0,0,0,100,0,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 8 - Set Phase 4");
+
+
+-- NPC talk text for "Tipsy" McManus
+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,"Beginning the distillation in 5 seconds.",12,0,100,0,0,0,"Tipsy McManus"),
+(@ENTRY,1,0,"Add another orange, quickly!",12,0,100,25,0,0,"Tipsy McManus"),
+(@ENTRY,2,0,"Put a papaya in the still!",12,0,100,25,0,0,"Tipsy McManus"),
+(@ENTRY,3,0,"Add bananas!",12,0,100,25,0,0,"Tipsy McManus"),
+(@ENTRY,4,0,"Pressure's too high! Open the pressure valve!",12,0,100,5,0,0,"Tipsy McManus"),
+(@ENTRY,5,0,"The still needs heat! Light the brazier!",12,0,100,5,0,0,"Tipsy McManus"),
+(@ENTRY,6,0,"Good job! Keep your eyes open, now.",12,0,100,4,0,0,"Tipsy McManus"),
+(@ENTRY,6,1,"That'll do. Never know what it'll need next...",12,0,100,4,0,0,"Tipsy McManus"),
+(@ENTRY,6,2,"Nicely handled! Stay on your toes!",12,0,100,4,0,0,"Tipsy McManus"),
+(@ENTRY,6,3,"Well done! Be ready for anything!",12,0,100,4,0,0,"Tipsy McManus"),
+(@ENTRY,7,0,"It's no good! I'm shutting it down...",12,0,100,0,0,0,"Tipsy McManus"),
+(@ENTRY,8,0,"We've done it! Come get the cask.",12,0,100,0,0,0,"Tipsy McManus");
+
+-- Add Gossip option
+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`) VALUES
+(@GOSSIP,0,0,"I'm ready to start the distillation, uh, Tipsy.",1,1);
+
+-- Add gossip_menu_option condition
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`) VALUES
+(15,@GOSSIP,0,9,12644); -- Quest "Still At It" Has to be active and incomplete
+
+-- Update creature_template for Wants XX targets
+UPDATE `creature_template` SET `minlevel`=70,`maxlevel`=70,`exp`=2,`unit_class`=2,`unit_flags`=`unit_flags`|33554432,`flags_extra`=`flags_extra`|128,`InhabitType`=4,`family`=23,`type`=3 WHERE `entry` IN (28535,28536,28537,28539,28540);
+
+-- Wants Orange SAI
+SET @ENTRY := 28535;
+SET @SPELL_ORANGE := 51931;
+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,8,0,100,1,@SPELL_ORANGE,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0,"Wants Orange - On Spellhit - Set Data McManus");
+
+-- Wants Papaya SAI
+SET @ENTRY := 28536;
+SET @SPELL_PAPAYA := 51933;
+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,8,0,100,1,@SPELL_PAPAYA,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0,"Wants Papaya - On Spellhit - Set Data McManus");
+
+-- Wants Bananas SAI
+SET @ENTRY := 28537;
+SET @SPELL_BANANAS := 51932;
+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,8,0,100,1,@SPELL_BANANAS,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0,"Wants Bananas - On Spellhit - Set Data McManus");
+
+-- Steam Valve SAI
+SET @ENTRY := 28539;
+SET @SPELL_STEAM_BLAST := 51920;
+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,11,@SPELL_STEAM_BLAST,0,0,0,0,0,1,0,0,0,0,0,0,0,"Steam Valve - Out Of Combat - Cast Cosmetic Steam Blast"),
+(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0,"Steam Valve - On Death - Set Data McManus");
+
+-- Pressure Valve SAI
+SET @ENTRY := 190635;
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=1 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,1,0,0,64,0,100,0,500,500,0,0,51,0,0,0,0,0,0,19,28539,0,0,0,0,0,0,"Pressure Valve - On Gossip Hello - Kill Steam Valve");
+
+-- Wants Fire SAI
+SET @ENTRY := 28540;
+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,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0,"Wants Fire - On Death - Set Data McManus");
+
+-- Brazier SAI
+SET @ENTRY := 190636;
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' 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
+(@ENTRY,1,0,0,64,0,100,0,500,500,0,0,51,0,0,0,0,0,0,19,28540,0,0,0,0,0,0,"Brazier - On Gossip Hello - Kill Wants Fire");
+
+-- Add Spell Targets
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (51931,51932,51933);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`) VALUES
+(13,51931,18,1,28535), -- Toss Orange requires target Wants Orange
+(13,51931,18,1,28536), -- Toss Orange requires target Wants Papaya
+(13,51931,18,1,28537), -- Toss Orange requires target Wants Bananas
+(13,51933,18,1,28535), -- Toss Papaya requires target Wants Orange
+(13,51933,18,1,28536), -- Toss Papaya requires target Wants Papaya
+(13,51933,18,1,28537), -- Toss Papaya requires target Wants Bananas
+(13,51932,18,1,28535), -- Toss Bananas requires target Wants Orange
+(13,51932,18,1,28536), -- Toss Bananas requires target Wants Papaya
+(13,51932,18,1,28537); -- Toss Bananas requires target Wants Bananas
diff --git a/sql/old/3.3.5a/2011_10_22_05_world_misc.sql b/sql/old/3.3.5a/2011_10_22_05_world_misc.sql
new file mode 100644
index 00000000000..57e4f740530
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_05_world_misc.sql
@@ -0,0 +1,14 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q14112_14145_chum_the_water';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(66741,'spell_q14112_14145_chum_the_water');
+
+-- Template updates for creature 35071 (North Sea Mako)
+UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`baseattacktime`=2000,`InhabitType`=`InhabitType`&~1 WHERE `entry` IN (35071,35060,35061); -- North Sea * (Last 2 entries guessed)
+UPDATE `creature_template` SET `faction_A`=1885,`faction_H`=1885,`baseattacktime`=2000 WHERE `entry`=35072; -- Angry Kvaldir
+-- Addon data for creature 35071 (North Sea Mako)
+DELETE FROM `creature_template_addon` WHERE `entry` IN (35071,35072,35060,35061);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(35071,0,0,1,0, NULL), -- North Sea Mako
+(35060,0,0,1,0, NULL), -- North Sea Thresher - guessed
+(35061,0,0,1,0, NULL), -- North Sea Blue Shark - guessed
+(35072,0,0,1,0, NULL); -- Angry Kvaldir
diff --git a/sql/old/3.3.5a/2011_10_22_06_world_sai.sql b/sql/old/3.3.5a/2011_10_22_06_world_sai.sql
new file mode 100644
index 00000000000..433252f4e2d
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_06_world_sai.sql
@@ -0,0 +1,19 @@
+-- Snowblind Follower SAI
+SET @ENTRY := 29618;
+SET @SPELL_NET := 66474;
+UPDATE `creature_template` SET `AIName`='SmartAI' 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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_NET,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Snowblind Follower - On Spellhit - Say Line 0 (random)"),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,33,34899,0,0,0,0,0,7,0,0,0,0,0,0,0,"Snowblind Follower - On Spellhit (Link) - Quest Credit"),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Snowblind Follower - On Spellhit (Link) - Forced Despawn");
+
+-- Texts
+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,"Grrrrr!",12,0,100,0,0,0,"Snowblind Follower"),
+(@ENTRY,0,1,"Me not afraid!",12,0,100,0,0,0,"Snowblind Follower"),
+(@ENTRY,0,2,"Net not stop me! No... net stop me.",12,0,100,0,0,0,"Snowblind Follower"),
+(@ENTRY,0,3,"No kill me!",12,0,100,0,0,0,"Snowblind Follower"),
+(@ENTRY,0,4,"No!",12,0,100,0,0,0,"Snowblind Follower"),
+(@ENTRY,0,5,"You no take... me!",12,0,100,0,0,0,"Snowblind Follower");
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
new file mode 100644
index 00000000000..8e85d719cf8
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_07_world_sai.sql
@@ -0,0 +1,51 @@
+-- Hooked Net SHOULD hit this hard, fyi!
+-- Sunreaver Agent SAI
+SET @ENTRY := 36776;
+SET @SPELL_HOOKED_NET := 59260;
+SET @SPELL_SINISTER_STRIKE := 60195;
+SET @SPELL_VANISH := 71400; -- Why is this called Vanish?... It teleports caster behind target
+SET @SPELL_EVISCERATE := 15691;
+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
+(@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"),
+(@ENTRY,0,3,0,0,0,100,0,1000,1500,3000,3000,11,@SPELL_SINISTER_STRIKE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Sunreaver Agent - In Combat - Cast Sinister Strike"),
+(@ENTRY,0,4,0,0,0,100,1,4000,6000,0,0,11,@SPELL_VANISH,1,0,0,0,0,2,0,0,0,0,0,0,0,"Sunreaver Agent - In Combat - Cast Vanish"),
+(@ENTRY,0,5,0,0,0,100,0,9000,13000,20000,20000,11,@SPELL_EVISCERATE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Sunreaver Agent - In Combat - Cast Eviscerate");
+
+-- Texts
+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,"Did you think you would escape with your life?",12,0,100,1,0,0,"Sunreaver Agent"),
+(@ENTRY,0,1,"You'll never run us out of the city, Silver Covenant thug!",12,0,100,1,0,0,"Sunreaver Agent");
+
+-- Silver Covenant Agent SAI
+SET @ENTRY := 36774;
+SET @SPELL_HOOKED_NET := 59260;
+SET @SPELL_SINISTER_STRIKE := 60195;
+SET @SPELL_VANISH := 71400; -- Why is this called Vanish?... It teleports caster behind target
+SET @SPELL_EVISCERATE := 15691;
+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
+(@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"),
+(@ENTRY,0,3,0,0,0,100,0,1000,1500,3000,3000,11,@SPELL_SINISTER_STRIKE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Silver Covenant Agent - In Combat - Cast Sinister Strike"),
+(@ENTRY,0,4,0,0,0,100,1,4000,6000,0,0,11,@SPELL_VANISH,1,0,0,0,0,2,0,0,0,0,0,0,0,"Silver Covenant Agent - In Combat - Cast Vanish"),
+(@ENTRY,0,5,0,0,0,100,0,9000,13000,20000,20000,11,@SPELL_EVISCERATE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Silver Covenant Agent - In Combat - Cast Eviscerate");
+
+-- Texts by
+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,"You Sunreaver lackeys are all the same.",12,0,100,1,0,0,"Silver Covenant Agent"),
+(@ENTRY,0,1,"You won't escape from us so easily!",12,0,100,1,0,0,"Silver Covenant Agent");
+
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=30438; -- Sunreaver Agent
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=30310; -- Silver Covenant Agent
diff --git a/sql/old/3.3.5a/2011_10_22_08_world_sai.sql b/sql/old/3.3.5a/2011_10_22_08_world_sai.sql
new file mode 100644
index 00000000000..779f659f9af
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_08_world_sai.sql
@@ -0,0 +1,108 @@
+-- [Q] Tails Up
+-- Apparently it won't fall asleep due to evading. We are evading because the gossip won't show if we are in combat.. -_-
+
+-- Frost Leopard SAI
+SET @ENTRY := 29327;
+SET @QUEST := 13549;
+SET @GOSSIP := 54000;
+SET @SPELL_RAKE := 54668;
+SET @SPELL_BLOWGUN := 62105;
+SET @SPELL_SLEEP := 52742;
+UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=0,`gossip_menu_id`=@GOSSIP,`faction_A`=1990,`faction_H`=1990,`unit_flags`=`unit_flags`|0 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+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
+(@ENTRY,0,0,0,0,0,100,0,1000,1000,8000,11000,11,@SPELL_RAKE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Frost Leopard - In Combat - Cast Rake"),
+(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,2,1990,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Reset - Set Faction Back"),
+(@ENTRY,0,2,0,8,0,100,1,@SPELL_BLOWGUN,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,@SPELL_SLEEP,2,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script - Cast Sleep"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script - Set Faction Friendly"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script - Set npc_flag Gossip"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script - Evade"), -- The gossip only shows out of combat..
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script - Stop Auto Attack"),
+
+(@ENTRY,0,3,0,62,0,100,0,@GOSSIP,0,0,0,88,@ENTRY*100+1,@ENTRY*100+3,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Gossip Select - Run Random Script"),
+(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,36,33007,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script 1 - Update Template Male"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Frost Leopard - Script 1 - Say Line 0"),
+(@ENTRY*100+2,9,0,0,0,0,100,0,0,0,0,0,36,33010,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script 2 - Update Template Female"),
+(@ENTRY*100+2,9,1,0,0,0,100,0,0,0,0,0,33,33005,0,0,0,0,0,7,0,0,0,0,0,0,0,"Frost Leopard - On Script 2 - Quest Credit"),
+(@ENTRY*100+2,9,2,0,0,0,100,0,0,0,0,0,29,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Frost Leopard - On Script 2 - Follow Player"), -- Apparently crediting doesn't work through this action
+(@ENTRY*100+3,9,0,0,0,0,100,0,0,0,0,0,36,33007,0,0,0,0,0,1,0,0,0,0,0,0,0,"Frost Leopard - On Script 3 - Update Template Male"),
+(@ENTRY*100+3,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Frost Leopard - Script 3 - Say Line 0");
+
+-- Insert gossip and static text
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=14266;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,14266);
+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`) VALUES
+(@GOSSIP,0,0,"Lift the frost leopard's tail to check if it's a male or a female.",1,1,0);
+
+-- Text
+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,"It's an angry male!",42,0,100,0,0,0,"Male Frost Leopard");
+
+-- Male Frost Leopard SAI
+SET @ENTRY := 33007;
+SET @SPELL_RAKE := 54668;
+UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=1990,`faction_H`=1990,`unit_flags`=`unit_flags`|0 WHERE `entry`=@ENTRY;
+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,0,0,100,0,3000,4000,9000,11000,11,@SPELL_RAKE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Male Frost Leopard - In Combat - Cast Rake");
+
+-- Icepaw Bear SAI
+SET @ENTRY := 29319;
+SET @QUEST := 13549;
+SET @GOSSIP := 55000;
+SET @SPELL_CLAWS_OF_ICE := 54632;
+SET @SPELL_BLOWGUN := 62105;
+SET @SPELL_SLEEP := 52742;
+UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=0,`gossip_menu_id`=@GOSSIP,`faction_A`=1990,`faction_H`=1990,`unit_flags`=`unit_flags`|0 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+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
+(@ENTRY,0,0,0,0,0,100,0,1000,1000,8000,11000,11,@SPELL_CLAWS_OF_ICE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Icepaw Bear - In Combat - Cast Claws of Ice"),
+(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,2,1990,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Reset - Set Faction Back"),
+(@ENTRY,0,2,0,8,0,100,1,@SPELL_BLOWGUN,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,11,@SPELL_SLEEP,2,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script - Cast Sleep"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script - Set Faction Friendly"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script - Set npc_flag Gossip"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script - Evade"), -- The gossip only shows out of combat..
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script - Stop Auto Attack"),
+
+(@ENTRY,0,3,0,62,0,100,0,@GOSSIP,0,0,0,88,@ENTRY*100+1,@ENTRY*100+3,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Gossip Select - Run Random Script"),
+(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,36,33008,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script 1 - Update Template Male"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Icepaw Bear - Script 1 - Say Line 0"),
+(@ENTRY*100+2,9,0,0,0,0,100,0,0,0,0,0,36,33011,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script 2 - Update Template Female"),
+(@ENTRY*100+2,9,1,0,0,0,100,0,0,0,0,0,33,33006,0,0,0,0,0,7,0,0,0,0,0,0,0,"Icepaw Bear - On Script 2 - Quest Credit"),
+(@ENTRY*100+2,9,2,0,0,0,100,0,0,0,0,0,29,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Icepaw Bear - On Script 2 - Follow Player"), -- Apparently crediting doesn't work through this action
+(@ENTRY*100+3,9,0,0,0,0,100,0,0,0,0,0,36,33008,0,0,0,0,0,1,0,0,0,0,0,0,0,"Icepaw Bear - On Script 3 - Update Template Male"),
+(@ENTRY*100+3,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Icepaw Bear - Script 3 - Say Line 0");
+
+-- Insert gossip and static text
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=14267;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,14267);
+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`) VALUES
+(@GOSSIP,0,0,"Lift the icepaw bear's tail to check if it's a male or a female.",1,1,0);
+
+-- Male Icepaw Bear SAI
+SET @ENTRY := 33008;
+SET @SPELL_CLAWS_OF_ICE := 54632;
+UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=1990,`faction_H`=1990,`unit_flags`=`unit_flags`|0 WHERE `entry`=@ENTRY;
+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,0,0,100,0,3000,4000,9000,11000,11,@SPELL_CLAWS_OF_ICE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Male Icepaw Bear - In Combat - Cast Claws of Ice");
+
+-- Text
+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,"It's an angry male!",42,0,100,0,0,0,"Male Icepaw Bear");
+
+-- Only show first gossip if player is on quest Tails Up
+DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP AND `ConditionValue1`=@QUEST;
+DELETE FROM `conditions` WHERE `SourceEntry` IN (@SPELL_BLOWGUN) AND `ConditionValue1` IN (29327,29319);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP,0,0,9,@QUEST,0,0,0,'',"Only show gossip if player is on quest Tails Up"),
+(17,0,@SPELL_BLOWGUN,0,19,29327,0,0,0,'',"Spell To'kini's Blowgun can only be cast at Frost Leopard"),
+(17,0,@SPELL_BLOWGUN,1,19,29319,0,0,0,'',"Spell To'kini's Blowgun can only be cast at Icepaw Bear");
diff --git a/sql/old/3.3.5a/2011_10_22_09_world_sai.sql b/sql/old/3.3.5a/2011_10_22_09_world_sai.sql
new file mode 100644
index 00000000000..2bf96f951c6
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_09_world_sai.sql
@@ -0,0 +1,47 @@
+-- Talbuk Doe SAI
+SET @ENTRY := 20610; -- Talbuk Doe
+SET @SPELL_GORE := 32019; -- Gore
+SET @SPELL_TAG := 35771; -- Tag Subbued Talbuk
+SET @SPELL_TAG_CREDIT := 40347; -- Talbuk Tagging Credit
+SET @SPELL_SLEEPING := 42648; -- Sleeping Sleep
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - On Aggro - Say text 0"),
+(@ENTRY,0,1,0,0,0,100,0,1000,1000,8000,11000,11,@SPELL_GORE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Talbuk Doe - In Combat - Cast Gore"),
+(@ENTRY,0,2,0,2,0,100,1,0,20,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - At 20% HP - Say Text 1"),
+(@ENTRY,0,3,0,8,0,100,0,@SPELL_TAG,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - On Spellhit - Run Script"),
+(@ENTRY,0,4,0,11,0,100,0,0,0,0,0,19,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - On Respawn - Remove Unit Flag"),
+(@ENTRY*100,9,0,0,0,0,100,1,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Evade"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,33,20982,0,0,0,0,0,7,0,0,0,0,0,0,0,"Talbuk Doe - Script - Give Quest Credit"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,18,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Set Unit Flag"),-- Make it un-attackable in any way
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,11,@SPELL_SLEEPING,1,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Doe - Script - Cast Sleeping Sleep");
+-- Texts
+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,"%s calls for the aid of a nearby male!",16,0,100,0,0,0,"Talbuk Doe"),
+(@ENTRY,1,0,"%s seems to have weakened.",16,0,100,0,0,0,"Talbuk Doe");
+
+-- Talbuk Sire SAI
+SET @ENTRY := 20777; -- Talbuk Sire
+SET @SPELL_STOMP := 32023; -- Hoof Stomp
+SET @SPELL_TAG := 35771; -- Tag Subbued Talbuk
+SET @SPELL_SLEEPING := 42648; -- Sleeping Sleep
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,0,0,100,0,1000,1000,8000,11000,11,@SPELL_STOMP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Talbuk Sire - In Combat - Cast Hoof Stomp"),
+(@ENTRY,0,1,0,2,0,100,1,0,20,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - At 20% HP - Say Text 0"),
+(@ENTRY,0,2,0,8,0,100,0,@SPELL_TAG,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - On Spellhit - Run Script"),
+(@ENTRY,0,3,0,11,0,100,0,0,0,0,0,19,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - On Respawn - Remove Unit Flag"),
+(@ENTRY*100,9,0,0,0,0,100,1,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ancient Orc Ancestor - Script - Evade"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,11,@SPELL_TAG_CREDIT,2,0,0,0,0,7,0,0,0,0,0,0,0,"Talbuk Sire - Script - Give Killcredit"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,33,20982,0,0,0,0,0,7,0,0,0,0,0,0,0,"Talbuk Sire - Script - Give Quest Credit"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,18,386,0,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - Script - Set Unit Flag"),-- Make it un-attackable in any way
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,11,@SPELL_SLEEPING,1,0,0,0,0,1,0,0,0,0,0,0,0,"Talbuk Sire - Script - Cast Sleeping Sleep");
+-- Texts
+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,"%s seems to have weakened.",16,0,100,0,0,0,"Talbuk Sir");
diff --git a/sql/old/3.3.5a/2011_10_22_10_world_sai.sql b/sql/old/3.3.5a/2011_10_22_10_world_sai.sql
new file mode 100644
index 00000000000..3e53d2a3757
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_10_world_sai.sql
@@ -0,0 +1,28 @@
+-- Farahlon Lasher SAI
+SET @ENTRY := 20774;
+SET @SPELL_ENTANGLING_ROOTS := 12747;
+SET @SPELL_FRENZY := 3019;
+SET @SPELL_FLANKING_GROWTH := 36604;
+SET @SPELL_ENERGY_FIELD_MODULATOR := 35772;
+UPDATE `creature_template` SET `AIName`='SmartAI',`dmgschool`=3 WHERE `entry`=@ENTRY;
+DELETE FROM `creature` WHERE `id` IN (21331,20983); -- Those are supposed to be summoned
+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
+(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,11,@SPELL_FLANKING_GROWTH,0,0,0,0,0,2,0,0,0,0,0,0,0,"Farahlon Lasher - On Aggro - Cast Flanking Growth"),
+(@ENTRY,0,1,0,0,0,100,0,20000,20000,25000,25000,11,@SPELL_ENTANGLING_ROOTS,0,0,0,0,0,2,0,0,0,0,0,0,0,"Farahlon Lasher - In Combat - Cast Entanglin Roots"),
+(@ENTRY,0,2,0,8,0,100,0,@SPELL_ENERGY_FIELD_MODULATOR,0,0,0,36,20983,0,0,0,0,0,1,0,0,0,0,0,0,0,"Farahlon Lasher - On Spellhit - Change Entry To Mutated"),
+(@ENTRY,0,3,0,2,0,100,1,0,30,0,0,11,@SPELL_FRENZY,1,0,0,0,0,1,0,0,0,0,0,0,0,"Farahlon Lasher - At 30% HP - Cast Frenzy"),
+(@ENTRY,0,4,0,2,0,100,1,0,30,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Farahlon Lasher - At 30% HP - Say Line 0");
+-- Text
+DELETE FROM `creature_text` WHERE `entry` IN (@ENTRY,20983);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@ENTRY,0,0,"%s goes into a frenzy!",16,0,100,0,0,0,"Farahlon Lasher"),
+(20983,0,0,"%s goes into a frenzy!",16,0,100,0,0,0,"Mutated Farahlon Lasher");
+
+-- To prevent being able to use the quest item more than once per creature
+-- Removing previous entry which didn't work
+DELETE FROM `conditions` WHERE `SourceEntry`=35772 AND `ConditionValue2`=20774;
+DELETE FROM `conditions` WHERE `SourceEntry`=29818 AND `ConditionValue2`=20774;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(18,0,29818,0,24,1,20774,0,0,'',"Item Energy Field Modulator can only be used if target is Farahlon Lasher");
diff --git a/sql/old/3.3.5a/2011_10_22_11_world_sai.sql b/sql/old/3.3.5a/2011_10_22_11_world_sai.sql
new file mode 100644
index 00000000000..dfae9ae383a
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_11_world_sai.sql
@@ -0,0 +1,17 @@
+-- Withered Corpse SAI
+SET @ENTRY := 20561;
+SET @SPELL_PROTECTORATE_IGNITER := 35372;
+UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|388 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@ENTRY,0,0,1,0,"29266"); -- Emote death spell (Permanent Feign Death)
+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
+(@ENTRY,0,0,0,8,0,100,0,@SPELL_PROTECTORATE_IGNITER,0,0,0,33,20561,0,0,0,0,0,7,0,0,0,0,0,0,0,"Withered Corpse - On Spellhit - Give Quest Credit"),
+(@ENTRY,0,1,0,8,0,100,0,@SPELL_PROTECTORATE_IGNITER,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Withered Corpse - On Spellhit - Die");
+
+-- Protector Igniter can only be used inside Access Shaft Zeon
+-- We are not removing the previous one, just adding an extra check
+DELETE FROM `conditions` WHERE `SourceEntry`=35372 AND `ConditionValue1`=3880;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,35372,0,23,3880,0,0,0,'',"Protector Igniter can only be used inside Access Shaft Zeon");
diff --git a/sql/old/3.3.5a/2011_10_22_12_world_sai.sql b/sql/old/3.3.5a/2011_10_22_12_world_sai.sql
new file mode 100644
index 00000000000..c405377f588
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_12_world_sai.sql
@@ -0,0 +1,21 @@
+-- Invis BE Ballista SAI
+SET @ENTRY := 19723;
+SET @SPELL_BURN_BLOOD_ELF := 34526;
+UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|130 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_BURN_BLOOD_ELF,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Invis BE Ballista - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,50,181915,20000,0,0,0,0,1,0,0,0,0,0,0,0,"Invis BE Ballista - Script - Summon Blaze (fire)"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,8,0,0,0,0,0,0,0,"Invis BE Ballista - Script - Despawn");
+
+-- Invis BE Tent SAI
+SET @ENTRY := 19724;
+SET @SPELL_BURN_BLOOD_ELF := 34526;
+UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|130 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_BURN_BLOOD_ELF,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Invis BE Tent - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,50,181915,20000,0,0,0,0,1,0,0,0,0,0,0,0,"Invis BE Tent - Script - Summon Blaze (fire)"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,8,0,0,0,0,0,0,0,"Invis BE Tent - Script - Despawn");
diff --git a/sql/old/3.3.5a/2011_10_22_13_world_sai.sql b/sql/old/3.3.5a/2011_10_22_13_world_sai.sql
new file mode 100644
index 00000000000..17f2efd7b5f
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_13_world_sai.sql
@@ -0,0 +1,62 @@
+-- Windyreed Quest Credit (Hut 01) SAI
+SET @ENTRY := 18142;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `gameobject` WHERE `id`=182146; -- Remove already spawned hut fires
+SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_LIVING_FIRE,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1850.186401,6378.753906,49.132702,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1843.883911,6373.384277,46.005417,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1845.056030,6383.819336,56.662624,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1845.103638,6391.827148,53.700901,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1831.184937,6391.026855,45.671902,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,60165,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creature Inside Burning Hut");
+
+-- Windyreed Quest Credit (Hut 02) SAI
+SET @ENTRY := 18143;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_LIVING_FIRE,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1915.344116,6350.488770,52.229897,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1907.135986,6353.901367,48.899532,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1911.698730,6354.161133,58.254566,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1926.308350,6360.901855,57.298611,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1921.458862,6367.373047,59.892593,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,60159,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creature Inside Burning Hut");
+
+-- Windyreed Quest Credit (Hut 03) SAI
+SET @ENTRY := 18144;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_LIVING_FIRE,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1969.078369,6278.307129,56.866646,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1977.147461,6277.312988,59.912029,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1974.763306,6269.175781,51.401920,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1970.424805,6273.501953,61.741539,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,60157,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creature Inside Burning Hut");
+
+-- Windyreed Quest Credit (Big Hut) SAI
+SET @ENTRY := 18110;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+SET @SPELL_LIVING_FIRE := 31927; -- Living Fire
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_LIVING_FIRE,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Windyreed Quest Credit - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1816.939941,6283.669922,61.357101,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1816.94,6283.67,61.3571,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1819.71,6305.89,63.4012,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1819.55,6298.08,73.4331,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1801.45,6308.03,59.2728,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,5,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1808.88,6307.05,72.4877,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,50,182146,20000,0,0,0,0,8,0,0,0,-1794.54,6300.6,71.2263,0,"Windyreed Quest Credit - Script - Summon Hut Fire (Large)"),
+(@ENTRY*100,9,7,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,60166,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creatures Inside Burning Hut"),
+(@ENTRY*100,9,8,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,60167,17139,0,0,0,0,0,"Windyreed Quest Credit - Script - Kill Creatures Inside Burning Hut");
diff --git a/sql/old/3.3.5a/2011_10_22_14_world_sai.sql b/sql/old/3.3.5a/2011_10_22_14_world_sai.sql
new file mode 100644
index 00000000000..e64b76711b8
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_14_world_sai.sql
@@ -0,0 +1,56 @@
+-- Wazat SAI
+SET @ENTRY := 19035;
+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
+(@ENTRY,0,0,0,1,0,100,0,20000,40000,60000,80000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wazat - OOC - Say Text 0"),
+(@ENTRY,0,1,0,1,0,100,0,60000,80000,80000,110000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wazat - OOC - Say Text 1"),
+(@ENTRY,0,2,0,1,0,100,0,110000,130000,150000,170000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wazat - OOC - Say Text 2");
+-- Texts
+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,"Oh sweet, delicious, spotted eggs - you will be mine...",12,0,100,0,0,0,"Wazat"),
+(@ENTRY,1,1,"If only I could get this blasted machine working!",12,0,100,0,0,0,"Wazat"),
+(@ENTRY,2,2,"They look so delicious...",12,0,100,0,0,0,"Wazat");
+
+-- Wazat pathing: 11365
+SET @GUID := 68343;
+SET @PATH := @GUID * 10;
+UPDATE `creature` SET `MovementType`=2,`position_x`=-2428.169922,`position_y`=6885.750000,`position_z`=4.196100 WHERE `guid`=@GUID;
+DELETE FROM `creature_addon` WHERE `guid`=@GUID;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@GUID,@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,-2428.704590,6890.355469,4.297834,20000,0,0,100,0),
+(@PATH,2,-2434.878418,6889.507813,4.266439,20000,0,0,100,0),
+(@PATH,3,-2428.169922,6885.750000,4.196100,20000,0,0,100,0);
+
+-- Windroc Matriarch SAI
+SET @ENTRY := 19055;
+SET @SPELL_EAGLE_CLAW := 30285; -- Eagle Claw
+SET @SPELL_WING_BUFFET := 32914; -- Wing Buffet
+UPDATE `creature_template` SET `AIName`='SmartAI',`InhabitType`=4,`spell1`=0 WHERE `entry`=@ENTRY; -- Always in air, of course - really? Albino Snake as mind control ability?
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,0,1,0,0,0,0,0,0,0, 'Windroc Matriarch - Start WP movement'),
+(@ENTRY,0,1,0,1,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windroc Matriarch - On Spawn - Emote Text 0"),
+(@ENTRY,0,2,0,40,0,100,0,3,@ENTRY,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windroc Matriarch - Load script 1 at WP 3"),
+(@ENTRY,0,3,0,0,0,100,0,4000,4000,6000,6000,11,@SPELL_EAGLE_CLAW,0,0,0,0,0,2,0,0,0,0,0,0,0,"Windroc Matriarch - In Combat - Cast Eagle Claw"),
+(@ENTRY,0,4,0,0,0,100,0,7000,8000,11000,14000,11,@SPELL_WING_BUFFET,0,0,0,0,0,2,0,0,0,0,0,0,0,"Windroc Matriarch - In Combat - Cast Wing Buffet"),
+-- Script 1
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,54,1000000000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Windroc Matriarch - Script - Pause Path'),
+(@ENTRY*100,9,1,0,0,0,100,1,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,"Windroc Matriarch - On Script - Set Faction Aggressive"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'Windroc Matriarch - Script - Remove unit_flag OOC_NOT_ATTACKABLE'),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,20,1,0,0,0,0,0,21,0,0,0,0,0,0,0,'Windroc Matriarch - Script - Attack Nearest Player');
+-- Texts
+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,"Emote blabla",16,0,100,0,0,0,"Windroc Matriarch");
+-- Waypoints
+DELETE FROM `waypoints` WHERE `entry`=@ENTRY;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@ENTRY,1,-2422.512695,6910.643555,20.124718,'Windroc Matriarch WP 1'),
+(@ENTRY,2,-2420.722168,6901.208008,15.225160,'Windroc Matriarch WP 2'),
+(@ENTRY,3,-2400.643066,6887.521973,-1.384245,'Windroc Matriarch WP 3');
diff --git a/sql/old/3.3.5a/2011_10_22_15_world_core_script_support.sql b/sql/old/3.3.5a/2011_10_22_15_world_core_script_support.sql
new file mode 100644
index 00000000000..1d1c59c69d0
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_15_world_core_script_support.sql
@@ -0,0 +1,36 @@
+-- Kurenai Captive
+UPDATE `creature_template` SET `ScriptName`='npc_kurenai_captive' WHERE `entry`=18209;
+DELETE FROM `creature_template_addon` WHERE `entry`=18209;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (18209,0,0,8,0,0,''); -- Kneel
+DELETE FROM `script_waypoint` WHERE `entry`=18209;
+INSERT INTO `script_waypoint` (`entry`,`pointid`,`location_x`,`location_y`,`location_z`,`waittime`,`point_comment`) VALUES
+(18209,1,-1518.593872,8469.956055,-4.101756,0,''),
+(18209,2,-1511.784546,8480.531250,-4.033919,0,''),
+(18209,3,-1513.447754,8509.764698,-0.109888,0,''),
+(18209,4,-1498.857788,8508.805664,0.844676,0,''),
+(18209,5,-1454.215088,8495.808594,4.912439,0,''),
+(18209,6,-1437.483521,8504.165039,6.879123,0,''),
+(18209,7,-1382.29,8539.87,11.139,7500,''),
+(18209,8,-1361.22,8521.44,11.144,0,''),
+(18209,9,-1324.8,8510.69,13.05,0,''),
+(18209,10,-1312.08,8492.71,14.235,0,'');
+
+DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000482 AND -1000488;
+DELETE FROM `creature_text` WHERE `entry` IN (18209,18210);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+-- Maghar Captive
+(18210,0,0,"Look out!",12,0,100,0,0,0,"Maghar Captive"),
+(18210,1,0,"Don't let them escape! Kill the strong one first!",12,0,100,0,0,0,"Maghar Captive"),
+(18210,2,0,"More of them are coming! Watch out!",12,0,100,0,0,0,"Maghar Captive"),
+(18210,3,0,"Where do you think you're going? Kill them all!",12,0,100,0,0,0,"Maghar Captive"),
+(18210,4,0,"Ride the lightning, filth!",12,0,100,0,0,0,"Maghar Captive"),
+(18210,5,0,"FROST SHOCK!",14,0,100,0,0,0,"Maghar Captive"),
+(18210,6,0,"It is best that we split up now, in case they send more after us. Hopefully one of us will make it back to Garrosh. Farewell, stranger.",12,0,100,0,0,0,"Maghar Captive"),
+-- Kurenai Captive
+(18209,0,0,"Look out!",12,0,100,0,0,0,"Kurenai Captive"),
+(18209,1,0,"Don't let them escape! Kill the strong one first!",12,0,100,0,0,0,"Kurenai Captive"),
+(18209,2,0,"More of them are coming! Watch out!",12,0,100,0,0,0,"Kurenai Captive"),
+(18209,3,0,"Where do you think you're going? Kill them all!",12,0,100,0,0,0,"Kurenai Captive"),
+(18209,4,0,"Ride the lightning, filth!",12,0,100,0,0,0,"Kurenai Captive"),
+(18209,5,0,"FROST SHOCK!",14,0,100,0,0,0,"Kurenai Captive"),
+(18209,6,0,"Up ahead is the road to Telaar. We will split up when we reach the fork as they will surely send more Murkblood after us. Hopefully one of us makes it back to Telaar alive.",14,0,100,0,0,0,"Kurenai Captive");
diff --git a/sql/old/3.3.5a/2011_10_22_16_world_core_script_support.sql b/sql/old/3.3.5a/2011_10_22_16_world_core_script_support.sql
new file mode 100644
index 00000000000..c6049d49e19
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_16_world_core_script_support.sql
@@ -0,0 +1,10 @@
+SET @ENTRY := 18428;
+UPDATE `gameobject_template` SET `ScriptName`='go_warmaul_prison' WHERE `entry` IN (182484,182486,182487,182488,182489,182490,182491,182492,182493,182494,182495,182496,182497,182498,182499,182501,182502,182503,182504);
+UPDATE `quest_template` SET `ReqSpellCast1`=0 WHERE `entry`=9948;
+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,"Death to the ogres!",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,1,1,"Many thanks, hero!",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,2,2,"One day, a hero will rise and lift the orcs up to their former glory.",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,3,3,"Spirits watch over you, $R!",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,4,4,"Thank you, $R! Your service to the Mag'har will not be forgotten.",12,0,100,0,0,0,"Mag'har Prisoner");
diff --git a/sql/old/3.3.5a/2011_10_22_17_world_conditions.sql b/sql/old/3.3.5a/2011_10_22_17_world_conditions.sql
new file mode 100644
index 00000000000..db824c4ec3f
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_17_world_conditions.sql
@@ -0,0 +1,5 @@
+-- Spell Place Kil'sorrow Banner can not only be cast on Warmaul Ogres
+DELETE FROM `conditions` WHERE `SourceEntry` IN (32314) AND `ConditionValue2` IN (17138,18064);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,32314,0,18,1,17138,0,0,'',"Spell Place Kil'sorrow Banner can not only be cast on Warmaul Ogres"), -- Warmaul Reaver
+(13,0,32314,1,18,1,18064,0,0,'',"Spell Place Kil'sorrow Banner can not only be cast on Warmaul Ogres"); -- Warmaul Shaman
diff --git a/sql/old/3.3.5a/2011_10_22_18_world_misc.sql b/sql/old/3.3.5a/2011_10_22_18_world_misc.sql
new file mode 100644
index 00000000000..c0c118eeb78
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_18_world_misc.sql
@@ -0,0 +1,104 @@
+-- Ancient Orc Ancestor SAI
+SET @ENTRY := 18688;
+SET @SPELL_SOUL_MIRROR := 34063; -- Soul Mirror
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,0,@SPELL_SOUL_MIRROR,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Ancient Orc Ancestor - On Spellhit - Run Script"),
+(@ENTRY,0,1,0,0,0,100,0,20000,40000,60000,180000,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Ancient Orc Ancestor - Timed - Say Line (random)"),
+(@ENTRY,0,2,0,6,0,100,0,0,0,0,0,12,19480,3,120000,0,0,0,1,0,0,0,0,0,0,0,"Ancient Orc Ancestor - On Death - Summon Darkened Spirit"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Ancient Orc Ancestor - Script - Say Line (random)"),
+(@ENTRY*100,9,1,0,0,0,100,1,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ancient Orc Ancestor - Script - Evade"),
+(@ENTRY*100,9,2,0,0,0,100,1,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ancient Orc Ancestor - Script - Prevent Combat Movement"),
+(@ENTRY*100,9,3,0,0,0,100,0,2000,2000,0,0,37,19480,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ancient Orc Ancestor - Script - Die");
+-- Texts
+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,"Ancestors watch over you, kind one...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,0,1,"Cease your crying! STOP!",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,0,2,"I remember everything...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,0,3,"It cannot be...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,0,4,"It comes for you...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,0,"The spirits call... I am consumed.",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,1,"Cannot control... It draws me in... The void grows...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,2,"It is dying. It is dying. It is dying.",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,3,"The cold embrace awaits...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,4,"The pain is unbearable.",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,5,"What is happening to me?",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,6,"What is this trickery? I... ARGH...",12,0,100,21,0,0,"Ancient Orc Ancestor"),
+(@ENTRY,1,7,"What will become of us when it falls?",12,0,100,21,0,0,"Ancient Orc Ancestor");
+
+-- Voidwraith SAI
+-- These are somehow summoned but can't find any info on sniffs or google..
+SET @ENTRY := 18659;
+UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=91,`faction_H`=91,`dmgschool`=5 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `id`=18662; -- Ancestors
+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,6,0,100,0,0,0,0,0,12,19480,3,120000,0,0,0,1,0,0,0,0,0,0,0,"Voidwraith - On Death - Summon Darkened Spirit");
+
+-- Darkened Spirit SAI
+SET @ENTRY := 19480;
+SET @SPELL_CONSUMING_SHADOWS := 31293; -- Consuming Shadows
+UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=91,`faction_H`=91,`dmgschool`=5 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
+(@ENTRY,0,0,0,0,0,100,0,5000,7000,11000,15000,11,@SPELL_CONSUMING_SHADOWS,0,0,0,0,0,2,0,0,0,0,0,0,0,"Darkened Spirit - In Combat - Cast Consuming Shadows"),
+(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Darkened Spirit - Force Despawn 5 Seconds After Death"),
+(@ENTRY,0,2,0,1,0,100,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Darkened Spirit - Timed - Say Line");
+-- Texts
+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,"What... What have I become? Arrrgghhh...",12,0,100,21,0,0,"Darkened Spirit");
+
+-- Spell Soul Mirror can only be cast at Ancient Orc Spectator
+DELETE FROM `conditions` WHERE `SourceEntry`=34063 AND `ConditionValue2`=18688;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,34063,0,18,1,18688,0,0,'',"Spell Soul Mirror can only be cast at Ancient Orc Spectator");
+
+-- these still need waypoints and proper aura
+DELETE FROM `creature` WHERE `id`=18688;
+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
+(66946,18688,530,1,1,0,0,-2225.73,8586.74,-10.361,0.261799,300,0,0,6542,0,0,0,0,0),
+(66947,18688,530,1,1,0,0,-1452.95,8533.52,12.8692,3.33358,300,0,0,6542,0,0,0,0,0),
+(14337,18688,530,1,1,0,0,-1637.01,8569.54,-12.3352,5.65003,300,0,0,6326,0,0,0,0,0),
+(14338,18688,530,1,1,0,0,-2300.29,8571.08,-22.0957,5.65003,300,0,0,6326,0,0,0,0,0),
+(14339,18688,530,1,1,0,0,-2407.95,8655.04,-19.7505,5.65003,300,0,0,6542,0,0,0,0,0),
+(14340,18688,530,1,1,0,0,-2530.94,8629.31,-25.5884,5.65003,300,0,0,6326,0,0,0,0,0),
+(14341,18688,530,1,1,0,0,-2571.84,8558.23,-33.6043,5.65003,300,0,0,6542,0,0,0,0,0),
+(14342,18688,530,1,1,0,0,-2218.21,8513.48,-17.1368,5.65003,300,0,0,6542,0,0,0,0,0),
+(14343,18688,530,1,1,0,0,-2114.42,8743.48,11.699,5.65003,300,0,0,6326,0,0,0,0,0),
+(14977,18688,530,1,1,0,0,-2017.31,8743.44,19.5169,5.65003,300,0,0,6542,0,0,0,0,0),
+(14978,18688,530,1,1,0,0,-1812.61,8813.18,30.2393,6.13478,300,0,0,6326,0,0,0,0,0),
+(14979,18688,530,1,1,0,0,-1750.87,8877.25,31.67,6.13478,300,0,0,6326,0,0,0,0,0),
+(14980,18688,530,1,1,0,0,-1539.61,8686.33,24.643,6.13478,300,0,0,6326,0,0,0,0,0),
+(14981,18688,530,1,1,0,0,-1653.31,8494.49,-12.8156,6.13478,300,0,0,6542,0,0,0,0,0),
+(14982,18688,530,1,1,0,0,-1579.32,8426.67,-9.33804,6.13478,300,0,0,6326,0,0,0,0,0),
+(14983,18688,530,1,1,0,0,-1040.87,7895.8,22.8202,6.13478,300,0,0,6326,0,0,0,0,0),
+(14984,18688,530,1,1,0,0,-1059.54,7750.35,25.8758,6.13478,300,0,0,6326,0,0,0,0,0),
+(14985,18688,530,1,1,0,0,-908.965,7783.44,40.1036,6.13478,300,0,0,6326,0,0,0,0,0),
+(20556,18688,530,1,1,0,0,-886.413,7824.75,40.0754,6.13478,300,0,0,6542,0,0,0,0,0),
+(21776,18688,530,1,1,0,0,-878.863,7881.25,38.6467,6.13478,300,0,0,6326,0,0,0,0,0),
+(23111,18688,530,1,1,0,0,-1866.27,8098.74,-20.3459,6.13478,300,0,0,6542,0,0,0,0,0),
+(24670,18688,530,1,1,0,0,-2106.82,8191.13,-15.5604,6.13478,300,0,0,6542,0,0,0,0,0),
+(24761,18688,530,1,1,0,0,-2084.75,8286.22,-11.4935,6.13478,300,0,0,6542,0,0,0,0,0),
+(24794,18688,530,1,1,0,0,-2206.14,8306.9,-26.191,6.13478,300,0,0,6542,0,0,0,0,0),
+(25100,18688,530,1,1,0,0,-2256,8478.68,-24.6155,6.13478,300,0,0,6542,0,0,0,0,0),
+(26559,18688,530,1,1,0,0,-2336.12,8477.34,-30.3842,6.13478,300,0,0,6326,0,0,0,0,0),
+(26564,18688,530,1,1,0,0,-2350.53,8641.59,-15.5674,6.13478,300,0,0,6326,0,0,0,0,0),
+(31807,18688,530,1,1,0,0,-2379.14,8531.65,-28.7321,6.13478,300,0,0,6326,0,0,0,0,0),
+(31833,18688,530,1,1,0,0,-2411.61,8492.45,-33.4541,6.13478,300,0,0,6542,0,0,0,0,0),
+(32072,18688,530,1,1,0,0,-2416.02,8330.76,-37.6002,6.13478,300,0,0,6542,0,0,0,0,0),
+(40475,18688,530,1,1,0,0,-2336.04,8288.74,-36.3567,1.72398,300,0,0,6326,0,0,0,0,0),
+(40476,18688,530,1,1,0,0,-2336.11,8225.27,-35.7699,1.72398,300,0,0,6326,0,0,0,0,0),
+(40703,18688,530,1,1,0,0,-2258.45,8221.08,-31.2193,3.93488,300,0,0,6326,0,0,0,0,0),
+(40716,18688,530,1,1,0,0,-2203.79,8149.55,-25.1002,3.93488,300,0,0,6326,0,0,0,0,0),
+(40725,18688,530,1,1,0,0,-2184.8,8029.08,-17.6373,3.93488,300,0,0,6542,0,0,0,0,0),
+(40727,18688,530,1,1,0,0,-2297.12,7848.94,-30.4255,3.93488,300,0,0,6326,0,0,0,0,0),
+(42893,18688,530,1,1,0,0,-2544.55,7818.57,-45.0012,3.93488,300,0,0,6326,0,0,0,0,0),
+(45204,18688,530,1,1,0,0,-2555.36,7930.22,-55.675,3.93488,300,0,0,6542,0,0,0,0,0),
+(46570,18688,530,1,1,0,0,-2622.32,7987.03,-48.9066,3.93488,300,0,0,6542,0,0,0,0,0),
+(46819,18688,530,1,1,0,0,-2126.06,8148.39,-15.8518,3.93488,300,0,0,6326,0,0,0,0,0);
diff --git a/sql/old/3.3.5a/2011_10_22_19_world_sai.sql b/sql/old/3.3.5a/2011_10_22_19_world_sai.sql
new file mode 100644
index 00000000000..bb873c461ea
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_22_19_world_sai.sql
@@ -0,0 +1,20 @@
+-- Quest 12860, 12927 "Data Mining"
+SET @CREDIT := 29752;
+SET @SPELL_CREDIT := 59728;
+SET @SPELL := 55161;
+SET @NPC := 29746;
+
+UPDATE `creature_template` SET `AIName`='SmartAI', `InhabitType`=7 WHERE `entry`=@NPC;
+
+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,1,8,0,100,0,@SPELL_CREDIT,0,0,0,33,@CREDIT,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Databank Core - On spell Retrieve Data hit - Give kill credit for quest Data Mining'),
+(@NPC,0,1,0,61,0,100,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Databank Core - On spell Retrieve Data hit - Despawn (Linked)');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=@SPELL_CREDIT;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_CREDIT;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@SPELL,0,29,@NPC,20,0,0, '', 'Spell Retrieve Data will only be cast near Databank'),
+(13,0,@SPELL,0,18,1,@NPC,0,0, '', 'Spell Retrieve Data does only target Databank');
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
new file mode 100644
index 00000000000..0d90c2ac9ce
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_00_world_sai.sql
@@ -0,0 +1,57 @@
+-- Horde
+
+-- 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
+(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');
+
+-- 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
+(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"
+DELETE FROM `smart_scripts` WHERE `entryorguid`=6741 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
+(6741,0,0,1,62,0,100,0,348,2,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Norman - On gossip option 2 select - Close gossip'),
+(6741,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 Norman - On gossip option 2 select - Player cast Trick or Treat on self'),
+(6741,0,2,0,22,0,100,0,22,0,0,0,33,6741,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Innkeeper Norman - On chicken emote - Give kill credit');
+
+-- 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
+(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
+(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');
+
+-- 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
+(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
+(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
+(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_01_world_sai.sql b/sql/old/3.3.5a/2011_10_23_01_world_sai.sql
new file mode 100644
index 00000000000..89eba23683a
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_01_world_sai.sql
@@ -0,0 +1,8 @@
+-- Quest 'Ruthless Cunning' exploit fix
+-- Spell Place Kil'sorrow Banner can not only be cast on Warmaul Ogres
+DELETE FROM `conditions` WHERE `SourceEntry` IN (32307) AND `ConditionValue2` IN (17148,17147,17146,18391);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,32307,0,18,1,17148,0,0,'',"Spell Place Kil'sorrow Banner can not only be cast on Kil'sorrow mobs"), -- Kil'sorrow Deathsworn
+(13,0,32307,1,18,1,17147,0,0,'',"Spell Place Kil'sorrow Banner can not only be cast on Kil'sorrow mobs"), -- Kil'sorrow Cultist
+(13,0,32307,2,18,1,17146,0,0,'',"Spell Place Kil'sorrow Banner can not only be cast on Kil'sorrow mobs"), -- Kil'sorrow Spellbinder
+(13,0,32307,3,18,1,18391,0,0,'',"Spell Place Kil'sorrow Banner can not only be cast on Kil'sorrow mobs"); -- Giselda the Crone
diff --git a/sql/old/3.3.5a/2011_10_23_02_world_sai.sql b/sql/old/3.3.5a/2011_10_23_02_world_sai.sql
new file mode 100644
index 00000000000..a6a5da03bbb
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_02_world_sai.sql
@@ -0,0 +1,9 @@
+-- Scarlet Onslaught Prisoner SAI
+SET @ENTRY := 27349;
+SET @SPELL_FLASK_OF_BLIGHT := 48188;
+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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_FLASK_OF_BLIGHT,0,0,0,33,27253,0,0,0,0,0,7,0,0,0,0,0,0,0,"Scarlet Onslaught Prisoner - On Spellhit - Quest Credit"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Onslaught Prisoner - In Combat - Forced Despawn");
diff --git a/sql/old/3.3.5a/2011_10_23_03_world_sai.sql b/sql/old/3.3.5a/2011_10_23_03_world_sai.sql
new file mode 100644
index 00000000000..d38e0a0b4fd
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_03_world_sai.sql
@@ -0,0 +1,159 @@
+-- Shattered Rumbler SAI
+SET @ENTRY := 17157;
+SET @ENTRY_MINION := 18181; -- Minion of Gurok
+SET @SPELL_EARTH_RUMBLE := 33840; -- Earth Rumble
+SET @SPELL_THROW_GORDAWGS_BULDER := 32001; -- Throw Gordawgs Boulder
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`=''WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@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
+(@ENTRY,0,0,0,0,0,100,0,1000,1000,8000,9000,11,@SPELL_EARTH_RUMBLE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shattered Rumbler - In Combat - Cast Earth Rumble"),
+(@ENTRY,0,1,0,8,0,100,1,@SPELL_THROW_GORDAWGS_BULDER,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Shattered Rumbler - On Spellhit - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,12,@ENTRY_MINION,4,20000,0,0,0,1,0,0,0,0,0,0,0,"Shattered Rumbler - Script - Summon Minion of Gurok"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,12,@ENTRY_MINION,4,20000,0,0,0,1,0,0,0,0,0,0,0,"Shattered Rumbler - Script - Summon Minion of Gurok"),
+(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,12,@ENTRY_MINION,4,20000,0,0,0,1,0,0,0,0,0,0,0,"Shattered Rumbler - Script - Summon Minion of Gurok"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Rumbler - Script - Die");
+
+-- Minion of Gurok SAI
+SET @ENTRY := 18181;
+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
+(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,89,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Minion of Gurok - Out of Combat - Set Random Movement");
+
+-- Spell Throw Gordawgs Boulder can only be cast at Shattered Rumbler
+DELETE FROM `conditions` WHERE `SourceEntry`=24501 AND `ConditionValue2`=17157;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(18,0,24501,0,24,1,17157,0,0,'',"Item Gordawgs Boulder can only be used if target is Shattered Rumbler");
+
+
+-- Lump SAI
+SET @ENTRY := 18351;
+SET @QUEST := 9918;
+SET @GOSSIP := 21289;
+SET @SPELL_SLEEPING_SLEEP := 42648; -- Sleeping Sleep
+SET @SPELL_SHOULDER_CHARGE := 31994; -- Shoulder Charge
+SET @SPELL_SPEAR_THROW := 32248; -- Spear Throw
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='',`gossip_menu_id`=@GOSSIP+1,`faction_A`=1711,`faction_H`=1711,`unit_flags`=`unit_flags`|528 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,11,0,100,0,0,0,0,0,11,@SPELL_SLEEPING_SLEEP,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - Out Of Combat - Cast Sleeping Sleep"),
+(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Lump - On Aggro - Say Line (random)"),
+(@ENTRY,0,2,0,62,0,100,0,@GOSSIP+4,0,0,0,33,18354,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lump - On Gossip Select - Give Quest Credit"),
+(@ENTRY,0,3,0,2,0,100,1,0,30,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Lump - On 30% HP - Run Script"),
+(@ENTRY*100,9,0,0,2,0,100,1,0,0,0,0,2,1080,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - On Script - Set Faction Friendly"),
+(@ENTRY*100,9,1,0,2,0,100,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - On Script - Say Line 1"),
+(@ENTRY*100,9,2,0,2,0,100,1,1000,1000,0,0,5,447,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - On Script - Emote ONESHOT_FLY_SIT_GROUND_DOWN"), -- He wont sit down, no matter which emote I use - probably due evading
+(@ENTRY*100,9,3,0,2,0,100,1,0,0,0,0,20,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - On Script - Stop auto-attack"),
+(@ENTRY*100,9,4,0,2,0,100,1,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - On Script - Evade"),
+(@ENTRY*100,9,5,0,2,0,100,1,0,0,0,0,28,@SPELL_SLEEPING_SLEEP,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lump - On Script - Remove Aura Sleeping Sleep"), -- Prevent gaining it - were leaving combat!
+(@ENTRY,0,4,0,9,0,100,0,8,25,1500,2000,11,@SPELL_SHOULDER_CHARGE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Lump - On Player Range - Cast Shoulder Charge"),
+(@ENTRY,0,5,0,9,0,100,0,5,40,1500,2000,11,@SPELL_SPEAR_THROW,1,0,0,0,0,2,0,0,0,0,0,0,0,"Lump - On Player Range - Cast Spear Throw");
+-- Texts
+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,"In Nagrand, food hunt ogre!",12,0,100,0,0,0,"Lump"),
+(@ENTRY,0,1,"You taste good with maybe a little salt and pepper.",12,0,100,0,0,0,"Lump"),
+(@ENTRY,1,2,"OK, OK! Lump give up!",12,0,100,0,0,0,"Lump");
+
+-- Actual story menu
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+1 AND `text_id`=9352;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+1,9352);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+2 AND `text_id`=9353;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+2,9353);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+3 AND `text_id`=9354;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+3,9354);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+4 AND `text_id`=9355;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+4,9355);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+5 AND `text_id`=9356;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+5,9356);
+
+-- Insert option menu
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN @GOSSIP+1 AND @GOSSIP+4;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
+(@GOSSIP+1,0,0,"I need answers, ogre!",1,1,@GOSSIP+2),
+(@GOSSIP+2,1,0,"Why are the Boulderfist out this far? You know that this is Kurenai territory.",1,1,@GOSSIP+3),
+(@GOSSIP+3,2,0,"And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar.",1,1,@GOSSIP+4),
+(@GOSSIP+4,3,0,"This means war, Lump! War I say!",1,1,@GOSSIP+5);
+
+-- Only show first gossip if player is on quest Not On My Watch!
+DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP+1 AND `ConditionValue1`=@QUEST AND `SourceTypeOrReferenceId`=15;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP+1,0,0,9,@QUEST,0,0,0,'',"Only show first gossip if player is on quest Not On My Watch!");
+
+
+-- Wild Sparrowhawk SAI
+SET @ENTRY := 22979;
+SET @SPELL_SPARROWHAWK_NET := 39810; -- Sparrowhawk Net
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='',`InhabitType`=4 WHERE `entry`=@ENTRY; -- Always in air
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+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,8,0,100,1,@SPELL_SPARROWHAWK_NET,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Wild Sparrowhawk - On Spellhit - Run Script"),
+(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,28,@SPELL_SPARROWHAWK_NET,2,0,0,0,0,1,0,0,0,0,0,0,0,"Wild Sparrowhawk - On Death - Remove Aura Sparrowhawk Net"),
+(@ENTRY,0,2,0,6,0,100,0,0,0,0,0,41,10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Wild Sparrowhawk - Force Despawn 8 Seconds After Death'),
+(@ENTRY*100,9,0,0,0,0,100,0,1000,1000,0,0,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wild Sparrowhawk - On Script - Flee For Assist"), -- This is how it should work - there is no flee function in event_scripts, so can't do it blizzlike (event_scripts 39812)
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,28,@SPELL_SPARROWHAWK_NET,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wild Sparrowhawk - On Script - Remove Aura Sparrowhawk Net"), -- Remove it and add it back later
+(@ENTRY*100,9,2,0,0,0,100,0,11000,11000,0,0,56,32320,1,0,0,0,0,7,0,0,0,0,0,0,0,"Wild Sparrowhawk - On Script - Add Item Captured Sparrowhawk"),
+(@ENTRY*100,9,3,0,0,0,100,0,11000,11000,0,0,37,0,1,0,0,0,0,1,0,0,0,0,0,0,0,"Wild Sparrowhawk - On Script - Die");
+
+-- Spell Sparrowhawk Net can only be cast at Wild Sparrowhawk
+DELETE FROM `conditions` WHERE `SourceEntry`=32321 AND `ConditionValue2`=22979 AND `SourceTypeOrReferenceId`=18;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(18,0,32321,0,24,1,22979,0,0,'',"Item Sparrowhawk Net can only be used if target is Wild Sparrowhawk");
+
+
+-- [Q] Diplomatic Measures
+SET @GOSSIP := 21295;
+SET @QUEST_HORDE := 10107;
+SET @QUEST_ALLIANCE := 10108;
+
+-- Lantresor of the Blade SAI
+SET @ENTRY := 18261;
+SET @SPELL_BUNING_BLADE_BLADEMASTER := 32281; -- Burning Blade Blademaster
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP+0,`AIName`='SmartAI',`ScriptName`='' 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
+(@ENTRY,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_BUNING_BLADE_BLADEMASTER,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lantrestor of the Blade - Out of Combat - Cast Burning Blade Blademaster"),
+(@ENTRY,0,1,0,62,0,100,0,@GOSSIP+7,0,0,0,26,@QUEST_ALLIANCE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lantrestor of the Blade - On Gossip Select - Give Quest Credit"),
+(@ENTRY,0,2,0,62,0,100,0,@GOSSIP+7,0,0,0,26,@QUEST_HORDE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lantrestor of the Blade - On Gossip Select - Give Quest Credit");
+
+-- Make the npc_text entries work properly
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+1 AND `text_id`=9362;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+1,9362);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+2 AND `text_id`=9363;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+2,9363);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+3 AND `text_id`=9364;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+3,9364);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+4 AND `text_id`=9365;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+4,9365);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+5 AND `text_id`=9366;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+5,9366);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+6 AND `text_id`=9367;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+6,9367);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+7 AND `text_id`=9368;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+7,9368);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+8 AND `text_id`=9369;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+8,9369);
+
+-- Insert menu options
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN @GOSSIP+0 AND @GOSSIP+7;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
+(@GOSSIP+0,0,0,"I have killed many of your ogres, Lantresor. I have no fear.",1,1,@GOSSIP+1),
+(@GOSSIP+1,1,0,"Should I know? You look like an orc to me.",1,1,@GOSSIP+2),
+(@GOSSIP+2,2,0,"And the other half?",1,1,@GOSSIP+3),
+(@GOSSIP+3,3,0,"I have heard of your kind, but I never thought to see the day when I would meet a half-breed.",1,1,@GOSSIP+4),
+(@GOSSIP+4,4,0,"My apologies. I did not mean to offend. I am here on behalf of my people.",1,1,@GOSSIP+5),
+(@GOSSIP+5,5,0,"My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces.",1,1,@GOSSIP+6),
+(@GOSSIP+6,6,0,"We will fight you until the end,then, Lantresor. We will not stand idly by as you pillage our towns and kill our people.",1,1,@GOSSIP+7),
+(@GOSSIP+7,7,0,"What do I need to do?",1,1,@GOSSIP+8);
+
+-- Conditions for gossip menu of quest Diplomatic Measures, they are grouped and thus ONE of them must be met in order for the gossip to become visible
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP+0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP+0,0,0,9,@QUEST_ALLIANCE,0,0,0,'',"Only show first gossip if player is on quest Diplomatic Measures (alliance)"),
+(15,@GOSSIP+0,0,1,9,@QUEST_HORDE,0,0,0,'',"Only show first gossip if player is on quest Diplomatic Measures (horde)");
diff --git a/sql/old/3.3.5a/2011_10_23_04_world_sai.sql b/sql/old/3.3.5a/2011_10_23_04_world_sai.sql
new file mode 100644
index 00000000000..27adf09d51a
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_04_world_sai.sql
@@ -0,0 +1,50 @@
+-- Altruis the Sufferer SAI
+-- [Q] Survey the Land
+-- [Q] Illidan's Pupil
+SET @ENTRY := 18417;
+SET @GOSSIP := 21304;
+SET @QUEST_SURVEY := 9991;
+SET @QUEST_PUPIL := 10646;
+UPDATE `quest_template` SET `SpecialFlags`=`SpecialFlags`|2 WHERE `entry` IN (@QUEST_SURVEY,@QUEST_PUPIL);
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP+0,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+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
+-- Survey the Land
+(@ENTRY,0,0,0,62,0,100,0,@GOSSIP+1,0,0,0,52,532,0,0,0,0,0,7,0,0,0,0,0,0,0,"Altruis the Sufferer - On Gossip Select - Activate Taxi Path"),
+(@ENTRY,0,1,0,62,0,100,0,@GOSSIP+1,0,0,0,26,@QUEST_SURVEY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Altruis the Sufferer - On Gossip Select - Quest Credit"),
+-- Illidan's Pupil
+(@ENTRY,0,2,0,62,0,100,0,@GOSSIP+6,0,0,0,26,@QUEST_PUPIL,0,0,0,0,0,7,0,0,0,0,0,0,0,"Altruis the Sufferer - On Gossip Select - Give Quest Credit");
+
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+0 AND `text_id`=9427;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+1 AND `text_id`=10492;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+2 AND `text_id`=10493;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+3 AND `text_id`=10494;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+4 AND `text_id`=10495;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+5 AND `text_id`=10497;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(@GOSSIP+0,9427), -- Survey the Land
+(@GOSSIP+1,10492), -- Illidan's Pupil
+(@GOSSIP+2,10493), -- Illidan's Pupil
+(@GOSSIP+3,10494), -- Illidan's Pupil
+(@GOSSIP+4,10495), -- Illidan's Pupil
+(@GOSSIP+5,10497); -- Illidan's Pupil
+
+-- Insert menu options
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN @GOSSIP+0 AND @GOSSIP+6;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
+-- Survey the Land
+(@GOSSIP+0,0,0,"Well?",1,3,@GOSSIP+1),
+(@GOSSIP+1,0,0,"Ok.",1,3,0),
+-- Illidan's Pupil
+(@GOSSIP+0,1,0,"Tell me about the demon hunter training grounds at the Ruins of Karabor.",1,3,@GOSSIP+2),
+(@GOSSIP+2,0,0,"I'm listening.",1,3,@GOSSIP+3),
+(@GOSSIP+3,0,0,"Go on, please.",1,3,@GOSSIP+4),
+(@GOSSIP+4,0,0,"Interesting.",1,3,@GOSSIP+5),
+(@GOSSIP+5,0,0,"That's quite a story.",1,3,@GOSSIP+6),
+(@GOSSIP+6,0,0,"There was something else I wanted to ask you, Altruis.",1,3,@GOSSIP+0); -- Back to first page
+
+-- Conditions for gossip menu of quest Survey the Land
+DELETE FROM `conditions` WHERE `SourceGroup` IN (@GOSSIP+0,@GOSSIP+10) AND `ConditionValue1` IN (@QUEST_SURVEY,@QUEST_PUPIL);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP+0,0,0,9,@QUEST_SURVEY,0,0,0,'',"Only show first gossip if player is on quest Survey the Land"),
+(15,@GOSSIP+0,1,0,9,@QUEST_PUPIL,0,0,0,'',"Only show first gossip if player is on quest Illidans Pupil");
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
new file mode 100644
index 00000000000..5c730c8cd18
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_05_world_misc.sql
@@ -0,0 +1,16 @@
+-- Ethereum Relay SAI
+SET @ENTRY := 20619;
+SET @SPELL_SHADOWFORM := 16592;
+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
+(@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");
+
+-- Re-add what shouldn't be deleted
+SET @Gossip = 21289;
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=@Gossip AND `id`=0;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`) VALUES
+(@Gossip, 0, 0, 'I believe in you.', 1, 1);
diff --git a/sql/old/3.3.5a/2011_10_23_06_world_sai.sql b/sql/old/3.3.5a/2011_10_23_06_world_sai.sql
new file mode 100644
index 00000000000..7e0eb7e7e96
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_06_world_sai.sql
@@ -0,0 +1,44 @@
+-- Sundered Rumbler SAI
+SET @ENTRY := 18881;
+SET @SPELL_SUMMON_SUNDERED_SHARD := 35310;
+SET @SPELL_CREATE_ELEMENTAL_POWER := 34525;
+SET @SPELL_ELEMENTAL_POWERDER_EXTRACTOR := 34520;
+UPDATE `creature_template` SET `AIName`='SmartAI',`dmgschool`=3 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
+(@ENTRY,0,0,0,8,0,100,1,@SPELL_ELEMENTAL_POWERDER_EXTRACTOR,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sundered Rumbler - On Spellhit - Set Phase 1"),
+(@ENTRY,0,1,0,6,1,100,0,0,0,0,0,11,@SPELL_CREATE_ELEMENTAL_POWER,2,0,0,0,0,1,0,0,0,0,0,0,0,"Sundered Rumbler - On Death - Cast Create Elemental Power"),
+(@ENTRY,0,2,0,2,0,100,1,0,10,0,0,11,@SPELL_SUMMON_SUNDERED_SHARD,1,0,0,0,0,1,0,0,0,0,0,0,0,"Sundered Rumbler - At 10% HP - Cast Summon Sundered Shard");
+
+-- Warp Aberration SAI
+SET @ENTRY := 18865;
+SET @SPELL_WARP_STORM := 36577;
+SET @SPELL_ARCANE_SHIELD := 36640;
+SET @SPELL_CREATE_ELEMENTAL_POWER := 34525;
+SET @SPELL_ELEMENTAL_POWERDER_EXTRACTOR := 34520;
+UPDATE `creature_template` SET `AIName`='SmartAI',`dmgschool`=6 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
+(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,11,@SPELL_ARCANE_SHIELD,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warp Aberration - On Aggro - Cast Arcane Shield"),
+(@ENTRY,0,1,0,8,0,100,1,@SPELL_ELEMENTAL_POWERDER_EXTRACTOR,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warp Aberration - On Spellhit - Set Phase 1"),
+(@ENTRY,0,2,0,6,1,100,0,0,0,0,0,11,@SPELL_CREATE_ELEMENTAL_POWER,2,0,0,0,0,1,0,0,0,0,0,0,0,"Warp Aberration - On Death - Cast Create Elemental Power"),
+(@ENTRY,0,3,0,0,0,100,0,2500,5000,30000,35000,11,@SPELL_WARP_STORM,0,0,0,0,0,2,0,0,0,0,0,0,0,"Warp Aberration - In Combat - Cast Warp Storm");
+
+-- Warp Storm SAI
+SET @ENTRY := 21322;
+SET @SPELL_WARP_STORM := 36580;
+UPDATE `creature_template` SET `AIName`='SmartAI',`modelid1`=18402,`unit_flags`=33554822 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
+(@ENTRY,0,0,0,54,0,100,1,1000,1000,1000,1000,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warp Storm - On Just Summoned - Prevent Combat Movement"),
+(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warp Storm - On Aggro - Stop Auto Attack"),
+(@ENTRY,0,2,0,0,0,100,0,1000,2000,3000,5000,11,@SPELL_WARP_STORM,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warp Storm - In Combat - Cast Warp Storm");
+
+-- Conditions for quest item
+DELETE FROM `conditions` WHERE `SourceEntry` IN (28547) AND `ConditionValue2` IN (18881,18865);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(18,0,28547,0,24,1,18881,0,0,"","Item Elemental Power Extractor can only be used if target is Sundered Rumbler"),
+(18,0,28547,0,24,1,18865,0,0,"","Item Elemental Power Extractor can only be used if target is Warp Aberration");
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
new file mode 100644
index 00000000000..08d1d0a0ec1
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_07_world_creature_templates.sql
@@ -0,0 +1,98 @@
+-- Random Stormwind NPC's
+-- Template updates
+UPDATE `creature_template` SET `minlevel`=60,`maxlevel`=60,`unit_flags`=`unit_flags`|33555200,`speed_walk`=1,`speed_run`=1.14286 WHERE `entry`=37574; -- [DND] Shaker - Small
+UPDATE `creature_template` SET `minlevel`=60,`maxlevel`=60,`unit_flags`=`unit_flags`|33555200,`speed_walk`=1,`speed_run`=1.14286 WHERE `entry`=37543; -- [DND] Shaker
+UPDATE `creature_template` SET `speed_run`=1.14286 WHERE `entry`=68; -- Stormwind City Guard
+UPDATE `creature_template` SET `speed_run`=1.14286 WHERE `entry`=4075; -- Rat
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|32768 WHERE `entry`=29093; -- Ian Drake
+UPDATE `creature_template` SET `npcflag`=`npcflag`|17 WHERE `entry`=11867; -- Woo Ping
+
+-- Model data 1436 (creature 2456 (Newton Burnside))
+UPDATE `creature_model_info` SET `bounding_radius`=0.306,`combat_reach`=0,`gender`=0 WHERE `modelid` IN (1436 -- Newton Burnside
+,1437 -- John Burnside
+,1434 -- Thurman Mullby
+,1431 -- Keldric Boucher
+,5082 -- Morgan Pestle
+,2974 -- Aldwin Laughlin
+,5547 -- Ben Trias
+,3246 -- Elling Trias
+,3167 -- Stormwind City Guard
+,25901 -- Ian Drake
+,5074 -- Renato Gallina
+,7991 -- Auctioneer Chilton
+,7992 -- Auctioneer Fitch
+,5567 -- Melris Malagan
+,1525 -- Crier Goodman
+,1541 -- Thomas Miller
+,5551 -- Harlan Bagley
+,1429 -- Gunther Weller
+,11804 -- Woo Ping
+,1433 -- Roberto Pupellyverbos
+,1427 -- Frederick Stover
+,1438); -- Topper McNabb
+UPDATE `creature_model_info` SET `bounding_radius`=0.208,`combat_reach`=0,`gender`=1 WHERE `modelid` IN (5545 -- Suzetta Gallina
+,5444 -- Innkeeper Allison
+,1446 -- Lina Stover
+,1448 -- Marda Weller
+,1443 -- Julia Gallina
+,1440 -- Edna Mullby
+,1445 -- Lara Moore
+,1439 -- Carla Granger
+,5446 -- Justine Demalier
+,5446 -- Stormwind City Guard
+,15594 -- Auctioneer Jaxon
+,4888 -- Stephanie Turner
+,1450 -- Olivia Burnside
+,5546 -- Elaine Trias
+,3133 -- Rebecca Laughlin
+,1444); -- Kyra Boucher
+UPDATE `creature_model_info` SET `bounding_radius`=0.25,`combat_reach`=0,`gender`=2 WHERE `modelid`=5585; -- Fuzz
+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
+(2456 -- Newton Burnside
+,2457 -- John Burnside
+,1285 -- Thurman Mullby
+,1286 -- Edna Mullby
+,1257 -- Keldric Boucher
+,1275 -- Kyra Boucher
+,279 -- Morgan Pestle
+,5193 -- Rebecca Laughlin
+,4974 -- Aldwin Laughlin
+,4981 -- Ben Trias
+,2455 -- Olivia Burnside
+,483 -- Elaine Trias
+,482 -- Elling Trias
+,68 -- Stormwind City Guard
+,1432 -- Renato Gallina
+,6174 -- Stephanie Turner
+,8670 -- Auctioneer Chilton
+,15659 -- Auctioneer Jaxon
+,8719 -- Auctioneer Fitch
+,12480 -- Melris Malagan
+,12481 -- Justine Demalier
+,2198 -- Crier Goodman
+,3518 -- Thomas Miller
+,1976 -- Stormwind City Patroller
+,1291 -- Carla Granger
+,1427 -- Harlan Bagley
+,1295 -- Lara Moore
+,1289 -- Gunther Weller
+,11867 -- Woo Ping
+,6740 -- Innkeeper Allison
+,1402 -- Topper McNabb
+,1287 -- Marda Weller
+,1301 -- Julia Gallina
+,277 -- Roberto Pupellyverbos
+,1431); -- Suzetta Gallina
+
+-- Frederick Stover
+-- Lina Stover
+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
+(37543,0,0,1,0, NULL), -- [DND] Shaker
+(29093,0,0,257,0, NULL), -- Ian Drake
+(25058,0,3,1,0, NULL); -- Fuzz
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
new file mode 100644
index 00000000000..7853b6eb411
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_07_world_sai.sql
@@ -0,0 +1,53 @@
+-- [Q] The Dwarven Spy
+SET @ENTRY := 15420;
+SET @GOSSIP := 21310;
+
+-- Waypoints
+DELETE FROM `script_waypoint` WHERE `entry`=@ENTRY;
+DELETE FROM `waypoints` WHERE `entry`=@ENTRY;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@ENTRY,1,9294.78,-6682.51,22.42,'Prospector Anvilward'),
+(@ENTRY,2,9298.27,-6667.99,22.42,'Prospector Anvilward'),
+(@ENTRY,3,9309.63,-6658.84,22.42,'Prospector Anvilward'),
+(@ENTRY,4,9304.43,-6649.31,26.46,'Prospector Anvilward'),
+(@ENTRY,5,9298.83,-6648,28.61,'Prospector Anvilward'),
+(@ENTRY,6,9291.06,-6653.46,31.83,'Prospector Anvilward'),
+(@ENTRY,7,9289.08,-6660.17,31.83,'Prospector Anvilward');
+
+-- 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
+(@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'),
+(@ENTRY,0,3,0,40,0,100,0,1,@ENTRY,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Prospector Anvilward - On WP 1 - Say Line 0'),
+(@ENTRY,0,4,5,40,0,100,0,6,@ENTRY,0,0,54,2500,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Anvilward - On WP 6 - Pause Path'),
+(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Prospector Anvilward - On WP 6 - Say Line 1'),
+(@ENTRY,0,6,7,40,0,100,0,7,@ENTRY,0,0,54,15000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Anvilward - On WP 7 - Pause Path'),
+(@ENTRY,0,7,0,61,0,100,0,0,0,0,0,2,24,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prospector Anvilward - On WP 7 - Set Faction'),
+(@ENTRY,0,8,0,1,0,100,1,10000,10000,24000,29000,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,"Prospector Anvilward - Out of Combat - Say Line 2");
+
+-- Texts
+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,"Very well. Let's see what you have to show me, $N.",12,1,100,0,0,0,'Prospector Anvilward'),
+(@ENTRY,1,0,"What manner of trick is this, $r? If you seek to ambush me, I warn you I will not go down quietly!",12,1,100,0,0,0,'Prospector Anvilward'),
+(@ENTRY,2,0,"These arcane sanctums of yours are quite... interesting, Mr. Caidanis. I appreciate the information you have given me today.",12,0,100,1,0,0,'Prospector Anvilward');
+
+-- This one was missing..
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=8239;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,8239);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+1 AND `text_id`=8240;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP+1,8240);
+
+-- Insert menu options
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIP+0,@GOSSIP+1);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
+(@GOSSIP+0,0,0,"I need a moment of your time, sir.",1,1,@GOSSIP+1),
+(@GOSSIP+1,0,0,"Why... yes, of course. I've something to show you right inside this building, Mr. Anvilward.",1,1,0);
+
+-- Conditions for gossip menu of quest The Dwarven Spy
+DELETE FROM `conditions` WHERE `SourceGroup`=@GOSSIP+0 AND `ConditionValue1`=8483;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP+0,0,0,9,8483,0,0,0,'',"Only show first gossip if player is on quest The Dwarven Spy");
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
new file mode 100644
index 00000000000..911168102ba
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_23_08_world_sai.sql
@@ -0,0 +1,175 @@
+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 @NPC_WILDSPAWN_IMP := 13276; -- 5 of them summoned by Pusillin during fight
+
+-- Gossip menu's from npc_text
+SET @GOSSIP_1 := 6877;
+SET @GOSSIP_2 := 6878;
+SET @GOSSIP_3 := 6879;
+SET @GOSSIP_4 := 6880;
+SET @GOSSIP_5 := 6881;
+
+-- Gossip menu options
+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 @SCRIPT_1 := 1435400; -- gossip
+SET @SCRIPT_2 := 1435401; -- gossip
+SET @SCRIPT_3 := 1435402; -- gossip
+SET @SCRIPT_4 := 1435403; -- gossip
+SET @SCRIPT_5 := 1435404; -- fight
+
+SET @SA_SEND_GOSSIP := 98; -- SMART ACTION_SEND_GOSSIP
+
+-- SmartAI for Pusillin
+UPDATE `creature_template` SET `lootid`=@ENTRY,`gossip_menu_id`=0,`speed_run`=2.14286,`AIName`='SmartAI',`npcflag`=1 WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `MovementType`=1,`spawndist`=3,`spawntimesecs`=300 WHERE `id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SCRIPT_1,@SCRIPT_2,@SCRIPT_3,@SCRIPT_4,@SCRIPT_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
+(@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,'Pusillin - On Spawn - Set Phase 1'),
+
+ -- send gossip depending on phase
+ (@ENTRY,0,1,0,64,0,100,0,0,0,0,0,@SA_SEND_GOSSIP,@GOSSIP_1,@GOSSIP_OPTION_1,0,0,0,0,7,0,0,0,0,0,0,0,'Pusillin - On Gossip Hello & Phase 1 - Send Gossip'),
+ (@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'),
+
+-- 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'),
+(@ENTRY,0,7,0,62,1,100,0,@GOSSIP_OPTION_2,0,0,0,80,@SCRIPT_2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Gossip Select - Run Script 2'),
+(@ENTRY,0,8,0,62,2,100,0,@GOSSIP_OPTION_3,0,0,0,80,@SCRIPT_3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Gossip Select - Run Script 3'),
+(@ENTRY,0,9,0,62,4,100,0,@GOSSIP_OPTION_4,0,0,0,80,@SCRIPT_4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Gossip Select - Run Script 4'),
+(@ENTRY,0,10,0,62,8,100,0,@GOSSIP_OPTION_5,0,0,0,80,@SCRIPT_5,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Gossip Select - Run Script 5'),
+
+ -- 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'),
+
+-- 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'),
+
+-- 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'),
+
+-- 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'),
+
+-- 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'),
+
+-- 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 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'),
+(@SCRIPT_2,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 2 - Turn Off Gossip Flags'),
+(@SCRIPT_2,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 2 - Say Text 1'),
+(@SCRIPT_2,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 2 - Set Phase to 3'),
+(@SCRIPT_2,9,4,0,0,0,100,0,0,0,0,0,53,1,@ENTRY*10,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 2 - Start Waypoint Movement'),
+
+-- Script 3
+(@SCRIPT_3,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 3 - Close Gossip'),
+(@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 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'),
+(@SCRIPT_4,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 4 - Turn Off Gossip Flags'),
+(@SCRIPT_4,9,2,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 4 - Say Text 3'),
+(@SCRIPT_4,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 4 - Set Phase to 5'),
+(@SCRIPT_4,9,4,0,0,0,100,0,0,0,0,0,53,1,@ENTRY*30,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 4 - Start Waypoint Movement'),
+
+-- Script 5
+(@SCRIPT_5,9,0,0,0,0,100,0,0,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 5 - Stop Waypoint Movement'),
+(@SCRIPT_5,9,1,0,0,0,100,0,0,0,0,0,1,4,0,0,0,0,0,9,0,0,0,0,0,0,0,'Pusillin - On script 5 - Say Text 4'),
+(@SCRIPT_5,9,2,0,0,0,100,0,0,0,0,0,2,168,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 5 - Set Faction Enemy'),
+(@SCRIPT_5,9,3,0,0,0,100,0,100,100,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On script 5 - Set React State Hostile'),
+(@SCRIPT_5,9,4,0,0,0,100,0,100,100,0,0,11,@SPELL_4,1,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Script 5 - Aura Self'),
+(@SCRIPT_5,9,5,0,0,0,100,0,0,0,0,0,12,@NPC_WILDSPAWN_IMP,7,0,0,0,0,8,0,0,0,25.1447,-703.067,-12.6426,0,'Pusillin - On Script 5 - Summon Wildspawn Imp'),
+(@SCRIPT_5,9,6,0,0,0,100,0,0,0,0,0,12,@NPC_WILDSPAWN_IMP,7,0,0,0,0,8,0,0,0,13.1924,-709.858,-12.6426,0,'Pusillin - On Script 5 - Summon Wildspawn Imp'),
+(@SCRIPT_5,9,7,0,0,0,100,0,0,0,0,0,12,@NPC_WILDSPAWN_IMP,7,0,0,0,0,8,0,0,0,24.2691,-694.881,-12.6426,0,'Pusillin - On Script 5 - Summon Wildspawn Imp'),
+(@SCRIPT_5,9,8,0,0,0,100,0,0,0,0,0,12,@NPC_WILDSPAWN_IMP,7,0,0,0,0,8,0,0,0,15.6403,-690.705,-12.6426,0,'Pusillin - On Script 5 - Summon Wildspawn Imp'),
+(@SCRIPT_5,9,9,0,0,0,100,0,0,0,0,0,12,@NPC_WILDSPAWN_IMP,7,0,0,0,0,8,0,0,0,19.6062,-677.524,-12.6426,0,'Pusillin - On Script 5 - Summon Wildspawn Imp'),
+(@SCRIPT_5,9,10,0,4,0,100,0,0,0,0,0,20,1,0,0,0,0,0,21,0,0,0,0,0,0,0,'Pusillin - On Aggro - Attack Nearest Player'),
+(@SCRIPT_5,9,11,0,4,0,100,0,0,0,0,0,39,125,0,0,0,0,0,1,0,0,0,0,0,0,0,'Pusillin - On Aggro - Call for help (within 125 yards)');
+
+-- waypoints for Pusillin from sniff
+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*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'),
+(@ENTRY*10,4,-71.9857,-364.048,-4.14729,'Pusillin path'),
+(@ENTRY*10,5,-53.8684,-348.615,-4.06211,'Pusillin path'),
+(@ENTRY*10,6,-31.2778,-353.235,-4.09911,'Pusillin path'),
+(@ENTRY*10,7,40.8255,-356.709,-4.12891,'Pusillin path'),
+(@ENTRY*10,8,44.4199,-357.733,-4.13713,'Pusillin path'),
+(@ENTRY*10,9,43.8367,-362.318,-4.14879,'Pusillin path'),
+(@ENTRY*10,10,36.4393,-359.959,-4.14924,'Pusillin path'),
+(@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*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'),
+(@ENTRY*20,4,111.144,-530.976,-11.0799,'Pusillin path'),
+(@ENTRY*20,5,106.029,-539.906,-11.0803,'Pusillin path'),
+(@ENTRY*20,6,92.632,-544.772,-11.1469,'Pusillin path'),
+(@ENTRY*20,7,78.5392,-545.053,-15.2469,'Pusillin path'),
+(@ENTRY*20,8,67.4856,-547.887,-15.2466,'Pusillin path'),
+(@ENTRY*20,9,54.6709,-557.626,-19.4133,'Pusillin path'),
+(@ENTRY*20,10,50.4845,-565.069,-19.4122,'Pusillin path'),
+(@ENTRY*20,11,49.8745,-586.269,-23.5734,'Pusillin path'),
+(@ENTRY*20,12,49.3262,-636.426,-25.1286,'Pusillin path'),
+(@ENTRY*30,1,39.8513,-677.459,-25.1611,'Pusillin path'),
+(@ENTRY*30,2,11.7509,-698.469,-25.1611,'Pusillin path'),
+(@ENTRY*30,3,4.38368,-694.666,-25.1611,'Pusillin path'),
+(@ENTRY*30,4,4.88613,-671.499,-12.6426,'Pusillin path'),
+(@ENTRY*30,5,8.9517,-667.447,-12.6426,'Pusillin path'),
+(@ENTRY*30,6,13.0878,-672.124,-12.6426,'Pusillin path'),
+(@ENTRY*30,7,16.2925,-701.417,-12.6426,'Pusillin path');
+
+-- add gossip menu option id's
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN(@GOSSIP_OPTION_1,@GOSSIP_OPTION_2,@GOSSIP_OPTION_3,@GOSSIP_OPTION_4,@GOSSIP_OPTION_5) AND `id`=0;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`) VALUES
+(@GOSSIP_OPTION_1,0,0,'Game? Are you crazy?',1,1),
+(@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);
+
+-- Pusillin texts
+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,'If you want the key, you''ll have to catch me!',12,0,0,0,0,0,'Pusillin text #1'),
+(@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');
+
+-- remove already spawned Wildspawn Imp
+DELETE FROM `creature` WHERE `guid`=56995;
diff --git a/sql/old/3.3.5a/2011_10_24_00_world_sai.sql b/sql/old/3.3.5a/2011_10_24_00_world_sai.sql
new file mode 100644
index 00000000000..30b2d026b6a
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_24_00_world_sai.sql
@@ -0,0 +1,20 @@
+-- Fix sai of Darkspear Scout after recent fixing action 60
+SET @N_DScout = 40416;
+SET @N_Voljin = 40391;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@N_DScout AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@N_DScout*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
+(@N_DScout,0,0,0,25,0,100,0,0,0,0,0,53,1,@N_DScout,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Start waypath on spawn'),
+(@N_DScout,0,1,0,25,0,100,0,0,0,0,0,60,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Set fly = 1 on spawn'),
+(@N_DScout,0,2,0,40,0,100,0,1,@N_DScout,0,0,60,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Set fly = 0 on waypoint 1'),
+(@N_DScout,0,3,0,40,0,100,0,1,@N_DScout,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Set run = 0 on waypoint 1'),
+(@N_DScout,0,4,0,40,0,100,0,1,@N_DScout,0,0,43,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Unmount on waypoint 1'),
+(@N_DScout,0,5,0,40,0,100,0,6,@N_DScout,0,0,54,15000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Pause waypoint on waypoint 6'),
+(@N_DScout,0,6,0,40,0,100,0,6,@N_DScout,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0.820305, 'Darkspear Scout: Change orientation on waypoint 6'),
+(@N_DScout,0,7,0,40,0,100,0,6,@N_DScout,0,0,80,@N_DScout*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Run script on waypoint 6'),
+(@N_DScout,0,8,0,40,0,100,0,9,@N_DScout,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Despawn on waypoint 9'),
+(@N_DScout*100,9,0,0,0,0,100,0,0,0,0,0,10,1,2,5,66,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Random emote 1,2,5,66'),
+(@N_DScout*100,9,1,0,0,0,50,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Random text'),
+(@N_DScout*100,9,2,0,0,0,50,0,1000,1000,0,0,1,0,0,0,0,0,0,9,@N_Voljin,0,15,0,0,0,0, 'Vol''Jin: Reply to Darkspear Scout'),
+(@N_DScout*100,9,3,0,0,0,100,0,2000,2000,0,0,10,1,2,5,66,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Random emote 1,2,5,66'),
+(@N_DScout*100,9,4,0,0,0,100,0,6000,6000,0,0,10,1,2,5,66,0,0,1,0,0,0,0,0,0,0, 'Darkspear Scout: Random emote 1,2,5,66');
diff --git a/sql/old/3.3.5a/2011_10_24_01_world_creature_text.sql b/sql/old/3.3.5a/2011_10_24_01_world_creature_text.sql
new file mode 100644
index 00000000000..a8d4a2f80db
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_24_01_world_creature_text.sql
@@ -0,0 +1,9 @@
+-- Mag'har Prisoner
+SET @ENTRY := 18428;
+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,"Death to the ogres!",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,0,1,"Many thanks, hero!",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,0,2,"One day, a hero will rise and lift the orcs up to their former glory.",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,0,3,"Spirits watch over you, $r!",12,0,100,0,0,0,"Mag'har Prisoner"),
+(@ENTRY,0,4,"Thank you, $r! Your service to the Mag'har will not be forgotten.",12,0,100,0,0,0,"Mag'har Prisoner");
diff --git a/sql/old/3.3.5a/2011_10_24_02_world_core_script_support.sql b/sql/old/3.3.5a/2011_10_24_02_world_core_script_support.sql
new file mode 100644
index 00000000000..c27d788c3f0
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_24_02_world_core_script_support.sql
@@ -0,0 +1,22 @@
+-- [Q] Of Keys and Cages
+UPDATE `gameobject_template` SET `ScriptName`='go_gjalerbron_cage' WHERE `name`='Gjalerbron Cage';
+UPDATE `gameobject_template` SET `ScriptName`='go_large_gjalerbron_cage' WHERE `entry`=186490;
+DELETE FROM `creature_text` WHERE `entry`=24035;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(24035,0,0, "Avenge my friends who have already been sacrificed",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,1, "I don't want to be sacrificed",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,2, "I don't want to be taken down into the catacombs",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,3, "I think I saw a key on one of those Gjalerbron vrykul up top.",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,4, "I think I saw a key on one of those vrykul.",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,5, "Is there no hero to rescue me?",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,6, "My thanks to you, hero",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,7, "Oh, thank you, thank you",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,8, "Please, let me out of here",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,9, "Thank goodness for you",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,10, "Thank you. I will not forget this",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,11, "The key... you have to find the key",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,12, "The vrykul are evil and must be destroyed",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,13, "They're performing unholy rites down in the catacombs, and I'm about to be the sacrifice",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,14, "This is the end.",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,15, "You have to put a stop to this madness before it's too late",12,0,100,0,0,0,"Gjalerbron Prisoner"),
+(24035,0,16, "You saved my life",12,0,100,0,0,0,"Gjalerbron Prisoner");
diff --git a/sql/old/3.3.5a/2011_10_28_00_world_version.sql b/sql/old/3.3.5a/2011_10_28_00_world_version.sql
new file mode 100644
index 00000000000..3d829193d1b
--- /dev/null
+++ b/sql/old/3.3.5a/2011_10_28_00_world_version.sql
@@ -0,0 +1 @@
+ALTER TABLE `version` DROP `script_version`;
diff --git a/sql/updates/world/2011_10_29_00_world_version.sql b/sql/updates/world/2011_10_29_00_world_version.sql
new file mode 100644
index 00000000000..17a94041a33
--- /dev/null
+++ b/sql/updates/world/2011_10_29_00_world_version.sql
@@ -0,0 +1 @@
+UPDATE `version` SET `db_version`='TDB 335.11.43' LIMIT 1;
diff --git a/sql/updates/world/2011_10_29_01_world_gameobject_template.sql b/sql/updates/world/2011_10_29_01_world_gameobject_template.sql
new file mode 100644
index 00000000000..744a549eebd
--- /dev/null
+++ b/sql/updates/world/2011_10_29_01_world_gameobject_template.sql
@@ -0,0 +1,9 @@
+-- Size adjustment on a hand-made template
+UPDATE `gameobject_template` SET `size`=2, `WDBVerified`=-1 WHERE `entry`=194328;
+-- Add some missing templates, need WDB data (data1/lootId is guessed based on logic sequence, rest is copied based on other templates of the chest)
+DELETE FROM `gameobject_template` WHERE `entry` IN(194326,194329,194330);
+INSERT INTO `gameobject_template` (`entry`,`type`,`displayId`,`name`,`size`,`data0`,`data1`,`data3`,`data11`,`data13`,`data15`,`WDBVerified`) VALUES
+(194326,3,8628,'Freya\'s Gift',2,1634,27080,1,1,1,1,-1),
+(194329,3,8628,'Freya\'s Gift',2,1634,27082,1,1,1,1,-1),
+(194330,3,8628,'Freya\'s Gift',2,1634,27083,1,1,1,1,-1);
+
diff --git a/sql/updates/world/2011_10_29_02_world_gameobject_template.sql b/sql/updates/world/2011_10_29_02_world_gameobject_template.sql
new file mode 100644
index 00000000000..9134a66ee2b
--- /dev/null
+++ b/sql/updates/world/2011_10_29_02_world_gameobject_template.sql
@@ -0,0 +1 @@
+UPDATE `gameobject_template` SET `ScriptName`= 'go_massive_seaforium_charge' WHERE `entry` IN (195235,195331);
diff --git a/sql/updates/world/2011_10_29_03_world_gameobject_template.sql b/sql/updates/world/2011_10_29_03_world_gameobject_template.sql
new file mode 100644
index 00000000000..6b73da94441
--- /dev/null
+++ b/sql/updates/world/2011_10_29_03_world_gameobject_template.sql
@@ -0,0 +1,5 @@
+-- 25 man chest loot IDs
+UPDATE `gameobject_template` SET `data1`=26961 WHERE `entry`=194330;
+UPDATE `gameobject_template` SET `data1`=26960 WHERE `entry`=194329;
+UPDATE `gameobject_template` SET `data1`=26959 WHERE `entry`=194328;
+
diff --git a/sql/updates/world/2011_10_29_04_world_linked_respawn.sql b/sql/updates/world/2011_10_29_04_world_linked_respawn.sql
new file mode 100644
index 00000000000..94d2c0d730d
--- /dev/null
+++ b/sql/updates/world/2011_10_29_04_world_linked_respawn.sql
@@ -0,0 +1,7 @@
+DELETE FROM `linked_respawn` WHERE `linkedGuid`=126982 AND `guid` IN (126978,126971,126977,126969,126968);
+INSERT INTO `linked_respawn` (`guid`, `linkedGuid`) VALUES
+(126978, 126982),
+(126971, 126982),
+(126977, 126982),
+(126969, 126982),
+(126968, 126982);
diff --git a/sql/updates/world/2011_10_29_05_world_sai.sql b/sql/updates/world/2011_10_29_05_world_sai.sql
new file mode 100644
index 00000000000..fc17ca8a1a7
--- /dev/null
+++ b/sql/updates/world/2011_10_29_05_world_sai.sql
@@ -0,0 +1,26 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=33581; -- item
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (43315,43371); -- spell
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=43315; -- spell2
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+-- (13, 0, 43315, 0, 18, 1, 24238, 5, 0, '', 'Only use Insult on Bjorn Halgurdsson'),
+-- (18, 0, 33581, 0, 24, 1, 24238, 0, 0, '', 'Only use Insult on Bjorn Halgurdsson'),
+(17, 0, 43315, 0, 19, 24238, 0, 0, 63, '', 'Vrykul Insult - Bjorn Halgurdsson'), -- "Invalid Target" trinity_string
+(13, 0, 43371, 0, 18, 1, 0, 0, 0, '', 'Bjorn Kill Credit - Players');
+
+DELETE FROM `creature_text` WHERE `entry`=24238;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(24238, 0, 0, 'Drive the invaders out! For Queen Angerboda!', 14, 0, 100, 0, 0, 0, 'Bjorn Halgurdsson - On aggro 1'),
+(24238, 1, 0, 'No one speaks of my mother in that manner!', 14, 0, 100, 0, 0, 0, 'Bjorn Halgurdsson - On aggro 2'),
+(24238, 2, 0, 'Fight without fear and the Val''kyr will reward you!', 14, 0, 100, 0, 0, 0, 'Bjorn Halgurdsson - Random 1'),
+(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
+(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'),
+(24238, 0, 3, 0, 0, 0, 100, 0, 5000, 10000, 10000, 15000, 11, 32736, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Bjorn Halgurdsson - In combat cast Mortal Strike'),
+(24238, 0, 4, 0, 0, 0, 100, 0, 0, 5000, 10000, 15000, 11, 33661, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Bjorn Halgurdsson - In combat cast Crush Armor'),
+(24238, 0, 5, 0, 0, 0, 100, 0, 10000, 150000, 10000, 15000, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 , 0, 0, 'Bjorn Halgurdsson - In combat say text 2');
+
+UPDATE `creature_template` SET `AIName`='SmartAI', `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|8|16|32|64|1024|2048|4096|16384|65536|131072|524288|2097152|8388608|536870912|67108864 WHERE `entry`=24238;
diff --git a/sql/updates/world/2011_10_29_06_world_misc.sql b/sql/updates/world/2011_10_29_06_world_misc.sql
new file mode 100644
index 00000000000..7706777b32f
--- /dev/null
+++ b/sql/updates/world/2011_10_29_06_world_misc.sql
@@ -0,0 +1,11 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (17,13) AND `SourceEntry`=43381; -- had wrong condition target
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=33621;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(18, 0, 33621, 0, 24, 1, 24199, 0, 63, '', 'Plague Spray - Plagued Dragonflayer Handler'),
+(18, 0, 33621, 0, 24, 1, 24198, 0, 63, '', 'Plague Spray - Plagued Dragonflayer Rune-Caster'),
+(18, 0, 33621, 0, 24, 1, 23564, 0, 63, '', 'Plague Spray - Plagued Dragonflayer Tribesman'),
+(13, 0, 43385, 0, 18, 1, 0, 0, 0, '', 'Plagued Vrykul Dummy - Players');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=43385;
+INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
+(43385, 43384, 1, 'Plague Spray'); -- this is not entirely correct
diff --git a/sql/updates/world/2011_10_29_06_world_sai.sql b/sql/updates/world/2011_10_29_06_world_sai.sql
new file mode 100644
index 00000000000..a3d1626a8f9
--- /dev/null
+++ b/sql/updates/world/2011_10_29_06_world_sai.sql
@@ -0,0 +1,6 @@
+SET @ENTRY := 28566; -- "Tipsy" McManus
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100+8 AND `source_type`=9 AND `id`=3;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100+7 AND `source_type`=9 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
+(@ENTRY*100+8,9,3,0,0,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 8 - Set gossip flag"),
+(@ENTRY*100+7,9,2,0,0,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tipsy McManus - Script 7 - Set gossip flag");
diff --git a/sql/updates/world/2011_10_29_07_world_gameobjects.sql b/sql/updates/world/2011_10_29_07_world_gameobjects.sql
new file mode 100644
index 00000000000..541cadd71a0
--- /dev/null
+++ b/sql/updates/world/2011_10_29_07_world_gameobjects.sql
@@ -0,0 +1,13 @@
+-- dummy spell focus gameobject
+DELETE FROM `gameobject_template` WHERE `entry`=300245 AND `type`=8 AND `data0`=1636;
+INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `AIName`, `ScriptName`, `WDBVerified`) VALUES
+(300245, 8, 0, 'TEMP Forgemaster''s Anvil', '', '', '', 0, 0, 1, 0, 0, 0, 0, 0, 0, 1636, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 1);
+
+-- untargetable flag if not in quest
+UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry`=201592; -- Infused Saronite Bars
+
+-- spawn
+DELETE FROM `gameobject` WHERE `id`=300245;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(207, 300245, 658, 3, 1, 727.988, -121.675, 515.259, 4.29381, 0, 0, 0.838588, -0.544766, 300, 0, 1),
+(215, 300245, 658, 3, 1, 661.331, -121.89, 514.948, 1.34464, 0, 0, 0.622803, 0.782378, 300, 0, 1);
diff --git a/sql/updates/world/2011_10_30_00_world_misc.sql b/sql/updates/world/2011_10_30_00_world_misc.sql
new file mode 100644
index 00000000000..912f13f364c
--- /dev/null
+++ b/sql/updates/world/2011_10_30_00_world_misc.sql
@@ -0,0 +1,20 @@
+-- trigger spawn X: 5672.294 Y: 2520.686 Z: 713.4386 O: 0.9599311 (21:01:58)
+-- at 21:04:00 it casts 70663 (Shadownova) (when spellhit by 69922)
+-- at 21:04:00 it casts 69956 (Return Tempered Quel'Delar) at player
+
+UPDATE `creature_template` SET `faction_A`=190,`faction_H`=190,`baseattacktime`=2000,`unit_flags`=`unit_flags`|768,`flags_extra`=`flags_extra`|128,`AIName`='SmartAI' WHERE `entry`=37094; -- Crucible of Souls
+
+UPDATE `creature_model_info` SET `bounding_radius`=1.25,`combat_reach`=2.5,`gender`=2 WHERE `modelid`=30822; -- Crucible of Souls
+
+DELETE FROM `creature_template_addon` WHERE `entry`=37094;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(37094,0,0,1,0, '69859'); -- Crucible of Souls (Crucible of Souls Visual)
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=69922;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,69922,0,18,1,37094,0,0,'', 'Temper Quel''Delar - Crucible of Souls');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=37094 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
+(37094,0,0,1,8,0,0,0,69922,0,0,0,11,70663,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crucible of Souls - On spellhit by Temper Quel''Delar cast Shadownova'),
+(37094,0,1,0,61,0,0,0,69922,0,0,0,11,69956,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Crucible of Souls - On spellhit by Temper Quel''Delar (link) cast Return Tempered Quel''Delar');
diff --git a/sql/updates/world/2011_10_30_01_world_misc.sql b/sql/updates/world/2011_10_30_01_world_misc.sql
new file mode 100644
index 00000000000..9c42045c821
--- /dev/null
+++ b/sql/updates/world/2011_10_30_01_world_misc.sql
@@ -0,0 +1,54 @@
+-- spell target position
+DELETE FROM `spell_target_position` WHERE `id`=60905;
+INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES
+(60905, 571, 6435, 2366.9, 465.7, 0); -- Portal Effect: Naz'anak Exit
+
+-- templates
+UPDATE `gameobject_template` SET `flags`=`flags`|32 WHERE `entry`=193991; -- Altar of the Ebon Depths
+UPDATE `gameobject_template` SET `flags`=0,`AIName`='SmartGameObjectAI' WHERE `entry`=193195; -- Pulsing Crystal
+UPDATE `creature_template` SET `AIName`='SmartAI',`lootid`=`entry` WHERE `entry`=31691; -- Faceless Lurker
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=31237; -- Matthias Lehner
+
+-- addon
+DELETE FROM `creature_template_addon` WHERE `entry` IN (31691,31237);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(31691,0,0,1,0, NULL), -- Faceless Lurker
+(31237,0,0,1,0, '10848'); -- Matthias Lehner (Shroud of Death)
+
+-- model info
+UPDATE `creature_model_info` SET `bounding_radius`=1.3,`combat_reach`=1.3,`gender`=0 WHERE `modelid`=27522; -- Matthias Lehner
+
+-- scripts
+DELETE FROM `smart_scripts` WHERE `entryorguid`=31691 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=31237 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=193195 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
+(31691,0,0,0,0,0,100,1,0,0,0,0,11,52342,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Faceless Lurker - On aggro cast Seething Evil'),
+(193195,1,0,0,19,0,100,0,13390,0,0,0,45,1,1,0,0,0,0,10,203360,31237,0,0,0,0,0, 'Pulsing Crystal - On A Voice in the Dark (A) quest accept set data to Matthias Lehner'),
+(193195,1,1,0,19,0,100,0,13271,0,0,0,45,1,1,0,0,0,0,10,203360,31237,0,0,0,0,0, 'Pulsing Crystal - On A Voice in the Dark (H) quest accept set data to Matthias Lehner'),
+(31237,0,0,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,21,60,0,0,0,0,0,0, 'Matthias Lehner - On data set (quest accepted at Pulsing Crystal) say text 0');
+DELETE FROM `creature_text` WHERE `entry`=31237;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(31237,0,0, 'You shouldn''t have done that! He''s not going to like it.',15,0,100,0,0,0, 'Matthias Lehner - On quest accept');
+
+-- loot
+-- WTB ZxBiohazardZx to do lootz
+DELETE FROM `creature_loot_template` WHERE `entry`=31691;
+INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(31691,45912,0.1,1,0,1,1), -- Book of Glyph Mastery
+(31691,44001,-60,1,0,1,1), -- Faceless One's Blood
+(31691,35063,100,1,0,-35063,1), -- trash
+(31691,26041,100,1,0,-26041,1); -- frostweave
+
+-- Link some mobs on HoS with Krystallus (by Aokromes) (unrelated)
+DELETE FROM `linked_respawn` WHERE `linkedGuid`=126792 AND `guid` IN (126710,126691,126702,126708,126743);
+INSERT INTO `linked_respawn` (`guid`,`linkedGuid`) VALUES
+(126710,126792),
+(126691,126792),
+(126702,126792),
+(126708,126792),
+(126743,126792);
+
+-- correct db errors recently found
+UPDATE `smart_scripts` SET `target_param1`=40 WHERE `entryorguid`=1435404 AND `source_type`=9 AND `id`=10 AND `link`=0;
+UPDATE `smart_scripts` SET `target_param1`=40 WHERE `entryorguid`=1905500 AND `source_type`=9 AND `id`=03 AND `link`=0;
diff --git a/sql/updates/world/2011_10_30_02_world_creature_template.sql b/sql/updates/world/2011_10_30_02_world_creature_template.sql
new file mode 100644
index 00000000000..50fc50e9c14
--- /dev/null
+++ b/sql/updates/world/2011_10_30_02_world_creature_template.sql
@@ -0,0 +1,33 @@
+UPDATE `creature_template` SET `AIName`='',`spell1`=11901 WHERE `entry`=8179; -- Greater Healing Ward
+UPDATE `creature_template` SET `AIName`='',`spell1`=6276 WHERE `entry`=3844; -- Healing Ward IV
+UPDATE `creature_template` SET `AIName`='',`spell1`=4972 WHERE `entry`=2992; -- Healing Ward V
+UPDATE `creature_template` SET `spell1`=31986 WHERE `entry`=18177; -- Tainted Stoneskin Totem
+UPDATE `creature_template` SET `AIName`='',`spell1`=34978 WHERE `entry`=20208; -- Mennu's Healing Ward
+UPDATE `creature_template` SET `AIName`='',`spell1`=52894 WHERE `entry`=29225; -- Anti-Magic Zone
+UPDATE `creature_template` SET `AIName`='',`spell1`=56762 WHERE `entry`=30444; -- The Chieftain's Totem
+UPDATE `creature_template` SET `AIName`='',`spell1`=46373 WHERE `entry`=25987; -- Windsoul Totem
+UPDATE `creature_template` SET `AIName`='',`spell1`=12507 WHERE `entry`=8510; -- Atal'ai Totem
+UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`minlevel`=1,`maxlevel`=1,`baseattacktime`=2000,`unit_class`=1,`speed_walk`=1,`speed_run`=1 WHERE `entry`=3968; -- Sentry Totem
+UPDATE `creature_template` SET `minlevel`=1,`maxlevel`=1,`unit_class`=1,`speed_walk`=1,`speed_run`=1 WHERE `entry`=7484; -- Windfury Totem III
+UPDATE `creature_template` SET `minlevel`=1,`maxlevel`=1 WHERE `entry`=15483; -- Fire Nova Totem VII
+UPDATE `creature_template` SET `faction_A`=1759,`faction_H`=1759 WHERE `entry`=19222; -- Magma Flow Totem
+UPDATE `creature_template` SET `faction_A`=74,`faction_H`=74,`speed_walk`=1,`speed_run`=1,`spell1`=33134 WHERE `entry`=18179; -- Corrupted Nova Totem
+UPDATE `creature_template` SET `faction_A`=74,`faction_H`=74,`baseattacktime`=2000,`speed_walk`=1,`speed_run`=1,`spell1`=31982 WHERE `entry`=18176; -- Tainted Earthgrab Totem
+UPDATE `creature_template` SET `minlevel`=1,`maxlevel`=1,`unit_flags`=`unit_flags`|512,`speed_run`=0.99206 WHERE `entry`=20455; -- Terror Totem
+
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=8179; -- Greater Healing Ward
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=3844; -- Healing Ward IV
+DELETE FROM `creature_ai_scripts` WHERE `id`=1817702; -- Tainted Stoneskin Totem
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=20208; -- Mennu's Healing Ward
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=8510; -- Atal'ai Totem
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (3968,7484,15483,19222,24046,24045,18179,18176);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(3968,0,0,1,0, NULL), -- Sentry Totem
+(7484,0,0,1,0, NULL), -- Windfury Totem III
+(15483,0,0,1,0, NULL), -- Fire Nova Totem VII
+(19222,0,0,1,0, NULL), -- Magma Flow Totem
+(24046,0,0,257,0, NULL), -- Fire Spirit Totem
+(24045,0,0,257,0, NULL), -- Water Spirit Totem
+(18179,0,0,1,0, NULL), -- Corrupted Nova Totem
+(18176,0,0,1,0, NULL); -- Tainted Earthgrab Totem
diff --git a/sql/updates/world/2011_10_30_02_world_player_factionchange_achievement.sql b/sql/updates/world/2011_10_30_02_world_player_factionchange_achievement.sql
new file mode 100644
index 00000000000..5f7c3bf46f6
--- /dev/null
+++ b/sql/updates/world/2011_10_30_02_world_player_factionchange_achievement.sql
@@ -0,0 +1,63 @@
+-- World Event
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (2144,1707,2797,1038,1656,1684,1692) AND `horde_id` IN (2145,1693,2798,1039,1657,1683,1691);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(2144,2145), -- What A Long, Strange Trip It's Been
+(1707,1693), -- Fool For Love
+(2797,2798), -- Noble Gardener
+(1038,1039), -- The Flame Warden / Keeper
+(1656,1657), -- Hallowed Be Thy Name
+(1684,1683), -- Brewmaster
+(1692,1691); -- Merrymaker
+
+-- World Event: Hallow's End
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (963,966,969,970,1040) AND `horde_id` IN (971,967,965,968,1041);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(970,971), -- Tricks and Treats of Azeroth
+(966,967), -- Tricks and Treats of Eastern Kingdoms
+(963,965), -- Tricks and Treats of Kalimdor
+(969,968), -- Tricks and Treats of Outland
+(1040,1041); -- Rotten Hallow
+
+-- World Event: Love is in the Air
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (1280,1697) AND `horde_id` IN (1279,1698);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(1280,1279), -- Flirt With Disaster
+(1697,1698); -- Nation of Adoration
+
+-- World Event: Noblegarden
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (2421,2419) AND `horde_id` IN (2420,2497);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(2421,2420), -- Noble Garden
+(2419,2497); -- Spring Fling
+
+-- World Event: Midsummer Fire Festival
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (1035,1028,1029,1030,1022,1023,1024,1034) AND `horde_id` IN (1037,1031,1032,1033,1025,1026,1027,1036);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(1035,1037), -- Desecration of the Alliance / Horde
+(1028,1031), -- Extinguishing Eastern Kingdoms
+(1029,1032), -- Extinguishing Kalimdor
+(1030,1033), -- Extinguishing Outland
+(1022,1025), -- Flame Warden / Keeper of Eastern Kingdoms
+(1023,1026), -- Flame Warden / Keeper of Kalimdor
+(1024,1027), -- Flame Warden / Keeper of Outland
+(1034,1036); -- The Fires of Azeroth
+
+-- World Event: Brewfest
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (1184) AND `horde_id` IN (1203);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(1184,1203); -- Strange Brew
+
+-- World Event: Pilgrim's Bounty
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (3576,3556,3580,3596) AND `horde_id` IN (3577,3557,3581,3597);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(3576,3577), -- Now We're Cookin'
+(3556,3557), -- Pilgrim's Paunch
+(3580,3581), -- Pilgrim's Peril
+(3596,3597); -- Pilgrim's Progress
+
+-- World Event: Feast of Winter Veil
+DELETE FROM `player_factionchange_achievement` WHERE `alliance_id` IN (4436,1686,1255) AND `horde_id` IN (4437,1685,259);
+INSERT INTO `player_factionchange_achievement` (`alliance_id`,`horde_id`) VALUES
+(4436,4437), -- BB King
+(1686,1685), -- Bros. Before Ho Ho Ho's
+(1255,259); -- Scrooge
diff --git a/sql/updates/world/2011_11_01_00_world_sai.sql b/sql/updates/world/2011_11_01_00_world_sai.sql
new file mode 100644
index 00000000000..f4e12082ea9
--- /dev/null
+++ b/sql/updates/world/2011_11_01_00_world_sai.sql
@@ -0,0 +1,9 @@
+-- Fjord Turkey SAI - Cleanup and re-add the old SAI with the new event.
+DELETE FROM `smart_scripts` WHERE `entryorguid`=24746 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
+(24746,0,0,1,8,0,100,0,44323,0,0,0,11,44327,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Fjord Turkey - On Spellhit - Cast spell on invoker'),
+(24746,0,1,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Fjord Turkey - On Spellhit - Despawn'),
+(24746,0,2,0,6,0,100,0,0,0,0,0,11,25281,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Fjord Turkey - Upon death - Cast Turkey Marker');
+
+UPDATE `creature_template` SET `faction_A`=189,`faction_H`=189 WHERE `entry`=29594; -- Angry Turkey
+UPDATE `smart_scripts` SET `event_type`=1,`event_flags`=1,`action_type`=49,`action_param1`=0,`action_param2`=0,`target_type`=21,`target_param1`=20,`comment`= 'Angry Turkey - On spawn attack summoner' WHERE `entryorguid`=29594 AND `source_type`=0;
diff --git a/sql/updates/world/2011_11_07_00_world_player_factionchange_items.sql b/sql/updates/world/2011_11_07_00_world_player_factionchange_items.sql
new file mode 100644
index 00000000000..54a36473fb3
--- /dev/null
+++ b/sql/updates/world/2011_11_07_00_world_player_factionchange_items.sql
@@ -0,0 +1,7 @@
+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
+(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'),
+(0,48072, 'Velen''s Handwraps of Conquest',0,48097, 'Zabra''s Handwraps of Conquest'),
+(0,48073, 'Velen''s Circlet of Conquest',0,48098, 'Zabra''s Circlet of Conquest');
diff --git a/sql/updates/world/2011_11_07_01_world_areatrigger_teleport.sql b/sql/updates/world/2011_11_07_01_world_areatrigger_teleport.sql
new file mode 100644
index 00000000000..2164d24ef5f
--- /dev/null
+++ b/sql/updates/world/2011_11_07_01_world_areatrigger_teleport.sql
@@ -0,0 +1,3 @@
+-- Correct AQ40's areatrigger_teleport orientation
+UPDATE `areatrigger_teleport` SET `target_position_z`=129.330612, `target_orientation`=0.929912 WHERE `id`=4010;
+UPDATE `areatrigger_teleport` SET `target_orientation`=4.030663 WHERE `id`=4012;
diff --git a/sql/updates/world/2011_11_07_02_world_misc.sql b/sql/updates/world/2011_11_07_02_world_misc.sql
new file mode 100644
index 00000000000..b40ad4dc7bf
--- /dev/null
+++ b/sql/updates/world/2011_11_07_02_world_misc.sql
@@ -0,0 +1,10 @@
+-- by Aok
+-- Removes save to instance flag from Hellfire Channeler
+UPDATE `creature_template` SET `flags_extra`=`flags_extra` &~ 1 WHERE `entry`=17256;
+
+-- by Nay
+DELETE FROM `spell_dbc` WHERE `Id` IN (12507,31982,33134);
+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
+(12507, 0, 0, 464, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 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, 23, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 'Atal''ai Skeleton Totem'),
+(31982, 0, 0, 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 29, 29, 21, 1, 0, -1, -1, 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, 23, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31983, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 'Tainted Earthgrab Totem'),
+(33134, 0, 0, 65920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 20, 20, 85, 1, 0, -1, -1, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 18000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 'Tainted Nova Totem');
diff --git a/sql/updates/world/2011_11_07_03_world_misc.sql b/sql/updates/world/2011_11_07_03_world_misc.sql
new file mode 100644
index 00000000000..97b538237bd
--- /dev/null
+++ b/sql/updates/world/2011_11_07_03_world_misc.sql
@@ -0,0 +1,6 @@
+DELETE FROM `creature_loot_template` WHERE `entry`=11671; -- Core Hounds
+UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=11671;
+
+-- fixing previous sql (2011_11_07_02_world_misc.sql)
+-- Removes save to instance flag from Hellfire Channeler
+UPDATE `creature_template` SET `flags_extra`=`flags_extra` &~ 1 WHERE `entry`=17256; \ No newline at end of file
diff --git a/sql/updates/world/2011_11_11_00_world_spell_proc_event.sql b/sql/updates/world/2011_11_11_00_world_spell_proc_event.sql
new file mode 100644
index 00000000000..997ede4a886
--- /dev/null
+++ b/sql/updates/world/2011_11_11_00_world_spell_proc_event.sql
@@ -0,0 +1 @@
+UPDATE `spell_proc_event` SET `procFlags`=0x10 WHERE `entry` IN (20335,20336,20337,53695,53696);
diff --git a/sql/updates/world/2011_11_11_01_world_misc.sql b/sql/updates/world/2011_11_11_01_world_misc.sql
new file mode 100644
index 00000000000..f48d3f8200e
--- /dev/null
+++ b/sql/updates/world/2011_11_11_01_world_misc.sql
@@ -0,0 +1,14 @@
+-- Template updates for creature 30560 (The RP-GG)
+UPDATE `creature_template` SET `npcflag`=`npcflag`|16777216 WHERE `entry`=30560; -- The RP-GG
+-- Addon data for creature 30560 (The RP-GG)
+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;
+
+-- Spellclick data for creature 30560 (The RP-GG)
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=30560;
+INSERT INTO `npc_spellclick_spells` VALUES
+(30560,57347,0,0,0,1,0,57348,1);
diff --git a/sql/updates/world/2011_11_13_00_world_spell_proc_event.sql b/sql/updates/world/2011_11_13_00_world_spell_proc_event.sql
new file mode 100644
index 00000000000..393282c229c
--- /dev/null
+++ b/sql/updates/world/2011_11_13_00_world_spell_proc_event.sql
@@ -0,0 +1,4 @@
+-- Spell proc cooldown for Item - Hunter T9 4P Bonus
+DELETE FROM `spell_proc_event` WHERE `entry`=67151;
+INSERT INTO `spell_proc_event` (`entry`,`Cooldown`) VALUES
+(67151,45);
diff --git a/sql/updates/world/2011_11_13_01_world_sai.sql b/sql/updates/world/2011_11_13_01_world_sai.sql
new file mode 100644
index 00000000000..1a4ed5b29d9
--- /dev/null
+++ b/sql/updates/world/2011_11_13_01_world_sai.sql
@@ -0,0 +1,38 @@
+-- Areatrigger Warsong Farms SAI
+SET @AT_SLAUGHTERHOUSE := 4873;
+SET @AT_GRAINERY := 4871;
+SET @AT_TORP_FARM := 4872;
+SET @NPC_SLAUGHTERHOUSE := 25672;
+SET @NPC_GRAINERY := 25669;
+SET @NPC_TORP_FARM := 25671;
+UPDATE `areatrigger_scripts` SET `ScriptName`='SmartTrigger' WHERE `entry` IN (@AT_SLAUGHTERHOUSE,@AT_GRAINERY,@AT_TORP_FARM);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@AT_SLAUGHTERHOUSE,@AT_GRAINERY,@AT_TORP_FARM) AND `source_type`=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
+(@AT_SLAUGHTERHOUSE,2,0,0,46,0,100,0,@AT_SLAUGHTERHOUSE,0,0,0,33,@NPC_SLAUGHTERHOUSE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Slaughterhouse - On Trigger - Quest Credit"),
+(@AT_GRAINERY,2,0,0,46,0,100,0,@AT_GRAINERY,0,0,0,33,@NPC_GRAINERY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Grainery - On Trigger - Quest Credit"),
+(@AT_TORP_FARM,2,0,0,46,0,100,0,@AT_TORP_FARM,0,0,0,33,@NPC_TORP_FARM,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Torp Farm - On Trigger - Quest Credit");
+
+-- Areatrigger Ravenholdt SAI
+SET @AT_RAVENHOLDT := 3066;
+SET @NPC_RAVENHOLDT := 13936;
+UPDATE `areatrigger_scripts` SET `ScriptName`='SmartTrigger' WHERE `entry`=@AT_RAVENHOLDT;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@AT_RAVENHOLDT AND `source_type`=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
+(@AT_RAVENHOLDT,2,0,0,46,0,100,0,@AT_RAVENHOLDT,0,0,0,33,@NPC_RAVENHOLDT,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Ravenholdt - On Trigger - Quest Credit");
+
+-- Areatrigger Aldurthar Gate SAI
+SET @AT_SOUTH := 5284;
+SET @AT_CENTRAL := 5285;
+SET @AT_NORTH := 5286;
+SET @AT_NORTHWEST := 5287;
+SET @NPC_SOUTH := 32195;
+SET @NPC_CENTRAL := 32196;
+SET @NPC_NORTH := 32197;
+SET @NPC_NORTHWEST := 32199;
+UPDATE `areatrigger_scripts` SET `ScriptName`='SmartTrigger' WHERE `entry` IN (@AT_SOUTH,@AT_CENTRAL,@AT_NORTH,@AT_NORTHWEST);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@AT_SOUTH,@AT_CENTRAL,@AT_NORTH,@AT_NORTHWEST) AND `source_type`=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
+(@AT_SOUTH,2,0,0,46,0,100,0,@AT_SOUTH,0,0,0,33,@NPC_SOUTH,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger South - On Trigger - Quest Credit"),
+(@AT_CENTRAL,2,0,0,46,0,100,0,@AT_CENTRAL,0,0,0,33,@NPC_CENTRAL,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Central - On Trigger - Quest Credit"),
+(@AT_NORTH,2,0,0,46,0,100,0,@AT_NORTH,0,0,0,33,@NPC_NORTH,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger North - On Trigger - Quest Credit"),
+(@AT_NORTHWEST,2,0,0,46,0,100,0,@AT_NORTHWEST,0,0,0,33,@NPC_NORTHWEST,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Northwest - On Trigger - Quest Credit");
diff --git a/sql/updates/world/2011_11_13_02_world_pool_template.sql b/sql/updates/world/2011_11_13_02_world_pool_template.sql
new file mode 100644
index 00000000000..257398d4457
--- /dev/null
+++ b/sql/updates/world/2011_11_13_02_world_pool_template.sql
@@ -0,0 +1,6095 @@
+-- --- Northrend ore spawns ---
+/*
+Borean Tundra guid 160000 - 160299 pool 10000 - 10149
+150 - Cobalt
+150 - Secondary
+Howling Fjord guid 160300 - 160599 pool 10150 - 10299
+150 - Cobalt
+150 - Secondary
+Grizzly Hills guid 160600 - 160799 pool 10300 - 10499
+100 - Cobalt
+100 - Secondary
+Dragonblight guid 160800 - 161099 pool 10500 - 10649
+150 - Cobalt
+150 - Secondary
+Zul''Drak guid 161100 - 161399 pool 10650 - 10799
+150 - Cobalt
+150 - Secondary
+Sholazar Basin guid 161400 - 162449 pool 10800 - 11149
+350 - Saronite
+350 - Secondary
+350 - third
+Storm Peaks guid 162450 - 163199 pool 11150 - 11399
+250 - Saronite
+250 - Secondary
+250 - Third
+Icecrown guid 163200 - 164399 pool 11400 - 11799
+400 - Saronite
+400 - Secondary
+400 - Third
+*/
+-- ----------------------------------------
+-- -- Fixup ore spawns for Borean Tundra --
+-- ----------------------------------------
+SET @RANGE := 150;
+SET @GUID1 := 160000;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @POOL := 10000;
+SET @LASTGUID := 90; -- Total number of guids - 1 in zone
+SET @CHANCE1 := 90; -- This value can be 0 to 100
+SET @CHANCE2 := 100 - @CHANCE1;
+SET @MOTHER := 9900;
+SET @ACTIVE := 30; -- Max number of active spawns
+SET @TIMER := 900; -- Respawn timer in seconds
+-- Remove Ore spawns from Borean Tundra
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y > 4800 AND `position_x` < 4600;
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < 4800 AND position_y > 4235 AND `position_x` < 4420;
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < 4235 AND position_y > 3120 AND `position_x` < 4290;
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5000 AND 5064;
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5283 AND 5291;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5000 AND 5064;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5283 AND 5291;
+-- Colbalt Deposits Borean Tundra
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1+0,189978,571,1,1,2041.020,5487.780,0.6657,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189978,571,1,1,2107.070,5567.050,4.3290,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189978,571,1,1,2176.160,6465.650,36.7026,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189978,571,1,1,2191.400,6179.220,59.8092,0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189978,571,1,1,2207.810,5461.620,1.4179,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189978,571,1,1,2210.390,6140.070,102.5860,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189978,571,1,1,2268.480,6553.980,44.8410,2.23402,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189978,571,1,1,2420.550,5354.250,1.1916,-2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189978,571,1,1,2440.970,5670.830,55.7080,-1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189978,571,1,1,2479.390,5862.970,123.9090,-2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189978,571,1,1,2484.080,5877.070,-24.4687,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189978,571,1,1,2522.500,5118.600,11.1408,-1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189978,571,1,1,2599.540,5932.400,-15.0285,1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189978,571,1,1,2650.770,5183.580,8.5151,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189978,571,1,1,2748.900,6927.940,-0.4558,0.64577,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189978,571,1,1,2761.550,5608.240,45.2715,-0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189978,571,1,1,2763.630,5342.760,30.6526,2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189978,571,1,1,2770.520,5154.430,30.9665,-2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189978,571,1,1,2790.090,5263.080,20.6015,-1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189978,571,1,1,2840.900,4952.440,8.9537,2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189978,571,1,1,2874.190,5228.350,8.6320,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189978,571,1,1,2930.960,5704.170,48.5007,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189978,571,1,1,3027.790,4980.890,12.1247,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189978,571,1,1,3034.250,4541.600,9.2876,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189978,571,1,1,3099.810,4421.810,27.8759,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189978,571,1,1,3112.390,4653.800,7.5872,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189978,571,1,1,3121.680,3765.480,9.0758,-2.80997,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189978,571,1,1,3137.750,3442.070,3.3502,0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189978,571,1,1,3138.650,5762.380,56.1208,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189978,571,1,1,3139.470,3676.510,4.5353,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189978,571,1,1,3151.480,5622.400,31.6321,-0.57596,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189978,571,1,1,3166.540,4828.210,8.4315,2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189978,571,1,1,3178.550,4306.800,27.7940,-0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189978,571,1,1,3185.580,3546.170,7.6564,2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189978,571,1,1,3198.810,4009.430,26.2162,1.11701,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189978,571,1,1,3236.340,5552.180,37.9475,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189978,571,1,1,3258.650,6215.420,66.4526,2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189978,571,1,1,3286.000,3285.200,26.0825,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189978,571,1,1,3312.170,4442.610,16.2630,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189978,571,1,1,3339.990,6077.690,70.5354,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189978,571,1,1,3373.570,5698.460,59.7515,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189978,571,1,1,3425.060,6250.550,59.3819,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189978,571,1,1,3432.170,3205.750,28.7276,0.19199,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189978,571,1,1,3442.730,4790.610,28.0548,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189978,571,1,1,3456.690,4495.230,-14.5277,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189978,571,1,1,3471.360,3949.050,28.4666,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189978,571,1,1,3500.650,5648.270,61.2663,-1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189978,571,1,1,3546.060,5485.130,28.2165,-1.20428,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189978,571,1,1,3575.170,5582.850,36.2144,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189978,571,1,1,3589.770,4352.250,-0.0799,0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189978,571,1,1,3597.660,7076.430,207.8640,-0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189978,571,1,1,3602.530,3264.460,29.1279,3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189978,571,1,1,3629.540,3121.820,52.9232,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189978,571,1,1,3637.100,4875.020,-4.4644,1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189978,571,1,1,3641.540,7262.290,224.0600,0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189978,571,1,1,3647.920,4760.270,-21.7579,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189978,571,1,1,3673.780,5719.620,65.1652,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189978,571,1,1,3679.230,4027.050,25.4779,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189978,571,1,1,3735.660,7364.340,221.5280,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189978,571,1,1,3773.740,4124.640,26.3959,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189978,571,1,1,3791.720,6400.170,201.6110,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID1+61,189978,571,1,1,3799.720,6641.220,152.9170,3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID1+62,189978,571,1,1,3806.030,4624.150,-4.2562,2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID1+63,189978,571,1,1,3815.140,4009.440,27.9435,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+64,189978,571,1,1,3835.130,4339.370,13.9343,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+65,189978,571,1,1,3903.800,6724.670,152.8680,-0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID1+66,189978,571,1,1,3917.590,6440.270,12.2326,-2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID1+67,189978,571,1,1,3966.950,4626.570,3.9666,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID1+68,189978,571,1,1,3983.410,5187.210,14.7211,-0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID1+69,189978,571,1,1,4027.440,5977.490,-126.0680,-1.27409,0,0,0,1,@TIMER,255,1),
+(@GUID1+70,189978,571,1,1,4032.270,4116.910,68.5057,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+71,189978,571,1,1,4069.310,7227.390,193.9630,-0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID1+72,189978,571,1,1,4070.480,6434.010,18.6334,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID1+73,189978,571,1,1,4145.380,6067.060,-125.9360,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+74,189978,571,1,1,4171.720,5077.170,16.6149,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID1+75,189978,571,1,1,4208.170,6800.440,237.2870,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID1+76,189978,571,1,1,4230.770,4443.920,31.1130,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID1+77,189978,571,1,1,4250.450,5738.320,63.6832,3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID1+78,189978,571,1,1,4284.010,6139.800,-124.8270,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+79,189978,571,1,1,4290.250,4914.950,24.5063,-0.45379,0,0,0,1,@TIMER,255,1),
+(@GUID1+80,189978,571,1,1,4365.940,6207.040,-125.8980,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID1+81,189978,571,1,1,4367.850,4251.450,97.6535,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID1+82,189978,571,1,1,4368.080,5342.280,5.1373,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID1+83,189978,571,1,1,4420.920,5968.570,58.9111,-1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID1+84,189978,571,1,1,4428.090,4947.540,22.4015,-0.57596,0,0,0,1,@TIMER,255,1),
+(@GUID1+85,189978,571,1,1,4474.030,5326.940,81.2181,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+86,189978,571,1,1,4489.790,5061.610,53.6446,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+87,189978,571,1,1,4495.700,5196.980,77.0767,-2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID1+88,189978,571,1,1,4510.570,5420.060,28.6437,0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID1+89,189978,571,1,1,4527.510,5433.780,-17.0905,0.45379,0,0,0,1,@TIMER,255,1),
+(@GUID1+90,189978,571,1,1,4541.420,5349.580,-31.6367,1.36136,0,0,0,1,@TIMER,255,1);
+-- Rich Colbalt Deposits Borean Tundra
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID2+0,189979,571,1,1,2041.020,5487.780,0.6657,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189979,571,1,1,2107.070,5567.050,4.3290,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189979,571,1,1,2176.160,6465.650,36.7026,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189979,571,1,1,2191.400,6179.220,59.8092,0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189979,571,1,1,2207.810,5461.620,1.4179,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189979,571,1,1,2210.390,6140.070,102.5860,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189979,571,1,1,2268.480,6553.980,44.8410,2.23402,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189979,571,1,1,2420.550,5354.250,1.1916,-2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189979,571,1,1,2440.970,5670.830,55.7080,-1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189979,571,1,1,2479.390,5862.970,123.9090,-2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189979,571,1,1,2484.080,5877.070,-24.4687,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189979,571,1,1,2522.500,5118.600,11.1408,-1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189979,571,1,1,2599.540,5932.400,-15.0285,1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189979,571,1,1,2650.770,5183.580,8.5151,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189979,571,1,1,2748.900,6927.940,-0.4558,0.64577,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189979,571,1,1,2761.550,5608.240,45.2715,-0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189979,571,1,1,2763.630,5342.760,30.6526,2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189979,571,1,1,2770.520,5154.430,30.9665,-2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189979,571,1,1,2790.090,5263.080,20.6015,-1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189979,571,1,1,2840.900,4952.440,8.9537,2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189979,571,1,1,2874.190,5228.350,8.6320,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189979,571,1,1,2930.960,5704.170,48.5007,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189979,571,1,1,3027.790,4980.890,12.1247,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+23,189979,571,1,1,3034.250,4541.600,9.2876,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189979,571,1,1,3099.810,4421.810,27.8759,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189979,571,1,1,3112.390,4653.800,7.5872,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189979,571,1,1,3121.680,3765.480,9.0758,-2.80997,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189979,571,1,1,3137.750,3442.070,3.3502,0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189979,571,1,1,3138.650,5762.380,56.1208,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189979,571,1,1,3139.470,3676.510,4.5353,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189979,571,1,1,3151.480,5622.400,31.6321,-0.57596,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189979,571,1,1,3166.540,4828.210,8.4315,2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189979,571,1,1,3178.550,4306.800,27.7940,-0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189979,571,1,1,3185.580,3546.170,7.6564,2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189979,571,1,1,3198.810,4009.430,26.2162,1.11701,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189979,571,1,1,3236.340,5552.180,37.9475,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189979,571,1,1,3258.650,6215.420,66.4526,2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189979,571,1,1,3286.000,3285.200,26.0825,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189979,571,1,1,3312.170,4442.610,16.2630,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189979,571,1,1,3339.990,6077.690,70.5354,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189979,571,1,1,3373.570,5698.460,59.7515,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189979,571,1,1,3425.060,6250.550,59.3819,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189979,571,1,1,3432.170,3205.750,28.7276,0.19199,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189979,571,1,1,3442.730,4790.610,28.0548,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189979,571,1,1,3456.690,4495.230,-14.5277,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189979,571,1,1,3471.360,3949.050,28.4666,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189979,571,1,1,3500.650,5648.270,61.2663,-1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID2+47,189979,571,1,1,3546.060,5485.130,28.2165,-1.20428,0,0,0,1,@TIMER,255,1),
+(@GUID2+48,189979,571,1,1,3575.170,5582.850,36.2144,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189979,571,1,1,3589.770,4352.250,-0.0799,0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189979,571,1,1,3597.660,7076.430,207.8640,-0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189979,571,1,1,3602.530,3264.460,29.1279,3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189979,571,1,1,3629.540,3121.820,52.9232,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189979,571,1,1,3637.100,4875.020,-4.4644,1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189979,571,1,1,3641.540,7262.290,224.0600,0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189979,571,1,1,3647.920,4760.270,-21.7579,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189979,571,1,1,3673.780,5719.620,65.1652,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189979,571,1,1,3679.230,4027.050,25.4779,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189979,571,1,1,3735.660,7364.340,221.5280,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189979,571,1,1,3773.740,4124.640,26.3959,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189979,571,1,1,3791.720,6400.170,201.6110,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID2+61,189979,571,1,1,3799.720,6641.220,152.9170,3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID2+62,189979,571,1,1,3806.030,4624.150,-4.2562,2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID2+63,189979,571,1,1,3815.140,4009.440,27.9435,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+64,189979,571,1,1,3835.130,4339.370,13.9343,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+65,189979,571,1,1,3903.800,6724.670,152.8680,-0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID2+66,189979,571,1,1,3917.590,6440.270,12.2326,-2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID2+67,189979,571,1,1,3966.950,4626.570,3.9666,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID2+68,189979,571,1,1,3983.410,5187.210,14.7211,-0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID2+69,189979,571,1,1,4027.440,5977.490,-126.0680,-1.27409,0,0,0,1,@TIMER,255,1),
+(@GUID2+70,189979,571,1,1,4032.270,4116.910,68.5057,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+71,189979,571,1,1,4069.310,7227.390,193.9630,-0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID2+72,189979,571,1,1,4070.480,6434.010,18.6334,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID2+73,189979,571,1,1,4145.380,6067.060,-125.9360,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+74,189979,571,1,1,4171.720,5077.170,16.6149,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID2+75,189979,571,1,1,4208.170,6800.440,237.2870,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID2+76,189979,571,1,1,4230.770,4443.920,31.1130,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID2+77,189979,571,1,1,4250.450,5738.320,63.6832,3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID2+78,189979,571,1,1,4284.010,6139.800,-124.8270,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+79,189979,571,1,1,4290.250,4914.950,24.5063,-0.45379,0,0,0,1,@TIMER,255,1),
+(@GUID2+80,189979,571,1,1,4365.940,6207.040,-125.8980,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID2+81,189979,571,1,1,4367.850,4251.450,97.6535,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID2+82,189979,571,1,1,4368.080,5342.280,5.1373,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID2+83,189979,571,1,1,4420.920,5968.570,58.9111,-1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID2+84,189979,571,1,1,4428.090,4947.540,22.4015,-0.57596,0,0,0,1,@TIMER,255,1),
+(@GUID2+85,189979,571,1,1,4474.030,5326.940,81.2181,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+86,189979,571,1,1,4489.790,5061.610,53.6446,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+87,189979,571,1,1,4495.700,5196.980,77.0767,-2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID2+88,189979,571,1,1,4510.570,5420.060,28.6437,0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID2+89,189979,571,1,1,4527.510,5433.780,-17.0905,0.45379,0,0,0,1,@TIMER,255,1),
+(@GUID2+90,189979,571,1,1,4541.420,5349.580,-31.6367,1.36136,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@LASTGUID;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Borean Tundra Ore Spawnpoint 1 Cobalt'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Borean Tundra Ore Spawnpoint 1 Rich Cobalt'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Borean Tundra Ore Spawnpoint 2 Cobalt'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Borean Tundra Ore Spawnpoint 2 Rich Cobalt'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Borean Tundra Ore Spawnpoint 3 Cobalt'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Borean Tundra Ore Spawnpoint 3 Rich Cobalt'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Borean Tundra Ore Spawnpoint 4 Cobalt'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Borean Tundra Ore Spawnpoint 4 Rich Cobalt'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Borean Tundra Ore Spawnpoint 5 Cobalt'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Borean Tundra Ore Spawnpoint 5 Rich Cobalt'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Borean Tundra Ore Spawnpoint 6 Cobalt'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Borean Tundra Ore Spawnpoint 6 Rich Cobalt'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Borean Tundra Ore Spawnpoint 7 Cobalt'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Borean Tundra Ore Spawnpoint 7 Rich Cobalt'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Borean Tundra Ore Spawnpoint 8 Cobalt'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Borean Tundra Ore Spawnpoint 8 Rich Cobalt'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Borean Tundra Ore Spawnpoint 9 Cobalt'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Borean Tundra Ore Spawnpoint 9 Rich Cobalt'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Borean Tundra Ore Spawnpoint 10 Cobalt'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Borean Tundra Ore Spawnpoint 10 Rich Cobalt'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Borean Tundra Ore Spawnpoint 11 Cobalt'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Borean Tundra Ore Spawnpoint 11 Rich Cobalt'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Borean Tundra Ore Spawnpoint 12 Cobalt'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Borean Tundra Ore Spawnpoint 12 Rich Cobalt'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Borean Tundra Ore Spawnpoint 13 Cobalt'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Borean Tundra Ore Spawnpoint 13 Rich Cobalt'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Borean Tundra Ore Spawnpoint 14 Cobalt'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Borean Tundra Ore Spawnpoint 14 Rich Cobalt'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Borean Tundra Ore Spawnpoint 15 Cobalt'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Borean Tundra Ore Spawnpoint 15 Rich Cobalt'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Borean Tundra Ore Spawnpoint 16 Cobalt'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Borean Tundra Ore Spawnpoint 16 Rich Cobalt'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Borean Tundra Ore Spawnpoint 17 Cobalt'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Borean Tundra Ore Spawnpoint 17 Rich Cobalt'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Borean Tundra Ore Spawnpoint 18 Cobalt'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Borean Tundra Ore Spawnpoint 18 Rich Cobalt'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Borean Tundra Ore Spawnpoint 19 Cobalt'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Borean Tundra Ore Spawnpoint 19 Rich Cobalt'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Borean Tundra Ore Spawnpoint 20 Cobalt'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Borean Tundra Ore Spawnpoint 20 Rich Cobalt'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Borean Tundra Ore Spawnpoint 21 Cobalt'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Borean Tundra Ore Spawnpoint 21 Rich Cobalt'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Borean Tundra Ore Spawnpoint 22 Cobalt'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Borean Tundra Ore Spawnpoint 22 Rich Cobalt'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Borean Tundra Ore Spawnpoint 23 Cobalt'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Borean Tundra Ore Spawnpoint 23 Rich Cobalt'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Borean Tundra Ore Spawnpoint 24 Cobalt'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Borean Tundra Ore Spawnpoint 24 Rich Cobalt'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Borean Tundra Ore Spawnpoint 25 Cobalt'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Borean Tundra Ore Spawnpoint 25 Rich Cobalt'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Borean Tundra Ore Spawnpoint 26 Cobalt'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Borean Tundra Ore Spawnpoint 26 Rich Cobalt'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Borean Tundra Ore Spawnpoint 27 Cobalt'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Borean Tundra Ore Spawnpoint 27 Rich Cobalt'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Borean Tundra Ore Spawnpoint 28 Cobalt'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Borean Tundra Ore Spawnpoint 28 Rich Cobalt'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Borean Tundra Ore Spawnpoint 29 Cobalt'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Borean Tundra Ore Spawnpoint 29 Rich Cobalt'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Borean Tundra Ore Spawnpoint 30 Cobalt'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Borean Tundra Ore Spawnpoint 30 Rich Cobalt'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Borean Tundra Ore Spawnpoint 31 Cobalt'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Borean Tundra Ore Spawnpoint 31 Rich Cobalt'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Borean Tundra Ore Spawnpoint 32 Cobalt'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Borean Tundra Ore Spawnpoint 32 Rich Cobalt'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Borean Tundra Ore Spawnpoint 33 Cobalt'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Borean Tundra Ore Spawnpoint 33 Rich Cobalt'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Borean Tundra Ore Spawnpoint 34 Cobalt'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Borean Tundra Ore Spawnpoint 34 Rich Cobalt'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Borean Tundra Ore Spawnpoint 35 Cobalt'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Borean Tundra Ore Spawnpoint 35 Rich Cobalt'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Borean Tundra Ore Spawnpoint 36 Cobalt'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Borean Tundra Ore Spawnpoint 36 Rich Cobalt'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Borean Tundra Ore Spawnpoint 37 Cobalt'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Borean Tundra Ore Spawnpoint 37 Rich Cobalt'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Borean Tundra Ore Spawnpoint 38 Cobalt'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Borean Tundra Ore Spawnpoint 38 Rich Cobalt'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Borean Tundra Ore Spawnpoint 39 Cobalt'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Borean Tundra Ore Spawnpoint 39 Rich Cobalt'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Borean Tundra Ore Spawnpoint 40 Cobalt'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Borean Tundra Ore Spawnpoint 40 Rich Cobalt'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Borean Tundra Ore Spawnpoint 41 Cobalt'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Borean Tundra Ore Spawnpoint 41 Rich Cobalt'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Borean Tundra Ore Spawnpoint 42 Cobalt'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Borean Tundra Ore Spawnpoint 42 Rich Cobalt'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Borean Tundra Ore Spawnpoint 43 Cobalt'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Borean Tundra Ore Spawnpoint 43 Rich Cobalt'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Borean Tundra Ore Spawnpoint 44 Cobalt'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Borean Tundra Ore Spawnpoint 44 Rich Cobalt'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Borean Tundra Ore Spawnpoint 45 Cobalt'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Borean Tundra Ore Spawnpoint 45 Rich Cobalt'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Borean Tundra Ore Spawnpoint 46 Cobalt'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Borean Tundra Ore Spawnpoint 46 Rich Cobalt'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Borean Tundra Ore Spawnpoint 47 Cobalt'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Borean Tundra Ore Spawnpoint 47 Rich Cobalt'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Borean Tundra Ore Spawnpoint 48 Cobalt'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Borean Tundra Ore Spawnpoint 48 Rich Cobalt'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Borean Tundra Ore Spawnpoint 49 Cobalt'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Borean Tundra Ore Spawnpoint 49 Rich Cobalt'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Borean Tundra Ore Spawnpoint 50 Cobalt'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Borean Tundra Ore Spawnpoint 50 Rich Cobalt'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Borean Tundra Ore Spawnpoint 51 Cobalt'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Borean Tundra Ore Spawnpoint 51 Rich Cobalt'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Borean Tundra Ore Spawnpoint 52 Cobalt'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Borean Tundra Ore Spawnpoint 52 Rich Cobalt'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Borean Tundra Ore Spawnpoint 53 Cobalt'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Borean Tundra Ore Spawnpoint 53 Rich Cobalt'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Borean Tundra Ore Spawnpoint 54 Cobalt'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Borean Tundra Ore Spawnpoint 54 Rich Cobalt'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Borean Tundra Ore Spawnpoint 55 Cobalt'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Borean Tundra Ore Spawnpoint 55 Rich Cobalt'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Borean Tundra Ore Spawnpoint 56 Cobalt'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Borean Tundra Ore Spawnpoint 56 Rich Cobalt'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Borean Tundra Ore Spawnpoint 57 Cobalt'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Borean Tundra Ore Spawnpoint 57 Rich Cobalt'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Borean Tundra Ore Spawnpoint 58 Cobalt'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Borean Tundra Ore Spawnpoint 58 Rich Cobalt'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Borean Tundra Ore Spawnpoint 59 Cobalt'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Borean Tundra Ore Spawnpoint 59 Rich Cobalt'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Borean Tundra Ore Spawnpoint 60 Cobalt'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Borean Tundra Ore Spawnpoint 60 Rich Cobalt'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Borean Tundra Ore Spawnpoint 61 Cobalt'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Borean Tundra Ore Spawnpoint 61 Rich Cobalt'),
+(@GUID1+61,@POOL+61,@CHANCE1, 'Borean Tundra Ore Spawnpoint 62 Cobalt'),
+(@GUID2+61,@POOL+61,@CHANCE2, 'Borean Tundra Ore Spawnpoint 62 Rich Cobalt'),
+(@GUID1+62,@POOL+62,@CHANCE1, 'Borean Tundra Ore Spawnpoint 63 Cobalt'),
+(@GUID2+62,@POOL+62,@CHANCE2, 'Borean Tundra Ore Spawnpoint 63 Rich Cobalt'),
+(@GUID1+63,@POOL+63,@CHANCE1, 'Borean Tundra Ore Spawnpoint 64 Cobalt'),
+(@GUID2+63,@POOL+63,@CHANCE2, 'Borean Tundra Ore Spawnpoint 64 Rich Cobalt'),
+(@GUID1+64,@POOL+64,@CHANCE1, 'Borean Tundra Ore Spawnpoint 65 Cobalt'),
+(@GUID2+64,@POOL+64,@CHANCE2, 'Borean Tundra Ore Spawnpoint 65 Rich Cobalt'),
+(@GUID1+65,@POOL+65,@CHANCE1, 'Borean Tundra Ore Spawnpoint 66 Cobalt'),
+(@GUID2+65,@POOL+65,@CHANCE2, 'Borean Tundra Ore Spawnpoint 66 Rich Cobalt'),
+(@GUID1+66,@POOL+66,@CHANCE1, 'Borean Tundra Ore Spawnpoint 67 Cobalt'),
+(@GUID2+66,@POOL+66,@CHANCE2, 'Borean Tundra Ore Spawnpoint 67 Rich Cobalt'),
+(@GUID1+67,@POOL+67,@CHANCE1, 'Borean Tundra Ore Spawnpoint 68 Cobalt'),
+(@GUID2+67,@POOL+67,@CHANCE2, 'Borean Tundra Ore Spawnpoint 68 Rich Cobalt'),
+(@GUID1+68,@POOL+68,@CHANCE1, 'Borean Tundra Ore Spawnpoint 69 Cobalt'),
+(@GUID2+68,@POOL+68,@CHANCE2, 'Borean Tundra Ore Spawnpoint 69 Rich Cobalt'),
+(@GUID1+69,@POOL+69,@CHANCE1, 'Borean Tundra Ore Spawnpoint 70 Cobalt'),
+(@GUID2+69,@POOL+69,@CHANCE2, 'Borean Tundra Ore Spawnpoint 70 Rich Cobalt'),
+(@GUID1+70,@POOL+70,@CHANCE1, 'Borean Tundra Ore Spawnpoint 71 Cobalt'),
+(@GUID2+70,@POOL+70,@CHANCE2, 'Borean Tundra Ore Spawnpoint 71 Rich Cobalt'),
+(@GUID1+71,@POOL+71,@CHANCE1, 'Borean Tundra Ore Spawnpoint 72 Cobalt'),
+(@GUID2+71,@POOL+71,@CHANCE2, 'Borean Tundra Ore Spawnpoint 72 Rich Cobalt'),
+(@GUID1+72,@POOL+72,@CHANCE1, 'Borean Tundra Ore Spawnpoint 73 Cobalt'),
+(@GUID2+72,@POOL+72,@CHANCE2, 'Borean Tundra Ore Spawnpoint 73 Rich Cobalt'),
+(@GUID1+73,@POOL+73,@CHANCE1, 'Borean Tundra Ore Spawnpoint 74 Cobalt'),
+(@GUID2+73,@POOL+73,@CHANCE2, 'Borean Tundra Ore Spawnpoint 74 Rich Cobalt'),
+(@GUID1+74,@POOL+74,@CHANCE1, 'Borean Tundra Ore Spawnpoint 75 Cobalt'),
+(@GUID2+74,@POOL+74,@CHANCE2, 'Borean Tundra Ore Spawnpoint 75 Rich Cobalt'),
+(@GUID1+75,@POOL+75,@CHANCE1, 'Borean Tundra Ore Spawnpoint 76 Cobalt'),
+(@GUID2+75,@POOL+75,@CHANCE2, 'Borean Tundra Ore Spawnpoint 76 Rich Cobalt'),
+(@GUID1+76,@POOL+76,@CHANCE1, 'Borean Tundra Ore Spawnpoint 77 Cobalt'),
+(@GUID2+76,@POOL+76,@CHANCE2, 'Borean Tundra Ore Spawnpoint 77 Rich Cobalt'),
+(@GUID1+77,@POOL+77,@CHANCE1, 'Borean Tundra Ore Spawnpoint 78 Cobalt'),
+(@GUID2+77,@POOL+77,@CHANCE2, 'Borean Tundra Ore Spawnpoint 78 Rich Cobalt'),
+(@GUID1+78,@POOL+78,@CHANCE1, 'Borean Tundra Ore Spawnpoint 79 Cobalt'),
+(@GUID2+78,@POOL+78,@CHANCE2, 'Borean Tundra Ore Spawnpoint 79 Rich Cobalt'),
+(@GUID1+79,@POOL+79,@CHANCE1, 'Borean Tundra Ore Spawnpoint 80 Cobalt'),
+(@GUID2+79,@POOL+79,@CHANCE2, 'Borean Tundra Ore Spawnpoint 80 Rich Cobalt'),
+(@GUID1+80,@POOL+80,@CHANCE1, 'Borean Tundra Ore Spawnpoint 81 Cobalt'),
+(@GUID2+80,@POOL+80,@CHANCE2, 'Borean Tundra Ore Spawnpoint 81 Rich Cobalt'),
+(@GUID1+81,@POOL+81,@CHANCE1, 'Borean Tundra Ore Spawnpoint 82 Cobalt'),
+(@GUID2+81,@POOL+81,@CHANCE2, 'Borean Tundra Ore Spawnpoint 82 Rich Cobalt'),
+(@GUID1+82,@POOL+82,@CHANCE1, 'Borean Tundra Ore Spawnpoint 83 Cobalt'),
+(@GUID2+82,@POOL+82,@CHANCE2, 'Borean Tundra Ore Spawnpoint 83 Rich Cobalt'),
+(@GUID1+83,@POOL+83,@CHANCE1, 'Borean Tundra Ore Spawnpoint 84 Cobalt'),
+(@GUID2+83,@POOL+83,@CHANCE2, 'Borean Tundra Ore Spawnpoint 84 Rich Cobalt'),
+(@GUID1+84,@POOL+84,@CHANCE1, 'Borean Tundra Ore Spawnpoint 85 Cobalt'),
+(@GUID2+84,@POOL+84,@CHANCE2, 'Borean Tundra Ore Spawnpoint 85 Rich Cobalt'),
+(@GUID1+85,@POOL+85,@CHANCE1, 'Borean Tundra Ore Spawnpoint 86 Cobalt'),
+(@GUID2+85,@POOL+85,@CHANCE2, 'Borean Tundra Ore Spawnpoint 86 Rich Cobalt'),
+(@GUID1+86,@POOL+86,@CHANCE1, 'Borean Tundra Ore Spawnpoint 87 Cobalt'),
+(@GUID2+86,@POOL+86,@CHANCE2, 'Borean Tundra Ore Spawnpoint 87 Rich Cobalt'),
+(@GUID1+87,@POOL+87,@CHANCE1, 'Borean Tundra Ore Spawnpoint 88 Cobalt'),
+(@GUID2+87,@POOL+87,@CHANCE2, 'Borean Tundra Ore Spawnpoint 88 Rich Cobalt'),
+(@GUID1+88,@POOL+88,@CHANCE1, 'Borean Tundra Ore Spawnpoint 89 Cobalt'),
+(@GUID2+88,@POOL+88,@CHANCE2, 'Borean Tundra Ore Spawnpoint 89 Rich Cobalt'),
+(@GUID1+89,@POOL+89,@CHANCE1, 'Borean Tundra Ore Spawnpoint 90 Cobalt'),
+(@GUID2+89,@POOL+89,@CHANCE2, 'Borean Tundra Ore Spawnpoint 90 Rich Cobalt'),
+(@GUID1+90,@POOL+90,@CHANCE1, 'Borean Tundra Ore Spawnpoint 91 Cobalt'),
+(@GUID2+90,@POOL+90,@CHANCE2, 'Borean Tundra Ore Spawnpoint 91 Rich Cobalt');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Borean Tundra Ore Spawnpoint 1'),
+(@POOL+1,1, 'Borean Tundra Ore Spawnpoint 2'),
+(@POOL+2,1, 'Borean Tundra Ore Spawnpoint 3'),
+(@POOL+3,1, 'Borean Tundra Ore Spawnpoint 4'),
+(@POOL+4,1, 'Borean Tundra Ore Spawnpoint 5'),
+(@POOL+5,1, 'Borean Tundra Ore Spawnpoint 6'),
+(@POOL+6,1, 'Borean Tundra Ore Spawnpoint 7'),
+(@POOL+7,1, 'Borean Tundra Ore Spawnpoint 8'),
+(@POOL+8,1, 'Borean Tundra Ore Spawnpoint 9'),
+(@POOL+9,1, 'Borean Tundra Ore Spawnpoint 10'),
+(@POOL+10,1, 'Borean Tundra Ore Spawnpoint 11'),
+(@POOL+11,1, 'Borean Tundra Ore Spawnpoint 12'),
+(@POOL+12,1, 'Borean Tundra Ore Spawnpoint 13'),
+(@POOL+13,1, 'Borean Tundra Ore Spawnpoint 14'),
+(@POOL+14,1, 'Borean Tundra Ore Spawnpoint 15'),
+(@POOL+15,1, 'Borean Tundra Ore Spawnpoint 16'),
+(@POOL+16,1, 'Borean Tundra Ore Spawnpoint 17'),
+(@POOL+17,1, 'Borean Tundra Ore Spawnpoint 18'),
+(@POOL+18,1, 'Borean Tundra Ore Spawnpoint 19'),
+(@POOL+19,1, 'Borean Tundra Ore Spawnpoint 20'),
+(@POOL+20,1, 'Borean Tundra Ore Spawnpoint 21'),
+(@POOL+21,1, 'Borean Tundra Ore Spawnpoint 22'),
+(@POOL+22,1, 'Borean Tundra Ore Spawnpoint 23'),
+(@POOL+23,1, 'Borean Tundra Ore Spawnpoint 24'),
+(@POOL+24,1, 'Borean Tundra Ore Spawnpoint 25'),
+(@POOL+25,1, 'Borean Tundra Ore Spawnpoint 26'),
+(@POOL+26,1, 'Borean Tundra Ore Spawnpoint 27'),
+(@POOL+27,1, 'Borean Tundra Ore Spawnpoint 28'),
+(@POOL+28,1, 'Borean Tundra Ore Spawnpoint 29'),
+(@POOL+29,1, 'Borean Tundra Ore Spawnpoint 30'),
+(@POOL+30,1, 'Borean Tundra Ore Spawnpoint 31'),
+(@POOL+31,1, 'Borean Tundra Ore Spawnpoint 32'),
+(@POOL+32,1, 'Borean Tundra Ore Spawnpoint 33'),
+(@POOL+33,1, 'Borean Tundra Ore Spawnpoint 34'),
+(@POOL+34,1, 'Borean Tundra Ore Spawnpoint 35'),
+(@POOL+35,1, 'Borean Tundra Ore Spawnpoint 36'),
+(@POOL+36,1, 'Borean Tundra Ore Spawnpoint 37'),
+(@POOL+37,1, 'Borean Tundra Ore Spawnpoint 38'),
+(@POOL+38,1, 'Borean Tundra Ore Spawnpoint 39'),
+(@POOL+39,1, 'Borean Tundra Ore Spawnpoint 40'),
+(@POOL+40,1, 'Borean Tundra Ore Spawnpoint 41'),
+(@POOL+41,1, 'Borean Tundra Ore Spawnpoint 42'),
+(@POOL+42,1, 'Borean Tundra Ore Spawnpoint 43'),
+(@POOL+43,1, 'Borean Tundra Ore Spawnpoint 44'),
+(@POOL+44,1, 'Borean Tundra Ore Spawnpoint 45'),
+(@POOL+45,1, 'Borean Tundra Ore Spawnpoint 46'),
+(@POOL+46,1, 'Borean Tundra Ore Spawnpoint 47'),
+(@POOL+47,1, 'Borean Tundra Ore Spawnpoint 48'),
+(@POOL+48,1, 'Borean Tundra Ore Spawnpoint 49'),
+(@POOL+49,1, 'Borean Tundra Ore Spawnpoint 50'),
+(@POOL+50,1, 'Borean Tundra Ore Spawnpoint 51'),
+(@POOL+51,1, 'Borean Tundra Ore Spawnpoint 52'),
+(@POOL+52,1, 'Borean Tundra Ore Spawnpoint 53'),
+(@POOL+53,1, 'Borean Tundra Ore Spawnpoint 54'),
+(@POOL+54,1, 'Borean Tundra Ore Spawnpoint 55'),
+(@POOL+55,1, 'Borean Tundra Ore Spawnpoint 56'),
+(@POOL+56,1, 'Borean Tundra Ore Spawnpoint 57'),
+(@POOL+57,1, 'Borean Tundra Ore Spawnpoint 58'),
+(@POOL+58,1, 'Borean Tundra Ore Spawnpoint 59'),
+(@POOL+59,1, 'Borean Tundra Ore Spawnpoint 60'),
+(@POOL+60,1, 'Borean Tundra Ore Spawnpoint 61'),
+(@POOL+61,1, 'Borean Tundra Ore Spawnpoint 62'),
+(@POOL+62,1, 'Borean Tundra Ore Spawnpoint 63'),
+(@POOL+63,1, 'Borean Tundra Ore Spawnpoint 64'),
+(@POOL+64,1, 'Borean Tundra Ore Spawnpoint 65'),
+(@POOL+65,1, 'Borean Tundra Ore Spawnpoint 66'),
+(@POOL+66,1, 'Borean Tundra Ore Spawnpoint 67'),
+(@POOL+67,1, 'Borean Tundra Ore Spawnpoint 68'),
+(@POOL+68,1, 'Borean Tundra Ore Spawnpoint 69'),
+(@POOL+69,1, 'Borean Tundra Ore Spawnpoint 70'),
+(@POOL+70,1, 'Borean Tundra Ore Spawnpoint 71'),
+(@POOL+71,1, 'Borean Tundra Ore Spawnpoint 72'),
+(@POOL+72,1, 'Borean Tundra Ore Spawnpoint 73'),
+(@POOL+73,1, 'Borean Tundra Ore Spawnpoint 74'),
+(@POOL+74,1, 'Borean Tundra Ore Spawnpoint 75'),
+(@POOL+75,1, 'Borean Tundra Ore Spawnpoint 76'),
+(@POOL+76,1, 'Borean Tundra Ore Spawnpoint 77'),
+(@POOL+77,1, 'Borean Tundra Ore Spawnpoint 78'),
+(@POOL+78,1, 'Borean Tundra Ore Spawnpoint 79'),
+(@POOL+79,1, 'Borean Tundra Ore Spawnpoint 80'),
+(@POOL+80,1, 'Borean Tundra Ore Spawnpoint 81'),
+(@POOL+81,1, 'Borean Tundra Ore Spawnpoint 82'),
+(@POOL+82,1, 'Borean Tundra Ore Spawnpoint 83'),
+(@POOL+83,1, 'Borean Tundra Ore Spawnpoint 84'),
+(@POOL+84,1, 'Borean Tundra Ore Spawnpoint 85'),
+(@POOL+85,1, 'Borean Tundra Ore Spawnpoint 86'),
+(@POOL+86,1, 'Borean Tundra Ore Spawnpoint 87'),
+(@POOL+87,1, 'Borean Tundra Ore Spawnpoint 88'),
+(@POOL+88,1, 'Borean Tundra Ore Spawnpoint 89'),
+(@POOL+89,1, 'Borean Tundra Ore Spawnpoint 90'),
+(@POOL+90,1, 'Borean Tundra Ore Spawnpoint 91');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Borean Tundra Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 61'),
+(@POOL+61,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 62'),
+(@POOL+62,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 63'),
+(@POOL+63,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 64'),
+(@POOL+64,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 65'),
+(@POOL+65,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 66'),
+(@POOL+66,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 67'),
+(@POOL+67,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 68'),
+(@POOL+68,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 69'),
+(@POOL+69,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 70'),
+(@POOL+70,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 71'),
+(@POOL+71,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 72'),
+(@POOL+72,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 73'),
+(@POOL+73,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 74'),
+(@POOL+74,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 75'),
+(@POOL+75,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 76'),
+(@POOL+76,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 77'),
+(@POOL+77,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 78'),
+(@POOL+78,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 79'),
+(@POOL+79,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 80'),
+(@POOL+80,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 81'),
+(@POOL+81,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 82'),
+(@POOL+82,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 83'),
+(@POOL+83,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 84'),
+(@POOL+84,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 85'),
+(@POOL+85,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 86'),
+(@POOL+86,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 87'),
+(@POOL+87,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 88'),
+(@POOL+88,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 89'),
+(@POOL+89,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 90'),
+(@POOL+90,@MOTHER,0, 'Borean Tundra Ore Spawnpoint 91');
+
+-- ----------------------------------------
+-- Fixup ore spawns for Howling Fjord
+-- ----------------------------------------
+SET @RANGE := 150;
+SET @GUID1 := 160300;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @POOL := 10150;
+SET @LASTGUID := 99; -- Total number of guids - 1 in zone
+SET @CHANCE1 := 90; -- This value can be 0 to 100
+SET @CHANCE2 := 100 - @CHANCE1;
+SET @MOTHER := 9901;
+SET @ACTIVE := 30; -- Max number of active spawns
+SET @TIMER := 900; -- Respawn timer in seconds
+-- Remove Ore spawns from Howling Fjord
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < -1630 AND `position_x` < 3090;
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5065 AND 5121;
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5277 AND 5282;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5065 AND 5120;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5277 AND 5282;
+-- Cobalt Deposits Howling Fjord
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1,189978,571,1,1,-144.006,-4989.570,309.6730,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189978,571,1,1,-23.354,-3586.670,33.7790,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189978,571,1,1,27.324,-3423.650,35.6203,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189978,571,1,1,85.848,-4961.880,316.0240,-1.74533,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189978,571,1,1,124.983,-3449.730,11.4041,-2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189978,571,1,1,146.113,-5708.520,190.8280,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189978,571,1,1,196.368,-5529.420,341.1140,1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189978,571,1,1,222.143,-4541.690,253.7470,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189978,571,1,1,229.642,-4166.400,247.4830,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189978,571,1,1,299.400,-5925.310,169.6930,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189978,571,1,1,311.682,-5829.520,198.0980,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189978,571,1,1,316.353,-5817.650,83.6513,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189978,571,1,1,328.762,-5728.000,99.5547,-0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189978,571,1,1,330.220,-3287.700,18.4444,-2.23402,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189978,571,1,1,423.793,-4250.210,244.9780,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189978,571,1,1,492.294,-4829.170,197.9880,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189978,571,1,1,500.158,-5366.890,254.5380,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189978,571,1,1,541.476,-4125.020,233.4580,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189978,571,1,1,576.522,-5438.030,252.0870,2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189978,571,1,1,589.568,-5148.210,-27.0699,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189978,571,1,1,635.328,-5190.950,-62.0246,-0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189978,571,1,1,667.572,-5772.810,284.2740,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189978,571,1,1,714.204,-5995.600,298.3530,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189978,571,1,1,733.277,-5463.260,245.2840,-1.58825,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189978,571,1,1,785.268,-4710.470,189.7250,0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189978,571,1,3,788.804,-5611.920,231.8180,2.63544,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189978,571,1,1,830.549,-5146.020,-89.1197,-2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189978,571,1,1,837.785,-3214.380,20.0425,0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189978,571,1,1,854.087,-5928.980,280.4520,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189978,571,1,1,875.595,-3690.570,175.6530,2.63544,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189978,571,1,1,886.931,-4307.350,193.8120,-1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189978,571,1,1,895.472,-4540.750,159.1540,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189978,571,1,1,910.239,-3593.450,177.5230,2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189978,571,1,1,937.882,-3032.450,48.7494,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189978,571,1,1,985.488,-5351.640,193.8970,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189978,571,1,1,997.533,-3464.590,186.6590,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189978,571,1,1,998.078,-5148.790,-57.7402,2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189978,571,1,1,1016.760,-4291.670,174.0770,2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189978,571,1,1,1041.890,-4154.150,152.6180,0.94248,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189978,571,1,1,1118.230,-3437.520,182.9670,2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189978,571,1,1,1257.230,-6054.090,270.8700,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189978,571,1,3,1257.940,-6169.470,234.7100,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189978,571,1,1,1339.420,-5826.830,281.0600,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189978,571,1,1,1462.340,-5216.200,195.6330,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189978,571,1,1,1541.420,-5149.820,182.1700,2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189978,571,1,1,1598.760,-5001.500,144.0290,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189978,571,1,1,1599.154,-4322.061,187.5960,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189978,571,1,1,1615.540,-5234.790,181.3280,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189978,571,1,1,1653.280,-4680.180,88.7987,1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189978,571,1,1,1660.280,-6275.210,-0.2026,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189978,571,1,1,1683.270,-6037.250,7.9892,-3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189978,571,1,1,1691.670,-4586.670,169.3620,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189978,571,1,1,1725.580,-4852.210,115.8110,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189978,571,1,1,1742.030,-4378.720,174.1920,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189978,571,1,1,1796.960,-6265.710,-0.9726,-2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189978,571,1,1,1813.380,-5678.040,226.8270,0.29671,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189978,571,1,1,1820.460,-3808.940,151.5820,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189978,571,1,1,1836.030,-3927.070,177.5710,-1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189978,571,1,1,1864.170,-3001.180,144.1620,2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189978,571,1,1,1876.110,-4463.470,197.2810,2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189978,571,1,1,1887.140,-3679.140,153.3620,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+61,189978,571,1,1,1963.890,-2986.950,155.5740,-2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID1+62,189978,571,1,1,1985.820,-5552.980,217.1860,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+63,189978,571,1,1,2022.600,-2729.910,0.3004,0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+64,189978,571,1,1,2047.480,-5751.410,222.5030,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID1+65,189978,571,1,1,2063.090,-5004.980,231.0370,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+66,189978,571,1,1,2136.450,-5652.090,224.3920,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+67,189978,571,1,1,2143.750,-5151.330,240.6410,2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID1+68,189978,571,1,1,2183.740,-5265.660,250.0680,0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID1+69,189978,571,1,1,2192.250,-2648.390,1.1699,-1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID1+70,189978,571,1,1,2192.970,-2536.350,5.3353,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID1+71,189978,571,1,1,2208.330,-3082.530,132.8410,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID1+72,189978,571,1,1,2275.290,-2949.500,123.7380,2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID1+73,189978,571,1,1,2304.780,-2744.870,-0.0415,2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID1+74,189978,571,1,1,2332.090,-5852.160,251.1900,-0.50614,0,0,0,1,@TIMER,255,1),
+(@GUID1+75,189978,571,1,1,2357.480,-3706.470,223.2140,-2.32129,0,0,0,1,@TIMER,255,1),
+(@GUID1+76,189978,571,1,1,2407.690,-2824.830,9.7012,-0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID1+77,189978,571,1,1,2467.060,-2824.690,20.6504,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+78,189978,571,1,1,2478.630,-3080.530,138.9920,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+79,189978,571,1,1,2479.220,-5437.190,299.5430,1.74533,0,0,0,1,@TIMER,255,1),
+(@GUID1+80,189978,571,1,1,2504.180,-3896.100,263.8390,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID1+81,189978,571,1,1,2508.660,-3015.970,120.7830,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID1+82,189978,571,1,1,2518.630,-4743.720,246.5690,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+83,189978,571,1,1,2536.780,-3717.470,266.8920,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+84,189978,571,1,1,2545.640,-4507.800,230.7980,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID1+85,189978,571,1,1,2557.900,-4616.650,229.8060,0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID1+86,189978,571,1,3,2570.450,-2766.360,8.7401,-0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+87,189978,571,1,1,2580.790,-4152.530,302.8390,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID1+88,189978,571,1,1,2583.110,-3123.240,128.7190,2.12930,0,0,0,1,@TIMER,255,1),
+(@GUID1+89,189978,571,1,1,2588.110,-3004.660,111.5360,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+90,189978,571,1,1,2589.780,-3917.450,296.8400,-0.29671,0,0,0,1,@TIMER,255,1),
+(@GUID1+91,189978,571,1,1,2616.550,-5791.180,314.3880,0.03491,0,0,0,1,@TIMER,255,1),
+(@GUID1+92,189978,571,1,1,2637.770,-3659.380,241.5800,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+93,189978,571,1,3,2696.920,-4105.830,365.9280,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+94,189978,571,1,1,2700.000,-3145.570,119.8800,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID1+95,189978,571,1,1,2731.690,-5583.630,379.2140,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+96,189978,571,1,3,2733.180,-4021.560,378.2430,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID1+97,189978,571,1,1,2821.700,-3719.720,232.7200,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID1+98,189978,571,1,1,2869.770,-3186.190,134.0100,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID1+99,189978,571,1,1,2918.130,-3075.250,91.0060,1.81514,0,0,0,1,@TIMER,255,1);
+-- Rich Cobalt Deposits Howling Fjord
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID2,189979,571,1,1,-144.006,-4989.570,309.6730,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189979,571,1,1,-23.354,-3586.670,33.7790,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189979,571,1,1,27.324,-3423.650,35.6203,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189979,571,1,1,85.848,-4961.880,316.0240,-1.74533,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189979,571,1,1,124.983,-3449.730,11.4041,-2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189979,571,1,1,146.113,-5708.520,190.8280,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189979,571,1,1,196.368,-5529.420,341.1140,1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189979,571,1,1,222.143,-4541.690,253.7470,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189979,571,1,1,229.642,-4166.400,247.4830,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189979,571,1,1,299.400,-5925.310,169.6930,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189979,571,1,1,311.682,-5829.520,198.0980,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189979,571,1,1,316.353,-5817.650,83.6513,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189979,571,1,1,328.762,-5728.000,99.5547,-0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189979,571,1,1,330.220,-3287.700,18.4444,-2.23402,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189979,571,1,1,423.793,-4250.210,244.9780,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189979,571,1,1,492.294,-4829.170,197.9880,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189979,571,1,1,500.158,-5366.890,254.5380,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189979,571,1,1,541.476,-4125.020,233.4580,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189979,571,1,1,576.522,-5438.030,252.0870,2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189979,571,1,1,589.568,-5148.210,-27.0699,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189979,571,1,1,635.328,-5190.950,-62.0246,-0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189979,571,1,1,667.572,-5772.810,284.2740,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189979,571,1,1,714.204,-5995.600,298.3530,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID2+23,189979,571,1,1,733.277,-5463.260,245.2840,-1.58825,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189979,571,1,1,785.268,-4710.470,189.7250,0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189979,571,1,3,788.804,-5611.920,231.8180,2.63544,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189979,571,1,1,830.549,-5146.020,-89.1197,-2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189979,571,1,1,837.785,-3214.380,20.0425,0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189979,571,1,1,854.087,-5928.980,280.4520,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189979,571,1,1,875.595,-3690.570,175.6530,2.63544,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189979,571,1,1,886.931,-4307.350,193.8120,-1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189979,571,1,1,895.472,-4540.750,159.1540,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189979,571,1,1,910.239,-3593.450,177.5230,2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189979,571,1,1,937.882,-3032.450,48.7494,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189979,571,1,1,985.488,-5351.640,193.8970,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189979,571,1,1,997.533,-3464.590,186.6590,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189979,571,1,1,998.078,-5148.790,-57.7402,2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189979,571,1,1,1016.760,-4291.670,174.0770,2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189979,571,1,1,1041.890,-4154.150,152.6180,0.94248,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189979,571,1,1,1118.230,-3437.520,182.9670,2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189979,571,1,1,1257.230,-6054.090,270.8700,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189979,571,1,3,1257.940,-6169.470,234.7100,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189979,571,1,1,1339.420,-5826.830,281.0600,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189979,571,1,1,1462.340,-5216.200,195.6330,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189979,571,1,1,1541.420,-5149.820,182.1700,2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189979,571,1,1,1598.760,-5001.500,144.0290,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189979,571,1,1,1599.154,-4322.061,187.5960,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID2+47,189979,571,1,1,1615.540,-5234.790,181.3280,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+48,189979,571,1,1,1653.280,-4680.180,88.7987,1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189979,571,1,1,1660.280,-6275.210,-0.2026,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189979,571,1,1,1683.270,-6037.250,7.9892,-3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189979,571,1,1,1691.670,-4586.670,169.3620,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189979,571,1,1,1725.580,-4852.210,115.8110,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189979,571,1,1,1742.030,-4378.720,174.1920,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189979,571,1,1,1796.960,-6265.710,-0.9726,-2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189979,571,1,1,1813.380,-5678.040,226.8270,0.29671,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189979,571,1,1,1820.460,-3808.940,151.5820,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189979,571,1,1,1836.030,-3927.070,177.5710,-1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189979,571,1,1,1864.170,-3001.180,144.1620,2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189979,571,1,1,1876.110,-4463.470,197.2810,2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189979,571,1,1,1887.140,-3679.140,153.3620,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+61,189979,571,1,1,1963.890,-2986.950,155.5740,-2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID2+62,189979,571,1,1,1985.820,-5552.980,217.1860,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+63,189979,571,1,1,2022.600,-2729.910,0.3004,0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+64,189979,571,1,1,2047.480,-5751.410,222.5030,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID2+65,189979,571,1,1,2063.090,-5004.980,231.0370,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+66,189979,571,1,1,2136.450,-5652.090,224.3920,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+67,189979,571,1,1,2143.750,-5151.330,240.6410,2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID2+68,189979,571,1,1,2183.740,-5265.660,250.0680,0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID2+69,189979,571,1,1,2192.250,-2648.390,1.1699,-1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID2+70,189979,571,1,1,2192.970,-2536.350,5.3353,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID2+71,189979,571,1,1,2208.330,-3082.530,132.8410,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID2+72,189979,571,1,1,2275.290,-2949.500,123.7380,2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID2+73,189979,571,1,1,2304.780,-2744.870,-0.0415,2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID2+74,189979,571,1,1,2332.090,-5852.160,251.1900,-0.50614,0,0,0,1,@TIMER,255,1),
+(@GUID2+75,189979,571,1,1,2357.480,-3706.470,223.2140,-2.32129,0,0,0,1,@TIMER,255,1),
+(@GUID2+76,189979,571,1,1,2407.690,-2824.830,9.7012,-0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID2+77,189979,571,1,1,2467.060,-2824.690,20.6504,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+78,189979,571,1,1,2478.630,-3080.530,138.9920,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+79,189979,571,1,1,2479.220,-5437.190,299.5430,1.74533,0,0,0,1,@TIMER,255,1),
+(@GUID2+80,189979,571,1,1,2504.180,-3896.100,263.8390,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID2+81,189979,571,1,1,2508.660,-3015.970,120.7830,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID2+82,189979,571,1,1,2518.630,-4743.720,246.5690,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+83,189979,571,1,1,2536.780,-3717.470,266.8920,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+84,189979,571,1,1,2545.640,-4507.800,230.7980,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID2+85,189979,571,1,1,2557.900,-4616.650,229.8060,0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID2+86,189979,571,1,3,2570.450,-2766.360,8.7401,-0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+87,189979,571,1,1,2580.790,-4152.530,302.8390,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID2+88,189979,571,1,1,2583.110,-3123.240,128.7190,2.12930,0,0,0,1,@TIMER,255,1),
+(@GUID2+89,189979,571,1,1,2588.110,-3004.660,111.5360,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+90,189979,571,1,1,2589.780,-3917.450,296.8400,-0.29671,0,0,0,1,@TIMER,255,1),
+(@GUID2+91,189979,571,1,1,2616.550,-5791.180,314.3880,0.03491,0,0,0,1,@TIMER,255,1),
+(@GUID2+92,189979,571,1,1,2637.770,-3659.380,241.5800,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+93,189979,571,1,3,2696.920,-4105.830,365.9280,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+94,189979,571,1,1,2700.000,-3145.570,119.8800,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID2+95,189979,571,1,1,2731.690,-5583.630,379.2140,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+96,189979,571,1,3,2733.180,-4021.560,378.2430,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID2+97,189979,571,1,1,2821.700,-3719.720,232.7200,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID2+98,189979,571,1,1,2869.770,-3186.190,134.0100,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID2+99,189979,571,1,1,2918.130,-3075.250,91.0060,1.81514,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@LASTGUID;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Howling Fjord Ore Spawnpoint 1 Cobalt'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Howling Fjord Ore Spawnpoint 1 Rich Cobalt'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Howling Fjord Ore Spawnpoint 2 Cobalt'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Howling Fjord Ore Spawnpoint 2 Rich Cobalt'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Howling Fjord Ore Spawnpoint 3 Cobalt'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Howling Fjord Ore Spawnpoint 3 Rich Cobalt'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Howling Fjord Ore Spawnpoint 4 Cobalt'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Howling Fjord Ore Spawnpoint 4 Rich Cobalt'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Howling Fjord Ore Spawnpoint 5 Cobalt'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Howling Fjord Ore Spawnpoint 5 Rich Cobalt'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Howling Fjord Ore Spawnpoint 6 Cobalt'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Howling Fjord Ore Spawnpoint 6 Rich Cobalt'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Howling Fjord Ore Spawnpoint 7 Cobalt'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Howling Fjord Ore Spawnpoint 7 Rich Cobalt'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Howling Fjord Ore Spawnpoint 8 Cobalt'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Howling Fjord Ore Spawnpoint 8 Rich Cobalt'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Howling Fjord Ore Spawnpoint 9 Cobalt'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Howling Fjord Ore Spawnpoint 9 Rich Cobalt'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Howling Fjord Ore Spawnpoint 10 Cobalt'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Howling Fjord Ore Spawnpoint 10 Rich Cobalt'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Howling Fjord Ore Spawnpoint 11 Cobalt'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Howling Fjord Ore Spawnpoint 11 Rich Cobalt'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Howling Fjord Ore Spawnpoint 12 Cobalt'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Howling Fjord Ore Spawnpoint 12 Rich Cobalt'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Howling Fjord Ore Spawnpoint 13 Cobalt'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Howling Fjord Ore Spawnpoint 13 Rich Cobalt'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Howling Fjord Ore Spawnpoint 14 Cobalt'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Howling Fjord Ore Spawnpoint 14 Rich Cobalt'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Howling Fjord Ore Spawnpoint 15 Cobalt'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Howling Fjord Ore Spawnpoint 15 Rich Cobalt'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Howling Fjord Ore Spawnpoint 16 Cobalt'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Howling Fjord Ore Spawnpoint 16 Rich Cobalt'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Howling Fjord Ore Spawnpoint 17 Cobalt'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Howling Fjord Ore Spawnpoint 17 Rich Cobalt'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Howling Fjord Ore Spawnpoint 18 Cobalt'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Howling Fjord Ore Spawnpoint 18 Rich Cobalt'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Howling Fjord Ore Spawnpoint 19 Cobalt'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Howling Fjord Ore Spawnpoint 19 Rich Cobalt'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Howling Fjord Ore Spawnpoint 20 Cobalt'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Howling Fjord Ore Spawnpoint 20 Rich Cobalt'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Howling Fjord Ore Spawnpoint 21 Cobalt'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Howling Fjord Ore Spawnpoint 21 Rich Cobalt'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Howling Fjord Ore Spawnpoint 22 Cobalt'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Howling Fjord Ore Spawnpoint 22 Rich Cobalt'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Howling Fjord Ore Spawnpoint 23 Cobalt'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Howling Fjord Ore Spawnpoint 23 Rich Cobalt'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Howling Fjord Ore Spawnpoint 24 Cobalt'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Howling Fjord Ore Spawnpoint 24 Rich Cobalt'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Howling Fjord Ore Spawnpoint 25 Cobalt'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Howling Fjord Ore Spawnpoint 25 Rich Cobalt'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Howling Fjord Ore Spawnpoint 26 Cobalt'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Howling Fjord Ore Spawnpoint 26 Rich Cobalt'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Howling Fjord Ore Spawnpoint 27 Cobalt'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Howling Fjord Ore Spawnpoint 27 Rich Cobalt'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Howling Fjord Ore Spawnpoint 28 Cobalt'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Howling Fjord Ore Spawnpoint 28 Rich Cobalt'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Howling Fjord Ore Spawnpoint 29 Cobalt'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Howling Fjord Ore Spawnpoint 29 Rich Cobalt'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Howling Fjord Ore Spawnpoint 30 Cobalt'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Howling Fjord Ore Spawnpoint 30 Rich Cobalt'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Howling Fjord Ore Spawnpoint 31 Cobalt'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Howling Fjord Ore Spawnpoint 31 Rich Cobalt'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Howling Fjord Ore Spawnpoint 32 Cobalt'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Howling Fjord Ore Spawnpoint 32 Rich Cobalt'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Howling Fjord Ore Spawnpoint 33 Cobalt'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Howling Fjord Ore Spawnpoint 33 Rich Cobalt'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Howling Fjord Ore Spawnpoint 34 Cobalt'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Howling Fjord Ore Spawnpoint 34 Rich Cobalt'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Howling Fjord Ore Spawnpoint 35 Cobalt'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Howling Fjord Ore Spawnpoint 35 Rich Cobalt'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Howling Fjord Ore Spawnpoint 36 Cobalt'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Howling Fjord Ore Spawnpoint 36 Rich Cobalt'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Howling Fjord Ore Spawnpoint 37 Cobalt'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Howling Fjord Ore Spawnpoint 37 Rich Cobalt'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Howling Fjord Ore Spawnpoint 38 Cobalt'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Howling Fjord Ore Spawnpoint 38 Rich Cobalt'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Howling Fjord Ore Spawnpoint 39 Cobalt'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Howling Fjord Ore Spawnpoint 39 Rich Cobalt'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Howling Fjord Ore Spawnpoint 40 Cobalt'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Howling Fjord Ore Spawnpoint 40 Rich Cobalt'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Howling Fjord Ore Spawnpoint 41 Cobalt'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Howling Fjord Ore Spawnpoint 41 Rich Cobalt'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Howling Fjord Ore Spawnpoint 42 Cobalt'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Howling Fjord Ore Spawnpoint 42 Rich Cobalt'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Howling Fjord Ore Spawnpoint 43 Cobalt'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Howling Fjord Ore Spawnpoint 43 Rich Cobalt'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Howling Fjord Ore Spawnpoint 44 Cobalt'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Howling Fjord Ore Spawnpoint 44 Rich Cobalt'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Howling Fjord Ore Spawnpoint 45 Cobalt'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Howling Fjord Ore Spawnpoint 45 Rich Cobalt'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Howling Fjord Ore Spawnpoint 46 Cobalt'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Howling Fjord Ore Spawnpoint 46 Rich Cobalt'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Howling Fjord Ore Spawnpoint 47 Cobalt'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Howling Fjord Ore Spawnpoint 47 Rich Cobalt'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Howling Fjord Ore Spawnpoint 48 Cobalt'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Howling Fjord Ore Spawnpoint 48 Rich Cobalt'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Howling Fjord Ore Spawnpoint 49 Cobalt'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Howling Fjord Ore Spawnpoint 49 Rich Cobalt'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Howling Fjord Ore Spawnpoint 50 Cobalt'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Howling Fjord Ore Spawnpoint 50 Rich Cobalt'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Howling Fjord Ore Spawnpoint 51 Cobalt'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Howling Fjord Ore Spawnpoint 51 Rich Cobalt'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Howling Fjord Ore Spawnpoint 52 Cobalt'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Howling Fjord Ore Spawnpoint 52 Rich Cobalt'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Howling Fjord Ore Spawnpoint 53 Cobalt'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Howling Fjord Ore Spawnpoint 53 Rich Cobalt'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Howling Fjord Ore Spawnpoint 54 Cobalt'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Howling Fjord Ore Spawnpoint 54 Rich Cobalt'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Howling Fjord Ore Spawnpoint 55 Cobalt'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Howling Fjord Ore Spawnpoint 55 Rich Cobalt'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Howling Fjord Ore Spawnpoint 56 Cobalt'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Howling Fjord Ore Spawnpoint 56 Rich Cobalt'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Howling Fjord Ore Spawnpoint 57 Cobalt'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Howling Fjord Ore Spawnpoint 57 Rich Cobalt'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Howling Fjord Ore Spawnpoint 58 Cobalt'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Howling Fjord Ore Spawnpoint 58 Rich Cobalt'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Howling Fjord Ore Spawnpoint 59 Cobalt'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Howling Fjord Ore Spawnpoint 59 Rich Cobalt'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Howling Fjord Ore Spawnpoint 60 Cobalt'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Howling Fjord Ore Spawnpoint 60 Rich Cobalt'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Howling Fjord Ore Spawnpoint 61 Cobalt'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Howling Fjord Ore Spawnpoint 61 Rich Cobalt'),
+(@GUID1+61,@POOL+61,@CHANCE1, 'Howling Fjord Ore Spawnpoint 62 Cobalt'),
+(@GUID2+61,@POOL+61,@CHANCE2, 'Howling Fjord Ore Spawnpoint 62 Rich Cobalt'),
+(@GUID1+62,@POOL+62,@CHANCE1, 'Howling Fjord Ore Spawnpoint 63 Cobalt'),
+(@GUID2+62,@POOL+62,@CHANCE2, 'Howling Fjord Ore Spawnpoint 63 Rich Cobalt'),
+(@GUID1+63,@POOL+63,@CHANCE1, 'Howling Fjord Ore Spawnpoint 64 Cobalt'),
+(@GUID2+63,@POOL+63,@CHANCE2, 'Howling Fjord Ore Spawnpoint 64 Rich Cobalt'),
+(@GUID1+64,@POOL+64,@CHANCE1, 'Howling Fjord Ore Spawnpoint 65 Cobalt'),
+(@GUID2+64,@POOL+64,@CHANCE2, 'Howling Fjord Ore Spawnpoint 65 Rich Cobalt'),
+(@GUID1+65,@POOL+65,@CHANCE1, 'Howling Fjord Ore Spawnpoint 66 Cobalt'),
+(@GUID2+65,@POOL+65,@CHANCE2, 'Howling Fjord Ore Spawnpoint 66 Rich Cobalt'),
+(@GUID1+66,@POOL+66,@CHANCE1, 'Howling Fjord Ore Spawnpoint 67 Cobalt'),
+(@GUID2+66,@POOL+66,@CHANCE2, 'Howling Fjord Ore Spawnpoint 67 Rich Cobalt'),
+(@GUID1+67,@POOL+67,@CHANCE1, 'Howling Fjord Ore Spawnpoint 68 Cobalt'),
+(@GUID2+67,@POOL+67,@CHANCE2, 'Howling Fjord Ore Spawnpoint 68 Rich Cobalt'),
+(@GUID1+68,@POOL+68,@CHANCE1, 'Howling Fjord Ore Spawnpoint 69 Cobalt'),
+(@GUID2+68,@POOL+68,@CHANCE2, 'Howling Fjord Ore Spawnpoint 69 Rich Cobalt'),
+(@GUID1+69,@POOL+69,@CHANCE1, 'Howling Fjord Ore Spawnpoint 70 Cobalt'),
+(@GUID2+69,@POOL+69,@CHANCE2, 'Howling Fjord Ore Spawnpoint 70 Rich Cobalt'),
+(@GUID1+70,@POOL+70,@CHANCE1, 'Howling Fjord Ore Spawnpoint 71 Cobalt'),
+(@GUID2+70,@POOL+70,@CHANCE2, 'Howling Fjord Ore Spawnpoint 71 Rich Cobalt'),
+(@GUID1+71,@POOL+71,@CHANCE1, 'Howling Fjord Ore Spawnpoint 72 Cobalt'),
+(@GUID2+71,@POOL+71,@CHANCE2, 'Howling Fjord Ore Spawnpoint 72 Rich Cobalt'),
+(@GUID1+72,@POOL+72,@CHANCE1, 'Howling Fjord Ore Spawnpoint 73 Cobalt'),
+(@GUID2+72,@POOL+72,@CHANCE2, 'Howling Fjord Ore Spawnpoint 73 Rich Cobalt'),
+(@GUID1+73,@POOL+73,@CHANCE1, 'Howling Fjord Ore Spawnpoint 74 Cobalt'),
+(@GUID2+73,@POOL+73,@CHANCE2, 'Howling Fjord Ore Spawnpoint 74 Rich Cobalt'),
+(@GUID1+74,@POOL+74,@CHANCE1, 'Howling Fjord Ore Spawnpoint 75 Cobalt'),
+(@GUID2+74,@POOL+74,@CHANCE2, 'Howling Fjord Ore Spawnpoint 75 Rich Cobalt'),
+(@GUID1+75,@POOL+75,@CHANCE1, 'Howling Fjord Ore Spawnpoint 76 Cobalt'),
+(@GUID2+75,@POOL+75,@CHANCE2, 'Howling Fjord Ore Spawnpoint 76 Rich Cobalt'),
+(@GUID1+76,@POOL+76,@CHANCE1, 'Howling Fjord Ore Spawnpoint 77 Cobalt'),
+(@GUID2+76,@POOL+76,@CHANCE2, 'Howling Fjord Ore Spawnpoint 77 Rich Cobalt'),
+(@GUID1+77,@POOL+77,@CHANCE1, 'Howling Fjord Ore Spawnpoint 78 Cobalt'),
+(@GUID2+77,@POOL+77,@CHANCE2, 'Howling Fjord Ore Spawnpoint 78 Rich Cobalt'),
+(@GUID1+78,@POOL+78,@CHANCE1, 'Howling Fjord Ore Spawnpoint 79 Cobalt'),
+(@GUID2+78,@POOL+78,@CHANCE2, 'Howling Fjord Ore Spawnpoint 79 Rich Cobalt'),
+(@GUID1+79,@POOL+79,@CHANCE1, 'Howling Fjord Ore Spawnpoint 80 Cobalt'),
+(@GUID2+79,@POOL+79,@CHANCE2, 'Howling Fjord Ore Spawnpoint 80 Rich Cobalt'),
+(@GUID1+80,@POOL+80,@CHANCE1, 'Howling Fjord Ore Spawnpoint 81 Cobalt'),
+(@GUID2+80,@POOL+80,@CHANCE2, 'Howling Fjord Ore Spawnpoint 81 Rich Cobalt'),
+(@GUID1+81,@POOL+81,@CHANCE1, 'Howling Fjord Ore Spawnpoint 82 Cobalt'),
+(@GUID2+81,@POOL+81,@CHANCE2, 'Howling Fjord Ore Spawnpoint 82 Rich Cobalt'),
+(@GUID1+82,@POOL+82,@CHANCE1, 'Howling Fjord Ore Spawnpoint 83 Cobalt'),
+(@GUID2+82,@POOL+82,@CHANCE2, 'Howling Fjord Ore Spawnpoint 83 Rich Cobalt'),
+(@GUID1+83,@POOL+83,@CHANCE1, 'Howling Fjord Ore Spawnpoint 84 Cobalt'),
+(@GUID2+83,@POOL+83,@CHANCE2, 'Howling Fjord Ore Spawnpoint 84 Rich Cobalt'),
+(@GUID1+84,@POOL+84,@CHANCE1, 'Howling Fjord Ore Spawnpoint 85 Cobalt'),
+(@GUID2+84,@POOL+84,@CHANCE2, 'Howling Fjord Ore Spawnpoint 85 Rich Cobalt'),
+(@GUID1+85,@POOL+85,@CHANCE1, 'Howling Fjord Ore Spawnpoint 86 Cobalt'),
+(@GUID2+85,@POOL+85,@CHANCE2, 'Howling Fjord Ore Spawnpoint 86 Rich Cobalt'),
+(@GUID1+86,@POOL+86,@CHANCE1, 'Howling Fjord Ore Spawnpoint 87 Cobalt'),
+(@GUID2+86,@POOL+86,@CHANCE2, 'Howling Fjord Ore Spawnpoint 87 Rich Cobalt'),
+(@GUID1+87,@POOL+87,@CHANCE1, 'Howling Fjord Ore Spawnpoint 88 Cobalt'),
+(@GUID2+87,@POOL+87,@CHANCE2, 'Howling Fjord Ore Spawnpoint 88 Rich Cobalt'),
+(@GUID1+88,@POOL+88,@CHANCE1, 'Howling Fjord Ore Spawnpoint 89 Cobalt'),
+(@GUID2+88,@POOL+88,@CHANCE2, 'Howling Fjord Ore Spawnpoint 89 Rich Cobalt'),
+(@GUID1+89,@POOL+89,@CHANCE1, 'Howling Fjord Ore Spawnpoint 90 Cobalt'),
+(@GUID2+89,@POOL+89,@CHANCE2, 'Howling Fjord Ore Spawnpoint 90 Rich Cobalt'),
+(@GUID1+90,@POOL+90,@CHANCE1, 'Howling Fjord Ore Spawnpoint 91 Cobalt'),
+(@GUID2+90,@POOL+90,@CHANCE2, 'Howling Fjord Ore Spawnpoint 91 Rich Cobalt'),
+(@GUID1+91,@POOL+91,@CHANCE1, 'Howling Fjord Ore Spawnpoint 92 Cobalt'),
+(@GUID2+91,@POOL+91,@CHANCE2, 'Howling Fjord Ore Spawnpoint 92 Rich Cobalt'),
+(@GUID1+92,@POOL+92,@CHANCE1, 'Howling Fjord Ore Spawnpoint 93 Cobalt'),
+(@GUID2+92,@POOL+92,@CHANCE2, 'Howling Fjord Ore Spawnpoint 93 Rich Cobalt'),
+(@GUID1+93,@POOL+93,@CHANCE1, 'Howling Fjord Ore Spawnpoint 94 Cobalt'),
+(@GUID2+93,@POOL+93,@CHANCE2, 'Howling Fjord Ore Spawnpoint 94 Rich Cobalt'),
+(@GUID1+94,@POOL+94,@CHANCE1, 'Howling Fjord Ore Spawnpoint 95 Cobalt'),
+(@GUID2+94,@POOL+94,@CHANCE2, 'Howling Fjord Ore Spawnpoint 95 Rich Cobalt'),
+(@GUID1+95,@POOL+95,@CHANCE1, 'Howling Fjord Ore Spawnpoint 96 Cobalt'),
+(@GUID2+95,@POOL+95,@CHANCE2, 'Howling Fjord Ore Spawnpoint 96 Rich Cobalt'),
+(@GUID1+96,@POOL+96,@CHANCE1, 'Howling Fjord Ore Spawnpoint 97 Cobalt'),
+(@GUID2+96,@POOL+96,@CHANCE2, 'Howling Fjord Ore Spawnpoint 97 Rich Cobalt'),
+(@GUID1+97,@POOL+97,@CHANCE1, 'Howling Fjord Ore Spawnpoint 98 Cobalt'),
+(@GUID2+97,@POOL+97,@CHANCE2, 'Howling Fjord Ore Spawnpoint 98 Rich Cobalt'),
+(@GUID1+98,@POOL+98,@CHANCE1, 'Howling Fjord Ore Spawnpoint 99 Cobalt'),
+(@GUID2+98,@POOL+98,@CHANCE2, 'Howling Fjord Ore Spawnpoint 99 Rich Cobalt'),
+(@GUID1+99,@POOL+99,@CHANCE1, 'Howling Fjord Ore Spawnpoint 100 Cobalt'),
+(@GUID2+99,@POOL+99,@CHANCE2, 'Howling Fjord Ore Spawnpoint 100 Rich Cobalt');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Howling Fjord Ore Spawnpoint 1'),
+(@POOL+1,1, 'Howling Fjord Ore Spawnpoint 2'),
+(@POOL+2,1, 'Howling Fjord Ore Spawnpoint 3'),
+(@POOL+3,1, 'Howling Fjord Ore Spawnpoint 4'),
+(@POOL+4,1, 'Howling Fjord Ore Spawnpoint 5'),
+(@POOL+5,1, 'Howling Fjord Ore Spawnpoint 6'),
+(@POOL+6,1, 'Howling Fjord Ore Spawnpoint 7'),
+(@POOL+7,1, 'Howling Fjord Ore Spawnpoint 8'),
+(@POOL+8,1, 'Howling Fjord Ore Spawnpoint 9'),
+(@POOL+9,1, 'Howling Fjord Ore Spawnpoint 10'),
+(@POOL+10,1, 'Howling Fjord Ore Spawnpoint 11'),
+(@POOL+11,1, 'Howling Fjord Ore Spawnpoint 12'),
+(@POOL+12,1, 'Howling Fjord Ore Spawnpoint 13'),
+(@POOL+13,1, 'Howling Fjord Ore Spawnpoint 14'),
+(@POOL+14,1, 'Howling Fjord Ore Spawnpoint 15'),
+(@POOL+15,1, 'Howling Fjord Ore Spawnpoint 16'),
+(@POOL+16,1, 'Howling Fjord Ore Spawnpoint 17'),
+(@POOL+17,1, 'Howling Fjord Ore Spawnpoint 18'),
+(@POOL+18,1, 'Howling Fjord Ore Spawnpoint 19'),
+(@POOL+19,1, 'Howling Fjord Ore Spawnpoint 20'),
+(@POOL+20,1, 'Howling Fjord Ore Spawnpoint 21'),
+(@POOL+21,1, 'Howling Fjord Ore Spawnpoint 22'),
+(@POOL+22,1, 'Howling Fjord Ore Spawnpoint 23'),
+(@POOL+23,1, 'Howling Fjord Ore Spawnpoint 24'),
+(@POOL+24,1, 'Howling Fjord Ore Spawnpoint 25'),
+(@POOL+25,1, 'Howling Fjord Ore Spawnpoint 26'),
+(@POOL+26,1, 'Howling Fjord Ore Spawnpoint 27'),
+(@POOL+27,1, 'Howling Fjord Ore Spawnpoint 28'),
+(@POOL+28,1, 'Howling Fjord Ore Spawnpoint 29'),
+(@POOL+29,1, 'Howling Fjord Ore Spawnpoint 30'),
+(@POOL+30,1, 'Howling Fjord Ore Spawnpoint 31'),
+(@POOL+31,1, 'Howling Fjord Ore Spawnpoint 32'),
+(@POOL+32,1, 'Howling Fjord Ore Spawnpoint 33'),
+(@POOL+33,1, 'Howling Fjord Ore Spawnpoint 34'),
+(@POOL+34,1, 'Howling Fjord Ore Spawnpoint 35'),
+(@POOL+35,1, 'Howling Fjord Ore Spawnpoint 36'),
+(@POOL+36,1, 'Howling Fjord Ore Spawnpoint 37'),
+(@POOL+37,1, 'Howling Fjord Ore Spawnpoint 38'),
+(@POOL+38,1, 'Howling Fjord Ore Spawnpoint 39'),
+(@POOL+39,1, 'Howling Fjord Ore Spawnpoint 40'),
+(@POOL+40,1, 'Howling Fjord Ore Spawnpoint 41'),
+(@POOL+41,1, 'Howling Fjord Ore Spawnpoint 42'),
+(@POOL+42,1, 'Howling Fjord Ore Spawnpoint 43'),
+(@POOL+43,1, 'Howling Fjord Ore Spawnpoint 44'),
+(@POOL+44,1, 'Howling Fjord Ore Spawnpoint 45'),
+(@POOL+45,1, 'Howling Fjord Ore Spawnpoint 46'),
+(@POOL+46,1, 'Howling Fjord Ore Spawnpoint 47'),
+(@POOL+47,1, 'Howling Fjord Ore Spawnpoint 48'),
+(@POOL+48,1, 'Howling Fjord Ore Spawnpoint 49'),
+(@POOL+49,1, 'Howling Fjord Ore Spawnpoint 50'),
+(@POOL+50,1, 'Howling Fjord Ore Spawnpoint 51'),
+(@POOL+51,1, 'Howling Fjord Ore Spawnpoint 52'),
+(@POOL+52,1, 'Howling Fjord Ore Spawnpoint 53'),
+(@POOL+53,1, 'Howling Fjord Ore Spawnpoint 54'),
+(@POOL+54,1, 'Howling Fjord Ore Spawnpoint 55'),
+(@POOL+55,1, 'Howling Fjord Ore Spawnpoint 56'),
+(@POOL+56,1, 'Howling Fjord Ore Spawnpoint 57'),
+(@POOL+57,1, 'Howling Fjord Ore Spawnpoint 58'),
+(@POOL+58,1, 'Howling Fjord Ore Spawnpoint 59'),
+(@POOL+59,1, 'Howling Fjord Ore Spawnpoint 60'),
+(@POOL+60,1, 'Howling Fjord Ore Spawnpoint 61'),
+(@POOL+61,1, 'Howling Fjord Ore Spawnpoint 62'),
+(@POOL+62,1, 'Howling Fjord Ore Spawnpoint 63'),
+(@POOL+63,1, 'Howling Fjord Ore Spawnpoint 64'),
+(@POOL+64,1, 'Howling Fjord Ore Spawnpoint 65'),
+(@POOL+65,1, 'Howling Fjord Ore Spawnpoint 66'),
+(@POOL+66,1, 'Howling Fjord Ore Spawnpoint 67'),
+(@POOL+67,1, 'Howling Fjord Ore Spawnpoint 68'),
+(@POOL+68,1, 'Howling Fjord Ore Spawnpoint 69'),
+(@POOL+69,1, 'Howling Fjord Ore Spawnpoint 70'),
+(@POOL+70,1, 'Howling Fjord Ore Spawnpoint 71'),
+(@POOL+71,1, 'Howling Fjord Ore Spawnpoint 72'),
+(@POOL+72,1, 'Howling Fjord Ore Spawnpoint 73'),
+(@POOL+73,1, 'Howling Fjord Ore Spawnpoint 74'),
+(@POOL+74,1, 'Howling Fjord Ore Spawnpoint 75'),
+(@POOL+75,1, 'Howling Fjord Ore Spawnpoint 76'),
+(@POOL+76,1, 'Howling Fjord Ore Spawnpoint 77'),
+(@POOL+77,1, 'Howling Fjord Ore Spawnpoint 78'),
+(@POOL+78,1, 'Howling Fjord Ore Spawnpoint 79'),
+(@POOL+79,1, 'Howling Fjord Ore Spawnpoint 80'),
+(@POOL+80,1, 'Howling Fjord Ore Spawnpoint 81'),
+(@POOL+81,1, 'Howling Fjord Ore Spawnpoint 82'),
+(@POOL+82,1, 'Howling Fjord Ore Spawnpoint 83'),
+(@POOL+83,1, 'Howling Fjord Ore Spawnpoint 84'),
+(@POOL+84,1, 'Howling Fjord Ore Spawnpoint 85'),
+(@POOL+85,1, 'Howling Fjord Ore Spawnpoint 86'),
+(@POOL+86,1, 'Howling Fjord Ore Spawnpoint 87'),
+(@POOL+87,1, 'Howling Fjord Ore Spawnpoint 88'),
+(@POOL+88,1, 'Howling Fjord Ore Spawnpoint 89'),
+(@POOL+89,1, 'Howling Fjord Ore Spawnpoint 90'),
+(@POOL+90,1, 'Howling Fjord Ore Spawnpoint 91'),
+(@POOL+91,1, 'Howling Fjord Ore Spawnpoint 92'),
+(@POOL+92,1, 'Howling Fjord Ore Spawnpoint 93'),
+(@POOL+93,1, 'Howling Fjord Ore Spawnpoint 94'),
+(@POOL+94,1, 'Howling Fjord Ore Spawnpoint 95'),
+(@POOL+95,1, 'Howling Fjord Ore Spawnpoint 96'),
+(@POOL+96,1, 'Howling Fjord Ore Spawnpoint 97'),
+(@POOL+97,1, 'Howling Fjord Ore Spawnpoint 98'),
+(@POOL+98,1, 'Howling Fjord Ore Spawnpoint 99'),
+(@POOL+99,1, 'Howling Fjord Ore Spawnpoint 100');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Howling Fjord Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 61'),
+(@POOL+61,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 62'),
+(@POOL+62,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 63'),
+(@POOL+63,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 64'),
+(@POOL+64,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 65'),
+(@POOL+65,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 66'),
+(@POOL+66,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 67'),
+(@POOL+67,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 68'),
+(@POOL+68,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 69'),
+(@POOL+69,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 70'),
+(@POOL+70,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 71'),
+(@POOL+71,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 72'),
+(@POOL+72,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 73'),
+(@POOL+73,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 74'),
+(@POOL+74,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 75'),
+(@POOL+75,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 76'),
+(@POOL+76,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 77'),
+(@POOL+77,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 78'),
+(@POOL+78,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 79'),
+(@POOL+79,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 80'),
+(@POOL+80,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 81'),
+(@POOL+81,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 82'),
+(@POOL+82,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 83'),
+(@POOL+83,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 84'),
+(@POOL+84,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 85'),
+(@POOL+85,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 86'),
+(@POOL+86,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 87'),
+(@POOL+87,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 88'),
+(@POOL+88,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 89'),
+(@POOL+89,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 90'),
+(@POOL+90,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 91'),
+(@POOL+91,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 92'),
+(@POOL+92,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 93'),
+(@POOL+93,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 94'),
+(@POOL+94,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 95'),
+(@POOL+95,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 96'),
+(@POOL+96,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 97'),
+(@POOL+97,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 98'),
+(@POOL+98,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 99'),
+(@POOL+99,@MOTHER,0, 'Howling Fjord Ore Spawnpoint 100');
+
+-- ----------------------------------------
+-- -- Fixup ore spawns for Grizzly Hills --
+-- ----------------------------------------
+SET @RANGE := 100;
+SET @GUID1 := 160600;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @POOL := 10300;
+SET @LASTGUID := 60;
+SET @CHANCE1 := 90;
+SET @CHANCE2 := 100 - @CHANCE1;
+SET @MOTHER := 9902;
+SET @ACTIVE := 20; -- Max number of active spawns
+SET @TIMER := 600; -- Respawn timer in seconds
+-- Remove Ore spawns from Grizzly Hills
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < -1550 AND position_y > -2380 AND `position_x` < 4650 AND `position_x` > 3090;
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < -2380 AND position_y > -3160 AND `position_x` < 4560 AND `position_x` > 3090;
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < -3160 AND position_y > -5800 AND `position_x` < 4850 AND `position_x` > 3090;
+DELETE FROM gameobject WHERE id IN (189978,189979) AND map=571 AND position_y < -3604 AND position_y > -5800 AND `position_x` < 5470 AND `position_x` > 4850 AND `position_z` < 380;
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5181 AND 5216;
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5240 AND 5243;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5182 AND 5216;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5240 AND 5243;
+-- Colbalt Deposits Grizzly Hills
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1,189978,571,1,1,3092.010,-3250.750,239.4220,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189978,571,1,1,3245.520,-4263.030,346.3790,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189978,571,1,1,3278.070,-4631.530,274.2350,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189978,571,1,1,3297.320,-4432.250,323.8490,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189978,571,1,1,3304.730,-1804.230,85.4142,2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189978,571,1,1,3330.480,-4922.170,305.9250,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189978,571,1,1,3374.104,-4776.897,274.4394,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189978,571,1,1,3402.580,-1772.610,93.7937,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189978,571,1,1,3482.790,-3444.500,267.0810,0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189978,571,1,1,3504.310,-5246.790,179.1390,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189978,571,1,1,3505.110,-4140.870,264.1560,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189978,571,1,1,3523.270,-2664.510,104.2180,-2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189978,571,1,1,3543.850,-5054.890,234.0610,2.80997,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189978,571,1,1,3546.450,-1799.920,161.3730,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189978,571,1,1,3555.420,-3562.350,242.5690,0.19199,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189978,571,1,1,3562.720,-5167.090,179.5770,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189978,571,1,1,3593.700,-3737.760,231.2620,-3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189978,571,1,1,3634.340,-2647.850,137.6100,1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189978,571,1,1,3683.020,-1787.160,170.3800,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189978,571,1,1,3684.690,-2654.980,152.8360,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189978,571,1,1,3689.440,-5363.480,107.9370,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189978,571,1,1,3775.340,-3570.330,235.9720,2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189978,571,1,1,3776.570,-2395.590,173.3690,-0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189978,571,1,1,3779.940,-3770.120,179.4740,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189978,571,1,1,3806.770,-3351.670,282.0970,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189978,571,1,1,3808.300,-1743.320,203.5550,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189978,571,1,1,3819.070,-2721.720,200.3380,-0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189978,571,1,1,3823.790,-1846.020,215.9370,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189978,571,1,1,3887.610,-3704.440,173.5850,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189978,571,1,1,3892.340,-5151.140,73.8241,-1.53589,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189978,571,1,1,3931.060,-1655.190,190.6440,1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189978,571,1,3,3932.550,-3970.730,174.8070,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189978,571,1,1,3943.470,-1843.410,217.4480,2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189978,571,1,1,4101.430,-2955.460,270.9040,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189978,571,1,1,4109.900,-2432.630,221.0930,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189978,571,1,1,4128.130,-3959.530,160.6620,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189978,571,1,1,4151.420,-4614.510,144.2710,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189978,571,1,1,4152.130,-1891.690,187.4210,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189978,571,1,1,4172.300,-3685.310,186.9110,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189978,571,1,1,4196.390,-1995.750,211.0920,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189978,571,1,1,4208.140,-3133.170,282.3300,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189978,571,1,1,4220.520,-3803.550,185.4780,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189978,571,1,1,4303.788,-4978.636,23.5756,2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189978,571,1,1,4408.610,-2408.180,228.9980,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189978,571,1,1,4448.330,-4800.280,40.7411,-2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189978,571,1,1,4560.060,-2319.040,181.0760,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189978,571,1,1,4560.340,-4972.120,48.4352,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189978,571,1,1,4584.810,-4561.060,196.2030,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189978,571,1,1,4585.620,-3743.730,233.2730,-1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189978,571,1,1,4641.260,-3944.710,249.8200,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189978,571,1,1,4731.170,-3974.150,202.9880,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189978,571,1,1,4734.590,-4548.180,206.8140,-0.36652,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189978,571,1,1,4774.960,-4882.750,58.8890,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189978,571,1,1,4782.520,-3895.370,187.3920,2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189978,571,1,1,4823.120,-3888.860,183.0190,2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189978,571,1,1,4830.860,-4477.090,200.1495,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189978,571,1,1,4882.170,-4206.040,253.2890,-0.19199,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189978,571,1,1,4934.329,-4555.055,220.0529,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189978,571,1,1,4956.457,-4666.764,214.5148,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189978,571,1,1,5018.210,-4794.480,217.7570,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189978,571,1,1,5060.030,-4828.330,212.2340,0.85521,0,0,0,1,@TIMER,255,1);
+-- Rich Colbalt Deposits Grizzly Hills
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID2,189979,571,1,1,3092.010,-3250.750,239.4220,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189979,571,1,1,3245.520,-4263.030,346.3790,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189979,571,1,1,3278.070,-4631.530,274.2350,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189979,571,1,1,3297.320,-4432.250,323.8490,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189979,571,1,1,3304.730,-1804.230,85.4142,2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189979,571,1,1,3330.480,-4922.170,305.9250,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189979,571,1,1,3374.104,-4776.897,274.4394,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189979,571,1,1,3402.580,-1772.610,93.7937,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189979,571,1,1,3482.790,-3444.500,267.0810,0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189979,571,1,1,3504.310,-5246.790,179.1390,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189979,571,1,1,3505.110,-4140.870,264.1560,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189979,571,1,1,3523.270,-2664.510,104.2180,-2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189979,571,1,1,3543.850,-5054.890,234.0610,2.80997,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189979,571,1,1,3546.450,-1799.920,161.3730,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189979,571,1,1,3555.420,-3562.350,242.5690,0.19199,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189979,571,1,1,3562.720,-5167.090,179.5770,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189979,571,1,1,3593.700,-3737.760,231.2620,-3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189979,571,1,1,3634.340,-2647.850,137.6100,1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189979,571,1,1,3683.020,-1787.160,170.3800,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189979,571,1,1,3684.690,-2654.980,152.8360,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189979,571,1,1,3689.440,-5363.480,107.9370,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189979,571,1,1,3775.340,-3570.330,235.9720,2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189979,571,1,1,3776.570,-2395.590,173.3690,-0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID2+23,189979,571,1,1,3779.940,-3770.120,179.4740,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189979,571,1,1,3806.770,-3351.670,282.0970,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189979,571,1,1,3808.300,-1743.320,203.5550,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189979,571,1,1,3819.070,-2721.720,200.3380,-0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189979,571,1,1,3823.790,-1846.020,215.9370,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189979,571,1,1,3887.610,-3704.440,173.5850,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189979,571,1,1,3892.340,-5151.140,73.8241,-1.53589,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189979,571,1,1,3931.060,-1655.190,190.6440,1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189979,571,1,3,3932.550,-3970.730,174.8070,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189979,571,1,1,3943.470,-1843.410,217.4480,2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189979,571,1,1,4101.430,-2955.460,270.9040,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189979,571,1,1,4109.900,-2432.630,221.0930,3.14159,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189979,571,1,1,4128.130,-3959.530,160.6620,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189979,571,1,1,4151.420,-4614.510,144.2710,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189979,571,1,1,4152.130,-1891.690,187.4210,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189979,571,1,1,4172.300,-3685.310,186.9110,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189979,571,1,1,4196.390,-1995.750,211.0920,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189979,571,1,1,4208.140,-3133.170,282.3300,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189979,571,1,1,4220.520,-3803.550,185.4780,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189979,571,1,1,4303.788,-4978.636,23.5756,2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189979,571,1,1,4408.610,-2408.180,228.9980,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189979,571,1,1,4448.330,-4800.280,40.7411,-2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189979,571,1,1,4560.060,-2319.040,181.0760,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189979,571,1,1,4560.340,-4972.120,48.4352,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID2+47,189979,571,1,1,4584.810,-4561.060,196.2030,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID2+48,189979,571,1,1,4585.620,-3743.730,233.2730,-1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189979,571,1,1,4641.260,-3944.710,249.8200,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189979,571,1,1,4731.170,-3974.150,202.9880,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189979,571,1,1,4734.590,-4548.180,206.8140,-0.36652,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189979,571,1,1,4774.960,-4882.750,58.8890,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189979,571,1,1,4782.520,-3895.370,187.3920,2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189979,571,1,1,4823.120,-3888.860,183.0190,2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189979,571,1,1,4830.860,-4477.090,200.1495,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189979,571,1,1,4882.170,-4206.040,253.2890,-0.19199,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189979,571,1,1,4934.329,-4555.055,220.0529,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189979,571,1,1,4956.457,-4666.764,214.5148,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189979,571,1,1,5018.210,-4794.480,217.7570,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189979,571,1,1,5060.030,-4828.330,212.2340,0.85521,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@LASTGUID;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 1 Cobalt'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 1 Rich Cobalt'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 2 Cobalt'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 2 Rich Cobalt'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 3 Cobalt'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 3 Rich Cobalt'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 4 Cobalt'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 4 Rich Cobalt'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 5 Cobalt'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 5 Rich Cobalt'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 6 Cobalt'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 6 Rich Cobalt'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 7 Cobalt'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 7 Rich Cobalt'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 8 Cobalt'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 8 Rich Cobalt'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 9 Cobalt'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 9 Rich Cobalt'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 10 Cobalt'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 10 Rich Cobalt'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 11 Cobalt'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 11 Rich Cobalt'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 12 Cobalt'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 12 Rich Cobalt'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 13 Cobalt'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 13 Rich Cobalt'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 14 Cobalt'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 14 Rich Cobalt'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 15 Cobalt'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 15 Rich Cobalt'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 16 Cobalt'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 16 Rich Cobalt'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 17 Cobalt'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 17 Rich Cobalt'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 18 Cobalt'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 18 Rich Cobalt'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 19 Cobalt'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 19 Rich Cobalt'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 20 Cobalt'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 20 Rich Cobalt'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 21 Cobalt'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 21 Rich Cobalt'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 22 Cobalt'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 22 Rich Cobalt'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 23 Cobalt'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 23 Rich Cobalt'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 24 Cobalt'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 24 Rich Cobalt'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 25 Cobalt'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 25 Rich Cobalt'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 26 Cobalt'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 26 Rich Cobalt'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 27 Cobalt'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 27 Rich Cobalt'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 28 Cobalt'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 28 Rich Cobalt'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 29 Cobalt'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 29 Rich Cobalt'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 30 Cobalt'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 30 Rich Cobalt'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 31 Cobalt'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 31 Rich Cobalt'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 32 Cobalt'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 32 Rich Cobalt'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 33 Cobalt'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 33 Rich Cobalt'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 34 Cobalt'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 34 Rich Cobalt'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 35 Cobalt'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 35 Rich Cobalt'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 36 Cobalt'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 36 Rich Cobalt'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 37 Cobalt'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 37 Rich Cobalt'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 38 Cobalt'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 38 Rich Cobalt'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 39 Cobalt'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 39 Rich Cobalt'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 40 Cobalt'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 40 Rich Cobalt'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 41 Cobalt'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 41 Rich Cobalt'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 42 Cobalt'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 42 Rich Cobalt'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 43 Cobalt'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 43 Rich Cobalt'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 44 Cobalt'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 44 Rich Cobalt'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 45 Cobalt'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 45 Rich Cobalt'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 46 Cobalt'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 46 Rich Cobalt'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 47 Cobalt'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 47 Rich Cobalt'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 48 Cobalt'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 48 Rich Cobalt'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 49 Cobalt'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 49 Rich Cobalt'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 50 Cobalt'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 50 Rich Cobalt'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 51 Cobalt'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 51 Rich Cobalt'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 52 Cobalt'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 52 Rich Cobalt'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 53 Cobalt'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 53 Rich Cobalt'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 54 Cobalt'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 54 Rich Cobalt'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 55 Cobalt'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 55 Rich Cobalt'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 56 Cobalt'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 56 Rich Cobalt'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 57 Cobalt'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 57 Rich Cobalt'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 58 Cobalt'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 58 Rich Cobalt'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 59 Cobalt'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 59 Rich Cobalt'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 60 Cobalt'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 60 Rich Cobalt'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Grizzly Hills Ore Spawnpoint 61 Cobalt'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Grizzly Hills Ore Spawnpoint 61 Rich Cobalt');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Grizzly Hills Ore Spawnpoint 1'),
+(@POOL+1,1, 'Grizzly Hills Ore Spawnpoint 2'),
+(@POOL+2,1, 'Grizzly Hills Ore Spawnpoint 3'),
+(@POOL+3,1, 'Grizzly Hills Ore Spawnpoint 4'),
+(@POOL+4,1, 'Grizzly Hills Ore Spawnpoint 5'),
+(@POOL+5,1, 'Grizzly Hills Ore Spawnpoint 6'),
+(@POOL+6,1, 'Grizzly Hills Ore Spawnpoint 7'),
+(@POOL+7,1, 'Grizzly Hills Ore Spawnpoint 8'),
+(@POOL+8,1, 'Grizzly Hills Ore Spawnpoint 9'),
+(@POOL+9,1, 'Grizzly Hills Ore Spawnpoint 10'),
+(@POOL+10,1, 'Grizzly Hills Ore Spawnpoint 11'),
+(@POOL+11,1, 'Grizzly Hills Ore Spawnpoint 12'),
+(@POOL+12,1, 'Grizzly Hills Ore Spawnpoint 13'),
+(@POOL+13,1, 'Grizzly Hills Ore Spawnpoint 14'),
+(@POOL+14,1, 'Grizzly Hills Ore Spawnpoint 15'),
+(@POOL+15,1, 'Grizzly Hills Ore Spawnpoint 16'),
+(@POOL+16,1, 'Grizzly Hills Ore Spawnpoint 17'),
+(@POOL+17,1, 'Grizzly Hills Ore Spawnpoint 18'),
+(@POOL+18,1, 'Grizzly Hills Ore Spawnpoint 19'),
+(@POOL+19,1, 'Grizzly Hills Ore Spawnpoint 20'),
+(@POOL+20,1, 'Grizzly Hills Ore Spawnpoint 21'),
+(@POOL+21,1, 'Grizzly Hills Ore Spawnpoint 22'),
+(@POOL+22,1, 'Grizzly Hills Ore Spawnpoint 23'),
+(@POOL+23,1, 'Grizzly Hills Ore Spawnpoint 24'),
+(@POOL+24,1, 'Grizzly Hills Ore Spawnpoint 25'),
+(@POOL+25,1, 'Grizzly Hills Ore Spawnpoint 26'),
+(@POOL+26,1, 'Grizzly Hills Ore Spawnpoint 27'),
+(@POOL+27,1, 'Grizzly Hills Ore Spawnpoint 28'),
+(@POOL+28,1, 'Grizzly Hills Ore Spawnpoint 29'),
+(@POOL+29,1, 'Grizzly Hills Ore Spawnpoint 30'),
+(@POOL+30,1, 'Grizzly Hills Ore Spawnpoint 31'),
+(@POOL+31,1, 'Grizzly Hills Ore Spawnpoint 32'),
+(@POOL+32,1, 'Grizzly Hills Ore Spawnpoint 33'),
+(@POOL+33,1, 'Grizzly Hills Ore Spawnpoint 34'),
+(@POOL+34,1, 'Grizzly Hills Ore Spawnpoint 35'),
+(@POOL+35,1, 'Grizzly Hills Ore Spawnpoint 36'),
+(@POOL+36,1, 'Grizzly Hills Ore Spawnpoint 37'),
+(@POOL+37,1, 'Grizzly Hills Ore Spawnpoint 38'),
+(@POOL+38,1, 'Grizzly Hills Ore Spawnpoint 39'),
+(@POOL+39,1, 'Grizzly Hills Ore Spawnpoint 40'),
+(@POOL+40,1, 'Grizzly Hills Ore Spawnpoint 41'),
+(@POOL+41,1, 'Grizzly Hills Ore Spawnpoint 42'),
+(@POOL+42,1, 'Grizzly Hills Ore Spawnpoint 43'),
+(@POOL+43,1, 'Grizzly Hills Ore Spawnpoint 44'),
+(@POOL+44,1, 'Grizzly Hills Ore Spawnpoint 45'),
+(@POOL+45,1, 'Grizzly Hills Ore Spawnpoint 46'),
+(@POOL+46,1, 'Grizzly Hills Ore Spawnpoint 47'),
+(@POOL+47,1, 'Grizzly Hills Ore Spawnpoint 48'),
+(@POOL+48,1, 'Grizzly Hills Ore Spawnpoint 49'),
+(@POOL+49,1, 'Grizzly Hills Ore Spawnpoint 50'),
+(@POOL+50,1, 'Grizzly Hills Ore Spawnpoint 51'),
+(@POOL+51,1, 'Grizzly Hills Ore Spawnpoint 52'),
+(@POOL+52,1, 'Grizzly Hills Ore Spawnpoint 53'),
+(@POOL+53,1, 'Grizzly Hills Ore Spawnpoint 54'),
+(@POOL+54,1, 'Grizzly Hills Ore Spawnpoint 55'),
+(@POOL+55,1, 'Grizzly Hills Ore Spawnpoint 56'),
+(@POOL+56,1, 'Grizzly Hills Ore Spawnpoint 57'),
+(@POOL+57,1, 'Grizzly Hills Ore Spawnpoint 58'),
+(@POOL+58,1, 'Grizzly Hills Ore Spawnpoint 59'),
+(@POOL+59,1, 'Grizzly Hills Ore Spawnpoint 60'),
+(@POOL+60,1, 'Grizzly Hills Ore Spawnpoint 61');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Grizzly Hills Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Grizzly Hills Ore Spawnpoint 61');
+
+-- -----------------------------------
+-- -- Fixup ore spawns for Zul'Drak --
+-- -----------------------------------
+SET @RANGE := 150;
+SET @GUID1 := 161100;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @POOL := 10650;
+SET @LASTGUID := 92;
+SET @CHANCE1 := 90;
+SET @CHANCE2 := 100 - @CHANCE1;
+SET @MOTHER := 9904;
+SET @ACTIVE := 30; -- Max number of active spawns
+SET @TIMER := 900; -- Respawn timer in seconds
+-- Remove existing Colbalt, Rich Colbalt, & Saronite Deposits from Zul''Drak
+DELETE FROM gameobject WHERE id IN (189978,189979,189980) AND map=571 AND position_y < -1100 AND position_y > -3605 AND `position_x` > 4850 AND `position_x` < 6516 ORDER BY position_x;
+DELETE FROM gameobject WHERE id IN (189978,189979,189980) AND map=571 AND position_y < -3605 AND position_y > -5500 AND `position_x` > 5100 AND `position_x` < 7000 ORDER BY position_x;
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5256 AND 5276;
+-- Colbalt Deposits Zul'Drak
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1,189978,571,1,1,4859.570,-2766.920,293.1760,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189978,571,1,1,4862.150,-3603.410,307.0340,1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189978,571,1,1,4865.680,-2458.640,213.6510,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189978,571,1,1,4914.590,-1231.760,174.7320,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189978,571,1,1,4930.794,-2900.828,290.6294,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189978,571,1,1,4988.300,-3547.630,289.5220,3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189978,571,1,1,5034.149,-3107.575,281.8192,-2.94960,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189978,571,1,1,5068.390,-1175.990,260.7850,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189978,571,1,1,5086.030,-1155.550,265.3410,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189978,571,1,1,5090.210,-1197.570,267.1280,-2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189978,571,1,1,5104.010,-1243.180,252.9670,2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189978,571,1,1,5107.330,-1267.570,262.3820,2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189978,571,1,1,5118.357,-2138.430,241.0557,2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189978,571,1,1,5124.540,-2863.140,292.8380,-0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189978,571,1,1,5126.980,-1597.360,236.5620,-3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189978,571,1,1,5131.699,-2155.166,239.0023,0.99484,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189978,571,1,1,5131.740,-1276.760,248.3140,3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189978,571,1,1,5138.820,-1427.070,246.8070,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189978,571,1,1,5174.090,-1159.020,257.8510,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189978,571,1,1,5179.080,-3316.920,283.7740,-0.90757,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189978,571,1,1,5179.630,-3603.580,295.8630,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189978,571,1,1,5193.190,-3341.850,289.4360,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189978,571,1,1,5213.890,-3377.160,290.4010,1.81514,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189978,571,1,1,5239.606,-2370.833,286.3241,0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189978,571,1,1,5251.932,-2361.378,286.3510,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189978,571,1,1,5272.223,-1614.815,231.3021,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189978,571,1,1,5309.277,-3209.399,282.3378,-0.57596,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189978,571,1,1,5309.970,-2060.150,241.4680,1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189978,571,1,1,5311.820,-3125.220,280.9130,2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189978,571,1,1,5311.940,-1202.480,246.5990,-1.16937,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189978,571,1,1,5319.037,-4535.752,415.2371,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189978,571,1,1,5341.113,-1305.672,238.4332,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189978,571,1,1,5355.556,-2016.313,235.9245,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189978,571,1,1,5364.510,-2058.915,242.2356,2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189978,571,1,1,5368.401,-3257.874,290.5284,1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189978,571,1,1,5374.420,-1755.010,240.0630,2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189978,571,1,1,5380.200,-2170.010,237.1360,-1.32645,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189978,571,1,1,5384.130,-1101.800,185.3190,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189978,571,1,1,5402.130,-1898.590,237.1590,1.74533,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189978,571,1,1,5403.180,-2268.070,243.9030,2.40855,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189978,571,1,1,5410.570,-2534.090,292.4060,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189978,571,1,1,5512.260,-1314.160,238.3930,-0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189978,571,1,1,5517.676,-2101.106,239.9783,-0.71558,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189978,571,1,1,5517.870,-1276.300,239.4080,2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189978,571,1,1,5546.540,-1721.970,243.6690,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189978,571,1,1,5557.930,-2331.110,287.8600,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189978,571,1,1,5566.940,-1860.930,235.2660,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189978,571,1,1,5673.484,-3554.344,373.4818,0.71558,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189978,571,1,1,5697.810,-2317.470,288.6290,1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189978,571,1,1,5711.410,-3665.910,372.2200,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189978,571,1,1,5714.953,-2415.053,288.1849,2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189978,571,1,1,5775.913,-3235.525,362.1545,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189978,571,1,1,5840.190,-2309.730,288.2010,-1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189978,571,1,1,5915.270,-1263.340,261.5160,-2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189978,571,1,1,5953.860,-2800.040,270.2110,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189978,571,1,1,5966.880,-4236.390,358.4940,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189978,571,1,1,5970.190,-2870.240,287.2890,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189978,571,1,1,5971.868,-3366.344,363.9691,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189978,571,1,1,5972.123,-3234.955,361.8635,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189978,571,1,1,5990.524,-4156.240,377.7000,1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189978,571,1,1,6033.010,-4086.710,355.1950,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+61,189978,571,1,1,6051.720,-1285.410,503.8380,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+62,189978,571,1,1,6055.426,-4338.665,378.8201,2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID1+63,189978,571,1,1,6073.873,-2672.150,293.3498,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+64,189978,571,1,1,6085.920,-1623.470,273.3960,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID1+65,189978,571,1,1,6093.193,-4243.174,319.0197,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID1+66,189978,571,1,1,6106.116,-4426.526,366.1528,-0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID1+67,189978,571,1,1,6131.640,-2383.840,301.0840,-0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID1+68,189978,571,1,1,6171.825,-3366.969,363.1176,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID1+69,189978,571,1,1,6176.548,-3235.763,362.9467,2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID1+70,189978,571,1,1,6217.740,-2238.070,238.7050,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID1+71,189978,571,1,1,6265.880,-2931.170,307.0120,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+72,189978,571,1,1,6278.610,-2746.580,303.1850,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+73,189978,571,1,1,6280.100,-2592.430,302.3720,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+74,189978,571,1,1,6286.331,-2263.173,237.8203,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+75,189978,571,1,1,6286.910,-2671.790,304.4130,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+76,189978,571,1,1,6331.420,-2977.620,339.6420,1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID1+77,189978,571,1,1,6365.950,-2193.240,272.6010,-0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID1+78,189978,571,1,1,6436.630,-3241.960,405.8750,-1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID1+79,189978,571,1,1,6439.040,-3330.390,404.9060,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+80,189978,571,1,1,6462.370,-3474.220,388.9030,-0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID1+81,189978,571,1,1,6512.855,-4255.316,463.8195,-0.29671,0,0,0,1,@TIMER,255,1),
+(@GUID1+82,189978,571,1,1,6515.427,-3485.970,389.0715,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID1+83,189978,571,1,1,6537.952,-4141.421,467.0403,-0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID1+84,189978,571,1,1,6564.480,-4107.550,464.1680,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID1+85,189978,571,1,1,6572.520,-4193.380,468.7800,-1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID1+86,189978,571,1,1,6579.668,-4053.245,487.2758,-1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID1+87,189978,571,1,1,6700.080,-4231.600,461.2990,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+88,189978,571,1,1,6779.470,-4100.770,470.9730,-3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID1+89,189978,571,1,1,6792.440,-4281.660,452.8340,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID1+90,189978,571,1,1,6818.135,-4627.391,442.2250,1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID1+91,189978,571,1,1,6845.492,-4442.293,444.4835,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID1+92,189978,571,1,1,6914.570,-4477.570,444.9130,1.55334,0,0,0,1,@TIMER,255,1);
+-- Rich Colbalt & Saronite Deposits Zul'Drak
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID2,189979,571,1,1,4859.570,-2766.920,293.1760,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189979,571,1,1,4862.150,-3603.410,307.0340,1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189979,571,1,1,4865.680,-2458.640,213.6510,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189979,571,1,1,4914.590,-1231.760,174.7320,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189979,571,1,1,4930.794,-2900.828,290.6294,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189979,571,1,1,4988.300,-3547.630,289.5220,3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189979,571,1,1,5034.149,-3107.575,281.8192,-2.94960,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189979,571,1,1,5068.390,-1175.990,260.7850,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189979,571,1,1,5086.030,-1155.550,265.3410,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189979,571,1,1,5090.210,-1197.570,267.1280,-2.60053,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189979,571,1,1,5104.010,-1243.180,252.9670,2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189979,571,1,1,5107.330,-1267.570,262.3820,2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189979,571,1,1,5118.357,-2138.430,241.0557,2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189979,571,1,1,5124.540,-2863.140,292.8380,-0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189979,571,1,1,5126.980,-1597.360,236.5620,-3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189979,571,1,1,5131.699,-2155.166,239.0023,0.99484,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189979,571,1,1,5131.740,-1276.760,248.3140,3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189979,571,1,1,5138.820,-1427.070,246.8070,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189979,571,1,1,5174.090,-1159.020,257.8510,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189979,571,1,1,5179.080,-3316.920,283.7740,-0.90757,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189979,571,1,1,5179.630,-3603.580,295.8630,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189979,571,1,1,5193.190,-3341.850,289.4360,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189980,571,1,1,5213.890,-3377.160,290.4010,1.81514,0,0,0,1,@TIMER,255,1), -- Saronite
+(@GUID2+23,189979,571,1,1,5239.606,-2370.833,286.3241,0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189979,571,1,1,5251.932,-2361.378,286.3510,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189979,571,1,1,5272.223,-1614.815,231.3021,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189979,571,1,1,5309.277,-3209.399,282.3378,-0.57596,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189979,571,1,1,5309.970,-2060.150,241.4680,1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189979,571,1,1,5311.820,-3125.220,280.9130,2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189979,571,1,1,5311.940,-1202.480,246.5990,-1.16937,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189979,571,1,1,5319.037,-4535.752,415.2371,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189979,571,1,1,5341.113,-1305.672,238.4332,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189979,571,1,1,5355.556,-2016.313,235.9245,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189979,571,1,1,5364.510,-2058.915,242.2356,2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189979,571,1,1,5368.401,-3257.874,290.5284,1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189979,571,1,1,5374.420,-1755.010,240.0630,2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189979,571,1,1,5380.200,-2170.010,237.1360,-1.32645,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189979,571,1,1,5384.130,-1101.800,185.3190,2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189979,571,1,1,5402.130,-1898.590,237.1590,1.74533,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189979,571,1,1,5403.180,-2268.070,243.9030,2.40855,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189979,571,1,1,5410.570,-2534.090,292.4060,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189979,571,1,1,5512.260,-1314.160,238.3930,-0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189979,571,1,1,5517.676,-2101.106,239.9783,-0.71558,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189979,571,1,1,5517.870,-1276.300,239.4080,2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189979,571,1,1,5546.540,-1721.970,243.6690,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189979,571,1,1,5557.930,-2331.110,287.8600,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189980,571,1,1,5566.940,-1860.930,235.2660,-1.79769,0,0,0,1,@TIMER,255,1), -- Saronite
+(@GUID2+47,189980,571,1,1,5673.484,-3554.344,373.4818,0.71558,0,0,0,1,@TIMER,255,1), -- Saronite
+(@GUID2+48,189979,571,1,1,5697.810,-2317.470,288.6290,1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189979,571,1,1,5711.410,-3665.910,372.2200,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189979,571,1,1,5714.953,-2415.053,288.1849,2.16421,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189979,571,1,1,5775.913,-3235.525,362.1545,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189979,571,1,1,5840.190,-2309.730,288.2010,-1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189979,571,1,1,5915.270,-1263.340,261.5160,-2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189979,571,1,1,5953.860,-2800.040,270.2110,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189979,571,1,1,5966.880,-4236.390,358.4940,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189979,571,1,1,5970.190,-2870.240,287.2890,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189979,571,1,1,5971.868,-3366.344,363.9691,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189979,571,1,1,5972.123,-3234.955,361.8635,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189979,571,1,1,5990.524,-4156.240,377.7000,1.72787,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189979,571,1,1,6033.010,-4086.710,355.1950,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+61,189979,571,1,1,6051.720,-1285.410,503.8380,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+62,189980,571,1,1,6055.426,-4338.665,378.8201,2.60054,0,0,0,1,@TIMER,255,1), -- Saronite
+(@GUID2+63,189979,571,1,1,6073.873,-2672.150,293.3498,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+64,189979,571,1,1,6085.920,-1623.470,273.3960,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID2+65,189979,571,1,1,6093.193,-4243.174,319.0197,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID2+66,189979,571,1,1,6106.116,-4426.526,366.1528,-0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID2+67,189979,571,1,1,6131.640,-2383.840,301.0840,-0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID2+68,189979,571,1,1,6171.825,-3366.969,363.1176,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID2+69,189979,571,1,1,6176.548,-3235.763,362.9467,2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID2+70,189979,571,1,1,6217.740,-2238.070,238.7050,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID2+71,189980,571,1,1,6265.880,-2931.170,307.0120,0.76794,0,0,0,1,@TIMER,255,1), -- Saronite
+(@GUID2+72,189979,571,1,1,6278.610,-2746.580,303.1850,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+73,189979,571,1,1,6280.100,-2592.430,302.3720,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+74,189980,571,1,1,6286.331,-2263.173,237.8203,-2.37364,0,0,0,1,@TIMER,255,1), -- Saronite
+(@GUID2+75,189979,571,1,1,6286.910,-2671.790,304.4130,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+76,189979,571,1,1,6331.420,-2977.620,339.6420,1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID2+77,189979,571,1,1,6365.950,-2193.240,272.6010,-0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID2+78,189979,571,1,1,6436.630,-3241.960,405.8750,-1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID2+79,189979,571,1,1,6439.040,-3330.390,404.9060,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+80,189979,571,1,1,6462.370,-3474.220,388.9030,-0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID2+81,189979,571,1,1,6512.855,-4255.316,463.8195,-0.29671,0,0,0,1,@TIMER,255,1),
+(@GUID2+82,189979,571,1,1,6515.427,-3485.970,389.0715,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID2+83,189979,571,1,1,6537.952,-4141.421,467.0403,-0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID2+84,189979,571,1,1,6564.480,-4107.550,464.1680,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID2+85,189979,571,1,1,6572.520,-4193.380,468.7800,-1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID2+86,189979,571,1,1,6579.668,-4053.245,487.2758,-1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID2+87,189979,571,1,1,6700.080,-4231.600,461.2990,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+88,189979,571,1,1,6779.470,-4100.770,470.9730,-3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID2+89,189979,571,1,1,6792.440,-4281.660,452.8340,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID2+90,189979,571,1,1,6818.135,-4627.391,442.2250,1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID2+91,189979,571,1,1,6845.492,-4442.293,444.4835,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID2+92,189979,571,1,1,6914.570,-4477.570,444.9130,1.55334,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@LASTGUID;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Zul''Drak Ore Spawnpoint 1 Cobalt'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Zul''Drak Ore Spawnpoint 1 Rich Cobalt'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Zul''Drak Ore Spawnpoint 2 Cobalt'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Zul''Drak Ore Spawnpoint 2 Rich Cobalt'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Zul''Drak Ore Spawnpoint 3 Cobalt'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Zul''Drak Ore Spawnpoint 3 Rich Cobalt'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Zul''Drak Ore Spawnpoint 4 Cobalt'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Zul''Drak Ore Spawnpoint 4 Rich Cobalt'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Zul''Drak Ore Spawnpoint 5 Cobalt'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Zul''Drak Ore Spawnpoint 5 Rich Cobalt'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Zul''Drak Ore Spawnpoint 6 Cobalt'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Zul''Drak Ore Spawnpoint 6 Rich Cobalt'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Zul''Drak Ore Spawnpoint 7 Cobalt'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Zul''Drak Ore Spawnpoint 7 Rich Cobalt'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Zul''Drak Ore Spawnpoint 8 Cobalt'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Zul''Drak Ore Spawnpoint 8 Rich Cobalt'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Zul''Drak Ore Spawnpoint 9 Cobalt'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Zul''Drak Ore Spawnpoint 9 Rich Cobalt'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Zul''Drak Ore Spawnpoint 10 Cobalt'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Zul''Drak Ore Spawnpoint 10 Rich Cobalt'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Zul''Drak Ore Spawnpoint 11 Cobalt'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Zul''Drak Ore Spawnpoint 11 Rich Cobalt'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Zul''Drak Ore Spawnpoint 12 Cobalt'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Zul''Drak Ore Spawnpoint 12 Rich Cobalt'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Zul''Drak Ore Spawnpoint 13 Cobalt'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Zul''Drak Ore Spawnpoint 13 Rich Cobalt'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Zul''Drak Ore Spawnpoint 14 Cobalt'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Zul''Drak Ore Spawnpoint 14 Rich Cobalt'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Zul''Drak Ore Spawnpoint 15 Cobalt'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Zul''Drak Ore Spawnpoint 15 Rich Cobalt'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Zul''Drak Ore Spawnpoint 16 Cobalt'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Zul''Drak Ore Spawnpoint 16 Rich Cobalt'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Zul''Drak Ore Spawnpoint 17 Cobalt'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Zul''Drak Ore Spawnpoint 17 Rich Cobalt'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Zul''Drak Ore Spawnpoint 18 Cobalt'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Zul''Drak Ore Spawnpoint 18 Rich Cobalt'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Zul''Drak Ore Spawnpoint 19 Cobalt'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Zul''Drak Ore Spawnpoint 19 Rich Cobalt'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Zul''Drak Ore Spawnpoint 20 Cobalt'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Zul''Drak Ore Spawnpoint 20 Rich Cobalt'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Zul''Drak Ore Spawnpoint 21 Cobalt'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Zul''Drak Ore Spawnpoint 21 Rich Cobalt'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Zul''Drak Ore Spawnpoint 22 Cobalt'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Zul''Drak Ore Spawnpoint 22 Rich Cobalt'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Zul''Drak Ore Spawnpoint 23 Cobalt'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Zul''Drak Ore Spawnpoint 23 Saronite'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Zul''Drak Ore Spawnpoint 24 Cobalt'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Zul''Drak Ore Spawnpoint 24 Rich Cobalt'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Zul''Drak Ore Spawnpoint 25 Cobalt'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Zul''Drak Ore Spawnpoint 25 Rich Cobalt'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Zul''Drak Ore Spawnpoint 26 Cobalt'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Zul''Drak Ore Spawnpoint 26 Rich Cobalt'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Zul''Drak Ore Spawnpoint 27 Cobalt'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Zul''Drak Ore Spawnpoint 27 Rich Cobalt'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Zul''Drak Ore Spawnpoint 28 Cobalt'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Zul''Drak Ore Spawnpoint 28 Rich Cobalt'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Zul''Drak Ore Spawnpoint 29 Cobalt'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Zul''Drak Ore Spawnpoint 29 Rich Cobalt'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Zul''Drak Ore Spawnpoint 30 Cobalt'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Zul''Drak Ore Spawnpoint 30 Rich Cobalt'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Zul''Drak Ore Spawnpoint 31 Cobalt'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Zul''Drak Ore Spawnpoint 31 Rich Cobalt'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Zul''Drak Ore Spawnpoint 32 Cobalt'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Zul''Drak Ore Spawnpoint 32 Rich Cobalt'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Zul''Drak Ore Spawnpoint 33 Cobalt'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Zul''Drak Ore Spawnpoint 33 Rich Cobalt'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Zul''Drak Ore Spawnpoint 34 Cobalt'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Zul''Drak Ore Spawnpoint 34 Rich Cobalt'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Zul''Drak Ore Spawnpoint 35 Cobalt'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Zul''Drak Ore Spawnpoint 35 Rich Cobalt'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Zul''Drak Ore Spawnpoint 36 Cobalt'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Zul''Drak Ore Spawnpoint 36 Rich Cobalt'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Zul''Drak Ore Spawnpoint 37 Cobalt'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Zul''Drak Ore Spawnpoint 37 Rich Cobalt'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Zul''Drak Ore Spawnpoint 38 Cobalt'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Zul''Drak Ore Spawnpoint 38 Rich Cobalt'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Zul''Drak Ore Spawnpoint 39 Cobalt'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Zul''Drak Ore Spawnpoint 39 Rich Cobalt'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Zul''Drak Ore Spawnpoint 40 Cobalt'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Zul''Drak Ore Spawnpoint 40 Rich Cobalt'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Zul''Drak Ore Spawnpoint 41 Cobalt'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Zul''Drak Ore Spawnpoint 41 Rich Cobalt'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Zul''Drak Ore Spawnpoint 42 Cobalt'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Zul''Drak Ore Spawnpoint 42 Rich Cobalt'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Zul''Drak Ore Spawnpoint 43 Cobalt'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Zul''Drak Ore Spawnpoint 43 Rich Cobalt'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Zul''Drak Ore Spawnpoint 44 Cobalt'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Zul''Drak Ore Spawnpoint 44 Rich Cobalt'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Zul''Drak Ore Spawnpoint 45 Cobalt'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Zul''Drak Ore Spawnpoint 45 Rich Cobalt'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Zul''Drak Ore Spawnpoint 46 Cobalt'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Zul''Drak Ore Spawnpoint 46 Rich Cobalt'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Zul''Drak Ore Spawnpoint 47 Cobalt'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Zul''Drak Ore Spawnpoint 47 Saronite'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Zul''Drak Ore Spawnpoint 48 Cobalt'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Zul''Drak Ore Spawnpoint 48 Saronite'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Zul''Drak Ore Spawnpoint 49 Cobalt'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Zul''Drak Ore Spawnpoint 49 Rich Cobalt'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Zul''Drak Ore Spawnpoint 50 Cobalt'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Zul''Drak Ore Spawnpoint 50 Rich Cobalt'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Zul''Drak Ore Spawnpoint 51 Cobalt'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Zul''Drak Ore Spawnpoint 51 Rich Cobalt'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Zul''Drak Ore Spawnpoint 52 Cobalt'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Zul''Drak Ore Spawnpoint 52 Rich Cobalt'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Zul''Drak Ore Spawnpoint 53 Cobalt'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Zul''Drak Ore Spawnpoint 53 Rich Cobalt'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Zul''Drak Ore Spawnpoint 54 Cobalt'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Zul''Drak Ore Spawnpoint 54 Rich Cobalt'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Zul''Drak Ore Spawnpoint 55 Cobalt'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Zul''Drak Ore Spawnpoint 55 Rich Cobalt'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Zul''Drak Ore Spawnpoint 56 Cobalt'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Zul''Drak Ore Spawnpoint 56 Rich Cobalt'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Zul''Drak Ore Spawnpoint 57 Cobalt'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Zul''Drak Ore Spawnpoint 57 Rich Cobalt'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Zul''Drak Ore Spawnpoint 58 Cobalt'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Zul''Drak Ore Spawnpoint 58 Rich Cobalt'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Zul''Drak Ore Spawnpoint 59 Cobalt'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Zul''Drak Ore Spawnpoint 59 Rich Cobalt'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Zul''Drak Ore Spawnpoint 60 Cobalt'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Zul''Drak Ore Spawnpoint 60 Rich Cobalt'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Zul''Drak Ore Spawnpoint 61 Cobalt'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Zul''Drak Ore Spawnpoint 61 Rich Cobalt'),
+(@GUID1+61,@POOL+61,@CHANCE1, 'Zul''Drak Ore Spawnpoint 62 Cobalt'),
+(@GUID2+61,@POOL+61,@CHANCE2, 'Zul''Drak Ore Spawnpoint 62 Saronite'),
+(@GUID1+62,@POOL+62,@CHANCE1, 'Zul''Drak Ore Spawnpoint 63 Cobalt'),
+(@GUID2+62,@POOL+62,@CHANCE2, 'Zul''Drak Ore Spawnpoint 63 Rich Cobalt'),
+(@GUID1+63,@POOL+63,@CHANCE1, 'Zul''Drak Ore Spawnpoint 64 Cobalt'),
+(@GUID2+63,@POOL+63,@CHANCE2, 'Zul''Drak Ore Spawnpoint 64 Rich Cobalt'),
+(@GUID1+64,@POOL+64,@CHANCE1, 'Zul''Drak Ore Spawnpoint 65 Cobalt'),
+(@GUID2+64,@POOL+64,@CHANCE2, 'Zul''Drak Ore Spawnpoint 65 Rich Cobalt'),
+(@GUID1+65,@POOL+65,@CHANCE1, 'Zul''Drak Ore Spawnpoint 66 Cobalt'),
+(@GUID2+65,@POOL+65,@CHANCE2, 'Zul''Drak Ore Spawnpoint 66 Rich Cobalt'),
+(@GUID1+66,@POOL+66,@CHANCE1, 'Zul''Drak Ore Spawnpoint 67 Cobalt'),
+(@GUID2+66,@POOL+66,@CHANCE2, 'Zul''Drak Ore Spawnpoint 67 Rich Cobalt'),
+(@GUID1+67,@POOL+67,@CHANCE1, 'Zul''Drak Ore Spawnpoint 68 Cobalt'),
+(@GUID2+67,@POOL+67,@CHANCE2, 'Zul''Drak Ore Spawnpoint 68 Rich Cobalt'),
+(@GUID1+68,@POOL+68,@CHANCE1, 'Zul''Drak Ore Spawnpoint 69 Cobalt'),
+(@GUID2+68,@POOL+68,@CHANCE2, 'Zul''Drak Ore Spawnpoint 69 Rich Cobalt'),
+(@GUID1+69,@POOL+69,@CHANCE1, 'Zul''Drak Ore Spawnpoint 70 Cobalt'),
+(@GUID2+69,@POOL+69,@CHANCE2, 'Zul''Drak Ore Spawnpoint 70 Rich Cobalt'),
+(@GUID1+70,@POOL+70,@CHANCE1, 'Zul''Drak Ore Spawnpoint 71 Cobalt'),
+(@GUID2+70,@POOL+70,@CHANCE2, 'Zul''Drak Ore Spawnpoint 71 Saronite'),
+(@GUID1+71,@POOL+71,@CHANCE1, 'Zul''Drak Ore Spawnpoint 72 Cobalt'),
+(@GUID2+71,@POOL+71,@CHANCE2, 'Zul''Drak Ore Spawnpoint 72 Rich Cobalt'),
+(@GUID1+72,@POOL+72,@CHANCE1, 'Zul''Drak Ore Spawnpoint 73 Cobalt'),
+(@GUID2+72,@POOL+72,@CHANCE2, 'Zul''Drak Ore Spawnpoint 73 Rich Cobalt'),
+(@GUID1+73,@POOL+73,@CHANCE1, 'Zul''Drak Ore Spawnpoint 74 Cobalt'),
+(@GUID2+73,@POOL+73,@CHANCE2, 'Zul''Drak Ore Spawnpoint 74 Saronite'),
+(@GUID1+74,@POOL+74,@CHANCE1, 'Zul''Drak Ore Spawnpoint 75 Cobalt'),
+(@GUID2+74,@POOL+74,@CHANCE2, 'Zul''Drak Ore Spawnpoint 75 Rich Cobalt'),
+(@GUID1+75,@POOL+75,@CHANCE1, 'Zul''Drak Ore Spawnpoint 76 Cobalt'),
+(@GUID2+75,@POOL+75,@CHANCE2, 'Zul''Drak Ore Spawnpoint 76 Rich Cobalt'),
+(@GUID1+76,@POOL+76,@CHANCE1, 'Zul''Drak Ore Spawnpoint 77 Cobalt'),
+(@GUID2+76,@POOL+76,@CHANCE2, 'Zul''Drak Ore Spawnpoint 77 Rich Cobalt'),
+(@GUID1+77,@POOL+77,@CHANCE1, 'Zul''Drak Ore Spawnpoint 78 Cobalt'),
+(@GUID2+77,@POOL+77,@CHANCE2, 'Zul''Drak Ore Spawnpoint 78 Rich Cobalt'),
+(@GUID1+78,@POOL+78,@CHANCE1, 'Zul''Drak Ore Spawnpoint 79 Cobalt'),
+(@GUID2+78,@POOL+78,@CHANCE2, 'Zul''Drak Ore Spawnpoint 79 Rich Cobalt'),
+(@GUID1+79,@POOL+79,@CHANCE1, 'Zul''Drak Ore Spawnpoint 80 Cobalt'),
+(@GUID2+79,@POOL+79,@CHANCE2, 'Zul''Drak Ore Spawnpoint 80 Rich Cobalt'),
+(@GUID1+80,@POOL+80,@CHANCE1, 'Zul''Drak Ore Spawnpoint 81 Cobalt'),
+(@GUID2+80,@POOL+80,@CHANCE2, 'Zul''Drak Ore Spawnpoint 81 Rich Cobalt'),
+(@GUID1+81,@POOL+81,@CHANCE1, 'Zul''Drak Ore Spawnpoint 82 Cobalt'),
+(@GUID2+81,@POOL+81,@CHANCE2, 'Zul''Drak Ore Spawnpoint 82 Rich Cobalt'),
+(@GUID1+82,@POOL+82,@CHANCE1, 'Zul''Drak Ore Spawnpoint 83 Cobalt'),
+(@GUID2+82,@POOL+82,@CHANCE2, 'Zul''Drak Ore Spawnpoint 83 Rich Cobalt'),
+(@GUID1+83,@POOL+83,@CHANCE1, 'Zul''Drak Ore Spawnpoint 84 Cobalt'),
+(@GUID2+83,@POOL+83,@CHANCE2, 'Zul''Drak Ore Spawnpoint 84 Rich Cobalt'),
+(@GUID1+84,@POOL+84,@CHANCE1, 'Zul''Drak Ore Spawnpoint 85 Cobalt'),
+(@GUID2+84,@POOL+84,@CHANCE2, 'Zul''Drak Ore Spawnpoint 85 Rich Cobalt'),
+(@GUID1+85,@POOL+85,@CHANCE1, 'Zul''Drak Ore Spawnpoint 86 Cobalt'),
+(@GUID2+85,@POOL+85,@CHANCE2, 'Zul''Drak Ore Spawnpoint 86 Rich Cobalt'),
+(@GUID1+86,@POOL+86,@CHANCE1, 'Zul''Drak Ore Spawnpoint 87 Cobalt'),
+(@GUID2+86,@POOL+86,@CHANCE2, 'Zul''Drak Ore Spawnpoint 87 Rich Cobalt'),
+(@GUID1+87,@POOL+87,@CHANCE1, 'Zul''Drak Ore Spawnpoint 88 Cobalt'),
+(@GUID2+87,@POOL+87,@CHANCE2, 'Zul''Drak Ore Spawnpoint 88 Rich Cobalt'),
+(@GUID1+88,@POOL+88,@CHANCE1, 'Zul''Drak Ore Spawnpoint 89 Cobalt'),
+(@GUID2+88,@POOL+88,@CHANCE2, 'Zul''Drak Ore Spawnpoint 89 Rich Cobalt'),
+(@GUID1+89,@POOL+89,@CHANCE1, 'Zul''Drak Ore Spawnpoint 90 Cobalt'),
+(@GUID2+89,@POOL+89,@CHANCE2, 'Zul''Drak Ore Spawnpoint 90 Rich Cobalt'),
+(@GUID1+90,@POOL+90,@CHANCE1, 'Zul''Drak Ore Spawnpoint 91 Cobalt'),
+(@GUID2+90,@POOL+90,@CHANCE2, 'Zul''Drak Ore Spawnpoint 91 Rich Cobalt'),
+(@GUID1+91,@POOL+91,@CHANCE1, 'Zul''Drak Ore Spawnpoint 92 Cobalt'),
+(@GUID2+91,@POOL+91,@CHANCE2, 'Zul''Drak Ore Spawnpoint 92 Rich Cobalt'),
+(@GUID1+92,@POOL+92,@CHANCE1, 'Zul''Drak Ore Spawnpoint 93 Cobalt'),
+(@GUID2+92,@POOL+92,@CHANCE2, 'Zul''Drak Ore Spawnpoint 93 Rich Cobalt');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Zul''Drak Ore Spawnpoint 1'),
+(@POOL+1,1, 'Zul''Drak Ore Spawnpoint 2'),
+(@POOL+2,1, 'Zul''Drak Ore Spawnpoint 3'),
+(@POOL+3,1, 'Zul''Drak Ore Spawnpoint 4'),
+(@POOL+4,1, 'Zul''Drak Ore Spawnpoint 5'),
+(@POOL+5,1, 'Zul''Drak Ore Spawnpoint 6'),
+(@POOL+6,1, 'Zul''Drak Ore Spawnpoint 7'),
+(@POOL+7,1, 'Zul''Drak Ore Spawnpoint 8'),
+(@POOL+8,1, 'Zul''Drak Ore Spawnpoint 9'),
+(@POOL+9,1, 'Zul''Drak Ore Spawnpoint 10'),
+(@POOL+10,1, 'Zul''Drak Ore Spawnpoint 11'),
+(@POOL+11,1, 'Zul''Drak Ore Spawnpoint 12'),
+(@POOL+12,1, 'Zul''Drak Ore Spawnpoint 13'),
+(@POOL+13,1, 'Zul''Drak Ore Spawnpoint 14'),
+(@POOL+14,1, 'Zul''Drak Ore Spawnpoint 15'),
+(@POOL+15,1, 'Zul''Drak Ore Spawnpoint 16'),
+(@POOL+16,1, 'Zul''Drak Ore Spawnpoint 17'),
+(@POOL+17,1, 'Zul''Drak Ore Spawnpoint 18'),
+(@POOL+18,1, 'Zul''Drak Ore Spawnpoint 19'),
+(@POOL+19,1, 'Zul''Drak Ore Spawnpoint 20'),
+(@POOL+20,1, 'Zul''Drak Ore Spawnpoint 21'),
+(@POOL+21,1, 'Zul''Drak Ore Spawnpoint 22'),
+(@POOL+22,1, 'Zul''Drak Ore Spawnpoint 23'),
+(@POOL+23,1, 'Zul''Drak Ore Spawnpoint 24'),
+(@POOL+24,1, 'Zul''Drak Ore Spawnpoint 25'),
+(@POOL+25,1, 'Zul''Drak Ore Spawnpoint 26'),
+(@POOL+26,1, 'Zul''Drak Ore Spawnpoint 27'),
+(@POOL+27,1, 'Zul''Drak Ore Spawnpoint 28'),
+(@POOL+28,1, 'Zul''Drak Ore Spawnpoint 29'),
+(@POOL+29,1, 'Zul''Drak Ore Spawnpoint 30'),
+(@POOL+30,1, 'Zul''Drak Ore Spawnpoint 31'),
+(@POOL+31,1, 'Zul''Drak Ore Spawnpoint 32'),
+(@POOL+32,1, 'Zul''Drak Ore Spawnpoint 33'),
+(@POOL+33,1, 'Zul''Drak Ore Spawnpoint 34'),
+(@POOL+34,1, 'Zul''Drak Ore Spawnpoint 35'),
+(@POOL+35,1, 'Zul''Drak Ore Spawnpoint 36'),
+(@POOL+36,1, 'Zul''Drak Ore Spawnpoint 37'),
+(@POOL+37,1, 'Zul''Drak Ore Spawnpoint 38'),
+(@POOL+38,1, 'Zul''Drak Ore Spawnpoint 39'),
+(@POOL+39,1, 'Zul''Drak Ore Spawnpoint 40'),
+(@POOL+40,1, 'Zul''Drak Ore Spawnpoint 41'),
+(@POOL+41,1, 'Zul''Drak Ore Spawnpoint 42'),
+(@POOL+42,1, 'Zul''Drak Ore Spawnpoint 43'),
+(@POOL+43,1, 'Zul''Drak Ore Spawnpoint 44'),
+(@POOL+44,1, 'Zul''Drak Ore Spawnpoint 45'),
+(@POOL+45,1, 'Zul''Drak Ore Spawnpoint 46'),
+(@POOL+46,1, 'Zul''Drak Ore Spawnpoint 47'),
+(@POOL+47,1, 'Zul''Drak Ore Spawnpoint 48'),
+(@POOL+48,1, 'Zul''Drak Ore Spawnpoint 49'),
+(@POOL+49,1, 'Zul''Drak Ore Spawnpoint 50'),
+(@POOL+50,1, 'Zul''Drak Ore Spawnpoint 51'),
+(@POOL+51,1, 'Zul''Drak Ore Spawnpoint 52'),
+(@POOL+52,1, 'Zul''Drak Ore Spawnpoint 53'),
+(@POOL+53,1, 'Zul''Drak Ore Spawnpoint 54'),
+(@POOL+54,1, 'Zul''Drak Ore Spawnpoint 55'),
+(@POOL+55,1, 'Zul''Drak Ore Spawnpoint 56'),
+(@POOL+56,1, 'Zul''Drak Ore Spawnpoint 57'),
+(@POOL+57,1, 'Zul''Drak Ore Spawnpoint 58'),
+(@POOL+58,1, 'Zul''Drak Ore Spawnpoint 59'),
+(@POOL+59,1, 'Zul''Drak Ore Spawnpoint 60'),
+(@POOL+60,1, 'Zul''Drak Ore Spawnpoint 61'),
+(@POOL+61,1, 'Zul''Drak Ore Spawnpoint 62'),
+(@POOL+62,1, 'Zul''Drak Ore Spawnpoint 63'),
+(@POOL+63,1, 'Zul''Drak Ore Spawnpoint 64'),
+(@POOL+64,1, 'Zul''Drak Ore Spawnpoint 65'),
+(@POOL+65,1, 'Zul''Drak Ore Spawnpoint 66'),
+(@POOL+66,1, 'Zul''Drak Ore Spawnpoint 67'),
+(@POOL+67,1, 'Zul''Drak Ore Spawnpoint 68'),
+(@POOL+68,1, 'Zul''Drak Ore Spawnpoint 69'),
+(@POOL+69,1, 'Zul''Drak Ore Spawnpoint 70'),
+(@POOL+70,1, 'Zul''Drak Ore Spawnpoint 71'),
+(@POOL+71,1, 'Zul''Drak Ore Spawnpoint 72'),
+(@POOL+72,1, 'Zul''Drak Ore Spawnpoint 73'),
+(@POOL+73,1, 'Zul''Drak Ore Spawnpoint 74'),
+(@POOL+74,1, 'Zul''Drak Ore Spawnpoint 75'),
+(@POOL+75,1, 'Zul''Drak Ore Spawnpoint 76'),
+(@POOL+76,1, 'Zul''Drak Ore Spawnpoint 77'),
+(@POOL+77,1, 'Zul''Drak Ore Spawnpoint 78'),
+(@POOL+78,1, 'Zul''Drak Ore Spawnpoint 79'),
+(@POOL+79,1, 'Zul''Drak Ore Spawnpoint 80'),
+(@POOL+80,1, 'Zul''Drak Ore Spawnpoint 81'),
+(@POOL+81,1, 'Zul''Drak Ore Spawnpoint 82'),
+(@POOL+82,1, 'Zul''Drak Ore Spawnpoint 83'),
+(@POOL+83,1, 'Zul''Drak Ore Spawnpoint 84'),
+(@POOL+84,1, 'Zul''Drak Ore Spawnpoint 85'),
+(@POOL+85,1, 'Zul''Drak Ore Spawnpoint 86'),
+(@POOL+86,1, 'Zul''Drak Ore Spawnpoint 87'),
+(@POOL+87,1, 'Zul''Drak Ore Spawnpoint 88'),
+(@POOL+88,1, 'Zul''Drak Ore Spawnpoint 89'),
+(@POOL+89,1, 'Zul''Drak Ore Spawnpoint 90'),
+(@POOL+90,1, 'Zul''Drak Ore Spawnpoint 91'),
+(@POOL+91,1, 'Zul''Drak Ore Spawnpoint 92'),
+(@POOL+92,1, 'Zul''Drak Ore Spawnpoint 93');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Zul''Drak Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 61'),
+(@POOL+61,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 62'),
+(@POOL+62,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 63'),
+(@POOL+63,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 64'),
+(@POOL+64,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 65'),
+(@POOL+65,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 66'),
+(@POOL+66,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 67'),
+(@POOL+67,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 68'),
+(@POOL+68,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 69'),
+(@POOL+69,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 70'),
+(@POOL+70,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 71'),
+(@POOL+71,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 72'),
+(@POOL+72,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 73'),
+(@POOL+73,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 74'),
+(@POOL+74,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 75'),
+(@POOL+75,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 76'),
+(@POOL+76,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 77'),
+(@POOL+77,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 78'),
+(@POOL+78,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 79'),
+(@POOL+79,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 80'),
+(@POOL+80,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 81'),
+(@POOL+81,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 82'),
+(@POOL+82,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 83'),
+(@POOL+83,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 84'),
+(@POOL+84,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 85'),
+(@POOL+85,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 86'),
+(@POOL+86,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 87'),
+(@POOL+87,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 88'),
+(@POOL+88,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 89'),
+(@POOL+89,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 90'),
+(@POOL+90,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 91'),
+(@POOL+91,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 92'),
+(@POOL+92,@MOTHER,0, 'Zul''Drak Ore Spawnpoint 93');
+
+-- -----------------------------------------
+-- -- Fixup ore spawns for Sholazar Basin --
+-- -----------------------------------------
+SET @RANGE := 350;
+SET @GUID1 := 161400;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @GUID3 := @GUID2 + @RANGE;
+SET @POOL := 10800;
+SET @LASTGUID := 111;
+SET @CHANCE1 := 75;
+SET @CHANCE2 := 15;
+SET @CHANCE3 := 10;
+SET @MOTHER := 9905;
+SET @ACTIVE := 35; -- Max number of active spawns
+SET @TIMER := 600; -- Respawn timer in seconds
+-- Remove Ore spawns from Sholazar Basin
+DELETE FROM gameobject WHERE id IN (189980,189981,191133) AND map=571 AND `position_y` > 3500 AND `position_x` < 6825 AND `position_x` > 4650 AND `position_z` < 300;
+DELETE FROM gameobject WHERE id IN (189980,189981,191133) AND map=571 AND `position_y` > 4450 AND `position_x` < 6400 AND `position_x` > 4825 AND `position_z` > 300;
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5292 AND 5375;
+DELETE FROM `pool_template` WHERE `entry`=899;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5292 AND 5375;
+-- Saronite Deposits Sholazar Basin
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1,189980,571,1,1,4704.718,5425.793,-32.3253,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189980,571,1,1,4709.270,4367.730,-31.7133,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189980,571,1,1,4716.542,4978.443,-44.2661,1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189980,571,1,1,4722.860,5246.860,-42.0046,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189980,571,1,1,4724.210,5107.490,-46.3651,-1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189980,571,1,1,4732.280,5135.100,-53.4326,-1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189980,571,1,1,4732.570,5036.200,-54.9473,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189980,571,1,1,4737.140,4847.460,-67.2180,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189980,571,1,1,4738.390,4691.450,-56.7589,0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189980,571,1,1,4794.450,5895.830,-30.9455,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189980,571,1,1,4837.230,4160.790,-3.6381,-0.62832,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189980,571,1,1,4846.780,5769.550,-57.8889,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189980,571,1,1,4847.239,5953.834,-15.9588,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189980,571,1,1,4866.020,4570.890,-60.3061,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189980,571,1,1,4884.830,4321.190,-54.8871,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189980,571,1,1,4927.281,4328.632,-72.9263,0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189980,571,1,1,4988.200,5373.050,-94.5907,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189980,571,1,1,4993.830,4180.020,-79.1709,0.01745,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189980,571,1,1,5013.689,5436.410,-94.5146,-1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189980,571,1,1,5015.700,4691.840,-91.0594,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189980,571,1,1,5052.430,5887.010,-69.4098,-1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189980,571,1,1,5054.910,4412.610,-92.8146,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189980,571,1,1,5056.290,4819.880,-132.8840,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189980,571,1,1,5062.380,4526.640,-96.4765,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189980,571,1,1,5062.479,5031.562,-131.0034,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189980,571,1,1,5079.800,5468.130,-88.7503,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189980,571,1,1,5086.370,5098.740,-134.5720,2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189980,571,1,1,5093.570,4341.180,-82.7253,3.08918,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189980,571,1,1,5094.270,5217.790,-88.3220,-2.21656,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189980,571,1,1,5105.152,4639.756,-135.8839,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189980,571,1,1,5125.490,6015.810,-50.0045,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189980,571,1,1,5128.380,4215.860,-83.4258,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189980,571,1,1,5159.018,5454.543,-88.2909,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189980,571,1,1,5171.400,3794.750,-12.2962,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189980,571,1,1,5190.180,6023.387,-37.9963,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189980,571,1,1,5199.739,5436.705,-81.6717,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189980,571,1,1,5226.190,4826.150,-132.7040,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189980,571,1,1,5232.450,4195.245,-93.5727,1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189980,571,1,1,5271.987,5251.519,-124.8593,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189980,571,1,1,5277.800,3702.890,12.7941,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189980,571,1,1,5309.020,4437.110,-101.2090,2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189980,571,1,1,5324.950,5368.980,-123.4160,-1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189980,571,1,1,5325.520,6025.470,-16.2582,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189980,571,1,1,5331.860,4405.600,-126.9970,-1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189980,571,1,1,5333.070,4300.510,-148.0820,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189980,571,1,1,5338.952,4182.072,-94.2039,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189980,571,1,1,5341.820,5396.050,-106.7450,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189980,571,1,1,5354.230,4820.880,-198.8800,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189980,571,1,1,5358.900,4514.820,-127.6330,2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189980,571,1,1,5385.530,4913.980,-195.3540,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189980,571,1,1,5388.270,4753.330,-198.7980,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189980,571,1,1,5418.620,4371.290,-137.6760,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189980,571,1,1,5434.910,3826.250,-65.5299,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189980,571,1,1,5443.155,4694.667,-187.9415,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189980,571,1,1,5446.752,5166.048,-133.7927,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189980,571,1,1,5447.930,4519.890,-135.9880,-1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189980,571,1,1,5449.870,4089.350,-91.0623,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189980,571,1,3,5451.860,5532.250,-101.7700,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189980,571,1,1,5455.970,5712.200,-102.7660,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189980,571,1,1,5456.090,4679.770,-173.5170,1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189980,571,1,1,5461.790,4916.510,-197.1930,-0.62832,0,0,0,1,@TIMER,255,1),
+(@GUID1+61,189980,571,1,1,5479.190,4193.700,-97.0735,0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID1+62,189980,571,1,1,5482.810,3505.600,7.2101,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID1+63,189980,571,1,1,5483.640,4688.750,-122.0030,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID1+64,189980,571,1,1,5494.615,5677.867,-97.2142,1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID1+65,189980,571,1,1,5509.580,3579.710,-12.9631,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+66,189980,571,1,1,5521.060,4926.980,-192.7710,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID1+67,189980,571,1,1,5522.840,3836.810,-62.7052,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+68,189980,571,1,1,5528.730,4681.650,-127.0880,0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID1+69,189980,571,1,1,5529.634,4501.900,-132.3918,-2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID1+70,189980,571,1,1,5537.919,4315.394,-130.2137,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+71,189980,571,1,1,5553.280,3666.730,-28.5651,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+72,189980,571,1,3,5608.650,3865.180,-99.3376,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+73,189980,571,1,1,5652.200,3981.090,-83.0324,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID1+74,189980,571,1,3,5656.220,6023.450,-28.9304,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+75,189980,571,1,1,5660.409,3699.911,-13.5126,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+76,189980,571,1,1,5668.259,4118.605,-90.1961,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+77,189980,571,1,3,5669.970,5463.910,-68.9469,2.89724,0,0,0,1,@TIMER,255,1),
+(@GUID1+78,189980,571,1,1,5671.007,4389.625,-137.5537,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+79,189980,571,1,1,5679.051,5598.783,-73.9954,-0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID1+80,189980,571,1,1,5682.740,3538.940,-8.8133,-2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID1+81,189980,571,1,1,5684.080,5541.490,-72.1058,-1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID1+82,189980,571,1,1,5704.426,3884.596,-72.5278,1.86750,0,0,0,1,@TIMER,255,1),
+(@GUID1+83,189980,571,1,1,5721.057,3655.517,-25.2488,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+84,189980,571,1,1,5721.060,3655.520,-25.2488,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+85,189980,571,1,1,5735.860,5612.500,-67.5912,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+86,189980,571,1,1,5740.394,5960.094,-36.3629,0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID1+87,189980,571,1,1,5762.140,3502.190,8.5711,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID1+88,189980,571,1,1,5827.040,4457.580,-130.4530,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID1+89,189980,571,1,1,5834.000,5370.130,-87.9156,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID1+90,189980,571,1,1,5859.746,4020.988,-68.8248,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID1+91,189980,571,1,3,5861.320,4419.110,-89.7436,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+92,189980,571,1,1,5882.228,5916.372,-25.0905,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+93,189980,571,1,1,5945.590,4566.130,-99.4520,1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID1+94,189980,571,1,1,6001.920,4160.640,-71.2961,0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+95,189980,571,1,1,6037.100,4847.040,-93.4030,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+96,189980,571,1,1,6053.300,4795.460,-92.8918,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID1+97,189980,571,1,1,6077.970,4860.720,-94.5449,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+98,189980,571,1,1,6084.560,4079.100,-46.7275,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+99,189980,571,1,1,6096.587,3644.301,143.1275,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID1+100,189980,571,1,1,6107.000,5455.440,-97.4798,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+101,189980,571,1,1,6167.440,5256.570,-127.8840,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+102,189980,571,1,3,6173.290,4609.010,-92.2689,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID1+103,189980,571,1,1,6174.170,5636.430,-22.3877,-1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID1+104,189980,571,1,1,6205.150,4325.340,-38.2094,-0.05236,0,0,0,1,@TIMER,255,1),
+(@GUID1+105,189980,571,1,1,6215.250,5172.350,-97.6636,0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID1+106,189980,571,1,1,6229.990,5392.570,-108.9900,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID1+107,189980,571,1,1,6277.390,4221.150,-40.3804,0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID1+108,189980,571,1,1,6302.940,5136.300,-81.6133,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID1+109,189980,571,1,1,6310.000,3957.290,109.0570,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+110,189980,571,1,1,6659.690,4690.380,0.1829,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID1+111,189980,571,1,1,6672.220,4932.340,-17.9780,2.94959,0,0,0,1,@TIMER,255,1);
+-- Rich Saronite Deposits Sholazar Basin
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID2,189981,571,1,1,4704.718,5425.793,-32.3253,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189981,571,1,1,4709.270,4367.730,-31.7133,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189981,571,1,1,4716.542,4978.443,-44.2661,1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189981,571,1,1,4722.860,5246.860,-42.0046,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189981,571,1,1,4724.210,5107.490,-46.3651,-1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189981,571,1,1,4732.280,5135.100,-53.4326,-1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189981,571,1,1,4732.570,5036.200,-54.9473,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189981,571,1,1,4737.140,4847.460,-67.2180,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189981,571,1,1,4738.390,4691.450,-56.7589,0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189981,571,1,1,4794.450,5895.830,-30.9455,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189981,571,1,1,4837.230,4160.790,-3.6381,-0.62832,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189981,571,1,1,4846.780,5769.550,-57.8889,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189981,571,1,1,4847.239,5953.834,-15.9588,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189981,571,1,1,4866.020,4570.890,-60.3061,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189981,571,1,1,4884.830,4321.190,-54.8871,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189981,571,1,1,4927.281,4328.632,-72.9263,0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189981,571,1,1,4988.200,5373.050,-94.5907,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189981,571,1,1,4993.830,4180.020,-79.1709,0.01745,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189981,571,1,1,5013.689,5436.410,-94.5146,-1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189981,571,1,1,5015.700,4691.840,-91.0594,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189981,571,1,1,5052.430,5887.010,-69.4098,-1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189981,571,1,1,5054.910,4412.610,-92.8146,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189981,571,1,1,5056.290,4819.880,-132.8840,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+23,189981,571,1,1,5062.380,4526.640,-96.4765,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189981,571,1,1,5062.479,5031.562,-131.0034,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189981,571,1,1,5079.800,5468.130,-88.7503,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189981,571,1,1,5086.370,5098.740,-134.5720,2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189981,571,1,1,5093.570,4341.180,-82.7253,3.08918,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189981,571,1,1,5094.270,5217.790,-88.3220,-2.21656,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189981,571,1,1,5105.152,4639.756,-135.8839,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189981,571,1,1,5125.490,6015.810,-50.0045,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189981,571,1,1,5128.380,4215.860,-83.4258,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189981,571,1,1,5159.018,5454.543,-88.2909,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189981,571,1,1,5171.400,3794.750,-12.2962,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189981,571,1,1,5190.180,6023.387,-37.9963,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189981,571,1,1,5199.739,5436.705,-81.6717,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189981,571,1,1,5226.190,4826.150,-132.7040,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189981,571,1,1,5232.450,4195.245,-93.5727,1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189981,571,1,1,5271.987,5251.519,-124.8593,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189981,571,1,1,5277.800,3702.890,12.7941,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189981,571,1,1,5309.020,4437.110,-101.2090,2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189981,571,1,1,5324.950,5368.980,-123.4160,-1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189981,571,1,1,5325.520,6025.470,-16.2582,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189981,571,1,1,5331.860,4405.600,-126.9970,-1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189981,571,1,1,5333.070,4300.510,-148.0820,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189981,571,1,1,5338.952,4182.072,-94.2039,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189981,571,1,1,5341.820,5396.050,-106.7450,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+47,189981,571,1,1,5354.230,4820.880,-198.8800,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+48,189981,571,1,1,5358.900,4514.820,-127.6330,2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189981,571,1,1,5385.530,4913.980,-195.3540,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189981,571,1,1,5388.270,4753.330,-198.7980,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189981,571,1,1,5418.620,4371.290,-137.6760,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189981,571,1,1,5434.910,3826.250,-65.5299,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189981,571,1,1,5443.155,4694.667,-187.9415,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189981,571,1,1,5446.752,5166.048,-133.7927,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189981,571,1,1,5447.930,4519.890,-135.9880,-1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189981,571,1,1,5449.870,4089.350,-91.0623,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189981,571,1,3,5451.860,5532.250,-101.7700,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189981,571,1,1,5455.970,5712.200,-102.7660,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189981,571,1,1,5456.090,4679.770,-173.5170,1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189981,571,1,1,5461.790,4916.510,-197.1930,-0.62832,0,0,0,1,@TIMER,255,1),
+(@GUID2+61,189981,571,1,1,5479.190,4193.700,-97.0735,0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID2+62,189981,571,1,1,5482.810,3505.600,7.2101,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID2+63,189981,571,1,1,5483.640,4688.750,-122.0030,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID2+64,189981,571,1,1,5494.615,5677.867,-97.2142,1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID2+65,189981,571,1,1,5509.580,3579.710,-12.9631,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+66,189981,571,1,1,5521.060,4926.980,-192.7710,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID2+67,189981,571,1,1,5522.840,3836.810,-62.7052,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+68,189981,571,1,1,5528.730,4681.650,-127.0880,0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID2+69,189981,571,1,1,5529.634,4501.900,-132.3918,-2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID2+70,189981,571,1,1,5537.919,4315.394,-130.2137,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+71,189981,571,1,1,5553.280,3666.730,-28.5651,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+72,189981,571,1,3,5608.650,3865.180,-99.3376,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+73,189981,571,1,1,5652.200,3981.090,-83.0324,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID2+74,189981,571,1,3,5656.220,6023.450,-28.9304,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+75,189981,571,1,1,5660.409,3699.911,-13.5126,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID2+76,189981,571,1,1,5668.259,4118.605,-90.1961,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID2+77,189981,571,1,3,5669.970,5463.910,-68.9469,2.89724,0,0,0,1,@TIMER,255,1),
+(@GUID2+78,189981,571,1,1,5671.007,4389.625,-137.5537,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+79,189981,571,1,1,5679.051,5598.783,-73.9954,-0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID2+80,189981,571,1,1,5682.740,3538.940,-8.8133,-2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID2+81,189981,571,1,1,5684.080,5541.490,-72.1058,-1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID2+82,189981,571,1,1,5704.426,3884.596,-72.5278,1.86750,0,0,0,1,@TIMER,255,1),
+(@GUID2+83,189981,571,1,1,5721.057,3655.517,-25.2488,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+84,189981,571,1,1,5721.060,3655.520,-25.2488,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+85,189981,571,1,1,5735.860,5612.500,-67.5912,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+86,189981,571,1,1,5740.394,5960.094,-36.3629,0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID2+87,189981,571,1,1,5762.140,3502.190,8.5711,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID2+88,189981,571,1,1,5827.040,4457.580,-130.4530,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID2+89,189981,571,1,1,5834.000,5370.130,-87.9156,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID2+90,189981,571,1,1,5859.746,4020.988,-68.8248,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID2+91,189981,571,1,3,5861.320,4419.110,-89.7436,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+92,189981,571,1,1,5882.228,5916.372,-25.0905,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+93,189981,571,1,1,5945.590,4566.130,-99.4520,1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID2+94,189981,571,1,1,6001.920,4160.640,-71.2961,0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+95,189981,571,1,1,6037.100,4847.040,-93.4030,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+96,189981,571,1,1,6053.300,4795.460,-92.8918,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID2+97,189981,571,1,1,6077.970,4860.720,-94.5449,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+98,189981,571,1,1,6084.560,4079.100,-46.7275,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+99,189981,571,1,1,6096.587,3644.301,143.1275,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID2+100,189981,571,1,1,6107.000,5455.440,-97.4798,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+101,189981,571,1,1,6167.440,5256.570,-127.8840,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+102,189981,571,1,3,6173.290,4609.010,-92.2689,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID2+103,189981,571,1,1,6174.170,5636.430,-22.3877,-1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID2+104,189981,571,1,1,6205.150,4325.340,-38.2094,-0.05236,0,0,0,1,@TIMER,255,1),
+(@GUID2+105,189981,571,1,1,6215.250,5172.350,-97.6636,0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID2+106,189981,571,1,1,6229.990,5392.570,-108.9900,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID2+107,189981,571,1,1,6277.390,4221.150,-40.3804,0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID2+108,189981,571,1,1,6302.940,5136.300,-81.6133,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID2+109,189981,571,1,1,6310.000,3957.290,109.0570,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+110,189981,571,1,1,6659.690,4690.380,0.1829,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID2+111,189981,571,1,1,6672.220,4932.340,-17.9780,2.94959,0,0,0,1,@TIMER,255,1);
+-- Titanium Deposits Sholazar Basin
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID3,191133,571,1,1,4704.718,5425.793,-32.3253,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+1,191133,571,1,1,4709.270,4367.730,-31.7133,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+2,191133,571,1,1,4716.542,4978.443,-44.2661,1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID3+3,191133,571,1,1,4722.860,5246.860,-42.0046,1.18682,0,0,0,1,@TIMER,255,1),
+(@GUID3+4,191133,571,1,1,4724.210,5107.490,-46.3651,-1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID3+5,191133,571,1,1,4732.280,5135.100,-53.4326,-1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID3+6,191133,571,1,1,4732.570,5036.200,-54.9473,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID3+7,191133,571,1,1,4737.140,4847.460,-67.2180,1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID3+8,191133,571,1,1,4738.390,4691.450,-56.7589,0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID3+9,191133,571,1,1,4794.450,5895.830,-30.9455,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID3+10,191133,571,1,1,4837.230,4160.790,-3.6381,-0.62832,0,0,0,1,@TIMER,255,1),
+(@GUID3+11,191133,571,1,1,4846.780,5769.550,-57.8889,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID3+12,191133,571,1,1,4847.239,5953.834,-15.9588,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID3+13,191133,571,1,1,4866.020,4570.890,-60.3061,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID3+14,191133,571,1,1,4884.830,4321.190,-54.8871,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID3+15,191133,571,1,1,4927.281,4328.632,-72.9263,0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID3+16,191133,571,1,1,4988.200,5373.050,-94.5907,1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID3+17,191133,571,1,1,4993.830,4180.020,-79.1709,0.01745,0,0,0,1,@TIMER,255,1),
+(@GUID3+18,191133,571,1,1,5013.689,5436.410,-94.5146,-1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID3+19,191133,571,1,1,5015.700,4691.840,-91.0594,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID3+20,191133,571,1,1,5052.430,5887.010,-69.4098,-1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID3+21,191133,571,1,1,5054.910,4412.610,-92.8146,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID3+22,191133,571,1,1,5056.290,4819.880,-132.8840,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID3+23,191133,571,1,1,5062.380,4526.640,-96.4765,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID3+24,191133,571,1,1,5062.479,5031.562,-131.0034,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID3+25,191133,571,1,1,5079.800,5468.130,-88.7503,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+26,191133,571,1,1,5086.370,5098.740,-134.5720,2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID3+27,191133,571,1,1,5093.570,4341.180,-82.7253,3.08918,0,0,0,1,@TIMER,255,1),
+(@GUID3+28,191133,571,1,1,5094.270,5217.790,-88.3220,-2.21656,0,0,0,1,@TIMER,255,1),
+(@GUID3+29,191133,571,1,1,5105.152,4639.756,-135.8839,-1.02974,0,0,0,1,@TIMER,255,1),
+(@GUID3+30,191133,571,1,1,5125.490,6015.810,-50.0045,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID3+31,191133,571,1,1,5128.380,4215.860,-83.4258,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID3+32,191133,571,1,1,5159.018,5454.543,-88.2909,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID3+33,191133,571,1,1,5171.400,3794.750,-12.2962,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID3+34,191133,571,1,1,5190.180,6023.387,-37.9963,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+35,191133,571,1,1,5199.739,5436.705,-81.6717,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID3+36,191133,571,1,1,5226.190,4826.150,-132.7040,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID3+37,191133,571,1,1,5232.450,4195.245,-93.5727,1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID3+38,191133,571,1,1,5271.987,5251.519,-124.8593,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID3+39,191133,571,1,1,5277.800,3702.890,12.7941,1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID3+40,191133,571,1,1,5309.020,4437.110,-101.2090,2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID3+41,191133,571,1,1,5324.950,5368.980,-123.4160,-1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID3+42,191133,571,1,1,5325.520,6025.470,-16.2582,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID3+43,191133,571,1,1,5331.860,4405.600,-126.9970,-1.51844,0,0,0,1,@TIMER,255,1),
+(@GUID3+44,191133,571,1,1,5333.070,4300.510,-148.0820,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID3+45,191133,571,1,1,5338.952,4182.072,-94.2039,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID3+46,191133,571,1,1,5341.820,5396.050,-106.7450,2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID3+47,191133,571,1,1,5354.230,4820.880,-198.8800,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID3+48,191133,571,1,1,5358.900,4514.820,-127.6330,2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID3+49,191133,571,1,1,5385.530,4913.980,-195.3540,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID3+50,191133,571,1,1,5388.270,4753.330,-198.7980,2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID3+51,191133,571,1,1,5418.620,4371.290,-137.6760,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID3+52,191133,571,1,1,5434.910,3826.250,-65.5299,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+53,191133,571,1,1,5443.155,4694.667,-187.9415,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID3+54,191133,571,1,1,5446.752,5166.048,-133.7927,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID3+55,191133,571,1,1,5447.930,4519.890,-135.9880,-1.67551,0,0,0,1,@TIMER,255,1),
+(@GUID3+56,191133,571,1,1,5449.870,4089.350,-91.0623,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+57,191133,571,1,3,5451.860,5532.250,-101.7700,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID3+58,191133,571,1,1,5455.970,5712.200,-102.7660,-0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID3+59,191133,571,1,1,5456.090,4679.770,-173.5170,1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID3+60,191133,571,1,1,5461.790,4916.510,-197.1930,-0.62832,0,0,0,1,@TIMER,255,1),
+(@GUID3+61,191133,571,1,1,5479.190,4193.700,-97.0735,0.80285,0,0,0,1,@TIMER,255,1),
+(@GUID3+62,191133,571,1,1,5482.810,3505.600,7.2101,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID3+63,191133,571,1,1,5483.640,4688.750,-122.0030,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID3+64,191133,571,1,1,5494.615,5677.867,-97.2142,1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID3+65,191133,571,1,1,5509.580,3579.710,-12.9631,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID3+66,191133,571,1,1,5521.060,4926.980,-192.7710,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID3+67,191133,571,1,1,5522.840,3836.810,-62.7052,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID3+68,191133,571,1,1,5528.730,4681.650,-127.0880,0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID3+69,191133,571,1,1,5529.634,4501.900,-132.3918,-2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID3+70,191133,571,1,1,5537.919,4315.394,-130.2137,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+71,191133,571,1,1,5553.280,3666.730,-28.5651,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+72,191133,571,1,3,5608.650,3865.180,-99.3376,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID3+73,191133,571,1,1,5652.200,3981.090,-83.0324,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID3+74,191133,571,1,3,5656.220,6023.450,-28.9304,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+75,191133,571,1,1,5660.409,3699.911,-13.5126,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID3+76,191133,571,1,1,5668.259,4118.605,-90.1961,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID3+77,191133,571,1,3,5669.970,5463.910,-68.9469,2.89724,0,0,0,1,@TIMER,255,1),
+(@GUID3+78,191133,571,1,1,5671.007,4389.625,-137.5537,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID3+79,191133,571,1,1,5679.051,5598.783,-73.9954,-0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID3+80,191133,571,1,1,5682.740,3538.940,-8.8133,-2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID3+81,191133,571,1,1,5684.080,5541.490,-72.1058,-1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID3+82,191133,571,1,1,5704.426,3884.596,-72.5278,1.86750,0,0,0,1,@TIMER,255,1),
+(@GUID3+83,191133,571,1,1,5721.057,3655.517,-25.2488,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+84,191133,571,1,1,5721.060,3655.520,-25.2488,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+85,191133,571,1,1,5735.860,5612.500,-67.5912,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID3+86,191133,571,1,1,5740.394,5960.094,-36.3629,0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID3+87,191133,571,1,1,5762.140,3502.190,8.5711,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID3+88,191133,571,1,1,5827.040,4457.580,-130.4530,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID3+89,191133,571,1,1,5834.000,5370.130,-87.9156,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID3+90,191133,571,1,1,5859.746,4020.988,-68.8248,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID3+91,191133,571,1,3,5861.320,4419.110,-89.7436,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID3+92,191133,571,1,1,5882.228,5916.372,-25.0905,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID3+93,191133,571,1,1,5945.590,4566.130,-99.4520,1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID3+94,191133,571,1,1,6001.920,4160.640,-71.2961,0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID3+95,191133,571,1,1,6037.100,4847.040,-93.4030,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+96,191133,571,1,1,6053.300,4795.460,-92.8918,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID3+97,191133,571,1,1,6077.970,4860.720,-94.5449,-1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID3+98,191133,571,1,1,6084.560,4079.100,-46.7275,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID3+99,191133,571,1,1,6096.587,3644.301,143.1275,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID3+100,191133,571,1,1,6107.000,5455.440,-97.4798,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID3+101,191133,571,1,1,6167.440,5256.570,-127.8840,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID3+102,191133,571,1,3,6173.290,4609.010,-92.2689,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID3+103,191133,571,1,1,6174.170,5636.430,-22.3877,-1.93731,0,0,0,1,@TIMER,255,1),
+(@GUID3+104,191133,571,1,1,6205.150,4325.340,-38.2094,-0.05236,0,0,0,1,@TIMER,255,1),
+(@GUID3+105,191133,571,1,1,6215.250,5172.350,-97.6636,0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID3+106,191133,571,1,1,6229.990,5392.570,-108.9900,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID3+107,191133,571,1,1,6277.390,4221.150,-40.3804,0.59341,0,0,0,1,@TIMER,255,1),
+(@GUID3+108,191133,571,1,1,6302.940,5136.300,-81.6133,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID3+109,191133,571,1,1,6310.000,3957.290,109.0570,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+110,191133,571,1,1,6659.690,4690.380,0.1829,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID3+111,191133,571,1,1,6672.220,4932.340,-17.9780,2.94959,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID3 AND @GUID3+@LASTGUID;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 1 Saronite'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 1 Rich Saronite'),
+(@GUID3+0,@POOL+0,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 1 Titanium'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 2 Saronite'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 2 Rich Saronite'),
+(@GUID3+1,@POOL+1,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 2 Titanium'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 3 Saronite'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 3 Rich Saronite'),
+(@GUID3+2,@POOL+2,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 3 Titanium'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 4 Saronite'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 4 Rich Saronite'),
+(@GUID3+3,@POOL+3,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 4 Titanium'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 5 Saronite'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 5 Rich Saronite'),
+(@GUID3+4,@POOL+4,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 5 Titanium'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 6 Saronite'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 6 Rich Saronite'),
+(@GUID3+5,@POOL+5,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 6 Titanium'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 7 Saronite'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 7 Rich Saronite'),
+(@GUID3+6,@POOL+6,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 7 Titanium'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 8 Saronite'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 8 Rich Saronite'),
+(@GUID3+7,@POOL+7,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 8 Titanium'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 9 Saronite'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 9 Rich Saronite'),
+(@GUID3+8,@POOL+8,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 9 Titanium'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 10 Saronite'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 10 Rich Saronite'),
+(@GUID3+9,@POOL+9,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 10 Titanium'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 11 Saronite'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 11 Rich Saronite'),
+(@GUID3+10,@POOL+10,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 11 Titanium'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 12 Saronite'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 12 Rich Saronite'),
+(@GUID3+11,@POOL+11,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 12 Titanium'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 13 Saronite'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 13 Rich Saronite'),
+(@GUID3+12,@POOL+12,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 13 Titanium'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 14 Saronite'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 14 Rich Saronite'),
+(@GUID3+13,@POOL+13,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 14 Titanium'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 15 Saronite'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 15 Rich Saronite'),
+(@GUID3+14,@POOL+14,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 15 Titanium'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 16 Saronite'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 16 Rich Saronite'),
+(@GUID3+15,@POOL+15,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 16 Titanium'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 17 Saronite'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 17 Rich Saronite'),
+(@GUID3+16,@POOL+16,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 17 Titanium'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 18 Saronite'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 18 Rich Saronite'),
+(@GUID3+17,@POOL+17,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 18 Titanium'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 19 Saronite'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 19 Rich Saronite'),
+(@GUID3+18,@POOL+18,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 19 Titanium'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 20 Saronite'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 20 Rich Saronite'),
+(@GUID3+19,@POOL+19,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 20 Titanium'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 21 Saronite'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 21 Rich Saronite'),
+(@GUID3+20,@POOL+20,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 21 Titanium'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 22 Saronite'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 22 Rich Saronite'),
+(@GUID3+21,@POOL+21,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 22 Titanium'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 23 Saronite'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 23 Rich Saronite'),
+(@GUID3+22,@POOL+22,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 23 Titanium'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 24 Saronite'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 24 Rich Saronite'),
+(@GUID3+23,@POOL+23,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 24 Titanium'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 25 Saronite'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 25 Rich Saronite'),
+(@GUID3+24,@POOL+24,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 25 Titanium'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 26 Saronite'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 26 Rich Saronite'),
+(@GUID3+25,@POOL+25,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 26 Titanium'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 27 Saronite'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 27 Rich Saronite'),
+(@GUID3+26,@POOL+26,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 27 Titanium'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 28 Saronite'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 28 Rich Saronite'),
+(@GUID3+27,@POOL+27,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 28 Titanium'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 29 Saronite'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 29 Rich Saronite'),
+(@GUID3+28,@POOL+28,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 29 Titanium'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 30 Saronite'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 30 Rich Saronite'),
+(@GUID3+29,@POOL+29,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 30 Titanium'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 31 Saronite'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 31 Rich Saronite'),
+(@GUID3+30,@POOL+30,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 31 Titanium'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 32 Saronite'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 32 Rich Saronite'),
+(@GUID3+31,@POOL+31,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 32 Titanium'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 33 Saronite'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 33 Rich Saronite'),
+(@GUID3+32,@POOL+32,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 33 Titanium'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 34 Saronite'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 34 Rich Saronite'),
+(@GUID3+33,@POOL+33,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 34 Titanium'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 35 Saronite'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 35 Rich Saronite'),
+(@GUID3+34,@POOL+34,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 35 Titanium'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 36 Saronite'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 36 Rich Saronite'),
+(@GUID3+35,@POOL+35,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 36 Titanium'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 37 Saronite'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 37 Rich Saronite'),
+(@GUID3+36,@POOL+36,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 37 Titanium'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 38 Saronite'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 38 Rich Saronite'),
+(@GUID3+37,@POOL+37,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 38 Titanium'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 39 Saronite'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 39 Rich Saronite'),
+(@GUID3+38,@POOL+38,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 39 Titanium'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 40 Saronite'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 40 Rich Saronite'),
+(@GUID3+39,@POOL+39,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 40 Titanium'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 41 Saronite'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 41 Rich Saronite'),
+(@GUID3+40,@POOL+40,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 41 Titanium'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 42 Saronite'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 42 Rich Saronite'),
+(@GUID3+41,@POOL+41,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 42 Titanium'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 43 Saronite'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 43 Rich Saronite'),
+(@GUID3+42,@POOL+42,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 43 Titanium'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 44 Saronite'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 44 Rich Saronite'),
+(@GUID3+43,@POOL+43,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 44 Titanium'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 45 Saronite'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 45 Rich Saronite'),
+(@GUID3+44,@POOL+44,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 45 Titanium'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 46 Saronite'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 46 Rich Saronite'),
+(@GUID3+45,@POOL+45,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 46 Titanium'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 47 Saronite'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 47 Rich Saronite'),
+(@GUID3+46,@POOL+46,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 47 Titanium'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 48 Saronite'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 48 Rich Saronite'),
+(@GUID3+47,@POOL+47,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 48 Titanium'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 49 Saronite'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 49 Rich Saronite'),
+(@GUID3+48,@POOL+48,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 49 Titanium'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 50 Saronite'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 50 Rich Saronite'),
+(@GUID3+49,@POOL+49,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 50 Titanium'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 51 Saronite'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 51 Rich Saronite'),
+(@GUID3+50,@POOL+50,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 51 Titanium'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 52 Saronite'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 52 Rich Saronite'),
+(@GUID3+51,@POOL+51,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 52 Titanium'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 53 Saronite'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 53 Rich Saronite'),
+(@GUID3+52,@POOL+52,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 53 Titanium'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 54 Saronite'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 54 Rich Saronite'),
+(@GUID3+53,@POOL+53,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 54 Titanium'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 55 Saronite'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 55 Rich Saronite'),
+(@GUID3+54,@POOL+54,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 55 Titanium'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 56 Saronite'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 56 Rich Saronite'),
+(@GUID3+55,@POOL+55,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 56 Titanium'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 57 Saronite'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 57 Rich Saronite'),
+(@GUID3+56,@POOL+56,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 57 Titanium'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 58 Saronite'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 58 Rich Saronite'),
+(@GUID3+57,@POOL+57,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 58 Titanium'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 59 Saronite'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 59 Rich Saronite'),
+(@GUID3+58,@POOL+58,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 59 Titanium'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 60 Saronite'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 60 Rich Saronite'),
+(@GUID3+59,@POOL+59,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 60 Titanium'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 61 Saronite'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 61 Rich Saronite'),
+(@GUID3+60,@POOL+60,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 61 Titanium'),
+(@GUID1+61,@POOL+61,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 62 Saronite'),
+(@GUID2+61,@POOL+61,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 62 Rich Saronite'),
+(@GUID3+61,@POOL+61,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 62 Titanium'),
+(@GUID1+62,@POOL+62,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 63 Saronite'),
+(@GUID2+62,@POOL+62,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 63 Rich Saronite'),
+(@GUID3+62,@POOL+62,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 63 Titanium'),
+(@GUID1+63,@POOL+63,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 64 Saronite'),
+(@GUID2+63,@POOL+63,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 64 Rich Saronite'),
+(@GUID3+63,@POOL+63,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 64 Titanium'),
+(@GUID1+64,@POOL+64,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 65 Saronite'),
+(@GUID2+64,@POOL+64,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 65 Rich Saronite'),
+(@GUID3+64,@POOL+64,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 65 Titanium'),
+(@GUID1+65,@POOL+65,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 66 Saronite'),
+(@GUID2+65,@POOL+65,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 66 Rich Saronite'),
+(@GUID3+65,@POOL+65,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 66 Titanium'),
+(@GUID1+66,@POOL+66,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 67 Saronite'),
+(@GUID2+66,@POOL+66,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 67 Rich Saronite'),
+(@GUID3+66,@POOL+66,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 67 Titanium'),
+(@GUID1+67,@POOL+67,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 68 Saronite'),
+(@GUID2+67,@POOL+67,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 68 Rich Saronite'),
+(@GUID3+67,@POOL+67,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 68 Titanium'),
+(@GUID1+68,@POOL+68,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 69 Saronite'),
+(@GUID2+68,@POOL+68,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 69 Rich Saronite'),
+(@GUID3+68,@POOL+68,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 69 Titanium'),
+(@GUID1+69,@POOL+69,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 70 Saronite'),
+(@GUID2+69,@POOL+69,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 70 Rich Saronite'),
+(@GUID3+69,@POOL+69,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 70 Titanium'),
+(@GUID1+70,@POOL+70,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 71 Saronite'),
+(@GUID2+70,@POOL+70,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 71 Rich Saronite'),
+(@GUID3+70,@POOL+70,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 71 Titanium'),
+(@GUID1+71,@POOL+71,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 72 Saronite'),
+(@GUID2+71,@POOL+71,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 72 Rich Saronite'),
+(@GUID3+71,@POOL+71,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 72 Titanium'),
+(@GUID1+72,@POOL+72,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 73 Saronite'),
+(@GUID2+72,@POOL+72,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 73 Rich Saronite'),
+(@GUID3+72,@POOL+72,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 73 Titanium'),
+(@GUID1+73,@POOL+73,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 74 Saronite'),
+(@GUID2+73,@POOL+73,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 74 Rich Saronite'),
+(@GUID3+73,@POOL+73,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 74 Titanium'),
+(@GUID1+74,@POOL+74,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 75 Saronite'),
+(@GUID2+74,@POOL+74,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 75 Rich Saronite'),
+(@GUID3+74,@POOL+74,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 75 Titanium'),
+(@GUID1+75,@POOL+75,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 76 Saronite'),
+(@GUID2+75,@POOL+75,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 76 Rich Saronite'),
+(@GUID3+75,@POOL+75,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 76 Titanium'),
+(@GUID1+76,@POOL+76,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 77 Saronite'),
+(@GUID2+76,@POOL+76,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 77 Rich Saronite'),
+(@GUID3+76,@POOL+76,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 77 Titanium'),
+(@GUID1+77,@POOL+77,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 78 Saronite'),
+(@GUID2+77,@POOL+77,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 78 Rich Saronite'),
+(@GUID3+77,@POOL+77,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 78 Titanium'),
+(@GUID1+78,@POOL+78,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 79 Saronite'),
+(@GUID2+78,@POOL+78,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 79 Rich Saronite'),
+(@GUID3+78,@POOL+78,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 79 Titanium'),
+(@GUID1+79,@POOL+79,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 80 Saronite'),
+(@GUID2+79,@POOL+79,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 80 Rich Saronite'),
+(@GUID3+79,@POOL+79,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 80 Titanium'),
+(@GUID1+80,@POOL+80,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 81 Saronite'),
+(@GUID2+80,@POOL+80,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 81 Rich Saronite'),
+(@GUID3+80,@POOL+80,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 81 Titanium'),
+(@GUID1+81,@POOL+81,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 82 Saronite'),
+(@GUID2+81,@POOL+81,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 82 Rich Saronite'),
+(@GUID3+81,@POOL+81,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 82 Titanium'),
+(@GUID1+82,@POOL+82,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 83 Saronite'),
+(@GUID2+82,@POOL+82,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 83 Rich Saronite'),
+(@GUID3+82,@POOL+82,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 83 Titanium'),
+(@GUID1+83,@POOL+83,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 84 Saronite'),
+(@GUID2+83,@POOL+83,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 84 Rich Saronite'),
+(@GUID3+83,@POOL+83,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 84 Titanium'),
+(@GUID1+84,@POOL+84,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 85 Saronite'),
+(@GUID2+84,@POOL+84,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 85 Rich Saronite'),
+(@GUID3+84,@POOL+84,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 85 Titanium'),
+(@GUID1+85,@POOL+85,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 86 Saronite'),
+(@GUID2+85,@POOL+85,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 86 Rich Saronite'),
+(@GUID3+85,@POOL+85,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 86 Titanium'),
+(@GUID1+86,@POOL+86,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 87 Saronite'),
+(@GUID2+86,@POOL+86,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 87 Rich Saronite'),
+(@GUID3+86,@POOL+86,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 87 Titanium'),
+(@GUID1+87,@POOL+87,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 88 Saronite'),
+(@GUID2+87,@POOL+87,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 88 Rich Saronite'),
+(@GUID3+87,@POOL+87,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 88 Titanium'),
+(@GUID1+88,@POOL+88,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 89 Saronite'),
+(@GUID2+88,@POOL+88,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 89 Rich Saronite'),
+(@GUID3+88,@POOL+88,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 89 Titanium'),
+(@GUID1+89,@POOL+89,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 90 Saronite'),
+(@GUID2+89,@POOL+89,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 90 Rich Saronite'),
+(@GUID3+89,@POOL+89,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 90 Titanium'),
+(@GUID1+90,@POOL+90,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 91 Saronite'),
+(@GUID2+90,@POOL+90,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 91 Rich Saronite'),
+(@GUID3+90,@POOL+90,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 91 Titanium'),
+(@GUID1+91,@POOL+91,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 92 Saronite'),
+(@GUID2+91,@POOL+91,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 92 Rich Saronite'),
+(@GUID3+91,@POOL+91,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 92 Titanium'),
+(@GUID1+92,@POOL+92,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 93 Saronite'),
+(@GUID2+92,@POOL+92,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 93 Rich Saronite'),
+(@GUID3+92,@POOL+92,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 93 Titanium'),
+(@GUID1+93,@POOL+93,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 94 Saronite'),
+(@GUID2+93,@POOL+93,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 94 Rich Saronite'),
+(@GUID3+93,@POOL+93,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 94 Titanium'),
+(@GUID1+94,@POOL+94,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 95 Saronite'),
+(@GUID2+94,@POOL+94,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 95 Rich Saronite'),
+(@GUID3+94,@POOL+94,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 95 Titanium'),
+(@GUID1+95,@POOL+95,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 96 Saronite'),
+(@GUID2+95,@POOL+95,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 96 Rich Saronite'),
+(@GUID3+95,@POOL+95,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 96 Titanium'),
+(@GUID1+96,@POOL+96,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 97 Saronite'),
+(@GUID2+96,@POOL+96,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 97 Rich Saronite'),
+(@GUID3+96,@POOL+96,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 97 Titanium'),
+(@GUID1+97,@POOL+97,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 98 Saronite'),
+(@GUID2+97,@POOL+97,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 98 Rich Saronite'),
+(@GUID3+97,@POOL+97,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 98 Titanium'),
+(@GUID1+98,@POOL+98,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 99 Saronite'),
+(@GUID2+98,@POOL+98,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 99 Rich Saronite'),
+(@GUID3+98,@POOL+98,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 99 Titanium'),
+(@GUID1+99,@POOL+99,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 100 Saronite'),
+(@GUID2+99,@POOL+99,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 100 Rich Saronite'),
+(@GUID3+99,@POOL+99,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 100 Titanium'),
+(@GUID1+100,@POOL+100,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 101 Saronite'),
+(@GUID2+100,@POOL+100,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 101 Rich Saronite'),
+(@GUID3+100,@POOL+100,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 101 Titanium'),
+(@GUID1+101,@POOL+101,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 102 Saronite'),
+(@GUID2+101,@POOL+101,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 102 Rich Saronite'),
+(@GUID3+101,@POOL+101,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 102 Titanium'),
+(@GUID1+102,@POOL+102,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 103 Saronite'),
+(@GUID2+102,@POOL+102,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 103 Rich Saronite'),
+(@GUID3+102,@POOL+102,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 103 Titanium'),
+(@GUID1+103,@POOL+103,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 104 Saronite'),
+(@GUID2+103,@POOL+103,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 104 Rich Saronite'),
+(@GUID3+103,@POOL+103,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 104 Titanium'),
+(@GUID1+104,@POOL+104,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 105 Saronite'),
+(@GUID2+104,@POOL+104,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 105 Rich Saronite'),
+(@GUID3+104,@POOL+104,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 105 Titanium'),
+(@GUID1+105,@POOL+105,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 106 Saronite'),
+(@GUID2+105,@POOL+105,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 106 Rich Saronite'),
+(@GUID3+105,@POOL+105,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 106 Titanium'),
+(@GUID1+106,@POOL+106,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 107 Saronite'),
+(@GUID2+106,@POOL+106,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 107 Rich Saronite'),
+(@GUID3+106,@POOL+106,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 107 Titanium'),
+(@GUID1+107,@POOL+107,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 108 Saronite'),
+(@GUID2+107,@POOL+107,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 108 Rich Saronite'),
+(@GUID3+107,@POOL+107,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 108 Titanium'),
+(@GUID1+108,@POOL+108,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 109 Saronite'),
+(@GUID2+108,@POOL+108,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 109 Rich Saronite'),
+(@GUID3+108,@POOL+108,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 109 Titanium'),
+(@GUID1+109,@POOL+109,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 110 Saronite'),
+(@GUID2+109,@POOL+109,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 110 Rich Saronite'),
+(@GUID3+109,@POOL+109,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 110 Titanium'),
+(@GUID1+110,@POOL+110,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 111 Saronite'),
+(@GUID2+110,@POOL+110,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 111 Rich Saronite'),
+(@GUID3+110,@POOL+110,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 111 Titanium'),
+(@GUID1+111,@POOL+111,@CHANCE1, 'Sholazar Basin Ore Spawnpoint 112 Saronite'),
+(@GUID2+111,@POOL+111,@CHANCE2, 'Sholazar Basin Ore Spawnpoint 112 Rich Saronite'),
+(@GUID3+111,@POOL+111,@CHANCE3, 'Sholazar Basin Ore Spawnpoint 112 Titanium');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Sholazar Basin Ore Spawnpoint 1'),
+(@POOL+1,1, 'Sholazar Basin Ore Spawnpoint 2'),
+(@POOL+2,1, 'Sholazar Basin Ore Spawnpoint 3'),
+(@POOL+3,1, 'Sholazar Basin Ore Spawnpoint 4'),
+(@POOL+4,1, 'Sholazar Basin Ore Spawnpoint 5'),
+(@POOL+5,1, 'Sholazar Basin Ore Spawnpoint 6'),
+(@POOL+6,1, 'Sholazar Basin Ore Spawnpoint 7'),
+(@POOL+7,1, 'Sholazar Basin Ore Spawnpoint 8'),
+(@POOL+8,1, 'Sholazar Basin Ore Spawnpoint 9'),
+(@POOL+9,1, 'Sholazar Basin Ore Spawnpoint 10'),
+(@POOL+10,1, 'Sholazar Basin Ore Spawnpoint 11'),
+(@POOL+11,1, 'Sholazar Basin Ore Spawnpoint 12'),
+(@POOL+12,1, 'Sholazar Basin Ore Spawnpoint 13'),
+(@POOL+13,1, 'Sholazar Basin Ore Spawnpoint 14'),
+(@POOL+14,1, 'Sholazar Basin Ore Spawnpoint 15'),
+(@POOL+15,1, 'Sholazar Basin Ore Spawnpoint 16'),
+(@POOL+16,1, 'Sholazar Basin Ore Spawnpoint 17'),
+(@POOL+17,1, 'Sholazar Basin Ore Spawnpoint 18'),
+(@POOL+18,1, 'Sholazar Basin Ore Spawnpoint 19'),
+(@POOL+19,1, 'Sholazar Basin Ore Spawnpoint 20'),
+(@POOL+20,1, 'Sholazar Basin Ore Spawnpoint 21'),
+(@POOL+21,1, 'Sholazar Basin Ore Spawnpoint 22'),
+(@POOL+22,1, 'Sholazar Basin Ore Spawnpoint 23'),
+(@POOL+23,1, 'Sholazar Basin Ore Spawnpoint 24'),
+(@POOL+24,1, 'Sholazar Basin Ore Spawnpoint 25'),
+(@POOL+25,1, 'Sholazar Basin Ore Spawnpoint 26'),
+(@POOL+26,1, 'Sholazar Basin Ore Spawnpoint 27'),
+(@POOL+27,1, 'Sholazar Basin Ore Spawnpoint 28'),
+(@POOL+28,1, 'Sholazar Basin Ore Spawnpoint 29'),
+(@POOL+29,1, 'Sholazar Basin Ore Spawnpoint 30'),
+(@POOL+30,1, 'Sholazar Basin Ore Spawnpoint 31'),
+(@POOL+31,1, 'Sholazar Basin Ore Spawnpoint 32'),
+(@POOL+32,1, 'Sholazar Basin Ore Spawnpoint 33'),
+(@POOL+33,1, 'Sholazar Basin Ore Spawnpoint 34'),
+(@POOL+34,1, 'Sholazar Basin Ore Spawnpoint 35'),
+(@POOL+35,1, 'Sholazar Basin Ore Spawnpoint 36'),
+(@POOL+36,1, 'Sholazar Basin Ore Spawnpoint 37'),
+(@POOL+37,1, 'Sholazar Basin Ore Spawnpoint 38'),
+(@POOL+38,1, 'Sholazar Basin Ore Spawnpoint 39'),
+(@POOL+39,1, 'Sholazar Basin Ore Spawnpoint 40'),
+(@POOL+40,1, 'Sholazar Basin Ore Spawnpoint 41'),
+(@POOL+41,1, 'Sholazar Basin Ore Spawnpoint 42'),
+(@POOL+42,1, 'Sholazar Basin Ore Spawnpoint 43'),
+(@POOL+43,1, 'Sholazar Basin Ore Spawnpoint 44'),
+(@POOL+44,1, 'Sholazar Basin Ore Spawnpoint 45'),
+(@POOL+45,1, 'Sholazar Basin Ore Spawnpoint 46'),
+(@POOL+46,1, 'Sholazar Basin Ore Spawnpoint 47'),
+(@POOL+47,1, 'Sholazar Basin Ore Spawnpoint 48'),
+(@POOL+48,1, 'Sholazar Basin Ore Spawnpoint 49'),
+(@POOL+49,1, 'Sholazar Basin Ore Spawnpoint 50'),
+(@POOL+50,1, 'Sholazar Basin Ore Spawnpoint 51'),
+(@POOL+51,1, 'Sholazar Basin Ore Spawnpoint 52'),
+(@POOL+52,1, 'Sholazar Basin Ore Spawnpoint 53'),
+(@POOL+53,1, 'Sholazar Basin Ore Spawnpoint 54'),
+(@POOL+54,1, 'Sholazar Basin Ore Spawnpoint 55'),
+(@POOL+55,1, 'Sholazar Basin Ore Spawnpoint 56'),
+(@POOL+56,1, 'Sholazar Basin Ore Spawnpoint 57'),
+(@POOL+57,1, 'Sholazar Basin Ore Spawnpoint 58'),
+(@POOL+58,1, 'Sholazar Basin Ore Spawnpoint 59'),
+(@POOL+59,1, 'Sholazar Basin Ore Spawnpoint 60'),
+(@POOL+60,1, 'Sholazar Basin Ore Spawnpoint 61'),
+(@POOL+61,1, 'Sholazar Basin Ore Spawnpoint 62'),
+(@POOL+62,1, 'Sholazar Basin Ore Spawnpoint 63'),
+(@POOL+63,1, 'Sholazar Basin Ore Spawnpoint 64'),
+(@POOL+64,1, 'Sholazar Basin Ore Spawnpoint 65'),
+(@POOL+65,1, 'Sholazar Basin Ore Spawnpoint 66'),
+(@POOL+66,1, 'Sholazar Basin Ore Spawnpoint 67'),
+(@POOL+67,1, 'Sholazar Basin Ore Spawnpoint 68'),
+(@POOL+68,1, 'Sholazar Basin Ore Spawnpoint 69'),
+(@POOL+69,1, 'Sholazar Basin Ore Spawnpoint 70'),
+(@POOL+70,1, 'Sholazar Basin Ore Spawnpoint 71'),
+(@POOL+71,1, 'Sholazar Basin Ore Spawnpoint 72'),
+(@POOL+72,1, 'Sholazar Basin Ore Spawnpoint 73'),
+(@POOL+73,1, 'Sholazar Basin Ore Spawnpoint 74'),
+(@POOL+74,1, 'Sholazar Basin Ore Spawnpoint 75'),
+(@POOL+75,1, 'Sholazar Basin Ore Spawnpoint 76'),
+(@POOL+76,1, 'Sholazar Basin Ore Spawnpoint 77'),
+(@POOL+77,1, 'Sholazar Basin Ore Spawnpoint 78'),
+(@POOL+78,1, 'Sholazar Basin Ore Spawnpoint 79'),
+(@POOL+79,1, 'Sholazar Basin Ore Spawnpoint 80'),
+(@POOL+80,1, 'Sholazar Basin Ore Spawnpoint 81'),
+(@POOL+81,1, 'Sholazar Basin Ore Spawnpoint 82'),
+(@POOL+82,1, 'Sholazar Basin Ore Spawnpoint 83'),
+(@POOL+83,1, 'Sholazar Basin Ore Spawnpoint 84'),
+(@POOL+84,1, 'Sholazar Basin Ore Spawnpoint 85'),
+(@POOL+85,1, 'Sholazar Basin Ore Spawnpoint 86'),
+(@POOL+86,1, 'Sholazar Basin Ore Spawnpoint 87'),
+(@POOL+87,1, 'Sholazar Basin Ore Spawnpoint 88'),
+(@POOL+88,1, 'Sholazar Basin Ore Spawnpoint 89'),
+(@POOL+89,1, 'Sholazar Basin Ore Spawnpoint 90'),
+(@POOL+90,1, 'Sholazar Basin Ore Spawnpoint 91'),
+(@POOL+91,1, 'Sholazar Basin Ore Spawnpoint 92'),
+(@POOL+92,1, 'Sholazar Basin Ore Spawnpoint 93'),
+(@POOL+93,1, 'Sholazar Basin Ore Spawnpoint 94'),
+(@POOL+94,1, 'Sholazar Basin Ore Spawnpoint 95'),
+(@POOL+95,1, 'Sholazar Basin Ore Spawnpoint 96'),
+(@POOL+96,1, 'Sholazar Basin Ore Spawnpoint 97'),
+(@POOL+97,1, 'Sholazar Basin Ore Spawnpoint 98'),
+(@POOL+98,1, 'Sholazar Basin Ore Spawnpoint 99'),
+(@POOL+99,1, 'Sholazar Basin Ore Spawnpoint 100'),
+(@POOL+100,1, 'Sholazar Basin Ore Spawnpoint 101'),
+(@POOL+101,1, 'Sholazar Basin Ore Spawnpoint 102'),
+(@POOL+102,1, 'Sholazar Basin Ore Spawnpoint 103'),
+(@POOL+103,1, 'Sholazar Basin Ore Spawnpoint 104'),
+(@POOL+104,1, 'Sholazar Basin Ore Spawnpoint 105'),
+(@POOL+105,1, 'Sholazar Basin Ore Spawnpoint 106'),
+(@POOL+106,1, 'Sholazar Basin Ore Spawnpoint 107'),
+(@POOL+107,1, 'Sholazar Basin Ore Spawnpoint 108'),
+(@POOL+108,1, 'Sholazar Basin Ore Spawnpoint 109'),
+(@POOL+109,1, 'Sholazar Basin Ore Spawnpoint 110'),
+(@POOL+110,1, 'Sholazar Basin Ore Spawnpoint 111'),
+(@POOL+111,1, 'Sholazar Basin Ore Spawnpoint 112');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Sholazar Basin Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 61'),
+(@POOL+61,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 62'),
+(@POOL+62,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 63'),
+(@POOL+63,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 64'),
+(@POOL+64,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 65'),
+(@POOL+65,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 66'),
+(@POOL+66,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 67'),
+(@POOL+67,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 68'),
+(@POOL+68,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 69'),
+(@POOL+69,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 70'),
+(@POOL+70,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 71'),
+(@POOL+71,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 72'),
+(@POOL+72,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 73'),
+(@POOL+73,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 74'),
+(@POOL+74,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 75'),
+(@POOL+75,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 76'),
+(@POOL+76,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 77'),
+(@POOL+77,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 78'),
+(@POOL+78,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 79'),
+(@POOL+79,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 80'),
+(@POOL+80,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 81'),
+(@POOL+81,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 82'),
+(@POOL+82,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 83'),
+(@POOL+83,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 84'),
+(@POOL+84,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 85'),
+(@POOL+85,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 86'),
+(@POOL+86,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 87'),
+(@POOL+87,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 88'),
+(@POOL+88,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 89'),
+(@POOL+89,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 90'),
+(@POOL+90,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 91'),
+(@POOL+91,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 92'),
+(@POOL+92,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 93'),
+(@POOL+93,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 94'),
+(@POOL+94,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 95'),
+(@POOL+95,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 96'),
+(@POOL+96,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 97'),
+(@POOL+97,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 98'),
+(@POOL+98,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 99'),
+(@POOL+99,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 100'),
+(@POOL+100,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 101'),
+(@POOL+101,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 102'),
+(@POOL+102,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 103'),
+(@POOL+103,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 104'),
+(@POOL+104,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 105'),
+(@POOL+105,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 106'),
+(@POOL+106,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 107'),
+(@POOL+107,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 108'),
+(@POOL+108,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 109'),
+(@POOL+109,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 110'),
+(@POOL+110,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 111'),
+(@POOL+111,@MOTHER,0, 'Sholazar Basin Ore Spawnpoint 112');
+
+-- --------------------------------------
+-- -- Fixup ore spawns for Storm Peaks --
+-- --------------------------------------
+SET @RANGE := 250;
+SET @GUID1 := 162450;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @GUID3 := @GUID2 + @RANGE;
+SET @POOL := 11150;
+SET @LASTGUID := 109;
+SET @CHANCE1 := 75;
+SET @CHANCE2 := 15;
+SET @CHANCE3 := 10;
+SET @MOTHER := 9906;
+SET @MOTHER2 := 9907;
+SET @ACTIVE := 35; -- Max number of active spawns
+SET @TIMER := 900; -- Respawn timer in seconds
+-- Remove Ore spawns from Storm Peaks
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < -110 AND `position_y` > -3430 AND `position_x` > 6490;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < -3430 AND `position_x` > 6980;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < -110 AND `position_y` > -1890 AND `position_x` > 6100 AND `position_x` < 6490;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < -230 AND `position_y` > -1195 AND `position_x` > 5790 AND `position_x` < 6100;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 225 AND `position_y` > -30 AND `position_x` > 6920 AND `position_x` < 7200;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 225 AND `position_y` > -110 AND `position_x` > 7300;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` > -4030 AND `position_y` < -2300 AND `position_x` > 6730 AND `position_x` < 6980;
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5376 AND 5447;
+DELETE FROM `pool_template` WHERE `entry`=898;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5376 AND 5447;
+-- Saronite Deposits Storm Peaks
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1,189980,571,1,1,5973.130,-678.799,384.3029,-1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189980,571,1,1,5990.065,-1015.166,446.6375,2.19911,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189980,571,1,1,5990.990,-621.435,374.3110,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189980,571,1,1,6344.363,-785.474,408.0191,-1.86750,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189980,571,1,1,6394.662,-876.401,409.3433,1.27409,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189980,571,1,1,6518.710,-1309.900,407.2080,2.21656,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189980,571,1,1,6523.616,-1265.091,405.4821,-1.58825,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189980,571,1,1,6570.893,-1050.817,432.5308,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189980,571,1,1,6570.996,-1230.147,404.3670,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189980,571,1,1,6571.000,-1230.150,404.3670,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189980,571,1,1,6596.600,-1356.010,410.0870,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189980,571,1,1,6600.015,-977.058,430.9555,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189980,571,1,1,6646.551,-876.419,685.5173,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189980,571,1,1,6657.530,-1251.140,397.5630,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189980,571,1,1,6666.780,-1032.980,413.8020,-0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189980,571,1,1,6675.330,-1195.820,398.5400,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189980,571,1,1,6677.080,-1207.990,398.8300,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189980,571,1,1,6679.290,-1365.290,392.1810,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189980,571,1,1,6688.502,-1112.257,397.3456,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189980,571,1,1,6756.100,-1530.500,369.0680,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189980,571,1,1,6799.450,-1602.820,354.4390,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189980,571,1,1,6816.010,-1364.550,819.6750,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189980,571,1,1,6821.420,-607.278,982.4290,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189980,571,1,1,6831.780,-1599.010,352.3690,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189980,571,1,1,6836.444,-1338.513,819.7522,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189980,571,1,1,6847.579,-1230.780,806.6544,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189980,571,1,1,6866.660,-1725.760,827.2400,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189980,571,1,1,6867.097,-3428.810,629.1428,-1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189980,571,1,1,6879.430,-1237.150,810.2590,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189980,571,1,1,6900.310,-1523.000,359.9120,-0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189980,571,1,1,6927.970,-28.980,805.1720,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189980,571,1,1,6961.172,-6.584,809.1790,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189980,571,1,1,6979.510,-658.492,770.4860,-2.94959,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189980,571,1,1,6981.886,-1205.506,810.1734,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189980,571,1,1,6983.300,-1221.080,809.7370,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189980,571,1,1,6986.340,-1293.410,820.2910,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189980,571,1,1,6994.690,-804.125,736.4880,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189980,571,1,1,6996.860,34.220,810.4850,2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189980,571,1,1,7002.330,-19.649,811.0490,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189980,571,1,1,7005.420,-367.084,788.1000,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189980,571,1,1,7008.100,-503.726,745.1890,-0.13962,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189980,571,1,1,7010.060,90.342,814.8490,0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189980,571,1,1,7019.150,-776.146,732.3610,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189980,571,1,1,7019.820,-1357.060,833.0070,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189980,571,1,3,7032.890,-1319.140,820.8290,0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189980,571,1,1,7051.360,-2016.770,769.8010,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189980,571,1,3,7052.570,-1106.910,934.5030,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189980,571,1,1,7075.710,-1920.550,774.8670,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189980,571,1,1,7075.710,-1920.546,774.8665,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189980,571,1,4,7080.040,-2724.640,756.8140,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189980,571,1,1,7108.708,-390.674,785.4223,-2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189980,571,1,2,7109.325,-2248.944,760.0534,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189980,571,1,1,7110.417,-543.947,739.8368,-0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189980,571,1,1,7122.950,-1096.950,928.4570,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189980,571,1,4,7134.020,-2760.250,786.9060,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189980,571,1,8,7142.310,-3636.810,841.7630,2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189980,571,1,4,7160.350,-2126.890,762.2910,-1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189980,571,1,1,7169.138,-1110.031,933.9944,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189980,571,1,4,7170.760,-2087.910,771.9970,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189980,571,1,1,7171.050,-232.757,808.5810,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189980,571,1,4,7177.672,-2048.255,768.8198,-2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID1+61,189980,571,1,1,7187.288,-1305.361,946.4589,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID1+62,189980,571,1,1,7187.840,220.090,793.1120,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID1+63,189980,571,1,4,7191.417,-2963.443,863.3470,0.71558,0,0,0,1,@TIMER,255,1),
+(@GUID1+64,189980,571,1,4,7201.295,-1976.741,771.9154,2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID1+65,189980,571,1,8,7216.890,-3691.290,822.2200,1.95477,0,0,0,1,@TIMER,255,1),
+(@GUID1+66,189980,571,1,1,7224.430,-993.775,926.9220,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID1+67,189980,571,1,2,7233.571,-3542.979,834.7737,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID1+68,189980,571,1,1,7247.440,-1258.090,922.4690,0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID1+69,189980,571,1,4,7253.561,-2213.503,765.6185,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID1+70,189980,571,1,3,7263.250,-2858.310,784.9630,3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID1+71,189980,571,1,1,7290.680,-158.387,791.6990,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID1+72,189980,571,1,1,7301.970,-1076.270,922.8330,2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID1+73,189980,571,1,4,7308.590,-2918.880,829.2740,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID1+74,189980,571,1,4,7310.649,-2244.919,759.6533,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID1+75,189980,571,1,8,7343.630,-3631.950,827.0680,2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID1+76,189980,571,1,4,7375.280,-2741.830,755.0170,1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID1+77,189980,571,1,1,7402.413,-2801.713,771.3893,2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID1+78,189980,571,1,4,7407.630,-3292.640,865.9170,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+79,189980,571,1,1,7425.510,-124.863,794.2450,-1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID1+80,189980,571,1,4,7440.669,-2350.947,758.8542,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID1+81,189980,571,1,2,7471.304,-2436.701,759.9119,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+82,189980,571,1,1,7610.480,-1368.060,958.4000,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID1+83,189980,571,1,1,7705.490,-3346.280,889.6080,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID1+84,189980,571,1,1,7751.970,-268.932,919.1180,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+85,189980,571,1,1,7776.040,-3094.280,917.4480,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID1+86,189980,571,1,1,7808.350,-82.079,880.2680,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID1+87,189980,571,1,1,7828.840,-115.694,886.1690,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+88,189980,571,1,1,7854.360,49.873,1010.9600,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID1+89,189980,571,1,1,7908.766,124.441,1030.6354,-0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID1+90,189980,571,1,1,7923.454,-2642.304,1139.8401,0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID1+91,189980,571,1,1,8016.460,-2395.760,1161.8300,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+92,189980,571,1,1,8069.040,-2777.400,1050.3100,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID1+93,189980,571,1,1,8106.100,-2241.150,1167.3900,-0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID1+94,189980,571,1,1,8125.980,-218.974,848.5040,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+95,189980,571,1,3,8126.960,-1265.300,1018.4300,-0.99484,0,0,0,1,@TIMER,255,1),
+(@GUID1+96,189980,571,1,1,8136.270,-286.253,867.3590,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+97,189980,571,1,1,8153.250,-392.846,1020.5000,-2.94959,0,0,0,1,@TIMER,255,1),
+(@GUID1+98,189980,571,1,1,8182.390,-729.494,929.5760,1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID1+99,189980,571,1,1,8184.400,-2399.480,1139.6400,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID1+100,189980,571,1,1,8191.020,-2794.480,1044.1400,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID1+101,189980,571,1,1,8196.150,-2734.560,1036.6200,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID1+102,189980,571,1,1,8223.970,-674.648,933.0660,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID1+103,189980,571,1,1,8239.630,-2988.430,1087.3600,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID1+104,189980,571,1,1,8286.560,-212.827,889.2710,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+105,189980,571,1,1,8292.716,-2688.017,1036.6243,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID1+106,189980,571,1,1,8297.316,-1323.155,989.2230,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID1+107,189980,571,1,1,8443.600,-1578.120,1038.2500,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID1+108,189980,571,1,1,8569.773,-1292.149,544.9063,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+109,189980,571,1,1,8636.965,-1181.421,539.1292,-1.32645,0,0,0,1,@TIMER,255,1);
+-- Rich Saronite Deposits Storm Peaks
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID2,189981,571,1,1,5973.130,-678.799,384.3029,-1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189981,571,1,1,5990.065,-1015.166,446.6375,2.19911,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189981,571,1,1,5990.990,-621.435,374.3110,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189981,571,1,1,6344.363,-785.474,408.0191,-1.86750,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189981,571,1,1,6394.662,-876.401,409.3433,1.27409,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189981,571,1,1,6518.710,-1309.900,407.2080,2.21656,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189981,571,1,1,6523.616,-1265.091,405.4821,-1.58825,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189981,571,1,1,6570.893,-1050.817,432.5308,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189981,571,1,1,6570.996,-1230.147,404.3670,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189981,571,1,1,6571.000,-1230.150,404.3670,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189981,571,1,1,6596.600,-1356.010,410.0870,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189981,571,1,1,6600.015,-977.058,430.9555,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189981,571,1,1,6646.551,-876.419,685.5173,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189981,571,1,1,6657.530,-1251.140,397.5630,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189981,571,1,1,6666.780,-1032.980,413.8020,-0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189981,571,1,1,6675.330,-1195.820,398.5400,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189981,571,1,1,6677.080,-1207.990,398.8300,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189981,571,1,1,6679.290,-1365.290,392.1810,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189981,571,1,1,6688.502,-1112.257,397.3456,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189981,571,1,1,6756.100,-1530.500,369.0680,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189981,571,1,1,6799.450,-1602.820,354.4390,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189981,571,1,1,6816.010,-1364.550,819.6750,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189981,571,1,1,6821.420,-607.278,982.4290,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID2+23,189981,571,1,1,6831.780,-1599.010,352.3690,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189981,571,1,1,6836.444,-1338.513,819.7522,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189981,571,1,1,6847.579,-1230.780,806.6544,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189981,571,1,1,6866.660,-1725.760,827.2400,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189981,571,1,1,6867.097,-3428.810,629.1428,-1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189981,571,1,1,6879.430,-1237.150,810.2590,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189981,571,1,1,6900.310,-1523.000,359.9120,-0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189981,571,1,1,6927.970,-28.980,805.1720,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189981,571,1,1,6961.172,-6.584,809.1790,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189981,571,1,1,6979.510,-658.492,770.4860,-2.94959,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189981,571,1,1,6981.886,-1205.506,810.1734,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189981,571,1,1,6983.300,-1221.080,809.7370,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189981,571,1,1,6986.340,-1293.410,820.2910,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189981,571,1,1,6994.690,-804.125,736.4880,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189981,571,1,1,6996.860,34.220,810.4850,2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189981,571,1,1,7002.330,-19.649,811.0490,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189981,571,1,1,7005.420,-367.084,788.1000,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189981,571,1,1,7008.100,-503.726,745.1890,-0.13962,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189981,571,1,1,7010.060,90.342,814.8490,0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189981,571,1,1,7019.150,-776.146,732.3610,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189981,571,1,1,7019.820,-1357.060,833.0070,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189981,571,1,3,7032.890,-1319.140,820.8290,0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189981,571,1,1,7051.360,-2016.770,769.8010,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189981,571,1,3,7052.570,-1106.910,934.5030,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+47,189981,571,1,1,7075.710,-1920.550,774.8670,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+48,189981,571,1,1,7075.710,-1920.546,774.8665,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189981,571,1,4,7080.040,-2724.640,756.8140,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189981,571,1,1,7108.708,-390.674,785.4223,-2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189981,571,1,2,7109.325,-2248.944,760.0534,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189981,571,1,1,7110.417,-543.947,739.8368,-0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189981,571,1,1,7122.950,-1096.950,928.4570,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189981,571,1,4,7134.020,-2760.250,786.9060,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189981,571,1,8,7142.310,-3636.810,841.7630,2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189981,571,1,4,7160.350,-2126.890,762.2910,-1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189981,571,1,1,7169.138,-1110.031,933.9944,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189981,571,1,4,7170.760,-2087.910,771.9970,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189981,571,1,1,7171.050,-232.757,808.5810,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189981,571,1,4,7177.672,-2048.255,768.8198,-2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID2+61,189981,571,1,1,7187.288,-1305.361,946.4589,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID2+62,189981,571,1,1,7187.840,220.090,793.1120,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID2+63,189981,571,1,4,7191.417,-2963.443,863.3470,0.71558,0,0,0,1,@TIMER,255,1),
+(@GUID2+64,189981,571,1,4,7201.295,-1976.741,771.9154,2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID2+65,189981,571,1,8,7216.890,-3691.290,822.2200,1.95477,0,0,0,1,@TIMER,255,1),
+(@GUID2+66,189981,571,1,1,7224.430,-993.775,926.9220,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID2+67,189981,571,1,2,7233.571,-3542.979,834.7737,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID2+68,189981,571,1,1,7247.440,-1258.090,922.4690,0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID2+69,189981,571,1,4,7253.561,-2213.503,765.6185,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID2+70,189981,571,1,3,7263.250,-2858.310,784.9630,3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID2+71,189981,571,1,1,7290.680,-158.387,791.6990,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID2+72,189981,571,1,1,7301.970,-1076.270,922.8330,2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID2+73,189981,571,1,4,7308.590,-2918.880,829.2740,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID2+74,189981,571,1,4,7310.649,-2244.919,759.6533,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID2+75,189981,571,1,8,7343.630,-3631.950,827.0680,2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID2+76,189981,571,1,4,7375.280,-2741.830,755.0170,1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID2+77,189981,571,1,1,7402.413,-2801.713,771.3893,2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID2+78,189981,571,1,4,7407.630,-3292.640,865.9170,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+79,189981,571,1,1,7425.510,-124.863,794.2450,-1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID2+80,189981,571,1,4,7440.669,-2350.947,758.8542,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID2+81,189981,571,1,2,7471.304,-2436.701,759.9119,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+82,189981,571,1,1,7610.480,-1368.060,958.4000,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID2+83,189981,571,1,1,7705.490,-3346.280,889.6080,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID2+84,189981,571,1,1,7751.970,-268.932,919.1180,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+85,189981,571,1,1,7776.040,-3094.280,917.4480,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID2+86,189981,571,1,1,7808.350,-82.079,880.2680,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID2+87,189981,571,1,1,7828.840,-115.694,886.1690,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+88,189981,571,1,1,7854.360,49.873,1010.9600,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID2+89,189981,571,1,1,7908.766,124.441,1030.6354,-0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID2+90,189981,571,1,1,7923.454,-2642.304,1139.8401,0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID2+91,189981,571,1,1,8016.460,-2395.760,1161.8300,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+92,189981,571,1,1,8069.040,-2777.400,1050.3100,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID2+93,189981,571,1,1,8106.100,-2241.150,1167.3900,-0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID2+94,189981,571,1,1,8125.980,-218.974,848.5040,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+95,189981,571,1,3,8126.960,-1265.300,1018.4300,-0.99484,0,0,0,1,@TIMER,255,1),
+(@GUID2+96,189981,571,1,1,8136.270,-286.253,867.3590,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID2+97,189981,571,1,1,8153.250,-392.846,1020.5000,-2.94959,0,0,0,1,@TIMER,255,1),
+(@GUID2+98,189981,571,1,1,8182.390,-729.494,929.5760,1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID2+99,189981,571,1,1,8184.400,-2399.480,1139.6400,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID2+100,189981,571,1,1,8191.020,-2794.480,1044.1400,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID2+101,189981,571,1,1,8196.150,-2734.560,1036.6200,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID2+102,189981,571,1,1,8223.970,-674.648,933.0660,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID2+103,189981,571,1,1,8239.630,-2988.430,1087.3600,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID2+104,189981,571,1,1,8286.560,-212.827,889.2710,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+105,189981,571,1,1,8292.716,-2688.017,1036.6243,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID2+106,189981,571,1,1,8297.316,-1323.155,989.2230,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID2+107,189981,571,1,1,8443.600,-1578.120,1038.2500,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID2+108,189981,571,1,1,8569.773,-1292.149,544.9063,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+109,189981,571,1,1,8636.965,-1181.421,539.1292,-1.32645,0,0,0,1,@TIMER,255,1);
+-- Titanium Deposits Storm Peaks
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID3,191133,571,1,1,5973.130,-678.799,384.3029,-1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID3+1,191133,571,1,1,5990.065,-1015.166,446.6375,2.19911,0,0,0,1,@TIMER,255,1),
+(@GUID3+2,191133,571,1,1,5990.990,-621.435,374.3110,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID3+3,191133,571,1,1,6344.363,-785.474,408.0191,-1.86750,0,0,0,1,@TIMER,255,1),
+(@GUID3+4,191133,571,1,1,6394.662,-876.401,409.3433,1.27409,0,0,0,1,@TIMER,255,1),
+(@GUID3+5,191133,571,1,1,6518.710,-1309.900,407.2080,2.21656,0,0,0,1,@TIMER,255,1),
+(@GUID3+6,191133,571,1,1,6523.616,-1265.091,405.4821,-1.58825,0,0,0,1,@TIMER,255,1),
+(@GUID3+7,191133,571,1,1,6570.893,-1050.817,432.5308,-1.36136,0,0,0,1,@TIMER,255,1),
+(@GUID3+8,191133,571,1,1,6570.996,-1230.147,404.3670,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID3+9,191133,571,1,1,6571.000,-1230.150,404.3670,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID3+10,191133,571,1,1,6596.600,-1356.010,410.0870,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+11,191133,571,1,1,6600.015,-977.058,430.9555,1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID3+12,191133,571,1,1,6646.551,-876.419,685.5173,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID3+13,191133,571,1,1,6657.530,-1251.140,397.5630,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID3+14,191133,571,1,1,6666.780,-1032.980,413.8020,-0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID3+15,191133,571,1,1,6675.330,-1195.820,398.5400,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID3+16,191133,571,1,1,6677.080,-1207.990,398.8300,-1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID3+17,191133,571,1,1,6679.290,-1365.290,392.1810,2.87979,0,0,0,1,@TIMER,255,1),
+(@GUID3+18,191133,571,1,1,6688.502,-1112.257,397.3456,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+19,191133,571,1,1,6756.100,-1530.500,369.0680,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID3+20,191133,571,1,1,6799.450,-1602.820,354.4390,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID3+21,191133,571,1,1,6816.010,-1364.550,819.6750,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID3+22,191133,571,1,1,6821.420,-607.278,982.4290,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID3+23,191133,571,1,1,6831.780,-1599.010,352.3690,1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID3+24,191133,571,1,1,6836.444,-1338.513,819.7522,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID3+25,191133,571,1,1,6847.579,-1230.780,806.6544,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID3+26,191133,571,1,1,6866.660,-1725.760,827.2400,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID3+27,191133,571,1,1,6867.097,-3428.810,629.1428,-1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID3+28,191133,571,1,1,6879.430,-1237.150,810.2590,1.39626,0,0,0,1,@TIMER,255,1),
+(@GUID3+29,191133,571,1,1,6900.310,-1523.000,359.9120,-0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID3+30,191133,571,1,1,6927.970,-28.980,805.1720,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID3+31,191133,571,1,1,6961.172,-6.584,809.1790,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID3+32,191133,571,1,1,6979.510,-658.492,770.4860,-2.94959,0,0,0,1,@TIMER,255,1),
+(@GUID3+33,191133,571,1,1,6981.886,-1205.506,810.1734,2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID3+34,191133,571,1,1,6983.300,-1221.080,809.7370,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID3+35,191133,571,1,1,6986.340,-1293.410,820.2910,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+36,191133,571,1,1,6994.690,-804.125,736.4880,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID3+37,191133,571,1,1,6996.860,34.220,810.4850,2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID3+38,191133,571,1,1,7002.330,-19.649,811.0490,-1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID3+39,191133,571,1,1,7005.420,-367.084,788.1000,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID3+40,191133,571,1,1,7008.100,-503.726,745.1890,-0.13962,0,0,0,1,@TIMER,255,1),
+(@GUID3+41,191133,571,1,1,7010.060,90.342,814.8490,0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID3+42,191133,571,1,1,7019.150,-776.146,732.3610,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID3+43,191133,571,1,1,7019.820,-1357.060,833.0070,-0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID3+44,191133,571,1,3,7032.890,-1319.140,820.8290,0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID3+45,191133,571,1,1,7051.360,-2016.770,769.8010,-0.78540,0,0,0,1,@TIMER,255,1),
+(@GUID3+46,191133,571,1,3,7052.570,-1106.910,934.5030,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID3+47,191133,571,1,1,7075.710,-1920.550,774.8670,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID3+48,191133,571,1,1,7075.710,-1920.546,774.8665,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID3+49,191133,571,1,4,7080.040,-2724.640,756.8140,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID3+50,191133,571,1,1,7108.708,-390.674,785.4223,-2.60054,0,0,0,1,@TIMER,255,1),
+(@GUID3+51,191133,571,1,2,7109.325,-2248.944,760.0534,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID3+52,191133,571,1,1,7110.417,-543.947,739.8368,-0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID3+53,191133,571,1,1,7122.950,-1096.950,928.4570,0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID3+54,191133,571,1,4,7134.020,-2760.250,786.9060,0.22689,0,0,0,1,@TIMER,255,1),
+(@GUID3+55,191133,571,1,8,7142.310,-3636.810,841.7630,2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID3+56,191133,571,1,4,7160.350,-2126.890,762.2910,-1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID3+57,191133,571,1,1,7169.138,-1110.031,933.9944,2.56563,0,0,0,1,@TIMER,255,1),
+(@GUID3+58,191133,571,1,4,7170.760,-2087.910,771.9970,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID3+59,191133,571,1,1,7171.050,-232.757,808.5810,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID3+60,191133,571,1,4,7177.672,-2048.255,768.8198,-2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID3+61,191133,571,1,1,7187.288,-1305.361,946.4589,0.10472,0,0,0,1,@TIMER,255,1),
+(@GUID3+62,191133,571,1,1,7187.840,220.090,793.1120,-2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID3+63,191133,571,1,4,7191.417,-2963.443,863.3470,0.71558,0,0,0,1,@TIMER,255,1),
+(@GUID3+64,191133,571,1,4,7201.295,-1976.741,771.9154,2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID3+65,191133,571,1,8,7216.890,-3691.290,822.2200,1.95477,0,0,0,1,@TIMER,255,1),
+(@GUID3+66,191133,571,1,1,7224.430,-993.775,926.9220,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID3+67,191133,571,1,2,7233.571,-3542.979,834.7737,1.64061,0,0,0,1,@TIMER,255,1),
+(@GUID3+68,191133,571,1,1,7247.440,-1258.090,922.4690,0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID3+69,191133,571,1,4,7253.561,-2213.503,765.6185,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID3+70,191133,571,1,3,7263.250,-2858.310,784.9630,3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID3+71,191133,571,1,1,7290.680,-158.387,791.6990,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID3+72,191133,571,1,1,7301.970,-1076.270,922.8330,2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID3+73,191133,571,1,4,7308.590,-2918.880,829.2740,2.18166,0,0,0,1,@TIMER,255,1),
+(@GUID3+74,191133,571,1,4,7310.649,-2244.919,759.6533,2.79252,0,0,0,1,@TIMER,255,1),
+(@GUID3+75,191133,571,1,8,7343.630,-3631.950,827.0680,2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID3+76,191133,571,1,4,7375.280,-2741.830,755.0170,1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID3+77,191133,571,1,1,7402.413,-2801.713,771.3893,2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID3+78,191133,571,1,4,7407.630,-3292.640,865.9170,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+79,191133,571,1,1,7425.510,-124.863,794.2450,-1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID3+80,191133,571,1,4,7440.669,-2350.947,758.8542,-2.58308,0,0,0,1,@TIMER,255,1),
+(@GUID3+81,191133,571,1,2,7471.304,-2436.701,759.9119,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID3+82,191133,571,1,1,7610.480,-1368.060,958.4000,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID3+83,191133,571,1,1,7705.490,-3346.280,889.6080,-0.06981,0,0,0,1,@TIMER,255,1),
+(@GUID3+84,191133,571,1,1,7751.970,-268.932,919.1180,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID3+85,191133,571,1,1,7776.040,-3094.280,917.4480,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID3+86,191133,571,1,1,7808.350,-82.079,880.2680,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID3+87,191133,571,1,1,7828.840,-115.694,886.1690,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+88,191133,571,1,1,7854.360,49.873,1010.9600,2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID3+89,191133,571,1,1,7908.766,124.441,1030.6354,-0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID3+90,191133,571,1,1,7923.454,-2642.304,1139.8401,0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID3+91,191133,571,1,1,8016.460,-2395.760,1161.8300,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID3+92,191133,571,1,1,8069.040,-2777.400,1050.3100,-1.23918,0,0,0,1,@TIMER,255,1),
+(@GUID3+93,191133,571,1,1,8106.100,-2241.150,1167.3900,-0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID3+94,191133,571,1,1,8125.980,-218.974,848.5040,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+95,191133,571,1,3,8126.960,-1265.300,1018.4300,-0.99484,0,0,0,1,@TIMER,255,1),
+(@GUID3+96,191133,571,1,1,8136.270,-286.253,867.3590,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID3+97,191133,571,1,1,8153.250,-392.846,1020.5000,-2.94959,0,0,0,1,@TIMER,255,1),
+(@GUID3+98,191133,571,1,1,8182.390,-729.494,929.5760,1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID3+99,191133,571,1,1,8184.400,-2399.480,1139.6400,-0.69813,0,0,0,1,@TIMER,255,1),
+(@GUID3+100,191133,571,1,1,8191.020,-2794.480,1044.1400,-2.75761,0,0,0,1,@TIMER,255,1),
+(@GUID3+101,191133,571,1,1,8196.150,-2734.560,1036.6200,-2.84488,0,0,0,1,@TIMER,255,1),
+(@GUID3+102,191133,571,1,1,8223.970,-674.648,933.0660,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID3+103,191133,571,1,1,8239.630,-2988.430,1087.3600,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID3+104,191133,571,1,1,8286.560,-212.827,889.2710,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+105,191133,571,1,1,8292.716,-2688.017,1036.6243,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID3+106,191133,571,1,1,8297.316,-1323.155,989.2230,3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID3+107,191133,571,1,1,8443.600,-1578.120,1038.2500,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID3+108,191133,571,1,1,8569.773,-1292.149,544.9063,1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID3+109,191133,571,1,1,8636.965,-1181.421,539.1292,-1.32645,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@RANGE;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@RANGE;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID3 AND @GUID3+@RANGE;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Storm Peaks Ore Spawnpoint 1 Saronite'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Storm Peaks Ore Spawnpoint 1 Rich Saronite'),
+(@GUID3+0,@POOL+0,@CHANCE3, 'Storm Peaks Ore Spawnpoint 1 Titanium'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Storm Peaks Ore Spawnpoint 2 Saronite'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Storm Peaks Ore Spawnpoint 2 Rich Saronite'),
+(@GUID3+1,@POOL+1,@CHANCE3, 'Storm Peaks Ore Spawnpoint 2 Titanium'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Storm Peaks Ore Spawnpoint 3 Saronite'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Storm Peaks Ore Spawnpoint 3 Rich Saronite'),
+(@GUID3+2,@POOL+2,@CHANCE3, 'Storm Peaks Ore Spawnpoint 3 Titanium'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Storm Peaks Ore Spawnpoint 4 Saronite'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Storm Peaks Ore Spawnpoint 4 Rich Saronite'),
+(@GUID3+3,@POOL+3,@CHANCE3, 'Storm Peaks Ore Spawnpoint 4 Titanium'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Storm Peaks Ore Spawnpoint 5 Saronite'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Storm Peaks Ore Spawnpoint 5 Rich Saronite'),
+(@GUID3+4,@POOL+4,@CHANCE3, 'Storm Peaks Ore Spawnpoint 5 Titanium'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Storm Peaks Ore Spawnpoint 6 Saronite'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Storm Peaks Ore Spawnpoint 6 Rich Saronite'),
+(@GUID3+5,@POOL+5,@CHANCE3, 'Storm Peaks Ore Spawnpoint 6 Titanium'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Storm Peaks Ore Spawnpoint 7 Saronite'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Storm Peaks Ore Spawnpoint 7 Rich Saronite'),
+(@GUID3+6,@POOL+6,@CHANCE3, 'Storm Peaks Ore Spawnpoint 7 Titanium'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Storm Peaks Ore Spawnpoint 8 Saronite'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Storm Peaks Ore Spawnpoint 8 Rich Saronite'),
+(@GUID3+7,@POOL+7,@CHANCE3, 'Storm Peaks Ore Spawnpoint 8 Titanium'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Storm Peaks Ore Spawnpoint 9 Saronite'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Storm Peaks Ore Spawnpoint 9 Rich Saronite'),
+(@GUID3+8,@POOL+8,@CHANCE3, 'Storm Peaks Ore Spawnpoint 9 Titanium'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Storm Peaks Ore Spawnpoint 10 Saronite'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Storm Peaks Ore Spawnpoint 10 Rich Saronite'),
+(@GUID3+9,@POOL+9,@CHANCE3, 'Storm Peaks Ore Spawnpoint 10 Titanium'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Storm Peaks Ore Spawnpoint 11 Saronite'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Storm Peaks Ore Spawnpoint 11 Rich Saronite'),
+(@GUID3+10,@POOL+10,@CHANCE3, 'Storm Peaks Ore Spawnpoint 11 Titanium'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Storm Peaks Ore Spawnpoint 12 Saronite'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Storm Peaks Ore Spawnpoint 12 Rich Saronite'),
+(@GUID3+11,@POOL+11,@CHANCE3, 'Storm Peaks Ore Spawnpoint 12 Titanium'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Storm Peaks Ore Spawnpoint 13 Saronite'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Storm Peaks Ore Spawnpoint 13 Rich Saronite'),
+(@GUID3+12,@POOL+12,@CHANCE3, 'Storm Peaks Ore Spawnpoint 13 Titanium'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Storm Peaks Ore Spawnpoint 14 Saronite'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Storm Peaks Ore Spawnpoint 14 Rich Saronite'),
+(@GUID3+13,@POOL+13,@CHANCE3, 'Storm Peaks Ore Spawnpoint 14 Titanium'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Storm Peaks Ore Spawnpoint 15 Saronite'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Storm Peaks Ore Spawnpoint 15 Rich Saronite'),
+(@GUID3+14,@POOL+14,@CHANCE3, 'Storm Peaks Ore Spawnpoint 15 Titanium'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Storm Peaks Ore Spawnpoint 16 Saronite'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Storm Peaks Ore Spawnpoint 16 Rich Saronite'),
+(@GUID3+15,@POOL+15,@CHANCE3, 'Storm Peaks Ore Spawnpoint 16 Titanium'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Storm Peaks Ore Spawnpoint 17 Saronite'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Storm Peaks Ore Spawnpoint 17 Rich Saronite'),
+(@GUID3+16,@POOL+16,@CHANCE3, 'Storm Peaks Ore Spawnpoint 17 Titanium'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Storm Peaks Ore Spawnpoint 18 Saronite'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Storm Peaks Ore Spawnpoint 18 Rich Saronite'),
+(@GUID3+17,@POOL+17,@CHANCE3, 'Storm Peaks Ore Spawnpoint 18 Titanium'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Storm Peaks Ore Spawnpoint 19 Saronite'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Storm Peaks Ore Spawnpoint 19 Rich Saronite'),
+(@GUID3+18,@POOL+18,@CHANCE3, 'Storm Peaks Ore Spawnpoint 19 Titanium'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Storm Peaks Ore Spawnpoint 20 Saronite'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Storm Peaks Ore Spawnpoint 20 Rich Saronite'),
+(@GUID3+19,@POOL+19,@CHANCE3, 'Storm Peaks Ore Spawnpoint 20 Titanium'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Storm Peaks Ore Spawnpoint 21 Saronite'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Storm Peaks Ore Spawnpoint 21 Rich Saronite'),
+(@GUID3+20,@POOL+20,@CHANCE3, 'Storm Peaks Ore Spawnpoint 21 Titanium'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Storm Peaks Ore Spawnpoint 22 Saronite'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Storm Peaks Ore Spawnpoint 22 Rich Saronite'),
+(@GUID3+21,@POOL+21,@CHANCE3, 'Storm Peaks Ore Spawnpoint 22 Titanium'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Storm Peaks Ore Spawnpoint 23 Saronite'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Storm Peaks Ore Spawnpoint 23 Rich Saronite'),
+(@GUID3+22,@POOL+22,@CHANCE3, 'Storm Peaks Ore Spawnpoint 23 Titanium'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Storm Peaks Ore Spawnpoint 24 Saronite'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Storm Peaks Ore Spawnpoint 24 Rich Saronite'),
+(@GUID3+23,@POOL+23,@CHANCE3, 'Storm Peaks Ore Spawnpoint 24 Titanium'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Storm Peaks Ore Spawnpoint 25 Saronite'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Storm Peaks Ore Spawnpoint 25 Rich Saronite'),
+(@GUID3+24,@POOL+24,@CHANCE3, 'Storm Peaks Ore Spawnpoint 25 Titanium'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Storm Peaks Ore Spawnpoint 26 Saronite'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Storm Peaks Ore Spawnpoint 26 Rich Saronite'),
+(@GUID3+25,@POOL+25,@CHANCE3, 'Storm Peaks Ore Spawnpoint 26 Titanium'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Storm Peaks Ore Spawnpoint 27 Saronite'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Storm Peaks Ore Spawnpoint 27 Rich Saronite'),
+(@GUID3+26,@POOL+26,@CHANCE3, 'Storm Peaks Ore Spawnpoint 27 Titanium'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Storm Peaks Ore Spawnpoint 28 Saronite'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Storm Peaks Ore Spawnpoint 28 Rich Saronite'),
+(@GUID3+27,@POOL+27,@CHANCE3, 'Storm Peaks Ore Spawnpoint 28 Titanium'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Storm Peaks Ore Spawnpoint 29 Saronite'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Storm Peaks Ore Spawnpoint 29 Rich Saronite'),
+(@GUID3+28,@POOL+28,@CHANCE3, 'Storm Peaks Ore Spawnpoint 29 Titanium'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Storm Peaks Ore Spawnpoint 30 Saronite'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Storm Peaks Ore Spawnpoint 30 Rich Saronite'),
+(@GUID3+29,@POOL+29,@CHANCE3, 'Storm Peaks Ore Spawnpoint 30 Titanium'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Storm Peaks Ore Spawnpoint 31 Saronite'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Storm Peaks Ore Spawnpoint 31 Rich Saronite'),
+(@GUID3+30,@POOL+30,@CHANCE3, 'Storm Peaks Ore Spawnpoint 31 Titanium'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Storm Peaks Ore Spawnpoint 32 Saronite'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Storm Peaks Ore Spawnpoint 32 Rich Saronite'),
+(@GUID3+31,@POOL+31,@CHANCE3, 'Storm Peaks Ore Spawnpoint 32 Titanium'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Storm Peaks Ore Spawnpoint 33 Saronite'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Storm Peaks Ore Spawnpoint 33 Rich Saronite'),
+(@GUID3+32,@POOL+32,@CHANCE3, 'Storm Peaks Ore Spawnpoint 33 Titanium'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Storm Peaks Ore Spawnpoint 34 Saronite'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Storm Peaks Ore Spawnpoint 34 Rich Saronite'),
+(@GUID3+33,@POOL+33,@CHANCE3, 'Storm Peaks Ore Spawnpoint 34 Titanium'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Storm Peaks Ore Spawnpoint 35 Saronite'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Storm Peaks Ore Spawnpoint 35 Rich Saronite'),
+(@GUID3+34,@POOL+34,@CHANCE3, 'Storm Peaks Ore Spawnpoint 35 Titanium'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Storm Peaks Ore Spawnpoint 36 Saronite'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Storm Peaks Ore Spawnpoint 36 Rich Saronite'),
+(@GUID3+35,@POOL+35,@CHANCE3, 'Storm Peaks Ore Spawnpoint 36 Titanium'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Storm Peaks Ore Spawnpoint 37 Saronite'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Storm Peaks Ore Spawnpoint 37 Rich Saronite'),
+(@GUID3+36,@POOL+36,@CHANCE3, 'Storm Peaks Ore Spawnpoint 37 Titanium'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Storm Peaks Ore Spawnpoint 38 Saronite'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Storm Peaks Ore Spawnpoint 38 Rich Saronite'),
+(@GUID3+37,@POOL+37,@CHANCE3, 'Storm Peaks Ore Spawnpoint 38 Titanium'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Storm Peaks Ore Spawnpoint 39 Saronite'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Storm Peaks Ore Spawnpoint 39 Rich Saronite'),
+(@GUID3+38,@POOL+38,@CHANCE3, 'Storm Peaks Ore Spawnpoint 39 Titanium'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Storm Peaks Ore Spawnpoint 40 Saronite'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Storm Peaks Ore Spawnpoint 40 Rich Saronite'),
+(@GUID3+39,@POOL+39,@CHANCE3, 'Storm Peaks Ore Spawnpoint 40 Titanium'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Storm Peaks Ore Spawnpoint 41 Saronite'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Storm Peaks Ore Spawnpoint 41 Rich Saronite'),
+(@GUID3+40,@POOL+40,@CHANCE3, 'Storm Peaks Ore Spawnpoint 41 Titanium'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Storm Peaks Ore Spawnpoint 42 Saronite'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Storm Peaks Ore Spawnpoint 42 Rich Saronite'),
+(@GUID3+41,@POOL+41,@CHANCE3, 'Storm Peaks Ore Spawnpoint 42 Titanium'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Storm Peaks Ore Spawnpoint 43 Saronite'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Storm Peaks Ore Spawnpoint 43 Rich Saronite'),
+(@GUID3+42,@POOL+42,@CHANCE3, 'Storm Peaks Ore Spawnpoint 43 Titanium'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Storm Peaks Ore Spawnpoint 44 Saronite'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Storm Peaks Ore Spawnpoint 44 Rich Saronite'),
+(@GUID3+43,@POOL+43,@CHANCE3, 'Storm Peaks Ore Spawnpoint 44 Titanium'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Storm Peaks Ore Spawnpoint 45 Saronite'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Storm Peaks Ore Spawnpoint 45 Rich Saronite'),
+(@GUID3+44,@POOL+44,@CHANCE3, 'Storm Peaks Ore Spawnpoint 45 Titanium'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Storm Peaks Ore Spawnpoint 46 Saronite'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Storm Peaks Ore Spawnpoint 46 Rich Saronite'),
+(@GUID3+45,@POOL+45,@CHANCE3, 'Storm Peaks Ore Spawnpoint 46 Titanium'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Storm Peaks Ore Spawnpoint 47 Saronite'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Storm Peaks Ore Spawnpoint 47 Rich Saronite'),
+(@GUID3+46,@POOL+46,@CHANCE3, 'Storm Peaks Ore Spawnpoint 47 Titanium'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Storm Peaks Ore Spawnpoint 48 Saronite'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Storm Peaks Ore Spawnpoint 48 Rich Saronite'),
+(@GUID3+47,@POOL+47,@CHANCE3, 'Storm Peaks Ore Spawnpoint 48 Titanium'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Storm Peaks Ore Spawnpoint 49 Saronite'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Storm Peaks Ore Spawnpoint 49 Rich Saronite'),
+(@GUID3+48,@POOL+48,@CHANCE3, 'Storm Peaks Ore Spawnpoint 49 Titanium'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Storm Peaks Ore Spawnpoint 50 Saronite'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Storm Peaks Ore Spawnpoint 50 Rich Saronite'),
+(@GUID3+49,@POOL+49,@CHANCE3, 'Storm Peaks Ore Spawnpoint 50 Titanium'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Storm Peaks Ore Spawnpoint 51 Saronite'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Storm Peaks Ore Spawnpoint 51 Rich Saronite'),
+(@GUID3+50,@POOL+50,@CHANCE3, 'Storm Peaks Ore Spawnpoint 51 Titanium'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Storm Peaks Ore Spawnpoint 52 Saronite'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Storm Peaks Ore Spawnpoint 52 Rich Saronite'),
+(@GUID3+51,@POOL+51,@CHANCE3, 'Storm Peaks Ore Spawnpoint 52 Titanium'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Storm Peaks Ore Spawnpoint 53 Saronite'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Storm Peaks Ore Spawnpoint 53 Rich Saronite'),
+(@GUID3+52,@POOL+52,@CHANCE3, 'Storm Peaks Ore Spawnpoint 53 Titanium'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Storm Peaks Ore Spawnpoint 54 Saronite'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Storm Peaks Ore Spawnpoint 54 Rich Saronite'),
+(@GUID3+53,@POOL+53,@CHANCE3, 'Storm Peaks Ore Spawnpoint 54 Titanium'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Storm Peaks Ore Spawnpoint 55 Saronite'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Storm Peaks Ore Spawnpoint 55 Rich Saronite'),
+(@GUID3+54,@POOL+54,@CHANCE3, 'Storm Peaks Ore Spawnpoint 55 Titanium'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Storm Peaks Ore Spawnpoint 56 Saronite'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Storm Peaks Ore Spawnpoint 56 Rich Saronite'),
+(@GUID3+55,@POOL+55,@CHANCE3, 'Storm Peaks Ore Spawnpoint 56 Titanium'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Storm Peaks Ore Spawnpoint 57 Saronite'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Storm Peaks Ore Spawnpoint 57 Rich Saronite'),
+(@GUID3+56,@POOL+56,@CHANCE3, 'Storm Peaks Ore Spawnpoint 57 Titanium'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Storm Peaks Ore Spawnpoint 58 Saronite'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Storm Peaks Ore Spawnpoint 58 Rich Saronite'),
+(@GUID3+57,@POOL+57,@CHANCE3, 'Storm Peaks Ore Spawnpoint 58 Titanium'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Storm Peaks Ore Spawnpoint 59 Saronite'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Storm Peaks Ore Spawnpoint 59 Rich Saronite'),
+(@GUID3+58,@POOL+58,@CHANCE3, 'Storm Peaks Ore Spawnpoint 59 Titanium'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Storm Peaks Ore Spawnpoint 60 Saronite'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Storm Peaks Ore Spawnpoint 60 Rich Saronite'),
+(@GUID3+59,@POOL+59,@CHANCE3, 'Storm Peaks Ore Spawnpoint 60 Titanium'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Storm Peaks Ore Spawnpoint 61 Saronite'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Storm Peaks Ore Spawnpoint 61 Rich Saronite'),
+(@GUID3+60,@POOL+60,@CHANCE3, 'Storm Peaks Ore Spawnpoint 61 Titanium'),
+(@GUID1+61,@POOL+61,@CHANCE1, 'Storm Peaks Ore Spawnpoint 62 Saronite'),
+(@GUID2+61,@POOL+61,@CHANCE2, 'Storm Peaks Ore Spawnpoint 62 Rich Saronite'),
+(@GUID3+61,@POOL+61,@CHANCE3, 'Storm Peaks Ore Spawnpoint 62 Titanium'),
+(@GUID1+62,@POOL+62,@CHANCE1, 'Storm Peaks Ore Spawnpoint 63 Saronite'),
+(@GUID2+62,@POOL+62,@CHANCE2, 'Storm Peaks Ore Spawnpoint 63 Rich Saronite'),
+(@GUID3+62,@POOL+62,@CHANCE3, 'Storm Peaks Ore Spawnpoint 63 Titanium'),
+(@GUID1+63,@POOL+63,@CHANCE1, 'Storm Peaks Ore Spawnpoint 64 Saronite'),
+(@GUID2+63,@POOL+63,@CHANCE2, 'Storm Peaks Ore Spawnpoint 64 Rich Saronite'),
+(@GUID3+63,@POOL+63,@CHANCE3, 'Storm Peaks Ore Spawnpoint 64 Titanium'),
+(@GUID1+64,@POOL+64,@CHANCE1, 'Storm Peaks Ore Spawnpoint 65 Saronite'),
+(@GUID2+64,@POOL+64,@CHANCE2, 'Storm Peaks Ore Spawnpoint 65 Rich Saronite'),
+(@GUID3+64,@POOL+64,@CHANCE3, 'Storm Peaks Ore Spawnpoint 65 Titanium'),
+(@GUID1+65,@POOL+65,@CHANCE1, 'Storm Peaks Ore Spawnpoint 66 Saronite'),
+(@GUID2+65,@POOL+65,@CHANCE2, 'Storm Peaks Ore Spawnpoint 66 Rich Saronite'),
+(@GUID3+65,@POOL+65,@CHANCE3, 'Storm Peaks Ore Spawnpoint 66 Titanium'),
+(@GUID1+66,@POOL+66,@CHANCE1, 'Storm Peaks Ore Spawnpoint 67 Saronite'),
+(@GUID2+66,@POOL+66,@CHANCE2, 'Storm Peaks Ore Spawnpoint 67 Rich Saronite'),
+(@GUID3+66,@POOL+66,@CHANCE3, 'Storm Peaks Ore Spawnpoint 67 Titanium'),
+(@GUID1+67,@POOL+67,@CHANCE1, 'Storm Peaks Ore Spawnpoint 68 Saronite'),
+(@GUID2+67,@POOL+67,@CHANCE2, 'Storm Peaks Ore Spawnpoint 68 Rich Saronite'),
+(@GUID3+67,@POOL+67,@CHANCE3, 'Storm Peaks Ore Spawnpoint 68 Titanium'),
+(@GUID1+68,@POOL+68,@CHANCE1, 'Storm Peaks Ore Spawnpoint 69 Saronite'),
+(@GUID2+68,@POOL+68,@CHANCE2, 'Storm Peaks Ore Spawnpoint 69 Rich Saronite'),
+(@GUID3+68,@POOL+68,@CHANCE3, 'Storm Peaks Ore Spawnpoint 69 Titanium'),
+(@GUID1+69,@POOL+69,@CHANCE1, 'Storm Peaks Ore Spawnpoint 70 Saronite'),
+(@GUID2+69,@POOL+69,@CHANCE2, 'Storm Peaks Ore Spawnpoint 70 Rich Saronite'),
+(@GUID3+69,@POOL+69,@CHANCE3, 'Storm Peaks Ore Spawnpoint 70 Titanium'),
+(@GUID1+70,@POOL+70,@CHANCE1, 'Storm Peaks Ore Spawnpoint 71 Saronite'),
+(@GUID2+70,@POOL+70,@CHANCE2, 'Storm Peaks Ore Spawnpoint 71 Rich Saronite'),
+(@GUID3+70,@POOL+70,@CHANCE3, 'Storm Peaks Ore Spawnpoint 71 Titanium'),
+(@GUID1+71,@POOL+71,@CHANCE1, 'Storm Peaks Ore Spawnpoint 72 Saronite'),
+(@GUID2+71,@POOL+71,@CHANCE2, 'Storm Peaks Ore Spawnpoint 72 Rich Saronite'),
+(@GUID3+71,@POOL+71,@CHANCE3, 'Storm Peaks Ore Spawnpoint 72 Titanium'),
+(@GUID1+72,@POOL+72,@CHANCE1, 'Storm Peaks Ore Spawnpoint 73 Saronite'),
+(@GUID2+72,@POOL+72,@CHANCE2, 'Storm Peaks Ore Spawnpoint 73 Rich Saronite'),
+(@GUID3+72,@POOL+72,@CHANCE3, 'Storm Peaks Ore Spawnpoint 73 Titanium'),
+(@GUID1+73,@POOL+73,@CHANCE1, 'Storm Peaks Ore Spawnpoint 74 Saronite'),
+(@GUID2+73,@POOL+73,@CHANCE2, 'Storm Peaks Ore Spawnpoint 74 Rich Saronite'),
+(@GUID3+73,@POOL+73,@CHANCE3, 'Storm Peaks Ore Spawnpoint 74 Titanium'),
+(@GUID1+74,@POOL+74,@CHANCE1, 'Storm Peaks Ore Spawnpoint 75 Saronite'),
+(@GUID2+74,@POOL+74,@CHANCE2, 'Storm Peaks Ore Spawnpoint 75 Rich Saronite'),
+(@GUID3+74,@POOL+74,@CHANCE3, 'Storm Peaks Ore Spawnpoint 75 Titanium'),
+(@GUID1+75,@POOL+75,@CHANCE1, 'Storm Peaks Ore Spawnpoint 76 Saronite'),
+(@GUID2+75,@POOL+75,@CHANCE2, 'Storm Peaks Ore Spawnpoint 76 Rich Saronite'),
+(@GUID3+75,@POOL+75,@CHANCE3, 'Storm Peaks Ore Spawnpoint 76 Titanium'),
+(@GUID1+76,@POOL+76,@CHANCE1, 'Storm Peaks Ore Spawnpoint 77 Saronite'),
+(@GUID2+76,@POOL+76,@CHANCE2, 'Storm Peaks Ore Spawnpoint 77 Rich Saronite'),
+(@GUID3+76,@POOL+76,@CHANCE3, 'Storm Peaks Ore Spawnpoint 77 Titanium'),
+(@GUID1+77,@POOL+77,@CHANCE1, 'Storm Peaks Ore Spawnpoint 78 Saronite'),
+(@GUID2+77,@POOL+77,@CHANCE2, 'Storm Peaks Ore Spawnpoint 78 Rich Saronite'),
+(@GUID3+77,@POOL+77,@CHANCE3, 'Storm Peaks Ore Spawnpoint 78 Titanium'),
+(@GUID1+78,@POOL+78,@CHANCE1, 'Storm Peaks Ore Spawnpoint 79 Saronite'),
+(@GUID2+78,@POOL+78,@CHANCE2, 'Storm Peaks Ore Spawnpoint 79 Rich Saronite'),
+(@GUID3+78,@POOL+78,@CHANCE3, 'Storm Peaks Ore Spawnpoint 79 Titanium'),
+(@GUID1+79,@POOL+79,@CHANCE1, 'Storm Peaks Ore Spawnpoint 80 Saronite'),
+(@GUID2+79,@POOL+79,@CHANCE2, 'Storm Peaks Ore Spawnpoint 80 Rich Saronite'),
+(@GUID3+79,@POOL+79,@CHANCE3, 'Storm Peaks Ore Spawnpoint 80 Titanium'),
+(@GUID1+80,@POOL+80,@CHANCE1, 'Storm Peaks Ore Spawnpoint 81 Saronite'),
+(@GUID2+80,@POOL+80,@CHANCE2, 'Storm Peaks Ore Spawnpoint 81 Rich Saronite'),
+(@GUID3+80,@POOL+80,@CHANCE3, 'Storm Peaks Ore Spawnpoint 81 Titanium'),
+(@GUID1+81,@POOL+81,@CHANCE1, 'Storm Peaks Ore Spawnpoint 82 Saronite'),
+(@GUID2+81,@POOL+81,@CHANCE2, 'Storm Peaks Ore Spawnpoint 82 Rich Saronite'),
+(@GUID3+81,@POOL+81,@CHANCE3, 'Storm Peaks Ore Spawnpoint 82 Titanium'),
+(@GUID1+82,@POOL+82,@CHANCE1, 'Storm Peaks Ore Spawnpoint 83 Saronite'),
+(@GUID2+82,@POOL+82,@CHANCE2, 'Storm Peaks Ore Spawnpoint 83 Rich Saronite'),
+(@GUID3+82,@POOL+82,@CHANCE3, 'Storm Peaks Ore Spawnpoint 83 Titanium'),
+(@GUID1+83,@POOL+83,@CHANCE1, 'Storm Peaks Ore Spawnpoint 84 Saronite'),
+(@GUID2+83,@POOL+83,@CHANCE2, 'Storm Peaks Ore Spawnpoint 84 Rich Saronite'),
+(@GUID3+83,@POOL+83,@CHANCE3, 'Storm Peaks Ore Spawnpoint 84 Titanium'),
+(@GUID1+84,@POOL+84,@CHANCE1, 'Storm Peaks Ore Spawnpoint 85 Saronite'),
+(@GUID2+84,@POOL+84,@CHANCE2, 'Storm Peaks Ore Spawnpoint 85 Rich Saronite'),
+(@GUID3+84,@POOL+84,@CHANCE3, 'Storm Peaks Ore Spawnpoint 85 Titanium'),
+(@GUID1+85,@POOL+85,@CHANCE1, 'Storm Peaks Ore Spawnpoint 86 Saronite'),
+(@GUID2+85,@POOL+85,@CHANCE2, 'Storm Peaks Ore Spawnpoint 86 Rich Saronite'),
+(@GUID3+85,@POOL+85,@CHANCE3, 'Storm Peaks Ore Spawnpoint 86 Titanium'),
+(@GUID1+86,@POOL+86,@CHANCE1, 'Storm Peaks Ore Spawnpoint 87 Saronite'),
+(@GUID2+86,@POOL+86,@CHANCE2, 'Storm Peaks Ore Spawnpoint 87 Rich Saronite'),
+(@GUID3+86,@POOL+86,@CHANCE3, 'Storm Peaks Ore Spawnpoint 87 Titanium'),
+(@GUID1+87,@POOL+87,@CHANCE1, 'Storm Peaks Ore Spawnpoint 88 Saronite'),
+(@GUID2+87,@POOL+87,@CHANCE2, 'Storm Peaks Ore Spawnpoint 88 Rich Saronite'),
+(@GUID3+87,@POOL+87,@CHANCE3, 'Storm Peaks Ore Spawnpoint 88 Titanium'),
+(@GUID1+88,@POOL+88,@CHANCE1, 'Storm Peaks Ore Spawnpoint 89 Saronite'),
+(@GUID2+88,@POOL+88,@CHANCE2, 'Storm Peaks Ore Spawnpoint 89 Rich Saronite'),
+(@GUID3+88,@POOL+88,@CHANCE3, 'Storm Peaks Ore Spawnpoint 89 Titanium'),
+(@GUID1+89,@POOL+89,@CHANCE1, 'Storm Peaks Ore Spawnpoint 90 Saronite'),
+(@GUID2+89,@POOL+89,@CHANCE2, 'Storm Peaks Ore Spawnpoint 90 Rich Saronite'),
+(@GUID3+89,@POOL+89,@CHANCE3, 'Storm Peaks Ore Spawnpoint 90 Titanium'),
+(@GUID1+90,@POOL+90,@CHANCE1, 'Storm Peaks Ore Spawnpoint 91 Saronite'),
+(@GUID2+90,@POOL+90,@CHANCE2, 'Storm Peaks Ore Spawnpoint 91 Rich Saronite'),
+(@GUID3+90,@POOL+90,@CHANCE3, 'Storm Peaks Ore Spawnpoint 91 Titanium'),
+(@GUID1+91,@POOL+91,@CHANCE1, 'Storm Peaks Ore Spawnpoint 92 Saronite'),
+(@GUID2+91,@POOL+91,@CHANCE2, 'Storm Peaks Ore Spawnpoint 92 Rich Saronite'),
+(@GUID3+91,@POOL+91,@CHANCE3, 'Storm Peaks Ore Spawnpoint 92 Titanium'),
+(@GUID1+92,@POOL+92,@CHANCE1, 'Storm Peaks Ore Spawnpoint 93 Saronite'),
+(@GUID2+92,@POOL+92,@CHANCE2, 'Storm Peaks Ore Spawnpoint 93 Rich Saronite'),
+(@GUID3+92,@POOL+92,@CHANCE3, 'Storm Peaks Ore Spawnpoint 93 Titanium'),
+(@GUID1+93,@POOL+93,@CHANCE1, 'Storm Peaks Ore Spawnpoint 94 Saronite'),
+(@GUID2+93,@POOL+93,@CHANCE2, 'Storm Peaks Ore Spawnpoint 94 Rich Saronite'),
+(@GUID3+93,@POOL+93,@CHANCE3, 'Storm Peaks Ore Spawnpoint 94 Titanium'),
+(@GUID1+94,@POOL+94,@CHANCE1, 'Storm Peaks Ore Spawnpoint 95 Saronite'),
+(@GUID2+94,@POOL+94,@CHANCE2, 'Storm Peaks Ore Spawnpoint 95 Rich Saronite'),
+(@GUID3+94,@POOL+94,@CHANCE3, 'Storm Peaks Ore Spawnpoint 95 Titanium'),
+(@GUID1+95,@POOL+95,@CHANCE1, 'Storm Peaks Ore Spawnpoint 96 Saronite'),
+(@GUID2+95,@POOL+95,@CHANCE2, 'Storm Peaks Ore Spawnpoint 96 Rich Saronite'),
+(@GUID3+95,@POOL+95,@CHANCE3, 'Storm Peaks Ore Spawnpoint 96 Titanium'),
+(@GUID1+96,@POOL+96,@CHANCE1, 'Storm Peaks Ore Spawnpoint 97 Saronite'),
+(@GUID2+96,@POOL+96,@CHANCE2, 'Storm Peaks Ore Spawnpoint 97 Rich Saronite'),
+(@GUID3+96,@POOL+96,@CHANCE3, 'Storm Peaks Ore Spawnpoint 97 Titanium'),
+(@GUID1+97,@POOL+97,@CHANCE1, 'Storm Peaks Ore Spawnpoint 98 Saronite'),
+(@GUID2+97,@POOL+97,@CHANCE2, 'Storm Peaks Ore Spawnpoint 98 Rich Saronite'),
+(@GUID3+97,@POOL+97,@CHANCE3, 'Storm Peaks Ore Spawnpoint 98 Titanium'),
+(@GUID1+98,@POOL+98,@CHANCE1, 'Storm Peaks Ore Spawnpoint 99 Saronite'),
+(@GUID2+98,@POOL+98,@CHANCE2, 'Storm Peaks Ore Spawnpoint 99 Rich Saronite'),
+(@GUID3+98,@POOL+98,@CHANCE3, 'Storm Peaks Ore Spawnpoint 99 Titanium'),
+(@GUID1+99,@POOL+99,@CHANCE1, 'Storm Peaks Ore Spawnpoint 100 Saronite'),
+(@GUID2+99,@POOL+99,@CHANCE2, 'Storm Peaks Ore Spawnpoint 100 Rich Saronite'),
+(@GUID3+99,@POOL+99,@CHANCE3, 'Storm Peaks Ore Spawnpoint 100 Titanium'),
+(@GUID1+100,@POOL+100,@CHANCE1, 'Storm Peaks Ore Spawnpoint 101 Saronite'),
+(@GUID2+100,@POOL+100,@CHANCE2, 'Storm Peaks Ore Spawnpoint 101 Rich Saronite'),
+(@GUID3+100,@POOL+100,@CHANCE3, 'Storm Peaks Ore Spawnpoint 101 Titanium'),
+(@GUID1+101,@POOL+101,@CHANCE1, 'Storm Peaks Ore Spawnpoint 102 Saronite'),
+(@GUID2+101,@POOL+101,@CHANCE2, 'Storm Peaks Ore Spawnpoint 102 Rich Saronite'),
+(@GUID3+101,@POOL+101,@CHANCE3, 'Storm Peaks Ore Spawnpoint 102 Titanium'),
+(@GUID1+102,@POOL+102,@CHANCE1, 'Storm Peaks Ore Spawnpoint 103 Saronite'),
+(@GUID2+102,@POOL+102,@CHANCE2, 'Storm Peaks Ore Spawnpoint 103 Rich Saronite'),
+(@GUID3+102,@POOL+102,@CHANCE3, 'Storm Peaks Ore Spawnpoint 103 Titanium'),
+(@GUID1+103,@POOL+103,@CHANCE1, 'Storm Peaks Ore Spawnpoint 104 Saronite'),
+(@GUID2+103,@POOL+103,@CHANCE2, 'Storm Peaks Ore Spawnpoint 104 Rich Saronite'),
+(@GUID3+103,@POOL+103,@CHANCE3, 'Storm Peaks Ore Spawnpoint 104 Titanium'),
+(@GUID1+104,@POOL+104,@CHANCE1, 'Storm Peaks Ore Spawnpoint 105 Saronite'),
+(@GUID2+104,@POOL+104,@CHANCE2, 'Storm Peaks Ore Spawnpoint 105 Rich Saronite'),
+(@GUID3+104,@POOL+104,@CHANCE3, 'Storm Peaks Ore Spawnpoint 105 Titanium'),
+(@GUID1+105,@POOL+105,@CHANCE1, 'Storm Peaks Ore Spawnpoint 106 Saronite'),
+(@GUID2+105,@POOL+105,@CHANCE2, 'Storm Peaks Ore Spawnpoint 106 Rich Saronite'),
+(@GUID3+105,@POOL+105,@CHANCE3, 'Storm Peaks Ore Spawnpoint 106 Titanium'),
+(@GUID1+106,@POOL+106,@CHANCE1, 'Storm Peaks Ore Spawnpoint 107 Saronite'),
+(@GUID2+106,@POOL+106,@CHANCE2, 'Storm Peaks Ore Spawnpoint 107 Rich Saronite'),
+(@GUID3+106,@POOL+106,@CHANCE3, 'Storm Peaks Ore Spawnpoint 107 Titanium'),
+(@GUID1+107,@POOL+107,@CHANCE1, 'Storm Peaks Ore Spawnpoint 108 Saronite'),
+(@GUID2+107,@POOL+107,@CHANCE2, 'Storm Peaks Ore Spawnpoint 108 Rich Saronite'),
+(@GUID3+107,@POOL+107,@CHANCE3, 'Storm Peaks Ore Spawnpoint 108 Titanium'),
+(@GUID1+108,@POOL+108,@CHANCE1, 'Storm Peaks Ore Spawnpoint 109 Saronite'),
+(@GUID2+108,@POOL+108,@CHANCE2, 'Storm Peaks Ore Spawnpoint 109 Rich Saronite'),
+(@GUID3+108,@POOL+108,@CHANCE3, 'Storm Peaks Ore Spawnpoint 109 Titanium'),
+(@GUID1+109,@POOL+109,@CHANCE1, 'Storm Peaks Ore Spawnpoint 110 Saronite'),
+(@GUID2+109,@POOL+109,@CHANCE2, 'Storm Peaks Ore Spawnpoint 110 Rich Saronite'),
+(@GUID3+109,@POOL+109,@CHANCE3, 'Storm Peaks Ore Spawnpoint 110 Titanium');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@RANGE;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Storm Peaks Ore Spawnpoint 1'),
+(@POOL+1,1, 'Storm Peaks Ore Spawnpoint 2'),
+(@POOL+2,1, 'Storm Peaks Ore Spawnpoint 3'),
+(@POOL+3,1, 'Storm Peaks Ore Spawnpoint 4'),
+(@POOL+4,1, 'Storm Peaks Ore Spawnpoint 5'),
+(@POOL+5,1, 'Storm Peaks Ore Spawnpoint 6'),
+(@POOL+6,1, 'Storm Peaks Ore Spawnpoint 7'),
+(@POOL+7,1, 'Storm Peaks Ore Spawnpoint 8'),
+(@POOL+8,1, 'Storm Peaks Ore Spawnpoint 9'),
+(@POOL+9,1, 'Storm Peaks Ore Spawnpoint 10'),
+(@POOL+10,1, 'Storm Peaks Ore Spawnpoint 11'),
+(@POOL+11,1, 'Storm Peaks Ore Spawnpoint 12'),
+(@POOL+12,1, 'Storm Peaks Ore Spawnpoint 13'),
+(@POOL+13,1, 'Storm Peaks Ore Spawnpoint 14'),
+(@POOL+14,1, 'Storm Peaks Ore Spawnpoint 15'),
+(@POOL+15,1, 'Storm Peaks Ore Spawnpoint 16'),
+(@POOL+16,1, 'Storm Peaks Ore Spawnpoint 17'),
+(@POOL+17,1, 'Storm Peaks Ore Spawnpoint 18'),
+(@POOL+18,1, 'Storm Peaks Ore Spawnpoint 19'),
+(@POOL+19,1, 'Storm Peaks Ore Spawnpoint 20'),
+(@POOL+20,1, 'Storm Peaks Ore Spawnpoint 21'),
+(@POOL+21,1, 'Storm Peaks Ore Spawnpoint 22'),
+(@POOL+22,1, 'Storm Peaks Ore Spawnpoint 23'),
+(@POOL+23,1, 'Storm Peaks Ore Spawnpoint 24'),
+(@POOL+24,1, 'Storm Peaks Ore Spawnpoint 25'),
+(@POOL+25,1, 'Storm Peaks Ore Spawnpoint 26'),
+(@POOL+26,1, 'Storm Peaks Ore Spawnpoint 27'),
+(@POOL+27,1, 'Storm Peaks Ore Spawnpoint 28'),
+(@POOL+28,1, 'Storm Peaks Ore Spawnpoint 29'),
+(@POOL+29,1, 'Storm Peaks Ore Spawnpoint 30'),
+(@POOL+30,1, 'Storm Peaks Ore Spawnpoint 31'),
+(@POOL+31,1, 'Storm Peaks Ore Spawnpoint 32'),
+(@POOL+32,1, 'Storm Peaks Ore Spawnpoint 33'),
+(@POOL+33,1, 'Storm Peaks Ore Spawnpoint 34'),
+(@POOL+34,1, 'Storm Peaks Ore Spawnpoint 35'),
+(@POOL+35,1, 'Storm Peaks Ore Spawnpoint 36'),
+(@POOL+36,1, 'Storm Peaks Ore Spawnpoint 37'),
+(@POOL+37,1, 'Storm Peaks Ore Spawnpoint 38'),
+(@POOL+38,1, 'Storm Peaks Ore Spawnpoint 39'),
+(@POOL+39,1, 'Storm Peaks Ore Spawnpoint 40'),
+(@POOL+40,1, 'Storm Peaks Ore Spawnpoint 41'),
+(@POOL+41,1, 'Storm Peaks Ore Spawnpoint 42'),
+(@POOL+42,1, 'Storm Peaks Ore Spawnpoint 43'),
+(@POOL+43,1, 'Storm Peaks Ore Spawnpoint 44'),
+(@POOL+44,1, 'Storm Peaks Ore Spawnpoint 45'),
+(@POOL+45,1, 'Storm Peaks Ore Spawnpoint 46'),
+(@POOL+46,1, 'Storm Peaks Ore Spawnpoint 47'),
+(@POOL+47,1, 'Storm Peaks Ore Spawnpoint 48'),
+(@POOL+48,1, 'Storm Peaks Ore Spawnpoint 49'),
+(@POOL+49,1, 'Storm Peaks Ore Spawnpoint 50'),
+(@POOL+50,1, 'Storm Peaks Ore Spawnpoint 51'),
+(@POOL+51,1, 'Storm Peaks Ore Spawnpoint 52'),
+(@POOL+52,1, 'Storm Peaks Ore Spawnpoint 53'),
+(@POOL+53,1, 'Storm Peaks Ore Spawnpoint 54'),
+(@POOL+54,1, 'Storm Peaks Ore Spawnpoint 55'),
+(@POOL+55,1, 'Storm Peaks Ore Spawnpoint 56'),
+(@POOL+56,1, 'Storm Peaks Ore Spawnpoint 57'),
+(@POOL+57,1, 'Storm Peaks Ore Spawnpoint 58'),
+(@POOL+58,1, 'Storm Peaks Ore Spawnpoint 59'),
+(@POOL+59,1, 'Storm Peaks Ore Spawnpoint 60'),
+(@POOL+60,1, 'Storm Peaks Ore Spawnpoint 61'),
+(@POOL+61,1, 'Storm Peaks Ore Spawnpoint 62'),
+(@POOL+62,1, 'Storm Peaks Ore Spawnpoint 63'),
+(@POOL+63,1, 'Storm Peaks Ore Spawnpoint 64'),
+(@POOL+64,1, 'Storm Peaks Ore Spawnpoint 65'),
+(@POOL+65,1, 'Storm Peaks Ore Spawnpoint 66'),
+(@POOL+66,1, 'Storm Peaks Ore Spawnpoint 67'),
+(@POOL+67,1, 'Storm Peaks Ore Spawnpoint 68'),
+(@POOL+68,1, 'Storm Peaks Ore Spawnpoint 69'),
+(@POOL+69,1, 'Storm Peaks Ore Spawnpoint 70'),
+(@POOL+70,1, 'Storm Peaks Ore Spawnpoint 71'),
+(@POOL+71,1, 'Storm Peaks Ore Spawnpoint 72'),
+(@POOL+72,1, 'Storm Peaks Ore Spawnpoint 73'),
+(@POOL+73,1, 'Storm Peaks Ore Spawnpoint 74'),
+(@POOL+74,1, 'Storm Peaks Ore Spawnpoint 75'),
+(@POOL+75,1, 'Storm Peaks Ore Spawnpoint 76'),
+(@POOL+76,1, 'Storm Peaks Ore Spawnpoint 77'),
+(@POOL+77,1, 'Storm Peaks Ore Spawnpoint 78'),
+(@POOL+78,1, 'Storm Peaks Ore Spawnpoint 79'),
+(@POOL+79,1, 'Storm Peaks Ore Spawnpoint 80'),
+(@POOL+80,1, 'Storm Peaks Ore Spawnpoint 81'),
+(@POOL+81,1, 'Storm Peaks Ore Spawnpoint 82'),
+(@POOL+82,1, 'Storm Peaks Ore Spawnpoint 83'),
+(@POOL+83,1, 'Storm Peaks Ore Spawnpoint 84'),
+(@POOL+84,1, 'Storm Peaks Ore Spawnpoint 85'),
+(@POOL+85,1, 'Storm Peaks Ore Spawnpoint 86'),
+(@POOL+86,1, 'Storm Peaks Ore Spawnpoint 87'),
+(@POOL+87,1, 'Storm Peaks Ore Spawnpoint 88'),
+(@POOL+88,1, 'Storm Peaks Ore Spawnpoint 89'),
+(@POOL+89,1, 'Storm Peaks Ore Spawnpoint 90'),
+(@POOL+90,1, 'Storm Peaks Ore Spawnpoint 91'),
+(@POOL+91,1, 'Storm Peaks Ore Spawnpoint 92'),
+(@POOL+92,1, 'Storm Peaks Ore Spawnpoint 93'),
+(@POOL+93,1, 'Storm Peaks Ore Spawnpoint 94'),
+(@POOL+94,1, 'Storm Peaks Ore Spawnpoint 95'),
+(@POOL+95,1, 'Storm Peaks Ore Spawnpoint 96'),
+(@POOL+96,1, 'Storm Peaks Ore Spawnpoint 97'),
+(@POOL+97,1, 'Storm Peaks Ore Spawnpoint 98'),
+(@POOL+98,1, 'Storm Peaks Ore Spawnpoint 99'),
+(@POOL+99,1, 'Storm Peaks Ore Spawnpoint 100'),
+(@POOL+100,1, 'Storm Peaks Ore Spawnpoint 101'),
+(@POOL+101,1, 'Storm Peaks Ore Spawnpoint 102'),
+(@POOL+102,1, 'Storm Peaks Ore Spawnpoint 103'),
+(@POOL+103,1, 'Storm Peaks Ore Spawnpoint 104'),
+(@POOL+104,1, 'Storm Peaks Ore Spawnpoint 105'),
+(@POOL+105,1, 'Storm Peaks Ore Spawnpoint 106'),
+(@POOL+106,1, 'Storm Peaks Ore Spawnpoint 107'),
+(@POOL+107,1, 'Storm Peaks Ore Spawnpoint 108'),
+(@POOL+108,1, 'Storm Peaks Ore Spawnpoint 109'),
+(@POOL+109,1, 'Storm Peaks Ore Spawnpoint 110');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Storm Peaks Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@RANGE;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 61'),
+(@POOL+61,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 62'),
+(@POOL+62,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 63'),
+(@POOL+63,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 64'),
+(@POOL+64,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 65'),
+(@POOL+65,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 66'),
+(@POOL+66,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 67'),
+(@POOL+67,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 68'),
+(@POOL+68,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 69'),
+(@POOL+69,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 70'),
+(@POOL+70,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 71'),
+(@POOL+71,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 72'),
+(@POOL+72,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 73'),
+(@POOL+73,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 74'),
+(@POOL+74,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 75'),
+(@POOL+75,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 76'),
+(@POOL+76,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 77'),
+(@POOL+77,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 78'),
+(@POOL+78,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 79'),
+(@POOL+79,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 80'),
+(@POOL+80,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 81'),
+(@POOL+81,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 82'),
+(@POOL+82,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 83'),
+(@POOL+83,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 84'),
+(@POOL+84,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 85'),
+(@POOL+85,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 86'),
+(@POOL+86,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 87'),
+(@POOL+87,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 88'),
+(@POOL+88,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 89'),
+(@POOL+89,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 90'),
+(@POOL+90,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 91'),
+(@POOL+91,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 92'),
+(@POOL+92,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 93'),
+(@POOL+93,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 94'),
+(@POOL+94,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 95'),
+(@POOL+95,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 96'),
+(@POOL+96,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 97'),
+(@POOL+97,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 98'),
+(@POOL+98,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 99'),
+(@POOL+99,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 100'),
+(@POOL+100,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 101'),
+(@POOL+101,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 102'),
+(@POOL+102,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 103'),
+(@POOL+103,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 104'),
+(@POOL+104,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 105'),
+(@POOL+105,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 106'),
+(@POOL+106,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 107'),
+(@POOL+107,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 108'),
+(@POOL+108,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 109'),
+(@POOL+109,@MOTHER,0, 'Storm Peaks Ore Spawnpoint 110');
+-- POOL 2 for Cobalt
+-- Cobalt & Rich Cobalt Deposits Storm Peaks
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(@GUID1+239,189978,571,1,1,6749.401,-3469.023,563.5495,-1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID2+239,189979,571,1,1,6749.401,-3469.023,563.5495,-1.30900,0,0,0,1,@TIMER,255,1);
+-- Pooling
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+239,@POOL+239,@CHANCE1, 'Storm Peaks Ore Spawnpoint 1 Cobalt'),
+(@GUID2+239,@POOL+239,@CHANCE2+@CHANCE3, 'Storm Peaks Ore Spawnpoint 1 Rich Cobalt');
+-- Add each pool to pool template
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+239,1, 'Storm Peaks Ore Spawnpoint 240');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER2;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER2,@ACTIVE, 'Storm Peaks Ore Mother pool 2');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+239,@MOTHER2,0, 'Storm Peaks Ore Spawnpoint 240');
+
+-- -----------------------------------
+-- -- Fixup ore spawns for Icecrown --
+-- -----------------------------------
+SET @RANGE := 400;
+SET @GUID1 := 163200;
+SET @GUID2 := @GUID1 + @RANGE;
+SET @GUID3 := @GUID2 + @RANGE;
+SET @POOL := 11400;
+SET @LASTGUID := 234;
+SET @CHANCE1 := 75;
+SET @CHANCE2 := 15;
+SET @CHANCE3 := 10;
+SET @MOTHER := 9908;
+SET @ACTIVE := 60; -- Max number of active spawns
+SET @TIMER := 600; -- Respawn timer in seconds
+-- Remove Ore spawns from Icecrown
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 740 AND `position_y` > 535 AND `position_x` > 6220;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 1220 AND `position_y` > 740 AND `position_x` > 6380;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_x` > 5400 AND `position_y` > 1220 AND `position_y` < 2570;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 3360 AND `position_y` > 2570 AND `position_x` > 5600;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` > 3360 AND `position_x` > 6800;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 335 AND `position_y` > -110 AND `position_x` > 6100 AND `position_x` < 6460;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 535 AND `position_y` > 130 AND `position_x` > 6460;
+DELETE FROM `gameobject` WHERE `id` IN (189978,189979,189980,189981,191133) AND `map`=571 AND `position_y` < 3835 AND `position_y` > 3360 AND `position_x` > 6450 AND `position_x` < 6800;
+
+-- Remove old pools
+DELETE FROM `pool_gameobject` WHERE `guid` NOT IN (SELECT `guid` FROM `gameobject`);
+DELETE FROM `pool_template` WHERE `entry` BETWEEN 5448 AND 5616;
+DELETE FROM `pool_template` WHERE `entry`=897;
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN 5448 AND 5616;
+-- Saronite Deposits Icecrown
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID1+0,189980,571,1,1,6674.631,1332.353,299.6001,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID1+1,189980,571,1,1,6939.153,2862.694,435.1407,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID1+2,189980,571,1,1,7980.812,3096.596,635.4854,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID1+3,189980,571,1,1,5636.890,1931.159,517.3533,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID1+4,189980,571,1,1,5665.190,1897.490,519.6750,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+5,189980,571,1,1,5706.650,2046.590,-339.6590,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID1+6,189980,571,1,1,5711.610,2071.070,-340.7400,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID1+7,189980,571,1,1,5749.150,2086.660,-343.5200,-2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID1+8,189980,571,1,1,5753.728,2282.746,533.9716,-1.53589,0,0,0,1,@TIMER,255,1),
+(@GUID1+9,189980,571,1,1,5775.480,2081.830,-342.7420,0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID1+10,189980,571,1,1,5790.740,2214.070,515.1540,1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID1+11,189980,571,1,1,5808.930,2268.290,523.3210,2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID1+12,189980,571,1,1,5826.980,1863.070,-345.8090,1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID1+13,189980,571,1,1,5842.430,1858.810,-345.3000,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID1+14,189980,571,1,1,5843.150,2256.140,520.1550,-1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID1+15,189980,571,1,1,5857.440,1936.720,510.8840,0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID1+16,189980,571,1,1,5890.500,1915.920,-345.9820,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID1+17,189980,571,1,1,5890.500,1915.920,-345.9820,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID1+18,189980,571,1,1,5894.700,1913.140,-345.9370,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID1+19,189980,571,1,1,5914.500,2015.980,516.3390,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+20,189980,571,1,1,5941.548,1912.958,567.5397,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID1+21,189980,571,1,1,5957.890,2517.910,537.2770,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+22,189980,571,1,1,5961.092,2412.068,519.9221,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+23,189980,571,1,1,5967.890,1850.520,630.5570,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID1+24,189980,571,1,1,6038.564,2326.347,514.5131,1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID1+25,189980,571,1,1,6171.915,2015.665,531.4319,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID1+26,189980,571,1,1,6448.210,1897.020,515.3600,0.36652,0,0,0,1,@TIMER,255,1),
+(@GUID1+27,189980,571,1,1,6466.150,137.682,444.7190,2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID1+28,189980,571,1,1,6466.396,648.508,428.8037,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+29,189980,571,1,1,6477.440,2487.120,475.9810,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+30,189980,571,1,1,6481.970,540.381,438.7030,0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID1+31,189980,571,1,1,6482.543,2462.866,468.1175,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+32,189980,571,1,1,6483.739,1237.931,286.9318,1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID1+33,189980,571,1,1,6484.370,294.937,399.8210,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID1+34,189980,571,1,1,6497.030,3510.880,540.2320,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID1+35,189980,571,1,1,6514.270,896.626,290.6450,1.29154,0,0,0,1,@TIMER,255,1),
+(@GUID1+36,189980,571,1,1,6533.500,907.337,294.8920,0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID1+37,189980,571,1,1,6541.251,1011.675,276.9524,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID1+38,189980,571,1,1,6554.230,332.830,411.5670,0.13962,0,0,0,1,@TIMER,255,1),
+(@GUID1+39,189980,571,1,1,6557.070,284.192,401.7890,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID1+40,189980,571,1,1,6559.550,659.112,408.1460,-2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID1+41,189980,571,1,1,6561.430,1050.489,275.1745,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID1+42,189980,571,1,1,6583.151,1267.122,286.0256,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+43,189980,571,1,1,6604.228,1248.473,282.4915,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+44,189980,571,1,1,6608.890,990.280,284.7300,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID1+45,189980,571,1,1,6618.750,356.354,453.1560,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID1+46,189980,571,1,1,6622.904,1252.617,282.5027,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+47,189980,571,1,1,6636.596,3176.859,648.8128,1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID1+48,189980,571,1,1,6640.880,3346.680,677.4100,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+49,189980,571,1,1,6658.340,688.135,410.4380,2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID1+50,189980,571,1,1,6662.220,573.318,406.8580,-0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID1+51,189980,571,1,1,6664.980,615.527,410.0190,-2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID1+52,189980,571,1,1,6672.161,1189.572,273.2596,-2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID1+53,189980,571,1,1,6691.890,1520.673,466.3800,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID1+54,189980,571,1,1,6696.400,743.905,396.9640,-0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID1+55,189980,571,1,1,6710.980,644.300,412.4740,-1.29154,0,0,0,1,@TIMER,255,1),
+(@GUID1+56,189980,571,1,1,6717.320,1228.804,275.0786,-2.86234,0,0,0,1,@TIMER,255,1),
+(@GUID1+57,189980,571,1,1,6725.160,570.259,424.5290,-2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID1+58,189980,571,1,1,6734.880,1458.500,403.8720,0.31416,0,0,0,1,@TIMER,255,1),
+(@GUID1+59,189980,571,1,1,6737.770,586.034,425.3840,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID1+60,189980,571,1,1,6748.570,2727.220,435.5540,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID1+61,189980,571,1,1,6751.800,1325.140,285.5890,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID1+62,189980,571,1,1,6753.930,328.981,442.2290,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+63,189980,571,1,1,6754.170,2342.520,442.6880,-2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID1+64,189980,571,1,1,6754.800,575.615,425.3900,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID1+65,189980,571,1,1,6755.160,1224.160,276.8440,0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID1+66,189980,571,1,1,6755.390,974.467,312.3300,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+67,189980,571,1,1,6756.568,2694.843,427.8352,-2.80998,0,0,0,1,@TIMER,255,1),
+(@GUID1+68,189980,571,1,1,6758.730,585.806,425.6570,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID1+69,189980,571,1,1,6766.010,2936.860,456.1350,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID1+70,189980,571,1,1,6774.690,499.547,410.7330,-0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID1+71,189980,571,1,1,6781.035,1131.430,278.6142,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+72,189980,571,1,1,6789.004,1141.311,277.1633,-1.81514,0,0,0,1,@TIMER,255,1),
+(@GUID1+73,189980,571,1,1,6790.110,449.812,411.4930,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+74,189980,571,1,1,6793.867,924.565,348.8412,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID1+75,189980,571,1,1,6797.174,2369.824,435.4318,-0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID1+76,189980,571,1,1,6804.510,1294.230,281.1890,0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID1+77,189980,571,1,1,6817.340,453.798,470.4500,-3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID1+78,189980,571,1,1,6818.782,2181.032,660.7790,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+79,189980,571,1,1,6824.141,2207.658,654.9231,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID1+80,189980,571,1,1,6830.670,762.702,409.8570,2.12930,0,0,0,1,@TIMER,255,1),
+(@GUID1+81,189980,571,1,1,6833.760,2472.190,421.7130,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID1+82,189980,571,1,1,6884.590,645.147,426.5720,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+83,189980,571,1,1,6885.250,2378.060,427.7960,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+84,189980,571,1,1,6885.810,2052.910,828.6610,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID1+85,189980,571,1,1,6897.245,819.820,399.8205,-2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID1+86,189980,571,1,1,6898.430,786.803,405.3570,-1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID1+87,189980,571,1,1,6901.678,2352.561,428.5658,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+88,189980,571,1,1,6943.630,3630.960,830.1040,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+89,189980,571,1,1,6944.920,407.241,513.6190,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID1+90,189980,571,1,1,6993.890,681.144,491.2140,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID1+91,189980,571,1,1,6999.950,849.854,402.0200,-0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID1+92,189980,571,1,1,7010.360,702.436,473.7730,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID1+93,189980,571,1,1,7027.862,3066.551,475.0314,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID1+94,189980,571,1,1,7028.880,2508.660,409.5580,-0.54105,0,0,0,1,@TIMER,255,1),
+(@GUID1+95,189980,571,1,1,7053.120,824.111,537.6430,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+96,189980,571,1,1,7064.830,1379.270,307.5810,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID1+97,189980,571,1,1,7067.230,1367.880,306.2920,2.61799,0,0,0,1,@TIMER,255,1),
+(@GUID1+98,189980,571,1,1,7070.190,574.218,498.3680,-0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID1+99,189980,571,1,1,7102.520,3022.010,446.9720,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+100,189980,571,1,1,7115.280,1450.230,315.6940,-2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID1+101,189980,571,1,1,7136.144,1119.962,310.4275,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+102,189980,571,1,1,7144.400,2507.150,405.9100,-1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID1+103,189980,571,1,1,7162.500,2547.990,399.1830,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID1+104,189980,571,1,1,7164.714,2521.346,402.8072,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+105,189980,571,1,1,7185.228,2548.746,397.5674,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID1+106,189980,571,1,1,7215.860,2846.910,408.1010,2.89724,0,0,0,1,@TIMER,255,1),
+(@GUID1+107,189980,571,1,1,7231.514,2847.632,405.2855,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+108,189980,571,1,1,7235.410,575.545,499.3020,3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID1+109,189980,571,1,1,7235.530,1516.760,326.9980,-1.93732,0,0,0,1,@TIMER,255,1),
+(@GUID1+110,189980,571,1,1,7238.310,785.106,552.4170,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID1+111,189980,571,1,1,7240.890,2399.818,417.6793,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+112,189980,571,1,1,7260.710,1512.270,322.2740,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID1+113,189980,571,1,1,7323.180,2252.330,461.4260,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID1+114,189980,571,1,1,7330.260,2996.150,434.1070,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID1+115,189980,571,1,1,7330.480,2485.730,392.8050,1.11701,0,0,0,1,@TIMER,255,1),
+(@GUID1+116,189980,571,1,1,7343.430,602.649,615.5180,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID1+117,189980,571,1,1,7347.470,561.248,613.0550,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+118,189980,571,1,1,7362.550,614.322,580.0140,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID1+119,189980,571,1,1,7382.990,2443.480,387.4290,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+120,189980,571,1,1,7391.310,568.383,577.8610,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+121,189980,571,1,1,7399.734,2867.122,417.6852,-2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID1+122,189980,571,1,1,7420.410,3083.890,586.8870,-2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID1+123,189980,571,1,1,7420.450,632.061,497.2910,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+124,189980,571,1,1,7427.840,1463.890,324.1520,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID1+125,189980,571,1,1,7431.122,3330.435,693.0119,1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID1+126,189980,571,1,1,7466.787,2726.011,412.2881,-0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID1+127,189980,571,1,1,7471.173,2497.169,390.4092,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID1+128,189980,571,1,1,7472.370,1305.690,320.0850,-2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID1+129,189980,571,1,1,7476.556,1295.246,322.1502,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+130,189980,571,1,1,7476.560,1295.250,322.1500,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+131,189980,571,1,1,7488.803,1813.892,361.4976,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID1+132,189980,571,1,1,7488.803,1813.892,361.4976,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID1+133,189980,571,1,1,7490.424,2678.968,433.0785,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID1+134,189980,571,1,1,7512.870,1172.610,344.4850,-1.32645,0,0,0,1,@TIMER,255,1),
+(@GUID1+135,189980,571,1,1,7517.870,1846.080,360.2560,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID1+136,189980,571,1,1,7521.310,2268.770,391.4060,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID1+137,189980,571,1,1,7523.600,2698.610,409.9320,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID1+138,189980,571,1,1,7526.180,970.248,533.5250,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID1+139,189980,571,1,1,7529.280,639.333,494.9540,-2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID1+140,189980,571,1,1,7541.840,896.319,489.3380,0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID1+141,189980,571,1,1,7542.460,2870.100,429.9170,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID1+142,189980,571,1,1,7549.750,982.975,483.2320,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+143,189980,571,1,1,7554.596,1864.645,367.2740,0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID1+144,189980,571,1,1,7576.460,1972.390,369.5900,-0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID1+145,189980,571,1,1,7595.120,1891.100,371.2320,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID1+146,189980,571,1,1,7607.160,1752.610,339.9570,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID1+147,189980,571,1,1,7633.180,716.693,484.5840,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+148,189980,571,1,1,7653.100,2792.670,414.9850,0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID1+149,189980,571,1,1,7656.878,1786.749,350.2715,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+150,189980,571,1,1,7656.880,1786.750,350.2720,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+151,189980,571,1,1,7664.280,1709.210,333.7010,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID1+152,189980,571,1,1,7678.119,2818.930,444.8793,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID1+153,189980,571,1,1,7679.018,1021.261,471.1822,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+154,189980,571,1,1,7685.300,1256.030,341.5660,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID1+155,189980,571,1,1,7687.900,3554.850,736.6150,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID1+156,189980,571,1,1,7688.260,1386.790,347.2900,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+157,189980,571,1,1,7689.330,3181.030,578.8330,0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID1+158,189980,571,1,1,7689.890,553.471,698.6200,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID1+159,189980,571,1,1,7712.260,1282.210,339.2810,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+160,189980,571,1,1,7720.600,1424.710,353.3610,-1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID1+161,189980,571,1,1,7726.390,1305.620,341.8380,-2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID1+162,189980,571,1,1,7733.940,1814.480,349.6280,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+163,189980,571,1,1,7744.650,1779.400,338.0610,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID1+164,189980,571,1,1,7764.360,1088.720,395.6190,-0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID1+165,189980,571,1,1,7765.605,2713.188,409.2500,2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID1+166,189980,571,1,1,7772.450,796.567,517.5690,0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID1+167,189980,571,1,1,7773.792,1499.624,360.2978,-2.21657,0,0,0,1,@TIMER,255,1),
+(@GUID1+168,189980,571,1,1,7774.563,2665.078,405.8254,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+169,189980,571,1,1,7774.563,2665.078,405.8254,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID1+170,189980,571,1,1,7779.620,1830.560,356.3590,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID1+171,189980,571,1,1,7781.560,1106.510,395.6670,2.54818,0,0,0,1,@TIMER,255,1),
+(@GUID1+172,189980,571,1,1,7784.990,1043.740,395.6190,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+173,189980,571,1,1,7793.370,1526.290,363.6070,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID1+174,189980,571,1,1,7805.900,943.421,451.6210,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+175,189980,571,1,1,7819.700,1132.740,395.6190,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+176,189980,571,1,1,7822.420,696.106,554.0000,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID1+177,189980,571,1,1,7833.479,3008.132,536.2718,-1.20428,0,0,0,1,@TIMER,255,1),
+(@GUID1+178,189980,571,1,1,7834.560,818.007,501.7090,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID1+179,189980,571,1,1,7845.009,3354.724,736.6236,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID1+180,189980,571,1,1,7848.730,1108.210,395.6100,2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID1+181,189980,571,1,1,7854.104,1125.911,395.6191,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID1+182,189980,571,1,1,7857.740,1414.600,439.1670,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID1+183,189980,571,1,1,7867.160,1550.810,378.1740,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+184,189980,571,1,1,7894.100,1533.870,396.8620,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID1+185,189980,571,1,1,7915.382,2484.846,405.5244,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID1+186,189980,571,1,1,7926.210,2439.340,411.3850,2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID1+187,189980,571,1,1,7930.313,2802.014,499.5031,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID1+188,189980,571,1,1,7935.660,1579.350,411.4840,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID1+189,189980,571,1,1,7937.930,1442.640,520.4660,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID1+190,189980,571,1,1,7940.259,3483.749,694.0527,-1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID1+191,189980,571,1,1,7941.500,1706.580,371.8170,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+192,189980,571,1,1,7958.130,1927.860,367.0540,3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID1+193,189980,571,1,1,7963.188,2787.479,525.1877,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID1+194,189980,571,1,1,7980.900,1539.410,467.7100,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID1+195,189980,571,1,1,8006.929,1907.343,380.7083,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID1+196,189980,571,1,1,8044.050,1805.050,409.0340,2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID1+197,189980,571,1,1,8050.090,2858.940,510.4690,-1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID1+198,189980,571,1,1,8078.370,1646.490,553.9380,1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID1+199,189980,571,1,1,8128.210,1460.340,698.1700,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID1+200,189980,571,1,1,8150.700,1169.640,687.5320,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+201,189980,571,1,1,8160.790,1539.710,630.5920,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID1+202,189980,571,1,1,8161.500,1561.790,613.8130,2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID1+203,189980,571,1,1,8162.180,1286.700,785.9620,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID1+204,189980,571,1,1,8168.020,1303.410,793.5940,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID1+205,189980,571,1,1,8207.790,1281.010,775.6510,-0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID1+206,189980,571,1,1,8242.540,1257.540,741.1770,-1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID1+207,189980,571,1,1,8253.710,1842.500,563.0770,1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID1+208,189980,571,1,1,8266.340,1755.560,580.5210,-2.91469,0,0,0,1,@TIMER,255,1),
+(@GUID1+209,189980,571,1,1,8292.690,2611.040,718.0010,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID1+210,189980,571,1,1,8308.630,3014.360,679.2830,1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID1+211,189980,571,1,1,8450.060,1675.780,701.8550,-2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID1+212,189980,571,1,1,8478.730,1445.280,641.2010,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+213,189980,571,1,1,8478.730,1445.280,650.4550,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID1+214,189980,571,1,1,8523.810,1290.220,623.7830,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID1+215,189980,571,1,1,8579.111,1431.439,615.5118,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID1+216,189980,571,1,1,8698.680,909.670,496.3710,-0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID1+217,189980,571,1,1,8707.630,1008.050,443.8770,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID1+218,189980,571,1,2,5915.753,1990.665,518.8197,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID1+219,189980,571,1,2,5996.645,2335.773,518.0319,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID1+220,189980,571,1,2,6367.613,1682.053,548.5184,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID1+221,189980,571,1,2,6691.890,1520.673,466.3800,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID1+222,189980,571,1,3,5715.870,2059.130,-340.3910,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID1+223,189980,571,1,3,7332.590,3024.400,440.8590,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID1+224,189980,571,1,3,8149.280,2384.140,510.6090,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID1+225,189980,571,1,4,7566.926,1642.527,348.2145,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID1+226,189980,571,1,4,7828.466,1809.705,348.0653,0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID1+227,189980,571,1,5,5877.630,1942.750,518.3700,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID1+228,189980,571,1,5,5889.070,2160.360,515.0020,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID1+229,189980,571,1,5,5966.520,1908.870,580.8170,0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID1+230,189980,571,1,64,6803.910,3634.238,743.4531,-0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID1+231,189980,571,1,64,7070.146,3508.667,733.4362,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID1+232,189980,571,1,256,6166.920,2004.080,541.9620,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID1+233,189980,571,1,256,6522.390,2173.170,509.0700,-3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID1+234,189980,571,1,256,6831.540,2201.450,663.2940,2.98450,0,0,0,1,@TIMER,255,1);
+-- Rich Saronite Deposits Icecrown
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID2+0,189981,571,1,1,6674.631,1332.353,299.6001,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID2+1,189981,571,1,1,6939.153,2862.694,435.1407,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID2+2,189981,571,1,1,7980.812,3096.596,635.4854,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID2+3,189981,571,1,1,5636.890,1931.159,517.3533,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID2+4,189981,571,1,1,5665.190,1897.490,519.6750,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+5,189981,571,1,1,5706.650,2046.590,-339.6590,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID2+6,189981,571,1,1,5711.610,2071.070,-340.7400,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID2+7,189981,571,1,1,5749.150,2086.660,-343.5200,-2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID2+8,189981,571,1,1,5753.728,2282.746,533.9716,-1.53589,0,0,0,1,@TIMER,255,1),
+(@GUID2+9,189981,571,1,1,5775.480,2081.830,-342.7420,0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID2+10,189981,571,1,1,5790.740,2214.070,515.1540,1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID2+11,189981,571,1,1,5808.930,2268.290,523.3210,2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID2+12,189981,571,1,1,5826.980,1863.070,-345.8090,1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID2+13,189981,571,1,1,5842.430,1858.810,-345.3000,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID2+14,189981,571,1,1,5843.150,2256.140,520.1550,-1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID2+15,189981,571,1,1,5857.440,1936.720,510.8840,0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID2+16,189981,571,1,1,5890.500,1915.920,-345.9820,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID2+17,189981,571,1,1,5890.500,1915.920,-345.9820,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID2+18,189981,571,1,1,5894.700,1913.140,-345.9370,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID2+19,189981,571,1,1,5914.500,2015.980,516.3390,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+20,189981,571,1,1,5941.548,1912.958,567.5397,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID2+21,189981,571,1,1,5957.890,2517.910,537.2770,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+22,189981,571,1,1,5961.092,2412.068,519.9221,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+23,189981,571,1,1,5967.890,1850.520,630.5570,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID2+24,189981,571,1,1,6038.564,2326.347,514.5131,1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID2+25,189981,571,1,1,6171.915,2015.665,531.4319,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID2+26,189981,571,1,1,6448.210,1897.020,515.3600,0.36652,0,0,0,1,@TIMER,255,1),
+(@GUID2+27,189981,571,1,1,6466.150,137.682,444.7190,2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID2+28,189981,571,1,1,6466.396,648.508,428.8037,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+29,189981,571,1,1,6477.440,2487.120,475.9810,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+30,189981,571,1,1,6481.970,540.381,438.7030,0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID2+31,189981,571,1,1,6482.543,2462.866,468.1175,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+32,189981,571,1,1,6483.739,1237.931,286.9318,1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID2+33,189981,571,1,1,6484.370,294.937,399.8210,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID2+34,189981,571,1,1,6497.030,3510.880,540.2320,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID2+35,189981,571,1,1,6514.270,896.626,290.6450,1.29154,0,0,0,1,@TIMER,255,1),
+(@GUID2+36,189981,571,1,1,6533.500,907.337,294.8920,0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID2+37,189981,571,1,1,6541.251,1011.675,276.9524,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID2+38,189981,571,1,1,6554.230,332.830,411.5670,0.13962,0,0,0,1,@TIMER,255,1),
+(@GUID2+39,189981,571,1,1,6557.070,284.192,401.7890,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID2+40,189981,571,1,1,6559.550,659.112,408.1460,-2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID2+41,189981,571,1,1,6561.430,1050.489,275.1745,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID2+42,189981,571,1,1,6583.151,1267.122,286.0256,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+43,189981,571,1,1,6604.228,1248.473,282.4915,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+44,189981,571,1,1,6608.890,990.280,284.7300,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID2+45,189981,571,1,1,6618.750,356.354,453.1560,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID2+46,189981,571,1,1,6622.904,1252.617,282.5027,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+47,189981,571,1,1,6636.596,3176.859,648.8128,1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID2+48,189981,571,1,1,6640.880,3346.680,677.4100,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+49,189981,571,1,1,6658.340,688.135,410.4380,2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID2+50,189981,571,1,1,6662.220,573.318,406.8580,-0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID2+51,189981,571,1,1,6664.980,615.527,410.0190,-2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID2+52,189981,571,1,1,6672.161,1189.572,273.2596,-2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID2+53,189981,571,1,1,6691.890,1520.673,466.3800,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID2+54,189981,571,1,1,6696.400,743.905,396.9640,-0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID2+55,189981,571,1,1,6710.980,644.300,412.4740,-1.29154,0,0,0,1,@TIMER,255,1),
+(@GUID2+56,189981,571,1,1,6717.320,1228.804,275.0786,-2.86234,0,0,0,1,@TIMER,255,1),
+(@GUID2+57,189981,571,1,1,6725.160,570.259,424.5290,-2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID2+58,189981,571,1,1,6734.880,1458.500,403.8720,0.31416,0,0,0,1,@TIMER,255,1),
+(@GUID2+59,189981,571,1,1,6737.770,586.034,425.3840,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID2+60,189981,571,1,1,6748.570,2727.220,435.5540,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID2+61,189981,571,1,1,6751.800,1325.140,285.5890,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID2+62,189981,571,1,1,6753.930,328.981,442.2290,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+63,189981,571,1,1,6754.170,2342.520,442.6880,-2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID2+64,189981,571,1,1,6754.800,575.615,425.3900,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID2+65,189981,571,1,1,6755.160,1224.160,276.8440,0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID2+66,189981,571,1,1,6755.390,974.467,312.3300,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+67,189981,571,1,1,6756.568,2694.843,427.8352,-2.80998,0,0,0,1,@TIMER,255,1),
+(@GUID2+68,189981,571,1,1,6758.730,585.806,425.6570,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID2+69,189981,571,1,1,6766.010,2936.860,456.1350,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID2+70,189981,571,1,1,6774.690,499.547,410.7330,-0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID2+71,189981,571,1,1,6781.035,1131.430,278.6142,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+72,189981,571,1,1,6789.004,1141.311,277.1633,-1.81514,0,0,0,1,@TIMER,255,1),
+(@GUID2+73,189981,571,1,1,6790.110,449.812,411.4930,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+74,189981,571,1,1,6793.867,924.565,348.8412,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID2+75,189981,571,1,1,6797.174,2369.824,435.4318,-0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID2+76,189981,571,1,1,6804.510,1294.230,281.1890,0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID2+77,189981,571,1,1,6817.340,453.798,470.4500,-3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID2+78,189981,571,1,1,6818.782,2181.032,660.7790,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+79,189981,571,1,1,6824.141,2207.658,654.9231,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID2+80,189981,571,1,1,6830.670,762.702,409.8570,2.12930,0,0,0,1,@TIMER,255,1),
+(@GUID2+81,189981,571,1,1,6833.760,2472.190,421.7130,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID2+82,189981,571,1,1,6884.590,645.147,426.5720,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+83,189981,571,1,1,6885.250,2378.060,427.7960,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID2+84,189981,571,1,1,6885.810,2052.910,828.6610,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID2+85,189981,571,1,1,6897.245,819.820,399.8205,-2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID2+86,189981,571,1,1,6898.430,786.803,405.3570,-1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID2+87,189981,571,1,1,6901.678,2352.561,428.5658,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+88,189981,571,1,1,6943.630,3630.960,830.1040,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+89,189981,571,1,1,6944.920,407.241,513.6190,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID2+90,189981,571,1,1,6993.890,681.144,491.2140,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID2+91,189981,571,1,1,6999.950,849.854,402.0200,-0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID2+92,189981,571,1,1,7010.360,702.436,473.7730,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID2+93,189981,571,1,1,7027.862,3066.551,475.0314,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID2+94,189981,571,1,1,7028.880,2508.660,409.5580,-0.54105,0,0,0,1,@TIMER,255,1),
+(@GUID2+95,189981,571,1,1,7053.120,824.111,537.6430,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+96,189981,571,1,1,7064.830,1379.270,307.5810,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID2+97,189981,571,1,1,7067.230,1367.880,306.2920,2.61799,0,0,0,1,@TIMER,255,1),
+(@GUID2+98,189981,571,1,1,7070.190,574.218,498.3680,-0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID2+99,189981,571,1,1,7102.520,3022.010,446.9720,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+100,189981,571,1,1,7115.280,1450.230,315.6940,-2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID2+101,189981,571,1,1,7136.144,1119.962,310.4275,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+102,189981,571,1,1,7144.400,2507.150,405.9100,-1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID2+103,189981,571,1,1,7162.500,2547.990,399.1830,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID2+104,189981,571,1,1,7164.714,2521.346,402.8072,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+105,189981,571,1,1,7185.228,2548.746,397.5674,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID2+106,189981,571,1,1,7215.860,2846.910,408.1010,2.89724,0,0,0,1,@TIMER,255,1),
+(@GUID2+107,189981,571,1,1,7231.514,2847.632,405.2855,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+108,189981,571,1,1,7235.410,575.545,499.3020,3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID2+109,189981,571,1,1,7235.530,1516.760,326.9980,-1.93732,0,0,0,1,@TIMER,255,1),
+(@GUID2+110,189981,571,1,1,7238.310,785.106,552.4170,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID2+111,189981,571,1,1,7240.890,2399.818,417.6793,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+112,189981,571,1,1,7260.710,1512.270,322.2740,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID2+113,189981,571,1,1,7323.180,2252.330,461.4260,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID2+114,189981,571,1,1,7330.260,2996.150,434.1070,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID2+115,189981,571,1,1,7330.480,2485.730,392.8050,1.11701,0,0,0,1,@TIMER,255,1),
+(@GUID2+116,189981,571,1,1,7343.430,602.649,615.5180,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID2+117,189981,571,1,1,7347.470,561.248,613.0550,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+118,189981,571,1,1,7362.550,614.322,580.0140,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID2+119,189981,571,1,1,7382.990,2443.480,387.4290,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID2+120,189981,571,1,1,7391.310,568.383,577.8610,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+121,189981,571,1,1,7399.734,2867.122,417.6852,-2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID2+122,189981,571,1,1,7420.410,3083.890,586.8870,-2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID2+123,189981,571,1,1,7420.450,632.061,497.2910,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+124,189981,571,1,1,7427.840,1463.890,324.1520,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID2+125,189981,571,1,1,7431.122,3330.435,693.0119,1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID2+126,189981,571,1,1,7466.787,2726.011,412.2881,-0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID2+127,189981,571,1,1,7471.173,2497.169,390.4092,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID2+128,189981,571,1,1,7472.370,1305.690,320.0850,-2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID2+129,189981,571,1,1,7476.556,1295.246,322.1502,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+130,189981,571,1,1,7476.560,1295.250,322.1500,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+131,189981,571,1,1,7488.803,1813.892,361.4976,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID2+132,189981,571,1,1,7488.803,1813.892,361.4976,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID2+133,189981,571,1,1,7490.424,2678.968,433.0785,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID2+134,189981,571,1,1,7512.870,1172.610,344.4850,-1.32645,0,0,0,1,@TIMER,255,1),
+(@GUID2+135,189981,571,1,1,7517.870,1846.080,360.2560,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID2+136,189981,571,1,1,7521.310,2268.770,391.4060,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID2+137,189981,571,1,1,7523.600,2698.610,409.9320,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID2+138,189981,571,1,1,7526.180,970.248,533.5250,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID2+139,189981,571,1,1,7529.280,639.333,494.9540,-2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID2+140,189981,571,1,1,7541.840,896.319,489.3380,0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID2+141,189981,571,1,1,7542.460,2870.100,429.9170,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID2+142,189981,571,1,1,7549.750,982.975,483.2320,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+143,189981,571,1,1,7554.596,1864.645,367.2740,0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID2+144,189981,571,1,1,7576.460,1972.390,369.5900,-0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID2+145,189981,571,1,1,7595.120,1891.100,371.2320,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID2+146,189981,571,1,1,7607.160,1752.610,339.9570,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID2+147,189981,571,1,1,7633.180,716.693,484.5840,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+148,189981,571,1,1,7653.100,2792.670,414.9850,0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID2+149,189981,571,1,1,7656.878,1786.749,350.2715,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+150,189981,571,1,1,7656.880,1786.750,350.2720,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+151,189981,571,1,1,7664.280,1709.210,333.7010,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID2+152,189981,571,1,1,7678.119,2818.930,444.8793,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID2+153,189981,571,1,1,7679.018,1021.261,471.1822,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+154,189981,571,1,1,7685.300,1256.030,341.5660,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID2+155,189981,571,1,1,7687.900,3554.850,736.6150,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID2+156,189981,571,1,1,7688.260,1386.790,347.2900,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+157,189981,571,1,1,7689.330,3181.030,578.8330,0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID2+158,189981,571,1,1,7689.890,553.471,698.6200,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID2+159,189981,571,1,1,7712.260,1282.210,339.2810,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+160,189981,571,1,1,7720.600,1424.710,353.3610,-1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID2+161,189981,571,1,1,7726.390,1305.620,341.8380,-2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID2+162,189981,571,1,1,7733.940,1814.480,349.6280,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+163,189981,571,1,1,7744.650,1779.400,338.0610,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID2+164,189981,571,1,1,7764.360,1088.720,395.6190,-0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID2+165,189981,571,1,1,7765.605,2713.188,409.2500,2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID2+166,189981,571,1,1,7772.450,796.567,517.5690,0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID2+167,189981,571,1,1,7773.792,1499.624,360.2978,-2.21657,0,0,0,1,@TIMER,255,1),
+(@GUID2+168,189981,571,1,1,7774.563,2665.078,405.8254,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+169,189981,571,1,1,7774.563,2665.078,405.8254,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID2+170,189981,571,1,1,7779.620,1830.560,356.3590,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID2+171,189981,571,1,1,7781.560,1106.510,395.6670,2.54818,0,0,0,1,@TIMER,255,1),
+(@GUID2+172,189981,571,1,1,7784.990,1043.740,395.6190,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+173,189981,571,1,1,7793.370,1526.290,363.6070,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID2+174,189981,571,1,1,7805.900,943.421,451.6210,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+175,189981,571,1,1,7819.700,1132.740,395.6190,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+176,189981,571,1,1,7822.420,696.106,554.0000,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID2+177,189981,571,1,1,7833.479,3008.132,536.2718,-1.20428,0,0,0,1,@TIMER,255,1),
+(@GUID2+178,189981,571,1,1,7834.560,818.007,501.7090,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID2+179,189981,571,1,1,7845.009,3354.724,736.6236,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID2+180,189981,571,1,1,7848.730,1108.210,395.6100,2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID2+181,189981,571,1,1,7854.104,1125.911,395.6191,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID2+182,189981,571,1,1,7857.740,1414.600,439.1670,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID2+183,189981,571,1,1,7867.160,1550.810,378.1740,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+184,189981,571,1,1,7894.100,1533.870,396.8620,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID2+185,189981,571,1,1,7915.382,2484.846,405.5244,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID2+186,189981,571,1,1,7926.210,2439.340,411.3850,2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID2+187,189981,571,1,1,7930.313,2802.014,499.5031,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID2+188,189981,571,1,1,7935.660,1579.350,411.4840,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID2+189,189981,571,1,1,7937.930,1442.640,520.4660,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID2+190,189981,571,1,1,7940.259,3483.749,694.0527,-1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID2+191,189981,571,1,1,7941.500,1706.580,371.8170,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+192,189981,571,1,1,7958.130,1927.860,367.0540,3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID2+193,189981,571,1,1,7963.188,2787.479,525.1877,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID2+194,189981,571,1,1,7980.900,1539.410,467.7100,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID2+195,189981,571,1,1,8006.929,1907.343,380.7083,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID2+196,189981,571,1,1,8044.050,1805.050,409.0340,2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID2+197,189981,571,1,1,8050.090,2858.940,510.4690,-1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID2+198,189981,571,1,1,8078.370,1646.490,553.9380,1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID2+199,189981,571,1,1,8128.210,1460.340,698.1700,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID2+200,189981,571,1,1,8150.700,1169.640,687.5320,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+201,189981,571,1,1,8160.790,1539.710,630.5920,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID2+202,189981,571,1,1,8161.500,1561.790,613.8130,2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID2+203,189981,571,1,1,8162.180,1286.700,785.9620,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID2+204,189981,571,1,1,8168.020,1303.410,793.5940,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID2+205,189981,571,1,1,8207.790,1281.010,775.6510,-0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID2+206,189981,571,1,1,8242.540,1257.540,741.1770,-1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID2+207,189981,571,1,1,8253.710,1842.500,563.0770,1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID2+208,189981,571,1,1,8266.340,1755.560,580.5210,-2.91469,0,0,0,1,@TIMER,255,1),
+(@GUID2+209,189981,571,1,1,8292.690,2611.040,718.0010,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID2+210,189981,571,1,1,8308.630,3014.360,679.2830,1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID2+211,189981,571,1,1,8450.060,1675.780,701.8550,-2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID2+212,189981,571,1,1,8478.730,1445.280,641.2010,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+213,189981,571,1,1,8478.730,1445.280,650.4550,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID2+214,189981,571,1,1,8523.810,1290.220,623.7830,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID2+215,189981,571,1,1,8579.111,1431.439,615.5118,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID2+216,189981,571,1,1,8698.680,909.670,496.3710,-0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID2+217,189981,571,1,1,8707.630,1008.050,443.8770,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID2+218,189981,571,1,2,5915.753,1990.665,518.8197,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID2+219,189981,571,1,2,5996.645,2335.773,518.0319,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID2+220,189981,571,1,2,6367.613,1682.053,548.5184,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID2+221,189981,571,1,2,6691.890,1520.673,466.3800,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID2+222,189981,571,1,3,5715.870,2059.130,-340.3910,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID2+223,189981,571,1,3,7332.590,3024.400,440.8590,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID2+224,189981,571,1,3,8149.280,2384.140,510.6090,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID2+225,189981,571,1,4,7566.926,1642.527,348.2145,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID2+226,189981,571,1,4,7828.466,1809.705,348.0653,0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID2+227,189981,571,1,5,5877.630,1942.750,518.3700,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID2+228,189981,571,1,5,5889.070,2160.360,515.0020,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID2+229,189981,571,1,5,5966.520,1908.870,580.8170,0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID2+230,189981,571,1,64,6803.910,3634.238,743.4531,-0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID2+231,189981,571,1,64,7070.146,3508.667,733.4362,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID2+232,189981,571,1,256,6166.920,2004.080,541.9620,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID2+233,189981,571,1,256,6522.390,2173.170,509.0700,-3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID2+234,189981,571,1,256,6831.540,2201.450,663.2940,2.98450,0,0,0,1,@TIMER,255,1);
+-- Titanium Deposits Icecrown
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID3+0,191133,571,1,1,6674.631,1332.353,299.6001,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID3+1,191133,571,1,1,6939.153,2862.694,435.1407,1.57080,0,0,0,1,@TIMER,255,1),
+(@GUID3+2,191133,571,1,1,7980.812,3096.596,635.4854,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID3+3,191133,571,1,1,5636.890,1931.159,517.3533,-1.50098,0,0,0,1,@TIMER,255,1),
+(@GUID3+4,191133,571,1,1,5665.190,1897.490,519.6750,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID3+5,191133,571,1,1,5706.650,2046.590,-339.6590,-2.39110,0,0,0,1,@TIMER,255,1),
+(@GUID3+6,191133,571,1,1,5711.610,2071.070,-340.7400,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID3+7,191133,571,1,1,5749.150,2086.660,-343.5200,-2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID3+8,191133,571,1,1,5753.728,2282.746,533.9716,-1.53589,0,0,0,1,@TIMER,255,1),
+(@GUID3+9,191133,571,1,1,5775.480,2081.830,-342.7420,0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID3+10,191133,571,1,1,5790.740,2214.070,515.1540,1.30900,0,0,0,1,@TIMER,255,1),
+(@GUID3+11,191133,571,1,1,5808.930,2268.290,523.3210,2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID3+12,191133,571,1,1,5826.980,1863.070,-345.8090,1.90241,0,0,0,1,@TIMER,255,1),
+(@GUID3+13,191133,571,1,1,5842.430,1858.810,-345.3000,-2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID3+14,191133,571,1,1,5843.150,2256.140,520.1550,-1.06465,0,0,0,1,@TIMER,255,1),
+(@GUID3+15,191133,571,1,1,5857.440,1936.720,510.8840,0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID3+16,191133,571,1,1,5890.500,1915.920,-345.9820,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID3+17,191133,571,1,1,5890.500,1915.920,-345.9820,-1.76278,0,0,0,1,@TIMER,255,1),
+(@GUID3+18,191133,571,1,1,5894.700,1913.140,-345.9370,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID3+19,191133,571,1,1,5914.500,2015.980,516.3390,2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID3+20,191133,571,1,1,5941.548,1912.958,567.5397,0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID3+21,191133,571,1,1,5957.890,2517.910,537.2770,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+22,191133,571,1,1,5961.092,2412.068,519.9221,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID3+23,191133,571,1,1,5967.890,1850.520,630.5570,-0.52360,0,0,0,1,@TIMER,255,1),
+(@GUID3+24,191133,571,1,1,6038.564,2326.347,514.5131,1.69297,0,0,0,1,@TIMER,255,1),
+(@GUID3+25,191133,571,1,1,6171.915,2015.665,531.4319,-1.43117,0,0,0,1,@TIMER,255,1),
+(@GUID3+26,191133,571,1,1,6448.210,1897.020,515.3600,0.36652,0,0,0,1,@TIMER,255,1),
+(@GUID3+27,191133,571,1,1,6466.150,137.682,444.7190,2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID3+28,191133,571,1,1,6466.396,648.508,428.8037,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+29,191133,571,1,1,6477.440,2487.120,475.9810,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+30,191133,571,1,1,6481.970,540.381,438.7030,0.47124,0,0,0,1,@TIMER,255,1),
+(@GUID3+31,191133,571,1,1,6482.543,2462.866,468.1175,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID3+32,191133,571,1,1,6483.739,1237.931,286.9318,1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID3+33,191133,571,1,1,6484.370,294.937,399.8210,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID3+34,191133,571,1,1,6497.030,3510.880,540.2320,-2.70526,0,0,0,1,@TIMER,255,1),
+(@GUID3+35,191133,571,1,1,6514.270,896.626,290.6450,1.29154,0,0,0,1,@TIMER,255,1),
+(@GUID3+36,191133,571,1,1,6533.500,907.337,294.8920,0.17453,0,0,0,1,@TIMER,255,1),
+(@GUID3+37,191133,571,1,1,6541.251,1011.675,276.9524,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID3+38,191133,571,1,1,6554.230,332.830,411.5670,0.13962,0,0,0,1,@TIMER,255,1),
+(@GUID3+39,191133,571,1,1,6557.070,284.192,401.7890,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID3+40,191133,571,1,1,6559.550,659.112,408.1460,-2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID3+41,191133,571,1,1,6561.430,1050.489,275.1745,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID3+42,191133,571,1,1,6583.151,1267.122,286.0256,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID3+43,191133,571,1,1,6604.228,1248.473,282.4915,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID3+44,191133,571,1,1,6608.890,990.280,284.7300,-2.77507,0,0,0,1,@TIMER,255,1),
+(@GUID3+45,191133,571,1,1,6618.750,356.354,453.1560,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID3+46,191133,571,1,1,6622.904,1252.617,282.5027,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID3+47,191133,571,1,1,6636.596,3176.859,648.8128,1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID3+48,191133,571,1,1,6640.880,3346.680,677.4100,-0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+49,191133,571,1,1,6658.340,688.135,410.4380,2.14675,0,0,0,1,@TIMER,255,1),
+(@GUID3+50,191133,571,1,1,6662.220,573.318,406.8580,-0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID3+51,191133,571,1,1,6664.980,615.527,410.0190,-2.86233,0,0,0,1,@TIMER,255,1),
+(@GUID3+52,191133,571,1,1,6672.161,1189.572,273.2596,-2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID3+53,191133,571,1,1,6691.890,1520.673,466.3800,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID3+54,191133,571,1,1,6696.400,743.905,396.9640,-0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID3+55,191133,571,1,1,6710.980,644.300,412.4740,-1.29154,0,0,0,1,@TIMER,255,1),
+(@GUID3+56,191133,571,1,1,6717.320,1228.804,275.0786,-2.86234,0,0,0,1,@TIMER,255,1),
+(@GUID3+57,191133,571,1,1,6725.160,570.259,424.5290,-2.46091,0,0,0,1,@TIMER,255,1),
+(@GUID3+58,191133,571,1,1,6734.880,1458.500,403.8720,0.31416,0,0,0,1,@TIMER,255,1),
+(@GUID3+59,191133,571,1,1,6737.770,586.034,425.3840,1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID3+60,191133,571,1,1,6748.570,2727.220,435.5540,1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID3+61,191133,571,1,1,6751.800,1325.140,285.5890,-1.60570,0,0,0,1,@TIMER,255,1),
+(@GUID3+62,191133,571,1,1,6753.930,328.981,442.2290,0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID3+63,191133,571,1,1,6754.170,2342.520,442.6880,-2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID3+64,191133,571,1,1,6754.800,575.615,425.3900,-1.41372,0,0,0,1,@TIMER,255,1),
+(@GUID3+65,191133,571,1,1,6755.160,1224.160,276.8440,0.34907,0,0,0,1,@TIMER,255,1),
+(@GUID3+66,191133,571,1,1,6755.390,974.467,312.3300,-2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID3+67,191133,571,1,1,6756.568,2694.843,427.8352,-2.80998,0,0,0,1,@TIMER,255,1),
+(@GUID3+68,191133,571,1,1,6758.730,585.806,425.6570,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID3+69,191133,571,1,1,6766.010,2936.860,456.1350,-2.00713,0,0,0,1,@TIMER,255,1),
+(@GUID3+70,191133,571,1,1,6774.690,499.547,410.7330,-0.97738,0,0,0,1,@TIMER,255,1),
+(@GUID3+71,191133,571,1,1,6781.035,1131.430,278.6142,2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID3+72,191133,571,1,1,6789.004,1141.311,277.1633,-1.81514,0,0,0,1,@TIMER,255,1),
+(@GUID3+73,191133,571,1,1,6790.110,449.812,411.4930,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+74,191133,571,1,1,6793.867,924.565,348.8412,0.85521,0,0,0,1,@TIMER,255,1),
+(@GUID3+75,191133,571,1,1,6797.174,2369.824,435.4318,-0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID3+76,191133,571,1,1,6804.510,1294.230,281.1890,0.50615,0,0,0,1,@TIMER,255,1),
+(@GUID3+77,191133,571,1,1,6817.340,453.798,470.4500,-3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID3+78,191133,571,1,1,6818.782,2181.032,660.7790,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID3+79,191133,571,1,1,6824.141,2207.658,654.9231,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID3+80,191133,571,1,1,6830.670,762.702,409.8570,2.12930,0,0,0,1,@TIMER,255,1),
+(@GUID3+81,191133,571,1,1,6833.760,2472.190,421.7130,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID3+82,191133,571,1,1,6884.590,645.147,426.5720,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID3+83,191133,571,1,1,6885.250,2378.060,427.7960,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID3+84,191133,571,1,1,6885.810,2052.910,828.6610,0.08727,0,0,0,1,@TIMER,255,1),
+(@GUID3+85,191133,571,1,1,6897.245,819.820,399.8205,-2.82743,0,0,0,1,@TIMER,255,1),
+(@GUID3+86,191133,571,1,1,6898.430,786.803,405.3570,-1.48353,0,0,0,1,@TIMER,255,1),
+(@GUID3+87,191133,571,1,1,6901.678,2352.561,428.5658,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID3+88,191133,571,1,1,6943.630,3630.960,830.1040,-1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID3+89,191133,571,1,1,6944.920,407.241,513.6190,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID3+90,191133,571,1,1,6993.890,681.144,491.2140,0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID3+91,191133,571,1,1,6999.950,849.854,402.0200,-0.38397,0,0,0,1,@TIMER,255,1),
+(@GUID3+92,191133,571,1,1,7010.360,702.436,473.7730,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID3+93,191133,571,1,1,7027.862,3066.551,475.0314,1.78023,0,0,0,1,@TIMER,255,1),
+(@GUID3+94,191133,571,1,1,7028.880,2508.660,409.5580,-0.54105,0,0,0,1,@TIMER,255,1),
+(@GUID3+95,191133,571,1,1,7053.120,824.111,537.6430,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+96,191133,571,1,1,7064.830,1379.270,307.5810,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID3+97,191133,571,1,1,7067.230,1367.880,306.2920,2.61799,0,0,0,1,@TIMER,255,1),
+(@GUID3+98,191133,571,1,1,7070.190,574.218,498.3680,-0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID3+99,191133,571,1,1,7102.520,3022.010,446.9720,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+100,191133,571,1,1,7115.280,1450.230,315.6940,-2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID3+101,191133,571,1,1,7136.144,1119.962,310.4275,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+102,191133,571,1,1,7144.400,2507.150,405.9100,-1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID3+103,191133,571,1,1,7162.500,2547.990,399.1830,1.71042,0,0,0,1,@TIMER,255,1),
+(@GUID3+104,191133,571,1,1,7164.714,2521.346,402.8072,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+105,191133,571,1,1,7185.228,2548.746,397.5674,1.55334,0,0,0,1,@TIMER,255,1),
+(@GUID3+106,191133,571,1,1,7215.860,2846.910,408.1010,2.89724,0,0,0,1,@TIMER,255,1),
+(@GUID3+107,191133,571,1,1,7231.514,2847.632,405.2855,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+108,191133,571,1,1,7235.410,575.545,499.3020,3.12412,0,0,0,1,@TIMER,255,1),
+(@GUID3+109,191133,571,1,1,7235.530,1516.760,326.9980,-1.93732,0,0,0,1,@TIMER,255,1),
+(@GUID3+110,191133,571,1,1,7238.310,785.106,552.4170,0.26180,0,0,0,1,@TIMER,255,1),
+(@GUID3+111,191133,571,1,1,7240.890,2399.818,417.6793,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID3+112,191133,571,1,1,7260.710,1512.270,322.2740,2.19912,0,0,0,1,@TIMER,255,1),
+(@GUID3+113,191133,571,1,1,7323.180,2252.330,461.4260,2.49582,0,0,0,1,@TIMER,255,1),
+(@GUID3+114,191133,571,1,1,7330.260,2996.150,434.1070,-1.98967,0,0,0,1,@TIMER,255,1),
+(@GUID3+115,191133,571,1,1,7330.480,2485.730,392.8050,1.11701,0,0,0,1,@TIMER,255,1),
+(@GUID3+116,191133,571,1,1,7343.430,602.649,615.5180,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID3+117,191133,571,1,1,7347.470,561.248,613.0550,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID3+118,191133,571,1,1,7362.550,614.322,580.0140,-3.01941,0,0,0,1,@TIMER,255,1),
+(@GUID3+119,191133,571,1,1,7382.990,2443.480,387.4290,-2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID3+120,191133,571,1,1,7391.310,568.383,577.8610,-1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+121,191133,571,1,1,7399.734,2867.122,417.6852,-2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID3+122,191133,571,1,1,7420.410,3083.890,586.8870,-2.35619,0,0,0,1,@TIMER,255,1),
+(@GUID3+123,191133,571,1,1,7420.450,632.061,497.2910,-1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+124,191133,571,1,1,7427.840,1463.890,324.1520,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID3+125,191133,571,1,1,7431.122,3330.435,693.0119,1.08210,0,0,0,1,@TIMER,255,1),
+(@GUID3+126,191133,571,1,1,7466.787,2726.011,412.2881,-0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID3+127,191133,571,1,1,7471.173,2497.169,390.4092,-1.34390,0,0,0,1,@TIMER,255,1),
+(@GUID3+128,191133,571,1,1,7472.370,1305.690,320.0850,-2.28638,0,0,0,1,@TIMER,255,1),
+(@GUID3+129,191133,571,1,1,7476.556,1295.246,322.1502,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID3+130,191133,571,1,1,7476.560,1295.250,322.1500,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID3+131,191133,571,1,1,7488.803,1813.892,361.4976,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID3+132,191133,571,1,1,7488.803,1813.892,361.4976,-2.65289,0,0,0,1,@TIMER,255,1),
+(@GUID3+133,191133,571,1,1,7490.424,2678.968,433.0785,-1.15192,0,0,0,1,@TIMER,255,1),
+(@GUID3+134,191133,571,1,1,7512.870,1172.610,344.4850,-1.32645,0,0,0,1,@TIMER,255,1),
+(@GUID3+135,191133,571,1,1,7517.870,1846.080,360.2560,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID3+136,191133,571,1,1,7521.310,2268.770,391.4060,-1.04720,0,0,0,1,@TIMER,255,1),
+(@GUID3+137,191133,571,1,1,7523.600,2698.610,409.9320,2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID3+138,191133,571,1,1,7526.180,970.248,533.5250,0.75049,0,0,0,1,@TIMER,255,1),
+(@GUID3+139,191133,571,1,1,7529.280,639.333,494.9540,-2.02458,0,0,0,1,@TIMER,255,1),
+(@GUID3+140,191133,571,1,1,7541.840,896.319,489.3380,0.95993,0,0,0,1,@TIMER,255,1),
+(@GUID3+141,191133,571,1,1,7542.460,2870.100,429.9170,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID3+142,191133,571,1,1,7549.750,982.975,483.2320,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+143,191133,571,1,1,7554.596,1864.645,367.2740,0.24435,0,0,0,1,@TIMER,255,1),
+(@GUID3+144,191133,571,1,1,7576.460,1972.390,369.5900,-0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID3+145,191133,571,1,1,7595.120,1891.100,371.2320,-2.72271,0,0,0,1,@TIMER,255,1),
+(@GUID3+146,191133,571,1,1,7607.160,1752.610,339.9570,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID3+147,191133,571,1,1,7633.180,716.693,484.5840,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+148,191133,571,1,1,7653.100,2792.670,414.9850,0.12217,0,0,0,1,@TIMER,255,1),
+(@GUID3+149,191133,571,1,1,7656.878,1786.749,350.2715,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID3+150,191133,571,1,1,7656.880,1786.750,350.2720,-2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID3+151,191133,571,1,1,7664.280,1709.210,333.7010,1.85005,0,0,0,1,@TIMER,255,1),
+(@GUID3+152,191133,571,1,1,7678.119,2818.930,444.8793,2.42601,0,0,0,1,@TIMER,255,1),
+(@GUID3+153,191133,571,1,1,7679.018,1021.261,471.1822,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID3+154,191133,571,1,1,7685.300,1256.030,341.5660,-2.30383,0,0,0,1,@TIMER,255,1),
+(@GUID3+155,191133,571,1,1,7687.900,3554.850,736.6150,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID3+156,191133,571,1,1,7688.260,1386.790,347.2900,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID3+157,191133,571,1,1,7689.330,3181.030,578.8330,0.40143,0,0,0,1,@TIMER,255,1),
+(@GUID3+158,191133,571,1,1,7689.890,553.471,698.6200,0.68068,0,0,0,1,@TIMER,255,1),
+(@GUID3+159,191133,571,1,1,7712.260,1282.210,339.2810,1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID3+160,191133,571,1,1,7720.600,1424.710,353.3610,-1.62316,0,0,0,1,@TIMER,255,1),
+(@GUID3+161,191133,571,1,1,7726.390,1305.620,341.8380,-2.96704,0,0,0,1,@TIMER,255,1),
+(@GUID3+162,191133,571,1,1,7733.940,1814.480,349.6280,-1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+163,191133,571,1,1,7744.650,1779.400,338.0610,3.03684,0,0,0,1,@TIMER,255,1),
+(@GUID3+164,191133,571,1,1,7764.360,1088.720,395.6190,-0.61086,0,0,0,1,@TIMER,255,1),
+(@GUID3+165,191133,571,1,1,7765.605,2713.188,409.2500,2.68781,0,0,0,1,@TIMER,255,1),
+(@GUID3+166,191133,571,1,1,7772.450,796.567,517.5690,0.41888,0,0,0,1,@TIMER,255,1),
+(@GUID3+167,191133,571,1,1,7773.792,1499.624,360.2978,-2.21657,0,0,0,1,@TIMER,255,1),
+(@GUID3+168,191133,571,1,1,7774.563,2665.078,405.8254,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID3+169,191133,571,1,1,7774.563,2665.078,405.8254,-0.66322,0,0,0,1,@TIMER,255,1),
+(@GUID3+170,191133,571,1,1,7779.620,1830.560,356.3590,-2.53072,0,0,0,1,@TIMER,255,1),
+(@GUID3+171,191133,571,1,1,7781.560,1106.510,395.6670,2.54818,0,0,0,1,@TIMER,255,1),
+(@GUID3+172,191133,571,1,1,7784.990,1043.740,395.6190,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+173,191133,571,1,1,7793.370,1526.290,363.6070,0.48869,0,0,0,1,@TIMER,255,1),
+(@GUID3+174,191133,571,1,1,7805.900,943.421,451.6210,-1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+175,191133,571,1,1,7819.700,1132.740,395.6190,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID3+176,191133,571,1,1,7822.420,696.106,554.0000,1.01229,0,0,0,1,@TIMER,255,1),
+(@GUID3+177,191133,571,1,1,7833.479,3008.132,536.2718,-1.20428,0,0,0,1,@TIMER,255,1),
+(@GUID3+178,191133,571,1,1,7834.560,818.007,501.7090,-0.92502,0,0,0,1,@TIMER,255,1),
+(@GUID3+179,191133,571,1,1,7845.009,3354.724,736.6236,0.82030,0,0,0,1,@TIMER,255,1),
+(@GUID3+180,191133,571,1,1,7848.730,1108.210,395.6100,2.74016,0,0,0,1,@TIMER,255,1),
+(@GUID3+181,191133,571,1,1,7854.104,1125.911,395.6191,1.88495,0,0,0,1,@TIMER,255,1),
+(@GUID3+182,191133,571,1,1,7857.740,1414.600,439.1670,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID3+183,191133,571,1,1,7867.160,1550.810,378.1740,0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+184,191133,571,1,1,7894.100,1533.870,396.8620,-3.07177,0,0,0,1,@TIMER,255,1),
+(@GUID3+185,191133,571,1,1,7915.382,2484.846,405.5244,0.73304,0,0,0,1,@TIMER,255,1),
+(@GUID3+186,191133,571,1,1,7926.210,2439.340,411.3850,2.67035,0,0,0,1,@TIMER,255,1),
+(@GUID3+187,191133,571,1,1,7930.313,2802.014,499.5031,-2.44346,0,0,0,1,@TIMER,255,1),
+(@GUID3+188,191133,571,1,1,7935.660,1579.350,411.4840,-1.91986,0,0,0,1,@TIMER,255,1),
+(@GUID3+189,191133,571,1,1,7937.930,1442.640,520.4660,2.26892,0,0,0,1,@TIMER,255,1),
+(@GUID3+190,191133,571,1,1,7940.259,3483.749,694.0527,-1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID3+191,191133,571,1,1,7941.500,1706.580,371.8170,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+192,191133,571,1,1,7958.130,1927.860,367.0540,3.05433,0,0,0,1,@TIMER,255,1),
+(@GUID3+193,191133,571,1,1,7963.188,2787.479,525.1877,-1.83259,0,0,0,1,@TIMER,255,1),
+(@GUID3+194,191133,571,1,1,7980.900,1539.410,467.7100,1.46608,0,0,0,1,@TIMER,255,1),
+(@GUID3+195,191133,571,1,1,8006.929,1907.343,380.7083,-1.13446,0,0,0,1,@TIMER,255,1),
+(@GUID3+196,191133,571,1,1,8044.050,1805.050,409.0340,2.09439,0,0,0,1,@TIMER,255,1),
+(@GUID3+197,191133,571,1,1,8050.090,2858.940,510.4690,-1.65806,0,0,0,1,@TIMER,255,1),
+(@GUID3+198,191133,571,1,1,8078.370,1646.490,553.9380,1.97222,0,0,0,1,@TIMER,255,1),
+(@GUID3+199,191133,571,1,1,8128.210,1460.340,698.1700,0.20944,0,0,0,1,@TIMER,255,1),
+(@GUID3+200,191133,571,1,1,8150.700,1169.640,687.5320,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID3+201,191133,571,1,1,8160.790,1539.710,630.5920,0.76794,0,0,0,1,@TIMER,255,1),
+(@GUID3+202,191133,571,1,1,8161.500,1561.790,613.8130,2.05949,0,0,0,1,@TIMER,255,1),
+(@GUID3+203,191133,571,1,1,8162.180,1286.700,785.9620,2.33874,0,0,0,1,@TIMER,255,1),
+(@GUID3+204,191133,571,1,1,8168.020,1303.410,793.5940,0.15708,0,0,0,1,@TIMER,255,1),
+(@GUID3+205,191133,571,1,1,8207.790,1281.010,775.6510,-0.87266,0,0,0,1,@TIMER,255,1),
+(@GUID3+206,191133,571,1,1,8242.540,1257.540,741.1770,-1.37881,0,0,0,1,@TIMER,255,1),
+(@GUID3+207,191133,571,1,1,8253.710,1842.500,563.0770,1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID3+208,191133,571,1,1,8266.340,1755.560,580.5210,-2.91469,0,0,0,1,@TIMER,255,1),
+(@GUID3+209,191133,571,1,1,8292.690,2611.040,718.0010,-2.93214,0,0,0,1,@TIMER,255,1),
+(@GUID3+210,191133,571,1,1,8308.630,3014.360,679.2830,1.44862,0,0,0,1,@TIMER,255,1),
+(@GUID3+211,191133,571,1,1,8450.060,1675.780,701.8550,-2.04204,0,0,0,1,@TIMER,255,1),
+(@GUID3+212,191133,571,1,1,8478.730,1445.280,641.2010,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+213,191133,571,1,1,8478.730,1445.280,650.4550,1.25664,0,0,0,1,@TIMER,255,1),
+(@GUID3+214,191133,571,1,1,8523.810,1290.220,623.7830,-3.00195,0,0,0,1,@TIMER,255,1),
+(@GUID3+215,191133,571,1,1,8579.111,1431.439,615.5118,2.37364,0,0,0,1,@TIMER,255,1),
+(@GUID3+216,191133,571,1,1,8698.680,909.670,496.3710,-0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID3+217,191133,571,1,1,8707.630,1008.050,443.8770,0.89012,0,0,0,1,@TIMER,255,1),
+(@GUID3+218,191133,571,1,2,5915.753,1990.665,518.8197,-2.98450,0,0,0,1,@TIMER,255,1),
+(@GUID3+219,191133,571,1,2,5996.645,2335.773,518.0319,-0.55850,0,0,0,1,@TIMER,255,1),
+(@GUID3+220,191133,571,1,2,6367.613,1682.053,548.5184,-0.83776,0,0,0,1,@TIMER,255,1),
+(@GUID3+221,191133,571,1,2,6691.890,1520.673,466.3800,-2.07694,0,0,0,1,@TIMER,255,1),
+(@GUID3+222,191133,571,1,3,5715.870,2059.130,-340.3910,-2.25147,0,0,0,1,@TIMER,255,1),
+(@GUID3+223,191133,571,1,3,7332.590,3024.400,440.8590,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID3+224,191133,571,1,3,8149.280,2384.140,510.6090,2.51327,0,0,0,1,@TIMER,255,1),
+(@GUID3+225,191133,571,1,4,7566.926,1642.527,348.2145,1.09956,0,0,0,1,@TIMER,255,1),
+(@GUID3+226,191133,571,1,4,7828.466,1809.705,348.0653,0.43633,0,0,0,1,@TIMER,255,1),
+(@GUID3+227,191133,571,1,5,5877.630,1942.750,518.3700,-0.27925,0,0,0,1,@TIMER,255,1),
+(@GUID3+228,191133,571,1,5,5889.070,2160.360,515.0020,-2.47837,0,0,0,1,@TIMER,255,1),
+(@GUID3+229,191133,571,1,5,5966.520,1908.870,580.8170,0.71559,0,0,0,1,@TIMER,255,1),
+(@GUID3+230,191133,571,1,64,6803.910,3634.238,743.4531,-0.33161,0,0,0,1,@TIMER,255,1),
+(@GUID3+231,191133,571,1,64,7070.146,3508.667,733.4362,-1.22173,0,0,0,1,@TIMER,255,1),
+(@GUID3+232,191133,571,1,256,6166.920,2004.080,541.9620,1.79769,0,0,0,1,@TIMER,255,1),
+(@GUID3+233,191133,571,1,256,6522.390,2173.170,509.0700,-3.10665,0,0,0,1,@TIMER,255,1),
+(@GUID3+234,191133,571,1,256,6831.540,2201.450,663.2940,2.98450,0,0,0,1,@TIMER,255,1);
+-- Pooling
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID1 AND @GUID1+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID2 AND @GUID2+@LASTGUID;
+DELETE FROM `pool_gameobject` WHERE `guid` BETWEEN @GUID3 AND @GUID3+@LASTGUID;
+-- Pool different ore types to each spawnpoint
+INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES
+(@GUID1+0,@POOL+0,@CHANCE1, 'Icecrown Ore Spawnpoint 1 Saronite'),
+(@GUID2+0,@POOL+0,@CHANCE2, 'Icecrown Ore Spawnpoint 1 Rich Saronite'),
+(@GUID3+0,@POOL+0,@CHANCE3, 'Icecrown Ore Spawnpoint 1 Titanium'),
+(@GUID1+1,@POOL+1,@CHANCE1, 'Icecrown Ore Spawnpoint 2 Saronite'),
+(@GUID2+1,@POOL+1,@CHANCE2, 'Icecrown Ore Spawnpoint 2 Rich Saronite'),
+(@GUID3+1,@POOL+1,@CHANCE3, 'Icecrown Ore Spawnpoint 2 Titanium'),
+(@GUID1+2,@POOL+2,@CHANCE1, 'Icecrown Ore Spawnpoint 3 Saronite'),
+(@GUID2+2,@POOL+2,@CHANCE2, 'Icecrown Ore Spawnpoint 3 Rich Saronite'),
+(@GUID3+2,@POOL+2,@CHANCE3, 'Icecrown Ore Spawnpoint 3 Titanium'),
+(@GUID1+3,@POOL+3,@CHANCE1, 'Icecrown Ore Spawnpoint 4 Saronite'),
+(@GUID2+3,@POOL+3,@CHANCE2, 'Icecrown Ore Spawnpoint 4 Rich Saronite'),
+(@GUID3+3,@POOL+3,@CHANCE3, 'Icecrown Ore Spawnpoint 4 Titanium'),
+(@GUID1+4,@POOL+4,@CHANCE1, 'Icecrown Ore Spawnpoint 5 Saronite'),
+(@GUID2+4,@POOL+4,@CHANCE2, 'Icecrown Ore Spawnpoint 5 Rich Saronite'),
+(@GUID3+4,@POOL+4,@CHANCE3, 'Icecrown Ore Spawnpoint 5 Titanium'),
+(@GUID1+5,@POOL+5,@CHANCE1, 'Icecrown Ore Spawnpoint 6 Saronite'),
+(@GUID2+5,@POOL+5,@CHANCE2, 'Icecrown Ore Spawnpoint 6 Rich Saronite'),
+(@GUID3+5,@POOL+5,@CHANCE3, 'Icecrown Ore Spawnpoint 6 Titanium'),
+(@GUID1+6,@POOL+6,@CHANCE1, 'Icecrown Ore Spawnpoint 7 Saronite'),
+(@GUID2+6,@POOL+6,@CHANCE2, 'Icecrown Ore Spawnpoint 7 Rich Saronite'),
+(@GUID3+6,@POOL+6,@CHANCE3, 'Icecrown Ore Spawnpoint 7 Titanium'),
+(@GUID1+7,@POOL+7,@CHANCE1, 'Icecrown Ore Spawnpoint 8 Saronite'),
+(@GUID2+7,@POOL+7,@CHANCE2, 'Icecrown Ore Spawnpoint 8 Rich Saronite'),
+(@GUID3+7,@POOL+7,@CHANCE3, 'Icecrown Ore Spawnpoint 8 Titanium'),
+(@GUID1+8,@POOL+8,@CHANCE1, 'Icecrown Ore Spawnpoint 9 Saronite'),
+(@GUID2+8,@POOL+8,@CHANCE2, 'Icecrown Ore Spawnpoint 9 Rich Saronite'),
+(@GUID3+8,@POOL+8,@CHANCE3, 'Icecrown Ore Spawnpoint 9 Titanium'),
+(@GUID1+9,@POOL+9,@CHANCE1, 'Icecrown Ore Spawnpoint 10 Saronite'),
+(@GUID2+9,@POOL+9,@CHANCE2, 'Icecrown Ore Spawnpoint 10 Rich Saronite'),
+(@GUID3+9,@POOL+9,@CHANCE3, 'Icecrown Ore Spawnpoint 10 Titanium'),
+(@GUID1+10,@POOL+10,@CHANCE1, 'Icecrown Ore Spawnpoint 11 Saronite'),
+(@GUID2+10,@POOL+10,@CHANCE2, 'Icecrown Ore Spawnpoint 11 Rich Saronite'),
+(@GUID3+10,@POOL+10,@CHANCE3, 'Icecrown Ore Spawnpoint 11 Titanium'),
+(@GUID1+11,@POOL+11,@CHANCE1, 'Icecrown Ore Spawnpoint 12 Saronite'),
+(@GUID2+11,@POOL+11,@CHANCE2, 'Icecrown Ore Spawnpoint 12 Rich Saronite'),
+(@GUID3+11,@POOL+11,@CHANCE3, 'Icecrown Ore Spawnpoint 12 Titanium'),
+(@GUID1+12,@POOL+12,@CHANCE1, 'Icecrown Ore Spawnpoint 13 Saronite'),
+(@GUID2+12,@POOL+12,@CHANCE2, 'Icecrown Ore Spawnpoint 13 Rich Saronite'),
+(@GUID3+12,@POOL+12,@CHANCE3, 'Icecrown Ore Spawnpoint 13 Titanium'),
+(@GUID1+13,@POOL+13,@CHANCE1, 'Icecrown Ore Spawnpoint 14 Saronite'),
+(@GUID2+13,@POOL+13,@CHANCE2, 'Icecrown Ore Spawnpoint 14 Rich Saronite'),
+(@GUID3+13,@POOL+13,@CHANCE3, 'Icecrown Ore Spawnpoint 14 Titanium'),
+(@GUID1+14,@POOL+14,@CHANCE1, 'Icecrown Ore Spawnpoint 15 Saronite'),
+(@GUID2+14,@POOL+14,@CHANCE2, 'Icecrown Ore Spawnpoint 15 Rich Saronite'),
+(@GUID3+14,@POOL+14,@CHANCE3, 'Icecrown Ore Spawnpoint 15 Titanium'),
+(@GUID1+15,@POOL+15,@CHANCE1, 'Icecrown Ore Spawnpoint 16 Saronite'),
+(@GUID2+15,@POOL+15,@CHANCE2, 'Icecrown Ore Spawnpoint 16 Rich Saronite'),
+(@GUID3+15,@POOL+15,@CHANCE3, 'Icecrown Ore Spawnpoint 16 Titanium'),
+(@GUID1+16,@POOL+16,@CHANCE1, 'Icecrown Ore Spawnpoint 17 Saronite'),
+(@GUID2+16,@POOL+16,@CHANCE2, 'Icecrown Ore Spawnpoint 17 Rich Saronite'),
+(@GUID3+16,@POOL+16,@CHANCE3, 'Icecrown Ore Spawnpoint 17 Titanium'),
+(@GUID1+17,@POOL+17,@CHANCE1, 'Icecrown Ore Spawnpoint 18 Saronite'),
+(@GUID2+17,@POOL+17,@CHANCE2, 'Icecrown Ore Spawnpoint 18 Rich Saronite'),
+(@GUID3+17,@POOL+17,@CHANCE3, 'Icecrown Ore Spawnpoint 18 Titanium'),
+(@GUID1+18,@POOL+18,@CHANCE1, 'Icecrown Ore Spawnpoint 19 Saronite'),
+(@GUID2+18,@POOL+18,@CHANCE2, 'Icecrown Ore Spawnpoint 19 Rich Saronite'),
+(@GUID3+18,@POOL+18,@CHANCE3, 'Icecrown Ore Spawnpoint 19 Titanium'),
+(@GUID1+19,@POOL+19,@CHANCE1, 'Icecrown Ore Spawnpoint 20 Saronite'),
+(@GUID2+19,@POOL+19,@CHANCE2, 'Icecrown Ore Spawnpoint 20 Rich Saronite'),
+(@GUID3+19,@POOL+19,@CHANCE3, 'Icecrown Ore Spawnpoint 20 Titanium'),
+(@GUID1+20,@POOL+20,@CHANCE1, 'Icecrown Ore Spawnpoint 21 Saronite'),
+(@GUID2+20,@POOL+20,@CHANCE2, 'Icecrown Ore Spawnpoint 21 Rich Saronite'),
+(@GUID3+20,@POOL+20,@CHANCE3, 'Icecrown Ore Spawnpoint 21 Titanium'),
+(@GUID1+21,@POOL+21,@CHANCE1, 'Icecrown Ore Spawnpoint 22 Saronite'),
+(@GUID2+21,@POOL+21,@CHANCE2, 'Icecrown Ore Spawnpoint 22 Rich Saronite'),
+(@GUID3+21,@POOL+21,@CHANCE3, 'Icecrown Ore Spawnpoint 22 Titanium'),
+(@GUID1+22,@POOL+22,@CHANCE1, 'Icecrown Ore Spawnpoint 23 Saronite'),
+(@GUID2+22,@POOL+22,@CHANCE2, 'Icecrown Ore Spawnpoint 23 Rich Saronite'),
+(@GUID3+22,@POOL+22,@CHANCE3, 'Icecrown Ore Spawnpoint 23 Titanium'),
+(@GUID1+23,@POOL+23,@CHANCE1, 'Icecrown Ore Spawnpoint 24 Saronite'),
+(@GUID2+23,@POOL+23,@CHANCE2, 'Icecrown Ore Spawnpoint 24 Rich Saronite'),
+(@GUID3+23,@POOL+23,@CHANCE3, 'Icecrown Ore Spawnpoint 24 Titanium'),
+(@GUID1+24,@POOL+24,@CHANCE1, 'Icecrown Ore Spawnpoint 25 Saronite'),
+(@GUID2+24,@POOL+24,@CHANCE2, 'Icecrown Ore Spawnpoint 25 Rich Saronite'),
+(@GUID3+24,@POOL+24,@CHANCE3, 'Icecrown Ore Spawnpoint 25 Titanium'),
+(@GUID1+25,@POOL+25,@CHANCE1, 'Icecrown Ore Spawnpoint 26 Saronite'),
+(@GUID2+25,@POOL+25,@CHANCE2, 'Icecrown Ore Spawnpoint 26 Rich Saronite'),
+(@GUID3+25,@POOL+25,@CHANCE3, 'Icecrown Ore Spawnpoint 26 Titanium'),
+(@GUID1+26,@POOL+26,@CHANCE1, 'Icecrown Ore Spawnpoint 27 Saronite'),
+(@GUID2+26,@POOL+26,@CHANCE2, 'Icecrown Ore Spawnpoint 27 Rich Saronite'),
+(@GUID3+26,@POOL+26,@CHANCE3, 'Icecrown Ore Spawnpoint 27 Titanium'),
+(@GUID1+27,@POOL+27,@CHANCE1, 'Icecrown Ore Spawnpoint 28 Saronite'),
+(@GUID2+27,@POOL+27,@CHANCE2, 'Icecrown Ore Spawnpoint 28 Rich Saronite'),
+(@GUID3+27,@POOL+27,@CHANCE3, 'Icecrown Ore Spawnpoint 28 Titanium'),
+(@GUID1+28,@POOL+28,@CHANCE1, 'Icecrown Ore Spawnpoint 29 Saronite'),
+(@GUID2+28,@POOL+28,@CHANCE2, 'Icecrown Ore Spawnpoint 29 Rich Saronite'),
+(@GUID3+28,@POOL+28,@CHANCE3, 'Icecrown Ore Spawnpoint 29 Titanium'),
+(@GUID1+29,@POOL+29,@CHANCE1, 'Icecrown Ore Spawnpoint 30 Saronite'),
+(@GUID2+29,@POOL+29,@CHANCE2, 'Icecrown Ore Spawnpoint 30 Rich Saronite'),
+(@GUID3+29,@POOL+29,@CHANCE3, 'Icecrown Ore Spawnpoint 30 Titanium'),
+(@GUID1+30,@POOL+30,@CHANCE1, 'Icecrown Ore Spawnpoint 31 Saronite'),
+(@GUID2+30,@POOL+30,@CHANCE2, 'Icecrown Ore Spawnpoint 31 Rich Saronite'),
+(@GUID3+30,@POOL+30,@CHANCE3, 'Icecrown Ore Spawnpoint 31 Titanium'),
+(@GUID1+31,@POOL+31,@CHANCE1, 'Icecrown Ore Spawnpoint 32 Saronite'),
+(@GUID2+31,@POOL+31,@CHANCE2, 'Icecrown Ore Spawnpoint 32 Rich Saronite'),
+(@GUID3+31,@POOL+31,@CHANCE3, 'Icecrown Ore Spawnpoint 32 Titanium'),
+(@GUID1+32,@POOL+32,@CHANCE1, 'Icecrown Ore Spawnpoint 33 Saronite'),
+(@GUID2+32,@POOL+32,@CHANCE2, 'Icecrown Ore Spawnpoint 33 Rich Saronite'),
+(@GUID3+32,@POOL+32,@CHANCE3, 'Icecrown Ore Spawnpoint 33 Titanium'),
+(@GUID1+33,@POOL+33,@CHANCE1, 'Icecrown Ore Spawnpoint 34 Saronite'),
+(@GUID2+33,@POOL+33,@CHANCE2, 'Icecrown Ore Spawnpoint 34 Rich Saronite'),
+(@GUID3+33,@POOL+33,@CHANCE3, 'Icecrown Ore Spawnpoint 34 Titanium'),
+(@GUID1+34,@POOL+34,@CHANCE1, 'Icecrown Ore Spawnpoint 35 Saronite'),
+(@GUID2+34,@POOL+34,@CHANCE2, 'Icecrown Ore Spawnpoint 35 Rich Saronite'),
+(@GUID3+34,@POOL+34,@CHANCE3, 'Icecrown Ore Spawnpoint 35 Titanium'),
+(@GUID1+35,@POOL+35,@CHANCE1, 'Icecrown Ore Spawnpoint 36 Saronite'),
+(@GUID2+35,@POOL+35,@CHANCE2, 'Icecrown Ore Spawnpoint 36 Rich Saronite'),
+(@GUID3+35,@POOL+35,@CHANCE3, 'Icecrown Ore Spawnpoint 36 Titanium'),
+(@GUID1+36,@POOL+36,@CHANCE1, 'Icecrown Ore Spawnpoint 37 Saronite'),
+(@GUID2+36,@POOL+36,@CHANCE2, 'Icecrown Ore Spawnpoint 37 Rich Saronite'),
+(@GUID3+36,@POOL+36,@CHANCE3, 'Icecrown Ore Spawnpoint 37 Titanium'),
+(@GUID1+37,@POOL+37,@CHANCE1, 'Icecrown Ore Spawnpoint 38 Saronite'),
+(@GUID2+37,@POOL+37,@CHANCE2, 'Icecrown Ore Spawnpoint 38 Rich Saronite'),
+(@GUID3+37,@POOL+37,@CHANCE3, 'Icecrown Ore Spawnpoint 38 Titanium'),
+(@GUID1+38,@POOL+38,@CHANCE1, 'Icecrown Ore Spawnpoint 39 Saronite'),
+(@GUID2+38,@POOL+38,@CHANCE2, 'Icecrown Ore Spawnpoint 39 Rich Saronite'),
+(@GUID3+38,@POOL+38,@CHANCE3, 'Icecrown Ore Spawnpoint 39 Titanium'),
+(@GUID1+39,@POOL+39,@CHANCE1, 'Icecrown Ore Spawnpoint 40 Saronite'),
+(@GUID2+39,@POOL+39,@CHANCE2, 'Icecrown Ore Spawnpoint 40 Rich Saronite'),
+(@GUID3+39,@POOL+39,@CHANCE3, 'Icecrown Ore Spawnpoint 40 Titanium'),
+(@GUID1+40,@POOL+40,@CHANCE1, 'Icecrown Ore Spawnpoint 41 Saronite'),
+(@GUID2+40,@POOL+40,@CHANCE2, 'Icecrown Ore Spawnpoint 41 Rich Saronite'),
+(@GUID3+40,@POOL+40,@CHANCE3, 'Icecrown Ore Spawnpoint 41 Titanium'),
+(@GUID1+41,@POOL+41,@CHANCE1, 'Icecrown Ore Spawnpoint 42 Saronite'),
+(@GUID2+41,@POOL+41,@CHANCE2, 'Icecrown Ore Spawnpoint 42 Rich Saronite'),
+(@GUID3+41,@POOL+41,@CHANCE3, 'Icecrown Ore Spawnpoint 42 Titanium'),
+(@GUID1+42,@POOL+42,@CHANCE1, 'Icecrown Ore Spawnpoint 43 Saronite'),
+(@GUID2+42,@POOL+42,@CHANCE2, 'Icecrown Ore Spawnpoint 43 Rich Saronite'),
+(@GUID3+42,@POOL+42,@CHANCE3, 'Icecrown Ore Spawnpoint 43 Titanium'),
+(@GUID1+43,@POOL+43,@CHANCE1, 'Icecrown Ore Spawnpoint 44 Saronite'),
+(@GUID2+43,@POOL+43,@CHANCE2, 'Icecrown Ore Spawnpoint 44 Rich Saronite'),
+(@GUID3+43,@POOL+43,@CHANCE3, 'Icecrown Ore Spawnpoint 44 Titanium'),
+(@GUID1+44,@POOL+44,@CHANCE1, 'Icecrown Ore Spawnpoint 45 Saronite'),
+(@GUID2+44,@POOL+44,@CHANCE2, 'Icecrown Ore Spawnpoint 45 Rich Saronite'),
+(@GUID3+44,@POOL+44,@CHANCE3, 'Icecrown Ore Spawnpoint 45 Titanium'),
+(@GUID1+45,@POOL+45,@CHANCE1, 'Icecrown Ore Spawnpoint 46 Saronite'),
+(@GUID2+45,@POOL+45,@CHANCE2, 'Icecrown Ore Spawnpoint 46 Rich Saronite'),
+(@GUID3+45,@POOL+45,@CHANCE3, 'Icecrown Ore Spawnpoint 46 Titanium'),
+(@GUID1+46,@POOL+46,@CHANCE1, 'Icecrown Ore Spawnpoint 47 Saronite'),
+(@GUID2+46,@POOL+46,@CHANCE2, 'Icecrown Ore Spawnpoint 47 Rich Saronite'),
+(@GUID3+46,@POOL+46,@CHANCE3, 'Icecrown Ore Spawnpoint 47 Titanium'),
+(@GUID1+47,@POOL+47,@CHANCE1, 'Icecrown Ore Spawnpoint 48 Saronite'),
+(@GUID2+47,@POOL+47,@CHANCE2, 'Icecrown Ore Spawnpoint 48 Rich Saronite'),
+(@GUID3+47,@POOL+47,@CHANCE3, 'Icecrown Ore Spawnpoint 48 Titanium'),
+(@GUID1+48,@POOL+48,@CHANCE1, 'Icecrown Ore Spawnpoint 49 Saronite'),
+(@GUID2+48,@POOL+48,@CHANCE2, 'Icecrown Ore Spawnpoint 49 Rich Saronite'),
+(@GUID3+48,@POOL+48,@CHANCE3, 'Icecrown Ore Spawnpoint 49 Titanium'),
+(@GUID1+49,@POOL+49,@CHANCE1, 'Icecrown Ore Spawnpoint 50 Saronite'),
+(@GUID2+49,@POOL+49,@CHANCE2, 'Icecrown Ore Spawnpoint 50 Rich Saronite'),
+(@GUID3+49,@POOL+49,@CHANCE3, 'Icecrown Ore Spawnpoint 50 Titanium'),
+(@GUID1+50,@POOL+50,@CHANCE1, 'Icecrown Ore Spawnpoint 51 Saronite'),
+(@GUID2+50,@POOL+50,@CHANCE2, 'Icecrown Ore Spawnpoint 51 Rich Saronite'),
+(@GUID3+50,@POOL+50,@CHANCE3, 'Icecrown Ore Spawnpoint 51 Titanium'),
+(@GUID1+51,@POOL+51,@CHANCE1, 'Icecrown Ore Spawnpoint 52 Saronite'),
+(@GUID2+51,@POOL+51,@CHANCE2, 'Icecrown Ore Spawnpoint 52 Rich Saronite'),
+(@GUID3+51,@POOL+51,@CHANCE3, 'Icecrown Ore Spawnpoint 52 Titanium'),
+(@GUID1+52,@POOL+52,@CHANCE1, 'Icecrown Ore Spawnpoint 53 Saronite'),
+(@GUID2+52,@POOL+52,@CHANCE2, 'Icecrown Ore Spawnpoint 53 Rich Saronite'),
+(@GUID3+52,@POOL+52,@CHANCE3, 'Icecrown Ore Spawnpoint 53 Titanium'),
+(@GUID1+53,@POOL+53,@CHANCE1, 'Icecrown Ore Spawnpoint 54 Saronite'),
+(@GUID2+53,@POOL+53,@CHANCE2, 'Icecrown Ore Spawnpoint 54 Rich Saronite'),
+(@GUID3+53,@POOL+53,@CHANCE3, 'Icecrown Ore Spawnpoint 54 Titanium'),
+(@GUID1+54,@POOL+54,@CHANCE1, 'Icecrown Ore Spawnpoint 55 Saronite'),
+(@GUID2+54,@POOL+54,@CHANCE2, 'Icecrown Ore Spawnpoint 55 Rich Saronite'),
+(@GUID3+54,@POOL+54,@CHANCE3, 'Icecrown Ore Spawnpoint 55 Titanium'),
+(@GUID1+55,@POOL+55,@CHANCE1, 'Icecrown Ore Spawnpoint 56 Saronite'),
+(@GUID2+55,@POOL+55,@CHANCE2, 'Icecrown Ore Spawnpoint 56 Rich Saronite'),
+(@GUID3+55,@POOL+55,@CHANCE3, 'Icecrown Ore Spawnpoint 56 Titanium'),
+(@GUID1+56,@POOL+56,@CHANCE1, 'Icecrown Ore Spawnpoint 57 Saronite'),
+(@GUID2+56,@POOL+56,@CHANCE2, 'Icecrown Ore Spawnpoint 57 Rich Saronite'),
+(@GUID3+56,@POOL+56,@CHANCE3, 'Icecrown Ore Spawnpoint 57 Titanium'),
+(@GUID1+57,@POOL+57,@CHANCE1, 'Icecrown Ore Spawnpoint 58 Saronite'),
+(@GUID2+57,@POOL+57,@CHANCE2, 'Icecrown Ore Spawnpoint 58 Rich Saronite'),
+(@GUID3+57,@POOL+57,@CHANCE3, 'Icecrown Ore Spawnpoint 58 Titanium'),
+(@GUID1+58,@POOL+58,@CHANCE1, 'Icecrown Ore Spawnpoint 59 Saronite'),
+(@GUID2+58,@POOL+58,@CHANCE2, 'Icecrown Ore Spawnpoint 59 Rich Saronite'),
+(@GUID3+58,@POOL+58,@CHANCE3, 'Icecrown Ore Spawnpoint 59 Titanium'),
+(@GUID1+59,@POOL+59,@CHANCE1, 'Icecrown Ore Spawnpoint 60 Saronite'),
+(@GUID2+59,@POOL+59,@CHANCE2, 'Icecrown Ore Spawnpoint 60 Rich Saronite'),
+(@GUID3+59,@POOL+59,@CHANCE3, 'Icecrown Ore Spawnpoint 60 Titanium'),
+(@GUID1+60,@POOL+60,@CHANCE1, 'Icecrown Ore Spawnpoint 61 Saronite'),
+(@GUID2+60,@POOL+60,@CHANCE2, 'Icecrown Ore Spawnpoint 61 Rich Saronite'),
+(@GUID3+60,@POOL+60,@CHANCE3, 'Icecrown Ore Spawnpoint 61 Titanium'),
+(@GUID1+61,@POOL+61,@CHANCE1, 'Icecrown Ore Spawnpoint 62 Saronite'),
+(@GUID2+61,@POOL+61,@CHANCE2, 'Icecrown Ore Spawnpoint 62 Rich Saronite'),
+(@GUID3+61,@POOL+61,@CHANCE3, 'Icecrown Ore Spawnpoint 62 Titanium'),
+(@GUID1+62,@POOL+62,@CHANCE1, 'Icecrown Ore Spawnpoint 63 Saronite'),
+(@GUID2+62,@POOL+62,@CHANCE2, 'Icecrown Ore Spawnpoint 63 Rich Saronite'),
+(@GUID3+62,@POOL+62,@CHANCE3, 'Icecrown Ore Spawnpoint 63 Titanium'),
+(@GUID1+63,@POOL+63,@CHANCE1, 'Icecrown Ore Spawnpoint 64 Saronite'),
+(@GUID2+63,@POOL+63,@CHANCE2, 'Icecrown Ore Spawnpoint 64 Rich Saronite'),
+(@GUID3+63,@POOL+63,@CHANCE3, 'Icecrown Ore Spawnpoint 64 Titanium'),
+(@GUID1+64,@POOL+64,@CHANCE1, 'Icecrown Ore Spawnpoint 65 Saronite'),
+(@GUID2+64,@POOL+64,@CHANCE2, 'Icecrown Ore Spawnpoint 65 Rich Saronite'),
+(@GUID3+64,@POOL+64,@CHANCE3, 'Icecrown Ore Spawnpoint 65 Titanium'),
+(@GUID1+65,@POOL+65,@CHANCE1, 'Icecrown Ore Spawnpoint 66 Saronite'),
+(@GUID2+65,@POOL+65,@CHANCE2, 'Icecrown Ore Spawnpoint 66 Rich Saronite'),
+(@GUID3+65,@POOL+65,@CHANCE3, 'Icecrown Ore Spawnpoint 66 Titanium'),
+(@GUID1+66,@POOL+66,@CHANCE1, 'Icecrown Ore Spawnpoint 67 Saronite'),
+(@GUID2+66,@POOL+66,@CHANCE2, 'Icecrown Ore Spawnpoint 67 Rich Saronite'),
+(@GUID3+66,@POOL+66,@CHANCE3, 'Icecrown Ore Spawnpoint 67 Titanium'),
+(@GUID1+67,@POOL+67,@CHANCE1, 'Icecrown Ore Spawnpoint 68 Saronite'),
+(@GUID2+67,@POOL+67,@CHANCE2, 'Icecrown Ore Spawnpoint 68 Rich Saronite'),
+(@GUID3+67,@POOL+67,@CHANCE3, 'Icecrown Ore Spawnpoint 68 Titanium'),
+(@GUID1+68,@POOL+68,@CHANCE1, 'Icecrown Ore Spawnpoint 69 Saronite'),
+(@GUID2+68,@POOL+68,@CHANCE2, 'Icecrown Ore Spawnpoint 69 Rich Saronite'),
+(@GUID3+68,@POOL+68,@CHANCE3, 'Icecrown Ore Spawnpoint 69 Titanium'),
+(@GUID1+69,@POOL+69,@CHANCE1, 'Icecrown Ore Spawnpoint 70 Saronite'),
+(@GUID2+69,@POOL+69,@CHANCE2, 'Icecrown Ore Spawnpoint 70 Rich Saronite'),
+(@GUID3+69,@POOL+69,@CHANCE3, 'Icecrown Ore Spawnpoint 70 Titanium'),
+(@GUID1+70,@POOL+70,@CHANCE1, 'Icecrown Ore Spawnpoint 71 Saronite'),
+(@GUID2+70,@POOL+70,@CHANCE2, 'Icecrown Ore Spawnpoint 71 Rich Saronite'),
+(@GUID3+70,@POOL+70,@CHANCE3, 'Icecrown Ore Spawnpoint 71 Titanium'),
+(@GUID1+71,@POOL+71,@CHANCE1, 'Icecrown Ore Spawnpoint 72 Saronite'),
+(@GUID2+71,@POOL+71,@CHANCE2, 'Icecrown Ore Spawnpoint 72 Rich Saronite'),
+(@GUID3+71,@POOL+71,@CHANCE3, 'Icecrown Ore Spawnpoint 72 Titanium'),
+(@GUID1+72,@POOL+72,@CHANCE1, 'Icecrown Ore Spawnpoint 73 Saronite'),
+(@GUID2+72,@POOL+72,@CHANCE2, 'Icecrown Ore Spawnpoint 73 Rich Saronite'),
+(@GUID3+72,@POOL+72,@CHANCE3, 'Icecrown Ore Spawnpoint 73 Titanium'),
+(@GUID1+73,@POOL+73,@CHANCE1, 'Icecrown Ore Spawnpoint 74 Saronite'),
+(@GUID2+73,@POOL+73,@CHANCE2, 'Icecrown Ore Spawnpoint 74 Rich Saronite'),
+(@GUID3+73,@POOL+73,@CHANCE3, 'Icecrown Ore Spawnpoint 74 Titanium'),
+(@GUID1+74,@POOL+74,@CHANCE1, 'Icecrown Ore Spawnpoint 75 Saronite'),
+(@GUID2+74,@POOL+74,@CHANCE2, 'Icecrown Ore Spawnpoint 75 Rich Saronite'),
+(@GUID3+74,@POOL+74,@CHANCE3, 'Icecrown Ore Spawnpoint 75 Titanium'),
+(@GUID1+75,@POOL+75,@CHANCE1, 'Icecrown Ore Spawnpoint 76 Saronite'),
+(@GUID2+75,@POOL+75,@CHANCE2, 'Icecrown Ore Spawnpoint 76 Rich Saronite'),
+(@GUID3+75,@POOL+75,@CHANCE3, 'Icecrown Ore Spawnpoint 76 Titanium'),
+(@GUID1+76,@POOL+76,@CHANCE1, 'Icecrown Ore Spawnpoint 77 Saronite'),
+(@GUID2+76,@POOL+76,@CHANCE2, 'Icecrown Ore Spawnpoint 77 Rich Saronite'),
+(@GUID3+76,@POOL+76,@CHANCE3, 'Icecrown Ore Spawnpoint 77 Titanium'),
+(@GUID1+77,@POOL+77,@CHANCE1, 'Icecrown Ore Spawnpoint 78 Saronite'),
+(@GUID2+77,@POOL+77,@CHANCE2, 'Icecrown Ore Spawnpoint 78 Rich Saronite'),
+(@GUID3+77,@POOL+77,@CHANCE3, 'Icecrown Ore Spawnpoint 78 Titanium'),
+(@GUID1+78,@POOL+78,@CHANCE1, 'Icecrown Ore Spawnpoint 79 Saronite'),
+(@GUID2+78,@POOL+78,@CHANCE2, 'Icecrown Ore Spawnpoint 79 Rich Saronite'),
+(@GUID3+78,@POOL+78,@CHANCE3, 'Icecrown Ore Spawnpoint 79 Titanium'),
+(@GUID1+79,@POOL+79,@CHANCE1, 'Icecrown Ore Spawnpoint 80 Saronite'),
+(@GUID2+79,@POOL+79,@CHANCE2, 'Icecrown Ore Spawnpoint 80 Rich Saronite'),
+(@GUID3+79,@POOL+79,@CHANCE3, 'Icecrown Ore Spawnpoint 80 Titanium'),
+(@GUID1+80,@POOL+80,@CHANCE1, 'Icecrown Ore Spawnpoint 81 Saronite'),
+(@GUID2+80,@POOL+80,@CHANCE2, 'Icecrown Ore Spawnpoint 81 Rich Saronite'),
+(@GUID3+80,@POOL+80,@CHANCE3, 'Icecrown Ore Spawnpoint 81 Titanium'),
+(@GUID1+81,@POOL+81,@CHANCE1, 'Icecrown Ore Spawnpoint 82 Saronite'),
+(@GUID2+81,@POOL+81,@CHANCE2, 'Icecrown Ore Spawnpoint 82 Rich Saronite'),
+(@GUID3+81,@POOL+81,@CHANCE3, 'Icecrown Ore Spawnpoint 82 Titanium'),
+(@GUID1+82,@POOL+82,@CHANCE1, 'Icecrown Ore Spawnpoint 83 Saronite'),
+(@GUID2+82,@POOL+82,@CHANCE2, 'Icecrown Ore Spawnpoint 83 Rich Saronite'),
+(@GUID3+82,@POOL+82,@CHANCE3, 'Icecrown Ore Spawnpoint 83 Titanium'),
+(@GUID1+83,@POOL+83,@CHANCE1, 'Icecrown Ore Spawnpoint 84 Saronite'),
+(@GUID2+83,@POOL+83,@CHANCE2, 'Icecrown Ore Spawnpoint 84 Rich Saronite'),
+(@GUID3+83,@POOL+83,@CHANCE3, 'Icecrown Ore Spawnpoint 84 Titanium'),
+(@GUID1+84,@POOL+84,@CHANCE1, 'Icecrown Ore Spawnpoint 85 Saronite'),
+(@GUID2+84,@POOL+84,@CHANCE2, 'Icecrown Ore Spawnpoint 85 Rich Saronite'),
+(@GUID3+84,@POOL+84,@CHANCE3, 'Icecrown Ore Spawnpoint 85 Titanium'),
+(@GUID1+85,@POOL+85,@CHANCE1, 'Icecrown Ore Spawnpoint 86 Saronite'),
+(@GUID2+85,@POOL+85,@CHANCE2, 'Icecrown Ore Spawnpoint 86 Rich Saronite'),
+(@GUID3+85,@POOL+85,@CHANCE3, 'Icecrown Ore Spawnpoint 86 Titanium'),
+(@GUID1+86,@POOL+86,@CHANCE1, 'Icecrown Ore Spawnpoint 87 Saronite'),
+(@GUID2+86,@POOL+86,@CHANCE2, 'Icecrown Ore Spawnpoint 87 Rich Saronite'),
+(@GUID3+86,@POOL+86,@CHANCE3, 'Icecrown Ore Spawnpoint 87 Titanium'),
+(@GUID1+87,@POOL+87,@CHANCE1, 'Icecrown Ore Spawnpoint 88 Saronite'),
+(@GUID2+87,@POOL+87,@CHANCE2, 'Icecrown Ore Spawnpoint 88 Rich Saronite'),
+(@GUID3+87,@POOL+87,@CHANCE3, 'Icecrown Ore Spawnpoint 88 Titanium'),
+(@GUID1+88,@POOL+88,@CHANCE1, 'Icecrown Ore Spawnpoint 89 Saronite'),
+(@GUID2+88,@POOL+88,@CHANCE2, 'Icecrown Ore Spawnpoint 89 Rich Saronite'),
+(@GUID3+88,@POOL+88,@CHANCE3, 'Icecrown Ore Spawnpoint 89 Titanium'),
+(@GUID1+89,@POOL+89,@CHANCE1, 'Icecrown Ore Spawnpoint 90 Saronite'),
+(@GUID2+89,@POOL+89,@CHANCE2, 'Icecrown Ore Spawnpoint 90 Rich Saronite'),
+(@GUID3+89,@POOL+89,@CHANCE3, 'Icecrown Ore Spawnpoint 90 Titanium'),
+(@GUID1+90,@POOL+90,@CHANCE1, 'Icecrown Ore Spawnpoint 91 Saronite'),
+(@GUID2+90,@POOL+90,@CHANCE2, 'Icecrown Ore Spawnpoint 91 Rich Saronite'),
+(@GUID3+90,@POOL+90,@CHANCE3, 'Icecrown Ore Spawnpoint 91 Titanium'),
+(@GUID1+91,@POOL+91,@CHANCE1, 'Icecrown Ore Spawnpoint 92 Saronite'),
+(@GUID2+91,@POOL+91,@CHANCE2, 'Icecrown Ore Spawnpoint 92 Rich Saronite'),
+(@GUID3+91,@POOL+91,@CHANCE3, 'Icecrown Ore Spawnpoint 92 Titanium'),
+(@GUID1+92,@POOL+92,@CHANCE1, 'Icecrown Ore Spawnpoint 93 Saronite'),
+(@GUID2+92,@POOL+92,@CHANCE2, 'Icecrown Ore Spawnpoint 93 Rich Saronite'),
+(@GUID3+92,@POOL+92,@CHANCE3, 'Icecrown Ore Spawnpoint 93 Titanium'),
+(@GUID1+93,@POOL+93,@CHANCE1, 'Icecrown Ore Spawnpoint 94 Saronite'),
+(@GUID2+93,@POOL+93,@CHANCE2, 'Icecrown Ore Spawnpoint 94 Rich Saronite'),
+(@GUID3+93,@POOL+93,@CHANCE3, 'Icecrown Ore Spawnpoint 94 Titanium'),
+(@GUID1+94,@POOL+94,@CHANCE1, 'Icecrown Ore Spawnpoint 95 Saronite'),
+(@GUID2+94,@POOL+94,@CHANCE2, 'Icecrown Ore Spawnpoint 95 Rich Saronite'),
+(@GUID3+94,@POOL+94,@CHANCE3, 'Icecrown Ore Spawnpoint 95 Titanium'),
+(@GUID1+95,@POOL+95,@CHANCE1, 'Icecrown Ore Spawnpoint 96 Saronite'),
+(@GUID2+95,@POOL+95,@CHANCE2, 'Icecrown Ore Spawnpoint 96 Rich Saronite'),
+(@GUID3+95,@POOL+95,@CHANCE3, 'Icecrown Ore Spawnpoint 96 Titanium'),
+(@GUID1+96,@POOL+96,@CHANCE1, 'Icecrown Ore Spawnpoint 97 Saronite'),
+(@GUID2+96,@POOL+96,@CHANCE2, 'Icecrown Ore Spawnpoint 97 Rich Saronite'),
+(@GUID3+96,@POOL+96,@CHANCE3, 'Icecrown Ore Spawnpoint 97 Titanium'),
+(@GUID1+97,@POOL+97,@CHANCE1, 'Icecrown Ore Spawnpoint 98 Saronite'),
+(@GUID2+97,@POOL+97,@CHANCE2, 'Icecrown Ore Spawnpoint 98 Rich Saronite'),
+(@GUID3+97,@POOL+97,@CHANCE3, 'Icecrown Ore Spawnpoint 98 Titanium'),
+(@GUID1+98,@POOL+98,@CHANCE1, 'Icecrown Ore Spawnpoint 99 Saronite'),
+(@GUID2+98,@POOL+98,@CHANCE2, 'Icecrown Ore Spawnpoint 99 Rich Saronite'),
+(@GUID3+98,@POOL+98,@CHANCE3, 'Icecrown Ore Spawnpoint 99 Titanium'),
+(@GUID1+99,@POOL+99,@CHANCE1, 'Icecrown Ore Spawnpoint 100 Saronite'),
+(@GUID2+99,@POOL+99,@CHANCE2, 'Icecrown Ore Spawnpoint 100 Rich Saronite'),
+(@GUID3+99,@POOL+99,@CHANCE3, 'Icecrown Ore Spawnpoint 100 Titanium'),
+(@GUID1+100,@POOL+100,@CHANCE1, 'Icecrown Ore Spawnpoint 101 Saronite'),
+(@GUID2+100,@POOL+100,@CHANCE2, 'Icecrown Ore Spawnpoint 101 Rich Saronite'),
+(@GUID3+100,@POOL+100,@CHANCE3, 'Icecrown Ore Spawnpoint 101 Titanium'),
+(@GUID1+101,@POOL+101,@CHANCE1, 'Icecrown Ore Spawnpoint 102 Saronite'),
+(@GUID2+101,@POOL+101,@CHANCE2, 'Icecrown Ore Spawnpoint 102 Rich Saronite'),
+(@GUID3+101,@POOL+101,@CHANCE3, 'Icecrown Ore Spawnpoint 102 Titanium'),
+(@GUID1+102,@POOL+102,@CHANCE1, 'Icecrown Ore Spawnpoint 103 Saronite'),
+(@GUID2+102,@POOL+102,@CHANCE2, 'Icecrown Ore Spawnpoint 103 Rich Saronite'),
+(@GUID3+102,@POOL+102,@CHANCE3, 'Icecrown Ore Spawnpoint 103 Titanium'),
+(@GUID1+103,@POOL+103,@CHANCE1, 'Icecrown Ore Spawnpoint 104 Saronite'),
+(@GUID2+103,@POOL+103,@CHANCE2, 'Icecrown Ore Spawnpoint 104 Rich Saronite'),
+(@GUID3+103,@POOL+103,@CHANCE3, 'Icecrown Ore Spawnpoint 104 Titanium'),
+(@GUID1+104,@POOL+104,@CHANCE1, 'Icecrown Ore Spawnpoint 105 Saronite'),
+(@GUID2+104,@POOL+104,@CHANCE2, 'Icecrown Ore Spawnpoint 105 Rich Saronite'),
+(@GUID3+104,@POOL+104,@CHANCE3, 'Icecrown Ore Spawnpoint 105 Titanium'),
+(@GUID1+105,@POOL+105,@CHANCE1, 'Icecrown Ore Spawnpoint 106 Saronite'),
+(@GUID2+105,@POOL+105,@CHANCE2, 'Icecrown Ore Spawnpoint 106 Rich Saronite'),
+(@GUID3+105,@POOL+105,@CHANCE3, 'Icecrown Ore Spawnpoint 106 Titanium'),
+(@GUID1+106,@POOL+106,@CHANCE1, 'Icecrown Ore Spawnpoint 107 Saronite'),
+(@GUID2+106,@POOL+106,@CHANCE2, 'Icecrown Ore Spawnpoint 107 Rich Saronite'),
+(@GUID3+106,@POOL+106,@CHANCE3, 'Icecrown Ore Spawnpoint 107 Titanium'),
+(@GUID1+107,@POOL+107,@CHANCE1, 'Icecrown Ore Spawnpoint 108 Saronite'),
+(@GUID2+107,@POOL+107,@CHANCE2, 'Icecrown Ore Spawnpoint 108 Rich Saronite'),
+(@GUID3+107,@POOL+107,@CHANCE3, 'Icecrown Ore Spawnpoint 108 Titanium'),
+(@GUID1+108,@POOL+108,@CHANCE1, 'Icecrown Ore Spawnpoint 109 Saronite'),
+(@GUID2+108,@POOL+108,@CHANCE2, 'Icecrown Ore Spawnpoint 109 Rich Saronite'),
+(@GUID3+108,@POOL+108,@CHANCE3, 'Icecrown Ore Spawnpoint 109 Titanium'),
+(@GUID1+109,@POOL+109,@CHANCE1, 'Icecrown Ore Spawnpoint 110 Saronite'),
+(@GUID2+109,@POOL+109,@CHANCE2, 'Icecrown Ore Spawnpoint 110 Rich Saronite'),
+(@GUID3+109,@POOL+109,@CHANCE3, 'Icecrown Ore Spawnpoint 110 Titanium'),
+(@GUID1+110,@POOL+110,@CHANCE1, 'Icecrown Ore Spawnpoint 111 Saronite'),
+(@GUID2+110,@POOL+110,@CHANCE2, 'Icecrown Ore Spawnpoint 111 Rich Saronite'),
+(@GUID3+110,@POOL+110,@CHANCE3, 'Icecrown Ore Spawnpoint 111 Titanium'),
+(@GUID1+111,@POOL+111,@CHANCE1, 'Icecrown Ore Spawnpoint 112 Saronite'),
+(@GUID2+111,@POOL+111,@CHANCE2, 'Icecrown Ore Spawnpoint 112 Rich Saronite'),
+(@GUID3+111,@POOL+111,@CHANCE3, 'Icecrown Ore Spawnpoint 112 Titanium'),
+(@GUID1+112,@POOL+112,@CHANCE1, 'Icecrown Ore Spawnpoint 113 Saronite'),
+(@GUID2+112,@POOL+112,@CHANCE2, 'Icecrown Ore Spawnpoint 113 Rich Saronite'),
+(@GUID3+112,@POOL+112,@CHANCE3, 'Icecrown Ore Spawnpoint 113 Titanium'),
+(@GUID1+113,@POOL+113,@CHANCE1, 'Icecrown Ore Spawnpoint 114 Saronite'),
+(@GUID2+113,@POOL+113,@CHANCE2, 'Icecrown Ore Spawnpoint 114 Rich Saronite'),
+(@GUID3+113,@POOL+113,@CHANCE3, 'Icecrown Ore Spawnpoint 114 Titanium'),
+(@GUID1+114,@POOL+114,@CHANCE1, 'Icecrown Ore Spawnpoint 115 Saronite'),
+(@GUID2+114,@POOL+114,@CHANCE2, 'Icecrown Ore Spawnpoint 115 Rich Saronite'),
+(@GUID3+114,@POOL+114,@CHANCE3, 'Icecrown Ore Spawnpoint 115 Titanium'),
+(@GUID1+115,@POOL+115,@CHANCE1, 'Icecrown Ore Spawnpoint 116 Saronite'),
+(@GUID2+115,@POOL+115,@CHANCE2, 'Icecrown Ore Spawnpoint 116 Rich Saronite'),
+(@GUID3+115,@POOL+115,@CHANCE3, 'Icecrown Ore Spawnpoint 116 Titanium'),
+(@GUID1+116,@POOL+116,@CHANCE1, 'Icecrown Ore Spawnpoint 117 Saronite'),
+(@GUID2+116,@POOL+116,@CHANCE2, 'Icecrown Ore Spawnpoint 117 Rich Saronite'),
+(@GUID3+116,@POOL+116,@CHANCE3, 'Icecrown Ore Spawnpoint 117 Titanium'),
+(@GUID1+117,@POOL+117,@CHANCE1, 'Icecrown Ore Spawnpoint 118 Saronite'),
+(@GUID2+117,@POOL+117,@CHANCE2, 'Icecrown Ore Spawnpoint 118 Rich Saronite'),
+(@GUID3+117,@POOL+117,@CHANCE3, 'Icecrown Ore Spawnpoint 118 Titanium'),
+(@GUID1+118,@POOL+118,@CHANCE1, 'Icecrown Ore Spawnpoint 119 Saronite'),
+(@GUID2+118,@POOL+118,@CHANCE2, 'Icecrown Ore Spawnpoint 119 Rich Saronite'),
+(@GUID3+118,@POOL+118,@CHANCE3, 'Icecrown Ore Spawnpoint 119 Titanium'),
+(@GUID1+119,@POOL+119,@CHANCE1, 'Icecrown Ore Spawnpoint 120 Saronite'),
+(@GUID2+119,@POOL+119,@CHANCE2, 'Icecrown Ore Spawnpoint 120 Rich Saronite'),
+(@GUID3+119,@POOL+119,@CHANCE3, 'Icecrown Ore Spawnpoint 120 Titanium'),
+(@GUID1+120,@POOL+120,@CHANCE1, 'Icecrown Ore Spawnpoint 121 Saronite'),
+(@GUID2+120,@POOL+120,@CHANCE2, 'Icecrown Ore Spawnpoint 121 Rich Saronite'),
+(@GUID3+120,@POOL+120,@CHANCE3, 'Icecrown Ore Spawnpoint 121 Titanium'),
+(@GUID1+121,@POOL+121,@CHANCE1, 'Icecrown Ore Spawnpoint 122 Saronite'),
+(@GUID2+121,@POOL+121,@CHANCE2, 'Icecrown Ore Spawnpoint 122 Rich Saronite'),
+(@GUID3+121,@POOL+121,@CHANCE3, 'Icecrown Ore Spawnpoint 122 Titanium'),
+(@GUID1+122,@POOL+122,@CHANCE1, 'Icecrown Ore Spawnpoint 123 Saronite'),
+(@GUID2+122,@POOL+122,@CHANCE2, 'Icecrown Ore Spawnpoint 123 Rich Saronite'),
+(@GUID3+122,@POOL+122,@CHANCE3, 'Icecrown Ore Spawnpoint 123 Titanium'),
+(@GUID1+123,@POOL+123,@CHANCE1, 'Icecrown Ore Spawnpoint 124 Saronite'),
+(@GUID2+123,@POOL+123,@CHANCE2, 'Icecrown Ore Spawnpoint 124 Rich Saronite'),
+(@GUID3+123,@POOL+123,@CHANCE3, 'Icecrown Ore Spawnpoint 124 Titanium'),
+(@GUID1+124,@POOL+124,@CHANCE1, 'Icecrown Ore Spawnpoint 125 Saronite'),
+(@GUID2+124,@POOL+124,@CHANCE2, 'Icecrown Ore Spawnpoint 125 Rich Saronite'),
+(@GUID3+124,@POOL+124,@CHANCE3, 'Icecrown Ore Spawnpoint 125 Titanium'),
+(@GUID1+125,@POOL+125,@CHANCE1, 'Icecrown Ore Spawnpoint 126 Saronite'),
+(@GUID2+125,@POOL+125,@CHANCE2, 'Icecrown Ore Spawnpoint 126 Rich Saronite'),
+(@GUID3+125,@POOL+125,@CHANCE3, 'Icecrown Ore Spawnpoint 126 Titanium'),
+(@GUID1+126,@POOL+126,@CHANCE1, 'Icecrown Ore Spawnpoint 127 Saronite'),
+(@GUID2+126,@POOL+126,@CHANCE2, 'Icecrown Ore Spawnpoint 127 Rich Saronite'),
+(@GUID3+126,@POOL+126,@CHANCE3, 'Icecrown Ore Spawnpoint 127 Titanium'),
+(@GUID1+127,@POOL+127,@CHANCE1, 'Icecrown Ore Spawnpoint 128 Saronite'),
+(@GUID2+127,@POOL+127,@CHANCE2, 'Icecrown Ore Spawnpoint 128 Rich Saronite'),
+(@GUID3+127,@POOL+127,@CHANCE3, 'Icecrown Ore Spawnpoint 128 Titanium'),
+(@GUID1+128,@POOL+128,@CHANCE1, 'Icecrown Ore Spawnpoint 129 Saronite'),
+(@GUID2+128,@POOL+128,@CHANCE2, 'Icecrown Ore Spawnpoint 129 Rich Saronite'),
+(@GUID3+128,@POOL+128,@CHANCE3, 'Icecrown Ore Spawnpoint 129 Titanium'),
+(@GUID1+129,@POOL+129,@CHANCE1, 'Icecrown Ore Spawnpoint 130 Saronite'),
+(@GUID2+129,@POOL+129,@CHANCE2, 'Icecrown Ore Spawnpoint 130 Rich Saronite'),
+(@GUID3+129,@POOL+129,@CHANCE3, 'Icecrown Ore Spawnpoint 130 Titanium'),
+(@GUID1+130,@POOL+130,@CHANCE1, 'Icecrown Ore Spawnpoint 131 Saronite'),
+(@GUID2+130,@POOL+130,@CHANCE2, 'Icecrown Ore Spawnpoint 131 Rich Saronite'),
+(@GUID3+130,@POOL+130,@CHANCE3, 'Icecrown Ore Spawnpoint 131 Titanium'),
+(@GUID1+131,@POOL+131,@CHANCE1, 'Icecrown Ore Spawnpoint 132 Saronite'),
+(@GUID2+131,@POOL+131,@CHANCE2, 'Icecrown Ore Spawnpoint 132 Rich Saronite'),
+(@GUID3+131,@POOL+131,@CHANCE3, 'Icecrown Ore Spawnpoint 132 Titanium'),
+(@GUID1+132,@POOL+132,@CHANCE1, 'Icecrown Ore Spawnpoint 133 Saronite'),
+(@GUID2+132,@POOL+132,@CHANCE2, 'Icecrown Ore Spawnpoint 133 Rich Saronite'),
+(@GUID3+132,@POOL+132,@CHANCE3, 'Icecrown Ore Spawnpoint 133 Titanium'),
+(@GUID1+133,@POOL+133,@CHANCE1, 'Icecrown Ore Spawnpoint 134 Saronite'),
+(@GUID2+133,@POOL+133,@CHANCE2, 'Icecrown Ore Spawnpoint 134 Rich Saronite'),
+(@GUID3+133,@POOL+133,@CHANCE3, 'Icecrown Ore Spawnpoint 134 Titanium'),
+(@GUID1+134,@POOL+134,@CHANCE1, 'Icecrown Ore Spawnpoint 135 Saronite'),
+(@GUID2+134,@POOL+134,@CHANCE2, 'Icecrown Ore Spawnpoint 135 Rich Saronite'),
+(@GUID3+134,@POOL+134,@CHANCE3, 'Icecrown Ore Spawnpoint 135 Titanium'),
+(@GUID1+135,@POOL+135,@CHANCE1, 'Icecrown Ore Spawnpoint 136 Saronite'),
+(@GUID2+135,@POOL+135,@CHANCE2, 'Icecrown Ore Spawnpoint 136 Rich Saronite'),
+(@GUID3+135,@POOL+135,@CHANCE3, 'Icecrown Ore Spawnpoint 136 Titanium'),
+(@GUID1+136,@POOL+136,@CHANCE1, 'Icecrown Ore Spawnpoint 137 Saronite'),
+(@GUID2+136,@POOL+136,@CHANCE2, 'Icecrown Ore Spawnpoint 137 Rich Saronite'),
+(@GUID3+136,@POOL+136,@CHANCE3, 'Icecrown Ore Spawnpoint 137 Titanium'),
+(@GUID1+137,@POOL+137,@CHANCE1, 'Icecrown Ore Spawnpoint 138 Saronite'),
+(@GUID2+137,@POOL+137,@CHANCE2, 'Icecrown Ore Spawnpoint 138 Rich Saronite'),
+(@GUID3+137,@POOL+137,@CHANCE3, 'Icecrown Ore Spawnpoint 138 Titanium'),
+(@GUID1+138,@POOL+138,@CHANCE1, 'Icecrown Ore Spawnpoint 139 Saronite'),
+(@GUID2+138,@POOL+138,@CHANCE2, 'Icecrown Ore Spawnpoint 139 Rich Saronite'),
+(@GUID3+138,@POOL+138,@CHANCE3, 'Icecrown Ore Spawnpoint 139 Titanium'),
+(@GUID1+139,@POOL+139,@CHANCE1, 'Icecrown Ore Spawnpoint 140 Saronite'),
+(@GUID2+139,@POOL+139,@CHANCE2, 'Icecrown Ore Spawnpoint 140 Rich Saronite'),
+(@GUID3+139,@POOL+139,@CHANCE3, 'Icecrown Ore Spawnpoint 140 Titanium'),
+(@GUID1+140,@POOL+140,@CHANCE1, 'Icecrown Ore Spawnpoint 141 Saronite'),
+(@GUID2+140,@POOL+140,@CHANCE2, 'Icecrown Ore Spawnpoint 141 Rich Saronite'),
+(@GUID3+140,@POOL+140,@CHANCE3, 'Icecrown Ore Spawnpoint 141 Titanium'),
+(@GUID1+141,@POOL+141,@CHANCE1, 'Icecrown Ore Spawnpoint 142 Saronite'),
+(@GUID2+141,@POOL+141,@CHANCE2, 'Icecrown Ore Spawnpoint 142 Rich Saronite'),
+(@GUID3+141,@POOL+141,@CHANCE3, 'Icecrown Ore Spawnpoint 142 Titanium'),
+(@GUID1+142,@POOL+142,@CHANCE1, 'Icecrown Ore Spawnpoint 143 Saronite'),
+(@GUID2+142,@POOL+142,@CHANCE2, 'Icecrown Ore Spawnpoint 143 Rich Saronite'),
+(@GUID3+142,@POOL+142,@CHANCE3, 'Icecrown Ore Spawnpoint 143 Titanium'),
+(@GUID1+143,@POOL+143,@CHANCE1, 'Icecrown Ore Spawnpoint 144 Saronite'),
+(@GUID2+143,@POOL+143,@CHANCE2, 'Icecrown Ore Spawnpoint 144 Rich Saronite'),
+(@GUID3+143,@POOL+143,@CHANCE3, 'Icecrown Ore Spawnpoint 144 Titanium'),
+(@GUID1+144,@POOL+144,@CHANCE1, 'Icecrown Ore Spawnpoint 145 Saronite'),
+(@GUID2+144,@POOL+144,@CHANCE2, 'Icecrown Ore Spawnpoint 145 Rich Saronite'),
+(@GUID3+144,@POOL+144,@CHANCE3, 'Icecrown Ore Spawnpoint 145 Titanium'),
+(@GUID1+145,@POOL+145,@CHANCE1, 'Icecrown Ore Spawnpoint 146 Saronite'),
+(@GUID2+145,@POOL+145,@CHANCE2, 'Icecrown Ore Spawnpoint 146 Rich Saronite'),
+(@GUID3+145,@POOL+145,@CHANCE3, 'Icecrown Ore Spawnpoint 146 Titanium'),
+(@GUID1+146,@POOL+146,@CHANCE1, 'Icecrown Ore Spawnpoint 147 Saronite'),
+(@GUID2+146,@POOL+146,@CHANCE2, 'Icecrown Ore Spawnpoint 147 Rich Saronite'),
+(@GUID3+146,@POOL+146,@CHANCE3, 'Icecrown Ore Spawnpoint 147 Titanium'),
+(@GUID1+147,@POOL+147,@CHANCE1, 'Icecrown Ore Spawnpoint 148 Saronite'),
+(@GUID2+147,@POOL+147,@CHANCE2, 'Icecrown Ore Spawnpoint 148 Rich Saronite'),
+(@GUID3+147,@POOL+147,@CHANCE3, 'Icecrown Ore Spawnpoint 148 Titanium'),
+(@GUID1+148,@POOL+148,@CHANCE1, 'Icecrown Ore Spawnpoint 149 Saronite'),
+(@GUID2+148,@POOL+148,@CHANCE2, 'Icecrown Ore Spawnpoint 149 Rich Saronite'),
+(@GUID3+148,@POOL+148,@CHANCE3, 'Icecrown Ore Spawnpoint 149 Titanium'),
+(@GUID1+149,@POOL+149,@CHANCE1, 'Icecrown Ore Spawnpoint 150 Saronite'),
+(@GUID2+149,@POOL+149,@CHANCE2, 'Icecrown Ore Spawnpoint 150 Rich Saronite'),
+(@GUID3+149,@POOL+149,@CHANCE3, 'Icecrown Ore Spawnpoint 150 Titanium'),
+(@GUID1+150,@POOL+150,@CHANCE1, 'Icecrown Ore Spawnpoint 151 Saronite'),
+(@GUID2+150,@POOL+150,@CHANCE2, 'Icecrown Ore Spawnpoint 151 Rich Saronite'),
+(@GUID3+150,@POOL+150,@CHANCE3, 'Icecrown Ore Spawnpoint 151 Titanium'),
+(@GUID1+151,@POOL+151,@CHANCE1, 'Icecrown Ore Spawnpoint 152 Saronite'),
+(@GUID2+151,@POOL+151,@CHANCE2, 'Icecrown Ore Spawnpoint 152 Rich Saronite'),
+(@GUID3+151,@POOL+151,@CHANCE3, 'Icecrown Ore Spawnpoint 152 Titanium'),
+(@GUID1+152,@POOL+152,@CHANCE1, 'Icecrown Ore Spawnpoint 153 Saronite'),
+(@GUID2+152,@POOL+152,@CHANCE2, 'Icecrown Ore Spawnpoint 153 Rich Saronite'),
+(@GUID3+152,@POOL+152,@CHANCE3, 'Icecrown Ore Spawnpoint 153 Titanium'),
+(@GUID1+153,@POOL+153,@CHANCE1, 'Icecrown Ore Spawnpoint 154 Saronite'),
+(@GUID2+153,@POOL+153,@CHANCE2, 'Icecrown Ore Spawnpoint 154 Rich Saronite'),
+(@GUID3+153,@POOL+153,@CHANCE3, 'Icecrown Ore Spawnpoint 154 Titanium'),
+(@GUID1+154,@POOL+154,@CHANCE1, 'Icecrown Ore Spawnpoint 155 Saronite'),
+(@GUID2+154,@POOL+154,@CHANCE2, 'Icecrown Ore Spawnpoint 155 Rich Saronite'),
+(@GUID3+154,@POOL+154,@CHANCE3, 'Icecrown Ore Spawnpoint 155 Titanium'),
+(@GUID1+155,@POOL+155,@CHANCE1, 'Icecrown Ore Spawnpoint 156 Saronite'),
+(@GUID2+155,@POOL+155,@CHANCE2, 'Icecrown Ore Spawnpoint 156 Rich Saronite'),
+(@GUID3+155,@POOL+155,@CHANCE3, 'Icecrown Ore Spawnpoint 156 Titanium'),
+(@GUID1+156,@POOL+156,@CHANCE1, 'Icecrown Ore Spawnpoint 157 Saronite'),
+(@GUID2+156,@POOL+156,@CHANCE2, 'Icecrown Ore Spawnpoint 157 Rich Saronite'),
+(@GUID3+156,@POOL+156,@CHANCE3, 'Icecrown Ore Spawnpoint 157 Titanium'),
+(@GUID1+157,@POOL+157,@CHANCE1, 'Icecrown Ore Spawnpoint 158 Saronite'),
+(@GUID2+157,@POOL+157,@CHANCE2, 'Icecrown Ore Spawnpoint 158 Rich Saronite'),
+(@GUID3+157,@POOL+157,@CHANCE3, 'Icecrown Ore Spawnpoint 158 Titanium'),
+(@GUID1+158,@POOL+158,@CHANCE1, 'Icecrown Ore Spawnpoint 159 Saronite'),
+(@GUID2+158,@POOL+158,@CHANCE2, 'Icecrown Ore Spawnpoint 159 Rich Saronite'),
+(@GUID3+158,@POOL+158,@CHANCE3, 'Icecrown Ore Spawnpoint 159 Titanium'),
+(@GUID1+159,@POOL+159,@CHANCE1, 'Icecrown Ore Spawnpoint 160 Saronite'),
+(@GUID2+159,@POOL+159,@CHANCE2, 'Icecrown Ore Spawnpoint 160 Rich Saronite'),
+(@GUID3+159,@POOL+159,@CHANCE3, 'Icecrown Ore Spawnpoint 160 Titanium'),
+(@GUID1+160,@POOL+160,@CHANCE1, 'Icecrown Ore Spawnpoint 161 Saronite'),
+(@GUID2+160,@POOL+160,@CHANCE2, 'Icecrown Ore Spawnpoint 161 Rich Saronite'),
+(@GUID3+160,@POOL+160,@CHANCE3, 'Icecrown Ore Spawnpoint 161 Titanium'),
+(@GUID1+161,@POOL+161,@CHANCE1, 'Icecrown Ore Spawnpoint 162 Saronite'),
+(@GUID2+161,@POOL+161,@CHANCE2, 'Icecrown Ore Spawnpoint 162 Rich Saronite'),
+(@GUID3+161,@POOL+161,@CHANCE3, 'Icecrown Ore Spawnpoint 162 Titanium'),
+(@GUID1+162,@POOL+162,@CHANCE1, 'Icecrown Ore Spawnpoint 163 Saronite'),
+(@GUID2+162,@POOL+162,@CHANCE2, 'Icecrown Ore Spawnpoint 163 Rich Saronite'),
+(@GUID3+162,@POOL+162,@CHANCE3, 'Icecrown Ore Spawnpoint 163 Titanium'),
+(@GUID1+163,@POOL+163,@CHANCE1, 'Icecrown Ore Spawnpoint 164 Saronite'),
+(@GUID2+163,@POOL+163,@CHANCE2, 'Icecrown Ore Spawnpoint 164 Rich Saronite'),
+(@GUID3+163,@POOL+163,@CHANCE3, 'Icecrown Ore Spawnpoint 164 Titanium'),
+(@GUID1+164,@POOL+164,@CHANCE1, 'Icecrown Ore Spawnpoint 165 Saronite'),
+(@GUID2+164,@POOL+164,@CHANCE2, 'Icecrown Ore Spawnpoint 165 Rich Saronite'),
+(@GUID3+164,@POOL+164,@CHANCE3, 'Icecrown Ore Spawnpoint 165 Titanium'),
+(@GUID1+165,@POOL+165,@CHANCE1, 'Icecrown Ore Spawnpoint 166 Saronite'),
+(@GUID2+165,@POOL+165,@CHANCE2, 'Icecrown Ore Spawnpoint 166 Rich Saronite'),
+(@GUID3+165,@POOL+165,@CHANCE3, 'Icecrown Ore Spawnpoint 166 Titanium'),
+(@GUID1+166,@POOL+166,@CHANCE1, 'Icecrown Ore Spawnpoint 167 Saronite'),
+(@GUID2+166,@POOL+166,@CHANCE2, 'Icecrown Ore Spawnpoint 167 Rich Saronite'),
+(@GUID3+166,@POOL+166,@CHANCE3, 'Icecrown Ore Spawnpoint 167 Titanium'),
+(@GUID1+167,@POOL+167,@CHANCE1, 'Icecrown Ore Spawnpoint 168 Saronite'),
+(@GUID2+167,@POOL+167,@CHANCE2, 'Icecrown Ore Spawnpoint 168 Rich Saronite'),
+(@GUID3+167,@POOL+167,@CHANCE3, 'Icecrown Ore Spawnpoint 168 Titanium'),
+(@GUID1+168,@POOL+168,@CHANCE1, 'Icecrown Ore Spawnpoint 169 Saronite'),
+(@GUID2+168,@POOL+168,@CHANCE2, 'Icecrown Ore Spawnpoint 169 Rich Saronite'),
+(@GUID3+168,@POOL+168,@CHANCE3, 'Icecrown Ore Spawnpoint 169 Titanium'),
+(@GUID1+169,@POOL+169,@CHANCE1, 'Icecrown Ore Spawnpoint 170 Saronite'),
+(@GUID2+169,@POOL+169,@CHANCE2, 'Icecrown Ore Spawnpoint 170 Rich Saronite'),
+(@GUID3+169,@POOL+169,@CHANCE3, 'Icecrown Ore Spawnpoint 170 Titanium'),
+(@GUID1+170,@POOL+170,@CHANCE1, 'Icecrown Ore Spawnpoint 171 Saronite'),
+(@GUID2+170,@POOL+170,@CHANCE2, 'Icecrown Ore Spawnpoint 171 Rich Saronite'),
+(@GUID3+170,@POOL+170,@CHANCE3, 'Icecrown Ore Spawnpoint 171 Titanium'),
+(@GUID1+171,@POOL+171,@CHANCE1, 'Icecrown Ore Spawnpoint 172 Saronite'),
+(@GUID2+171,@POOL+171,@CHANCE2, 'Icecrown Ore Spawnpoint 172 Rich Saronite'),
+(@GUID3+171,@POOL+171,@CHANCE3, 'Icecrown Ore Spawnpoint 172 Titanium'),
+(@GUID1+172,@POOL+172,@CHANCE1, 'Icecrown Ore Spawnpoint 173 Saronite'),
+(@GUID2+172,@POOL+172,@CHANCE2, 'Icecrown Ore Spawnpoint 173 Rich Saronite'),
+(@GUID3+172,@POOL+172,@CHANCE3, 'Icecrown Ore Spawnpoint 173 Titanium'),
+(@GUID1+173,@POOL+173,@CHANCE1, 'Icecrown Ore Spawnpoint 174 Saronite'),
+(@GUID2+173,@POOL+173,@CHANCE2, 'Icecrown Ore Spawnpoint 174 Rich Saronite'),
+(@GUID3+173,@POOL+173,@CHANCE3, 'Icecrown Ore Spawnpoint 174 Titanium'),
+(@GUID1+174,@POOL+174,@CHANCE1, 'Icecrown Ore Spawnpoint 175 Saronite'),
+(@GUID2+174,@POOL+174,@CHANCE2, 'Icecrown Ore Spawnpoint 175 Rich Saronite'),
+(@GUID3+174,@POOL+174,@CHANCE3, 'Icecrown Ore Spawnpoint 175 Titanium'),
+(@GUID1+175,@POOL+175,@CHANCE1, 'Icecrown Ore Spawnpoint 176 Saronite'),
+(@GUID2+175,@POOL+175,@CHANCE2, 'Icecrown Ore Spawnpoint 176 Rich Saronite'),
+(@GUID3+175,@POOL+175,@CHANCE3, 'Icecrown Ore Spawnpoint 176 Titanium'),
+(@GUID1+176,@POOL+176,@CHANCE1, 'Icecrown Ore Spawnpoint 177 Saronite'),
+(@GUID2+176,@POOL+176,@CHANCE2, 'Icecrown Ore Spawnpoint 177 Rich Saronite'),
+(@GUID3+176,@POOL+176,@CHANCE3, 'Icecrown Ore Spawnpoint 177 Titanium'),
+(@GUID1+177,@POOL+177,@CHANCE1, 'Icecrown Ore Spawnpoint 178 Saronite'),
+(@GUID2+177,@POOL+177,@CHANCE2, 'Icecrown Ore Spawnpoint 178 Rich Saronite'),
+(@GUID3+177,@POOL+177,@CHANCE3, 'Icecrown Ore Spawnpoint 178 Titanium'),
+(@GUID1+178,@POOL+178,@CHANCE1, 'Icecrown Ore Spawnpoint 179 Saronite'),
+(@GUID2+178,@POOL+178,@CHANCE2, 'Icecrown Ore Spawnpoint 179 Rich Saronite'),
+(@GUID3+178,@POOL+178,@CHANCE3, 'Icecrown Ore Spawnpoint 179 Titanium'),
+(@GUID1+179,@POOL+179,@CHANCE1, 'Icecrown Ore Spawnpoint 180 Saronite'),
+(@GUID2+179,@POOL+179,@CHANCE2, 'Icecrown Ore Spawnpoint 180 Rich Saronite'),
+(@GUID3+179,@POOL+179,@CHANCE3, 'Icecrown Ore Spawnpoint 180 Titanium'),
+(@GUID1+180,@POOL+180,@CHANCE1, 'Icecrown Ore Spawnpoint 181 Saronite'),
+(@GUID2+180,@POOL+180,@CHANCE2, 'Icecrown Ore Spawnpoint 181 Rich Saronite'),
+(@GUID3+180,@POOL+180,@CHANCE3, 'Icecrown Ore Spawnpoint 181 Titanium'),
+(@GUID1+181,@POOL+181,@CHANCE1, 'Icecrown Ore Spawnpoint 182 Saronite'),
+(@GUID2+181,@POOL+181,@CHANCE2, 'Icecrown Ore Spawnpoint 182 Rich Saronite'),
+(@GUID3+181,@POOL+181,@CHANCE3, 'Icecrown Ore Spawnpoint 182 Titanium'),
+(@GUID1+182,@POOL+182,@CHANCE1, 'Icecrown Ore Spawnpoint 183 Saronite'),
+(@GUID2+182,@POOL+182,@CHANCE2, 'Icecrown Ore Spawnpoint 183 Rich Saronite'),
+(@GUID3+182,@POOL+182,@CHANCE3, 'Icecrown Ore Spawnpoint 183 Titanium'),
+(@GUID1+183,@POOL+183,@CHANCE1, 'Icecrown Ore Spawnpoint 184 Saronite'),
+(@GUID2+183,@POOL+183,@CHANCE2, 'Icecrown Ore Spawnpoint 184 Rich Saronite'),
+(@GUID3+183,@POOL+183,@CHANCE3, 'Icecrown Ore Spawnpoint 184 Titanium'),
+(@GUID1+184,@POOL+184,@CHANCE1, 'Icecrown Ore Spawnpoint 185 Saronite'),
+(@GUID2+184,@POOL+184,@CHANCE2, 'Icecrown Ore Spawnpoint 185 Rich Saronite'),
+(@GUID3+184,@POOL+184,@CHANCE3, 'Icecrown Ore Spawnpoint 185 Titanium'),
+(@GUID1+185,@POOL+185,@CHANCE1, 'Icecrown Ore Spawnpoint 186 Saronite'),
+(@GUID2+185,@POOL+185,@CHANCE2, 'Icecrown Ore Spawnpoint 186 Rich Saronite'),
+(@GUID3+185,@POOL+185,@CHANCE3, 'Icecrown Ore Spawnpoint 186 Titanium'),
+(@GUID1+186,@POOL+186,@CHANCE1, 'Icecrown Ore Spawnpoint 187 Saronite'),
+(@GUID2+186,@POOL+186,@CHANCE2, 'Icecrown Ore Spawnpoint 187 Rich Saronite'),
+(@GUID3+186,@POOL+186,@CHANCE3, 'Icecrown Ore Spawnpoint 187 Titanium'),
+(@GUID1+187,@POOL+187,@CHANCE1, 'Icecrown Ore Spawnpoint 188 Saronite'),
+(@GUID2+187,@POOL+187,@CHANCE2, 'Icecrown Ore Spawnpoint 188 Rich Saronite'),
+(@GUID3+187,@POOL+187,@CHANCE3, 'Icecrown Ore Spawnpoint 188 Titanium'),
+(@GUID1+188,@POOL+188,@CHANCE1, 'Icecrown Ore Spawnpoint 189 Saronite'),
+(@GUID2+188,@POOL+188,@CHANCE2, 'Icecrown Ore Spawnpoint 189 Rich Saronite'),
+(@GUID3+188,@POOL+188,@CHANCE3, 'Icecrown Ore Spawnpoint 189 Titanium'),
+(@GUID1+189,@POOL+189,@CHANCE1, 'Icecrown Ore Spawnpoint 190 Saronite'),
+(@GUID2+189,@POOL+189,@CHANCE2, 'Icecrown Ore Spawnpoint 190 Rich Saronite'),
+(@GUID3+189,@POOL+189,@CHANCE3, 'Icecrown Ore Spawnpoint 190 Titanium'),
+(@GUID1+190,@POOL+190,@CHANCE1, 'Icecrown Ore Spawnpoint 191 Saronite'),
+(@GUID2+190,@POOL+190,@CHANCE2, 'Icecrown Ore Spawnpoint 191 Rich Saronite'),
+(@GUID3+190,@POOL+190,@CHANCE3, 'Icecrown Ore Spawnpoint 191 Titanium'),
+(@GUID1+191,@POOL+191,@CHANCE1, 'Icecrown Ore Spawnpoint 192 Saronite'),
+(@GUID2+191,@POOL+191,@CHANCE2, 'Icecrown Ore Spawnpoint 192 Rich Saronite'),
+(@GUID3+191,@POOL+191,@CHANCE3, 'Icecrown Ore Spawnpoint 192 Titanium'),
+(@GUID1+192,@POOL+192,@CHANCE1, 'Icecrown Ore Spawnpoint 193 Saronite'),
+(@GUID2+192,@POOL+192,@CHANCE2, 'Icecrown Ore Spawnpoint 193 Rich Saronite'),
+(@GUID3+192,@POOL+192,@CHANCE3, 'Icecrown Ore Spawnpoint 193 Titanium'),
+(@GUID1+193,@POOL+193,@CHANCE1, 'Icecrown Ore Spawnpoint 194 Saronite'),
+(@GUID2+193,@POOL+193,@CHANCE2, 'Icecrown Ore Spawnpoint 194 Rich Saronite'),
+(@GUID3+193,@POOL+193,@CHANCE3, 'Icecrown Ore Spawnpoint 194 Titanium'),
+(@GUID1+194,@POOL+194,@CHANCE1, 'Icecrown Ore Spawnpoint 195 Saronite'),
+(@GUID2+194,@POOL+194,@CHANCE2, 'Icecrown Ore Spawnpoint 195 Rich Saronite'),
+(@GUID3+194,@POOL+194,@CHANCE3, 'Icecrown Ore Spawnpoint 195 Titanium'),
+(@GUID1+195,@POOL+195,@CHANCE1, 'Icecrown Ore Spawnpoint 196 Saronite'),
+(@GUID2+195,@POOL+195,@CHANCE2, 'Icecrown Ore Spawnpoint 196 Rich Saronite'),
+(@GUID3+195,@POOL+195,@CHANCE3, 'Icecrown Ore Spawnpoint 196 Titanium'),
+(@GUID1+196,@POOL+196,@CHANCE1, 'Icecrown Ore Spawnpoint 197 Saronite'),
+(@GUID2+196,@POOL+196,@CHANCE2, 'Icecrown Ore Spawnpoint 197 Rich Saronite'),
+(@GUID3+196,@POOL+196,@CHANCE3, 'Icecrown Ore Spawnpoint 197 Titanium'),
+(@GUID1+197,@POOL+197,@CHANCE1, 'Icecrown Ore Spawnpoint 198 Saronite'),
+(@GUID2+197,@POOL+197,@CHANCE2, 'Icecrown Ore Spawnpoint 198 Rich Saronite'),
+(@GUID3+197,@POOL+197,@CHANCE3, 'Icecrown Ore Spawnpoint 198 Titanium'),
+(@GUID1+198,@POOL+198,@CHANCE1, 'Icecrown Ore Spawnpoint 199 Saronite'),
+(@GUID2+198,@POOL+198,@CHANCE2, 'Icecrown Ore Spawnpoint 199 Rich Saronite'),
+(@GUID3+198,@POOL+198,@CHANCE3, 'Icecrown Ore Spawnpoint 199 Titanium'),
+(@GUID1+199,@POOL+199,@CHANCE1, 'Icecrown Ore Spawnpoint 200 Saronite'),
+(@GUID2+199,@POOL+199,@CHANCE2, 'Icecrown Ore Spawnpoint 200 Rich Saronite'),
+(@GUID3+199,@POOL+199,@CHANCE3, 'Icecrown Ore Spawnpoint 200 Titanium'),
+(@GUID1+200,@POOL+200,@CHANCE1, 'Icecrown Ore Spawnpoint 201 Saronite'),
+(@GUID2+200,@POOL+200,@CHANCE2, 'Icecrown Ore Spawnpoint 201 Rich Saronite'),
+(@GUID3+200,@POOL+200,@CHANCE3, 'Icecrown Ore Spawnpoint 201 Titanium'),
+(@GUID1+201,@POOL+201,@CHANCE1, 'Icecrown Ore Spawnpoint 202 Saronite'),
+(@GUID2+201,@POOL+201,@CHANCE2, 'Icecrown Ore Spawnpoint 202 Rich Saronite'),
+(@GUID3+201,@POOL+201,@CHANCE3, 'Icecrown Ore Spawnpoint 202 Titanium'),
+(@GUID1+202,@POOL+202,@CHANCE1, 'Icecrown Ore Spawnpoint 203 Saronite'),
+(@GUID2+202,@POOL+202,@CHANCE2, 'Icecrown Ore Spawnpoint 203 Rich Saronite'),
+(@GUID3+202,@POOL+202,@CHANCE3, 'Icecrown Ore Spawnpoint 203 Titanium'),
+(@GUID1+203,@POOL+203,@CHANCE1, 'Icecrown Ore Spawnpoint 204 Saronite'),
+(@GUID2+203,@POOL+203,@CHANCE2, 'Icecrown Ore Spawnpoint 204 Rich Saronite'),
+(@GUID3+203,@POOL+203,@CHANCE3, 'Icecrown Ore Spawnpoint 204 Titanium'),
+(@GUID1+204,@POOL+204,@CHANCE1, 'Icecrown Ore Spawnpoint 205 Saronite'),
+(@GUID2+204,@POOL+204,@CHANCE2, 'Icecrown Ore Spawnpoint 205 Rich Saronite'),
+(@GUID3+204,@POOL+204,@CHANCE3, 'Icecrown Ore Spawnpoint 205 Titanium'),
+(@GUID1+205,@POOL+205,@CHANCE1, 'Icecrown Ore Spawnpoint 206 Saronite'),
+(@GUID2+205,@POOL+205,@CHANCE2, 'Icecrown Ore Spawnpoint 206 Rich Saronite'),
+(@GUID3+205,@POOL+205,@CHANCE3, 'Icecrown Ore Spawnpoint 206 Titanium'),
+(@GUID1+206,@POOL+206,@CHANCE1, 'Icecrown Ore Spawnpoint 207 Saronite'),
+(@GUID2+206,@POOL+206,@CHANCE2, 'Icecrown Ore Spawnpoint 207 Rich Saronite'),
+(@GUID3+206,@POOL+206,@CHANCE3, 'Icecrown Ore Spawnpoint 207 Titanium'),
+(@GUID1+207,@POOL+207,@CHANCE1, 'Icecrown Ore Spawnpoint 208 Saronite'),
+(@GUID2+207,@POOL+207,@CHANCE2, 'Icecrown Ore Spawnpoint 208 Rich Saronite'),
+(@GUID3+207,@POOL+207,@CHANCE3, 'Icecrown Ore Spawnpoint 208 Titanium'),
+(@GUID1+208,@POOL+208,@CHANCE1, 'Icecrown Ore Spawnpoint 209 Saronite'),
+(@GUID2+208,@POOL+208,@CHANCE2, 'Icecrown Ore Spawnpoint 209 Rich Saronite'),
+(@GUID3+208,@POOL+208,@CHANCE3, 'Icecrown Ore Spawnpoint 209 Titanium'),
+(@GUID1+209,@POOL+209,@CHANCE1, 'Icecrown Ore Spawnpoint 210 Saronite'),
+(@GUID2+209,@POOL+209,@CHANCE2, 'Icecrown Ore Spawnpoint 210 Rich Saronite'),
+(@GUID3+209,@POOL+209,@CHANCE3, 'Icecrown Ore Spawnpoint 210 Titanium'),
+(@GUID1+210,@POOL+210,@CHANCE1, 'Icecrown Ore Spawnpoint 211 Saronite'),
+(@GUID2+210,@POOL+210,@CHANCE2, 'Icecrown Ore Spawnpoint 211 Rich Saronite'),
+(@GUID3+210,@POOL+210,@CHANCE3, 'Icecrown Ore Spawnpoint 211 Titanium'),
+(@GUID1+211,@POOL+211,@CHANCE1, 'Icecrown Ore Spawnpoint 212 Saronite'),
+(@GUID2+211,@POOL+211,@CHANCE2, 'Icecrown Ore Spawnpoint 212 Rich Saronite'),
+(@GUID3+211,@POOL+211,@CHANCE3, 'Icecrown Ore Spawnpoint 212 Titanium'),
+(@GUID1+212,@POOL+212,@CHANCE1, 'Icecrown Ore Spawnpoint 213 Saronite'),
+(@GUID2+212,@POOL+212,@CHANCE2, 'Icecrown Ore Spawnpoint 213 Rich Saronite'),
+(@GUID3+212,@POOL+212,@CHANCE3, 'Icecrown Ore Spawnpoint 213 Titanium'),
+(@GUID1+213,@POOL+213,@CHANCE1, 'Icecrown Ore Spawnpoint 214 Saronite'),
+(@GUID2+213,@POOL+213,@CHANCE2, 'Icecrown Ore Spawnpoint 214 Rich Saronite'),
+(@GUID3+213,@POOL+213,@CHANCE3, 'Icecrown Ore Spawnpoint 214 Titanium'),
+(@GUID1+214,@POOL+214,@CHANCE1, 'Icecrown Ore Spawnpoint 215 Saronite'),
+(@GUID2+214,@POOL+214,@CHANCE2, 'Icecrown Ore Spawnpoint 215 Rich Saronite'),
+(@GUID3+214,@POOL+214,@CHANCE3, 'Icecrown Ore Spawnpoint 215 Titanium'),
+(@GUID1+215,@POOL+215,@CHANCE1, 'Icecrown Ore Spawnpoint 216 Saronite'),
+(@GUID2+215,@POOL+215,@CHANCE2, 'Icecrown Ore Spawnpoint 216 Rich Saronite'),
+(@GUID3+215,@POOL+215,@CHANCE3, 'Icecrown Ore Spawnpoint 216 Titanium'),
+(@GUID1+216,@POOL+216,@CHANCE1, 'Icecrown Ore Spawnpoint 217 Saronite'),
+(@GUID2+216,@POOL+216,@CHANCE2, 'Icecrown Ore Spawnpoint 217 Rich Saronite'),
+(@GUID3+216,@POOL+216,@CHANCE3, 'Icecrown Ore Spawnpoint 217 Titanium'),
+(@GUID1+217,@POOL+217,@CHANCE1, 'Icecrown Ore Spawnpoint 218 Saronite'),
+(@GUID2+217,@POOL+217,@CHANCE2, 'Icecrown Ore Spawnpoint 218 Rich Saronite'),
+(@GUID3+217,@POOL+217,@CHANCE3, 'Icecrown Ore Spawnpoint 218 Titanium'),
+(@GUID1+218,@POOL+218,@CHANCE1, 'Icecrown Ore Spawnpoint 219 Saronite'),
+(@GUID2+218,@POOL+218,@CHANCE2, 'Icecrown Ore Spawnpoint 219 Rich Saronite'),
+(@GUID3+218,@POOL+218,@CHANCE3, 'Icecrown Ore Spawnpoint 219 Titanium'),
+(@GUID1+219,@POOL+219,@CHANCE1, 'Icecrown Ore Spawnpoint 220 Saronite'),
+(@GUID2+219,@POOL+219,@CHANCE2, 'Icecrown Ore Spawnpoint 220 Rich Saronite'),
+(@GUID3+219,@POOL+219,@CHANCE3, 'Icecrown Ore Spawnpoint 220 Titanium'),
+(@GUID1+220,@POOL+220,@CHANCE1, 'Icecrown Ore Spawnpoint 221 Saronite'),
+(@GUID2+220,@POOL+220,@CHANCE2, 'Icecrown Ore Spawnpoint 221 Rich Saronite'),
+(@GUID3+220,@POOL+220,@CHANCE3, 'Icecrown Ore Spawnpoint 221 Titanium'),
+(@GUID1+221,@POOL+221,@CHANCE1, 'Icecrown Ore Spawnpoint 222 Saronite'),
+(@GUID2+221,@POOL+221,@CHANCE2, 'Icecrown Ore Spawnpoint 222 Rich Saronite'),
+(@GUID3+221,@POOL+221,@CHANCE3, 'Icecrown Ore Spawnpoint 222 Titanium'),
+(@GUID1+222,@POOL+222,@CHANCE1, 'Icecrown Ore Spawnpoint 223 Saronite'),
+(@GUID2+222,@POOL+222,@CHANCE2, 'Icecrown Ore Spawnpoint 223 Rich Saronite'),
+(@GUID3+222,@POOL+222,@CHANCE3, 'Icecrown Ore Spawnpoint 223 Titanium'),
+(@GUID1+223,@POOL+223,@CHANCE1, 'Icecrown Ore Spawnpoint 224 Saronite'),
+(@GUID2+223,@POOL+223,@CHANCE2, 'Icecrown Ore Spawnpoint 224 Rich Saronite'),
+(@GUID3+223,@POOL+223,@CHANCE3, 'Icecrown Ore Spawnpoint 224 Titanium'),
+(@GUID1+224,@POOL+224,@CHANCE1, 'Icecrown Ore Spawnpoint 225 Saronite'),
+(@GUID2+224,@POOL+224,@CHANCE2, 'Icecrown Ore Spawnpoint 225 Rich Saronite'),
+(@GUID3+224,@POOL+224,@CHANCE3, 'Icecrown Ore Spawnpoint 225 Titanium'),
+(@GUID1+225,@POOL+225,@CHANCE1, 'Icecrown Ore Spawnpoint 226 Saronite'),
+(@GUID2+225,@POOL+225,@CHANCE2, 'Icecrown Ore Spawnpoint 226 Rich Saronite'),
+(@GUID3+225,@POOL+225,@CHANCE3, 'Icecrown Ore Spawnpoint 226 Titanium'),
+(@GUID1+226,@POOL+226,@CHANCE1, 'Icecrown Ore Spawnpoint 227 Saronite'),
+(@GUID2+226,@POOL+226,@CHANCE2, 'Icecrown Ore Spawnpoint 227 Rich Saronite'),
+(@GUID3+226,@POOL+226,@CHANCE3, 'Icecrown Ore Spawnpoint 227 Titanium'),
+(@GUID1+227,@POOL+227,@CHANCE1, 'Icecrown Ore Spawnpoint 228 Saronite'),
+(@GUID2+227,@POOL+227,@CHANCE2, 'Icecrown Ore Spawnpoint 228 Rich Saronite'),
+(@GUID3+227,@POOL+227,@CHANCE3, 'Icecrown Ore Spawnpoint 228 Titanium'),
+(@GUID1+228,@POOL+228,@CHANCE1, 'Icecrown Ore Spawnpoint 229 Saronite'),
+(@GUID2+228,@POOL+228,@CHANCE2, 'Icecrown Ore Spawnpoint 229 Rich Saronite'),
+(@GUID3+228,@POOL+228,@CHANCE3, 'Icecrown Ore Spawnpoint 229 Titanium'),
+(@GUID1+229,@POOL+229,@CHANCE1, 'Icecrown Ore Spawnpoint 230 Saronite'),
+(@GUID2+229,@POOL+229,@CHANCE2, 'Icecrown Ore Spawnpoint 230 Rich Saronite'),
+(@GUID3+229,@POOL+229,@CHANCE3, 'Icecrown Ore Spawnpoint 230 Titanium'),
+(@GUID1+230,@POOL+230,@CHANCE1, 'Icecrown Ore Spawnpoint 231 Saronite'),
+(@GUID2+230,@POOL+230,@CHANCE2, 'Icecrown Ore Spawnpoint 231 Rich Saronite'),
+(@GUID3+230,@POOL+230,@CHANCE3, 'Icecrown Ore Spawnpoint 231 Titanium'),
+(@GUID1+231,@POOL+231,@CHANCE1, 'Icecrown Ore Spawnpoint 232 Saronite'),
+(@GUID2+231,@POOL+231,@CHANCE2, 'Icecrown Ore Spawnpoint 232 Rich Saronite'),
+(@GUID3+231,@POOL+231,@CHANCE3, 'Icecrown Ore Spawnpoint 232 Titanium'),
+(@GUID1+232,@POOL+232,@CHANCE1, 'Icecrown Ore Spawnpoint 233 Saronite'),
+(@GUID2+232,@POOL+232,@CHANCE2, 'Icecrown Ore Spawnpoint 233 Rich Saronite'),
+(@GUID3+232,@POOL+232,@CHANCE3, 'Icecrown Ore Spawnpoint 233 Titanium'),
+(@GUID1+233,@POOL+233,@CHANCE1, 'Icecrown Ore Spawnpoint 234 Saronite'),
+(@GUID2+233,@POOL+233,@CHANCE2, 'Icecrown Ore Spawnpoint 234 Rich Saronite'),
+(@GUID3+233,@POOL+233,@CHANCE3, 'Icecrown Ore Spawnpoint 234 Titanium'),
+(@GUID1+234,@POOL+234,@CHANCE1, 'Icecrown Ore Spawnpoint 235 Saronite'),
+(@GUID2+234,@POOL+234,@CHANCE2, 'Icecrown Ore Spawnpoint 235 Rich Saronite'),
+(@GUID3+234,@POOL+234,@CHANCE3, 'Icecrown Ore Spawnpoint 235 Titanium');
+-- Add each pool to pool template
+DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@POOL+0,1, 'Icecrown Ore Spawnpoint 1'),
+(@POOL+1,1, 'Icecrown Ore Spawnpoint 2'),
+(@POOL+2,1, 'Icecrown Ore Spawnpoint 3'),
+(@POOL+3,1, 'Icecrown Ore Spawnpoint 4'),
+(@POOL+4,1, 'Icecrown Ore Spawnpoint 5'),
+(@POOL+5,1, 'Icecrown Ore Spawnpoint 6'),
+(@POOL+6,1, 'Icecrown Ore Spawnpoint 7'),
+(@POOL+7,1, 'Icecrown Ore Spawnpoint 8'),
+(@POOL+8,1, 'Icecrown Ore Spawnpoint 9'),
+(@POOL+9,1, 'Icecrown Ore Spawnpoint 10'),
+(@POOL+10,1, 'Icecrown Ore Spawnpoint 11'),
+(@POOL+11,1, 'Icecrown Ore Spawnpoint 12'),
+(@POOL+12,1, 'Icecrown Ore Spawnpoint 13'),
+(@POOL+13,1, 'Icecrown Ore Spawnpoint 14'),
+(@POOL+14,1, 'Icecrown Ore Spawnpoint 15'),
+(@POOL+15,1, 'Icecrown Ore Spawnpoint 16'),
+(@POOL+16,1, 'Icecrown Ore Spawnpoint 17'),
+(@POOL+17,1, 'Icecrown Ore Spawnpoint 18'),
+(@POOL+18,1, 'Icecrown Ore Spawnpoint 19'),
+(@POOL+19,1, 'Icecrown Ore Spawnpoint 20'),
+(@POOL+20,1, 'Icecrown Ore Spawnpoint 21'),
+(@POOL+21,1, 'Icecrown Ore Spawnpoint 22'),
+(@POOL+22,1, 'Icecrown Ore Spawnpoint 23'),
+(@POOL+23,1, 'Icecrown Ore Spawnpoint 24'),
+(@POOL+24,1, 'Icecrown Ore Spawnpoint 25'),
+(@POOL+25,1, 'Icecrown Ore Spawnpoint 26'),
+(@POOL+26,1, 'Icecrown Ore Spawnpoint 27'),
+(@POOL+27,1, 'Icecrown Ore Spawnpoint 28'),
+(@POOL+28,1, 'Icecrown Ore Spawnpoint 29'),
+(@POOL+29,1, 'Icecrown Ore Spawnpoint 30'),
+(@POOL+30,1, 'Icecrown Ore Spawnpoint 31'),
+(@POOL+31,1, 'Icecrown Ore Spawnpoint 32'),
+(@POOL+32,1, 'Icecrown Ore Spawnpoint 33'),
+(@POOL+33,1, 'Icecrown Ore Spawnpoint 34'),
+(@POOL+34,1, 'Icecrown Ore Spawnpoint 35'),
+(@POOL+35,1, 'Icecrown Ore Spawnpoint 36'),
+(@POOL+36,1, 'Icecrown Ore Spawnpoint 37'),
+(@POOL+37,1, 'Icecrown Ore Spawnpoint 38'),
+(@POOL+38,1, 'Icecrown Ore Spawnpoint 39'),
+(@POOL+39,1, 'Icecrown Ore Spawnpoint 40'),
+(@POOL+40,1, 'Icecrown Ore Spawnpoint 41'),
+(@POOL+41,1, 'Icecrown Ore Spawnpoint 42'),
+(@POOL+42,1, 'Icecrown Ore Spawnpoint 43'),
+(@POOL+43,1, 'Icecrown Ore Spawnpoint 44'),
+(@POOL+44,1, 'Icecrown Ore Spawnpoint 45'),
+(@POOL+45,1, 'Icecrown Ore Spawnpoint 46'),
+(@POOL+46,1, 'Icecrown Ore Spawnpoint 47'),
+(@POOL+47,1, 'Icecrown Ore Spawnpoint 48'),
+(@POOL+48,1, 'Icecrown Ore Spawnpoint 49'),
+(@POOL+49,1, 'Icecrown Ore Spawnpoint 50'),
+(@POOL+50,1, 'Icecrown Ore Spawnpoint 51'),
+(@POOL+51,1, 'Icecrown Ore Spawnpoint 52'),
+(@POOL+52,1, 'Icecrown Ore Spawnpoint 53'),
+(@POOL+53,1, 'Icecrown Ore Spawnpoint 54'),
+(@POOL+54,1, 'Icecrown Ore Spawnpoint 55'),
+(@POOL+55,1, 'Icecrown Ore Spawnpoint 56'),
+(@POOL+56,1, 'Icecrown Ore Spawnpoint 57'),
+(@POOL+57,1, 'Icecrown Ore Spawnpoint 58'),
+(@POOL+58,1, 'Icecrown Ore Spawnpoint 59'),
+(@POOL+59,1, 'Icecrown Ore Spawnpoint 60'),
+(@POOL+60,1, 'Icecrown Ore Spawnpoint 61'),
+(@POOL+61,1, 'Icecrown Ore Spawnpoint 62'),
+(@POOL+62,1, 'Icecrown Ore Spawnpoint 63'),
+(@POOL+63,1, 'Icecrown Ore Spawnpoint 64'),
+(@POOL+64,1, 'Icecrown Ore Spawnpoint 65'),
+(@POOL+65,1, 'Icecrown Ore Spawnpoint 66'),
+(@POOL+66,1, 'Icecrown Ore Spawnpoint 67'),
+(@POOL+67,1, 'Icecrown Ore Spawnpoint 68'),
+(@POOL+68,1, 'Icecrown Ore Spawnpoint 69'),
+(@POOL+69,1, 'Icecrown Ore Spawnpoint 70'),
+(@POOL+70,1, 'Icecrown Ore Spawnpoint 71'),
+(@POOL+71,1, 'Icecrown Ore Spawnpoint 72'),
+(@POOL+72,1, 'Icecrown Ore Spawnpoint 73'),
+(@POOL+73,1, 'Icecrown Ore Spawnpoint 74'),
+(@POOL+74,1, 'Icecrown Ore Spawnpoint 75'),
+(@POOL+75,1, 'Icecrown Ore Spawnpoint 76'),
+(@POOL+76,1, 'Icecrown Ore Spawnpoint 77'),
+(@POOL+77,1, 'Icecrown Ore Spawnpoint 78'),
+(@POOL+78,1, 'Icecrown Ore Spawnpoint 79'),
+(@POOL+79,1, 'Icecrown Ore Spawnpoint 80'),
+(@POOL+80,1, 'Icecrown Ore Spawnpoint 81'),
+(@POOL+81,1, 'Icecrown Ore Spawnpoint 82'),
+(@POOL+82,1, 'Icecrown Ore Spawnpoint 83'),
+(@POOL+83,1, 'Icecrown Ore Spawnpoint 84'),
+(@POOL+84,1, 'Icecrown Ore Spawnpoint 85'),
+(@POOL+85,1, 'Icecrown Ore Spawnpoint 86'),
+(@POOL+86,1, 'Icecrown Ore Spawnpoint 87'),
+(@POOL+87,1, 'Icecrown Ore Spawnpoint 88'),
+(@POOL+88,1, 'Icecrown Ore Spawnpoint 89'),
+(@POOL+89,1, 'Icecrown Ore Spawnpoint 90'),
+(@POOL+90,1, 'Icecrown Ore Spawnpoint 91'),
+(@POOL+91,1, 'Icecrown Ore Spawnpoint 92'),
+(@POOL+92,1, 'Icecrown Ore Spawnpoint 93'),
+(@POOL+93,1, 'Icecrown Ore Spawnpoint 94'),
+(@POOL+94,1, 'Icecrown Ore Spawnpoint 95'),
+(@POOL+95,1, 'Icecrown Ore Spawnpoint 96'),
+(@POOL+96,1, 'Icecrown Ore Spawnpoint 97'),
+(@POOL+97,1, 'Icecrown Ore Spawnpoint 98'),
+(@POOL+98,1, 'Icecrown Ore Spawnpoint 99'),
+(@POOL+99,1, 'Icecrown Ore Spawnpoint 100'),
+(@POOL+100,1, 'Icecrown Ore Spawnpoint 101'),
+(@POOL+101,1, 'Icecrown Ore Spawnpoint 102'),
+(@POOL+102,1, 'Icecrown Ore Spawnpoint 103'),
+(@POOL+103,1, 'Icecrown Ore Spawnpoint 104'),
+(@POOL+104,1, 'Icecrown Ore Spawnpoint 105'),
+(@POOL+105,1, 'Icecrown Ore Spawnpoint 106'),
+(@POOL+106,1, 'Icecrown Ore Spawnpoint 107'),
+(@POOL+107,1, 'Icecrown Ore Spawnpoint 108'),
+(@POOL+108,1, 'Icecrown Ore Spawnpoint 109'),
+(@POOL+109,1, 'Icecrown Ore Spawnpoint 110'),
+(@POOL+110,1, 'Icecrown Ore Spawnpoint 111'),
+(@POOL+111,1, 'Icecrown Ore Spawnpoint 112'),
+(@POOL+112,1, 'Icecrown Ore Spawnpoint 113'),
+(@POOL+113,1, 'Icecrown Ore Spawnpoint 114'),
+(@POOL+114,1, 'Icecrown Ore Spawnpoint 115'),
+(@POOL+115,1, 'Icecrown Ore Spawnpoint 116'),
+(@POOL+116,1, 'Icecrown Ore Spawnpoint 117'),
+(@POOL+117,1, 'Icecrown Ore Spawnpoint 118'),
+(@POOL+118,1, 'Icecrown Ore Spawnpoint 119'),
+(@POOL+119,1, 'Icecrown Ore Spawnpoint 120'),
+(@POOL+120,1, 'Icecrown Ore Spawnpoint 121'),
+(@POOL+121,1, 'Icecrown Ore Spawnpoint 122'),
+(@POOL+122,1, 'Icecrown Ore Spawnpoint 123'),
+(@POOL+123,1, 'Icecrown Ore Spawnpoint 124'),
+(@POOL+124,1, 'Icecrown Ore Spawnpoint 125'),
+(@POOL+125,1, 'Icecrown Ore Spawnpoint 126'),
+(@POOL+126,1, 'Icecrown Ore Spawnpoint 127'),
+(@POOL+127,1, 'Icecrown Ore Spawnpoint 128'),
+(@POOL+128,1, 'Icecrown Ore Spawnpoint 129'),
+(@POOL+129,1, 'Icecrown Ore Spawnpoint 130'),
+(@POOL+130,1, 'Icecrown Ore Spawnpoint 131'),
+(@POOL+131,1, 'Icecrown Ore Spawnpoint 132'),
+(@POOL+132,1, 'Icecrown Ore Spawnpoint 133'),
+(@POOL+133,1, 'Icecrown Ore Spawnpoint 134'),
+(@POOL+134,1, 'Icecrown Ore Spawnpoint 135'),
+(@POOL+135,1, 'Icecrown Ore Spawnpoint 136'),
+(@POOL+136,1, 'Icecrown Ore Spawnpoint 137'),
+(@POOL+137,1, 'Icecrown Ore Spawnpoint 138'),
+(@POOL+138,1, 'Icecrown Ore Spawnpoint 139'),
+(@POOL+139,1, 'Icecrown Ore Spawnpoint 140'),
+(@POOL+140,1, 'Icecrown Ore Spawnpoint 141'),
+(@POOL+141,1, 'Icecrown Ore Spawnpoint 142'),
+(@POOL+142,1, 'Icecrown Ore Spawnpoint 143'),
+(@POOL+143,1, 'Icecrown Ore Spawnpoint 144'),
+(@POOL+144,1, 'Icecrown Ore Spawnpoint 145'),
+(@POOL+145,1, 'Icecrown Ore Spawnpoint 146'),
+(@POOL+146,1, 'Icecrown Ore Spawnpoint 147'),
+(@POOL+147,1, 'Icecrown Ore Spawnpoint 148'),
+(@POOL+148,1, 'Icecrown Ore Spawnpoint 149'),
+(@POOL+149,1, 'Icecrown Ore Spawnpoint 150'),
+(@POOL+150,1, 'Icecrown Ore Spawnpoint 151'),
+(@POOL+151,1, 'Icecrown Ore Spawnpoint 152'),
+(@POOL+152,1, 'Icecrown Ore Spawnpoint 153'),
+(@POOL+153,1, 'Icecrown Ore Spawnpoint 154'),
+(@POOL+154,1, 'Icecrown Ore Spawnpoint 155'),
+(@POOL+155,1, 'Icecrown Ore Spawnpoint 156'),
+(@POOL+156,1, 'Icecrown Ore Spawnpoint 157'),
+(@POOL+157,1, 'Icecrown Ore Spawnpoint 158'),
+(@POOL+158,1, 'Icecrown Ore Spawnpoint 159'),
+(@POOL+159,1, 'Icecrown Ore Spawnpoint 160'),
+(@POOL+160,1, 'Icecrown Ore Spawnpoint 161'),
+(@POOL+161,1, 'Icecrown Ore Spawnpoint 162'),
+(@POOL+162,1, 'Icecrown Ore Spawnpoint 163'),
+(@POOL+163,1, 'Icecrown Ore Spawnpoint 164'),
+(@POOL+164,1, 'Icecrown Ore Spawnpoint 165'),
+(@POOL+165,1, 'Icecrown Ore Spawnpoint 166'),
+(@POOL+166,1, 'Icecrown Ore Spawnpoint 167'),
+(@POOL+167,1, 'Icecrown Ore Spawnpoint 168'),
+(@POOL+168,1, 'Icecrown Ore Spawnpoint 169'),
+(@POOL+169,1, 'Icecrown Ore Spawnpoint 170'),
+(@POOL+170,1, 'Icecrown Ore Spawnpoint 171'),
+(@POOL+171,1, 'Icecrown Ore Spawnpoint 172'),
+(@POOL+172,1, 'Icecrown Ore Spawnpoint 173'),
+(@POOL+173,1, 'Icecrown Ore Spawnpoint 174'),
+(@POOL+174,1, 'Icecrown Ore Spawnpoint 175'),
+(@POOL+175,1, 'Icecrown Ore Spawnpoint 176'),
+(@POOL+176,1, 'Icecrown Ore Spawnpoint 177'),
+(@POOL+177,1, 'Icecrown Ore Spawnpoint 178'),
+(@POOL+178,1, 'Icecrown Ore Spawnpoint 179'),
+(@POOL+179,1, 'Icecrown Ore Spawnpoint 180'),
+(@POOL+180,1, 'Icecrown Ore Spawnpoint 181'),
+(@POOL+181,1, 'Icecrown Ore Spawnpoint 182'),
+(@POOL+182,1, 'Icecrown Ore Spawnpoint 183'),
+(@POOL+183,1, 'Icecrown Ore Spawnpoint 184'),
+(@POOL+184,1, 'Icecrown Ore Spawnpoint 185'),
+(@POOL+185,1, 'Icecrown Ore Spawnpoint 186'),
+(@POOL+186,1, 'Icecrown Ore Spawnpoint 187'),
+(@POOL+187,1, 'Icecrown Ore Spawnpoint 188'),
+(@POOL+188,1, 'Icecrown Ore Spawnpoint 189'),
+(@POOL+189,1, 'Icecrown Ore Spawnpoint 190'),
+(@POOL+190,1, 'Icecrown Ore Spawnpoint 191'),
+(@POOL+191,1, 'Icecrown Ore Spawnpoint 192'),
+(@POOL+192,1, 'Icecrown Ore Spawnpoint 193'),
+(@POOL+193,1, 'Icecrown Ore Spawnpoint 194'),
+(@POOL+194,1, 'Icecrown Ore Spawnpoint 195'),
+(@POOL+195,1, 'Icecrown Ore Spawnpoint 196'),
+(@POOL+196,1, 'Icecrown Ore Spawnpoint 197'),
+(@POOL+197,1, 'Icecrown Ore Spawnpoint 198'),
+(@POOL+198,1, 'Icecrown Ore Spawnpoint 199'),
+(@POOL+199,1, 'Icecrown Ore Spawnpoint 200'),
+(@POOL+200,1, 'Icecrown Ore Spawnpoint 201'),
+(@POOL+201,1, 'Icecrown Ore Spawnpoint 202'),
+(@POOL+202,1, 'Icecrown Ore Spawnpoint 203'),
+(@POOL+203,1, 'Icecrown Ore Spawnpoint 204'),
+(@POOL+204,1, 'Icecrown Ore Spawnpoint 205'),
+(@POOL+205,1, 'Icecrown Ore Spawnpoint 206'),
+(@POOL+206,1, 'Icecrown Ore Spawnpoint 207'),
+(@POOL+207,1, 'Icecrown Ore Spawnpoint 208'),
+(@POOL+208,1, 'Icecrown Ore Spawnpoint 209'),
+(@POOL+209,1, 'Icecrown Ore Spawnpoint 210'),
+(@POOL+210,1, 'Icecrown Ore Spawnpoint 211'),
+(@POOL+211,1, 'Icecrown Ore Spawnpoint 212'),
+(@POOL+212,1, 'Icecrown Ore Spawnpoint 213'),
+(@POOL+213,1, 'Icecrown Ore Spawnpoint 214'),
+(@POOL+214,1, 'Icecrown Ore Spawnpoint 215'),
+(@POOL+215,1, 'Icecrown Ore Spawnpoint 216'),
+(@POOL+216,1, 'Icecrown Ore Spawnpoint 217'),
+(@POOL+217,1, 'Icecrown Ore Spawnpoint 218'),
+(@POOL+218,1, 'Icecrown Ore Spawnpoint 219'),
+(@POOL+219,1, 'Icecrown Ore Spawnpoint 220'),
+(@POOL+220,1, 'Icecrown Ore Spawnpoint 221'),
+(@POOL+221,1, 'Icecrown Ore Spawnpoint 222'),
+(@POOL+222,1, 'Icecrown Ore Spawnpoint 223'),
+(@POOL+223,1, 'Icecrown Ore Spawnpoint 224'),
+(@POOL+224,1, 'Icecrown Ore Spawnpoint 225'),
+(@POOL+225,1, 'Icecrown Ore Spawnpoint 226'),
+(@POOL+226,1, 'Icecrown Ore Spawnpoint 227'),
+(@POOL+227,1, 'Icecrown Ore Spawnpoint 228'),
+(@POOL+228,1, 'Icecrown Ore Spawnpoint 229'),
+(@POOL+229,1, 'Icecrown Ore Spawnpoint 230'),
+(@POOL+230,1, 'Icecrown Ore Spawnpoint 231'),
+(@POOL+231,1, 'Icecrown Ore Spawnpoint 232'),
+(@POOL+232,1, 'Icecrown Ore Spawnpoint 233'),
+(@POOL+233,1, 'Icecrown Ore Spawnpoint 234'),
+(@POOL+234,1, 'Icecrown Ore Spawnpoint 235');
+-- Add mother pool to pool template
+DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
+INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
+(@MOTHER,@ACTIVE, 'Icecrown Ore Mother pool');
+-- Add each pool to pool_pool
+DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL AND @POOL+@LASTGUID;
+INSERT INTO `pool_pool` (`pool_id`,`mother_pool`,`chance`,`description`) VALUES
+(@POOL+0,@MOTHER,0, 'Icecrown Ore Spawnpoint 1'),
+(@POOL+1,@MOTHER,0, 'Icecrown Ore Spawnpoint 2'),
+(@POOL+2,@MOTHER,0, 'Icecrown Ore Spawnpoint 3'),
+(@POOL+3,@MOTHER,0, 'Icecrown Ore Spawnpoint 4'),
+(@POOL+4,@MOTHER,0, 'Icecrown Ore Spawnpoint 5'),
+(@POOL+5,@MOTHER,0, 'Icecrown Ore Spawnpoint 6'),
+(@POOL+6,@MOTHER,0, 'Icecrown Ore Spawnpoint 7'),
+(@POOL+7,@MOTHER,0, 'Icecrown Ore Spawnpoint 8'),
+(@POOL+8,@MOTHER,0, 'Icecrown Ore Spawnpoint 9'),
+(@POOL+9,@MOTHER,0, 'Icecrown Ore Spawnpoint 10'),
+(@POOL+10,@MOTHER,0, 'Icecrown Ore Spawnpoint 11'),
+(@POOL+11,@MOTHER,0, 'Icecrown Ore Spawnpoint 12'),
+(@POOL+12,@MOTHER,0, 'Icecrown Ore Spawnpoint 13'),
+(@POOL+13,@MOTHER,0, 'Icecrown Ore Spawnpoint 14'),
+(@POOL+14,@MOTHER,0, 'Icecrown Ore Spawnpoint 15'),
+(@POOL+15,@MOTHER,0, 'Icecrown Ore Spawnpoint 16'),
+(@POOL+16,@MOTHER,0, 'Icecrown Ore Spawnpoint 17'),
+(@POOL+17,@MOTHER,0, 'Icecrown Ore Spawnpoint 18'),
+(@POOL+18,@MOTHER,0, 'Icecrown Ore Spawnpoint 19'),
+(@POOL+19,@MOTHER,0, 'Icecrown Ore Spawnpoint 20'),
+(@POOL+20,@MOTHER,0, 'Icecrown Ore Spawnpoint 21'),
+(@POOL+21,@MOTHER,0, 'Icecrown Ore Spawnpoint 22'),
+(@POOL+22,@MOTHER,0, 'Icecrown Ore Spawnpoint 23'),
+(@POOL+23,@MOTHER,0, 'Icecrown Ore Spawnpoint 24'),
+(@POOL+24,@MOTHER,0, 'Icecrown Ore Spawnpoint 25'),
+(@POOL+25,@MOTHER,0, 'Icecrown Ore Spawnpoint 26'),
+(@POOL+26,@MOTHER,0, 'Icecrown Ore Spawnpoint 27'),
+(@POOL+27,@MOTHER,0, 'Icecrown Ore Spawnpoint 28'),
+(@POOL+28,@MOTHER,0, 'Icecrown Ore Spawnpoint 29'),
+(@POOL+29,@MOTHER,0, 'Icecrown Ore Spawnpoint 30'),
+(@POOL+30,@MOTHER,0, 'Icecrown Ore Spawnpoint 31'),
+(@POOL+31,@MOTHER,0, 'Icecrown Ore Spawnpoint 32'),
+(@POOL+32,@MOTHER,0, 'Icecrown Ore Spawnpoint 33'),
+(@POOL+33,@MOTHER,0, 'Icecrown Ore Spawnpoint 34'),
+(@POOL+34,@MOTHER,0, 'Icecrown Ore Spawnpoint 35'),
+(@POOL+35,@MOTHER,0, 'Icecrown Ore Spawnpoint 36'),
+(@POOL+36,@MOTHER,0, 'Icecrown Ore Spawnpoint 37'),
+(@POOL+37,@MOTHER,0, 'Icecrown Ore Spawnpoint 38'),
+(@POOL+38,@MOTHER,0, 'Icecrown Ore Spawnpoint 39'),
+(@POOL+39,@MOTHER,0, 'Icecrown Ore Spawnpoint 40'),
+(@POOL+40,@MOTHER,0, 'Icecrown Ore Spawnpoint 41'),
+(@POOL+41,@MOTHER,0, 'Icecrown Ore Spawnpoint 42'),
+(@POOL+42,@MOTHER,0, 'Icecrown Ore Spawnpoint 43'),
+(@POOL+43,@MOTHER,0, 'Icecrown Ore Spawnpoint 44'),
+(@POOL+44,@MOTHER,0, 'Icecrown Ore Spawnpoint 45'),
+(@POOL+45,@MOTHER,0, 'Icecrown Ore Spawnpoint 46'),
+(@POOL+46,@MOTHER,0, 'Icecrown Ore Spawnpoint 47'),
+(@POOL+47,@MOTHER,0, 'Icecrown Ore Spawnpoint 48'),
+(@POOL+48,@MOTHER,0, 'Icecrown Ore Spawnpoint 49'),
+(@POOL+49,@MOTHER,0, 'Icecrown Ore Spawnpoint 50'),
+(@POOL+50,@MOTHER,0, 'Icecrown Ore Spawnpoint 51'),
+(@POOL+51,@MOTHER,0, 'Icecrown Ore Spawnpoint 52'),
+(@POOL+52,@MOTHER,0, 'Icecrown Ore Spawnpoint 53'),
+(@POOL+53,@MOTHER,0, 'Icecrown Ore Spawnpoint 54'),
+(@POOL+54,@MOTHER,0, 'Icecrown Ore Spawnpoint 55'),
+(@POOL+55,@MOTHER,0, 'Icecrown Ore Spawnpoint 56'),
+(@POOL+56,@MOTHER,0, 'Icecrown Ore Spawnpoint 57'),
+(@POOL+57,@MOTHER,0, 'Icecrown Ore Spawnpoint 58'),
+(@POOL+58,@MOTHER,0, 'Icecrown Ore Spawnpoint 59'),
+(@POOL+59,@MOTHER,0, 'Icecrown Ore Spawnpoint 60'),
+(@POOL+60,@MOTHER,0, 'Icecrown Ore Spawnpoint 61'),
+(@POOL+61,@MOTHER,0, 'Icecrown Ore Spawnpoint 62'),
+(@POOL+62,@MOTHER,0, 'Icecrown Ore Spawnpoint 63'),
+(@POOL+63,@MOTHER,0, 'Icecrown Ore Spawnpoint 64'),
+(@POOL+64,@MOTHER,0, 'Icecrown Ore Spawnpoint 65'),
+(@POOL+65,@MOTHER,0, 'Icecrown Ore Spawnpoint 66'),
+(@POOL+66,@MOTHER,0, 'Icecrown Ore Spawnpoint 67'),
+(@POOL+67,@MOTHER,0, 'Icecrown Ore Spawnpoint 68'),
+(@POOL+68,@MOTHER,0, 'Icecrown Ore Spawnpoint 69'),
+(@POOL+69,@MOTHER,0, 'Icecrown Ore Spawnpoint 70'),
+(@POOL+70,@MOTHER,0, 'Icecrown Ore Spawnpoint 71'),
+(@POOL+71,@MOTHER,0, 'Icecrown Ore Spawnpoint 72'),
+(@POOL+72,@MOTHER,0, 'Icecrown Ore Spawnpoint 73'),
+(@POOL+73,@MOTHER,0, 'Icecrown Ore Spawnpoint 74'),
+(@POOL+74,@MOTHER,0, 'Icecrown Ore Spawnpoint 75'),
+(@POOL+75,@MOTHER,0, 'Icecrown Ore Spawnpoint 76'),
+(@POOL+76,@MOTHER,0, 'Icecrown Ore Spawnpoint 77'),
+(@POOL+77,@MOTHER,0, 'Icecrown Ore Spawnpoint 78'),
+(@POOL+78,@MOTHER,0, 'Icecrown Ore Spawnpoint 79'),
+(@POOL+79,@MOTHER,0, 'Icecrown Ore Spawnpoint 80'),
+(@POOL+80,@MOTHER,0, 'Icecrown Ore Spawnpoint 81'),
+(@POOL+81,@MOTHER,0, 'Icecrown Ore Spawnpoint 82'),
+(@POOL+82,@MOTHER,0, 'Icecrown Ore Spawnpoint 83'),
+(@POOL+83,@MOTHER,0, 'Icecrown Ore Spawnpoint 84'),
+(@POOL+84,@MOTHER,0, 'Icecrown Ore Spawnpoint 85'),
+(@POOL+85,@MOTHER,0, 'Icecrown Ore Spawnpoint 86'),
+(@POOL+86,@MOTHER,0, 'Icecrown Ore Spawnpoint 87'),
+(@POOL+87,@MOTHER,0, 'Icecrown Ore Spawnpoint 88'),
+(@POOL+88,@MOTHER,0, 'Icecrown Ore Spawnpoint 89'),
+(@POOL+89,@MOTHER,0, 'Icecrown Ore Spawnpoint 90'),
+(@POOL+90,@MOTHER,0, 'Icecrown Ore Spawnpoint 91'),
+(@POOL+91,@MOTHER,0, 'Icecrown Ore Spawnpoint 92'),
+(@POOL+92,@MOTHER,0, 'Icecrown Ore Spawnpoint 93'),
+(@POOL+93,@MOTHER,0, 'Icecrown Ore Spawnpoint 94'),
+(@POOL+94,@MOTHER,0, 'Icecrown Ore Spawnpoint 95'),
+(@POOL+95,@MOTHER,0, 'Icecrown Ore Spawnpoint 96'),
+(@POOL+96,@MOTHER,0, 'Icecrown Ore Spawnpoint 97'),
+(@POOL+97,@MOTHER,0, 'Icecrown Ore Spawnpoint 98'),
+(@POOL+98,@MOTHER,0, 'Icecrown Ore Spawnpoint 99'),
+(@POOL+99,@MOTHER,0, 'Icecrown Ore Spawnpoint 100'),
+(@POOL+100,@MOTHER,0, 'Icecrown Ore Spawnpoint 101'),
+(@POOL+101,@MOTHER,0, 'Icecrown Ore Spawnpoint 102'),
+(@POOL+102,@MOTHER,0, 'Icecrown Ore Spawnpoint 103'),
+(@POOL+103,@MOTHER,0, 'Icecrown Ore Spawnpoint 104'),
+(@POOL+104,@MOTHER,0, 'Icecrown Ore Spawnpoint 105'),
+(@POOL+105,@MOTHER,0, 'Icecrown Ore Spawnpoint 106'),
+(@POOL+106,@MOTHER,0, 'Icecrown Ore Spawnpoint 107'),
+(@POOL+107,@MOTHER,0, 'Icecrown Ore Spawnpoint 108'),
+(@POOL+108,@MOTHER,0, 'Icecrown Ore Spawnpoint 109'),
+(@POOL+109,@MOTHER,0, 'Icecrown Ore Spawnpoint 110'),
+(@POOL+110,@MOTHER,0, 'Icecrown Ore Spawnpoint 111'),
+(@POOL+111,@MOTHER,0, 'Icecrown Ore Spawnpoint 112'),
+(@POOL+112,@MOTHER,0, 'Icecrown Ore Spawnpoint 113'),
+(@POOL+113,@MOTHER,0, 'Icecrown Ore Spawnpoint 114'),
+(@POOL+114,@MOTHER,0, 'Icecrown Ore Spawnpoint 115'),
+(@POOL+115,@MOTHER,0, 'Icecrown Ore Spawnpoint 116'),
+(@POOL+116,@MOTHER,0, 'Icecrown Ore Spawnpoint 117'),
+(@POOL+117,@MOTHER,0, 'Icecrown Ore Spawnpoint 118'),
+(@POOL+118,@MOTHER,0, 'Icecrown Ore Spawnpoint 119'),
+(@POOL+119,@MOTHER,0, 'Icecrown Ore Spawnpoint 120'),
+(@POOL+120,@MOTHER,0, 'Icecrown Ore Spawnpoint 121'),
+(@POOL+121,@MOTHER,0, 'Icecrown Ore Spawnpoint 122'),
+(@POOL+122,@MOTHER,0, 'Icecrown Ore Spawnpoint 123'),
+(@POOL+123,@MOTHER,0, 'Icecrown Ore Spawnpoint 124'),
+(@POOL+124,@MOTHER,0, 'Icecrown Ore Spawnpoint 125'),
+(@POOL+125,@MOTHER,0, 'Icecrown Ore Spawnpoint 126'),
+(@POOL+126,@MOTHER,0, 'Icecrown Ore Spawnpoint 127'),
+(@POOL+127,@MOTHER,0, 'Icecrown Ore Spawnpoint 128'),
+(@POOL+128,@MOTHER,0, 'Icecrown Ore Spawnpoint 129'),
+(@POOL+129,@MOTHER,0, 'Icecrown Ore Spawnpoint 130'),
+(@POOL+130,@MOTHER,0, 'Icecrown Ore Spawnpoint 131'),
+(@POOL+131,@MOTHER,0, 'Icecrown Ore Spawnpoint 132'),
+(@POOL+132,@MOTHER,0, 'Icecrown Ore Spawnpoint 133'),
+(@POOL+133,@MOTHER,0, 'Icecrown Ore Spawnpoint 134'),
+(@POOL+134,@MOTHER,0, 'Icecrown Ore Spawnpoint 135'),
+(@POOL+135,@MOTHER,0, 'Icecrown Ore Spawnpoint 136'),
+(@POOL+136,@MOTHER,0, 'Icecrown Ore Spawnpoint 137'),
+(@POOL+137,@MOTHER,0, 'Icecrown Ore Spawnpoint 138'),
+(@POOL+138,@MOTHER,0, 'Icecrown Ore Spawnpoint 139'),
+(@POOL+139,@MOTHER,0, 'Icecrown Ore Spawnpoint 140'),
+(@POOL+140,@MOTHER,0, 'Icecrown Ore Spawnpoint 141'),
+(@POOL+141,@MOTHER,0, 'Icecrown Ore Spawnpoint 142'),
+(@POOL+142,@MOTHER,0, 'Icecrown Ore Spawnpoint 143'),
+(@POOL+143,@MOTHER,0, 'Icecrown Ore Spawnpoint 144'),
+(@POOL+144,@MOTHER,0, 'Icecrown Ore Spawnpoint 145'),
+(@POOL+145,@MOTHER,0, 'Icecrown Ore Spawnpoint 146'),
+(@POOL+146,@MOTHER,0, 'Icecrown Ore Spawnpoint 147'),
+(@POOL+147,@MOTHER,0, 'Icecrown Ore Spawnpoint 148'),
+(@POOL+148,@MOTHER,0, 'Icecrown Ore Spawnpoint 149'),
+(@POOL+149,@MOTHER,0, 'Icecrown Ore Spawnpoint 150'),
+(@POOL+150,@MOTHER,0, 'Icecrown Ore Spawnpoint 151'),
+(@POOL+151,@MOTHER,0, 'Icecrown Ore Spawnpoint 152'),
+(@POOL+152,@MOTHER,0, 'Icecrown Ore Spawnpoint 153'),
+(@POOL+153,@MOTHER,0, 'Icecrown Ore Spawnpoint 154'),
+(@POOL+154,@MOTHER,0, 'Icecrown Ore Spawnpoint 155'),
+(@POOL+155,@MOTHER,0, 'Icecrown Ore Spawnpoint 156'),
+(@POOL+156,@MOTHER,0, 'Icecrown Ore Spawnpoint 157'),
+(@POOL+157,@MOTHER,0, 'Icecrown Ore Spawnpoint 158'),
+(@POOL+158,@MOTHER,0, 'Icecrown Ore Spawnpoint 159'),
+(@POOL+159,@MOTHER,0, 'Icecrown Ore Spawnpoint 160'),
+(@POOL+160,@MOTHER,0, 'Icecrown Ore Spawnpoint 161'),
+(@POOL+161,@MOTHER,0, 'Icecrown Ore Spawnpoint 162'),
+(@POOL+162,@MOTHER,0, 'Icecrown Ore Spawnpoint 163'),
+(@POOL+163,@MOTHER,0, 'Icecrown Ore Spawnpoint 164'),
+(@POOL+164,@MOTHER,0, 'Icecrown Ore Spawnpoint 165'),
+(@POOL+165,@MOTHER,0, 'Icecrown Ore Spawnpoint 166'),
+(@POOL+166,@MOTHER,0, 'Icecrown Ore Spawnpoint 167'),
+(@POOL+167,@MOTHER,0, 'Icecrown Ore Spawnpoint 168'),
+(@POOL+168,@MOTHER,0, 'Icecrown Ore Spawnpoint 169'),
+(@POOL+169,@MOTHER,0, 'Icecrown Ore Spawnpoint 170'),
+(@POOL+170,@MOTHER,0, 'Icecrown Ore Spawnpoint 171'),
+(@POOL+171,@MOTHER,0, 'Icecrown Ore Spawnpoint 172'),
+(@POOL+172,@MOTHER,0, 'Icecrown Ore Spawnpoint 173'),
+(@POOL+173,@MOTHER,0, 'Icecrown Ore Spawnpoint 174'),
+(@POOL+174,@MOTHER,0, 'Icecrown Ore Spawnpoint 175'),
+(@POOL+175,@MOTHER,0, 'Icecrown Ore Spawnpoint 176'),
+(@POOL+176,@MOTHER,0, 'Icecrown Ore Spawnpoint 177'),
+(@POOL+177,@MOTHER,0, 'Icecrown Ore Spawnpoint 178'),
+(@POOL+178,@MOTHER,0, 'Icecrown Ore Spawnpoint 179'),
+(@POOL+179,@MOTHER,0, 'Icecrown Ore Spawnpoint 180'),
+(@POOL+180,@MOTHER,0, 'Icecrown Ore Spawnpoint 181'),
+(@POOL+181,@MOTHER,0, 'Icecrown Ore Spawnpoint 182'),
+(@POOL+182,@MOTHER,0, 'Icecrown Ore Spawnpoint 183'),
+(@POOL+183,@MOTHER,0, 'Icecrown Ore Spawnpoint 184'),
+(@POOL+184,@MOTHER,0, 'Icecrown Ore Spawnpoint 185'),
+(@POOL+185,@MOTHER,0, 'Icecrown Ore Spawnpoint 186'),
+(@POOL+186,@MOTHER,0, 'Icecrown Ore Spawnpoint 187'),
+(@POOL+187,@MOTHER,0, 'Icecrown Ore Spawnpoint 188'),
+(@POOL+188,@MOTHER,0, 'Icecrown Ore Spawnpoint 189'),
+(@POOL+189,@MOTHER,0, 'Icecrown Ore Spawnpoint 190'),
+(@POOL+190,@MOTHER,0, 'Icecrown Ore Spawnpoint 191'),
+(@POOL+191,@MOTHER,0, 'Icecrown Ore Spawnpoint 192'),
+(@POOL+192,@MOTHER,0, 'Icecrown Ore Spawnpoint 193'),
+(@POOL+193,@MOTHER,0, 'Icecrown Ore Spawnpoint 194'),
+(@POOL+194,@MOTHER,0, 'Icecrown Ore Spawnpoint 195'),
+(@POOL+195,@MOTHER,0, 'Icecrown Ore Spawnpoint 196'),
+(@POOL+196,@MOTHER,0, 'Icecrown Ore Spawnpoint 197'),
+(@POOL+197,@MOTHER,0, 'Icecrown Ore Spawnpoint 198'),
+(@POOL+198,@MOTHER,0, 'Icecrown Ore Spawnpoint 199'),
+(@POOL+199,@MOTHER,0, 'Icecrown Ore Spawnpoint 200'),
+(@POOL+200,@MOTHER,0, 'Icecrown Ore Spawnpoint 201'),
+(@POOL+201,@MOTHER,0, 'Icecrown Ore Spawnpoint 202'),
+(@POOL+202,@MOTHER,0, 'Icecrown Ore Spawnpoint 203'),
+(@POOL+203,@MOTHER,0, 'Icecrown Ore Spawnpoint 204'),
+(@POOL+204,@MOTHER,0, 'Icecrown Ore Spawnpoint 205'),
+(@POOL+205,@MOTHER,0, 'Icecrown Ore Spawnpoint 206'),
+(@POOL+206,@MOTHER,0, 'Icecrown Ore Spawnpoint 207'),
+(@POOL+207,@MOTHER,0, 'Icecrown Ore Spawnpoint 208'),
+(@POOL+208,@MOTHER,0, 'Icecrown Ore Spawnpoint 209'),
+(@POOL+209,@MOTHER,0, 'Icecrown Ore Spawnpoint 210'),
+(@POOL+210,@MOTHER,0, 'Icecrown Ore Spawnpoint 211'),
+(@POOL+211,@MOTHER,0, 'Icecrown Ore Spawnpoint 212'),
+(@POOL+212,@MOTHER,0, 'Icecrown Ore Spawnpoint 213'),
+(@POOL+213,@MOTHER,0, 'Icecrown Ore Spawnpoint 214'),
+(@POOL+214,@MOTHER,0, 'Icecrown Ore Spawnpoint 215'),
+(@POOL+215,@MOTHER,0, 'Icecrown Ore Spawnpoint 216'),
+(@POOL+216,@MOTHER,0, 'Icecrown Ore Spawnpoint 217'),
+(@POOL+217,@MOTHER,0, 'Icecrown Ore Spawnpoint 218'),
+(@POOL+218,@MOTHER,0, 'Icecrown Ore Spawnpoint 219'),
+(@POOL+219,@MOTHER,0, 'Icecrown Ore Spawnpoint 220'),
+(@POOL+220,@MOTHER,0, 'Icecrown Ore Spawnpoint 221'),
+(@POOL+221,@MOTHER,0, 'Icecrown Ore Spawnpoint 222'),
+(@POOL+222,@MOTHER,0, 'Icecrown Ore Spawnpoint 223'),
+(@POOL+223,@MOTHER,0, 'Icecrown Ore Spawnpoint 224'),
+(@POOL+224,@MOTHER,0, 'Icecrown Ore Spawnpoint 225'),
+(@POOL+225,@MOTHER,0, 'Icecrown Ore Spawnpoint 226'),
+(@POOL+226,@MOTHER,0, 'Icecrown Ore Spawnpoint 227'),
+(@POOL+227,@MOTHER,0, 'Icecrown Ore Spawnpoint 228'),
+(@POOL+228,@MOTHER,0, 'Icecrown Ore Spawnpoint 229'),
+(@POOL+229,@MOTHER,0, 'Icecrown Ore Spawnpoint 230'),
+(@POOL+230,@MOTHER,0, 'Icecrown Ore Spawnpoint 231'),
+(@POOL+231,@MOTHER,0, 'Icecrown Ore Spawnpoint 232'),
+(@POOL+232,@MOTHER,0, 'Icecrown Ore Spawnpoint 233'),
+(@POOL+233,@MOTHER,0, 'Icecrown Ore Spawnpoint 234'),
+(@POOL+234,@MOTHER,0, 'Icecrown Ore Spawnpoint 235');
+
diff --git a/sql/updates/world/2011_11_13_03_world_npc_trainer.sql b/sql/updates/world/2011_11_13_03_world_npc_trainer.sql
new file mode 100644
index 00000000000..0db753c008b
--- /dev/null
+++ b/sql/updates/world/2011_11_13_03_world_npc_trainer.sql
@@ -0,0 +1,5 @@
+-- Remove Manual: Netherweave Bandage & and Manual: Heavy Netherweave Bandage from vendors (Patch 3.1.0)
+DELETE FROM `npc_vendor` WHERE `item` IN (21992,21991);
+-- Update reqskillvalue for Netherweave Bandage & Heavy Netherweave Bandage (Patch 3.1.0)
+UPDATE `npc_trainer` SET `reqskillvalue`=300 WHERE spell=27032;
+UPDATE `npc_trainer` SET `reqskillvalue`=330 WHERE spell=27033;
diff --git a/sql/updates/world/2011_11_13_04_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_04_world_creature_loot_template.sql
new file mode 100644
index 00000000000..b68d12a031d
--- /dev/null
+++ b/sql/updates/world/2011_11_13_04_world_creature_loot_template.sql
@@ -0,0 +1,4 @@
+DELETE FROM `creature_loot_template` WHERE `entry` IN (4356,4357) AND `item`=33085;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(4356,33085,-37,1,0,1,1), -- Feathers drop from Bloodfen Razormaw
+(4357,33085,-33,1,0,1,1); -- Feathers drop from Bloodfen Lashtail
diff --git a/sql/updates/world/2011_11_13_05_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_05_world_creature_loot_template.sql
new file mode 100644
index 00000000000..722027bd343
--- /dev/null
+++ b/sql/updates/world/2011_11_13_05_world_creature_loot_template.sql
@@ -0,0 +1,4 @@
+-- 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/updates/world/2011_11_13_06_world_reference_loot_template.sql b/sql/updates/world/2011_11_13_06_world_reference_loot_template.sql
new file mode 100644
index 00000000000..efb2fec72f3
--- /dev/null
+++ b/sql/updates/world/2011_11_13_06_world_reference_loot_template.sql
@@ -0,0 +1,9 @@
+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
+(@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
+(@REF,34003,0.8,1,0,1,1), -- Flimsy Male Draenei Mask
+(@REF,37606,11,1,0,1,1), -- Penny Pouch
+(@REF,33292,2,1,0,1,1); -- Hallowed Helm
diff --git a/sql/updates/world/2011_11_13_07_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_07_world_creature_loot_template.sql
new file mode 100644
index 00000000000..728ce731313
--- /dev/null
+++ b/sql/updates/world/2011_11_13_07_world_creature_loot_template.sql
@@ -0,0 +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
+(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/updates/world/2011_11_13_08_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_08_world_creature_loot_template.sql
new file mode 100644
index 00000000000..55f58d4fbba
--- /dev/null
+++ b/sql/updates/world/2011_11_13_08_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- Update Dropchance for Narain's Scrying Goggles
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=100 WHERE `item`=20951;
diff --git a/sql/updates/world/2011_11_13_09_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_09_world_creature_loot_template.sql
new file mode 100644
index 00000000000..6356c93a9ba
--- /dev/null
+++ b/sql/updates/world/2011_11_13_09_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- None of the creatures should drop Scarlet Cannonball
+DELETE FROM `creature_loot_template` WHERE `item`=12973;
diff --git a/sql/updates/world/2011_11_13_10_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_10_world_creature_loot_template.sql
new file mode 100644
index 00000000000..3052ba96745
--- /dev/null
+++ b/sql/updates/world/2011_11_13_10_world_creature_loot_template.sql
@@ -0,0 +1,2 @@
+-- Drakkari Offerings should also drop when NOT on a quest:
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=ABS(`ChanceOrQuestChance`) WHERE `item`=38551;
diff --git a/sql/updates/world/2011_11_13_11_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_11_world_creature_loot_template.sql
new file mode 100644
index 00000000000..9f753577844
--- /dev/null
+++ b/sql/updates/world/2011_11_13_11_world_creature_loot_template.sql
@@ -0,0 +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
+(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/updates/world/2011_11_13_12_world_creature_loot_template.sql b/sql/updates/world/2011_11_13_12_world_creature_loot_template.sql
new file mode 100644
index 00000000000..7982910cee6
--- /dev/null
+++ b/sql/updates/world/2011_11_13_12_world_creature_loot_template.sql
@@ -0,0 +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
+(6005,15727,0.5,1,0,1,1); -- Shadowsworn Thug
diff --git a/sql/updates/world/2011_11_20_00_world_command.sql b/sql/updates/world/2011_11_20_00_world_command.sql
new file mode 100644
index 00000000000..73d52974766
--- /dev/null
+++ b/sql/updates/world/2011_11_20_00_world_command.sql
@@ -0,0 +1 @@
+UPDATE `command` SET `help`='Syntax: .tele name [#playername] #location\n\nTeleport the given character to a given location. Character can be offline.\n\nTo teleport to homebind, set #location to "$home" (without quotes).' WHERE `name` = 'tele name';
diff --git a/sql/updates/world/2011_11_20_01_world_sai.sql b/sql/updates/world/2011_11_20_01_world_sai.sql
new file mode 100644
index 00000000000..dbb4f39a499
--- /dev/null
+++ b/sql/updates/world/2011_11_20_01_world_sai.sql
@@ -0,0 +1,45 @@
+-- [Q] Laying Waste to the Unwanted
+
+-- Invis Horde Siege Engine - West SAI
+SET @ENTRY := 19009;
+SET @SPELL_IGNITE_SIEGE := 32979;
+SET @SPELL_HELLFIRE_FIRE := 34386;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `position_x`=-183.947998,`position_y`=2773.389893,`position_z`=49.198399 WHERE `guid`=68321 AND `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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West - On Spellhit - Cast Create Hellfire Fire"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West - On Spellhit - Quest Credit");
+
+-- Invis Horde Siege Engine - West 02 SAI
+SET @ENTRY := 21236;
+SET @SPELL_IGNITE_SIEGE := 32979;
+SET @SPELL_HELLFIRE_FIRE := 34386;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `position_z`=43.094120 WHERE `guid`=74454 AND `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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West 02 - On Spellhit - Cast Create Hellfire Fire"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West 02 - On Spellhit - Quest Credit");
+
+-- Invis Horde Siege Engine - East SAI
+SET @ENTRY := 21237;
+SET @SPELL_IGNITE_SIEGE := 32979;
+SET @SPELL_HELLFIRE_FIRE := 34386;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `position_x`=-157.329712,`position_y`=2518.655273,`position_z`=58.221237 WHERE `guid`=67186 AND `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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East - On Spellhit - Cast Create Hellfire Fire"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East - On Spellhit - Quest Credit");
+
+-- Invis Horde Siege Engine - East 02 SAI
+SET @ENTRY := 18818;
+SET @SPELL_IGNITE_SIEGE := 32979;
+SET @SPELL_HELLFIRE_FIRE := 34386;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `position_x`=-152.163116,`position_y`=2662.497314,`position_z`=60.728378 WHERE `guid`=74455 AND `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
+(@ENTRY,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East 02 - On Spellhit - Cast Create Hellfire Fire"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East 02 - On Spellhit - Quest Credit");
diff --git a/sql/updates/world/2011_11_20_02_world_sai.sql b/sql/updates/world/2011_11_20_02_world_sai.sql
new file mode 100644
index 00000000000..f064aa67f9f
--- /dev/null
+++ b/sql/updates/world/2011_11_20_02_world_sai.sql
@@ -0,0 +1,45 @@
+-- [Q] Fel Spirits
+
+-- Port Fel Spirit's EAI to creature_template_addon
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=22454;
+DELETE FROM `creature_template_addon` WHERE `entry`=22454;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (22454,0,0,1,0,"39205");
+UPDATE `creature_template` SET `AIName`='',`unit_flags`=32768,`baseattacktime`=2000 WHERE `entry`=22454;
+
+-- Shattered Hand Berserker SAI
+SET @ENTRY := 16878;
+SET @SPELL_CHARGE := 35570;
+SET @SPELL_ENRAGE := 8599;
+SET @SPELL_SUMMON := 39206;
+SET @SPELL_CONTRITION := 39184;
+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
+(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,11,@SPELL_CHARGE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Aggro - Cast Charge"),
+(@ENTRY,0,1,0,8,0,100,0,@SPELL_CONTRITION,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Spellhit - Set Phase 1"),
+(@ENTRY,0,2,0,6,1,100,0,0,0,0,0,11,@SPELL_SUMMON,2,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Death (P1) - Cast Summon Fel Spirit"),
+(@ENTRY,0,3,4,2,0,100,1,0,30,0,0,11,@SPELL_ENRAGE,1,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Hand Berserker - At 30% HP - Cast Enrage"),
+(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Shattered Hand Berserker - At 30% HP - Say Line 0");
+-- Text
+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,"%s becomes enraged!",16,0,100,0,0,0,"Shattered Hand Berserker");
+
+-- Anchorite Relic Bunny SAI
+SET @ENTRY := 22444;
+SET @SPELL_CONTRITION := 39184;
+UPDATE `creature_template` SET `AIName`='SmartAI',`exp`=2,`minlevel`=35,`maxlevel`=35,`baseattacktime`=2000,`unit_flags`=`unit_flags`|2048 WHERE `entry`=@ENTRY;
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@ENTRY,0,0,1,0, NULL);
+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
+(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anchorite Relic Bunny - Just Summoned - Prevent Combat Movemenet"),
+(@ENTRY,0,1,0,60,0,100,0,1000,3000,15000,20000,11,@SPELL_CONTRITION,0,0,0,0,0,11,16878,0,0,0,0,0,0,"Anchorite Relic Bunny - On Update - Cast Anchorite Contrition");
+
+-- Condition for spell Anchorite Contrition
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@SPELL_CONTRITION,@SPELL_SUMMON);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,@SPELL_CONTRITION,0,18,1,16878,0,0,'',"Spell Anchorite Contrition targets Shattered Hand Berserker"),
+(13,0,@SPELL_SUMMON,0,18,1,22444,0,0,'',"Spell Summon Fel Spirit targets Anchorite Relic Bunny");
diff --git a/sql/updates/world/2011_11_20_03_world_sai.sql b/sql/updates/world/2011_11_20_03_world_sai.sql
new file mode 100644
index 00000000000..bd47430acd8
--- /dev/null
+++ b/sql/updates/world/2011_11_20_03_world_sai.sql
@@ -0,0 +1,49 @@
+-- [Q] Hard to Swallow
+
+-- Hulking Jormungar SAI
+SET @ENTRY := 26293;
+SET @SPELL_CORROSIVE_POISON := 50293;
+SET @SPELL_GRENADE := 47305;
+SET @SPELL_EXPLOSION := 47311;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*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
+(@ENTRY,0,0,0,0,0,100,0,6000,7000,11000,13000,11,@SPELL_CORROSIVE_POISON,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hulking Jormungar - In Combat - Cast Corrode Flesh"),
+(@ENTRY,0,1,0,2,0,100,1,0,80,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - At 80% HP - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Say Line 0"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Set Phase 1"),
+(@ENTRY*100,9,2,0,0,0,100,0,5000,5000,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Set Phase 0"),
+(@ENTRY,0,2,0,8,1,100,0,@SPELL_GRENADE,0,0,0,80,@ENTRY*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Spellhit (P1) - Run Script"),
+(@ENTRY*100+1,9,0,0,0,0,100,0,3000,3000,0,0,11,@SPELL_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Cast Quest - Jormungar Explosion Spell Spawner"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Die");
+
+-- Text
+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 Hulking Jormungar falters for a moment, opening its mouth wide.",41,0,100,0,0,0,"Hulking Jormungar");
+
+-- Potent Explosive Charge conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_GRENADE;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,@SPELL_GRENADE,0,18,1,@ENTRY,0,0,'',"Potent Explosive Charge only targets Hulking Jormungar"),
+(13,0,@SPELL_GRENADE,0,20,80,0,0,0,'',"Potent Explosive Charge requires target to be below 80% HP");
+
+-- Quest - Jormungar Explosion Spell Spawner triggers the meat throw spells
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=@SPELL_EXPLOSION;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(@SPELL_EXPLOSION,47925,0,"Quest - Jormungar Explosion Spell Spawner triggers Quest - Jormungar Explosion Summon Object"),
+(@SPELL_EXPLOSION,47924,0,"Quest - Jormungar Explosion Spell Spawner triggers Quest - Jormungar Explosion Summon Object"),
+(@SPELL_EXPLOSION,47309,0,"Quest - Jormungar Explosion Spell Spawner triggers Quest - Jormungar Explosion Summon Object");
+
+-- Jormungar Meat SAI
+SET @ENTRY := 26699;
+UPDATE `creature_template` SET `AIname`='SmartAI',`unit_flags`=`unit_flags`|33554432,`flags_extra`=`flags_extra`|128 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
+(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,50,188434,120000,0,0,0,0,1,0,0,0,0,0,0,0,"Jormungar Meat - Just Summoned - Summon Jormungar Meat");
+
+-- Give Jormungar Meat quest item loot
+DELETE FROM `gameobject_loot_template` WHERE `entry`=23442;
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(23442,36731,-100,1,0,1,1);
diff --git a/sql/updates/world/2011_11_20_04_world_sai.sql b/sql/updates/world/2011_11_20_04_world_sai.sql
new file mode 100644
index 00000000000..e362b0d0866
--- /dev/null
+++ b/sql/updates/world/2011_11_20_04_world_sai.sql
@@ -0,0 +1,24 @@
+-- [Q] The Might of the Horde
+
+-- Warsong Battle Standard SAI
+SET @ENTRY := 26678;
+SET @QUEST := 12053;
+UPDATE `creature_template` SET `AIName`='SmartAI',`minlevel`=70,`maxlevel`=71,`exp`=1 WHERE `entry`=@ENTRY;
+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,1,0,100,1,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Spawn - Set React State Passive"), -- We shouldn't EVER attack back or move
+(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,6,@QUEST,0,0,0,0,0,23,0,0,0,0,0,0,0,"Warsong Battle Standard - On Death - Fail Quest"),
+(@ENTRY,0,2,0,54,0,100,0,0,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - Just Summoned - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,5000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"),
+(@ENTRY*100,9,1,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"),
+(@ENTRY*100,9,2,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"),
+(@ENTRY*100,9,3,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"),
+(@ENTRY*100,9,4,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"),
+(@ENTRY*100,9,5,0,0,0,100,0,4000,4000,0,0,15,@QUEST,0,0,0,0,0,23,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Quest Credit");
+
+-- Anub'ar Invader SAI
+SET @ENTRY := 26676;
+UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=2018,`faction_H`=2018 WHERE `entry`=@ENTRY;
+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,54,0,100,1,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,"Anub'ar Invader - Just Summoned - Attack Summoner");
diff --git a/sql/updates/world/2011_11_20_05_world_sai.sql b/sql/updates/world/2011_11_20_05_world_sai.sql
new file mode 100644
index 00000000000..464d0635bb8
--- /dev/null
+++ b/sql/updates/world/2011_11_20_05_world_sai.sql
@@ -0,0 +1,78 @@
+-- [Q] Jack Likes His Drink
+-- We are making Jack dance through SAI instead of creature(_template)_addon so we can cancel it in the actual SAI
+
+-- Olga, the Scalawag Wench SAI
+SET @ENTRY_OLGA := 24639;
+SET @ENTRY_JACK := 24788;
+SET @GOSSIP := 9015;
+SET @QUEST := 11466;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_OLGA,@ENTRY_JACK);
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP+10 WHERE `entry`=@ENTRY_JACK;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_OLGA,@ENTRY_OLGA*100,@ENTRY_OLGA*100+1,@ENTRY_OLGA*100+2,@ENTRY_JACK,@ENTRY_JACK*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_OLGA,0,0,0,62,0,100,0,@GOSSIP+1,0,0,0,80,@ENTRY_OLGA*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Gossip Select - Run Script"),
+(@ENTRY_OLGA*100,9,0,0,0,0,100,0,0,0,0,0,53,0,@ENTRY_OLGA,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Start WP"),
+(@ENTRY_OLGA*100,9,1,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Close Gossip"),
+(@ENTRY_OLGA*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Whisper Line 0"),
+(@ENTRY_OLGA*100,9,3,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Remove Gossip Flag"),
+
+(@ENTRY_OLGA,0,1,0,40,0,100,0,2,@ENTRY_OLGA,0,0,80,@ENTRY_OLGA*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On WP 2 - Run Script 2"),
+(@ENTRY_OLGA*100+1,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,11,@ENTRY_JACK,15,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Face Jack Adams"),
+(@ENTRY_OLGA*100+1,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Say Line 1"),
+(@ENTRY_OLGA*100+1,9,2,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,19,@ENTRY_JACK,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Set Data 1 1 Jack Adams"),
+(@ENTRY_OLGA*100+1,9,3,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Say Line 2"),
+(@ENTRY_OLGA*100+1,9,4,0,0,0,100,0,4000,4000,0,0,45,2,2,0,0,0,0,19,@ENTRY_JACK,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Set Data 2 2 Jack Adams"),
+(@ENTRY_OLGA,0,2,0,38,0,100,0,3,3,0,0,53,0,@ENTRY_OLGA*10,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Data 3 3 Set - Start WP 2"),
+
+(@ENTRY_JACK,0,0,0,1,0,100,1,0,0,0,0,5,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - Out of Combat - Start Dancing"),
+(@ENTRY_JACK,0,1,2,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Data 1 1 Set - Say Line 0"),
+(@ENTRY_JACK,0,2,0,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Data 1 1 Set - Set Faction 35"),
+(@ENTRY_JACK,0,3,4,62,0,100,0,@GOSSIP+10,0,0,0,56,34116,1,0,0,0,0,7,0,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Give Quest Item"),
+(@ENTRY_JACK,0,4,5,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Close Gossip"),
+(@ENTRY_JACK,0,5,6,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Remove Gossip Flag"), -- To prevent getting more than one item per event
+(@ENTRY_JACK,0,6,0,61,0,100,0,0,0,0,0,45,3,3,0,0,0,0,19,@ENTRY_OLGA,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Set Data Olga, the Scalawag Wench"),
+
+(@ENTRY_JACK,0,7,0,38,0,100,0,2,2,0,0,80,@ENTRY_JACK*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Data 2 2 Set - Run Script"),
+(@ENTRY_JACK*100,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Say Line 1"),
+(@ENTRY_JACK*100,9,1,0,0,0,100,0,0,0,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Stop Dancing"),
+(@ENTRY_JACK*100,9,2,0,0,0,100,0,2000,2000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - EMOTE_ONESHOT_KNEEL"),
+(@ENTRY_JACK*100,9,3,0,0,0,100,0,4000,4000,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - EMOTE_ONESHOT_EAT"),
+(@ENTRY_JACK*100,9,4,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Say Line 2"),
+(@ENTRY_JACK*100,9,5,0,0,0,100,0,4000,4000,0,0,11,43391,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Cast Vomit"),
+(@ENTRY_JACK*100,9,6,0,0,0,100,0,3000,3000,0,0,11,29266,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Cast Permanent Feign Death"),
+(@ENTRY_JACK*100,9,7,0,0,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Add Gossip Flag"),
+(@ENTRY_JACK*100,9,8,0,0,0,100,0,0,0,0,0,41,30000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Forced Despawn");
+
+-- Texts
+DELETE FROM `creature_text` WHERE `entry` IN (@ENTRY_OLGA,@ENTRY_JACK);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@ENTRY_OLGA,0,0,"Keep quiet, will you? If anyone catches on, we're both dead.",15,0,100,0,0,0,"Olga, the Scalawag Wench"),
+(@ENTRY_OLGA,1,0,"All right, fellas! Who ordered the spiced rum? Was it you, Jackie boy?",12,0,100,0,0,0,"Olga, the Scalawag Wench"),
+(@ENTRY_OLGA,2,0,"It's okay, sweetheart. This one's on the house.",12,0,100,0,0,0,"Olga, the Scalawag Wench"),
+
+(@ENTRY_JACK,0,0,"Sure thing, love. Put it on Harry's tab, will ya? He owes me a drink!",12,0,100,0,0,0,"Jack Adams"),
+(@ENTRY_JACK,1,0,"Free rum? Why... that's me favorite kind!",12,0,100,0,0,0,"Jack Adams"),
+(@ENTRY_JACK,2,0,"Sweet Neptulon! That was... one drink... too many!",12,0,100,0,0,0,"Jack Adams");
+
+-- Insert option menu
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIP,@GOSSIP+1,@GOSSIP+10);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`box_money`,`box_text`) VALUES
+(@GOSSIP+0,0,0,"I'd like to buy Jack a drink. Perhaps something... extra strong.",1,1,@GOSSIP+1,0,''),
+(@GOSSIP+1,0,0,"Here's a gold, buy yourself something nice.",1,1,0,10000,'Do you really want to bribe Olga?'),
+(@GOSSIP+10,0,0,"<Discreetly search the pirate's pockets for Taruk's payment.>",1,1,0,0,'');
+
+-- Waypoints for Olga, the Scalawag Wench
+DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY_OLGA,@ENTRY_OLGA*10);
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@ENTRY_OLGA,1,-89.466621,-3539.939941,7.715524,'Olga, the Scalawag Wench'),
+(@ENTRY_OLGA,2,-86.451447,-3544.374268,7.716601,'Olga, the Scalawag Wench'),
+
+(@ENTRY_OLGA*10,1,-86.451447,-3544.374268,7.716601,'Olga, the Scalawag Wench'),
+(@ENTRY_OLGA*10,2,-89.466621,-3539.939941,7.715524,'Olga, the Scalawag Wench');
+
+-- Only show first gossip if player is on quest Gambling Debt
+DELETE FROM `conditions` WHERE `SourceGroup` IN (@GOSSIP+0,@GOSSIP+10) AND `ConditionValue1` IN (@QUEST);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP+0,0,0,9,@QUEST,0,0,0,'',"Only show first gossip if player is on quest Gambling Debt"),
+
+(15,@GOSSIP+10,0,0,9,@QUEST,0,0,0,'',"Only show first gossip if player is on quest Gambling Debt");
diff --git a/sql/updates/world/2011_11_20_06_world_sai.sql b/sql/updates/world/2011_11_20_06_world_sai.sql
new file mode 100644
index 00000000000..68bffade858
--- /dev/null
+++ b/sql/updates/world/2011_11_20_06_world_sai.sql
@@ -0,0 +1,57 @@
+-- Tapper Swindlekeg SAI
+SET @ENTRY := 24711;
+SET @SPELL_GROW := 50551;
+SET @SPELL_DRINK := 50552;
+SET @SPELL_FINISH := 50555;
+SET @QUEST_DIRE_BREW := 12492;
+UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|2 WHERE `entry`=@ENTRY;
+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,20,0,100,0,@QUEST_DIRE_BREW,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tapper Swindlekeg - On Quest Complete - Run Script"),
+(@ENTRY*100+0,9,0,0,0,0,100,0,1500,1500,0,0,1,0,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 0"),
+(@ENTRY*100+0,9,1,0,0,0,100,0,0,0,0,0,11,@SPELL_DRINK,0,0,0,0,0,0,1,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Cast Questgiver Tries Dire Brew"),
+(@ENTRY*100+0,9,2,0,0,0,100,0,8500,8500,0,0,11,@SPELL_FINISH,0,0,0,0,0,0,1,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Cast Questgiver Finishes Drinking"),
+(@ENTRY*100+0,9,3,0,0,0,100,0,0,0,0,0,28,@SPELL_GROW,0,0,0,0,0,0,1,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Remove Growth Aura"),
+(@ENTRY*100+0,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 1"),
+(@ENTRY*100+0,9,5,0,0,0,100,0,3500,3500,0,0,1,2,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 2"),
+(@ENTRY*100+0,9,6,0,0,0,100,0,3500,3500,0,0,1,3,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 3");
+-- Text
+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,"Well time's money, and time's wasting! Let's have that drink...",12,0,100,1,0,0,"Tapper Swindlekeg"),
+(@ENTRY,1,0,"Wow! This really greases the steamplugs!",12,0,100,1,0,0,"Tapper Swindlekeg"),
+(@ENTRY,2,0,"If I were an honest goblin, I'd say this was the best beer of the festival...",12,0,100,1,0,0,"Tapper Swindlekeg"),
+(@ENTRY,3,0,"Too bad Coren's dead. If I could buy that brew from him and resell it - watered down and rebottled under my own label, of course - I'd be rich!",12,0,100,1,0,0,"Tapper Swindlekeg"),
+-- These three are used in areatrigger script
+(@ENTRY,4,0,"Hey there, and welcome to Brewfest. Come in and have a drink or three!",12,1,100,3,0,0,"Tapper Swindlekeg"),
+(@ENTRY,4,1,"What's up, friend? Welcome to the Brewfest Grounds! Now go buy some drinks!",12,1,100,3,0,0,"Tapper Swindlekeg"),
+(@ENTRY,4,2,"Hey hey, it's another $r! Welcome to my annual Brewfest celebration... now go feast and drink some!",12,1,100,3,0,0,"Tapper Swindlekeg");
+
+-- Ipfelkofer Ironkeg SAI
+SET @ENTRY := 24710;
+SET @SPELL_GROW := 50551;
+SET @SPELL_DRINK := 50552;
+SET @SPELL_FINISH := 50555;
+SET @QUEST_DIRE_BREW := 12491;
+UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|2 WHERE `entry`=@ENTRY;
+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,20,0,100,0,@QUEST_DIRE_BREW,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Quest Complete - Run Script"),
+(@ENTRY*100+0,9,0,0,0,0,100,0,1500,1500,0,0,1,0,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 0"),
+(@ENTRY*100+0,9,1,0,0,0,100,0,0,0,0,0,11,@SPELL_DRINK,0,0,0,0,0,0,1,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Cast Questgiver Tries Dire Brew"),
+(@ENTRY*100+0,9,2,0,0,0,100,0,8500,8500,0,0,11,@SPELL_FINISH,0,0,0,0,0,0,1,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Cast Questgiver Finishes Drinking"),
+(@ENTRY*100+0,9,3,0,0,0,100,0,0,0,0,0,28,@SPELL_GROW,0,0,0,0,0,0,1,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Remove Growth Aura"),
+(@ENTRY*100+0,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 1"),
+(@ENTRY*100+0,9,5,0,0,0,100,0,3500,3500,0,0,1,2,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 2"),
+(@ENTRY*100+0,9,6,0,0,0,100,0,3500,3500,0,0,1,3,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 3");
+-- Text
+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,"Right! Let's try this so-called dire brew...",12,0,100,0,0,0,"Ipfelkofer Ironkeg"),
+(@ENTRY,1,0,"Bronzebeard's beard! What a drink!",12,0,100,0,0,0,"Ipfelkofer Ironkeg"),
+(@ENTRY,2,0,"$N, this beer... well, it might be the best of Brewfest!",12,0,100,15,0,0,"Ipfelkofer Ironkeg"),
+(@ENTRY,3,0,"It is a shame Coren's Dire Brew can't quench more thirsting throats! It's blasphemy, I know, but I envy those Dark Iron dwarves!",12,0,100,274,0,0,"Ipfelkofer Ironkeg"),
+-- These three are used in areatrigger script
+(@ENTRY,4,0,"Ho there, and welcome to Brewfest!",12,7,100,3,0,0,"Ipfelkofer Ironkeg"),
+(@ENTRY,4,1,"Hello, friend! Welcome to the Brewfest Grounds!",12,7,100,3,0,0,"Ipfelkofer Ironkeg"),
+(@ENTRY,4,2,"Hail, good $c! Welcome to Ironforge's annual Brewfest celebration!",12,7,100,3,0,0,"Ipfelkofer Ironkeg");
diff --git a/sql/updates/world/2011_11_20_07_world_sai.sql b/sql/updates/world/2011_11_20_07_world_sai.sql
new file mode 100644
index 00000000000..efb89f6ba5a
--- /dev/null
+++ b/sql/updates/world/2011_11_20_07_world_sai.sql
@@ -0,0 +1,212 @@
+-- [Q] [A/H] Ring of Blood
+-- Gurghthock SAI
+SET @ENTRY_GURTHOCK := 18471;
+SET @ENTRY_BROKENTOE := 18398;
+SET @ENTRY_TWIN := 18399;
+SET @ENTRY_ROKDAR := 18400;
+SET @ENTRY_SKRAGATH := 18401;
+SET @ENTRY_WARMAUL := 18402;
+SET @ENTRY_MOGOR := 18069;
+SET @QUEST_BROKENTOE := 9962;
+SET @QUEST_BLUE_BROTHERS := 9967;
+SET @QUEST_ROKDAR := 9970;
+SET @QUEST_SKRAGATH := 9972;
+SET @QUEST_WARMAUL := 9973;
+SET @QUEST_MOGOR := 9977;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY_GURTHOCK;
+UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`SpecialFlags`=2 WHERE `entry` IN (@QUEST_BROKENTOE,@QUEST_BLUE_BROTHERS,@QUEST_ROKDAR,@QUEST_SKRAGATH,@QUEST_WARMAUL,@QUEST_MOGOR);
+DELETE FROM `quest_start_scripts` WHERE `id` IN (@QUEST_BROKENTOE,@QUEST_BLUE_BROTHERS,@QUEST_ROKDAR,@QUEST_SKRAGATH,@QUEST_WARMAUL,@QUEST_MOGOR);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_GURTHOCK,@ENTRY_GURTHOCK*100+0,@ENTRY_GURTHOCK*100+1,@ENTRY_GURTHOCK*100+2,@ENTRY_GURTHOCK*100+3,@ENTRY_GURTHOCK*100+4);
+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_GURTHOCK,0,0,1,19,0,100,0,@QUEST_BROKENTOE,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"),
+(@ENTRY_GURTHOCK,0,1,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+0,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"),
+(@ENTRY_GURTHOCK,0,2,3,19,0,100,0,@QUEST_BLUE_BROTHERS,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"),
+(@ENTRY_GURTHOCK,0,3,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"),
+(@ENTRY_GURTHOCK,0,4,5,19,0,100,0,@QUEST_ROKDAR,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"),
+(@ENTRY_GURTHOCK,0,5,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+2,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"),
+(@ENTRY_GURTHOCK,0,6,7,19,0,100,0,@QUEST_SKRAGATH,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"),
+(@ENTRY_GURTHOCK,0,7,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+3,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"),
+(@ENTRY_GURTHOCK,0,8,9,19,0,100,0,@QUEST_WARMAUL,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"),
+(@ENTRY_GURTHOCK,0,9,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+4,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"),
+(@ENTRY_GURTHOCK*100+0,9,0,0,0,0,100,0,13000,13000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 1"),
+(@ENTRY_GURTHOCK*100+0,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_BROKENTOE,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Brokentoe"),
+(@ENTRY_GURTHOCK*100+1,9,0,0,0,0,100,0,13000,13000,0,0,1,3,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 3"),
+(@ENTRY_GURTHOCK*100+1,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_TWIN,1,120000,0,0,0,8,0,0,0,-717.852356,7877.326660,45.547367,1.599185,"Gurghthock - On Script - Summon Murkblood Twin"),
+(@ENTRY_GURTHOCK*100+1,9,2,0,0,0,100,0,0,0,0,0,12,@ENTRY_TWIN,1,120000,0,0,0,8,0,0,0,-695.944275,7880.357910,47.097507,2.084561,"Gurghthock - On Script - Summon Murkblood Twin"),
+(@ENTRY_GURTHOCK*100+2,9,0,0,0,0,100,0,13000,13000,0,0,1,5,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 5"),
+(@ENTRY_GURTHOCK*100+2,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_ROKDAR,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Rokdar the Sundered Lord"),
+(@ENTRY_GURTHOCK*100+3,9,0,0,0,0,100,0,13000,13000,0,0,1,7,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 7"),
+(@ENTRY_GURTHOCK*100+3,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_SKRAGATH,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Skra'gath"),
+(@ENTRY_GURTHOCK*100+4,9,0,0,0,0,100,0,13000,13000,0,0,1,9,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 9"),
+(@ENTRY_GURTHOCK*100+4,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_WARMAUL,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Warmaul Champion"),
+(@ENTRY_GURTHOCK,0,10,11,19,0,100,0,@QUEST_MOGOR,0,0,0,1,11,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 11"),
+(@ENTRY_GURTHOCK,0,11,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@ENTRY_MOGOR,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Set Data Mogor"),
+(@ENTRY_GURTHOCK,0,12,0,38,0,100,0,10,10,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 2"), -- Brokentoe's death
+(@ENTRY_GURTHOCK,0,13,0,38,0,100,0,11,11,0,0,1,4,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 4"), -- Murkblood Twins death
+(@ENTRY_GURTHOCK,0,14,15,38,0,100,0,12,12,0,0,1,6,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 6"), -- Rokdar the Sundered Lord's death
+(@ENTRY_GURTHOCK,0,15,0,61,0,100,0,0,0,0,0,45,12,12,0,0,0,0,19,18069,0,0,0,0,0,0,"Gurghthock - On Data Set - Set Data Mogor"), -- Rokdar the Sundered Lord's death
+(@ENTRY_GURTHOCK,0,16,17,38,0,100,0,13,13,0,0,1,8,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 8"), -- Skra'gath's death
+(@ENTRY_GURTHOCK,0,17,0,61,0,100,0,0,0,0,0,45,13,13,0,0,0,0,19,18069,0,0,0,0,0,0,"Gurghthock - On Data Set - Set Data Mogor"), -- Skra'gath's death
+(@ENTRY_GURTHOCK,0,18,19,38,0,100,0,14,14,0,0,1,10,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 10"), -- Warmaul Champion's death
+(@ENTRY_GURTHOCK,0,19,0,61,0,100,0,0,0,0,0,45,14,14,0,0,0,0,19,18069,0,0,0,0,0,0,"Gurghthock - On Data Set - Set Data Mogor"); -- Warmaul Champion's death
+-- Text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000001,2000000002,2000000003,2000000102,2000000103,2000000104);
+DELETE FROM `creature_text` WHERE `entry`=@ENTRY_GURTHOCK;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@ENTRY_GURTHOCK,0,0,"Get in the Ring of Blood, $N. The fight is about to start!",12,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,1,0,"The battle is about to begin! $N versus the ferocious clefthoof, Brokentoe!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,2,0,"$N has defeated Brokentoe!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,3,0,"The battle is about to begin! The unmerciful Murkblood twins versus $N!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,4,0,"Unbelievable! $N has defeated the Murkblood Twins!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,5,0,"Hailing from the mountains of Blade's Edge comes Rokdar the Sundered Lord! $N is in for the fight of $g his:her; life.",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,6,0,"$N is victorious once more!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,7,0,"From parts unkown: Skra'gath! Can $N possibly survive the onslaught of void energies?",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,8,0,"$N is victorious once more!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,9,0,"This is the moment we've all been waiting for! The Warmaul champion is about to make $g his:her; first showing at the Ring of Blood in weeks! Will $N go down in defeat as easily as the champion's other opponents? We shall see...",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,10,0,"$N is victorious once more!",14,0,100,0,0,0,"Gurgthock"),
+(@ENTRY_GURTHOCK,11,0,"Mogor has challenged you. You have to accept! Get in the ring if you are ready to fight.",12,0,100,0,0,0,"Gurgthock");
+-- Mogor SAI
+SET @ENTRY := 18069;
+SET @QUEST := 9977;
+SET @SPELL_CHAIN_LIGHTNING := 16033;
+SET @SPELL_FLAME_SHOCK := 39529;
+SET @SPELL_HEALING_WAVE := 15982;
+SET @SPELL_FRENZY := 28747;
+SET @SPELL_REVIVE_SELF := 32343;
+UPDATE `creature_template` SET `AIName`="SmartAI",`faction_A`=35,`faction_H`=35 WHERE `entry`=@ENTRY;
+DELETE FROM `creature` WHERE `id`=@ENTRY;
+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
+(1022681,@ENTRY,530,1,1,0,0,-714.823,7931.65,58.8672,4.3693,300,0,0,60720,29330,0,0,0,0);
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*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
+(@ENTRY,0,0,0,0,0,100,0,1000,1000,3500,3500,11,@SPELL_CHAIN_LIGHTNING,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mogor - In Combat - Cast Chain Lightning"),
+(@ENTRY,0,1,0,0,0,100,0,4000,4000,11000,13000,11,@SPELL_FLAME_SHOCK,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mogor - In Combat - Cast Flame Shock"),
+(@ENTRY,0,2,0,2,0,100,1,0,60,0,0,11,@SPELL_HEALING_WAVE,1,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At 60% HP - Cast Healing Wave"),
+(@ENTRY,0,3,0,2,0,100,1,0,30,0,0,11,@SPELL_FRENZY,1,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At 30% HP - Cast Frenzy"),
+(@ENTRY,0,4,0,2,0,100,1,0,30,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Mogor - At 30% HP - Say Line 0"),
+(@ENTRY,0,5,0,6,0,100,1,0,0,0,0,80,@ENTRY*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Death - Run Script"),
+(@ENTRY*100+1,9,0,0,0,0,100,0,2000,2000,0,0,11,@SPELL_REVIVE_SELF,2,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Cast Revive Self"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,1000,1000,0,0,70,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Revive Self"),
+(@ENTRY*100+1,9,2,0,0,0,100,0,1000,1000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Say Line 5"),
+(@ENTRY*100+1,9,3,0,0,0,100,0,500,500,0,0,49,0,0,0,0,0,0,21,0,0,0,0,0,0,0,"Mogor - On Script - Attack Closest Player"),
+(@ENTRY,0,6,0,38,0,100,0,12,12,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 1"), -- Rokdar the Sundered Lord's death
+(@ENTRY,0,7,0,38,0,100,0,13,13,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 2"), -- Skra'gath's death
+(@ENTRY,0,8,0,38,0,100,0,14,14,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 6"), -- Warmaul Champion's death
+(@ENTRY,0,9,10,38,0,100,0,1,1,0,0,53,0,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Start WP"),
+(@ENTRY,0,10,0,61,0,100,0,0,0,0,0,1,3,0,0,0,0,0,7,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 3"),
+(@ENTRY,0,11,12,40,0,100,0,4,@ENTRY,0,0,54,100000,0,2,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At WP 4 - Pause Path"),
+(@ENTRY,0,12,0,61,0,100,0,0,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At WP 4 - Run Script"),
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Say Line 4"),
+(@ENTRY*100,9,1,0,0,0,100,0,5000,5000,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Set Faction Aggressive"),
+(@ENTRY*100,9,2,0,0,0,100,0,9,9,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Set React State Aggressive"),
+(@ENTRY,0,13,0,21,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - Reached Home - Set Faction Friendly"); -- To prevent issues =)
+-- Waypoints
+DELETE FROM `waypoints` WHERE `entry`=@ENTRY;
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+(@ENTRY,1,-715.036621,7922.948730,59.506184,"Mogor"),
+(@ENTRY,2,-720.282532,7916.268066,57.146416,"Mogor"),
+(@ENTRY,3,-724.706299,7909.140137,51.817696,"Mogor"),
+(@ENTRY,4,-717.016479,7896.937500,48.460430,"Mogor");
+-- Texts
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000001,2000000002,2000000003);
+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,"%s goes into a frenzy!",16,0,100,0,0,0,"Mogor"),
+(@ENTRY,1,0,"Dat was poop! Mogor could put up much better fight den dat!",14,0,100,0,0,0,"Mogor"),
+(@ENTRY,2,0,"Mogor not impressed! Skra'gath wuz made of da air and shadow! Soft like da squishy orcies!",14,0,100,0,0,0,"Mogor"),
+(@ENTRY,3,0,"Now you face da true champion! I give you chance to run away little one. Run away now before Mogor decim... destyor... Run away before Mogor KILL!",14,0,100,0,0,0,"Mogor"),
+(@ENTRY,4,0,"No more chances! Now you pay da ogre!",14,0,100,15,0,0,"Mogor"), -- ONESHOT_ROAR
+(@ENTRY,5,0,"No more nice ogre! You hurt Mogor!",14,0,100,0,0,0,"Mogor"),
+(@ENTRY,6,0,"WUT!? UNPOSSIBLE!! You fight Mogor now! Mogor destroy!",14,0,100,0,0,0,"Mogor");
+-- Brokentoe SAI
+SET @ENTRY := 18398;
+SET @QUEST := 9962;
+SET @SPELL_HOOF_STOMP := 32023;
+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
+(@ENTRY,0,0,0,0,0,100,0,1000,1000,9000,11000,11,@SPELL_HOOF_STOMP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Brokentoe - In Combat - Cast Hoof Stomp"),
+(@ENTRY,0,1,2,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Brokentoe - On Death - Give Quest Credit"),
+(@ENTRY,0,2,0,61,0,100,1,0,0,0,0,45,10,10,0,0,0,0,19,18471,0,0,0,0,0,0,"Brokentoe - On Death - Set Data Gurghthock");
+-- Murkblood Twin SAI
+SET @ENTRY := 18399;
+SET @QUEST := 9967;
+SET @SPELL_EVISCERATE := 15691;
+SET @SPELL_MUTILATE := 32319;
+SET @SPELL_SINISTER_STRIKE := 14873;
+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
+(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Murkblood Twin - On Aggro - Say Line 0"),
+(@ENTRY,0,1,0,0,0,100,0,1000,1000,2000,2000,11,@SPELL_SINISTER_STRIKE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Murkblood Twin - In Combat - Cast Sinister Strike"),
+(@ENTRY,0,2,0,0,0,100,0,5000,6000,11000,12000,11,@SPELL_EVISCERATE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Murkblood Twin - In Combat - Cast Eviscerate"),
+(@ENTRY,0,3,0,0,0,100,0,8000,9000,15000,16000,11,@SPELL_MUTILATE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Murkblood Twin - In Combat - Cast Gouge"),
+(@ENTRY,0,4,5,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Murkblood Twin - On Death - Give Quest Credit"),
+(@ENTRY,0,5,0,61,0,100,1,0,0,0,0,45,11,11,0,0,0,0,19,18471,0,0,0,0,0,0,"Murkblood Twin - On Death - Set Data Gurghthock");
+-- Texts
+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,"Blue brothers reign supreme!",12,0,100,0,0,0,"Murkblood Twin");
+-- Rokdar the Sundered Lord SAI
+SET @ENTRY := 18400;
+SET @QUEST := 9970;
+SET @SPELL_WAR_STOMP := 16727;
+SET @SPELL_PUNCTURE := 15976;
+SET @SPELL_KNOCK_AWAY := 31389;
+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
+(@ENTRY,0,0,0,1,0,100,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - Out of Combat - Say Line"),
+(@ENTRY,0,1,0,0,0,100,0,1000,1000,9000,11000,11,@SPELL_WAR_STOMP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - In Combat - Cast War Stomp"),
+(@ENTRY,0,2,0,31,0,100,0,@SPELL_KNOCK_AWAY,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - On Target Spellhit War Stomp - Say Line"),
+(@ENTRY,0,3,0,0,0,100,0,6000,6000,12000,12000,11,@SPELL_KNOCK_AWAY,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - In Combat - Cast Knock Away"),
+(@ENTRY,0,4,0,0,0,100,0,20000,20000,25000,25000,11,@SPELL_PUNCTURE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - In Combat - Cast Puncture"),
+(@ENTRY,0,5,6,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - On Death - Give Quest Credit"),
+(@ENTRY,0,6,0,61,0,100,1,0,0,0,0,45,12,12,0,0,0,0,19,18471,0,0,0,0,0,0,"Rokdar the Sundered Lord - On Death - Set Data Gurghthock");
+-- Texts
+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,"ROKDAR SMASH PUNY %t!",14,0,100,0,0,0,"Rokdar the Sundered Lord");
+-- Skra'gath SAI
+SET @ENTRY := 18401;
+SET @QUEST := 9972;
+SET @SPELL_DRAINING_TOUCH := 29299;
+SET @SPELL_SHADOW_BURST := 32324;
+UPDATE `creature_template` SET `AIName`='SmartAI' 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
+(@ENTRY,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_DRAINING_TOUCH,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skra'gath - Out of Combat - Cast Draining Touch"),
+(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Skra'gath - On Aggro - Say Line"),
+(@ENTRY,0,2,0,0,0,100,0,6000,6000,12000,12000,11,@SPELL_SHADOW_BURST,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skra'gath - In Combat - Cast Shadow Burst"),
+(@ENTRY,0,3,4,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Skra'gath - On Death - Give Quest Credit"),
+(@ENTRY,0,4,0,61,0,100,1,0,0,0,0,45,13,13,0,0,0,0,19,18471,0,0,0,0,0,0,"Skra'gath - On Death - Set Data Gurgthock");
+-- Texts
+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,"Closer... Come closer... See what the void brings!",14,0,100,0,0,0,"Skra'gath");
+-- Warmaul Champion SAI
+SET @ENTRY := 18402;
+SET @QUEST := 9973;
+SET @SPELL_BATTLE_SHOUT := 31403;
+SET @SPELL_CHARGE := 32323;
+SET @SPELL_MORTAL_STRIKE := 15708;
+SET @SPELL_SUNDERING_CLEAVE := 17963;
+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
+(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Warmaul Champion - On Aggro - Say Line"),
+(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,11,@SPELL_BATTLE_SHOUT,1,0,0,0,0,1,0,0,0,0,0,0,0,"Warmaul Champion - On Aggro - Cast Battle Shout"),
+(@ENTRY,0,2,0,9,0,100,1,5,30,1500,2000,11,@SPELL_CHARGE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Warmaul Champion - On Player Range - Cast Charge"),
+(@ENTRY,0,3,0,0,0,100,0,3000,4000,6000,7000,11,@SPELL_MORTAL_STRIKE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Warmaul Champion - In Combat - Cast Mortal Strike"),
+(@ENTRY,0,4,0,0,0,100,0,1000,1000,9000,11000,11,@SPELL_SUNDERING_CLEAVE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Warmaul Champion - In Combat - Cast Sundering Cleave"),
+(@ENTRY,0,4,5,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Warmaul Champion - On Death - Give Quest Credit"),
+(@ENTRY,0,5,0,61,0,100,1,0,0,0,0,45,14,14,0,0,0,0,19,18471,0,0,0,0,0,0,"Warmaul Champion - On Death - Set Data Gurgthock");
+-- Text
+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,"Piece by piece I will tear this challenger apart... PIECE BY PIECE!",14,0,100,0,0,0,"Warmaul Champion");
diff --git a/sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql b/sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..6e121274acb
--- /dev/null
+++ b/sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql
@@ -0,0 +1,5 @@
+-- G.N.E.R.D. Rage
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=3882;
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+(3882,5,48890,0,''), -- The aura
+(3882,16,324,0,''); -- Holiday must be active
diff --git a/sql/updates/world/2011_11_20_09_world_sai.sql b/sql/updates/world/2011_11_20_09_world_sai.sql
new file mode 100644
index 00000000000..8931a7084d9
--- /dev/null
+++ b/sql/updates/world/2011_11_20_09_world_sai.sql
@@ -0,0 +1,35 @@
+-- [Q] Maintaining Discipline
+
+-- Exhausted Vrykul SAI
+SET @ENTRY := 30146;
+SET @SPELL_DESPERATE_BLOW := 57395;
+SET @SPELL_DISCIPLINING_ROD := 42837;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100+0,@ENTRY*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
+(@ENTRY,0,0,0,1,0,100,0,0,0,0,0,90,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - Out of Combat - Set Bytes1 Sit"), -- Not doing this in creature_addon(_template) so that we can cancel this in SAI
+(@ENTRY,0,1,2,8,0,100,0,@SPELL_DISCIPLINING_ROD,0,0,0,87,@ENTRY*100+0,@ENTRY*100+1,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Spellhit - Run Random Script"),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Spellhit - Set Phase 1"), -- To prevent the same one to give more credits
+(@ENTRY*100+0,9,0,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Attack Player"),
+(@ENTRY*100+0,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Say Line 0 (random)"),
+(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Say Line 1 (random)"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,91,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Stand Up"),
+(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,5,233,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Emote Work"),
+(@ENTRY*100+1,9,3,0,0,0,100,0,0,0,0,0,33,29886,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Kill Credit"),
+(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,11,@SPELL_DESPERATE_BLOW,0,0,0,0,0,2,0,0,0,0,0,0,0,"Exhausted Vrykul - At 15% HP - Cast Desperate Blow");
+
+-- Texts
+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,"Curse you! You will not treat me like a beast!",12,0,100,1,0,0,"Exhausted Vrykul"),
+(@ENTRY,0,1,"Enough! I will teach you some manners, wench!",12,0,100,1,0,0,"Exhausted Vrykul"),
+(@ENTRY,0,2,"I'd rather die fighting than live like a slave!",12,0,100,1,0,0,"Exhausted Vrykul"),
+
+(@ENTRY,1,0,"Back... to work...",12,0,100,1,0,0,"Exhausted Vrykul"),
+(@ENTRY,1,1,"We will have revenge... some day.",12,0,100,1,0,0,"Exhausted Vrykul"),
+(@ENTRY,1,2,"You treat us worse than animals!",12,0,100,1,0,0,"Exhausted Vrykul");
+
+-- Captive Vrykul should be mining
+DELETE FROM `creature_template_addon` WHERE `entry`=29427;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (29427,0,0,1,233,NULL);
diff --git a/sql/updates/world/2011_11_20_10_world_sai.sql b/sql/updates/world/2011_11_20_10_world_sai.sql
new file mode 100644
index 00000000000..b56fd826e95
--- /dev/null
+++ b/sql/updates/world/2011_11_20_10_world_sai.sql
@@ -0,0 +1,55 @@
+-- [Q] [A/H] The Skettis Offensive
+-- Defender Grashna SAI
+SET @ENTRY := 22373;
+SET @QUEST := 10879;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`SpecialFlags`=2 WHERE `entry`=@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,"Defender Grashna - On Quest Accept - Run Script"),
+-- Wave one - no text
+(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+-- Wave two
+(@ENTRY*100,9,2,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Script - Say Line 0"),
+(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+-- Wave three
+(@ENTRY*100,9,5,0,0,0,100,0,30000,30000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Script - Say Line 1"),
+(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+(@ENTRY*100,9,7,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+(@ENTRY*100,9,8,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"),
+-- Wave four
+(@ENTRY*100,9,9,0,0,0,100,0,30000,30000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Script - Say Line 2"),
+(@ENTRY*100,9,10,0,0,0,100,0,0,0,0,0,12,22375,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Avatar of Terokk"),
+(@ENTRY,0,1,0,38,0,100,0,1,1,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Data Set - Say Line 3");
+-- Text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000022,2000000023,2000000024,2000000025);
+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,"More Minions of Terokk are coming!",12,0,100,0,0,0,"Defender Grashna"),
+(@ENTRY,1,0,"The invaders persist! Hold them off!",12,0,100,0,0,0,"Defender Grashna"),
+(@ENTRY,2,0,"An Avatar of Terokk!! To arms!",12,0,100,0,0,0,"Defender Grashna"),
+(@ENTRY,3,0,"The Avatar of Terokk has been defeated! Death to Terokk! Death to Skettis!",12,0,100,0,0,0,"Defender Grashna");
+-- Minion of Terokk SAI
+SET @ENTRY := 22376;
+SET @SPELL_SCREECH := 38021;
+UPDATE `creature_template` SET `AIName`='SmartAI' 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
+(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-1647.329956,5443.410156,-40.911999,2.254425,"Minion of Terokk - Just Summoned - Move To Pos"),
+(@ENTRY,0,1,0,0,0,100,1,3000,4000,8000,8000,11,@SPELL_SCREECH,0,0,0,0,0,2,0,0,0,0,0,0,0,"Minion of Terokk - In Combat - Cast Terrifying Screech");
+-- Avatar of Terokk SAI
+SET @ENTRY := 22375;
+SET @SPELL_CHARGE := 24193;
+SET @SPELL_FEATHER_BURST := 39068;
+UPDATE `creature_template` SET `AIName`='SmartAI' 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
+(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-1641.118652,5436.648926,-43.344521,0.803601,"Avatar of Terokk - Just Summoned - Move To Pos"),
+(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-1641.118652,5436.648926,-43.344521,0.803601,"Avatar of Terokk - Just Summoned - Move To Pos"),
+(@ENTRY,0,2,3,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,6546,0,0,0,0,0,0,"Avatar of Terokk - On Death - Set Data Defender Grashna"),
+(@ENTRY,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,"Avatar of Terokk - On Death - Quest Credit"),
+(@ENTRY,0,4,0,4,0,100,1,0,0,0,0,11,@SPELL_CHARGE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Avatar of Terokk - On Aggro - Cast Charge"),
+(@ENTRY,0,5,0,0,0,100,0,6000,9000,11000,14000,11,@SPELL_FEATHER_BURST,0,0,0,0,0,2,0,0,0,0,0,0,0,"Avatar of Terokk - In Combat - Cast Feather Burst");
diff --git a/sql/updates/world/2011_11_20_11_world_sai.sql b/sql/updates/world/2011_11_20_11_world_sai.sql
new file mode 100644
index 00000000000..a05b26e6831
--- /dev/null
+++ b/sql/updates/world/2011_11_20_11_world_sai.sql
@@ -0,0 +1,9 @@
+-- [Q] A Carver and a Croaker
+
+-- Scalawag Frog SAI
+SET @ENTRY := 26503;
+UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=`npcflag`|1,`IconName`='LootAll' 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
+(@ENTRY,0,0,1,64,0,100,0,0,0,0,0,56,35803,1,0,0,0,0,7,0,0,0,0,0,0,0,"Scalawag Frog - Gossip Hello - Create Item Scalawag Frog"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scalawag Frog - Gossip Hello - Force Despawn");
diff --git a/sql/updates/world/2011_11_20_12_world_sai.sql b/sql/updates/world/2011_11_20_12_world_sai.sql
new file mode 100644
index 00000000000..527db0e02e7
--- /dev/null
+++ b/sql/updates/world/2011_11_20_12_world_sai.sql
@@ -0,0 +1,30 @@
+-- [Q] Rivenwood Captives
+
+-- Riven Widow Cocoon SAI
+SET @ENTRY := 24210;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `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
+(@ENTRY,0,0,1,6,0,25,0,0,0,0,0,12,24211,2,8000,0,0,0,1,0,0,0,0,0,0,0,"Riven Widow Cocoon - On Death - Summon Freed Winterhoof Longrunner (25%)"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,24211,0,0,0,0,0,7,0,0,0,0,0,0,0,"Riven Widow Cocoon - On Death - Quest Credit");
+
+-- Freed Winterhoof Longrunner SAI
+SET @ENTRY := 24211;
+UPDATE `creature_template` SET `AIName`='SmartAI' 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
+(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Freed Winterhoof Longrunner - Just Summoned - Say Line 0"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Freed Winterhoof Longrunner - Just Summoned - Forced Desoawn");
+
+-- Texts
+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,"Blessings of the spirits of the land and air upon you.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,1,"I must return. Good hunting to you.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,2,"I owe you a life debt, stranger.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,3,"Strange ghosts walk the land. Be careful!",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,4,"Thank you, stranger.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,5,"They took us one by one. I'm sure there are other survivors.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,6,"We should never have traveled through the Rivenwood. Everyone knows this!",12,0,100,1,0,0,"Freed Winterhoof Longrunner"),
+(@ENTRY,0,7,"You saved me from certain death. I owe you.",12,0,100,1,0,0,"Freed Winterhoof Longrunner");
diff --git a/sql/updates/world/2011_11_20_13_world_sai.sql b/sql/updates/world/2011_11_20_13_world_sai.sql
new file mode 100644
index 00000000000..c4cd10912a3
--- /dev/null
+++ b/sql/updates/world/2011_11_20_13_world_sai.sql
@@ -0,0 +1,15 @@
+-- [Q] Elixir of Pain
+-- Stanley SAI
+SET @ENTRY := 2274;
+SET @QUEST := 502;
+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
+(@ENTRY,0,0,0,20,0,100,0,@QUEST,0,0,0,36,2275,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stanley - On Quest Complete - Update Entry");
+-- Enraged Standley SAI
+SET @ENTRY := 2275;
+UPDATE `creature_template` SET `AIName`='SmartAI' 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
+(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,0,0,0,0,0,0,0,"Enraged Standley - Just Summoned - Attack Closest Player");
diff --git a/sql/updates/world/2011_11_20_14_world_revert.sql b/sql/updates/world/2011_11_20_14_world_revert.sql
new file mode 100644
index 00000000000..067c750b694
--- /dev/null
+++ b/sql/updates/world/2011_11_20_14_world_revert.sql
@@ -0,0 +1,4 @@
+-- revert 2011_11_20_11_world_sai.sql
+SET @ENTRY := 26503;
+UPDATE `creature_template` SET `AIName`='',`npcflag`=`npcflag`&~1,`IconName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`= @ENTRY AND `source_type`=0;
diff --git a/sql/updates/world/2011_11_20_15_world_sai.sql b/sql/updates/world/2011_11_20_15_world_sai.sql
new file mode 100644
index 00000000000..8e0b4141379
--- /dev/null
+++ b/sql/updates/world/2011_11_20_15_world_sai.sql
@@ -0,0 +1,41 @@
+-- [Q] [A/H] Cleansing of the Orb of Orahil
+-- [Q] [A/H] Mana Surges
+-- Tabetha SAI
+SET @ENTRY := 6546;
+SET @QUEST_CLEANSING := 4961;
+SET @QUEST_MANA_SURGE := 1957;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `entry` IN (@QUEST_CLEANSING,@QUEST_MANA_SURGE);
+DELETE FROM `quest_start_scripts` WHERE `id` IN (@QUEST_CLEANSING,@QUEST_MANA_SURGE);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3) 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
+(@ENTRY,0,0,0,19,0,100,0,@QUEST_CLEANSING,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Quest Accept - Run Script"),
+(@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,"Tabetha - On Script - Say Line 0"),
+(@ENTRY*100,9,1,0,0,0,100,0,2000,2000,0,0,11,9097,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Script - Cast Summon Demon of the Orb"),
+
+(@ENTRY,0,1,0,20,0,100,0,@QUEST_MANA_SURGE,0,0,0,9,0,0,0,0,0,0,14,28294,103680,0,0,0,0,0,"Tabetha - On Quest Complete - Deactivate Mana Rift (GO)"), -- Make it stop being visual
+(@ENTRY,0,2,3,19,0,100,0,@QUEST_MANA_SURGE,0,0,0,9,0,0,0,0,0,0,14,28294,103680,0,0,0,0,0,"Tabetha - On Quest Accept - Activate Mana Rift (GO)"),
+(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,87,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Quest Accept - Run Random Script"),
+(@ENTRY,0,4,0,38,0,100,0,1,1,0,0,87,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Data Set - Run Random Script"),
+(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.22,-3383.91,38.2265,2.7963,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.22,-3383.91,38.2265,2.7963,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.22,-3383.91,38.2265,2.7963,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+2,9,0,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.99,-3394.54,38.5507,1.8342,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+2,9,1,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.99,-3394.54,38.5507,1.8342,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+3,9,0,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4013.29,-3385.14,38.4656,2.3801,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+3,9,1,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4013.29,-3385.14,38.4656,2.3801,"Tabetha - On Random Script - Summon Mana Surge"),
+(@ENTRY*100+3,9,2,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4013.29,-3385.14,38.4656,2.3801,"Tabetha - On Random Script - Summon Mana Surge");
+-- Text
+DELETE FROM `db_script_string` WHERE `entry`=2000000032;
+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,"Grid yourself, $N. The demon in this orb is a fel beast.",12,0,100,0,0,0,"Tabetha");
+-- Mana Surge SAI
+SET @ENTRY := 6550;
+SET @SPELL_SHOCK := 11824;
+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
+(@ENTRY,0,0,0,54,0,100,1,0,0,0,0,89,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mana Surge - On Just Summoned - Set Random Movement"),
+(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,6546,0,0,0,0,0,0,"Mana Surge - On Death - Set Data Tabetha"),
+(@ENTRY,0,2,0,0,0,100,0,3000,4000,8000,8000,11,@SPELL_SHOCK,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mana Surge - In Combat - Cast Shock');
diff --git a/sql/updates/world/2011_11_21_00_world_db_errors.sql b/sql/updates/world/2011_11_21_00_world_db_errors.sql
new file mode 100644
index 00000000000..d3ae6fb197b
--- /dev/null
+++ b/sql/updates/world/2011_11_21_00_world_db_errors.sql
@@ -0,0 +1,11 @@
+UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=11054;
+UPDATE `conditions` SET `SourceTypeOrReferenceId`=17 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47305 AND `ConditionTypeOrReference`=20;
+UPDATE `conditions` SET `SourceTypeOrReferenceId`=18, `SourceEntry`=36732, `ConditionTypeOrReference`=24 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47305 AND `ConditionTypeOrReference`=18;
+UPDATE `smart_scripts` SET `target_param1`=35 WHERE `entryorguid`=2275 AND `source_type`=0 AND `id`=0;
+UPDATE `smart_scripts` SET `target_param1`=35 WHERE `entryorguid`=1806901 AND `source_type`=9 AND `id`=3;
+
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000102, 2000000103, 2000000104);
+INSERT INTO `db_script_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
+(2000000102,'Oh, darn...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(2000000103,'Ok, let''s get started!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(2000000104,'... oops.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
diff --git a/sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql b/sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql
new file mode 100644
index 00000000000..7083107a8c2
--- /dev/null
+++ b/sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql
@@ -0,0 +1 @@
+UPDATE `achievement_reward` SET `item`=44810, `sender`=28951, `subject`='A Gobbler not yet Gobbled', `text` = 'Can you believe this Plump Turkey made it through November alive?$B$BSince all this friends have been served up on Bountiful Tables with sides of Cranberry Chutney and Spice Bread Stuffing and... ooo... I''m getting hungry. But anyhow! He''s all alone, now, so I was hoping you might be willing to take care of him. There simply isn''t enough room left in my shop!$B$BJust keep him away from cooking fires, please. He gets this strange look in his eyes around them...' WHERE `entry` IN (3478,3656); -- Pilgrim achievement (A/H)
diff --git a/sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql b/sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql
new file mode 100644
index 00000000000..589dbb0b2a4
--- /dev/null
+++ b/sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql
@@ -0,0 +1,11 @@
+-- Achievement: Turkey Lurkey
+DELETE FROM `achievement_criteria_data` WHERE `type`=2 AND `criteria_id` IN (11158,11159,11160,11161,11162,11163,11164,11165);
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`) VALUES
+(11158, 2, 4, 1), -- Human Rogue
+(11159, 2, 4, 4), -- Night Elf Rogue
+(11160, 2, 4, 2), -- Orc Rogue
+(11161, 2, 4, 8), -- Troll Rogue
+(11162, 2, 4, 5), -- Undead Rogue
+(11163, 2, 4, 10), -- Blood Elf Rogue
+(11164, 2, 4, 3), -- Dwarf Rogue
+(11165, 2, 4, 7); -- Gnome Rogue
diff --git a/sql/updates/world/2011_11_21_03_pilgrim_misc.sql b/sql/updates/world/2011_11_21_03_pilgrim_misc.sql
new file mode 100644
index 00000000000..ff58b61cb87
--- /dev/null
+++ b/sql/updates/world/2011_11_21_03_pilgrim_misc.sql
@@ -0,0 +1,145 @@
+-- Misc stuffz
+UPDATE `npc_text` SET `WDBVerified`=12340 WHERE `ID`=14648; -- "A Bountiful Table is laid out..."
+
+-- Template updates
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=3, `unit_flags`=33536 WHERE `entry`=34654; -- Bountiful Feast Hostess
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`unit_flags`=33536 WHERE `entry`=34678; -- Dokin Farplain
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34684; -- Laha Farplain
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`speed_run`=1 WHERE `entry`=35343; -- Bountiful Barrel
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34685; -- Dalni Tallgrass
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`speed_run`=1 WHERE `entry`=35342; -- Bountiful Barrel
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=83,`unit_flags`=33536 WHERE `entry`=34713; -- Ondani Greatmill
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34787; -- John Rigsdale
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=83,`unit_flags`=33536 WHERE `entry`=34786; -- Alice Rigsdale
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`unit_flags`=33536 WHERE `entry`=34677; -- Miles Standish
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=83,`unit_flags`=33536 WHERE `entry`=34712; -- Roberta Carter
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34683; -- Rose Standish
+UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`speed_run`=1 WHERE `entry`=35341; -- Bountiful Barrel
+
+UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34819; -- The Stuffing Chair
+UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34824; -- The Sweet Potato Chair
+UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34823; -- The Cranberry Chair
+UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34812; -- The Turkey Chair
+UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34822; -- The Pie Chair
+
+UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29330; -- Bountiful Feast Hostess
+UPDATE `creature_model_info` SET `bounding_radius`=0.9747,`combat_reach`=4.05,`gender`=0 WHERE `modelid`=29339; -- Dokin Farplain
+UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=0,`gender`=0 WHERE `modelid`=29775; -- Bountiful Barrel
+UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29342; -- Laha Farplain
+UPDATE `creature_model_info` SET `bounding_radius`=1.6,`combat_reach`=0,`gender`=2 WHERE `modelid`=29205; -- Chairs
+UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29397; -- Dalni Tallgrass
+UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29401; -- Ondani Greatmill
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=29428; -- John Rigsdale
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=29427; -- Alice Rigsdale
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=29338; -- Miles Standish
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=29365; -- Roberta Carter
+UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=29340; -- Rose Standish
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (34654,34678,35343,34684,34819,34824,34823,34812,34822,34685,35342,34713,34787,34786,34677,34712,34683,35341);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(34654,0,0,1,0, NULL), -- Bountiful Feast Hostess
+(34678,0,0,2,0, NULL), -- Dokin Farplain
+(35343,0,0,1,0, NULL), -- Bountiful Barrel (TB)
+(34684,0,0,1,0, NULL), -- Laha Farplain
+(34685,0,0,1,0, NULL), -- Dalni Tallgrass
+(35342,0,0,1,0, NULL), -- Bountiful Barrel (OG)
+(34713,0,0,2,0, NULL), -- Ondani Greatmill
+(34787,0,0,1,0, NULL), -- John Rigsdale
+(34786,0,0,2,0, NULL), -- Alice Rigsdale
+(34677,0,0,2,0, NULL), -- Miles Standish
+(34712,0,0,2,0, NULL), -- Roberta Carter
+(34683,0,0,1,0, NULL), -- Rose Standish
+(35341,0,0,1,0, NULL), -- Bountiful Barrel
+(34819,0,0,1,0, '61795'), -- The Stuffing Chair (Stuffing Server)
+(34824,0,0,1,0, '61797'), -- The Sweet Potato Chair (Sweet Potatoes Server)
+(34823,0,0,1,0, '61793'), -- The Cranberry Chair (Cranberry Server)
+(34812,0,0,1,0, '61796'), -- The Turkey Chair (Turkey Server)
+(34822,0,0,1,0, '61794'); -- The Pie Chair (Pie Server)
+
+-- Vehicles
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (34819,34824,34823,34812,34822);
+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
+(34819, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Stuffing Chair (Ride Vehicle)
+(34824, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Sweet Potato Chair (Ride Vehicle)
+(34823, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Cranberry Chair (Ride Vehicle)
+(34812, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Turkey Chair (Ride Vehicle)
+(34822, 65403, 0, 0, 0, 1, 0, 0, 0); -- The Pie Chair (Ride Vehicle)
+
+-- Gossips
+UPDATE `creature_template` SET `gossip_menu_id`=10575 WHERE `entry`=34654; -- Bountiful Feast Hostess
+DELETE FROM `gossip_menu` WHERE `entry`=10575 AND `text_id`=14633;
+DELETE FROM `gossip_menu` WHERE `entry`=10589 AND `text_id`=14648;
+INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
+(10575, 14633),
+(10589, 14648);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=10575 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
+(10575, 0, 0, 'How do the Bountiful Tables work?', 1, 1, 10589, 0, 0, 0, NULL);
+
+-- Vendor tables
+UPDATE `item_template` SET `BuyCount`=5 WHERE `entry` IN (44835,44853,46797,46793,46796); -- Autumnal Herbs, Honey, Mulgore Sweet Potato, Tangy Southfury Cranberries, Ripe Tirisfal Pumpkin
+DELETE FROM `npc_vendor` WHERE `entry` IN (35343,34684,35342,34685,34787,35341,34683);
+INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `ExtendedCost`) VALUES
+-- 35343 (Bountiful Barrel)
+(35343, 1, 46810, 0, 0), -- Bountiful Cookbook
+(35343, 2, 46797, 0, 0), -- Mulgore Sweet Potato
+(35343, 3, 44835, 0, 0), -- Autumnal Herbs
+(35343, 4, 44853, 0, 0), -- Honey
+(35343, 5, 159, 0, 0), -- Refreshing Spring Water
+(35343, 6, 2678, 0, 0), -- Mild Spices
+(35343, 7, 30817, 0, 0), -- Simple Flour
+(35343, 8, 46888, 0, 0), -- Bountiful Basket
+-- 34684 (Laha Farplain)
+(34684, 1, 46810, 0, 0), -- Bountiful Cookbook
+(34684, 2, 46797, 0, 0), -- Mulgore Sweet Potato
+(34684, 3, 44835, 0, 0), -- Autumnal Herbs
+(34684, 4, 44853, 0, 0), -- Honey
+(34684, 5, 159, 0, 0), -- Refreshing Spring Water
+(34684, 6, 2678, 0, 0), -- Mild Spices
+(34684, 7, 30817, 0, 0), -- Simple Flour
+(34684, 8, 46888, 0, 0), -- Bountiful Basket
+-- 35342 (Bountiful Barrel)
+(35342, 1, 46810, 0, 0), -- Bountiful Cookbook
+(35342, 2, 46793, 0, 0), -- Tangy Southfury Cranberries
+(35342, 3, 44835, 0, 0), -- Autumnal Herbs
+(35342, 4, 44853, 0, 0), -- Honey
+(35342, 5, 159, 0, 0), -- Refreshing Spring Water
+(35342, 6, 2678, 0, 0), -- Mild Spices
+(35342, 7, 30817, 0, 0), -- Simple Flour
+(35342, 8, 46888, 0, 0), -- Bountiful Basket
+-- 34685 (Dalni Tallgrass)
+(34685, 1, 46810, 0, 0), -- Bountiful Cookbook
+(34685, 2, 46793, 0, 0), -- Tangy Southfury Cranberries
+(34685, 3, 44835, 0, 0), -- Autumnal Herbs
+(34685, 4, 44853, 0, 0), -- Honey
+(34685, 5, 159, 0, 0), -- Refreshing Spring Water
+(34685, 6, 2678, 0, 0), -- Mild Spices
+(34685, 7, 30817, 0, 0), -- Simple Flour
+(34685, 8, 46888, 0, 0), -- Bountiful Basket
+-- 34787 (John Rigsdale)
+(34787, 1, 46810, 0, 0), -- Bountiful Cookbook
+(34787, 2, 44835, 0, 0), -- Autumnal Herbs
+(34787, 3, 44853, 0, 0), -- Honey
+(34787, 4, 159, 0, 0), -- Refreshing Spring Water
+(34787, 5, 2678, 0, 0), -- Mild Spices
+(34787, 6, 30817, 0, 0), -- Simple Flour
+(34787, 7, 46888, 0, 0), -- Bountiful Basket
+-- 35341 (Bountiful Barrel)
+(35341, 1, 46810, 0, 0), -- Bountiful Cookbook
+(35341, 2, 46796, 0, 0), -- Ripe Tirisfal Pumpkin
+(35341, 3, 44835, 0, 0), -- Autumnal Herbs
+(35341, 4, 44853, 0, 0), -- Honey
+(35341, 5, 159, 0, 0), -- Refreshing Spring Water
+(35341, 6, 2678, 0, 0), -- Mild Spices
+(35341, 7, 30817, 0, 0), -- Simple Flour
+(35341, 8, 46888, 0, 0), -- Bountiful Basket
+-- 34683 (Rose Standish)
+(34683, 1, 46810, 0, 0), -- Bountiful Cookbook
+(34683, 2, 46796, 0, 0), -- Ripe Tirisfal Pumpkin
+(34683, 3, 44835, 0, 0), -- Autumnal Herbs
+(34683, 4, 44853, 0, 0), -- Honey
+(34683, 5, 159, 0, 0), -- Refreshing Spring Water
+(34683, 6, 2678, 0, 0), -- Mild Spices
+(34683, 7, 30817, 0, 0), -- Simple Flour
+(34683, 8, 46888, 0, 0); -- Bountiful Basket \ No newline at end of file
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 1b0800e48ae..7b2ad044eb9 100755
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -27,6 +27,7 @@
#include "AuthSocket.h"
#include "AuthCodes.h"
#include "SHA1.h"
+#include "openssl/crypto.h"
#define ChunkSize 2048
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h
index 0dc597e98bc..cb6158e94eb 100755
--- a/src/server/collision/BoundingIntervalHierarchy.h
+++ b/src/server/collision/BoundingIntervalHierarchy.h
@@ -88,6 +88,7 @@ class BIH
{
if (primitives.empty())
return;
+
buildData dat;
dat.maxPrims = leafSize;
dat.numPrims = primitives.size();
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index 55aad9bb029..118ae098c25 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -362,6 +362,7 @@ namespace VMAP
{
if (triangles.empty())
return false;
+
GModelRayCallback callback(triangles, vertices);
meshTree.intersectRay(ray, callback, distance, stopAtFirstHit);
return callback.hit;
@@ -470,6 +471,7 @@ namespace VMAP
{
if (groupModels.empty())
return false;
+
WModelAreaCallback callback(groupModels, down);
groupTree.intersectPoint(p, callback);
if (callback.hit != groupModels.end())
@@ -488,6 +490,7 @@ namespace VMAP
{
if (groupModels.empty())
return false;
+
WModelAreaCallback callback(groupModels, down);
groupTree.intersectPoint(p, callback);
if (callback.hit != groupModels.end())
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 5a0c199a4c0..e009bf9d12a 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -180,7 +180,7 @@ void PetAI::UpdateAI(const uint32 diff)
if (!spellUsed)
delete spell;
}
- else if (me->getVictim() && _CanAttack(me->getVictim()) && spellInfo->CanBeUsedInCombat())
+ else if (me->getVictim() && CanAttack(me->getVictim()) && spellInfo->CanBeUsedInCombat())
{
Spell* spell = new Spell(me, spellInfo, TRIGGERED_NONE, 0);
if (spell->CanAutoCast(me->getVictim()))
@@ -290,7 +290,7 @@ void PetAI::AttackStart(Unit* target)
// Overrides Unit::AttackStart to correctly evaluate Pet states
// Check all pet states to decide if we can attack this target
- if (!_CanAttack(target))
+ if (!CanAttack(target))
return;
targetHasCC = _CheckTargetCC(target);
@@ -440,7 +440,7 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
}
}
-bool PetAI::_CanAttack(Unit* target)
+bool PetAI::CanAttack(Unit* target)
{
// Evaluates wether a pet can attack a specific
// target based on CommandState, ReactState and other flags
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index 9f0472cfe4d..8d72b34cf8f 100755
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -57,7 +57,7 @@ class PetAI : public CreatureAI
Unit* SelectNextTarget();
void HandleReturnMovement();
void DoAttack(Unit* target, bool chase);
- bool _CanAttack(Unit* target);
+ bool CanAttack(Unit* target);
bool _CheckTargetCC(Unit* target);
};
#endif
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 62d7a1f4f58..be0dd8c3679 100755
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -1177,9 +1177,8 @@ inline Unit* CreatureEventAI::GetTargetByType(uint32 target, Unit* actionInvoker
Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff)
{
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* unit = NULL;
@@ -1199,9 +1198,8 @@ Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff)
void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
{
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::FriendlyCCedInRange u_check(me, range);
@@ -1209,14 +1207,13 @@ void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
- cell.Visit(p, grid_creature_searcher, *me->GetMap());
+ cell.Visit(p, grid_creature_searcher, *me->GetMap(), *me, range);
}
void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid)
{
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::FriendlyMissingBuffInRange u_check(me, range, spellid);
@@ -1224,7 +1221,7 @@ void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, flo
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
- cell.Visit(p, grid_creature_searcher, *me->GetMap());
+ cell.Visit(p, grid_creature_searcher, *me->GetMap(), *me, range);
}
// *********************************
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 2322e88d105..953bbf7521a 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -363,16 +363,15 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float minimumRange)
{
Player* player = NULL;
- CellPair pair(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord pair(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::PlayerAtMinimumRangeAway check(me, minimumRange);
Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway> searcher(me, player, check);
TypeContainerVisitor<Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway>, GridTypeMapContainer> visitor(searcher);
- cell.Visit(pair, visitor, *(me->GetMap()));
+ cell.Visit(pair, visitor, *me->GetMap(), *me, minimumRange);
return player;
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index cdea190dfbc..06c1570ccd9 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -218,7 +218,7 @@ void npc_escortAI::UpdateAI(uint32 const diff)
if (m_bCanReturnToStart)
{
float fRetX, fRetY, fRetZ;
- me->GetRespawnCoord(fRetX, fRetY, fRetZ);
+ me->GetRespawnPosition(fRetX, fRetY, fRetZ);
me->GetMotionMaster()->MovePoint(POINT_HOME, fRetX, fRetY, fRetZ);
@@ -493,7 +493,7 @@ void npc_escortAI::SetEscortPaused(bool on)
bool npc_escortAI::SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
{
- me->SetPosition(x, y, z, orientation);
+ me->UpdatePosition(x, y, z, orientation);
return SetNextWaypoint(pointId, false, true);
}
@@ -516,7 +516,7 @@ bool npc_escortAI::SetNextWaypoint(uint32 pointId, bool setPosition, bool resetW
if (waypoint.id == pointId)
{
if (setPosition)
- me->SetPosition(waypoint.x, waypoint.y, waypoint.z, me->GetOrientation());
+ me->UpdatePosition(waypoint.x, waypoint.y, waypoint.z, me->GetOrientation());
CurrentWP = WaypointList.begin();
return true;
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 0b77dd03e87..afa7e9c2932 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -450,12 +450,14 @@ void SmartAI::EnterEvadeMode()
{
AddEscortState(SMART_ESCORT_RETURNING);
ReturnToLastOOCPos();
- } else if (mFollowGuid){
+ }
+ else if (mFollowGuid)
+ {
if (Unit* target = me->GetUnit(*me, mFollowGuid))
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
- } else {
- me->GetMotionMaster()->MoveTargetedHome();
}
+ else
+ me->GetMotionMaster()->MoveTargetedHome();
Reset();
}
@@ -705,12 +707,24 @@ void SmartAI::SetRun(bool run)
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
else
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
+ me->SendMovementFlagUpdate();
mRun = run;
}
void SmartAI::SetFly(bool fly)
{
+ if (fly)
+ {
+ me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
+ }
+ else
+ {
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
+ }
me->SetFlying(fly);
+ me->SendMovementFlagUpdate();
}
void SmartAI::SetSwim(bool swim)
@@ -719,6 +733,7 @@ void SmartAI::SetSwim(bool swim)
me->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
else
me->RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
+ me->SendMovementFlagUpdate();
}
void SmartAI::sGossipHello(Player* player)
@@ -781,8 +796,8 @@ void SmartAI::SetFollow(Unit* target, float dist, float angle, uint32 credit, ui
return;
SetRun(mRun);
mFollowGuid = target->GetGUID();
- mFollowDist = dist;
- mFollowAngle = angle;
+ mFollowDist = dist ? dist : PET_FOLLOW_DIST;
+ mFollowAngle = angle ? angle : me->GetFollowAngle();
mFollowArrivedTimer = 1000;
mFollowCredit = credit;
mFollowArrivedEntry = end;
@@ -902,13 +917,13 @@ class SmartTrigger : public AreaTriggerScript
{
public:
- SmartTrigger()
- : AreaTriggerScript("SmartTrigger")
- {
- }
+ SmartTrigger() : AreaTriggerScript("SmartTrigger") {}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
+ if (!player->isAlive())
+ return false;
+
sLog->outDebug(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(NULL, trigger);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 54c69080c41..29340660435 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -32,6 +32,7 @@
#include "SmartAI.h"
#include "Group.h"
#include "Vehicle.h"
+#include "ScriptedGossip.h"
SmartScript::SmartScript()
{
@@ -139,6 +140,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ObjectList* targets = GetTargets(e, unit);
Creature* talker = me;
+ Player* targetPlayer = NULL;
if (targets)
{
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
@@ -148,14 +150,26 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
talker = (*itr)->ToCreature();
break;
}
+ else if (IsPlayer((*itr)))
+ {
+ targetPlayer = (*itr)->ToPlayer();
+ break;
+ }
}
delete targets;
}
+
mTalkerEntry = talker->GetEntry();
mLastTextID = e.action.talk.textGroupID;
mTextTimer = e.action.talk.duration;
- mTextGUID = IsPlayer(GetLastInvoker()) ? GetLastInvoker()->GetGUID() : 0;//invoker, used for $vars in texts
+ if (IsPlayer(GetLastInvoker())) // used for $vars in texts and whisper target
+ mTextGUID = GetLastInvoker()->GetGUID();
+ else if (targetPlayer)
+ mTextGUID = targetPlayer->GetGUID();
+ else
+ mTextGUID = 0;
+
mUseTextTimer = true;
sCreatureTextMgr->SendChat(talker, uint8(e.action.talk.textGroupID), mTextGUID);
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (GuidLow: %u), textGuid: %u",
@@ -210,7 +224,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- if (IsPlayer(*itr))
+ if (IsUnit(*itr))
{
(*itr)->SendPlaySound(e.action.sound.sound, e.action.sound.range > 0 ? true : false);
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (GuidLow: %u), sound: %u, onlyself: %u",
@@ -1323,7 +1337,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsCreature(*itr))
(*itr)->ToCreature()->Respawn();
else if (IsGameObject(*itr))
- (*itr)->ToGameObject()->SetRespawnTime(e.action.RespawnTarget.GoRespawnTime);
+ (*itr)->ToGameObject()->SetRespawnTime(e.action.RespawnTarget.goRespawnTime);
}
delete targets;
@@ -1458,28 +1472,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
case SMART_ACTION_CALL_SCRIPT_RESET:
OnReset();
break;
- case SMART_ACTION_ENTER_VEHICLE:
- {
- if (!me)
- return;
-
- ObjectList* targets = GetTargets(e, unit);
- if (!targets)
- return;
-
- for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
- {
- if (IsUnit(*itr) && (*itr)->ToUnit()->GetVehicleKit())
- {
- me->EnterVehicle((*itr)->ToUnit(), e.action.enterVehicle.seat);
- delete targets;
- return;
- }
- }
-
- delete targets;
- break;
- }
case SMART_ACTION_CALL_TIMED_ACTIONLIST:
{
if (e.GetTargetType() == SMART_TARGET_NONE)
@@ -1781,7 +1773,38 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
case SMART_ACTION_JUMP_TO_POS:
{
+ if (!me)
+ return;
+
+ me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz);
+ // TODO: Resume path when reached jump location
+ break;
+ }
+ case SMART_ACTION_SEND_GOSSIP_MENU:
+ {
+ if (!GetBaseObject())
+ return;
+
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossip_option_id %d",
+ e.action.sendGossipMenu.gossipMenuId, e.action.sendGossipMenu.gossipOptionId);
+
+ ObjectList* targets = GetTargets(e, unit);
+ if (!targets)
+ return;
+
+ for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
+ if (Player* player = (*itr)->ToPlayer())
+ {
+ if (e.action.sendGossipMenu.gossipMenuId)
+ player->PrepareGossipMenu(GetBaseObject(), e.action.sendGossipMenu.gossipMenuId, true);
+ else
+ player->PlayerTalkClass->ClearMenus();
+
+ player->SEND_GOSSIP_MENU(e.action.sendGossipMenu.gossipOptionId, GetBaseObject()->GetGUID());
+ }
+
+ delete targets;
break;
}
default:
@@ -2122,6 +2145,16 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
l->push_back(target);
break;
}
+ case SMART_TARGET_CLOSEST_PLAYER:
+ {
+ if (me)
+ {
+ Player* target = me->SelectNearestPlayer((float)e.target.playerDistance.dist);
+ if (target)
+ l->push_back(target);
+ }
+ break;
+ }
case SMART_TARGET_OWNER_OR_SUMMONER:
{
if (me)
@@ -2608,6 +2641,19 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
if (e.timer < diff)
{
+ // delay spell cast event if another spell is being casted
+ if (e.GetActionType() == SMART_ACTION_CAST)
+ {
+ if (!(e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS))
+ {
+ if (me && me->HasUnitState(UNIT_STAT_CASTING))
+ {
+ e.timer = 1;
+ return;
+ }
+ }
+ }
+
e.active = true;//activate events with cooldown
switch (e.GetEventType())//process ONLY timed events
{
@@ -2877,10 +2923,11 @@ uint32 SmartScript::DoChat(int8 id, uint64 whisperGuid)
Unit* SmartScript::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
{
- if (!me) return NULL;
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ if (!me)
+ return NULL;
+
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* unit = NULL;
@@ -2896,10 +2943,11 @@ Unit* SmartScript::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
void SmartScript::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
{
- if (!me) return;
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ if (!me)
+ return;
+
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::FriendlyCCedInRange u_check(me, range);
@@ -2907,15 +2955,16 @@ void SmartScript::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
- cell.Visit(p, grid_creature_searcher, *me->GetMap());
+ cell.Visit(p, grid_creature_searcher, *me->GetMap(), *me, range);
}
void SmartScript::DoFindFriendlyMissingBuff(std::list<Creature*>& list, float range, uint32 spellid)
{
- if (!me) return;
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ if (!me)
+ return;
+
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::FriendlyMissingBuffInRange u_check(me, range, spellid);
@@ -2923,7 +2972,7 @@ void SmartScript::DoFindFriendlyMissingBuff(std::list<Creature*>& list, float ra
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
- cell.Visit(p, grid_creature_searcher, *me->GetMap());
+ cell.Visit(p, grid_creature_searcher, *me->GetMap(), *me, range);
}
void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry)
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index aa4eeb602c0..7ebe8ca500f 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -155,33 +155,31 @@ class SmartScript
{
GameObject* gameObject = NULL;
- CellPair p(Trinity::ComputeCellPair(searchObject->GetPositionX(), searchObject->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::GameObjectWithDbGUIDCheck goCheck(*searchObject, guid);
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(searchObject, gameObject, goCheck);
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > objectChecker(checker);
- cell.Visit(p, objectChecker, *searchObject->GetMap());
+ cell.Visit(p, objectChecker, *searchObject->GetMap(), *searchObject, searchObject->GetGridActivationRange());
return gameObject;
}
Creature* FindCreatureNear(WorldObject* searchObject, uint32 guid) const
{
- Creature* crea = NULL;
- CellPair p(Trinity::ComputeCellPair(searchObject->GetPositionX(), searchObject->GetPositionY()));
+ Creature* creature = NULL;
+ CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::CreatureWithDbGUIDCheck target_check(searchObject, guid);
- Trinity::CreatureSearcher<Trinity::CreatureWithDbGUIDCheck> checker(searchObject, crea, target_check);
+ Trinity::CreatureSearcher<Trinity::CreatureWithDbGUIDCheck> checker(searchObject, creature, target_check);
TypeContainerVisitor<Trinity::CreatureSearcher <Trinity::CreatureWithDbGUIDCheck>, GridTypeMapContainer > unit_checker(checker);
- cell.Visit(p, unit_checker, *searchObject->GetMap());
+ cell.Visit(p, unit_checker, *searchObject->GetMap(), *searchObject, searchObject->GetGridActivationRange());
- return crea;
+ return creature;
}
ObjectListMap* mTargetStorage;
@@ -224,7 +222,7 @@ class SmartScript
}
void DecPhase(int32 p = 1) { mEventPhase -= (mEventPhase < (uint32)p ? (uint32)p - mEventPhase : (uint32)p); }
- bool IsInPhase(uint32 p) const { return mEventPhase & p; }
+ bool IsInPhase(uint32 p) const { return (1 << (mEventPhase - 1)) & p; }
void SetPhase(uint32 p = 0) { mEventPhase = p; }
SmartAIEventList mEvents;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index fab2a6b7722..fc3db7a0fe6 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -158,7 +158,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
continue;
}
- }else
+ }
+ else
{
if (!sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid))))
{
@@ -166,6 +167,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
continue;
}
}
+
temp.source_type = source_type;
temp.event_id = fields[2].GetUInt16();
temp.link = fields[3].GetUInt16();
@@ -224,41 +226,50 @@ void SmartAIMgr::LoadSmartAIFromDB()
bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
{
if (e.GetActionType() == SMART_ACTION_INSTALL_AI_TEMPLATE)
- return true; //AI template has special handling
+ return true; // AI template has special handling
switch (e.GetTargetType())
{
case SMART_TARGET_CREATURE_DISTANCE:
case SMART_TARGET_CREATURE_RANGE:
+ {
+ if (e.target.unitDistance.creature && !sObjectMgr->GetCreatureTemplate(e.target.unitDistance.creature))
{
- if (e.target.unitDistance.creature && !sObjectMgr->GetCreatureTemplate(e.target.unitDistance.creature))
- {
- sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
- return false;
- }
- break;
+ sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
+ return false;
}
+ break;
+ }
case SMART_TARGET_GAMEOBJECT_DISTANCE:
case SMART_TARGET_GAMEOBJECT_RANGE:
+ {
+ if (e.target.goDistance.entry && !sObjectMgr->GetGameObjectTemplate(e.target.goDistance.entry))
{
- if (e.target.goDistance.entry && !sObjectMgr->GetGameObjectTemplate(e.target.goDistance.entry))
- {
- sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
- return false;
- }
- break;
+ sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
+ return false;
}
+ break;
+ }
case SMART_TARGET_CREATURE_GUID:
- {
- if (e.target.unitGUID.entry && !IsCreatureValid(e, e.target.unitGUID.entry)) return false;
- break;
- }
+ {
+ if (e.target.unitGUID.entry && !IsCreatureValid(e, e.target.unitGUID.entry)) return false;
+ break;
+ }
case SMART_TARGET_GAMEOBJECT_GUID:
+ {
+ if (e.target.goGUID.entry && !IsGameObjectValid(e, e.target.goGUID.entry)) return false;
+ break;
+ }
+ case SMART_TARGET_PLAYER_DISTANCE:
+ case SMART_TARGET_CLOSEST_PLAYER:
+ {
+ if (e.target.playerDistance.dist == 0)
{
- if (e.target.goGUID.entry && !IsGameObjectValid(e, e.target.goGUID.entry)) return false;
- break;
+ sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ return false;
}
+ break;
+ }
case SMART_TARGET_PLAYER_RANGE:
- case SMART_TARGET_PLAYER_DISTANCE:
case SMART_TARGET_SELF:
case SMART_TARGET_VICTIM:
case SMART_TARGET_HOSTILE_SECOND_AGGRO:
@@ -268,12 +279,11 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_ACTION_INVOKER:
case SMART_TARGET_POSITION:
case SMART_TARGET_NONE:
- case SMART_TARGET_CLOSEST_CREATURE:
- case SMART_TARGET_CLOSEST_GAMEOBJECT:
- case SMART_TARGET_CLOSEST_PLAYER:
case SMART_TARGET_ACTION_INVOKER_VEHICLE:
case SMART_TARGET_OWNER_OR_SUMMONER:
case SMART_TARGET_THREAT_LIST:
+ case SMART_TARGET_CLOSEST_GAMEOBJECT:
+ case SMART_TARGET_CLOSEST_CREATURE:
break;
default:
sLog->outErrorDb("SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -394,7 +404,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
break;
case SMART_EVENT_ACCEPTED_QUEST:
case SMART_EVENT_REWARD_QUEST:
- if (!IsQuestValid(e, e.event.quest.quest)) return false;
+ if (e.event.quest.quest && !IsQuestValid(e, e.event.quest.quest))
+ return false;
break;
case SMART_EVENT_RECEIVE_EMOTE:
{
@@ -526,7 +537,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
break;
case SMART_ACTION_SOUND:
- if (!IsSoundValid(e, e.action.sound.sound)) return false;
+ if (!IsSoundValid(e, e.action.sound.sound))
+ return false;
if (e.action.sound.range > TEXT_RANGE_WORLD)
{
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range);
@@ -539,7 +551,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
break;
case SMART_ACTION_FAIL_QUEST:
case SMART_ACTION_ADD_QUEST:
- if (e.action.quest.quest && !IsQuestValid(e, e.action.quest.quest)) return false;
+ if (!e.action.quest.quest || !IsQuestValid(e, e.action.quest.quest)) return false;
break;
case SMART_ACTION_ACTIVATE_TAXI:
{
@@ -755,7 +767,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_RESET_SCRIPT_BASE_OBJECT:
case SMART_ACTION_ACTIVATE_GOBJECT:
case SMART_ACTION_CALL_SCRIPT_RESET:
- case SMART_ACTION_ENTER_VEHICLE:
case SMART_ACTION_NONE:
case SMART_ACTION_CALL_TIMED_ACTIONLIST:
case SMART_ACTION_SET_NPC_FLAG:
@@ -775,6 +786,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_ADD_DYNAMIC_FLAG:
case SMART_ACTION_REMOVE_DYNAMIC_FLAG:
case SMART_ACTION_JUMP_TO_POS:
+ case SMART_ACTION_SEND_GOSSIP_MENU:
break;
default:
sLog->outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 327d03d31ff..ba986ae310d 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -387,7 +387,7 @@ enum SMART_ACTION
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, SpellId
SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid
- SMART_ACTION_FOLLOW = 29, // Distance, Angle, EndCreatureEntry, credit, creditType (0monsterkill, 1event)
+ SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event)
SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
SMART_ACTION_RESET_GOBJECT = 32, //
@@ -439,7 +439,7 @@ enum SMART_ACTION
SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
SMART_ACTION_RESET_SCRIPT_BASE_OBJECT = 77, // none
SMART_ACTION_CALL_SCRIPT_RESET = 78, // none
- SMART_ACTION_ENTER_VEHICLE = 79, // seatID
+ // Unused = 79,
SMART_ACTION_CALL_TIMED_ACTIONLIST = 80, // ID (overwrites already running actionlist), stop after combat?(0/1), timer update type(0-OOC, 1-IC, 2-ALWAYS)
SMART_ACTION_SET_NPC_FLAG = 81, // Flags
SMART_ACTION_ADD_NPC_FLAG = 82, // Flags
@@ -450,20 +450,17 @@ enum SMART_ACTION
SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST = 87, // script9 ids 1-9
SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST = 88, // script9 id min, max
SMART_ACTION_RANDOM_MOVE = 89, // maxDist
-
SMART_ACTION_SET_UNIT_FIELD_BYTES_1 = 90, // bytes, target
SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1 = 91, // bytes, target
-
SMART_ACTION_INTERRUPT_SPELL = 92,
-
SMART_ACTION_SEND_GO_CUSTOM_ANIM = 93, // anim id
-
SMART_ACTION_SET_DYNAMIC_FLAG = 94, // Flags
SMART_ACTION_ADD_DYNAMIC_FLAG = 95, // Flags
SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, // Flags
SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ
+ SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId
- SMART_ACTION_END = 98,
+ SMART_ACTION_END = 99,
};
struct SmartAction
@@ -859,8 +856,14 @@ struct SmartAction
struct
{
- uint32 GoRespawnTime;
+ uint32 goRespawnTime;
} RespawnTarget;
+
+ struct
+ {
+ uint32 gossipMenuId;
+ uint32 gossipOptionId;
+ } sendGossipMenu;
struct
{
@@ -906,9 +909,9 @@ enum SMARTAI_TARGETS
SMART_TARGET_INVOKER_PARTY = 16, // invoker's party members
SMART_TARGET_PLAYER_RANGE = 17, // min, max
SMART_TARGET_PLAYER_DISTANCE = 18, // maxDist
- SMART_TARGET_CLOSEST_CREATURE = 19, // CreatureEntry(0any)
- SMART_TARGET_CLOSEST_GAMEOBJECT = 20, // entry(0any)
- SMART_TARGET_CLOSEST_PLAYER = 21, // none
+ SMART_TARGET_CLOSEST_CREATURE = 19, // CreatureEntry(0any), maxDist, dead?
+ SMART_TARGET_CLOSEST_GAMEOBJECT = 20, // entry(0any), maxDist
+ SMART_TARGET_CLOSEST_PLAYER = 21, // maxDist
SMART_TARGET_ACTION_INVOKER_VEHICLE = 22, // Unit's vehicle who caused this Event to occur
SMART_TARGET_OWNER_OR_SUMMONER = 23, // Unit's owner or summoner
SMART_TARGET_THREAT_LIST = 24, // All units on creature's threat list
@@ -1124,7 +1127,7 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] =
{SMART_EVENT_JUST_CREATED, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_GOSSIP_HELLO, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
{SMART_EVENT_FOLLOW_COMPLETED, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_DUMMY_EFFECT, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_DUMMY_EFFECT, SMART_SCRIPT_TYPE_MASK_SPELL },
{SMART_EVENT_IS_BEHIND_TARGET, SMART_SCRIPT_TYPE_MASK_CREATURE }
};
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index fca4df12587..8967446f199 100755
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -46,8 +46,8 @@ namespace Trinity
class AchievementChatBuilder
{
public:
- AchievementChatBuilder(Player const& pl, ChatMsg msgtype, int32 textId, uint32 ach_id)
- : i_player(pl), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
+ AchievementChatBuilder(Player const& player, ChatMsg msgtype, int32 textId, uint32 ach_id)
+ : i_player(player), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -666,10 +666,9 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
// if player is in world he can tell his friends about new achievement
else if (GetPlayer()->IsInWorld())
{
- CellPair p = Trinity::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED, achievement->ID);
diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h
index df5631c5bc6..7f66565622f 100755
--- a/src/server/game/Achievements/AchievementMgr.h
+++ b/src/server/game/Achievements/AchievementMgr.h
@@ -244,7 +244,7 @@ class WorldPacket;
class AchievementMgr
{
public:
- AchievementMgr(Player* pl);
+ AchievementMgr(Player* player);
~AchievementMgr();
void Reset();
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 45f41eebd26..b9fb5a13980 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -391,8 +391,8 @@ void ArenaTeam::Roster(WorldSession* session)
data << uint32(itr->PersonalRating); // personal rating
if (unk308)
{
- data << float(0.0); // 308 unk
- data << float(0.0); // 308 unk
+ data << float(0.0f); // 308 unk
+ data << float(0.0f); // 308 unk
}
}
@@ -433,8 +433,8 @@ void ArenaTeam::NotifyStatsChanged()
// This is called after a rated match ended
// Updates arena team stats for every member of the team (not only the ones who participated!)
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(itr->Guid))
- SendStats(plr->GetSession());
+ if (Player* player = ObjectAccessor::FindPlayer(itr->Guid))
+ SendStats(player->GetSession());
}
void ArenaTeam::Inspect(WorldSession* session, uint64 guid)
@@ -455,17 +455,17 @@ void ArenaTeam::Inspect(WorldSession* session, uint64 guid)
session->SendPacket(&data);
}
-void ArenaTeamMember::ModifyPersonalRating(Player* plr, int32 mod, uint32 slot)
+void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slot)
{
if (int32(PersonalRating) + mod < 0)
PersonalRating = 0;
else
PersonalRating += mod;
- if (plr)
+ if (player)
{
- plr->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, PersonalRating);
- plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, slot);
+ player->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, PersonalRating);
+ player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, slot);
}
}
@@ -716,16 +716,16 @@ int32 ArenaTeam::LostAgainst(uint32 Own_MMRating, uint32 Opponent_MMRating, int3
return mod;
}
-void ArenaTeam::MemberLost(Player* plr, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange)
+void ArenaTeam::MemberLost(Player* player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange)
{
// Called for each participant of a match after losing
for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)
{
- if (itr->Guid == plr->GetGUID())
+ if (itr->Guid == player->GetGUID())
{
// Update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
- itr->ModifyPersonalRating(plr, mod, GetSlot());
+ itr->ModifyPersonalRating(player, mod, GetSlot());
// Update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
@@ -735,8 +735,8 @@ void ArenaTeam::MemberLost(Player* plr, uint32 againstMatchmakerRating, int32 Ma
itr->SeasonGames +=1;
// update the unit fields
- plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->WeekGames);
- plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_SEASON, itr->SeasonGames);
+ player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->WeekGames);
+ player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_SEASON, itr->SeasonGames);
return;
}
}
@@ -764,16 +764,16 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, i
}
}
-void ArenaTeam::MemberWon(Player* plr, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange)
+void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange)
{
// called for each participant after winning a match
for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)
{
- if (itr->Guid == plr->GetGUID())
+ if (itr->Guid == player->GetGUID())
{
// update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, true);
- itr->ModifyPersonalRating(plr, mod, GetSlot());
+ itr->ModifyPersonalRating(player, mod, GetSlot());
// update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
@@ -784,8 +784,8 @@ void ArenaTeam::MemberWon(Player* plr, uint32 againstMatchmakerRating, int32 Mat
itr->SeasonWins += 1;
itr->WeekWins += 1;
// update unit fields
- plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->WeekGames);
- plr->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_SEASON, itr->SeasonGames);
+ player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->WeekGames);
+ player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_SEASON, itr->SeasonGames);
return;
}
}
@@ -800,7 +800,7 @@ void ArenaTeam::UpdateArenaPointsHelper(std::map<uint32, uint32>& playerPoints)
return;
// To get points, a player has to participate in at least 30% of the matches
- uint32 requiredGames = (uint32) ceil(Stats.WeekGames * 0.3);
+ uint32 requiredGames = (uint32)ceil(Stats.WeekGames * 0.3f);
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
{
diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
index 4f013f72e5c..dce8c5776b7 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.h
+++ b/src/server/game/Battlegrounds/ArenaTeam.h
@@ -97,7 +97,7 @@ struct ArenaTeamMember
uint16 PersonalRating;
uint16 MatchMakerRating;
- void ModifyPersonalRating(Player* plr, int32 mod, uint32 slot);
+ void ModifyPersonalRating(Player* player, int32 mod, uint32 slot);
void ModifyMatchmakerRating(int32 mod, uint32 slot);
};
@@ -172,9 +172,9 @@ class ArenaTeam
int32 GetRatingMod(uint32 ownRating, uint32 opponentRating, bool won);
float GetChanceAgainst(uint32 ownRating, uint32 opponentRating);
int32 WonAgainst(uint32 Own_MMRating, uint32 Opponent_MMRating, int32& rating_change);
- void MemberWon(Player* plr, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange);
+ void MemberWon(Player* player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange);
int32 LostAgainst(uint32 Own_MMRating, uint32 Opponent_MMRating, int32& rating_change);
- void MemberLost(Player* plr, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange = -12);
+ void MemberLost(Player* player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange = -12);
void OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange = -12);
void UpdateArenaPointsHelper(std::map<uint32, uint32> & PlayerPoints);
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index ce555b3c503..b2842025127 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -75,7 +75,7 @@ namespace Trinity
data << uint64(target_guid);
data << uint32(strlen(text) + 1);
data << text;
- data << uint8 (_source ? _source->chatTag() : uint8(0));
+ data << uint8 (_source ? _source->GetChatTag() : 0);
}
ChatMsg _msgtype;
@@ -108,7 +108,7 @@ namespace Trinity
data << uint64(target_guid);
data << uint32(strlen(str) + 1);
data << str;
- data << uint8 (_source ? _source->chatTag() : uint8(0));
+ data << uint8 (_source ? _source->GetChatTag() : uint8(0));
}
private:
@@ -124,8 +124,8 @@ template<class Do>
void Battleground::BroadcastWorker(Do& _do)
{
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
- _do(plr);
+ if (Player* player = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
+ _do(player);
}
Battleground::Battleground()
@@ -333,13 +333,13 @@ inline void Battleground::_ProcessRessurect(uint32 diff)
Creature* sh = NULL;
for (std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
{
- Player* plr = ObjectAccessor::FindPlayer(*itr2);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(*itr2);
+ if (!player)
continue;
- if (!sh && plr->IsInWorld())
+ if (!sh && player->IsInWorld())
{
- sh = plr->GetMap()->GetCreature(itr->first);
+ sh = player->GetMap()->GetCreature(itr->first);
// only for visual effect
if (sh)
// Spirit Heal, effect 117
@@ -347,7 +347,7 @@ inline void Battleground::_ProcessRessurect(uint32 diff)
}
// Resurrection visual
- plr->CastSpell(plr, SPELL_RESURRECTION_VISUAL, true);
+ player->CastSpell(player, SPELL_RESURRECTION_VISUAL, true);
m_ResurrectQueue.push_back(*itr2);
}
(itr->second).clear();
@@ -364,12 +364,12 @@ inline void Battleground::_ProcessRessurect(uint32 diff)
{
for (std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr)
{
- Player* plr = ObjectAccessor::FindPlayer(*itr);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(*itr);
+ if (!player)
continue;
- plr->ResurrectPlayer(1.0f);
- plr->CastSpell(plr, 6962, true);
- plr->CastSpell(plr, SPELL_SPIRIT_HEAL_MANA, true);
+ player->ResurrectPlayer(1.0f);
+ player->CastSpell(player, 6962, true);
+ player->CastSpell(player, SPELL_SPIRIT_HEAL_MANA, true);
sObjectAccessor->ConvertCorpseForPlayer(*itr);
}
m_ResurrectQueue.clear();
@@ -429,15 +429,15 @@ inline void Battleground::_ProcessJoin(uint32 diff)
{
m_ResetStatTimer = 0;
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
- plr->ResetAllPowers();
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
+ player->ResetAllPowers();
}
if (!(m_Events & BG_STARTING_EVENT_1))
{
m_Events |= BG_STARTING_EVENT_1;
- if(!FindBgMap())
+ if (!FindBgMap())
{
sLog->outError("Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
EndNow();
@@ -484,19 +484,19 @@ inline void Battleground::_ProcessJoin(uint32 diff)
{
// TODO : add arena sound PlaySoundToAll(SOUND_ARENA_START);
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
{
// BG Status packet
WorldPacket status;
BattlegroundQueueTypeId bgQueueTypeId = sBattlegroundMgr->BGQueueTypeId(m_TypeID, GetArenaType());
- uint32 queueSlot = plr->GetBattlegroundQueueIndex(bgQueueTypeId);
+ uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&status, this, queueSlot, STATUS_IN_PROGRESS, 0, GetStartTime(), GetArenaType());
- plr->GetSession()->SendPacket(&status);
+ player->GetSession()->SendPacket(&status);
- plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
- plr->ResetAllPowers();
+ player->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
+ player->ResetAllPowers();
// remove auras with duration lower than 30s
- Unit::AuraApplicationMap & auraMap = plr->GetAppliedAuras();
+ Unit::AuraApplicationMap & auraMap = player->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();)
{
AuraApplication * aurApp = iter->second;
@@ -506,7 +506,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
&& aurApp->IsPositive()
&& (!(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
&& (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY)))
- plr->RemoveAura(iter);
+ player->RemoveAura(iter);
else
++iter;
}
@@ -519,10 +519,10 @@ inline void Battleground::_ProcessJoin(uint32 diff)
PlaySoundToAll(SOUND_BG_START);
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
{
- plr->RemoveAurasDueToSpell(SPELL_PREPARATION);
- plr->ResetAllPowers();
+ player->RemoveAurasDueToSpell(SPELL_PREPARATION);
+ player->ResetAllPowers();
}
// Announce BG starting
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE))
@@ -788,28 +788,28 @@ void Battleground::EndBattleground(uint32 winner)
continue;
}
- Player* plr = _GetPlayer(itr, "EndBattleground");
- if (!plr)
+ Player* player = _GetPlayer(itr, "EndBattleground");
+ if (!player)
continue;
// should remove spirit of redemption
- if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
- plr->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
+ if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
+ player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- if (!plr->isAlive())
+ if (!player->isAlive())
{
- plr->ResurrectPlayer(1.0f);
- plr->SpawnCorpseBones();
+ player->ResurrectPlayer(1.0f);
+ player->SpawnCorpseBones();
}
else
{
//needed cause else in av some creatures will kill the players at the end
- plr->CombatStop();
- plr->getHostileRefManager().deleteReferences();
+ player->CombatStop();
+ player->getHostileRefManager().deleteReferences();
}
//this line is obsolete - team is set ALWAYS
- //if (!team) team = plr->GetTeam();
+ //if (!team) team = player->GetTeam();
// per player calculation
if (isArena() && isRated() && winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team)
@@ -817,57 +817,57 @@ void Battleground::EndBattleground(uint32 winner)
if (team == winner)
{
// update achievement BEFORE personal rating update
- ArenaTeamMember* member = winner_arena_team->GetMember(plr->GetGUID());
+ ArenaTeamMember* member = winner_arena_team->GetMember(player->GetGUID());
if (member)
- plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->PersonalRating);
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->PersonalRating);
- winner_arena_team->MemberWon(plr, loser_matchmaker_rating, winner_matchmaker_change);
+ winner_arena_team->MemberWon(player, loser_matchmaker_rating, winner_matchmaker_change);
}
else
{
- loser_arena_team->MemberLost(plr, winner_matchmaker_rating, loser_matchmaker_change);
+ loser_arena_team->MemberLost(player, winner_matchmaker_rating, loser_matchmaker_change);
// Arena lost => reset the win_rated_arena having the "no_lose" condition
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, ACHIEVEMENT_CRITERIA_CONDITION_NO_LOSE);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, ACHIEVEMENT_CRITERIA_CONDITION_NO_LOSE);
}
}
- uint32 winner_kills = plr->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST;
- uint32 loser_kills = plr->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;
- uint32 winner_arena = plr->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
+ uint32 winner_kills = player->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST;
+ uint32 loser_kills = player->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;
+ uint32 winner_arena = player->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
// Reward winner team
if (team == winner)
{
if (IsRandom() || BattlegroundMgr::IsBGWeekend(GetTypeID()))
{
- UpdatePlayerScore(plr, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));
+ UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));
if (CanAwardArenaPoints())
- plr->ModifyArenaPoints(winner_arena);
- if (!plr->GetRandomWinner())
- plr->SetRandomWinner(true);
+ player->ModifyArenaPoints(winner_arena);
+ if (!player->GetRandomWinner())
+ player->SetRandomWinner(true);
}
- plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, 1);
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, 1);
}
else
{
if (IsRandom() || BattlegroundMgr::IsBGWeekend(GetTypeID()))
- UpdatePlayerScore(plr, SCORE_BONUS_HONOR, GetBonusHonorFromKill(loser_kills));
+ UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(loser_kills));
}
- plr->ResetAllPowers();
- plr->CombatStopWithPets(true);
+ player->ResetAllPowers();
+ player->CombatStopWithPets(true);
- BlockMovement(plr);
+ BlockMovement(player);
sBattlegroundMgr->BuildPvpLogDataPacket(&data, this);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
- sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, plr->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime(), GetArenaType());
- plr->GetSession()->SendPacket(&data);
- plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime(), GetArenaType());
+ player->GetSession()->SendPacket(&data);
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
}
if (isArena() && isRated() && winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team)
@@ -908,9 +908,9 @@ uint32 Battleground::GetBattlemasterEntry() const
}
}
-void Battleground::BlockMovement(Player* plr)
+void Battleground::BlockMovement(Player* player)
{
- plr->SetClientControl(plr, 0); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave()
+ player->SetClientControl(player, 0); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave()
}
void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPacket)
@@ -936,32 +936,32 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
RemovePlayerFromResurrectQueue(guid);
- Player* plr = ObjectAccessor::FindPlayer(guid);
+ Player* player = ObjectAccessor::FindPlayer(guid);
// should remove spirit of redemption
- if (plr)
+ if (player)
{
- if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
- plr->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
+ if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
+ player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- if (!plr->isAlive()) // resurrect on exit
+ if (!player->isAlive()) // resurrect on exit
{
- plr->ResurrectPlayer(1.0f);
- plr->SpawnCorpseBones();
+ player->ResurrectPlayer(1.0f);
+ player->SpawnCorpseBones();
}
}
- RemovePlayer(plr, guid, team); // BG subclass specific code
+ RemovePlayer(player, guid, team); // BG subclass specific code
if (participant) // if the player was a match participant, remove auras, calc rating, update queue
{
BattlegroundTypeId bgTypeId = GetTypeID();
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
- if (plr)
+ if (player)
{
- plr->ClearAfkReports();
+ player->ClearAfkReports();
- if (!team) team = plr->GetTeam();
+ if (!team) team = player->GetTeam();
// if arena, remove the specific arena auras
if (isArena())
@@ -969,8 +969,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
bgTypeId=BATTLEGROUND_AA; // set the bg type to all arenas (it will be used for queue refreshing)
// unsummon current and summon old pet if there was one and there isn't a current pet
- plr->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT);
- plr->ResummonPetTemporaryUnSummonedIfAny();
+ player->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT);
+ player->ResummonPetTemporaryUnSummonedIfAny();
if (isRated() && GetStatus() == STATUS_IN_PROGRESS)
{
@@ -978,18 +978,18 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
ArenaTeam* winner_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team)));
ArenaTeam* loser_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team));
if (winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team)
- loser_arena_team->MemberLost(plr, GetArenaMatchmakerRating(GetOtherTeam(team)));
+ loser_arena_team->MemberLost(player, GetArenaMatchmakerRating(GetOtherTeam(team)));
}
}
if (SendPacket)
{
WorldPacket data;
- sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, plr->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_NONE, 0, 0, 0);
- plr->GetSession()->SendPacket(&data);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_NONE, 0, 0, 0);
+ player->GetSession()->SendPacket(&data);
}
// this call is important, because player, when joins to battleground, this method is not called, so it must be called when leaving bg
- plr->RemoveBattlegroundQueueId(bgQueueTypeId);
+ player->RemoveBattlegroundQueueId(bgQueueTypeId);
}
else
// removing offline participant
@@ -1023,20 +1023,20 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
// Let others know
WorldPacket data;
sBattlegroundMgr->BuildPlayerLeftBattlegroundPacket(&data, guid);
- SendPacketToTeam(team, &data, plr, false);
+ SendPacketToTeam(team, &data, player, false);
}
- if (plr)
+ if (player)
{
// Do next only if found in battleground
- plr->SetBattlegroundId(0, BATTLEGROUND_TYPE_NONE); // We're not in BG.
+ player->SetBattlegroundId(0, BATTLEGROUND_TYPE_NONE); // We're not in BG.
// reset destination bg team
- plr->SetBGTeam(0);
+ player->SetBGTeam(0);
if (Transport)
- plr->TeleportToBGEntryPoint();
+ player->TeleportToBGEntryPoint();
- sLog->outDetail("BATTLEGROUND: Removed player %s from Battleground.", plr->GetName());
+ sLog->outDetail("BATTLEGROUND: Removed player %s from Battleground.", player->GetName());
}
//battleground object will be deleted next Battleground::Update() call
@@ -1087,16 +1087,16 @@ void Battleground::StartBattleground()
sLog->outArena("Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE]);
}
-void Battleground::AddPlayer(Player* plr)
+void Battleground::AddPlayer(Player* player)
{
// remove afk from player
- if (plr->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK))
- plr->ToggleAFK();
+ if (player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK))
+ player->ToggleAFK();
// score struct must be created in inherited class
- uint64 guid = plr->GetGUID();
- uint32 team = plr->GetBGTeam();
+ uint64 guid = player->GetGUID();
+ uint32 team = player->GetBGTeam();
BattlegroundPlayer bp;
bp.OfflineRemoveTime = 0;
@@ -1108,74 +1108,74 @@ void Battleground::AddPlayer(Player* plr)
UpdatePlayersCountByTeam(team, false); // +1 player
WorldPacket data;
- sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, plr);
- SendPacketToTeam(team, &data, plr, false);
+ sBattlegroundMgr->BuildPlayerJoinedBattlegroundPacket(&data, player);
+ SendPacketToTeam(team, &data, player, false);
// BG Status packet
WorldPacket status;
BattlegroundQueueTypeId bgQueueTypeId = sBattlegroundMgr->BGQueueTypeId(m_TypeID, GetArenaType());
- uint32 queueSlot = plr->GetBattlegroundQueueIndex(bgQueueTypeId);
+ uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&status, this, queueSlot, STATUS_IN_PROGRESS, 0, GetStartTime(), GetArenaType(), isArena() ? 0 : 1);
- plr->GetSession()->SendPacket(&status);
+ player->GetSession()->SendPacket(&status);
- plr->RemoveAurasByType(SPELL_AURA_MOUNTED);
+ player->RemoveAurasByType(SPELL_AURA_MOUNTED);
// add arena specific auras
if (isArena())
{
- plr->RemoveArenaEnchantments(TEMP_ENCHANTMENT_SLOT);
+ player->RemoveArenaEnchantments(TEMP_ENCHANTMENT_SLOT);
if (team == ALLIANCE) // gold
{
- if (plr->GetTeam() == HORDE)
- plr->CastSpell(plr, SPELL_HORDE_GOLD_FLAG, true);
+ if (player->GetTeam() == HORDE)
+ player->CastSpell(player, SPELL_HORDE_GOLD_FLAG, true);
else
- plr->CastSpell(plr, SPELL_ALLIANCE_GOLD_FLAG, true);
+ player->CastSpell(player, SPELL_ALLIANCE_GOLD_FLAG, true);
}
else // green
{
- if (plr->GetTeam() == HORDE)
- plr->CastSpell(plr, SPELL_HORDE_GREEN_FLAG, true);
+ if (player->GetTeam() == HORDE)
+ player->CastSpell(player, SPELL_HORDE_GREEN_FLAG, true);
else
- plr->CastSpell(plr, SPELL_ALLIANCE_GREEN_FLAG, true);
+ player->CastSpell(player, SPELL_ALLIANCE_GREEN_FLAG, true);
}
- plr->DestroyConjuredItems(true);
- plr->UnsummonPetTemporaryIfAny();
+ player->DestroyConjuredItems(true);
+ player->UnsummonPetTemporaryIfAny();
if (GetStatus() == STATUS_WAIT_JOIN) // not started yet
{
- plr->CastSpell(plr, SPELL_ARENA_PREPARATION, true);
- plr->ResetAllPowers();
+ player->CastSpell(player, SPELL_ARENA_PREPARATION, true);
+ player->ResetAllPowers();
}
WorldPacket teammate;
teammate.Initialize(SMSG_ARENA_OPPONENT_UPDATE, 8);
- teammate << uint64(plr->GetGUID());
- SendPacketToTeam(team, &teammate, plr, false);
+ teammate << uint64(player->GetGUID());
+ SendPacketToTeam(team, &teammate, player, false);
}
else
{
if (GetStatus() == STATUS_WAIT_JOIN) // not started yet
- plr->CastSpell(plr, SPELL_PREPARATION, true); // reduces all mana cost of spells.
+ player->CastSpell(player, SPELL_PREPARATION, true); // reduces all mana cost of spells.
}
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
- plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
+ player->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL, ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, GetMapId(), true);
// setup BG group membership
- PlayerAddedToBGCheckIfBGIsRunning(plr);
- AddOrSetPlayerToCorrectBgGroup(plr, team);
+ PlayerAddedToBGCheckIfBGIsRunning(player);
+ AddOrSetPlayerToCorrectBgGroup(player, team);
// Log
- sLog->outDetail("BATTLEGROUND: Player %s joined the battle.", plr->GetName());
+ sLog->outDetail("BATTLEGROUND: Player %s joined the battle.", player->GetName());
}
// this method adds player to his team's bg group, or sets his correct group if player is already in bg group
@@ -1385,11 +1385,11 @@ void Battleground::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid
{
m_ReviveQueue[npc_guid].push_back(player_guid);
- Player* plr = ObjectAccessor::FindPlayer(player_guid);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(player_guid);
+ if (!player)
return;
- plr->CastSpell(plr, SPELL_WAITING_FOR_RESURRECT, true);
+ player->CastSpell(player, SPELL_WAITING_FOR_RESURRECT, true);
}
void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid)
@@ -1401,8 +1401,8 @@ void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid)
if (*itr2 == player_guid)
{
(itr->second).erase(itr2);
- if (Player* plr = ObjectAccessor::FindPlayer(player_guid))
- plr->RemoveAurasDueToSpell(SPELL_WAITING_FOR_RESURRECT);
+ if (Player* player = ObjectAccessor::FindPlayer(player_guid))
+ player->RemoveAurasDueToSpell(SPELL_WAITING_FOR_RESURRECT);
return;
}
}
@@ -1454,7 +1454,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
data.go_state = 1;
*/
// Add to world, so it can be later looked up from HashMapHolder
- map->Add(go);
+ map->AddToMap(go);
m_BgObjects[type] = go->GetGUID();
return true;
}
@@ -1521,7 +1521,7 @@ void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
// Change state from GO_JUST_DEACTIVATED to GO_READY in case battleground is starting again
obj->SetLootState(GO_READY);
obj->SetRespawnTime(respawntime);
- map->Add(obj);
+ map->AddToMap(obj);
}
}
@@ -1557,7 +1557,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
creature->SetSpeed(MOVE_WALK, cinfo->speed_walk);
creature->SetSpeed(MOVE_RUN, cinfo->speed_run);
- map->Add(creature);
+ map->AddToMap(creature);
m_BgCreatures[type] = creature->GetGUID();
if (respawntime)
@@ -1680,9 +1680,9 @@ void Battleground::SendWarningToAll(int32 entry, ...)
data << msg.c_str();
data << (uint8)0;
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
- if (plr->GetSession())
- plr->GetSession()->SendPacket(&data);
+ if (Player* player = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
+ if (player->GetSession())
+ player->GetSession()->SendPacket(&data);
}
void Battleground::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2)
@@ -1759,12 +1759,12 @@ void Battleground::HandleKillPlayer(Player* player, Player* killer)
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
- Player* plr = ObjectAccessor::FindPlayer(itr->first);
- if (!plr || plr == killer)
+ Player* player = ObjectAccessor::FindPlayer(itr->first);
+ if (!player || player == killer)
continue;
- if (plr->GetTeam() == killer->GetTeam() && plr->IsAtGroupRewardDistance(player))
- UpdatePlayerScore(plr, SCORE_HONORABLE_KILLS, 1);
+ if (player->GetTeam() == killer->GetTeam() && player->IsAtGroupRewardDistance(player))
+ UpdatePlayerScore(player, SCORE_HONORABLE_KILLS, 1);
}
}
@@ -1799,7 +1799,7 @@ bool Battleground::IsPlayerInBattleground(uint64 guid) const
return false;
}
-void Battleground::PlayerAddedToBGCheckIfBGIsRunning(Player* plr)
+void Battleground::PlayerAddedToBGCheckIfBGIsRunning(Player* player)
{
if (GetStatus() != STATUS_WAIT_LEAVE)
return;
@@ -1807,13 +1807,13 @@ void Battleground::PlayerAddedToBGCheckIfBGIsRunning(Player* plr)
WorldPacket data;
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
- BlockMovement(plr);
+ BlockMovement(player);
sBattlegroundMgr->BuildPvpLogDataPacket(&data, this);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
- sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, plr->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, GetEndTime(), GetStartTime(), GetArenaType());
- plr->GetSession()->SendPacket(&data);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetBattlegroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, GetEndTime(), GetStartTime(), GetArenaType());
+ player->GetSession()->SendPacket(&data);
}
uint32 Battleground::GetAlivePlayersCountByTeam(uint32 Team) const
@@ -1823,8 +1823,8 @@ uint32 Battleground::GetAlivePlayersCountByTeam(uint32 Team) const
{
if (itr->second.Team == Team)
{
- Player* pl = ObjectAccessor::FindPlayer(itr->first);
- if (pl && pl->isAlive() && !pl->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
+ Player* player = ObjectAccessor::FindPlayer(itr->first);
+ if (player && player->isAlive() && !player->HasByteFlag(UNIT_FIELD_BYTES_2, 3, FORM_SPIRITOFREDEMPTION))
++count;
}
}
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index d5921e4bf37..9856312c337 100755
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -329,7 +329,7 @@ class Battleground
{
}
- virtual void DestroyGate(Player* /*pl*/, GameObject* /*go*/) {}
+ virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) {}
/* achievement req. */
virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; }
@@ -463,7 +463,7 @@ class Battleground
void UpdateWorldState(uint32 Field, uint32 Value);
void UpdateWorldStateForPlayer(uint32 Field, uint32 Value, Player* Source);
void EndBattleground(uint32 winner);
- void BlockMovement(Player* plr);
+ void BlockMovement(Player* player);
void SendWarningToAll(int32 entry, ...);
void SendMessageToAll(int32 entry, ChatMsg type, Player const* source = NULL);
@@ -515,7 +515,7 @@ class Battleground
virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {}
void EventPlayerLoggedIn(Player* player);
void EventPlayerLoggedOut(Player* player);
- virtual void EventPlayerDamagedGO(Player* /*plr*/, GameObject* /*go*/, uint32 /*eventType*/) {}
+ virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) {}
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
// this function can be used by spell to interact with the BG map
@@ -526,7 +526,7 @@ class Battleground
// Death related
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
- virtual void AddPlayer(Player* plr); // must be implemented in BG subclass
+ virtual void AddPlayer(Player* player); // must be implemented in BG subclass
void AddOrSetPlayerToCorrectBgGroup(Player* player, uint32 team);
@@ -554,7 +554,7 @@ class Battleground
//to be removed
const char* GetTrinityString(int32 entry);
- virtual bool HandlePlayerUnderMap(Player* /*plr*/) { return false; }
+ virtual bool HandlePlayerUnderMap(Player* /*player*/) { return false; }
// since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
uint32 GetPlayerTeam(uint64 guid) const;
@@ -575,7 +575,7 @@ class Battleground
protected:
// this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground
void EndNow();
- void PlayerAddedToBGCheckIfBGIsRunning(Player* plr);
+ void PlayerAddedToBGCheckIfBGIsRunning(Player* player);
Player* _GetPlayer(uint64 guid, bool offlineRemove, const char* context) const;
Player* _GetPlayer(BattlegroundPlayerMap::iterator itr, const char* context);
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index e00abb03320..a9acced82ae 100755
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -291,10 +291,10 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
}
else
{
- Player* plr = ObjectAccessor::FindPlayer(itr2->first);
+ Player* player = ObjectAccessor::FindPlayer(itr2->first);
uint32 team = bg->GetPlayerTeam(itr2->first);
- if (!team && plr)
- team = plr->GetBGTeam();
+ if (!team && player)
+ team = player->GetBGTeam();
*data << uint8(team == ALLIANCE ? 1 : 0); // green or yellow
}
*data << uint32(itr2->second->DamageDone); // damage done
@@ -422,10 +422,10 @@ void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint6
*data << uint64(guid);
}
-void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* plr)
+void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* player)
{
data->Initialize(SMSG_BATTLEGROUND_PLAYER_JOINED, 8);
- *data << uint64(plr->GetGUID());
+ *data << uint64(player->GetGUID());
}
Battleground* BattlegroundMgr::GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId)
@@ -804,17 +804,17 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized.");
}
-void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere)
+void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* player, BattlegroundTypeId bgTypeId, uint8 fromWhere)
{
- if (!plr)
+ if (!player)
return;
- uint32 winner_kills = plr->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST;
- uint32 winner_arena = plr->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
- uint32 loser_kills = plr->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;
+ uint32 winner_kills = player->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST;
+ uint32 winner_arena = player->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
+ uint32 loser_kills = player->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;
- winner_kills = Trinity::Honor::hk_honor_at_level(plr->getLevel(), float(winner_kills));
- loser_kills = Trinity::Honor::hk_honor_at_level(plr->getLevel(), float(loser_kills));
+ winner_kills = Trinity::Honor::hk_honor_at_level(player->getLevel(), float(winner_kills));
+ loser_kills = Trinity::Honor::hk_honor_at_level(player->getLevel(), float(loser_kills));
data->Initialize(SMSG_BATTLEFIELD_LIST);
*data << uint64(guid); // battlemaster guid
@@ -824,7 +824,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
*data << uint8(0); // unk
// Rewards
- *data << uint8(plr->GetRandomWinner()); // 3.3.3 hasWin
+ *data << uint8(player->GetRandomWinner()); // 3.3.3 hasWin
*data << uint32(winner_kills); // 3.3.3 winHonor
*data << uint32(winner_arena); // 3.3.3 winArena
*data << uint32(loser_kills); // 3.3.3 lossHonor
@@ -835,7 +835,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
if (isRandom)
{
// Rewards (random)
- *data << uint8(plr->GetRandomWinner()); // 3.3.3 hasWin_Random
+ *data << uint8(player->GetRandomWinner()); // 3.3.3 hasWin_Random
*data << uint32(winner_kills); // 3.3.3 winHonor_Random
*data << uint32(winner_arena); // 3.3.3 winArena_Random
*data << uint32(loser_kills); // 3.3.3 lossHonor_Random
@@ -853,7 +853,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
if (Battleground* bgTemplate = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId))
{
// expected bracket entry
- if (PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(), plr->getLevel()))
+ if (PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(), player->getLevel()))
{
uint32 count = 0;
BattlegroundBracketId bracketId = bracketEntry->GetBracketId();
@@ -868,35 +868,35 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
}
}
-void BattlegroundMgr::SendToBattleground(Player* pl, uint32 instanceId, BattlegroundTypeId bgTypeId)
+void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, BattlegroundTypeId bgTypeId)
{
Battleground* bg = GetBattleground(instanceId, bgTypeId);
if (bg)
{
uint32 mapid = bg->GetMapId();
float x, y, z, O;
- uint32 team = pl->GetBGTeam();
+ uint32 team = player->GetBGTeam();
if (team == 0)
- team = pl->GetTeam();
+ team = player->GetTeam();
bg->GetTeamStartLoc(team, x, y, z, O);
- sLog->outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", pl->GetName(), mapid, x, y, z, O);
- pl->TeleportTo(mapid, x, y, z, O);
+ sLog->outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", player->GetName(), mapid, x, y, z, O);
+ player->TeleportTo(mapid, x, y, z, O);
}
else
{
- sLog->outError("player %u is trying to port to non-existent bg instance %u", pl->GetGUIDLow(), instanceId);
+ sLog->outError("player %u is trying to port to non-existent bg instance %u", player->GetGUIDLow(), instanceId);
}
}
-void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid)
+void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid)
{
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
if (time_ == uint32(-1))
time_ = 0;
data << guid << time_;
- pl->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
}
bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId)
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h
index 7f35e5366a5..989509111bb 100755
--- a/src/server/game/Battlegrounds/BattlegroundMgr.h
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.h
@@ -65,15 +65,15 @@ class BattlegroundMgr
void Update(uint32 diff);
/* Packet Building */
- void BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* plr);
+ void BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* player);
void BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint64 guid);
- void BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere);
+ void BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* player, BattlegroundTypeId bgTypeId, uint8 fromWhere);
void BuildGroupJoinedBattlegroundPacket(WorldPacket* data, GroupJoinBattlegroundResult result);
void BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value);
void BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg);
void BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame = 1);
void BuildPlaySoundPacket(WorldPacket* data, uint32 soundid);
- void SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid);
+ void SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid);
/* Battlegrounds */
Battleground* GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId);
@@ -91,7 +91,7 @@ class BattlegroundMgr
void CreateInitialBattlegrounds();
void DeleteAllBattlegrounds();
- void SendToBattleground(Player* pl, uint32 InstanceID, BattlegroundTypeId bgTypeId);
+ void SendToBattleground(Player* player, uint32 InstanceID, BattlegroundTypeId bgTypeId);
/* Battleground queues */
//these queues are instantiated when creating BattlegroundMrg
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 67cea3e7be1..3005f1f2672 100755
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -285,7 +285,7 @@ uint32 BattlegroundQueue::GetAverageQueueWaitTime(GroupQueueInfo* ginfo, Battleg
//remove player from queue and from group info, if group info is empty then remove it too
void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
{
- //Player* plr = ObjectAccessor::FindPlayer(guid);
+ //Player* player = ObjectAccessor::FindPlayer(guid);
int32 bracket_id = -1; // signed for proper for-loop finish
QueuedPlayersMap::iterator itr;
@@ -362,8 +362,8 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
- if (Player* plr = ObjectAccessor::FindPlayer(guid))
- at->MemberLost(plr, group->OpponentsMatchmakerRating);
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
+ at->MemberLost(player, group->OpponentsMatchmakerRating);
else
at->OfflineMemberLost(guid, group->OpponentsMatchmakerRating);
at->SaveToDB();
@@ -442,36 +442,36 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
for (std::map<uint64, PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
{
// get the player
- Player* plr = ObjectAccessor::FindPlayer(itr->first);
+ Player* player = ObjectAccessor::FindPlayer(itr->first);
// if offline, skip him, this should not happen - player is removed from queue when he logs out
- if (!plr)
+ if (!player)
continue;
// invite the player
PlayerInvitedToBGUpdateAverageWaitTime(ginfo, bracket_id);
- //sBattlegroundMgr->InvitePlayer(plr, bg, ginfo->Team);
+ //sBattlegroundMgr->InvitePlayer(player, bg, ginfo->Team);
// set invited player counters
bg->IncreaseInvitedCount(ginfo->Team);
- plr->SetInviteForBattlegroundQueueType(bgQueueTypeId, ginfo->IsInvitedToBGInstanceGUID);
+ player->SetInviteForBattlegroundQueueType(bgQueueTypeId, ginfo->IsInvitedToBGInstanceGUID);
// create remind invite events
- BGQueueInviteEvent* inviteEvent = new BGQueueInviteEvent(plr->GetGUID(), ginfo->IsInvitedToBGInstanceGUID, bgTypeId, ginfo->ArenaType, ginfo->RemoveInviteTime);
+ BGQueueInviteEvent* inviteEvent = new BGQueueInviteEvent(player->GetGUID(), ginfo->IsInvitedToBGInstanceGUID, bgTypeId, ginfo->ArenaType, ginfo->RemoveInviteTime);
m_events.AddEvent(inviteEvent, m_events.CalculateTime(INVITATION_REMIND_TIME));
// create automatic remove events
- BGQueueRemoveEvent* removeEvent = new BGQueueRemoveEvent(plr->GetGUID(), ginfo->IsInvitedToBGInstanceGUID, bgTypeId, bgQueueTypeId, ginfo->RemoveInviteTime);
+ BGQueueRemoveEvent* removeEvent = new BGQueueRemoveEvent(player->GetGUID(), ginfo->IsInvitedToBGInstanceGUID, bgTypeId, bgQueueTypeId, ginfo->RemoveInviteTime);
m_events.AddEvent(removeEvent, m_events.CalculateTime(INVITE_ACCEPT_WAIT_TIME));
WorldPacket data;
- uint32 queueSlot = plr->GetBattlegroundQueueIndex(bgQueueTypeId);
+ uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
- sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited plr %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.", plr->GetName(), plr->GetGUIDLow(), bg->GetInstanceID(), queueSlot, bg->GetTypeID());
+ sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.", player->GetName(), player->GetGUIDLow(), bg->GetInstanceID(), queueSlot, bg->GetTypeID());
// send status packet
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME, 0, ginfo->ArenaType);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
}
return true;
}
@@ -911,104 +911,83 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId
uint32 discardTime = getMSTime() - sBattlegroundMgr->GetRatingDiscardTimer();
// we need to find 2 teams which will play next game
-
- GroupsQueueType::iterator itr_team[BG_TEAMS_COUNT];
-
- //optimalization : --- we dont need to use selection_pools - each update we select max 2 groups
- for (uint32 i = BG_QUEUE_PREMADE_ALLIANCE; i < BG_QUEUE_NORMAL_ALLIANCE; i++)
+ GroupsQueueType::iterator itr_teams[BG_TEAMS_COUNT];
+ uint8 found = 0;
+ uint8 team = 0;
+
+ for (uint8 i = BG_QUEUE_PREMADE_ALLIANCE; i < BG_QUEUE_NORMAL_ALLIANCE; i++)
{
// take the group that joined first
- itr_team[i] = m_QueuedGroups[bracket_id][i].begin();
- for (; itr_team[i] != m_QueuedGroups[bracket_id][i].end(); ++(itr_team[i]))
+ GroupsQueueType::iterator itr = m_QueuedGroups[bracket_id][i].begin();
+ for (; itr != m_QueuedGroups[bracket_id][i].end(); ++itr)
{
// if group match conditions, then add it to pool
- if (!(*itr_team[i])->IsInvitedToBGInstanceGUID
- && (((*itr_team[i])->ArenaMatchmakerRating >= arenaMinRating && (*itr_team[i])->ArenaMatchmakerRating <= arenaMaxRating)
- || (*itr_team[i])->JoinTime < discardTime))
+ if (!(*itr)->IsInvitedToBGInstanceGUID
+ && (((*itr)->ArenaMatchmakerRating >= arenaMinRating && (*itr)->ArenaMatchmakerRating <= arenaMaxRating)
+ || (*itr)->JoinTime < discardTime))
{
- m_SelectionPools[i].AddGroup((*itr_team[i]), MaxPlayersPerTeam);
- // break for cycle to be able to start selecting another group from same faction queue
+ itr_teams[found++] = itr;
+ team = i;
break;
}
}
}
-
- // now we are done if we have 2 groups - ali vs horde!
- // if we don't have, we must try to continue search in same queue
- // tmp variables are correctly set
- // this code isn't much userfriendly - but it is supposed to continue search for mathing group in HORDE queue
- if (m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() == 0 && m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount())
+
+ if (!found)
+ return;
+
+ if (found == 1)
{
- itr_team[BG_TEAM_ALLIANCE] = itr_team[BG_TEAM_HORDE];
- ++itr_team[BG_TEAM_ALLIANCE];
- for (; itr_team[BG_TEAM_ALLIANCE] != m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].end(); ++(itr_team[BG_TEAM_ALLIANCE]))
+ for (GroupsQueueType::iterator itr = itr_teams[0]; itr != m_QueuedGroups[bracket_id][team].end(); ++itr)
{
- if (!(*itr_team[BG_TEAM_ALLIANCE])->IsInvitedToBGInstanceGUID
- && (((*itr_team[BG_TEAM_ALLIANCE])->ArenaMatchmakerRating >= arenaMinRating && (*itr_team[BG_TEAM_ALLIANCE])->ArenaMatchmakerRating <= arenaMaxRating)
- || (*itr_team[BG_TEAM_ALLIANCE])->JoinTime < discardTime))
+ if (!(*itr)->IsInvitedToBGInstanceGUID
+ && (((*itr)->ArenaMatchmakerRating >= arenaMinRating && (*itr)->ArenaMatchmakerRating <= arenaMaxRating)
+ || (*itr)->JoinTime < discardTime)
+ && (*itr_teams[0])->ArenaTeamId != (*itr)->ArenaTeamId)
{
- m_SelectionPools[BG_TEAM_ALLIANCE].AddGroup((*itr_team[BG_TEAM_ALLIANCE]), MaxPlayersPerTeam);
+ itr_teams[found++] = itr;
break;
}
}
- }
-
- // this code isn't much userfriendly - but it is supposed to continue search for mathing group in ALLIANCE queue
- if (m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() == 0 && m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount())
- {
- itr_team[BG_TEAM_HORDE] = itr_team[BG_TEAM_ALLIANCE];
- ++itr_team[BG_TEAM_HORDE];
- for (; itr_team[BG_TEAM_HORDE] != m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].end(); ++(itr_team[BG_TEAM_HORDE]))
- {
- if (!(*itr_team[BG_TEAM_HORDE])->IsInvitedToBGInstanceGUID
- && (((*itr_team[BG_TEAM_HORDE])->ArenaMatchmakerRating >= arenaMinRating && (*itr_team[BG_TEAM_HORDE])->ArenaMatchmakerRating <= arenaMaxRating)
- || (*itr_team[BG_TEAM_HORDE])->JoinTime < discardTime))
- {
- m_SelectionPools[BG_TEAM_HORDE].AddGroup((*itr_team[BG_TEAM_HORDE]), MaxPlayersPerTeam);
- break;
- }
- }
- }
-
+ }
+
//if we have 2 teams, then start new arena and invite players!
- if (m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() && m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount())
+ if (found == 2)
{
+ GroupQueueInfo* aTeam = *itr_teams[BG_TEAM_ALLIANCE];
+ GroupQueueInfo* hTeam = *itr_teams[BG_TEAM_HORDE];
Battleground* arena = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, true);
if (!arena)
{
sLog->outError("BattlegroundQueue::Update couldn't create arena instance for rated arena match!");
return;
}
-
- (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating = (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamRating;
- (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsMatchmakerRating = (*(itr_team[BG_TEAM_HORDE]))->ArenaMatchmakerRating;
- sLog->outDebug(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamId, (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating);
- (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating = (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamRating;
- (*(itr_team[BG_TEAM_HORDE]))->OpponentsMatchmakerRating = (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaMatchmakerRating;
- sLog->outDebug(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamId, (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating);
+
+ aTeam->OpponentsTeamRating = hTeam->ArenaTeamRating;
+ hTeam->OpponentsTeamRating = aTeam->ArenaTeamRating;
+ aTeam->OpponentsMatchmakerRating = hTeam->ArenaMatchmakerRating;
+ hTeam->OpponentsMatchmakerRating = aTeam->ArenaMatchmakerRating;
+ sLog->outDebug(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", aTeam->ArenaTeamId, aTeam->OpponentsTeamRating);
+ sLog->outDebug(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", hTeam->ArenaTeamId, hTeam->OpponentsTeamRating);
+
// now we must move team if we changed its faction to another faction queue, because then we will spam log by errors in Queue::RemovePlayer
- if ((*(itr_team[BG_TEAM_ALLIANCE]))->Team != ALLIANCE)
+ if (aTeam->Team != ALLIANCE)
{
- // add to alliance queue
- m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].push_front(*(itr_team[BG_TEAM_ALLIANCE]));
- // erase from horde queue
- m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].erase(itr_team[BG_TEAM_ALLIANCE]);
- itr_team[BG_TEAM_ALLIANCE] = m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].begin();
+ m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].push_front(aTeam);
+ m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].erase(itr_teams[BG_TEAM_ALLIANCE]);
}
- if ((*(itr_team[BG_TEAM_HORDE]))->Team != HORDE)
+ if (hTeam->Team != HORDE)
{
- m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].push_front(*(itr_team[BG_TEAM_HORDE]));
- m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].erase(itr_team[BG_TEAM_HORDE]);
- itr_team[BG_TEAM_HORDE] = m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].begin();
+ m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_HORDE].push_front(hTeam);
+ m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].erase(itr_teams[BG_TEAM_HORDE]);
}
-
- arena->SetArenaMatchmakerRating(ALLIANCE, (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaMatchmakerRating);
- arena->SetArenaMatchmakerRating(HORDE, (*(itr_team[BG_TEAM_HORDE]))->ArenaMatchmakerRating);
- InviteGroupToBG(*(itr_team[BG_TEAM_ALLIANCE]), arena, ALLIANCE);
- InviteGroupToBG(*(itr_team[BG_TEAM_HORDE]), arena, HORDE);
-
+
+ arena->SetArenaMatchmakerRating(ALLIANCE, aTeam->ArenaMatchmakerRating);
+ arena->SetArenaMatchmakerRating( HORDE, hTeam->ArenaMatchmakerRating);
+ InviteGroupToBG(aTeam, arena, ALLIANCE);
+ InviteGroupToBG(hTeam, arena, HORDE);
+
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Starting rated arena match!");
-
arena->StartBattleground();
}
}
@@ -1020,9 +999,9 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId
bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- Player* plr = ObjectAccessor::FindPlayer(m_PlayerGuid);
+ Player* player = ObjectAccessor::FindPlayer(m_PlayerGuid);
// player logged off (we should do nothing, he is correctly removed from queue in another procedure)
- if (!plr)
+ if (!player)
return true;
Battleground* bg = sBattlegroundMgr->GetBattleground(m_BgInstanceGUID, m_BgTypeId);
@@ -1031,7 +1010,7 @@ bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
return true;
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
- uint32 queueSlot = plr->GetBattlegroundQueueIndex(bgQueueTypeId);
+ uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue or in battleground
{
// check if player is invited to this bg
@@ -1041,7 +1020,7 @@ bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
WorldPacket data;
//we must send remaining time in queue
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME - INVITATION_REMIND_TIME, 0, m_ArenaType);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
}
}
return true; //event will be deleted
@@ -1063,8 +1042,8 @@ void BGQueueInviteEvent::Abort(uint64 /*e_time*/)
*/
bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
- Player* plr = ObjectAccessor::FindPlayer(m_PlayerGuid);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(m_PlayerGuid);
+ if (!player)
// player logged off (we should do nothing, he is correctly removed from queue in another procedure)
return true;
@@ -1072,16 +1051,16 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
//battleground can be deleted already when we are removing queue info
//bg pointer can be NULL! so use it carefully!
- uint32 queueSlot = plr->GetBattlegroundQueueIndex(m_BgQueueTypeId);
+ uint32 queueSlot = player->GetBattlegroundQueueIndex(m_BgQueueTypeId);
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue, or in Battleground
{
// check if player is in queue for this BG and if we are removing his invite event
BattlegroundQueue &bgQueue = sBattlegroundMgr->m_BattlegroundQueues[m_BgQueueTypeId];
if (bgQueue.IsPlayerInvited(m_PlayerGuid, m_BgInstanceGUID, m_RemoveTime))
{
- sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.", plr->GetGUIDLow(), m_BgInstanceGUID);
+ sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.", player->GetGUIDLow(), m_BgInstanceGUID);
- plr->RemoveBattlegroundQueueId(m_BgQueueTypeId);
+ player->RemoveBattlegroundQueueId(m_BgQueueTypeId);
bgQueue.RemovePlayer(m_PlayerGuid, true);
//update queues if battleground isn't ended
if (bg && bg->isBattleground() && bg->GetStatus() != STATUS_WAIT_LEAVE)
@@ -1089,7 +1068,7 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_NONE, 0, 0, 0);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
}
}
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h
index 10bff57a251..6b19c23ca68 100755
--- a/src/server/game/Battlegrounds/BattlegroundQueue.h
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.h
@@ -103,6 +103,7 @@ class BattlegroundQueue
class SelectionPool
{
public:
+ SelectionPool(): PlayerCount(0) {};
void Init();
bool AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount);
bool KickGroup(uint32 size);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp
index 7c7a6262c58..1e8973edf10 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp
@@ -47,16 +47,16 @@ void BattlegroundAA::StartingEventOpenDoors()
{
}
-void BattlegroundAA::AddPlayer(Player* plr)
+void BattlegroundAA::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundAAScore* sc = new BattlegroundAAScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
}
-void BattlegroundAA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundAA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.h b/src/server/game/Battlegrounds/Zones/BattlegroundAA.h
index 33e193bd4ef..bdf1ad7eedd 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.h
@@ -35,11 +35,11 @@ class BattlegroundAA : public Battleground
~BattlegroundAA();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player* killer);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index e2a39ff4666..028773c5229 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -204,16 +204,16 @@ void BattlegroundAB::StartingEventOpenDoors()
DoorOpen(BG_AB_OBJECT_GATE_H);
}
-void BattlegroundAB::AddPlayer(Player* plr)
+void BattlegroundAB::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in the constructor
BattlegroundABScore* sc = new BattlegroundABScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
}
-void BattlegroundAB::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundAB::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
}
@@ -409,15 +409,15 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node)
WorldSafeLocsEntry const* ClosestGrave = NULL;
for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
- Player* plr = ObjectAccessor::FindPlayer(*itr);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(*itr);
+ if (!player)
continue;
if (!ClosestGrave) // cache
- ClosestGrave = GetClosestGraveYard(plr);
+ ClosestGrave = GetClosestGraveYard(player);
if (ClosestGrave)
- plr->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, plr->GetOrientation());
+ player->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, player->GetOrientation());
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index c848c5f23f8..39f3727d68e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -245,10 +245,10 @@ class BattlegroundAB : public Battleground
BattlegroundAB();
~BattlegroundAB();
- void AddPlayer(Player* plr);
+ void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
virtual bool SetupBattleground();
virtual void Reset();
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index a647a3c6299..491584557a3 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -422,14 +422,14 @@ void BattlegroundAV::StartingEventOpenDoors()
DoorOpen(BG_AV_OBJECT_DOOR_A);
}
-void BattlegroundAV::AddPlayer(Player* plr)
+void BattlegroundAV::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundAVScore* sc = new BattlegroundAVScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
if (m_MaxLevel == 0)
- m_MaxLevel=(plr->getLevel()%10 == 0)? plr->getLevel() : (plr->getLevel()-(plr->getLevel()%10))+10; //TODO: just look at the code \^_^/ --but queue-info should provide this information..
+ m_MaxLevel=(player->getLevel()%10 == 0)? player->getLevel() : (player->getLevel()-(player->getLevel()%10))+10; //TODO: just look at the code \^_^/ --but queue-info should provide this information..
}
@@ -473,17 +473,17 @@ void BattlegroundAV::EndBattleground(uint32 winner)
Battleground::EndBattleground(winner);
}
-void BattlegroundAV::RemovePlayer(Player* plr, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundAV::RemovePlayer(Player* player, uint64 /*guid*/, uint32 /*team*/)
{
- if (!plr)
+ if (!player)
{
sLog->outError("bg_AV no player at remove");
return;
}
//TODO search more buffs
- plr->RemoveAurasDueToSpell(AV_BUFF_ARMOR);
- plr->RemoveAurasDueToSpell(AV_BUFF_A_CAPTAIN);
- plr->RemoveAurasDueToSpell(AV_BUFF_H_CAPTAIN);
+ player->RemoveAurasDueToSpell(AV_BUFF_ARMOR);
+ player->RemoveAurasDueToSpell(AV_BUFF_A_CAPTAIN);
+ player->RemoveAurasDueToSpell(AV_BUFF_H_CAPTAIN);
}
void BattlegroundAV::HandleAreaTrigger(Player* Source, uint32 Trigger)
@@ -1029,17 +1029,17 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]];
if (!ghost_list.empty())
{
- Player* plr;
+ Player* player;
WorldSafeLocsEntry const* ClosestGrave = NULL;
for (std::vector<uint64>::iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
- plr = ObjectAccessor::FindPlayer(*ghost_list.begin());
- if (!plr)
+ player = ObjectAccessor::FindPlayer(*ghost_list.begin());
+ if (!player)
continue;
if (!ClosestGrave)
- ClosestGrave = GetClosestGraveYard(plr);
+ ClosestGrave = GetClosestGraveYard(player);
else
- plr->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, plr->GetOrientation());
+ player->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, player->GetOrientation());
}
m_ReviveQueue[m_BgCreatures[node]].clear();
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
index 3ae1f52a4f9..2c8ffc0cf72 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h
@@ -1539,11 +1539,11 @@ class BattlegroundAV : public Battleground
~BattlegroundAV();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void ResetBGSubclass();
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
index 1db59547d92..88b9aa6184e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
@@ -62,18 +62,18 @@ void BattlegroundBE::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
-void BattlegroundBE::AddPlayer(Player* plr)
+void BattlegroundBE::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundBEScore* sc = new BattlegroundBEScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
-void BattlegroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundBE::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
index 13aef8f561b..1b4fa8ebd64 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
@@ -55,17 +55,17 @@ class BattlegroundBE : public Battleground
~BattlegroundBE();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void HandleKillPlayer(Player* player, Player* killer);
- bool HandlePlayerUnderMap(Player* plr);
+ bool HandlePlayerUnderMap(Player* player);
/* Scorekeeping */
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 6fb07ebb678..754005f3f33 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -88,18 +88,18 @@ void BattlegroundDS::StartingEventOpenDoors()
SpawnBGObject(i, getWaterFallTimer());
}
-void BattlegroundDS::AddPlayer(Player* plr)
+void BattlegroundDS::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundDSScore* sc = new BattlegroundDSScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
-void BattlegroundDS::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundDS::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
index e5b2d613810..625eb1c7533 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
@@ -64,17 +64,17 @@ class BattlegroundDS : public Battleground
~BattlegroundDS();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void HandleKillPlayer(Player* player, Player* killer);
- bool HandlePlayerUnderMap(Player* plr);
+ bool HandlePlayerUnderMap(Player* player);
private:
uint32 m_waterTimer;
bool m_waterfallActive;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index 8c5b0468aca..c790d64e986 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -146,20 +146,20 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
uint8 j = 0;
while (j < m_PlayersNearPoint[EY_POINTS_MAX].size())
{
- Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
+ if (!player)
{
sLog->outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
++j;
continue;
}
- if (plr->CanCaptureTowerPoint() && plr->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
+ if (player->CanCaptureTowerPoint() && player->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
{
//player joined point!
//show progress bar
- UpdateWorldStateForPlayer(PROGRESS_BAR_PERCENT_GREY, BG_EY_PROGRESS_BAR_PERCENT_GREY, plr);
- UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[i], plr);
- UpdateWorldStateForPlayer(PROGRESS_BAR_SHOW, BG_EY_PROGRESS_BAR_SHOW, plr);
+ UpdateWorldStateForPlayer(PROGRESS_BAR_PERCENT_GREY, BG_EY_PROGRESS_BAR_PERCENT_GREY, player);
+ UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[i], player);
+ UpdateWorldStateForPlayer(PROGRESS_BAR_SHOW, BG_EY_PROGRESS_BAR_SHOW, player);
//add player to point
m_PlayersNearPoint[i].push_back(m_PlayersNearPoint[EY_POINTS_MAX][j]);
//remove player from "free space"
@@ -186,8 +186,8 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
uint8 j = 0;
while (j < m_PlayersNearPoint[i].size())
{
- Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
+ if (!player)
{
sLog->outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
//move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
@@ -196,17 +196,17 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
++j;
continue;
}
- if (!plr->CanCaptureTowerPoint() || !plr->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
+ if (!player->CanCaptureTowerPoint() || !player->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
//move player out of point (add him to players that are out of points
{
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
- this->UpdateWorldStateForPlayer(PROGRESS_BAR_SHOW, BG_EY_PROGRESS_BAR_DONT_SHOW, plr);
+ this->UpdateWorldStateForPlayer(PROGRESS_BAR_SHOW, BG_EY_PROGRESS_BAR_DONT_SHOW, player);
}
else
{
//player is neat flag, so update count:
- m_CurrentPointPlayersCount[2 * i + GetTeamIndexByTeamId(plr->GetTeam())]++;
+ m_CurrentPointPlayersCount[2 * i + GetTeamIndexByTeamId(player->GetTeam())]++;
++j;
}
}
@@ -241,20 +241,20 @@ void BattlegroundEY::UpdatePointStatuses()
for (uint8 i = 0; i < m_PlayersNearPoint[point].size(); ++i)
{
- Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[point][i]);
- if (plr)
+ Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[point][i]);
+ if (player)
{
- this->UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[point], plr);
+ this->UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[point], player);
//if point owner changed we must evoke event!
if (pointOwnerTeamId != m_PointOwnedByTeam[point])
{
//point was uncontrolled and player is from team which captured point
- if (m_PointState[point] == EY_POINT_STATE_UNCONTROLLED && plr->GetTeam() == pointOwnerTeamId)
- this->EventTeamCapturedPoint(plr, point);
+ if (m_PointState[point] == EY_POINT_STATE_UNCONTROLLED && player->GetTeam() == pointOwnerTeamId)
+ this->EventTeamCapturedPoint(player, point);
//point was under control and player isn't from team which controlled it
- if (m_PointState[point] == EY_POINT_UNDER_CONTROL && plr->GetTeam() != m_PointOwnedByTeam[point])
- this->EventTeamLostPoint(plr, point);
+ if (m_PointState[point] == EY_POINT_UNDER_CONTROL && player->GetTeam() != m_PointOwnedByTeam[point])
+ this->EventTeamLostPoint(player, point);
}
}
}
@@ -330,18 +330,18 @@ void BattlegroundEY::UpdatePointsIcons(uint32 Team, uint32 Point)
}
}
-void BattlegroundEY::AddPlayer(Player* plr)
+void BattlegroundEY::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map
BattlegroundEYScore* sc = new BattlegroundEYScore;
- m_PlayersNearPoint[EY_POINTS_MAX].push_back(plr->GetGUID());
+ m_PlayersNearPoint[EY_POINTS_MAX].push_back(player->GetGUID());
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
}
-void BattlegroundEY::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/)
+void BattlegroundEY::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
{
// sometimes flag aura not removed :(
for (int j = EY_POINTS_MAX; j >= 0; --j)
@@ -354,8 +354,8 @@ void BattlegroundEY::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/)
{
if (m_FlagKeeper == guid)
{
- if (plr)
- EventPlayerDroppedFlag(plr);
+ if (player)
+ EventPlayerDroppedFlag(player);
else
{
SetFlagPicker(0);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index fdb81491771..aba5754752a 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -336,7 +336,7 @@ class BattlegroundEY : public Battleground
~BattlegroundEY();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
@@ -348,7 +348,7 @@ class BattlegroundEY : public Battleground
void RespawnFlag(bool send_message);
void RespawnFlagAfterDrop();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleBuffUse(uint64 buff_guid);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void HandleKillPlayer(Player* player, Player* killer);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index b00e8dac1d8..f17df3aaf67 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -90,22 +90,22 @@ void BattlegroundIC::DoAction(uint32 action, uint64 var)
if (action != ACTION_TELEPORT_PLAYER_TO_TRANSPORT)
return;
- Player* plr = ObjectAccessor::FindPlayer(var);
+ Player* player = ObjectAccessor::FindPlayer(var);
- if (!plr || !gunshipAlliance || !gunshipHorde)
+ if (!player || !gunshipAlliance || !gunshipHorde)
return;
- plr->CastSpell(plr, SPELL_PARACHUTE, true); // this must be changed, there is a trigger in each transport that casts the spell.
- plr->CastSpell(plr, SPELL_SLOW_FALL, true);
+ player->CastSpell(player, SPELL_PARACHUTE, true); // this must be changed, there is a trigger in each transport that casts the spell.
+ player->CastSpell(player, SPELL_SLOW_FALL, true);
- plr->SetTransport(plr->GetTeamId() == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde);
+ player->SetTransport(player->GetTeamId() == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde);
- plr->m_movementInfo.t_pos.m_positionX = TransportMovementInfo.GetPositionX();
- plr->m_movementInfo.t_pos.m_positionY = TransportMovementInfo.GetPositionY();
- plr->m_movementInfo.t_pos.m_positionZ = TransportMovementInfo.GetPositionZ();
- plr->m_movementInfo.t_guid = (plr->GetTeamId() == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->GetGUID();
+ player->m_movementInfo.t_pos.m_positionX = TransportMovementInfo.GetPositionX();
+ player->m_movementInfo.t_pos.m_positionY = TransportMovementInfo.GetPositionY();
+ player->m_movementInfo.t_pos.m_positionZ = TransportMovementInfo.GetPositionZ();
+ player->m_movementInfo.t_guid = (player->GetTeamId() == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->GetGUID();
- plr->TeleportTo(GetMapId(), TeleportToTransportPosition.GetPositionX(), TeleportToTransportPosition.GetPositionY(), TeleportToTransportPosition.GetPositionZ(), TeleportToTransportPosition.GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);
+ player->TeleportTo(GetMapId(), TeleportToTransportPosition.GetPositionX(), TeleportToTransportPosition.GetPositionY(), TeleportToTransportPosition.GetPositionZ(), TeleportToTransportPosition.GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);
}
void BattlegroundIC::PostUpdateImpl(uint32 diff)
@@ -135,7 +135,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
if (nodePoint[i].nodeState == NODE_STATE_CONTROLLED_A ||
nodePoint[i].nodeState == NODE_STATE_CONTROLLED_H)
{
- if (nodePoint[i].timer <= diff)
+ if (docksTimer <= diff)
{
// we need to confirm this, i am not sure if this every 3 minutes
for (uint8 u = (nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_A : BG_IC_NPC_CATAPULT_1_H); u < (nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_4_A : BG_IC_NPC_CATAPULT_4_H); u++)
@@ -158,7 +158,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
}
docksTimer = DOCKS_UPDATE_TIME;
- } else nodePoint[i].timer -= diff;
+ } else docksTimer -= diff;
}
}
@@ -292,29 +292,29 @@ bool BattlegroundIC::IsAllNodesConrolledByTeam(uint32 team) const
return count == NODE_TYPE_WORKSHOP;
}
-void BattlegroundIC::AddPlayer(Player* plr)
+void BattlegroundIC::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundICScore* sc = new BattlegroundICScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
- if (nodePoint[NODE_TYPE_QUARRY].nodeState == (plr->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H))
- plr->CastSpell(plr, SPELL_QUARRY, true);
+ if (nodePoint[NODE_TYPE_QUARRY].nodeState == (player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H))
+ player->CastSpell(player, SPELL_QUARRY, true);
- if (nodePoint[NODE_TYPE_REFINERY].nodeState == (plr->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H))
- plr->CastSpell(plr, SPELL_OIL_REFINERY, true);
+ if (nodePoint[NODE_TYPE_REFINERY].nodeState == (player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H))
+ player->CastSpell(player, SPELL_OIL_REFINERY, true);
- SendTransportInit(plr);
+ SendTransportInit(player);
}
-void BattlegroundIC::RemovePlayer(Player* plr, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundIC::RemovePlayer(Player* player, uint64 /*guid*/, uint32 /*team*/)
{
- if (plr)
+ if (player)
{
- plr->RemoveAura(SPELL_QUARRY);
- plr->RemoveAura(SPELL_OIL_REFINERY);
+ player->RemoveAura(SPELL_QUARRY);
+ player->RemoveAura(SPELL_OIL_REFINERY);
}
}
@@ -482,15 +482,15 @@ void BattlegroundIC::RealocatePlayers(ICNodePointType nodeType)
WorldSafeLocsEntry const* ClosestGrave = NULL;
for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
- Player* plr = ObjectAccessor::FindPlayer(*itr);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(*itr);
+ if (!player)
continue;
if (!ClosestGrave) // cache
- ClosestGrave = GetClosestGraveYard(plr);
+ ClosestGrave = GetClosestGraveYard(player);
if (ClosestGrave)
- plr->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, plr->GetOrientation());
+ player->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, player->GetOrientation());
}
}
}
@@ -644,178 +644,178 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
switch (nodePoint->gameobject_type)
{
- case BG_IC_GO_HANGAR_BANNER:
- // all the players on the stopped transport should be teleported out
- if (!gunshipAlliance || !gunshipHorde)
- break;
+ case BG_IC_GO_HANGAR_BANNER:
+ // all the players on the stopped transport should be teleported out
+ if (!gunshipAlliance || !gunshipHorde)
+ break;
- for (uint8 u = 0; u < MAX_HANGAR_TELEPORTERS_SPAWNS; u++)
- {
- uint8 type = BG_IC_GO_HANGAR_TELEPORTER_1+u;
- AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL),
- BG_IC_HangarTeleporters[u].GetPositionX(), BG_IC_HangarTeleporters[u].GetPositionY(),
- BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(),
- 0, 0, 0, 0, RESPAWN_ONE_DAY);
- }
-
- //sLog->outError("BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction);
+ for (uint8 u = 0; u < MAX_HANGAR_TELEPORTERS_SPAWNS; u++)
+ {
+ uint8 type = BG_IC_GO_HANGAR_TELEPORTER_1+u;
+ AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL),
+ BG_IC_HangarTeleporters[u].GetPositionX(), BG_IC_HangarTeleporters[u].GetPositionY(),
+ BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(),
+ 0, 0, 0, 0, RESPAWN_ONE_DAY);
+ }
- (nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->BuildStartMovePacket(GetBgMap());
- (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->BuildStopMovePacket(GetBgMap());
- // we should spawn teleporters
- break;
- case BG_IC_GO_QUARRY_BANNER:
- RemoveAuraOnTeam(SPELL_QUARRY, (nodePoint->faction == TEAM_ALLIANCE ? HORDE : ALLIANCE));
- CastSpellOnTeam(SPELL_QUARRY, (nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE));
- break;
- case BG_IC_GO_REFINERY_BANNER:
- RemoveAuraOnTeam(SPELL_OIL_REFINERY, (nodePoint->faction == TEAM_ALLIANCE ? HORDE : ALLIANCE));
- CastSpellOnTeam(SPELL_OIL_REFINERY, (nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE));
- break;
- case BG_IC_GO_DOCKS_BANNER:
+ //sLog->outError("BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction);
- if (recapture)
+ (nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->BuildStartMovePacket(GetBgMap());
+ (nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->BuildStopMovePacket(GetBgMap());
+ // we should spawn teleporters
break;
+ case BG_IC_GO_QUARRY_BANNER:
+ RemoveAuraOnTeam(SPELL_QUARRY, (nodePoint->faction == TEAM_ALLIANCE ? HORDE : ALLIANCE));
+ CastSpellOnTeam(SPELL_QUARRY, (nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE));
+ break;
+ case BG_IC_GO_REFINERY_BANNER:
+ RemoveAuraOnTeam(SPELL_OIL_REFINERY, (nodePoint->faction == TEAM_ALLIANCE ? HORDE : ALLIANCE));
+ CastSpellOnTeam(SPELL_OIL_REFINERY, (nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE));
+ break;
+ case BG_IC_GO_DOCKS_BANNER:
- if (docksTimer < DOCKS_UPDATE_TIME)
- docksTimer = DOCKS_UPDATE_TIME;
+ if (recapture)
+ break;
- // we must del opposing faction vehicles when the node is captured (unused ones)
- for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_H : BG_IC_NPC_GLAIVE_THROWER_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_2_H : BG_IC_NPC_GLAIVE_THROWER_2_A); i++)
- {
- if (Creature* glaiveThrower = GetBGCreature(i))
+ if (docksTimer < DOCKS_UPDATE_TIME)
+ docksTimer = DOCKS_UPDATE_TIME;
+
+ // we must del opposing faction vehicles when the node is captured (unused ones)
+ for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_H : BG_IC_NPC_GLAIVE_THROWER_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_2_H : BG_IC_NPC_GLAIVE_THROWER_2_A); i++)
{
- if (Vehicle* vehicleGlaive = glaiveThrower->GetVehicleKit())
+ if (Creature* glaiveThrower = GetBGCreature(i))
{
- if (!vehicleGlaive->GetPassenger(0))
- DelCreature(i);
+ if (Vehicle* vehicleGlaive = glaiveThrower->GetVehicleKit())
+ {
+ if (!vehicleGlaive->GetPassenger(0))
+ DelCreature(i);
+ }
}
}
- }
- for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_H : BG_IC_NPC_CATAPULT_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_4_H : BG_IC_NPC_CATAPULT_4_A); i++)
- {
- if (Creature* catapult = GetBGCreature(i))
+ for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_H : BG_IC_NPC_CATAPULT_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_4_H : BG_IC_NPC_CATAPULT_4_A); i++)
{
- if (Vehicle* vehicleGlaive = catapult->GetVehicleKit())
+ if (Creature* catapult = GetBGCreature(i))
{
- if (!vehicleGlaive->GetPassenger(0))
- DelCreature(i);
+ if (Vehicle* vehicleGlaive = catapult->GetVehicleKit())
+ {
+ if (!vehicleGlaive->GetPassenger(0))
+ DelCreature(i);
+ }
}
}
- }
- // spawning glaive throwers
- for (uint8 i = 0; i < MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION; i++)
- {
- uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_A : BG_IC_NPC_GLAIVE_THROWER_1_H)+i;
+ // spawning glaive throwers
+ for (uint8 i = 0; i < MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION; i++)
+ {
+ uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_A : BG_IC_NPC_GLAIVE_THROWER_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
- continue;
+ if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
+ continue;
- if (AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type, nodePoint->faction,
- BG_IC_DocksVehiclesGlaives[i].GetPositionX(), BG_IC_DocksVehiclesGlaives[i].GetPositionY(),
- BG_IC_DocksVehiclesGlaives[i].GetPositionZ(), BG_IC_DocksVehiclesGlaives[i].GetOrientation(),
- RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
- }
+ if (AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type, nodePoint->faction,
+ BG_IC_DocksVehiclesGlaives[i].GetPositionX(), BG_IC_DocksVehiclesGlaives[i].GetPositionY(),
+ BG_IC_DocksVehiclesGlaives[i].GetPositionZ(), BG_IC_DocksVehiclesGlaives[i].GetOrientation(),
+ RESPAWN_ONE_DAY))
+ GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ }
- // spawning catapults
- for (uint8 i = 0; i < MAX_CATAPULTS_SPAWNS_PER_FACTION; i++)
- {
- uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_A : BG_IC_NPC_CATAPULT_1_H)+i;
+ // spawning catapults
+ for (uint8 i = 0; i < MAX_CATAPULTS_SPAWNS_PER_FACTION; i++)
+ {
+ uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_A : BG_IC_NPC_CATAPULT_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
- continue;
+ if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
+ continue;
- if (AddCreature(NPC_CATAPULT, type, nodePoint->faction,
- BG_IC_DocksVehiclesCatapults[i].GetPositionX(), BG_IC_DocksVehiclesCatapults[i].GetPositionY(),
- BG_IC_DocksVehiclesCatapults[i].GetPositionZ(), BG_IC_DocksVehiclesCatapults[i].GetOrientation(),
- RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
- }
- break;
- case BG_IC_GO_WORKSHOP_BANNER:
- {
- if (siegeEngineWorkshopTimer < WORKSHOP_UPDATE_TIME)
- siegeEngineWorkshopTimer = WORKSHOP_UPDATE_TIME;
-
- if (!recapture)
+ if (AddCreature(NPC_CATAPULT, type, nodePoint->faction,
+ BG_IC_DocksVehiclesCatapults[i].GetPositionX(), BG_IC_DocksVehiclesCatapults[i].GetPositionY(),
+ BG_IC_DocksVehiclesCatapults[i].GetPositionZ(), BG_IC_DocksVehiclesCatapults[i].GetOrientation(),
+ RESPAWN_ONE_DAY))
+ GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ }
+ break;
+ case BG_IC_GO_WORKSHOP_BANNER:
{
- // we must del opposing faction vehicles when the node is captured (unused ones)
- for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_H : BG_IC_NPC_DEMOLISHER_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_4_H : BG_IC_NPC_DEMOLISHER_4_A); i++)
+ if (siegeEngineWorkshopTimer < WORKSHOP_UPDATE_TIME)
+ siegeEngineWorkshopTimer = WORKSHOP_UPDATE_TIME;
+
+ if (!recapture)
{
- if (Creature* demolisher = GetBGCreature(i))
+ // we must del opposing faction vehicles when the node is captured (unused ones)
+ for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_H : BG_IC_NPC_DEMOLISHER_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_4_H : BG_IC_NPC_DEMOLISHER_4_A); i++)
{
- if (Vehicle* vehicleDemolisher = demolisher->GetVehicleKit())
+ if (Creature* demolisher = GetBGCreature(i))
{
- // is IsVehicleInUse working as expected?
- if (!vehicleDemolisher->IsVehicleInUse())
- DelCreature(i);
+ if (Vehicle* vehicleDemolisher = demolisher->GetVehicleKit())
+ {
+ // is IsVehicleInUse working as expected?
+ if (!vehicleDemolisher->IsVehicleInUse())
+ DelCreature(i);
+ }
}
}
- }
- for (uint8 i = 0; i < MAX_DEMOLISHERS_SPAWNS_PER_FACTION; i++)
- {
- uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_A : BG_IC_NPC_DEMOLISHER_1_H)+i;
+ for (uint8 i = 0; i < MAX_DEMOLISHERS_SPAWNS_PER_FACTION; i++)
+ {
+ uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_A : BG_IC_NPC_DEMOLISHER_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
- continue;
+ if (GetBGCreature(type) && GetBGCreature(type)->isAlive())
+ continue;
- if (AddCreature(NPC_DEMOLISHER, type, nodePoint->faction,
- BG_IC_WorkshopVehicles[i].GetPositionX(), BG_IC_WorkshopVehicles[i].GetPositionY(),
- BG_IC_WorkshopVehicles[i].GetPositionZ(), BG_IC_WorkshopVehicles[i].GetOrientation(),
- RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
- }
+ if (AddCreature(NPC_DEMOLISHER, type, nodePoint->faction,
+ BG_IC_WorkshopVehicles[i].GetPositionX(), BG_IC_WorkshopVehicles[i].GetPositionY(),
+ BG_IC_WorkshopVehicles[i].GetPositionZ(), BG_IC_WorkshopVehicles[i].GetOrientation(),
+ RESPAWN_ONE_DAY))
+ GetBGCreature(type)->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ }
- // we check if the opossing siege engine is in use
- int8 enemySiege = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_H : BG_IC_NPC_SIEGE_ENGINE_A);
+ // we check if the opossing siege engine is in use
+ int8 enemySiege = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_H : BG_IC_NPC_SIEGE_ENGINE_A);
- if (Creature* siegeEngine = GetBGCreature(enemySiege))
- {
- if (Vehicle* vehicleSiege = siegeEngine->GetVehicleKit())
+ if (Creature* siegeEngine = GetBGCreature(enemySiege))
{
- // is VehicleInUse working as expected ?
- if (!vehicleSiege->IsVehicleInUse())
- DelCreature(enemySiege);
+ if (Vehicle* vehicleSiege = siegeEngine->GetVehicleKit())
+ {
+ // is VehicleInUse working as expected ?
+ if (!vehicleSiege->IsVehicleInUse())
+ DelCreature(enemySiege);
+ }
}
- }
- uint8 siegeType = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_A : BG_IC_NPC_SIEGE_ENGINE_H);
- if (!GetBGCreature(siegeType) || !GetBGCreature(siegeType)->isAlive())
- {
- AddCreature((nodePoint->faction == TEAM_ALLIANCE ? NPC_SIEGE_ENGINE_A : NPC_SIEGE_ENGINE_H), siegeType, nodePoint->faction,
- BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(),
- BG_IC_WorkshopVehicles[4].GetPositionZ(), BG_IC_WorkshopVehicles[4].GetOrientation(),
- RESPAWN_ONE_DAY);
-
- if (Creature* siegeEngine = GetBGCreature(siegeType))
+ uint8 siegeType = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_A : BG_IC_NPC_SIEGE_ENGINE_H);
+ if (!GetBGCreature(siegeType) || !GetBGCreature(siegeType)->isAlive())
{
- siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_OOC_NOT_ATTACKABLE);
- siegeEngine->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ AddCreature((nodePoint->faction == TEAM_ALLIANCE ? NPC_SIEGE_ENGINE_A : NPC_SIEGE_ENGINE_H), siegeType, nodePoint->faction,
+ BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(),
+ BG_IC_WorkshopVehicles[4].GetPositionZ(), BG_IC_WorkshopVehicles[4].GetOrientation(),
+ RESPAWN_ONE_DAY);
+
+ if (Creature* siegeEngine = GetBGCreature(siegeType))
+ {
+ siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ siegeEngine->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ }
}
}
- }
- for (uint8 i = 0; i < MAX_WORKSHOP_BOMBS_SPAWNS_PER_FACTION; i++)
- {
- AddObject(BG_IC_GO_SEAFORIUM_BOMBS_1+i, GO_SEAFORIUM_BOMBS,
- workshopBombs[i].GetPositionX(), workshopBombs[i].GetPositionY(),
- workshopBombs[i].GetPositionZ(), workshopBombs[i].GetOrientation(),
- 0, 0, 0, 0, 10);
-
- if (GameObject* seaforiumBombs = GetBGObject(BG_IC_GO_SEAFORIUM_BOMBS_1+i))
+ for (uint8 i = 0; i < MAX_WORKSHOP_BOMBS_SPAWNS_PER_FACTION; i++)
{
- seaforiumBombs->SetRespawnTime(10);
- seaforiumBombs->SetUInt32Value(GAMEOBJECT_FACTION, BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ AddObject(BG_IC_GO_SEAFORIUM_BOMBS_1+i, GO_SEAFORIUM_BOMBS,
+ workshopBombs[i].GetPositionX(), workshopBombs[i].GetPositionY(),
+ workshopBombs[i].GetPositionZ(), workshopBombs[i].GetOrientation(),
+ 0, 0, 0, 0, 10);
+
+ if (GameObject* seaforiumBombs = GetBGObject(BG_IC_GO_SEAFORIUM_BOMBS_1+i))
+ {
+ seaforiumBombs->SetRespawnTime(10);
+ seaforiumBombs->SetUInt32Value(GAMEOBJECT_FACTION, BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ }
}
+ break;
}
+ default:
break;
- }
- default:
- break;
}
}
@@ -855,7 +855,7 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go)
SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP));
}
-void BattlegroundIC::EventPlayerDamagedGO(Player* /*plr*/, GameObject* /*go*/, uint32 /*eventType*/)
+void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/)
{
}
@@ -903,7 +903,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period)
{
Transport* t = new Transport(period, 0);
- const GameObjectTemplate* goinfo = sObjectMgr->GetGameObjectTemplate(goEntry);
+ GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(goEntry);
if (!goinfo)
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
index efa91559ca6..552b79ce608 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h
@@ -93,7 +93,6 @@ enum gameobjectsIC
GO_FLAGPOLE_1 = 195131,
GO_FLAGPOLE_2 = 195439,
- GO_FLAGPOLE_3 = 195131,
GO_GUNSHIP_PORTAL_1 = 195371,
GO_GUNSHIP_PORTAL_2 = 196413,
@@ -270,6 +269,7 @@ enum BG_IC_GOs
BG_IC_GO_FLAGPOLE_1_3,
BG_IC_GO_FLAGPOLE_1_4,
BG_IC_GO_FLAGPOLE_1_5,
+ BG_IC_GO_FLAGPOLE_1_6,
BG_IC_GO_HANGAR_BANNER,
@@ -624,6 +624,7 @@ const ICGo BG_IC_ObjSpawnlocs[MAX_NORMAL_GAMEOBJECTS_SPAWNS] =
{BG_IC_GO_FLAGPOLE_1_3, GO_FLAGPOLE_1, 807.78f, -1000.07f, 132.381f, -1.91986f}, // Flagpole
{BG_IC_GO_FLAGPOLE_1_4, GO_FLAGPOLE_1, 776.229f, -804.283f, 6.45052f, 1.6057f}, // Flagpole
{BG_IC_GO_FLAGPOLE_1_5, GO_FLAGPOLE_1, 251.016f, -1159.32f, 17.2376f, -2.25147f}, // Flagpole
+ {BG_IC_GO_FLAGPOLE_1_6, GO_FLAGPOLE_1, 1269.502f, -400.809f, 37.62525f, -1.762782f}, // Flagpole
{BG_IC_GO_HORDE_KEEP_PORTCULLIS, GO_HORDE_KEEP_PORTCULLIS, 1283.05f, -765.878f, 50.8297f, -3.13286f}, // Horde Keep Portcullis
@@ -862,12 +863,12 @@ class BattlegroundIC : public Battleground
~BattlegroundIC();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
virtual void PostUpdateImpl(uint32 diff);
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void SpawnLeader(uint32 teamid);
@@ -876,7 +877,7 @@ class BattlegroundIC : public Battleground
void EndBattleground(uint32 winner);
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/);
- void EventPlayerDamagedGO(Player* /*plr*/, GameObject* go, uint32 eventType);
+ void EventPlayerDamagedGO(Player* /*player*/, GameObject* go, uint32 eventType);
void DestroyGate(Player* player, GameObject* go);
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
index 58dc20c30cb..37fdd2559c4 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
@@ -59,18 +59,18 @@ void BattlegroundNA::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
-void BattlegroundNA::AddPlayer(Player* plr)
+void BattlegroundNA::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundNAScore* sc = new BattlegroundNAScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
-void BattlegroundNA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundNA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
index beddbaaeedf..e7fe08063a4 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
@@ -56,16 +56,16 @@ class BattlegroundNA : public Battleground
~BattlegroundNA();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
void HandleKillPlayer(Player* player, Player* killer);
- bool HandlePlayerUnderMap(Player* plr);
+ bool HandlePlayerUnderMap(Player* player);
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp
index e2d64aa39f7..ba4d787b215 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp
@@ -43,16 +43,16 @@ void BattlegroundRB::StartingEventOpenDoors()
{
}
-void BattlegroundRB::AddPlayer(Player* plr)
+void BattlegroundRB::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundRBScore* sc = new BattlegroundRBScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
}
-void BattlegroundRB::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundRB::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.h b/src/server/game/Battlegrounds/Zones/BattlegroundRB.h
index 0878654d7dd..ef6283ed96a 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.h
@@ -34,11 +34,11 @@ class BattlegroundRB : public Battleground
BattlegroundRB();
~BattlegroundRB();
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
/* Scorekeeping */
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
index 8ede4a6329c..3d1ebe8fec9 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
@@ -59,18 +59,18 @@ void BattlegroundRL::StartingEventOpenDoors()
SpawnBGObject(i, 60);
}
-void BattlegroundRL::AddPlayer(Player* plr)
+void BattlegroundRL::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundRLScore* sc = new BattlegroundRLScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
-void BattlegroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundRL::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
index 52ce7d3ca40..5528d0ccf9e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
@@ -52,16 +52,16 @@ class BattlegroundRL : public Battleground
~BattlegroundRL();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player* killer);
- bool HandlePlayerUnderMap(Player* plr);
+ bool HandlePlayerUnderMap(Player* player);
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 81a75c23cb5..0c44c5d3d96 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -102,19 +102,19 @@ void BattlegroundRV::StartingEventOpenDoors()
setTimer(BG_RV_FIRST_TIMER);
}
-void BattlegroundRV::AddPlayer(Player* plr)
+void BattlegroundRV::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundRVScore* sc = new BattlegroundRVScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
UpdateWorldState(BG_RV_WORLD_STATE_A, GetAlivePlayersCountByTeam(ALLIANCE));
UpdateWorldState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
}
-void BattlegroundRV::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundRV::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
index 9a6efe64524..70417c1dfce 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
@@ -105,17 +105,17 @@ class BattlegroundRV : public Battleground
~BattlegroundRV();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
virtual void Reset();
virtual void FillInitialWorldStates(WorldPacket &d);
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleKillPlayer(Player* player, Player* killer);
- bool HandlePlayerUnderMap(Player* plr);
+ bool HandlePlayerUnderMap(Player* player);
private:
uint32 Timer;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index c214ac21068..aaa29e1ca20 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -62,8 +62,8 @@ bool BattlegroundSA::SetupBattleground()
bool BattlegroundSA::ResetObjs()
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
- SendTransportsRemove(plr);
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
+ SendTransportsRemove(player);
uint32 atF = BG_SA_Factions[Attackers];
uint32 defF = BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE];
@@ -245,8 +245,8 @@ bool BattlegroundSA::ResetObjs()
for (int i = BG_SA_BOAT_ONE; i <= BG_SA_BOAT_TWO; i++)
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
- SendTransportInit(plr);
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
+ SendTransportInit(player);
TeleportPlayers();
return true;
@@ -431,39 +431,39 @@ void BattlegroundSA::FillInitialWorldStates(WorldPacket& data)
data << uint32(BG_SA_LEFT_ATT_TOKEN_ALL) << ally_attacks;
}
-void BattlegroundSA::AddPlayer(Player* plr)
+void BattlegroundSA::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundSAScore* sc = new BattlegroundSAScore;
if (!ShipsStarted)
{
- if (plr->GetTeamId() == Attackers)
+ if (player->GetTeamId() == Attackers)
{
- plr->CastSpell(plr, 12438, true);//Without this player falls before boat loads...
+ player->CastSpell(player, 12438, true);//Without this player falls before boat loads...
if (urand(0, 1))
- plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
+ player->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
else
- plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
+ player->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
}
else
- plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
+ player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
}
else
{
- if (plr->GetTeamId() == Attackers)
- plr->TeleportTo(607, 1600.381f, -106.263f, 8.8745f, 3.78f, 0);
+ if (player->GetTeamId() == Attackers)
+ player->TeleportTo(607, 1600.381f, -106.263f, 8.8745f, 3.78f, 0);
else
- plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
+ player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
}
- SendTransportInit(plr);
- m_PlayerScores[plr->GetGUID()] = sc;
+ SendTransportInit(player);
+ m_PlayerScores[player->GetGUID()] = sc;
}
-void BattlegroundSA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*team*/)
+void BattlegroundSA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
{
}
@@ -492,37 +492,37 @@ void BattlegroundSA::TeleportPlayers()
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
{
// should remove spirit of redemption
- if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
- plr->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
+ if (player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
+ player->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- if (!plr->isAlive())
+ if (!player->isAlive())
{
- plr->ResurrectPlayer(1.0f);
- plr->SpawnCorpseBones();
+ player->ResurrectPlayer(1.0f);
+ player->SpawnCorpseBones();
}
- plr->ResetAllPowers();
- plr->CombatStopWithPets(true);
+ player->ResetAllPowers();
+ player->CombatStopWithPets(true);
- if (plr->GetTeamId() == Attackers)
+ if (player->GetTeamId() == Attackers)
{
- plr->CastSpell(plr, 12438, true); //Without this player falls before boat loads...
+ player->CastSpell(player, 12438, true); //Without this player falls before boat loads...
if (urand(0, 1))
- plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
+ player->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
else
- plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
+ player->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
}
else
- plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
+ player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
}
}
}
-void BattlegroundSA::EventPlayerDamagedGO(Player* /*plr*/, GameObject* go, uint32 eventType)
+void BattlegroundSA::EventPlayerDamagedGO(Player* /*player*/, GameObject* go, uint32 eventType)
{
if (!go || !go->GetGOInfo())
return;
@@ -798,9 +798,9 @@ void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
//Achievement Storm the Beach (1310)
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
- if (plr->GetTeamId() == Attackers)
- plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246);
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
+ if (player->GetTeamId() == Attackers)
+ player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246);
}
Attackers = (Attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
@@ -822,9 +822,9 @@ void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
//Achievement Storm the Beach (1310)
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
{
- if (Player* plr = ObjectAccessor::FindPlayer(itr->first))
- if (plr->GetTeamId() == Attackers && RoundScores[1].winner == Attackers)
- plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246);
+ if (Player* player = ObjectAccessor::FindPlayer(itr->first))
+ if (player->GetTeamId() == Attackers && RoundScores[1].winner == Attackers)
+ player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246);
}
if (RoundScores[0].time == RoundScores[1].time)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
index 5f01d0fac4d..8b446fccb9e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h
@@ -423,7 +423,7 @@ class BattlegroundSA : public Battleground
/* inherited from BattlegroundClass */
/// Called when a player join battle
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
/// Called when battle start
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
@@ -433,7 +433,7 @@ class BattlegroundSA : public Battleground
/// Called for generate packet contain worldstate data
virtual void FillInitialWorldStates(WorldPacket& data);
/// Called when a player deal damage to building (door)
- virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint32 eventType);
+ virtual void EventPlayerDamagedGO(Player* player, GameObject* go, uint32 eventType);
/// Called when a player kill a unit in bg
virtual void HandleKillUnit(Creature* unit, Player* killer);
/// Return the nearest graveyard where player can respawn
@@ -477,7 +477,7 @@ class BattlegroundSA : public Battleground
void EndBattleground(uint32 winner);
/// CAlled when a player leave battleground
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
/* Scorekeeping */
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 951fe8f6b51..a6aa6f41db2 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -140,23 +140,23 @@ void BattlegroundWS::PostUpdateImpl(uint32 diff)
m_FlagSpellForceTimer += diff;
if (m_FlagDebuffState == 0 && m_FlagSpellForceTimer >= 600000) //10 minutes
{
- if (Player* plr = ObjectAccessor::FindPlayer(m_FlagKeepers[0]))
- plr->CastSpell(plr, WS_SPELL_FOCUSED_ASSAULT, true);
- if (Player* plr = ObjectAccessor::FindPlayer(m_FlagKeepers[1]))
- plr->CastSpell(plr, WS_SPELL_FOCUSED_ASSAULT, true);
+ if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[0]))
+ player->CastSpell(player, WS_SPELL_FOCUSED_ASSAULT, true);
+ if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[1]))
+ player->CastSpell(player, WS_SPELL_FOCUSED_ASSAULT, true);
m_FlagDebuffState = 1;
}
else if (m_FlagDebuffState == 1 && m_FlagSpellForceTimer >= 900000) //15 minutes
{
- if (Player* plr = ObjectAccessor::FindPlayer(m_FlagKeepers[0]))
+ if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[0]))
{
- plr->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- plr->CastSpell(plr, WS_SPELL_BRUTAL_ASSAULT, true);
+ player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
+ player->CastSpell(player, WS_SPELL_BRUTAL_ASSAULT, true);
}
- if (Player* plr = ObjectAccessor::FindPlayer(m_FlagKeepers[1]))
+ if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[1]))
{
- plr->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- plr->CastSpell(plr, WS_SPELL_BRUTAL_ASSAULT, true);
+ player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
+ player->CastSpell(player, WS_SPELL_BRUTAL_ASSAULT, true);
}
m_FlagDebuffState = 2;
}
@@ -202,13 +202,13 @@ void BattlegroundWS::StartingEventOpenDoors()
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
}
-void BattlegroundWS::AddPlayer(Player* plr)
+void BattlegroundWS::AddPlayer(Player* player)
{
- Battleground::AddPlayer(plr);
+ Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundWGScore* sc = new BattlegroundWGScore;
- m_PlayerScores[plr->GetGUID()] = sc;
+ m_PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
@@ -556,30 +556,30 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target
Source->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
}
-void BattlegroundWS::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/)
+void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
{
// sometimes flag aura not removed :(
if (IsAllianceFlagPickedup() && m_FlagKeepers[BG_TEAM_ALLIANCE] == guid)
{
- if (!plr)
+ if (!player)
{
sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!");
this->SetAllianceFlagPicker(0);
this->RespawnFlag(ALLIANCE, false);
}
else
- this->EventPlayerDroppedFlag(plr);
+ this->EventPlayerDroppedFlag(player);
}
if (IsHordeFlagPickedup() && m_FlagKeepers[BG_TEAM_HORDE] == guid)
{
- if (!plr)
+ if (!player)
{
sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!");
this->SetHordeFlagPicker(0);
this->RespawnFlag(HORDE, false);
}
else
- this->EventPlayerDroppedFlag(plr);
+ this->EventPlayerDroppedFlag(player);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index 386cc6945e8..b3c2c88c306 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -163,7 +163,7 @@ class BattlegroundWS : public Battleground
~BattlegroundWS();
/* inherited from BattlegroundClass */
- virtual void AddPlayer(Player* plr);
+ virtual void AddPlayer(Player* player);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
@@ -187,7 +187,7 @@ class BattlegroundWS : public Battleground
virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
virtual void EventPlayerCapturedFlag(Player* Source);
- void RemovePlayer(Player* plr, uint64 guid, uint32 team);
+ void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void HandleKillPlayer(Player* player, Player* killer);
bool SetupBattleground();
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 413070ca1de..7717d319bb0 100755
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -169,22 +169,22 @@ void Channel::Join(uint64 p, const char *pass)
return;
}
- Player* plr = ObjectAccessor::FindPlayer(p);
+ Player* player = ObjectAccessor::FindPlayer(p);
- if (plr)
+ if (player)
{
if (HasFlag(CHANNEL_FLAG_LFG) &&
- sWorld->getBoolConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && AccountMgr::IsPlayerAccount(plr->GetSession()->GetSecurity()) && plr->GetGroup())
+ sWorld->getBoolConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) && player->GetGroup())
{
MakeNotInLfg(&data);
SendToOne(&data, p);
return;
}
- plr->JoinedChannel(this);
+ player->JoinedChannel(this);
}
- if (m_announce && (!plr || !AccountMgr::IsGMAccount(plr->GetSession()->GetSecurity()) || !sWorld->getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
+ if (m_announce && (!player || !AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()) || !sWorld->getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
{
MakeJoined(&data, p);
SendToAll(&data);
@@ -231,22 +231,22 @@ void Channel::Leave(uint64 p, bool send)
}
else
{
- Player* plr = ObjectAccessor::FindPlayer(p);
+ Player* player = ObjectAccessor::FindPlayer(p);
if (send)
{
WorldPacket data;
MakeYouLeft(&data);
SendToOne(&data, p);
- if (plr)
- plr->LeftChannel(this);
+ if (player)
+ player->LeftChannel(this);
data.clear();
}
bool changeowner = players[p].IsOwner();
players.erase(p);
- if (m_announce && (!plr || !AccountMgr::IsGMAccount(plr->GetSession()->GetSecurity()) || !sWorld->getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
+ if (m_announce && (!player || !AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()) || !sWorld->getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
{
WorldPacket data;
MakeLeft(&data, p);
@@ -379,11 +379,11 @@ void Channel::UnBan(uint64 good, const char *badname)
void Channel::Password(uint64 p, const char *pass)
{
uint32 sec = 0;
- Player* plr = ObjectAccessor::FindPlayer(p);
- if (plr)
- sec = plr->GetSession()->GetSecurity();
+ Player* player = ObjectAccessor::FindPlayer(p);
+ if (player)
+ sec = player->GetSession()->GetSecurity();
- ChatHandler chat(plr);
+ ChatHandler chat(player);
if (!IsOn(p))
{
@@ -411,11 +411,11 @@ void Channel::Password(uint64 p, const char *pass)
void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
{
- Player* plr = ObjectAccessor::FindPlayer(p);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(p);
+ if (!player)
return;
- uint32 sec = plr->GetSession()->GetSecurity();
+ uint32 sec = player->GetSession()->GetSecurity();
if (!IsOn(p))
{
@@ -453,8 +453,8 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
// allow make moderator from another team only if both is GMs
// at this moment this only way to show channel post for GM from another team
- if ((!AccountMgr::IsGMAccount(plr->GetSession()->GetSecurity()) || !AccountMgr::IsGMAccount(newp->GetSession()->GetSecurity())) &&
- plr->GetTeam() != newp->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if ((!AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()) || !AccountMgr::IsGMAccount(newp->GetSession()->GetSecurity())) &&
+ player->GetTeam() != newp->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakePlayerNotFound(&data, p2n);
@@ -479,11 +479,11 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
void Channel::SetOwner(uint64 p, const char *newname)
{
- Player* plr = ObjectAccessor::FindPlayer(p);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(p);
+ if (!player)
return;
- uint32 sec = plr->GetSession()->GetSecurity();
+ uint32 sec = player->GetSession()->GetSecurity();
if (!IsOn(p))
{
@@ -510,7 +510,7 @@ void Channel::SetOwner(uint64 p, const char *newname)
return;
}
- if (newp->GetTeam() != plr->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if (newp->GetTeam() != player->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakePlayerNotFound(&data, newname);
@@ -563,12 +563,12 @@ void Channel::List(Player* player)
uint32 count = 0;
for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
- Player* plr = ObjectAccessor::FindPlayer(i->first);
+ Player* player = ObjectAccessor::FindPlayer(i->first);
// PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
- if (plr && (!AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) || plr->GetSession()->GetSecurity() <= AccountTypes(gmLevelInWhoList)) &&
- plr->IsVisibleGloballyFor(player))
+ if (player && (!AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) || player->GetSession()->GetSecurity() <= AccountTypes(gmLevelInWhoList)) &&
+ player->IsVisibleGloballyFor(player))
{
data << uint64(i->first);
data << uint8(i->second.flags); // flags seems to be changed...
@@ -585,9 +585,9 @@ void Channel::List(Player* player)
void Channel::Announce(uint64 p)
{
uint32 sec = 0;
- Player* plr = ObjectAccessor::FindPlayer(p);
- if (plr)
- sec = plr->GetSession()->GetSecurity();
+ Player* player = ObjectAccessor::FindPlayer(p);
+ if (player)
+ sec = player->GetSession()->GetSecurity();
if (!IsOn(p))
{
@@ -623,7 +623,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
lang = LANG_UNIVERSAL;
- Player* plr = ObjectAccessor::FindPlayer(p);
+ Player* player = ObjectAccessor::FindPlayer(p);
if (!IsOn(p))
{
@@ -650,7 +650,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
data << p;
data << messageLength;
data << what;
- data << uint8(plr ? plr->chatTag() : 0);
+ data << uint8(player ? player->GetChatTag() : 0);
SendToAll(&data, !players[p].IsModerator() ? p : false);
}
@@ -683,11 +683,11 @@ void Channel::Invite(uint64 p, const char *newname)
return;
}
- Player* plr = ObjectAccessor::FindPlayer(p);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(p);
+ if (!player)
return;
- if (newp->GetTeam() != plr->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if (newp->GetTeam() != player->GetTeam() && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakeInviteWrongFaction(&data);
@@ -749,11 +749,11 @@ void Channel::SendToAll(WorldPacket* data, uint64 p)
{
for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
- Player* plr = ObjectAccessor::FindPlayer(i->first);
- if (plr)
+ Player* player = ObjectAccessor::FindPlayer(i->first);
+ if (player)
{
- if (!p || !plr->GetSocial()->HasIgnore(GUID_LOPART(p)))
- plr->GetSession()->SendPacket(data);
+ if (!p || !player->GetSocial()->HasIgnore(GUID_LOPART(p)))
+ player->GetSession()->SendPacket(data);
}
}
}
@@ -764,18 +764,18 @@ void Channel::SendToAllButOne(WorldPacket* data, uint64 who)
{
if (i->first != who)
{
- Player* plr = ObjectAccessor::FindPlayer(i->first);
- if (plr)
- plr->GetSession()->SendPacket(data);
+ Player* player = ObjectAccessor::FindPlayer(i->first);
+ if (player)
+ player->GetSession()->SendPacket(data);
}
}
}
void Channel::SendToOne(WorldPacket* data, uint64 who)
{
- Player* plr = ObjectAccessor::FindPlayer(who);
- if (plr)
- plr->GetSession()->SendPacket(data);
+ Player* player = ObjectAccessor::FindPlayer(who);
+ if (player)
+ player->GetSession()->SendPacket(data);
}
void Channel::Voice(uint64 /*guid1*/, uint64 /*guid2*/)
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 8d03530c7f9..be43862eaea 100755
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -1051,7 +1051,7 @@ void ChatHandler::FillMessageData(WorldPacket* data, WorldSession* session, uint
*data << uint32(messageLength);
*data << message;
if (session != 0 && type != CHAT_MSG_WHISPER_INFORM && type != CHAT_MSG_DND && type != CHAT_MSG_AFK)
- *data << uint8(session->GetPlayer()->chatTag());
+ *data << uint8(session->GetPlayer()->GetChatTag());
else
*data << uint8(0);
}
@@ -1224,7 +1224,7 @@ GameObject* ChatHandler::GetNearbyGameObject()
GameObject* obj = NULL;
Trinity::NearestGameObjectCheck check(*pl);
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectCheck> searcher(pl, obj, check);
- pl->VisitNearbyGridObject(999, searcher);
+ pl->VisitNearbyGridObject(SIZE_OF_GRIDS, searcher);
return obj;
}
@@ -1240,15 +1240,14 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
if (!obj && sObjectMgr->GetGOData(lowguid)) // guid is DB guid of object
{
// search near player then
- CellPair p(Trinity::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(pl->GetPositionX(), pl->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::GameObjectWithDbGUIDCheck go_check(*pl, lowguid);
Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(pl, obj, go_check);
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
- cell.Visit(p, object_checker, *pl->GetMap());
+ cell.Visit(p, object_checker, *pl->GetMap(), *pl, pl->GetGridActivationRange());
}
return obj;
@@ -1552,9 +1551,9 @@ bool CliHandler::needReportToTarget(Player* /*chr*/) const
return true;
}
-bool ChatHandler::GetPlayerGroupAndGUIDByName(const char* cname, Player* &plr, Group* &group, uint64 &guid, bool offline)
+bool ChatHandler::GetPlayerGroupAndGUIDByName(const char* cname, Player* &player, Group* &group, uint64 &guid, bool offline)
{
- plr = NULL;
+ player = NULL;
guid = 0;
if (cname)
@@ -1569,28 +1568,28 @@ bool ChatHandler::GetPlayerGroupAndGUIDByName(const char* cname, Player* &plr, G
return false;
}
- plr = sObjectAccessor->FindPlayerByName(name.c_str());
+ player = sObjectAccessor->FindPlayerByName(name.c_str());
if (offline)
guid = sObjectMgr->GetPlayerGUIDByName(name.c_str());
}
}
- if (plr)
+ if (player)
{
- group = plr->GetGroup();
+ group = player->GetGroup();
if (!guid || !offline)
- guid = plr->GetGUID();
+ guid = player->GetGUID();
}
else
{
if (getSelectedPlayer())
- plr = getSelectedPlayer();
+ player = getSelectedPlayer();
else
- plr = m_session->GetPlayer();
+ player = m_session->GetPlayer();
if (!guid || !offline)
- guid = plr->GetGUID();
- group = plr->GetGroup();
+ guid = player->GetGUID();
+ group = player->GetGroup();
}
return true;
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index 6e34e39af5a..24652fcc6d5 100755
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -109,7 +109,7 @@ class ChatHandler
uint32 extractSpellIdFromLink(char* text);
uint64 extractGuidFromLink(char* text);
GameTele const* extractGameTeleFromLink(char* text);
- bool GetPlayerGroupAndGUIDByName(const char* cname, Player* &plr, Group* &group, uint64 &guid, bool offline = false);
+ bool GetPlayerGroupAndGUIDByName(const char* cname, Player* &player, Group* &group, uint64 &guid, bool offline = false);
std::string extractPlayerNameFromLink(char* text);
// select by arg (name/link) or in-game selection online/offline player
bool extractPlayerTarget(char* args, Player** player, uint64* player_guid = NULL, std::string* player_name = NULL);
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index c737e2b0b54..f06f8a7e89c 100755
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -713,18 +713,18 @@ bool ChatHandler::HandleGroupSummonCommand(const char* args)
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pl = itr->getSource();
+ Player* player = itr->getSource();
- if (!pl || pl == m_session->GetPlayer() || !pl->GetSession())
+ if (!player || player == m_session->GetPlayer() || !player->GetSession())
continue;
// check online security
- if (HasLowerSecurity(pl, 0))
+ if (HasLowerSecurity(player, 0))
return false;
- std::string plNameLink = GetNameLink(pl);
+ std::string plNameLink = GetNameLink(player);
- if (pl->IsBeingTeleported() == true)
+ if (player->IsBeingTeleported() == true)
{
PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
SetSentErrorMessage(true);
@@ -733,7 +733,7 @@ bool ChatHandler::HandleGroupSummonCommand(const char* args)
if (to_instance)
{
- Map* plMap = pl->GetMap();
+ Map* plMap = player->GetMap();
if (plMap->Instanceable() && plMap->GetInstanceId() != gmMap->GetInstanceId())
{
@@ -745,23 +745,23 @@ bool ChatHandler::HandleGroupSummonCommand(const char* args)
}
PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
- if (needReportToTarget(pl))
- ChatHandler(pl).PSendSysMessage(LANG_SUMMONED_BY, GetNameLink().c_str());
+ if (needReportToTarget(player))
+ ChatHandler(player).PSendSysMessage(LANG_SUMMONED_BY, GetNameLink().c_str());
// stop flight if need
- if (pl->isInFlight())
+ if (player->isInFlight())
{
- pl->GetMotionMaster()->MovementExpired();
- pl->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- pl->SaveRecallPosition();
+ player->SaveRecallPosition();
// before GM
float x, y, z;
- m_session->GetPlayer()->GetClosePoint(x, y, z, pl->GetObjectSize());
- pl->TeleportTo(m_session->GetPlayer()->GetMapId(), x, y, z, pl->GetOrientation());
+ m_session->GetPlayer()->GetClosePoint(x, y, z, player->GetObjectSize());
+ player->TeleportTo(m_session->GetPlayer()->GetMapId(), x, y, z, player->GetOrientation());
}
return true;
diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp
index 9e772e2cde7..763f3654860 100755
--- a/src/server/game/Chat/Commands/Level2.cpp
+++ b/src/server/game/Chat/Commands/Level2.cpp
@@ -895,7 +895,7 @@ bool ChatHandler::HandleCreatePetCommand(const char* /*args*/)
pet->InitPetCreateSpells();
pet->SetFullHealth();
- pet->GetMap()->Add(pet->ToCreature());
+ pet->GetMap()->AddToMap(pet->ToCreature());
// visual effect for levelup
pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel());
@@ -912,8 +912,8 @@ bool ChatHandler::HandlePetLearnCommand(const char* args)
if (!*args)
return false;
- Player* plr = m_session->GetPlayer();
- Pet* pet = plr->GetPet();
+ Player* player = m_session->GetPlayer();
+ Pet* pet = player->GetPet();
if (!pet)
{
@@ -955,8 +955,8 @@ bool ChatHandler::HandlePetUnlearnCommand(const char *args)
if (!*args)
return false;
- Player* plr = m_session->GetPlayer();
- Pet* pet = plr->GetPet();
+ Player* player = m_session->GetPlayer();
+ Pet* pet = player->GetPet();
if (!pet)
{
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index e76cbfcc76b..f4f5892b587 100755
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -256,10 +256,10 @@ bool ChatHandler::HandleAddItemCommand(const char *args)
if (count == 0)
count = 1;
- Player* pl = m_session->GetPlayer();
+ Player* player = m_session->GetPlayer();
Player* plTarget = getSelectedPlayer();
if (!plTarget)
- plTarget = pl;
+ plTarget = player;
sLog->outDetail(GetTrinityString(LANG_ADDITEM), itemId, count);
@@ -298,15 +298,15 @@ bool ChatHandler::HandleAddItemCommand(const char *args)
Item* item = plTarget->StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId));
// remove binding (let GM give it to another player later)
- if (pl == plTarget)
+ if (player == plTarget)
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
- if (Item* item1 = pl->GetItemByPos(itr->pos))
+ if (Item* item1 = player->GetItemByPos(itr->pos))
item1->SetBinding(false);
if (count > 0 && item)
{
- pl->SendNewItem(item, count, false, true);
- if (pl != plTarget)
+ player->SendNewItem(item, count, false, true);
+ if (player != plTarget)
plTarget->SendNewItem(item, count, true, false);
}
@@ -526,7 +526,7 @@ bool ChatHandler::HandleListItemCommand(const char *args)
"SELECT ah.itemguid, ah.itemowner, c.account, c.name FROM auctionhouse ah "
"INNER JOIN characters c ON c.guid = ah.itemowner "
"INNER JOIN item_instance ii ON ii.guid = ah.itemguid "
- "WHERE ii.itemEntry = '%u' AND LIMIT %u", item_id, count);
+ "WHERE ii.itemEntry = '%u' LIMIT %u", item_id, count);
}
else
result = QueryResult(NULL);
@@ -637,9 +637,9 @@ bool ChatHandler::HandleListObjectCommand(const char *args)
if (m_session)
{
- Player* pl = m_session->GetPlayer();
+ Player* player = m_session->GetPlayer();
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
- pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), go_id, uint32(count));
+ player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), go_id, uint32(count));
}
else
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id FROM gameobject WHERE id = '%u' LIMIT %u",
@@ -709,9 +709,9 @@ bool ChatHandler::HandleListCreatureCommand(const char *args)
if (m_session)
{
- Player* pl = m_session->GetPlayer();
+ Player* player = m_session->GetPlayer();
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM creature WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
- pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), cr_id, uint32(count));
+ player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), cr_id, uint32(count));
}
else
result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM creature WHERE id = '%u' LIMIT %u",
@@ -1859,6 +1859,12 @@ bool ChatHandler::HandleDamageCommand(const char * args)
return false;
}
+ if (target->GetTypeId() == TYPEID_PLAYER)
+ {
+ if (HasLowerSecurity((Player*)target, 0, false))
+ return false;
+ }
+
if (!target->isAlive())
return true;
@@ -2671,7 +2677,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'", atLogin, atLogin);
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
+ TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType const& plist = sObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
itr->second->SetAtLoginFlag(atLogin);
@@ -3452,11 +3458,11 @@ bool ChatHandler::HandleBanListIPCommand(const char *args)
bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
{
- Player* pl = m_session->GetPlayer();
+ Player* player = m_session->GetPlayer();
// accept only explicitly selected target (not implicitly self targeting case)
Unit* target = getSelectedUnit();
- if (pl->GetSelection() && target)
+ if (player->GetSelection() && target)
{
if (target->GetTypeId() != TYPEID_UNIT || target->isPet())
{
@@ -3470,16 +3476,15 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
return true;
}
- CellPair p(Trinity::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::RespawnDo u_do;
- Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(pl, u_do);
+ Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(player, u_do);
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
- cell.Visit(p, obj_worker, *pl->GetMap());
+ cell.Visit(p, obj_worker, *player->GetMap(), *player, player->GetGridActivationRange());
return true;
}
@@ -4026,9 +4031,9 @@ bool ChatHandler::HandleComeToMeCommand(const char *args)
caster->SetUnitMovementFlags(newFlags);
- Player* pl = m_session->GetPlayer();
+ Player* player = m_session->GetPlayer();
- caster->GetMotionMaster()->MovePoint(0, pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ());
+ caster->GetMotionMaster()->MovePoint(0, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
return true;
}
@@ -4172,9 +4177,9 @@ bool ChatHandler::HandleInstanceStatsCommand(const char* /*args*/)
bool ChatHandler::HandleInstanceSaveDataCommand(const char * /*args*/)
{
- Player* pl = m_session->GetPlayer();
+ Player* player = m_session->GetPlayer();
- Map* map = pl->GetMap();
+ Map* map = player->GetMap();
if (!map->IsDungeon())
{
PSendSysMessage("Map is not a dungeon.");
@@ -4644,12 +4649,12 @@ bool ChatHandler::HandleListFreezeCommand(const char * /*args*/)
bool ChatHandler::HandleGroupLeaderCommand(const char *args)
{
- Player* plr = NULL;
+ Player* player = NULL;
Group* group = NULL;
uint64 guid = 0;
char* cname = strtok((char*)args, " ");
- if (GetPlayerGroupAndGUIDByName(cname, plr, group, guid))
+ if (GetPlayerGroupAndGUIDByName(cname, player, group, guid))
if (group && group->GetLeaderGUID() != guid)
{
group->ChangeLeader(guid);
@@ -4661,12 +4666,12 @@ bool ChatHandler::HandleGroupLeaderCommand(const char *args)
bool ChatHandler::HandleGroupDisbandCommand(const char *args)
{
- Player* plr = NULL;
+ Player* player = NULL;
Group* group = NULL;
uint64 guid = 0;
char* cname = strtok((char*)args, " ");
- if (GetPlayerGroupAndGUIDByName(cname, plr, group, guid))
+ if (GetPlayerGroupAndGUIDByName(cname, player, group, guid))
if (group)
group->Disband();
@@ -4675,12 +4680,12 @@ bool ChatHandler::HandleGroupDisbandCommand(const char *args)
bool ChatHandler::HandleGroupRemoveCommand(const char *args)
{
- Player* plr = NULL;
+ Player* player = NULL;
Group* group = NULL;
uint64 guid = 0;
char* cname = strtok((char*)args, " ");
- if (GetPlayerGroupAndGUIDByName(cname, plr, group, guid, true))
+ if (GetPlayerGroupAndGUIDByName(cname, player, group, guid, true))
if (group)
group->RemoveMember(guid);
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index faa73cefb11..6815d73d1b3 100755
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -71,6 +71,7 @@ DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt);
DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore(CinematicSequencesEntryfmt);
DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt);
DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
+DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt);
DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt);
DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt);
@@ -292,6 +293,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicSequencesStore, dbcPath, "CinematicSequences.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureDisplayInfoStore, dbcPath, "CreatureDisplayInfo.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureFamilyStore, dbcPath, "CreatureFamily.dbc");
+ LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureModelDataStore, dbcPath, "CreatureModelData.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureSpellDataStore, dbcPath, "CreatureSpellData.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureTypeStore, dbcPath, "CreatureType.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sCurrencyTypesStore, dbcPath, "CurrencyTypes.dbc");
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 367746616d1..7edfaad03f1 100755
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -81,6 +81,7 @@ extern DBCStorage <ChrRacesEntry> sChrRacesStore;
extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore;
extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
+extern DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore;
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index e01acd2e03d..32510da70d3 100755
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -723,7 +723,7 @@ struct CinematicSequencesEntry
struct CreatureDisplayInfoEntry
{
uint32 Displayid; // 0 m_ID
- // 1 m_modelID
+ uint32 ModelId; // 1 m_modelID
// 2 m_soundID
// 3 m_extendedDisplayInfoID
float scale; // 4 m_creatureModelScale
@@ -754,6 +754,28 @@ struct CreatureFamilyEntry
// 27 m_iconFile
};
+struct CreatureModelDataEntry
+{
+ uint32 Id;
+ //uint32 Flags;
+ //char* ModelPath[16]
+ //uint32 Unk1;
+ //float Scale; // Used in calculation of unit collision data
+ //int32 Unk2
+ //int32 Unk3
+ //uint32 Unk4
+ //uint32 Unk5
+ //float Unk6
+ //uint32 Unk7
+ //float Unk8
+ //uint32 Unk9
+ //uint32 Unk10
+ float CollisionWidth;
+ float CollisionHeight;
+ //float Unk11; // Used in calculation of unit collision data when mounted
+ //float Unks[11]
+};
+
#define MAX_CREATURE_SPELL_DATA_SLOT 4
struct CreatureSpellDataEntry
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 5d33a3011ab..d71565d8a39 100755
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -38,8 +38,9 @@ const char ChatChannelsEntryfmt[]="nixssssssssssssssssxxxxxxxxxxxxxxxxxx";
const char ChrClassesEntryfmt[]="nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii";
const char ChrRacesEntryfmt[]="nxixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
const char CinematicSequencesEntryfmt[]="nxxxxxxxxx";
-const char CreatureDisplayInfofmt[]="nxxxfxxxxxxxxxxx";
+const char CreatureDisplayInfofmt[]="nixxfxxxxxxxxxxx";
const char CreatureFamilyfmt[]="nfifiiiiixssssssssssssssssxx";
+const char CreatureModelDatafmt[]="nxxxxxxxxxxxxxffxxxxxxxxxxxx";
const char CreatureSpellDatafmt[]="niiiixxxx";
const char CreatureTypefmt[]="nxxxxxxxxxxxxxxxxxx";
const char CurrencyTypesfmt[]="xnxi";
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 52b41c0a0f7..1364f739663 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -159,12 +159,12 @@ void LFGMgr::Update(uint32 diff)
{
uint64 guid = itRoles->first;
ClearState(guid);
- if (Player* plr = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
{
- plr->GetSession()->SendLfgRoleCheckUpdate(roleCheck);
+ player->GetSession()->SendLfgRoleCheckUpdate(roleCheck);
if (itRoles->first == roleCheck->leader)
- plr->GetSession()->SendLfgJoinResult(LfgJoinResultData(LFG_JOIN_FAILED, LFG_ROLECHECK_MISSING_ROLE));
+ player->GetSession()->SendLfgJoinResult(LfgJoinResultData(LFG_JOIN_FAILED, LFG_ROLECHECK_MISSING_ROLE));
}
}
delete roleCheck;
@@ -226,18 +226,18 @@ void LFGMgr::Update(uint32 diff)
{
guid = itPlayers->first;
SetState(guid, LFG_STATE_PROPOSAL);
- if (Player* plr = ObjectAccessor::FindPlayer(itPlayers->first))
+ if (Player* player = ObjectAccessor::FindPlayer(itPlayers->first))
{
- Group* grp = plr->GetGroup();
+ Group* grp = player->GetGroup();
if (grp)
{
uint64 gguid = grp->GetGUID();
SetState(gguid, LFG_STATE_PROPOSAL);
- plr->GetSession()->SendLfgUpdateParty(LfgUpdateData(LFG_UPDATETYPE_PROPOSAL_BEGIN, GetSelectedDungeons(guid), GetComment(guid)));
+ player->GetSession()->SendLfgUpdateParty(LfgUpdateData(LFG_UPDATETYPE_PROPOSAL_BEGIN, GetSelectedDungeons(guid), GetComment(guid)));
}
else
- plr->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_PROPOSAL_BEGIN, GetSelectedDungeons(guid), GetComment(guid)));
- plr->GetSession()->SendLfgUpdateProposal(m_lfgProposalId, pProposal);
+ player->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_PROPOSAL_BEGIN, GetSelectedDungeons(guid), GetComment(guid)));
+ player->GetSession()->SendLfgUpdateProposal(m_lfgProposalId, pProposal);
}
}
@@ -291,8 +291,8 @@ void LFGMgr::Update(uint32 diff)
}
for (LfgRolesMap::const_iterator itPlayer = queue->roles.begin(); itPlayer != queue->roles.end(); ++itPlayer)
- if (Player* plr = ObjectAccessor::FindPlayer(itPlayer->first))
- plr->GetSession()->SendLfgQueueStatus(dungeonId, waitTime, m_WaitTimeAvg, m_WaitTimeTank, m_WaitTimeHealer, m_WaitTimeDps, queuedTime, queue->tanks, queue->healers, queue->dps);
+ if (Player* player = ObjectAccessor::FindPlayer(itPlayer->first))
+ player->GetSession()->SendLfgQueueStatus(dungeonId, waitTime, m_WaitTimeAvg, m_WaitTimeTank, m_WaitTimeHealer, m_WaitTimeDps, queuedTime, queue->tanks, queue->healers, queue->dps);
}
}
else
@@ -358,13 +358,13 @@ bool LFGMgr::RemoveFromQueue(uint64 guid)
/**
Generate the dungeon lock map for a given player
- @param[in] plr Player we need to initialize the lock status map
+ @param[in] player Player we need to initialize the lock status map
*/
-void LFGMgr::InitializeLockedDungeons(Player* plr)
+void LFGMgr::InitializeLockedDungeons(Player* player)
{
- uint64 guid = plr->GetGUID();
- uint8 level = plr->getLevel();
- uint8 expansion = plr->GetSession()->Expansion();
+ uint64 guid = player->GetGUID();
+ uint8 level = player->getLevel();
+ uint8 expansion = player->GetSession()->Expansion();
LfgDungeonSet dungeons = GetDungeonsByRandom(0);
LfgLockMap lock;
@@ -379,9 +379,9 @@ void LFGMgr::InitializeLockedDungeons(Player* plr)
LfgLockStatusType locktype = LFG_LOCKSTATUS_OK;
if (dungeon->expansion > expansion)
locktype = LFG_LOCKSTATUS_INSUFFICIENT_EXPANSION;
- else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, plr))
+ else if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, dungeon->map, player))
locktype = LFG_LOCKSTATUS_RAID_LOCKED;
- else if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL && plr->GetBoundInstance(dungeon->map, Difficulty(dungeon->difficulty)))
+ else if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL && player->GetBoundInstance(dungeon->map, Difficulty(dungeon->difficulty)))
locktype = LFG_LOCKSTATUS_RAID_LOCKED;
else if (dungeon->minlevel > level)
locktype = LFG_LOCKSTATUS_TOO_LOW_LEVEL;
@@ -389,19 +389,19 @@ void LFGMgr::InitializeLockedDungeons(Player* plr)
locktype = LFG_LOCKSTATUS_TOO_HIGH_LEVEL;
else if (locktype == LFG_LOCKSTATUS_OK && ar)
{
- if (ar->achievement && !plr->GetAchievementMgr().HasAchieved(sAchievementStore.LookupEntry(ar->achievement)))
+ if (ar->achievement && !player->GetAchievementMgr().HasAchieved(sAchievementStore.LookupEntry(ar->achievement)))
locktype = LFG_LOCKSTATUS_RAID_LOCKED; // FIXME: Check the correct lock value
- else if (plr->GetTeam() == ALLIANCE && ar->quest_A && !plr->GetQuestRewardStatus(ar->quest_A))
+ else if (player->GetTeam() == ALLIANCE && ar->quest_A && !player->GetQuestRewardStatus(ar->quest_A))
locktype = LFG_LOCKSTATUS_QUEST_NOT_COMPLETED;
- else if (plr->GetTeam() == HORDE && ar->quest_H && !plr->GetQuestRewardStatus(ar->quest_H))
+ else if (player->GetTeam() == HORDE && ar->quest_H && !player->GetQuestRewardStatus(ar->quest_H))
locktype = LFG_LOCKSTATUS_QUEST_NOT_COMPLETED;
else
if (ar->item)
{
- if (!plr->HasItemCount(ar->item, 1) && (!ar->item2 || !plr->HasItemCount(ar->item2, 1)))
+ if (!player->HasItemCount(ar->item, 1) && (!ar->item2 || !player->HasItemCount(ar->item2, 1)))
locktype = LFG_LOCKSTATUS_MISSING_ITEM;
}
- else if (ar->item2 && !plr->HasItemCount(ar->item2, 1))
+ else if (ar->item2 && !player->HasItemCount(ar->item2, 1))
locktype = LFG_LOCKSTATUS_MISSING_ITEM;
}
/* TODO VoA closed if WG is not under team control (LFG_LOCKSTATUS_RAID_LOCKED)
@@ -423,18 +423,18 @@ void LFGMgr::InitializeLockedDungeons(Player* plr)
of the group tying to join the group. Join conditions are checked before adding
to the new queue.
- @param[in] plr Player trying to join (or leader of group trying to join)
+ @param[in] player Player trying to join (or leader of group trying to join)
@param[in] roles Player selected roles
@param[in] dungeons Dungeons the player/group is applying for
@param[in] comment Player selected comment
*/
-void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeons, const std::string& comment)
+void LFGMgr::Join(Player* player, uint8 roles, const LfgDungeonSet& selectedDungeons, const std::string& comment)
{
- if (!plr || !plr->GetSession() || selectedDungeons.empty())
+ if (!player || !player->GetSession() || selectedDungeons.empty())
return;
- Group* grp = plr->GetGroup();
- uint64 guid = plr->GetGUID();
+ Group* grp = player->GetGroup();
+ uint64 guid = player->GetGUID();
uint64 gguid = grp ? grp->GetGUID() : guid;
LfgJoinResultData joinData;
PlayerSet players;
@@ -457,7 +457,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
if (playerDungeons == dungeons) // Joining the same dungeons -- Send OK
{
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, dungeons, comment);
- plr->GetSession()->SendLfgJoinResult(joinData); // Default value of joinData.result = LFG_JOIN_OK
+ player->GetSession()->SendLfgJoinResult(joinData); // Default value of joinData.result = LFG_JOIN_OK
if (grp)
{
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
@@ -471,11 +471,11 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
}
// Check player or group member restrictions
- if (plr->InBattleground() || plr->InArena() || plr->InBattlegroundQueue())
+ if (player->InBattleground() || player->InArena() || player->InBattlegroundQueue())
joinData.result = LFG_JOIN_USING_BG_SYSTEM;
- else if (plr->HasAura(LFG_SPELL_DUNGEON_DESERTER))
+ else if (player->HasAura(LFG_SPELL_DUNGEON_DESERTER))
joinData.result = LFG_JOIN_DESERTER;
- else if (plr->HasAura(LFG_SPELL_DUNGEON_COOLDOWN))
+ else if (player->HasAura(LFG_SPELL_DUNGEON_COOLDOWN))
joinData.result = LFG_JOIN_RANDOM_COOLDOWN;
else if (dungeons.empty())
joinData.result = LFG_JOIN_NOT_MEET_REQS;
@@ -505,7 +505,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
}
}
else
- players.insert(plr);
+ players.insert(player);
// Check if all dungeons are valid
bool isRaid = false;
@@ -559,7 +559,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: %u", guid, grp ? grp->GetMembersCount() : 1, joinData.result);
if (!dungeons.empty()) // Only should show lockmap when have no dungeons available
joinData.lockmap.clear();
- plr->GetSession()->SendLfgJoinResult(joinData);
+ player->GetSession()->SendLfgJoinResult(joinData);
return;
}
@@ -612,7 +612,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
// Queue player
LfgQueueInfo* pqInfo = new LfgQueueInfo();
pqInfo->joinTime = time_t(time(NULL));
- pqInfo->roles[plr->GetGUID()] = roles;
+ pqInfo->roles[player->GetGUID()] = roles;
pqInfo->dungeons = dungeons;
if (roles & ROLE_TANK)
--pqInfo->tanks;
@@ -623,8 +623,8 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
m_QueueInfoMap[guid] = pqInfo;
// Send update to player
- plr->GetSession()->SendLfgJoinResult(joinData);
- plr->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_JOIN_PROPOSAL, dungeons, comment));
+ player->GetSession()->SendLfgJoinResult(joinData);
+ player->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_JOIN_PROPOSAL, dungeons, comment));
SetState(gguid, LFG_STATE_QUEUED);
SetRoles(guid, roles);
if (!isContinue)
@@ -636,7 +636,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
}
SetSelectedDungeons(guid, dungeons);
}
- AddToQueue(guid, uint8(plr->GetTeam()));
+ AddToQueue(guid, uint8(player->GetTeam()));
}
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] joined with %u members. dungeons: %u", guid, grp ? grp->GetMembersCount() : 1, uint8(dungeons.size()));
}
@@ -645,15 +645,15 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
Leaves Dungeon System. Player/Group is removed from queue, rolechecks, proposals
or votekicks. Player or group needs to be not NULL and using Dungeon System
- @param[in] plr Player trying to leave (can be NULL)
+ @param[in] player Player trying to leave (can be NULL)
@param[in] grp Group trying to leave (default NULL)
*/
-void LFGMgr::Leave(Player* plr, Group* grp /* = NULL*/)
+void LFGMgr::Leave(Player* player, Group* grp /* = NULL*/)
{
- if (!plr && !grp)
+ if (!player && !grp)
return;
- uint64 guid = grp ? grp->GetGUID() : plr->GetGUID();
+ uint64 guid = grp ? grp->GetGUID() : player->GetGUID();
LfgState state = GetState(guid);
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Leave: [" UI64FMTD "]", guid);
@@ -676,7 +676,7 @@ void LFGMgr::Leave(Player* plr, Group* grp /* = NULL*/)
}
else
{
- plr->GetSession()->SendLfgUpdatePlayer(updateData);
+ player->GetSession()->SendLfgUpdatePlayer(updateData);
ClearState(guid);
}
}
@@ -689,7 +689,7 @@ void LFGMgr::Leave(Player* plr, Group* grp /* = NULL*/)
{
// Remove from Proposals
LfgProposalMap::iterator it = m_Proposals.begin();
- uint64 guid = plr ? plr->GetGUID() : grp->GetLeaderGUID();
+ uint64 guid = player ? player->GetGUID() : grp->GetLeaderGUID();
while (it != m_Proposals.end())
{
LfgProposalPlayerMap::iterator itPlayer = it->second->players.find(guid);
@@ -866,22 +866,22 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal)
PlayerSet players;
for (LfgRolesMap::const_iterator it = rolesMap.begin(); it != rolesMap.end(); ++it)
{
- Player* plr = ObjectAccessor::FindPlayer(it->first);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(it->first);
+ if (!player)
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Warning! [" UI64FMTD "] offline! Marking as not compatibles!", strGuids.c_str(), it->first);
else
{
- for (PlayerSet::const_iterator itPlayer = players.begin(); itPlayer != players.end() && plr; ++itPlayer)
+ for (PlayerSet::const_iterator itPlayer = players.begin(); itPlayer != players.end() && player; ++itPlayer)
{
// Do not form a group with ignoring candidates
- if (plr->GetSocial()->HasIgnore((*itPlayer)->GetGUIDLow()) || (*itPlayer)->GetSocial()->HasIgnore(plr->GetGUIDLow()))
+ if (player->GetSocial()->HasIgnore((*itPlayer)->GetGUIDLow()) || (*itPlayer)->GetSocial()->HasIgnore(player->GetGUIDLow()))
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Players [" UI64FMTD "] and [" UI64FMTD "] ignoring", strGuids.c_str(), (*itPlayer)->GetGUID(), plr->GetGUID());
- plr = NULL;
+ sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Players [" UI64FMTD "] and [" UI64FMTD "] ignoring", strGuids.c_str(), (*itPlayer)->GetGUID(), player->GetGUID());
+ player = NULL;
}
}
- if (plr)
- players.insert(plr);
+ if (player)
+ players.insert(player);
}
}
@@ -1276,18 +1276,18 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept)
bool allAnswered = true;
for (LfgProposalPlayerMap::const_iterator itPlayers = pProposal->players.begin(); itPlayers != pProposal->players.end(); ++itPlayers)
{
- if (Player* plr = ObjectAccessor::FindPlayer(itPlayers->first))
+ if (Player* player = ObjectAccessor::FindPlayer(itPlayers->first))
{
if (itPlayers->first == pProposal->leader)
- players.push_front(plr);
+ players.push_front(player);
else
- players.push_back(plr);
+ players.push_back(player);
// Only teleport new players
- Group* grp = plr->GetGroup();
+ Group* grp = player->GetGroup();
uint64 gguid = grp ? grp->GetGUID() : 0;
if (!gguid || !grp->isLFGGroup() || GetState(gguid) == LFG_STATE_FINISHED_DUNGEON)
- playersToTeleport.push_back(plr);
+ playersToTeleport.push_back(player);
}
if (itPlayers->second->accept != LFG_ANSWER_AGREE) // No answer (-1) or not accepted (0)
@@ -1329,31 +1329,31 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept)
Group* grp = pProposal->groupLowGuid ? sGroupMgr->GetGroupByGUID(pProposal->groupLowGuid) : NULL;
for (LfgPlayerList::const_iterator it = players.begin(); it != players.end(); ++it)
{
- Player* plr = (*it);
- uint64 pguid = plr->GetGUID();
- Group* group = plr->GetGroup();
+ Player* player = (*it);
+ uint64 pguid = player->GetGUID();
+ Group* group = player->GetGroup();
if (sendUpdate)
- plr->GetSession()->SendLfgUpdateProposal(proposalId, pProposal);
+ player->GetSession()->SendLfgUpdateProposal(proposalId, pProposal);
if (group)
{
- plr->GetSession()->SendLfgUpdateParty(updateData);
+ player->GetSession()->SendLfgUpdateParty(updateData);
if (group != grp)
- plr->RemoveFromGroup();
+ player->RemoveFromGroup();
}
else
- plr->GetSession()->SendLfgUpdatePlayer(updateData);
+ player->GetSession()->SendLfgUpdatePlayer(updateData);
if (!grp)
{
grp = new Group();
- grp->Create(plr);
+ grp->Create(player);
grp->ConvertToLFG();
uint64 gguid = grp->GetGUID();
SetState(gguid, LFG_STATE_PROPOSAL);
sGroupMgr->AddGroup(grp);
}
else if (group != grp)
- grp->AddMember(plr);
+ grp->AddMember(player);
// Update timers
uint8 role = GetRoles(pguid);
@@ -1363,25 +1363,25 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept)
case ROLE_DAMAGE:
{
uint32 old_number = m_NumWaitTimeDps++;
- m_WaitTimeDps = int32((m_WaitTimeDps * old_number + waitTimesMap[plr->GetGUID()]) / m_NumWaitTimeDps);
+ m_WaitTimeDps = int32((m_WaitTimeDps * old_number + waitTimesMap[player->GetGUID()]) / m_NumWaitTimeDps);
break;
}
case ROLE_HEALER:
{
uint32 old_number = m_NumWaitTimeHealer++;
- m_WaitTimeHealer = int32((m_WaitTimeHealer * old_number + waitTimesMap[plr->GetGUID()]) / m_NumWaitTimeHealer);
+ m_WaitTimeHealer = int32((m_WaitTimeHealer * old_number + waitTimesMap[player->GetGUID()]) / m_NumWaitTimeHealer);
break;
}
case ROLE_TANK:
{
uint32 old_number = m_NumWaitTimeTank++;
- m_WaitTimeTank = int32((m_WaitTimeTank * old_number + waitTimesMap[plr->GetGUID()]) / m_NumWaitTimeTank);
+ m_WaitTimeTank = int32((m_WaitTimeTank * old_number + waitTimesMap[player->GetGUID()]) / m_NumWaitTimeTank);
break;
}
default:
{
uint32 old_number = m_NumWaitTimeAvg++;
- m_WaitTimeAvg = int32((m_WaitTimeAvg * old_number + waitTimesMap[plr->GetGUID()]) / m_NumWaitTimeAvg);
+ m_WaitTimeAvg = int32((m_WaitTimeAvg * old_number + waitTimesMap[player->GetGUID()]) / m_NumWaitTimeAvg);
break;
}
}
@@ -1454,15 +1454,15 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t
// Notify players
for (LfgProposalPlayerMap::const_iterator it = pProposal->players.begin(); it != pProposal->players.end(); ++it)
{
- Player* plr = ObjectAccessor::FindPlayer(it->first);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(it->first);
+ if (!player)
continue;
- team = uint8(plr->GetTeam());
- plr->GetSession()->SendLfgUpdateProposal(itProposal->first, pProposal);
+ team = uint8(player->GetTeam());
+ player->GetSession()->SendLfgUpdateProposal(itProposal->first, pProposal);
- Group* grp = plr->GetGroup();
- uint64 guid = plr->GetGUID();
+ Group* grp = player->GetGroup();
+ uint64 guid = player->GetGUID();
uint64 gguid = it->second->groupLowGuid ? MAKE_NEW_GUID(it->second->groupLowGuid, 0, HIGHGUID_GROUP) : guid;
if (toRemove.find(gguid) != toRemove.end()) // Didn't accept or in same group that someone that didn't accept
@@ -1482,10 +1482,10 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t
if (grp)
{
RestoreState(gguid);
- plr->GetSession()->SendLfgUpdateParty(updateData);
+ player->GetSession()->SendLfgUpdateParty(updateData);
}
else
- plr->GetSession()->SendLfgUpdatePlayer(updateData);
+ player->GetSession()->SendLfgUpdatePlayer(updateData);
}
else
{
@@ -1494,10 +1494,10 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t
if (grp)
{
SetState(gguid, LFG_STATE_QUEUED);
- plr->GetSession()->SendLfgUpdateParty(LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, GetSelectedDungeons(guid), GetComment(guid)));
+ player->GetSession()->SendLfgUpdateParty(LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, GetSelectedDungeons(guid), GetComment(guid)));
}
else
- plr->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, GetSelectedDungeons(guid), GetComment(guid)));
+ player->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, GetSelectedDungeons(guid), GetComment(guid)));
}
}
@@ -1572,17 +1572,17 @@ void LFGMgr::InitBoot(Group* grp, uint64 kicker, uint64 victim, std::string reas
/**
Update Boot info with player answer
- @param[in] plr Player who has answered
+ @param[in] player Player who has answered
@param[in] accept player answer
*/
-void LFGMgr::UpdateBoot(Player* plr, bool accept)
+void LFGMgr::UpdateBoot(Player* player, bool accept)
{
- Group* grp = plr ? plr->GetGroup() : NULL;
+ Group* grp = player ? player->GetGroup() : NULL;
if (!grp)
return;
uint32 bootId = grp->GetLowGUID();
- uint64 guid = plr->GetGUID();
+ uint64 guid = player->GetGUID();
LfgPlayerBootMap::iterator itBoot = m_Boots.find(bootId);
if (itBoot == m_Boots.end())
@@ -1647,29 +1647,29 @@ void LFGMgr::UpdateBoot(Player* plr, bool accept)
/**
Teleports the player in or out the dungeon
- @param[in] plr Player to teleport
+ @param[in] player Player to teleport
@param[in] out Teleport out (true) or in (false)
@param[in] fromOpcode Function called from opcode handlers? (Default false)
*/
-void LFGMgr::TeleportPlayer(Player* plr, bool out, bool fromOpcode /*= false*/)
+void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*/)
{
- sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::TeleportPlayer: [" UI64FMTD "] is being teleported %s", plr->GetGUID(), out ? "out" : "in");
+ sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::TeleportPlayer: [" UI64FMTD "] is being teleported %s", player->GetGUID(), out ? "out" : "in");
if (out)
{
- plr->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
- plr->TeleportToBGEntryPoint();
+ player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
+ player->TeleportToBGEntryPoint();
return;
}
// TODO Add support for LFG_TELEPORTERROR_FATIGUE
LfgTeleportError error = LFG_TELEPORTERROR_OK;
- Group* grp = plr->GetGroup();
+ Group* grp = player->GetGroup();
if (!grp || !grp->isLFGGroup()) // should never happen, but just in case...
error = LFG_TELEPORTERROR_INVALID_LOCATION;
- else if (!plr->isAlive())
+ else if (!player->isAlive())
error = LFG_TELEPORTERROR_PLAYER_DEAD;
- else if (plr->IsFalling() || plr->HasUnitState(UNIT_STAT_JUMPING))
+ else if (player->IsFalling() || player->HasUnitState(UNIT_STAT_JUMPING))
error = LFG_TELEPORTERROR_FALLING;
else
{
@@ -1678,7 +1678,7 @@ void LFGMgr::TeleportPlayer(Player* plr, bool out, bool fromOpcode /*= false*/)
if (!dungeon)
error = LFG_TELEPORTERROR_INVALID_LOCATION;
- else if (plr->GetMapId() != uint32(dungeon->map)) // Do not teleport players in dungeon to the entrance
+ else if (player->GetMapId() != uint32(dungeon->map)) // Do not teleport players in dungeon to the entrance
{
uint32 mapid = 0;
float x = 0;
@@ -1692,7 +1692,7 @@ void LFGMgr::TeleportPlayer(Player* plr, bool out, bool fromOpcode /*= false*/)
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL && !mapid; itr = itr->next())
{
Player* plrg = itr->getSource();
- if (plrg && plrg != plr && plrg->GetMapId() == uint32(dungeon->map))
+ if (plrg && plrg != player && plrg->GetMapId() == uint32(dungeon->map))
{
mapid = plrg->GetMapId();
x = plrg->GetPositionX();
@@ -1708,7 +1708,7 @@ void LFGMgr::TeleportPlayer(Player* plr, bool out, bool fromOpcode /*= false*/)
AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(dungeon->map);
if (!at)
{
- sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", plr->GetGUID(), dungeon->map, dungeon->difficulty);
+ sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty);
error = LFG_TELEPORTERROR_INVALID_LOCATION;
}
else
@@ -1723,36 +1723,36 @@ void LFGMgr::TeleportPlayer(Player* plr, bool out, bool fromOpcode /*= false*/)
if (error == LFG_TELEPORTERROR_OK)
{
- if (!plr->GetMap()->IsDungeon() && !plr->GetMap()->IsRaid())
- plr->SetBattlegroundEntryPoint();
+ if (!player->GetMap()->IsDungeon() && !player->GetMap()->IsRaid())
+ player->SetBattlegroundEntryPoint();
- if (plr->isInFlight())
+ if (player->isInFlight())
{
- plr->GetMotionMaster()->MovementExpired();
- plr->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
- if (plr->TeleportTo(mapid, x, y, z, orientation))
+ if (player->TeleportTo(mapid, x, y, z, orientation))
// FIXME - HACK - this should be done by teleport, when teleporting far
- plr->RemoveAurasByType(SPELL_AURA_MOUNTED);
+ player->RemoveAurasByType(SPELL_AURA_MOUNTED);
else
{
error = LFG_TELEPORTERROR_INVALID_LOCATION;
- sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", plr->GetGUID(), mapid);
+ sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", player->GetGUID(), mapid);
}
}
}
}
if (error != LFG_TELEPORTERROR_OK)
- plr->GetSession()->SendLfgTeleportError(uint8(error));
+ player->GetSession()->SendLfgTeleportError(uint8(error));
}
/**
Give completion reward to player
@param[in] dungeonId Id of the dungeon finished
- @param[in] plr Player to reward
+ @param[in] player Player to reward
*/
void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player)
{
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index 300268ed7c8..95cb2e81869 100755
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -268,8 +268,8 @@ class LFGMgr
LfgReward const* GetRandomDungeonReward(uint32 dungeon, uint8 level);
// Queue
- void Join(Player* plr, uint8 roles, const LfgDungeonSet& dungeons, const std::string& comment);
- void Leave(Player* plr, Group* grp = NULL);
+ void Join(Player* player, uint8 roles, const LfgDungeonSet& dungeons, const std::string& comment);
+ void Leave(Player* player, Group* grp = NULL);
// Role Check
void UpdateRoleCheck(uint64 gguid, uint64 guid = 0, uint8 roles = ROLE_NONE);
@@ -278,20 +278,21 @@ class LFGMgr
void UpdateProposal(uint32 proposalId, uint64 guid, bool accept);
// Teleportation
- void TeleportPlayer(Player* plr, bool out, bool fromOpcode = false);
+ void TeleportPlayer(Player* player, bool out, bool fromOpcode = false);
// Vote kick
void InitBoot(Group* grp, uint64 kguid, uint64 vguid, std::string reason);
- void UpdateBoot(Player* plr, bool accept);
+ void UpdateBoot(Player* player, bool accept);
void OfferContinue(Group* grp);
- void InitializeLockedDungeons(Player* plr);
+ void InitializeLockedDungeons(Player* player);
void SetComment(uint64 guid, const std::string& comment);
const LfgLockMap& GetLockedDungeons(uint64 guid);
LfgState GetState(uint64 guid);
const LfgDungeonSet& GetSelectedDungeons(uint64 guid);
uint32 GetDungeon(uint64 guid, bool asId = true);
+ void SetState(uint64 guid, LfgState state);
void ClearState(uint64 guid);
void RemovePlayerData(uint64 guid);
void RemoveGroupData(uint64 guid);
@@ -304,7 +305,6 @@ class LFGMgr
uint8 GetRoles(uint64 guid);
const std::string& GetComment(uint64 gguid);
void RestoreState(uint64 guid);
- void SetState(uint64 guid, LfgState state);
void SetDungeon(uint64 guid, uint32 dungeon);
void SetSelectedDungeons(uint64 guid, const LfgDungeonSet& dungeons);
void SetLockedDungeons(uint64 guid, const LfgLockMap& lock);
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index 23eb10a98ae..42119a02ef8 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -51,8 +51,8 @@ void LFGScripts::OnAddMember(Group* group, uint64 guid)
sLFGMgr->Leave(NULL, group);
if (sLFGMgr->GetState(guid) == LFG_STATE_QUEUED)
- if (Player* plr = ObjectAccessor::FindPlayer(guid))
- sLFGMgr->Leave(plr);
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
+ sLFGMgr->Leave(player);
}
void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, const char* reason)
@@ -82,7 +82,8 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod method,
}
sLFGMgr->ClearState(guid);
- if (Player* plr = ObjectAccessor::FindPlayer(guid))
+ sLFGMgr->SetState(guid, LFG_STATE_NONE);
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
{
/*
if (method == GROUP_REMOVEMETHOD_LEAVE)
@@ -92,9 +93,9 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod method,
*/
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_LEADER);
- plr->GetSession()->SendLfgUpdateParty(updateData);
- if (plr->GetMap()->IsDungeon()) // Teleport player out the dungeon
- sLFGMgr->TeleportPlayer(plr, true);
+ player->GetSession()->SendLfgUpdateParty(updateData);
+ if (player->GetMap()->IsDungeon()) // Teleport player out the dungeon
+ sLFGMgr->TeleportPlayer(player, true);
}
if (sLFGMgr->GetState(gguid) != LFG_STATE_FINISHED_DUNGEON)// Need more players to finish the dungeon
@@ -116,17 +117,17 @@ void LFGScripts::OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLe
return;
sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid);
- Player* plr = ObjectAccessor::FindPlayer(newLeaderGuid);
+ Player* player = ObjectAccessor::FindPlayer(newLeaderGuid);
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_LEADER);
- if (plr)
- plr->GetSession()->SendLfgUpdateParty(updateData);
+ if (player)
+ player->GetSession()->SendLfgUpdateParty(updateData);
- plr = ObjectAccessor::FindPlayer(oldLeaderGuid);
- if (plr)
+ player = ObjectAccessor::FindPlayer(oldLeaderGuid);
+ if (player)
{
updateData.updateType = LFG_UPDATETYPE_GROUP_DISBAND;
- plr->GetSession()->SendLfgUpdateParty(updateData);
+ player->GetSession()->SendLfgUpdateParty(updateData);
}
}
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index cdd5d61b1c9..31cc21659c9 100755
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -95,7 +95,7 @@ bool Corpse::Create(uint32 guidlow, Player* owner)
SetFloatValue(OBJECT_FIELD_SCALE_X, 1);
SetUInt64Value(CORPSE_FIELD_OWNER, owner->GetGUID());
- m_grid = Trinity::ComputeGridPair(GetPositionX(), GetPositionY());
+ _gridCoord = Trinity::ComputeGridCoord(GetPositionX(), GetPositionY());
return true;
}
@@ -211,7 +211,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field* fields)
return false;
}
- m_grid = Trinity::ComputeGridPair(GetPositionX(), GetPositionY());
+ _gridCoord = Trinity::ComputeGridCoord(GetPositionX(), GetPositionY());
return true;
}
diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h
index bd68eb688f5..2e45606b88f 100755
--- a/src/server/game/Entities/Corpse/Corpse.h
+++ b/src/server/game/Entities/Corpse/Corpse.h
@@ -70,8 +70,8 @@ class Corpse : public WorldObject, public GridObject<Corpse>
void ResetGhostTime() { m_time = time(NULL); }
CorpseType GetType() const { return m_type; }
- GridPair const& GetGrid() const { return m_grid; }
- void SetGrid(GridPair const& grid) { m_grid = grid; }
+ GridCoord const& GetGridCoord() const { return _gridCoord; }
+ void SetGridCoord(GridCoord const& gridCoord) { _gridCoord = gridCoord; }
Loot loot; // remove insignia ONLY at BG
Player* lootRecipient;
@@ -88,7 +88,7 @@ class Corpse : public WorldObject, public GridObject<Corpse>
private:
CorpseType m_type;
time_t m_time;
- GridPair m_grid; // gride for corpse position for fast search
+ GridCoord _gridCoord; // gride for corpse position for fast search
};
#endif
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index a8e219f4f6b..922db88bcd0 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -137,7 +137,7 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
return true;
}
-Creature::Creature(): Unit(),
+Creature::Creature(): Unit(), MapCreature(),
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLowGUID(0),
m_PlayerDamageReq(0), m_lootMoney(0), m_lootRecipient(0), m_lootRecipientGroup(0), m_corpseRemoveTime(0), m_respawnTime(0),
m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE),
@@ -245,7 +245,7 @@ void Creature::RemoveCorpse(bool setSpawnTime)
m_respawnTime = time(NULL) + respawnDelay;
float x, y, z, o;
- GetRespawnCoord(x, y, z, &o);
+ GetRespawnPosition(x, y, z, &o);
SetHomePosition(x, y, z, o);
GetMap()->CreatureRelocation(this, x, y, z, o);
}
@@ -659,9 +659,8 @@ void Creature::DoFleeToGetAssistance()
{
Creature* creature = NULL;
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);
Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck> searcher(this, creature, u_check);
@@ -788,16 +787,11 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
LastUsedScriptID = GetCreatureInfo()->ScriptID;
// TODO: Replace with spell, handle from DB
- if (isSpiritHealer())
+ if (isSpiritHealer() || isSpiritGuide())
{
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
}
- else if (isSpiritGuide())
- {
- m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST | GHOST_VISIBILITY_ALIVE);
- m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST | GHOST_VISIBILITY_ALIVE);
- }
if (Entry == VISUAL_WAYPOINT)
SetVisible(false);
@@ -1285,7 +1279,7 @@ bool Creature::LoadFromDB(uint32 guid, Map* map)
if (canFly())
{
float tz = map->GetHeight(data->posX, data->posY, data->posZ, false);
- if (data->posZ - tz > 0.1)
+ if (data->posZ - tz > 0.1f)
Relocate(data->posX, data->posY, tz);
}
}
@@ -1382,22 +1376,19 @@ void Creature::DeleteFromDB()
WorldDatabase.CommitTransaction(trans);
}
-bool Creature::isVisibleForInState(WorldObject const* seer) const
+bool Creature::IsInvisibleDueToDespawn() const
{
- if (!Unit::isVisibleForInState(seer))
- return false;
+ if (Unit::IsInvisibleDueToDespawn())
+ return true;
if (isAlive() || m_corpseRemoveTime > time(NULL))
- return true;
+ return false;
- return false;
+ return true;
}
-bool Creature::canSeeAlways(WorldObject const* obj) const
+bool Creature::CanAlwaysSee(WorldObject const* obj) const
{
- if (Unit::canSeeAlways(obj))
- return true;
-
if (IsAIEnabled && AI()->CanSeeAlways(obj))
return true;
@@ -1442,14 +1433,14 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
return IsWithinLOSInMap(who);
}
-float Creature::GetAttackDistance(Unit const* pl) const
+float Creature::GetAttackDistance(Unit const* player) const
{
float aggroRate = sWorld->getRate(RATE_CREATURE_AGGRO);
if (aggroRate == 0)
return 0.0f;
- uint32 playerlevel = pl->getLevelForTarget(this);
- uint32 creaturelevel = getLevelForTarget(pl);
+ uint32 playerlevel = player->getLevelForTarget(this);
+ uint32 creaturelevel = getLevelForTarget(player);
int32 leveldif = int32(playerlevel) - int32(creaturelevel);
@@ -1470,7 +1461,7 @@ float Creature::GetAttackDistance(Unit const* pl) const
RetDistance += GetTotalAuraModifier(SPELL_AURA_MOD_DETECT_RANGE);
// detected range auras
- RetDistance += pl->GetTotalAuraModifier(SPELL_AURA_MOD_DETECTED_RANGE);
+ RetDistance += player->GetTotalAuraModifier(SPELL_AURA_MOD_DETECTED_RANGE);
}
// "Minimum Aggro Radius for a mob seems to be combat range (5 yards)"
@@ -1763,9 +1754,8 @@ SpellInfo const* Creature::reachWithSpellCure(Unit* pVictim)
// select nearest hostile unit within the given distance (regardless of threat list).
Unit* Creature::SelectNearestTarget(float dist) const
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* target = NULL;
@@ -1790,9 +1780,8 @@ Unit* Creature::SelectNearestTarget(float dist) const
// select nearest hostile unit within the given attack distance (i.e. distance is ignored if > than ATTACK_DISTANCE), regardless of threat list.
Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* target = NULL;
@@ -1853,9 +1842,8 @@ void Creature::CallAssistance()
std::list<Creature*> assistList;
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AnyAssistCreatureInRangeCheck u_check(this, getVictim(), radius);
@@ -1881,22 +1869,21 @@ void Creature::CallAssistance()
}
}
-void Creature::CallForHelp(float fRadius)
+void Creature::CallForHelp(float radius)
{
- if (fRadius <= 0.0f || !getVictim() || isPet() || isCharmed())
+ if (radius <= 0.0f || !getVictim() || isPet() || isCharmed())
return;
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
- Trinity::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius);
+ Trinity::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), radius);
Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo> worker(this, u_do);
TypeContainerVisitor<Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker);
- cell.Visit(p, grid_creature_searcher, *GetMap(), *this, fRadius);
+ cell.Visit(p, grid_creature_searcher, *GetMap(), *this, radius);
}
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const
@@ -2208,7 +2195,7 @@ time_t Creature::GetRespawnTimeEx() const
return now;
}
-void Creature::GetRespawnCoord(float &x, float &y, float &z, float* ori, float* dist) const
+void Creature::GetRespawnPosition(float &x, float &y, float &z, float* ori, float* dist) const
{
if (m_DBTableGuid)
{
@@ -2386,21 +2373,28 @@ const char* Creature::GetNameForLocaleIdx(LocaleConstant loc_idx) const
return GetName();
}
+//Do not if this works or not, moving creature to another map is very dangerous
void Creature::FarTeleportTo(Map* map, float X, float Y, float Z, float O)
{
- InterruptNonMeleeSpells(true);
- CombatStop();
- ClearComboPointHolders();
- DeleteThreatList();
- GetMotionMaster()->Clear(false);
- DestroyForNearbyPlayers();
-
- RemoveFromWorld();
- ResetMap();
+ CleanupBeforeRemoveFromMap(false);
+ GetMap()->RemoveFromMap(this, false);
+ Relocate(X, Y, Z, O);
SetMap(map);
- AddToWorld();
+ GetMap()->AddToMap(this);
+}
+
+void Creature::SetPosition(float x, float y, float z, float o)
+{
+ // prevent crash when a bad coord is sent by the client
+ if (!Trinity::IsValidMapCoord(x, y, z, o))
+ {
+ sLog->outDebug(LOG_FILTER_UNITS, "Creature::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
+ return;
+ }
- SetPosition(X, Y, Z, O, true);
+ GetMap()->CreatureRelocation(ToCreature(), x, y, z, o);
+ if (IsVehicle())
+ GetVehicleKit()->RelocatePassengers(x, y, z, o);
}
bool Creature::IsDungeonBoss() const
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 3d5b86a106a..665942e134a 100755
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -156,7 +156,7 @@ struct CreatureTemplate
else if (type_flags & CREATURE_TYPEFLAGS_MININGLOOT)
return SKILL_MINING;
else if (type_flags & CREATURE_TYPEFLAGS_ENGINEERLOOT)
- return SKILL_ENGINERING;
+ return SKILL_ENGINEERING;
else
return SKILL_SKINNING; // normal case
}
@@ -407,7 +407,36 @@ typedef std::map<uint32, time_t> CreatureSpellCooldowns;
#define MAX_VENDOR_ITEMS 150 // Limitation in 3.x.x item count in SMSG_LIST_INVENTORY
-class Creature : public Unit, public GridObject<Creature>
+enum CreatureCellMoveState
+{
+ CREATURE_CELL_MOVE_NONE, //not in move list
+ CREATURE_CELL_MOVE_ACTIVE, //in move list
+ CREATURE_CELL_MOVE_INACTIVE, //in move list but should not move
+};
+
+class MapCreature
+{
+ friend class Map; //map for moving creatures
+ friend class ObjectGridLoader; //grid loader for loading creatures
+
+protected:
+ MapCreature() : _moveState(CREATURE_CELL_MOVE_NONE) {}
+
+private:
+ Cell _currentCell;
+ Cell const& GetCurrentCell() const { return _currentCell; }
+ void SetCurrentCell(Cell const& cell) { _currentCell = cell; }
+
+ CreatureCellMoveState _moveState;
+ Position _newPosition;
+ void SetNewCellPosition(float x, float y, float z, float o)
+ {
+ _moveState = CREATURE_CELL_MOVE_ACTIVE;
+ _newPosition.Relocate(x, y, z, o);
+ }
+};
+
+class Creature : public Unit, public GridObject<Creature>, public MapCreature
{
public:
@@ -427,7 +456,7 @@ class Creature : public Unit, public GridObject<Creature>
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
void Update(uint32 time); // overwrited Unit::Update
- void GetRespawnCoord(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
+ void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
uint32 GetEquipmentId() const { return GetCreatureInfo()->equipmentId; }
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
@@ -578,7 +607,7 @@ class Creature : public Unit, public GridObject<Creature>
CreatureSpellCooldowns m_CreatureCategoryCooldowns;
bool canStartAttack(Unit const* u, bool force) const;
- float GetAttackDistance(Unit const* pl) const;
+ float GetAttackDistance(Unit const* player) const;
void SendAIReaction(AiReaction reactionType);
@@ -598,10 +627,6 @@ class Creature : public Unit, public GridObject<Creature>
MovementGeneratorType GetDefaultMovementType() const { return m_defaultMovementType; }
void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; }
- // for use only in LoadHelper, Map::Add Map::CreatureCellRelocation
- Cell const& GetCurrentCell() const { return m_currentCell; }
- void SetCurrentCell(Cell const& cell) { m_currentCell = cell; }
-
void RemoveCorpse(bool setSpawnTime = true);
void ForcedDespawn(uint32 timeMSToDespawn = 0);
@@ -639,6 +664,9 @@ class Creature : public Unit, public GridObject<Creature>
return m_charmInfo->GetCharmSpell(pos)->GetAction();
}
+ void SetPosition(float x, float y, float z, float o);
+ void SetPosition(const Position &pos) { SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()); }
+
void SetHomePosition(float x, float y, float z, float o) { m_homePosition.Relocate(x, y, z, o); }
void SetHomePosition(const Position &pos) { m_homePosition.Relocate(pos); }
void GetHomePosition(float &x, float &y, float &z, float &ori) { m_homePosition.GetPosition(x, y, z, ori); }
@@ -703,7 +731,6 @@ class Creature : public Unit, public GridObject<Creature>
void RegenerateHealth();
void Regenerate(Powers power);
MovementGeneratorType m_defaultMovementType;
- Cell m_currentCell; // store current cell where creature listed
uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid
uint32 m_equipmentId;
@@ -725,8 +752,8 @@ class Creature : public Unit, public GridObject<Creature>
uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
uint32 guid_transport;
- bool isVisibleForInState(WorldObject const* seer) const;
- bool canSeeAlways(WorldObject const* obj) const;
+ bool IsInvisibleDueToDespawn() const;
+ bool CanAlwaysSee(WorldObject const* obj) const;
private:
//WaypointMovementGenerator vars
uint32 m_waypointID;
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index 3ff21645a27..90011dbae22 100755
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -371,7 +371,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, uint64 npcGUID,
// rewarded honor points. Multiply with 10 to satisfy client
data << 10 * Trinity::Honor::hk_honor_at_level(_session->GetPlayer()->getLevel(), quest->GetRewHonorMultiplier());
- data << float(0); // new 3.3.0, honor multiplier?
+ data << float(0.0f); // new 3.3.0, honor multiplier?
data << uint32(quest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
data << int32(quest->GetRewSpellCast()); // casted spell
data << uint32(quest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles)
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 03da98d5624..9e514ad34bb 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -16,26 +16,14 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "Common.h"
-#include "QuestDef.h"
#include "GameObjectAI.h"
#include "ObjectMgr.h"
#include "GroupMgr.h"
#include "PoolMgr.h"
#include "SpellMgr.h"
-#include "Spell.h"
-#include "UpdateMask.h"
-#include "Opcodes.h"
-#include "WorldPacket.h"
#include "World.h"
-#include "DatabaseEnv.h"
-#include "LootMgr.h"
-#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
-#include "InstanceScript.h"
-#include "Battleground.h"
-#include "Util.h"
#include "OutdoorPvPMgr.h"
#include "BattlegroundAV.h"
#include "ScriptMgr.h"
@@ -73,15 +61,21 @@ GameObject::GameObject() : WorldObject(), m_goValue(new GameObjectValue), m_AI(N
GameObject::~GameObject()
{
delete m_goValue;
+ delete m_AI;
//if (m_uint32Values) // field array can be not exist if GameOBject not loaded
// CleanupsBeforeDelete();
}
bool GameObject::AIM_Initialize()
{
+ if (m_AI)
+ delete m_AI;
m_AI = FactorySelector::SelectGameObjectAI(this);
- if (!m_AI) return false;
+
+ if (!m_AI)
+ return false;
+
m_AI->InitializeAI();
return true;
}
@@ -97,27 +91,31 @@ void GameObject::CleanupsBeforeDelete(bool /*finalCleanup*/)
RemoveFromWorld();
if (m_uint32Values) // field array can be not exist if GameOBject not loaded
- {
- // Possible crash at access to deleted GO in Unit::m_gameobj
- if (uint64 owner_guid = GetOwnerGUID())
- {
- Unit* owner = ObjectAccessor::GetUnit(*this, owner_guid);
+ RemoveFromOwner();
+}
- if (owner)
- owner->RemoveGameObject(this, false);
- else
- {
- const char * ownerType = "creature";
- if (IS_PLAYER_GUID(owner_guid))
- ownerType = "player";
- else if (IS_PET_GUID(owner_guid))
- ownerType = "pet";
-
- sLog->outError("Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.",
- GetGUIDLow(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(owner_guid), ownerType);
- }
- }
+void GameObject::RemoveFromOwner()
+{
+ uint64 ownerGUID = GetOwnerGUID();
+ if (!ownerGUID)
+ return;
+
+ if (Unit* owner = ObjectAccessor::GetUnit(*this, ownerGUID))
+ {
+ owner->RemoveGameObject(this, false);
+ ASSERT(!GetOwnerGUID());
+ return;
}
+
+ const char * ownerType = "creature";
+ if (IS_PLAYER_GUID(ownerGUID))
+ ownerType = "player";
+ else if (IS_PET_GUID(ownerGUID))
+ ownerType = "pet";
+
+ sLog->outCrash("Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.",
+ GetGUIDLow(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(ownerGUID), ownerType);
+ SetOwnerGUID(0);
}
void GameObject::AddToWorld()
@@ -141,14 +139,7 @@ void GameObject::RemoveFromWorld()
if (m_zoneScript)
m_zoneScript->OnGameObjectRemove(this);
- // Possible crash at access to deleted GO in Unit::m_gameobj
- if (uint64 owner_guid = GetOwnerGUID())
- {
- if (Unit* owner = GetOwner())
- owner->RemoveGameObject(this, false);
- else
- sLog->outError("Delete GameObject (GUID: %u Entry: %u, Name: %s) that have references in not found creature %u GO list. Crash possible later.", GetGUIDLow(), GetGOInfo()->entry, GetGOInfo()->name.c_str(), GUID_LOPART(owner_guid));
- }
+ RemoveFromOwner();
WorldObject::RemoveFromWorld();
sObjectAccessor->RemoveObject(this);
}
@@ -382,7 +373,7 @@ void GameObject::Update(uint32 diff)
if (poolid)
sPoolMgr->UpdatePool<GameObject>(poolid, GetDBTableGUIDLow());
else
- GetMap()->Add(this);
+ GetMap()->AddToMap(this);
break;
}
}
@@ -595,7 +586,7 @@ void GameObject::Refresh()
return;
if (isSpawned())
- GetMap()->Add(this);
+ GetMap()->AddToMap(this);
}
void GameObject::AddUniqueUse(Player* player)
@@ -607,13 +598,8 @@ void GameObject::AddUniqueUse(Player* player)
void GameObject::Delete()
{
SetLootState(GO_NOT_READY);
- if (GetOwnerGUID())
- if (Unit* owner = GetOwner())
- owner->RemoveGameObject(this, false);
- else //! Owner not in world anymore
- SetOwnerGUID(0);
+ RemoveFromOwner();
- ASSERT (!GetOwnerGUID());
SendObjectDeSpawnAnim(GetGUID());
SetGoState(GO_STATE_READY);
@@ -843,9 +829,9 @@ void GameObject::SaveRespawnTime()
sObjectMgr->SaveGORespawnTime(m_DBTableGuid, GetInstanceId(), m_respawnTime);
}
-bool GameObject::isAlwaysVisibleFor(WorldObject const* seer) const
+bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const
{
- if (WorldObject::isAlwaysVisibleFor(seer))
+ if (WorldObject::IsAlwaysVisibleFor(seer))
return true;
if (IsTransport())
@@ -854,16 +840,16 @@ bool GameObject::isAlwaysVisibleFor(WorldObject const* seer) const
return false;
}
-bool GameObject::isVisibleForInState(WorldObject const* seer) const
+bool GameObject::IsInvisibleDueToDespawn() const
{
- if (!WorldObject::isVisibleForInState(seer))
- return false;
+ if (WorldObject::IsInvisibleDueToDespawn())
+ return true;
// Despawned
if (!isSpawned())
- return false;
+ return true;
- return true;
+ return false;
}
void GameObject::Respawn()
@@ -935,9 +921,8 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target)
GameObject* trapGO = NULL;
{
// using original GO distance
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*target, trapEntry, range);
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO, go_check);
@@ -955,9 +940,8 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
{
GameObject* ok = NULL;
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::NearestGameObjectFishingHole u_check(*this, range);
Trinity::GameObjectSearcher<Trinity::NearestGameObjectFishingHole> checker(this, ok, u_check);
@@ -1290,8 +1274,9 @@ void GameObject::Use(Unit* user)
{
player->UpdateFishingSkill();
+ //TODO: I do not understand this hack. Need some explanation.
// prevent removing GO at spell cancel
- player->RemoveGameObject(this, false);
+ RemoveFromOwner();
SetOwnerGUID(player->GetGUID());
//TODO: find reasonable value for fishing hole search
@@ -1539,12 +1524,11 @@ void GameObject::Use(Unit* user)
{
case 179785: // Silverwing Flag
case 179786: // Warsong Flag
- // check if it's correct bg
- if (bg->IsRandom() ? bg->GetTypeID(true) : bg->GetTypeID(false) == BATTLEGROUND_WS)
+ if (bg->GetTypeID(true) == BATTLEGROUND_WS)
bg->EventPlayerClickedOnFlag(player, this);
break;
case 184142: // Netherstorm Flag
- if (bg->IsRandom() ? bg->GetTypeID(true) : bg->GetTypeID(false) == BATTLEGROUND_EY)
+ if (bg->GetTypeID(true) == BATTLEGROUND_EY)
bg->EventPlayerClickedOnFlag(player, this);
break;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 3402eaa64bc..9167b40d285 100755
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -752,8 +752,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>
void TriggeringLinkedGameObject(uint32 trapEntry, Unit* target);
- bool isAlwaysVisibleFor(WorldObject const* seer) const;
- bool isVisibleForInState(WorldObject const* seer) const;
+ bool IsAlwaysVisibleFor(WorldObject const* seer) const;
+ bool IsInvisibleDueToDespawn() const;
uint8 getLevelForTarget(WorldObject const* target) const
{
@@ -815,6 +815,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>
uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
private:
+ void RemoveFromOwner();
void SwitchDoorOrButton(bool activate, bool alternative = false);
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index d3832ad9151..07275166130 100755
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1194,25 +1194,23 @@ bool Item::IsRefundExpired()
return (GetPlayedTime() > 2*HOUR);
}
-void Item::SetSoulboundTradeable(AllowedLooterSet* allowedLooters, Player* currentOwner, bool apply)
+void Item::SetSoulboundTradeable(AllowedLooterSet& allowedLooters)
{
- if (apply)
- {
- SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE);
- allowedGUIDs = *allowedLooters;
- }
- else
- {
- RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE);
- if (allowedGUIDs.empty())
- return;
+ SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE);
+ allowedGUIDs = allowedLooters;
+}
- allowedGUIDs.clear();
- SetState(ITEM_CHANGED, currentOwner);
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_BOP_TRADE);
- stmt->setUInt32(0, GetGUIDLow());
- CharacterDatabase.Execute(stmt);
- }
+void Item::ClearSoulboundTradeable(Player* currentOwner)
+{
+ RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE);
+ if (allowedGUIDs.empty())
+ return;
+
+ allowedGUIDs.clear();
+ SetState(ITEM_CHANGED, currentOwner);
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_BOP_TRADE);
+ stmt->setUInt32(0, GetGUIDLow());
+ CharacterDatabase.Execute(stmt);
}
bool Item::CheckSoulboundTradeExpire()
@@ -1220,7 +1218,7 @@ bool Item::CheckSoulboundTradeExpire()
// called from owner's update - GetOwner() MUST be valid
if (GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME) + 2*HOUR < GetOwner()->GetTotalPlayedTime())
{
- SetSoulboundTradeable(NULL, GetOwner(), false);
+ ClearSoulboundTradeable(GetOwner());
return true; // remove from tradeable list
}
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index b872b354ea7..4a72e7fea2b 100755
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -352,7 +352,8 @@ class Item : public Object
bool IsRefundExpired();
// Soulbound trade system
- void SetSoulboundTradeable(AllowedLooterSet* allowedLooters, Player* currentOwner, bool apply);
+ void SetSoulboundTradeable(AllowedLooterSet& allowedLooters);
+ void ClearSoulboundTradeable(Player* currentOwner);
bool CheckSoulboundTradeExpire();
void BuildUpdate(UpdateDataMapType&);
diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h
index 155673edbaa..03212c129fd 100755
--- a/src/server/game/Entities/Item/ItemPrototype.h
+++ b/src/server/game/Entities/Item/ItemPrototype.h
@@ -729,7 +729,6 @@ struct ItemTemplate
bool IsWeaponVellum() const { return Class == ITEM_CLASS_TRADE_GOODS && SubClass == ITEM_SUBCLASS_WEAPON_ENCHANTMENT; }
bool IsArmorVellum() const { return Class == ITEM_CLASS_TRADE_GOODS && SubClass == ITEM_SUBCLASS_ARMOR_ENCHANTMENT; }
bool IsConjuredConsumable() const { return Class == ITEM_CLASS_CONSUMABLE && (Flags & ITEM_PROTO_FLAG_CONJURED); }
-
};
// Benchmarked: Faster than std::map (insert/find)
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 0b275f833e6..978d9accb64 100755
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -780,13 +780,13 @@ void Object::ClearUpdateMask(bool remove)
}
}
-void Object::BuildFieldsUpdate(Player* pl, UpdateDataMapType& data_map) const
+void Object::BuildFieldsUpdate(Player* player, UpdateDataMapType& data_map) const
{
- UpdateDataMapType::iterator iter = data_map.find(pl);
+ UpdateDataMapType::iterator iter = data_map.find(player);
if (iter == data_map.end())
{
- std::pair<UpdateDataMapType::iterator, bool> p = data_map.insert(UpdateDataMapType::value_type(pl, UpdateData()));
+ std::pair<UpdateDataMapType::iterator, bool> p = data_map.insert(UpdateDataMapType::value_type(player, UpdateData()));
ASSERT(p.second);
iter = p.first;
}
@@ -1273,6 +1273,8 @@ void WorldObject::setActive(bool on)
void WorldObject::CleanupsBeforeDelete(bool /*finalCleanup*/)
{
+ if (IsInWorld())
+ RemoveFromWorld();
}
void WorldObject::_Create(uint32 guidlow, HighGuid guidhigh, uint32 phaseMask)
@@ -1587,14 +1589,6 @@ bool Position::IsPositionValid() const
return Trinity::IsValidMapCoord(m_positionX, m_positionY, m_positionZ, m_orientation);
}
-bool WorldObject::isValid() const
-{
- if (!IsInWorld())
- return false;
-
- return true;
-}
-
float WorldObject::GetGridActivationRange() const
{
if (ToPlayer())
@@ -1638,19 +1632,10 @@ bool WorldObject::canSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
if (this == obj)
return true;
- if (!obj->isValid())
- return false;
-
- if (GetMap() != obj->GetMap())
+ if (obj->IsNeverVisible() || CanNeverSee(obj))
return false;
- if (!InSamePhase(obj))
- return false;
-
- if (obj->isAlwaysVisibleFor(this))
- return true;
-
- if (canSeeAlways(obj))
+ if (obj->IsAlwaysVisibleFor(this) || CanAlwaysSee(obj))
return true;
bool corpseCheck = false;
@@ -1704,16 +1689,16 @@ bool WorldObject::canSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
return false;
}
- if (!obj->isVisibleForInState(this))
+ if (obj->IsInvisibleDueToDespawn())
return false;
- if (!canDetect(obj, ignoreStealth))
+ if (!CanDetect(obj, ignoreStealth))
return false;
return true;
}
-bool WorldObject::canDetect(WorldObject const* obj, bool ignoreStealth) const
+bool WorldObject::CanDetect(WorldObject const* obj, bool ignoreStealth) const
{
const WorldObject* seer = this;
@@ -1722,19 +1707,19 @@ bool WorldObject::canDetect(WorldObject const* obj, bool ignoreStealth) const
if (Unit* controller = thisUnit->GetCharmerOrOwner())
seer = controller;
- if (obj->isAlwaysDetectableFor(seer))
+ if (obj->IsAlwaysDetectableFor(seer))
return true;
- if (!seer->canDetectInvisibilityOf(obj))
+ if (!seer->CanDetectInvisibilityOf(obj))
return false;
- if (!ignoreStealth && !seer->canDetectStealthOf(obj))
+ if (!ignoreStealth && !seer->CanDetectStealthOf(obj))
return false;
return true;
}
-bool WorldObject::canDetectInvisibilityOf(WorldObject const* obj) const
+bool WorldObject::CanDetectInvisibilityOf(WorldObject const* obj) const
{
uint32 mask = obj->m_invisibility.GetFlags() & m_invisibilityDetect.GetFlags();
@@ -1765,7 +1750,7 @@ bool WorldObject::canDetectInvisibilityOf(WorldObject const* obj) const
return true;
}
-bool WorldObject::canDetectStealthOf(WorldObject const* obj) const
+bool WorldObject::CanDetectStealthOf(WorldObject const* obj) const
{
// Combat reach is the minimal distance (both in front and behind),
// and it is also used in the range calculation.
@@ -1885,10 +1870,9 @@ namespace Trinity
void WorldObject::MonsterSay(const char* text, uint32 language, uint64 TargetGuid)
{
- CellPair p = Trinity::ComputeCellPair(GetPositionX(), GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::MonsterCustomChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, text, language, TargetGuid);
@@ -1900,10 +1884,9 @@ void WorldObject::MonsterSay(const char* text, uint32 language, uint64 TargetGui
void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
{
- CellPair p = Trinity::ComputeCellPair(GetPositionX(), GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId, language, TargetGuid);
@@ -1915,10 +1898,9 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
void WorldObject::MonsterYell(const char* text, uint32 language, uint64 TargetGuid)
{
- CellPair p = Trinity::ComputeCellPair(GetPositionX(), GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::MonsterCustomChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, text, language, TargetGuid);
@@ -1930,10 +1912,9 @@ void WorldObject::MonsterYell(const char* text, uint32 language, uint64 TargetGu
void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
{
- CellPair p = Trinity::ComputeCellPair(GetPositionX(), GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId, language, TargetGuid);
@@ -1965,10 +1946,9 @@ void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsB
void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossEmote)
{
- CellPair p = Trinity::ComputeCellPair(GetPositionX(), GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId, LANG_UNIVERSAL, TargetGuid);
@@ -2199,7 +2179,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
summon->SetHomePosition(pos);
summon->InitStats(duration);
- Add(summon->ToCreature());
+ AddToMap(summon->ToCreature());
summon->InitSummon();
//ObjectAccessor::UpdateObjectVisibility(summon);
@@ -2307,7 +2287,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
break;
}
- map->Add(pet->ToCreature());
+ map->AddToMap(pet->ToCreature());
switch (petType)
{
@@ -2368,7 +2348,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
((Unit*)this)->AddGameObject(go);
else
go->SetSpawnedByDefault(false);
- map->Add(go);
+ map->AddToMap(go);
return go;
}
@@ -2410,32 +2390,30 @@ GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const
return go;
}
-void WorldObject::GetGameObjectListWithEntryInGrid(std::list<GameObject*>& lList, uint32 uiEntry, float fMaxSearchRange) const
+void WorldObject::GetGameObjectListWithEntryInGrid(std::list<GameObject*>& gameobjectList, uint32 entry, float maxSearchRange) const
{
- CellPair pair(Trinity::ComputeCellPair(this->GetPositionX(), this->GetPositionY()));
+ CellCoord pair(Trinity::ComputeCellCoord(this->GetPositionX(), this->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
- Trinity::AllGameObjectsWithEntryInRange check(this, uiEntry, fMaxSearchRange);
- Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInRange> searcher(this, lList, check);
+ Trinity::AllGameObjectsWithEntryInRange check(this, entry, maxSearchRange);
+ Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInRange> searcher(this, gameobjectList, check);
TypeContainerVisitor<Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInRange>, GridTypeMapContainer> visitor(searcher);
- cell.Visit(pair, visitor, *(this->GetMap()));
+ cell.Visit(pair, visitor, *(this->GetMap()), *this, maxSearchRange);
}
-void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, uint32 uiEntry, float fMaxSearchRange) const
+void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& creatureList, uint32 entry, float maxSearchRange) const
{
- CellPair pair(Trinity::ComputeCellPair(this->GetPositionX(), this->GetPositionY()));
+ CellCoord pair(Trinity::ComputeCellCoord(this->GetPositionX(), this->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
- Trinity::AllCreaturesOfEntryInRange check(this, uiEntry, fMaxSearchRange);
- Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(this, lList, check);
+ Trinity::AllCreaturesOfEntryInRange check(this, entry, maxSearchRange);
+ Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(this, creatureList, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher);
- cell.Visit(pair, visitor, *(this->GetMap()));
+ cell.Visit(pair, visitor, *(this->GetMap()), *this, maxSearchRange);
}
/*
@@ -2546,9 +2524,8 @@ void WorldObject::GetNearPoint(WorldObject const* /*searcher*/, float &x, float
// adding used positions around object
{
- CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::NearUsedPosDo u_do(*this, searcher, absAngle, selector);
@@ -2748,19 +2725,19 @@ void WorldObject::DestroyForNearbyPlayers()
VisitNearbyWorldObject(GetVisibilityRange(), searcher);
for (std::list<Player*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
{
- Player* plr = (*iter);
+ Player* player = (*iter);
- if (plr == this)
+ if (player == this)
continue;
- if (!plr->HaveAtClient(this))
+ if (!player->HaveAtClient(this))
continue;
- if (isType(TYPEMASK_UNIT) && ((Unit*)this)->GetCharmerGUID() == plr->GetGUID()) // TODO: this is for puppet
+ if (isType(TYPEMASK_UNIT) && ((Unit*)this)->GetCharmerGUID() == player->GetGUID()) // TODO: this is for puppet
continue;
- DestroyForPlayer(plr);
- plr->m_clientGUIDs.erase(GetGUID());
+ DestroyForPlayer(player);
+ player->m_clientGUIDs.erase(GetGUID());
}
}
@@ -2828,13 +2805,13 @@ struct WorldObjectChangeAccumulator
}
}
- void BuildPacket(Player* plr)
+ void BuildPacket(Player* player)
{
// Only send update once to a player
- if (plr_list.find(plr->GetGUID()) == plr_list.end() && plr->HaveAtClient(&i_object))
+ if (plr_list.find(player->GetGUID()) == plr_list.end() && player->HaveAtClient(&i_object))
{
- i_object.BuildFieldsUpdate(plr, i_updateDatas);
- plr_list.insert(plr->GetGUID());
+ i_object.BuildFieldsUpdate(player, i_updateDatas);
+ plr_list.insert(player->GetGUID());
}
}
@@ -2843,9 +2820,8 @@ struct WorldObjectChangeAccumulator
void WorldObject::BuildUpdate(UpdateDataMapType& data_map)
{
- CellPair p = Trinity::ComputeCellPair(GetPositionX(), GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
WorldObjectChangeAccumulator notifier(*this, data_map);
TypeContainerVisitor<WorldObjectChangeAccumulator, WorldTypeMapContainer > player_notifier(notifier);
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index d27ea23ba7e..eab4dbeba99 100755
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -527,9 +527,11 @@ template<class T>
class GridObject
{
public:
- GridReference<T> &GetGridRef() { return m_gridRef; }
- protected:
- GridReference<T> m_gridRef;
+ bool IsInGrid() const { return _gridRef.isValid(); }
+ void AddToGrid(GridRefManager<T>& m) { ASSERT(!IsInGrid()); _gridRef.link(&m, (T*)this); }
+ void RemoveFromGrid() { ASSERT(IsInGrid()); _gridRef.unlink(); }
+ private:
+ GridReference<T> _gridRef;
};
template <class T_VALUES, class T_FLAGS, class FLAG_TYPE, uint8 ARRAY_SIZE>
@@ -667,12 +669,17 @@ class WorldObject : public Object, public WorldLocation
}
float GetDistanceZ(const WorldObject* obj) const;
+ bool IsSelfOrInSameMap(const WorldObject* obj) const
+ {
+ if (this == obj)
+ return true;
+ return IsInMap(obj);
+ }
bool IsInMap(const WorldObject* obj) const
{
if (obj)
return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
- else
- return false;
+ return false;
}
bool IsWithinDist3d(float x, float y, float z, float dist) const
{ return IsInDist(x, y, z, dist + GetObjectSize()); }
@@ -682,7 +689,6 @@ class WorldObject : public Object, public WorldLocation
{ return IsInDist2d(x, y, dist + GetObjectSize()); }
bool IsWithinDist2d(const Position* pos, float dist) const
{ return IsInDist2d(pos, dist + GetObjectSize()); }
- virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const;
// use only if you will sure about placing both object at same map
bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true) const
{
@@ -730,19 +736,6 @@ class WorldObject : public Object, public WorldLocation
virtual void SaveRespawnTime() {}
void AddObjectToRemoveList();
- virtual bool isValid() const;
-
- virtual bool isAlwaysVisibleFor(WorldObject const* /*seer*/) const { return false; }
- virtual bool canSeeAlways(WorldObject const* /*obj*/) const { return false; }
- bool canDetect(WorldObject const* obj, bool ignoreStealth) const;
-
- virtual bool isVisibleForInState(WorldObject const* /*seer*/) const { return true; }
-
- bool canDetectInvisibilityOf(WorldObject const* obj) const;
- bool canDetectStealthOf(WorldObject const* obj) const;
-
- virtual bool isAlwaysDetectableFor(WorldObject const* /*seer*/) const { return false; }
-
float GetGridActivationRange() const;
float GetVisibilityRange() const;
float GetSightRange(const WorldObject* target = NULL) const;
@@ -807,9 +800,9 @@ class WorldObject : public Object, public WorldLocation
bool isActiveObject() const { return m_isActive; }
void setActive(bool isActiveObject);
void SetWorldObject(bool apply);
- template<class NOTIFIER> void VisitNearbyObject(const float &radius, NOTIFIER &notifier) const { if (IsInWorld()) GetMap()->VisitAll(GetPositionX(), GetPositionY(), radius, notifier); }
- template<class NOTIFIER> void VisitNearbyGridObject(const float &radius, NOTIFIER &notifier) const { if (IsInWorld()) GetMap()->VisitGrid(GetPositionX(), GetPositionY(), radius, notifier); }
- template<class NOTIFIER> void VisitNearbyWorldObject(const float &radius, NOTIFIER &notifier) const { if (IsInWorld()) GetMap()->VisitWorld(GetPositionX(), GetPositionY(), radius, notifier); }
+ template<class NOTIFIER> void VisitNearbyObject(float const& radius, NOTIFIER& notifier) const { if (IsInWorld()) GetMap()->VisitAll(GetPositionX(), GetPositionY(), radius, notifier); }
+ template<class NOTIFIER> void VisitNearbyGridObject(float const& radius, NOTIFIER& notifier) const { if (IsInWorld()) GetMap()->VisitGrid(GetPositionX(), GetPositionY(), radius, notifier); }
+ template<class NOTIFIER> void VisitNearbyWorldObject(float const& radius, NOTIFIER& notifier) const { if (IsInWorld()) GetMap()->VisitWorld(GetPositionX(), GetPositionY(), radius, notifier); }
#ifdef MAP_BASED_RAND_GEN
int32 irand(int32 min, int32 max) const { return int32 (GetMap()->mtRand.randInt(max - min)) + min; }
@@ -848,6 +841,11 @@ class WorldObject : public Object, public WorldLocation
void SetLocationMapId(uint32 _mapId) { m_mapId = _mapId; }
void SetLocationInstanceId(uint32 _instanceId) { m_InstanceId = _instanceId; }
+ virtual bool IsNeverVisible() const { return !IsInWorld(); }
+ virtual bool IsAlwaysVisibleFor(WorldObject const* /*seer*/) const { return false; }
+ virtual bool IsInvisibleDueToDespawn() const { return false; }
+ //difference from IsAlwaysVisibleFor: 1. after distance check; 2. use owner or charmer as seer
+ virtual bool IsAlwaysDetectableFor(WorldObject const* /*seer*/) const { return false; }
private:
Map* m_currMap; //current object's Map location
@@ -857,6 +855,14 @@ class WorldObject : public Object, public WorldLocation
uint16 m_notifyflags;
uint16 m_executed_notifies;
+
+ virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const;
+
+ bool CanNeverSee(WorldObject const* obj) const { return GetMap() != obj->GetMap() || !InSamePhase(obj); }
+ virtual bool CanAlwaysSee(WorldObject const* /*obj*/) const { return false; }
+ bool CanDetect(WorldObject const* obj, bool ignoreStealth) const;
+ bool CanDetectInvisibilityOf(WorldObject const* obj) const;
+ bool CanDetectStealthOf(WorldObject const* obj) const;
};
namespace Trinity
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.cpp b/src/server/game/Entities/Object/ObjectPosSelector.cpp
index c322c35ef81..fd32e531ed7 100755
--- a/src/server/game/Entities/Object/ObjectPosSelector.cpp
+++ b/src/server/game/Entities/Object/ObjectPosSelector.cpp
@@ -55,10 +55,10 @@ ObjectPosSelector::UsedPosList::value_type const* ObjectPosSelector::nextUsedPos
void ObjectPosSelector::AddUsedPos(float size, float angle, float dist)
{
- if (angle>=0)
- m_UsedPosLists[USED_POS_PLUS].insert(UsedPosList::value_type(angle, UsedPos(1.0, size, dist)));
+ if (angle >= 0)
+ m_UsedPosLists[USED_POS_PLUS].insert(UsedPosList::value_type(angle, UsedPos(1.0f, size, dist)));
else
- m_UsedPosLists[USED_POS_MINUS].insert(UsedPosList::value_type(-angle, UsedPos(-1.0, size, dist)));
+ m_UsedPosLists[USED_POS_MINUS].insert(UsedPosList::value_type(-angle, UsedPos(-1.0f, size, dist)));
}
void ObjectPosSelector::InitializeAngle()
@@ -76,9 +76,9 @@ void ObjectPosSelector::InitializeAngle()
bool ObjectPosSelector::FirstAngle(float& angle)
{
if (m_UsedPosLists[USED_POS_PLUS].empty() && !m_UsedPosLists[USED_POS_MINUS].empty() )
- return NextAngleFor(*m_UsedPosLists[USED_POS_MINUS].begin(), 1.0, USED_POS_PLUS, angle);
+ return NextAngleFor(*m_UsedPosLists[USED_POS_MINUS].begin(), 1.0f, USED_POS_PLUS, angle);
else if (m_UsedPosLists[USED_POS_MINUS].empty() && !m_UsedPosLists[USED_POS_PLUS].empty() )
- return NextAngleFor(*m_UsedPosLists[USED_POS_PLUS].begin(), -1.0, USED_POS_MINUS, angle);
+ return NextAngleFor(*m_UsedPosLists[USED_POS_PLUS].begin(), -1.0f, USED_POS_MINUS, angle);
return false;
}
@@ -118,9 +118,9 @@ bool ObjectPosSelector::NextPosibleAngle(float& angle)
{
bool ok;
if (m_smallStepOk[USED_POS_PLUS])
- ok = NextSmallStepAngle(1.0, USED_POS_PLUS, angle);
+ ok = NextSmallStepAngle(1.0f, USED_POS_PLUS, angle);
else
- ok = NextAngleFor(*m_nextUsedPos[USED_POS_PLUS], 1.0, USED_POS_PLUS, angle);
+ ok = NextAngleFor(*m_nextUsedPos[USED_POS_PLUS], 1.0f, USED_POS_PLUS, angle);
if (!ok)
++m_nextUsedPos[USED_POS_PLUS]; // increase. only at fail (original or checked)
@@ -131,9 +131,9 @@ bool ObjectPosSelector::NextPosibleAngle(float& angle)
{
bool ok;
if (m_smallStepOk[USED_POS_MINUS])
- ok = NextSmallStepAngle(-1.0, USED_POS_MINUS, angle);
+ ok = NextSmallStepAngle(-1.0f, USED_POS_MINUS, angle);
else
- ok = NextAngleFor(*m_nextUsedPos[USED_POS_MINUS], -1.0, USED_POS_MINUS, angle);
+ ok = NextAngleFor(*m_nextUsedPos[USED_POS_MINUS], -1.0f, USED_POS_MINUS, angle);
if (!ok)
++m_nextUsedPos[USED_POS_MINUS];
@@ -142,10 +142,10 @@ bool ObjectPosSelector::NextPosibleAngle(float& angle)
else // both list empty
{
if (m_smallStepOk[USED_POS_PLUS] && (!m_smallStepOk[USED_POS_MINUS] || m_smallStepAngle[USED_POS_PLUS] <= m_smallStepAngle[USED_POS_MINUS]))
- return NextSmallStepAngle(1.0, USED_POS_PLUS, angle);
+ return NextSmallStepAngle(1.0f, USED_POS_PLUS, angle);
// -- direction less updated
else if (m_smallStepOk[USED_POS_MINUS])
- return NextSmallStepAngle(-1.0, USED_POS_MINUS, angle);
+ return NextSmallStepAngle(-1.0f, USED_POS_MINUS, angle);
}
// no angles
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h
index efb655ca1f7..df879c4dd19 100755
--- a/src/server/game/Entities/Object/ObjectPosSelector.h
+++ b/src/server/game/Entities/Object/ObjectPosSelector.h
@@ -68,8 +68,8 @@ struct ObjectPosSelector
bool CheckOriginal() const
{
- return (m_UsedPosLists[USED_POS_PLUS].empty() || CheckAngle(*m_UsedPosLists[USED_POS_PLUS].begin(), 1.0, 0)) &&
- (m_UsedPosLists[USED_POS_MINUS].empty() || CheckAngle(*m_UsedPosLists[USED_POS_MINUS].begin(), -1.0, 0));
+ return (m_UsedPosLists[USED_POS_PLUS].empty() || CheckAngle(*m_UsedPosLists[USED_POS_PLUS].begin(), 1.0f, 0)) &&
+ (m_UsedPosLists[USED_POS_MINUS].empty() || CheckAngle(*m_UsedPosLists[USED_POS_MINUS].begin(), -1.0f, 0));
}
bool IsNonBalanced() const { return m_UsedPosLists[USED_POS_PLUS].empty() != m_UsedPosLists[USED_POS_MINUS].empty(); }
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h
index 09bc0b4cc80..abe3c299062 100755
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h
@@ -72,6 +72,9 @@ class UpdateMask
UpdateMask& operator = (const UpdateMask& mask)
{
+ if (this == &mask)
+ return *this;
+
SetCount(mask.mCount);
memcpy(mUpdateMask, mask.mUpdateMask, mBlocks << 2);
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 4150810a4ab..82c551c2374 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -185,7 +185,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
CreatureTemplate const* cinfo = GetCreatureInfo();
if (cinfo->type == CREATURE_TYPE_CRITTER)
{
- map->Add(this->ToCreature());
+ map->AddToMap(this->ToCreature());
return true;
}
@@ -279,7 +279,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
}
owner->SetMinion(this, true);
- map->Add(this->ToCreature());
+ map->AddToMap(this->ToCreature());
InitTalentForLevel(); // set original talents points before spell loading
@@ -618,7 +618,7 @@ void Pet::LoseHappiness()
return;
int32 addvalue = 670; //value is 70/35/17/8/4 (per min) * 1000 / 8 (timer 7.5 secs)
if (isInCombat()) //we know in combat happiness fades faster, multiplier guess
- addvalue = int32(addvalue * 1.5);
+ addvalue = int32(addvalue * 1.5f);
ModifyPower(POWER_HAPPINESS, -addvalue);
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0aa47b38412..9b1b2c34aaa 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1148,7 +1148,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
}
}
- for (PlayerCreateInfoItems::const_iterator item_id_itr = info->item.begin(); item_id_itr != info->item.end(); ++item_id_itr++)
+ for (PlayerCreateInfoItems::const_iterator item_id_itr = info->item.begin(); item_id_itr != info->item.end(); ++item_id_itr)
StoreNewItemInBestSlots(item_id_itr->item_id, item_id_itr->item_amount);
// bags and main-hand weapon must equipped at this moment
@@ -2020,21 +2020,20 @@ bool Player::ToggleDND()
return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DND);
}
-uint8 Player::chatTag() const
+uint8 Player::GetChatTag() const
{
- // it's bitmask
- // 0x8 - ??
- // 0x4 - gm
- // 0x2 - dnd
- // 0x1 - afk
+ uint8 tag = CHAT_TAG_NONE;
+
if (isGMChat())
- return 4;
- else if (isDND())
- return 3;
+ tag |= CHAT_TAG_GM;
+ if (isDND())
+ tag |= CHAT_TAG_DND;
if (isAFK())
- return 1;
- else
- return 0;
+ tag |= CHAT_TAG_AFK;
+ if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DEVELOPER))
+ tag |= CHAT_TAG_DEV;
+
+ return tag;
}
void Player::SendTeleportPacket(Position &oldPos)
@@ -2278,7 +2277,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// remove from old map now
if (oldmap)
- oldmap->Remove(this, false);
+ oldmap->RemovePlayerFromMap(this, false);
// new final coordinates
float final_x = x;
@@ -2456,7 +2455,7 @@ void Player::RegenerateAll()
// Runes act as cooldowns, and they don't need to send any data
if (getClass() == CLASS_DEATH_KNIGHT)
- for (uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint8 i = 0; i < MAX_RUNES; ++i)
if (uint32 cd = GetRuneCooldown(i))
SetRuneCooldown(i, (cd > m_regenTimer) ? cd - m_regenTimer : 0);
@@ -2631,7 +2630,7 @@ void Player::RegenerateHealth()
ApplyPctN(addvalue, GetTotalAuraModifier(SPELL_AURA_MOD_REGEN_DURING_COMBAT));
if (!IsStandState())
- addvalue *= 1.5;
+ addvalue *= 1.5f;
}
// always regeneration bonus (including combat)
@@ -2860,7 +2859,6 @@ void Player::SetGMVisible(bool on)
if (on)
{
m_ExtraFlags &= ~PLAYER_EXTRA_GM_INVISIBLE; //remove flag
-
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
}
else
@@ -5044,7 +5042,7 @@ void Player::BuildPlayerRepop()
sLog->outError("Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow());
return;
}
- GetMap()->Add(corpse);
+ GetMap()->AddToMap(corpse);
// convert player body to ghost
SetHealth(1);
@@ -5063,7 +5061,7 @@ void Player::BuildPlayerRepop()
StopMirrorTimers(); //disable timers(bars)
- SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, (float)1.0); //see radius of death player?
+ SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, float(1.0f)); //see radius of death player?
// set and clear other
SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND);
@@ -6176,13 +6174,13 @@ static uint32 bonusSkillLevels[] = {75, 150, 225, 300, 375, 450};
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
{
- sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0);
+ sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance / 10.0f);
if (!SkillId)
return false;
if (Chance <= 0) // speedup in 0 chance case
{
- sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
+ sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
return false;
}
@@ -6220,19 +6218,19 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
}
UpdateSkillEnchantments(SkillId, SkillValue, new_value);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, SkillId);
- sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0);
+ sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance / 10.0f);
return true;
}
- sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
+ sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
return false;
}
-void Player::UpdateWeaponSkill (WeaponAttackType attType)
+void Player::UpdateWeaponSkill(WeaponAttackType attType)
{
// no skill gain in pvp
- Unit* pVictim = getVictim();
- if (pVictim && pVictim->GetTypeId() == TYPEID_PLAYER)
+ Unit* victim = getVictim();
+ if (victim && victim->GetTypeId() == TYPEID_PLAYER)
return;
if (IsInFeralForm())
@@ -6241,42 +6239,25 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType)
if (GetShapeshiftForm() == FORM_TREE)
return; // use weapon but not skill up
- if (pVictim && pVictim->GetTypeId() == TYPEID_UNIT && (pVictim->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_SKILLGAIN))
+ if (victim && victim->GetTypeId() == TYPEID_UNIT && (victim->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_SKILLGAIN))
return;
uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
- switch (attType)
- {
- case BASE_ATTACK:
- {
- Item* tmpitem = GetWeaponForAttack(attType, true);
+ Item* tmpitem = GetWeaponForAttack(attType, true);
+ if (!tmpitem && attType == BASE_ATTACK)
+ UpdateSkill(SKILL_UNARMED, weapon_skill_gain);
+ else if (tmpitem && tmpitem->GetTemplate()->SubClass != ITEM_SUBCLASS_WEAPON_FISHING_POLE)
+ UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain);
- if (!tmpitem)
- UpdateSkill(SKILL_UNARMED, weapon_skill_gain);
- else if (tmpitem->GetTemplate()->SubClass != ITEM_SUBCLASS_WEAPON_FISHING_POLE)
- UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain);
- break;
- }
- case OFF_ATTACK:
- case RANGED_ATTACK:
- {
- Item* tmpitem = GetWeaponForAttack(attType, true);
- if (tmpitem)
- UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain);
- break;
- }
- default:
- break;
- }
UpdateAllCritPercentages();
}
-void Player::UpdateCombatSkills(Unit* pVictim, WeaponAttackType attType, bool defence)
+void Player::UpdateCombatSkills(Unit* victim, WeaponAttackType attType, bool defence)
{
- uint8 plevel = getLevel(); // if defense than pVictim == attacker
+ uint8 plevel = getLevel(); // if defense than victim == attacker
uint8 greylevel = Trinity::XP::GetGrayLevel(plevel);
- uint8 moblevel = pVictim->getLevelForTarget(this);
+ uint8 moblevel = victim->getLevelForTarget(this);
if (moblevel < greylevel)
return;
@@ -6727,9 +6708,9 @@ ActionButton const* Player::GetActionButton(uint8 button)
return &buttonItr->second;
}
-bool Player::SetPosition(float x, float y, float z, float orientation, bool teleport)
+bool Player::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
{
- if (!Unit::SetPosition(x, y, z, orientation, teleport))
+ if (!Unit::UpdatePosition(x, y, z, orientation, teleport))
return false;
//if (movementInfo.flags & MOVEMENTFLAG_MOVING)
@@ -6743,7 +6724,7 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
// code block for underwater state update
- // Unit::SetPosition() checks for validity and updates our coordinates
+ // Unit::UpdatePosition() checks for validity and updates our coordinates
// so we re-fetch them instead of using "raw" coordinates from function params
UpdateUnderwaterState(GetMap(), GetPositionX(), GetPositionY(), GetPositionZ());
@@ -9533,7 +9514,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
// End Round (timer), better explain this by example, eg. ends in 19:59 -> A:BC
data << uint32(0xde9) << uint32(0x0); // 16 3561 C
data << uint32(0xde8) << uint32(0x0); // 17 3560 B
- data << uint32(0xde7) << uint32(0x0); // 18 3559 A
+ data << uint32(0xde7) << uint32(0x0); // 18 3559 A
data << uint32(0xe35) << uint32(0x0); // 19 3637 East g - Horde control
data << uint32(0xe34) << uint32(0x0); // 20 3636 West g - Horde control
data << uint32(0xe33) << uint32(0x0); // 21 3635 South g - Horde control
@@ -10408,7 +10389,7 @@ bool Player::HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32
return false;
}
-InventoryResult Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count) const
+InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count) const
{
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(entry);
if (!pProto)
@@ -10492,7 +10473,7 @@ bool Player::HasItemTotemCategory(uint32 TotemCategory) const
return false;
}
-InventoryResult Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const
+InventoryResult Player::CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const
{
Item* pItem2 = GetItemByPos(bag, slot);
@@ -10566,9 +10547,9 @@ InventoryResult Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, Item
return EQUIP_ERR_OK;
}
-InventoryResult Player::_CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const
+InventoryResult Player::CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const
{
- // skip specific bag already processed in first called _CanStoreItem_InBag
+ // skip specific bag already processed in first called CanStoreItem_InBag
if (bag == skip_bag)
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
@@ -10593,7 +10574,7 @@ InventoryResult Player::_CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, It
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
- // skip specific slot already processed in first called _CanStoreItem_InSpecificSlot
+ // skip specific slot already processed in first called CanStoreItem_InSpecificSlot
if (j == skip_slot)
continue;
@@ -10636,7 +10617,7 @@ InventoryResult Player::_CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, It
return EQUIP_ERR_OK;
}
-InventoryResult Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const
+InventoryResult Player::CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const
{
//this is never called for non-bag slots so we can do this
if (pSrcItem && pSrcItem->IsNotEmptyBag())
@@ -10644,7 +10625,7 @@ InventoryResult Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 s
for (uint32 j = slot_begin; j < slot_end; j++)
{
- // skip specific slot already processed in first called _CanStoreItem_InSpecificSlot
+ // skip specific slot already processed in first called CanStoreItem_InSpecificSlot
if (INVENTORY_SLOT_BAG_0 == skip_bag && j == skip_slot)
continue;
@@ -10687,7 +10668,7 @@ InventoryResult Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 s
return EQUIP_ERR_OK;
}
-InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item* pItem, bool swap, uint32* no_space_count) const
+InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item* pItem, bool swap, uint32* no_space_count) const
{
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
@@ -10719,7 +10700,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
// check count of items (skip for auto move for same player from bank)
uint32 no_similar_count = 0; // can't store this amount similar items
- InventoryResult res = _CanTakeMoreSimilarItems(entry, count, pItem, &no_similar_count);
+ InventoryResult res = CanTakeMoreSimilarItems(entry, count, pItem, &no_similar_count);
if (res != EQUIP_ERR_OK)
{
if (count == no_similar_count)
@@ -10734,7 +10715,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
// in specific slot
if (bag != NULL_BAG && slot != NULL_SLOT)
{
- res = _CanStoreItem_InSpecificSlot(bag, slot, dest, pProto, count, swap, pItem);
+ res = CanStoreItem_InSpecificSlot(bag, slot, dest, pProto, count, swap, pItem);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10763,7 +10744,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
{
if (bag == INVENTORY_SLOT_BAG_0) // inventory
{
- res = _CanStoreItem_InInventorySlots(KEYRING_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, true, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(KEYRING_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10781,7 +10762,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
}
- res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10802,9 +10783,9 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
else // equipped bag
{
// we need check 2 time (specialized/non_specialized), use NULL_BAG to prevent skipping bag
- res = _CanStoreItem_InBag(bag, dest, pProto, count, true, false, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, true, false, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
- res = _CanStoreItem_InBag(bag, dest, pProto, count, true, true, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, true, true, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
{
@@ -10832,7 +10813,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
if (pProto->BagFamily & BAG_FAMILY_MASK_KEYS)
{
uint32 keyringSize = GetMaxKeyringSize();
- res = _CanStoreItem_InInventorySlots(KEYRING_SLOT_START, KEYRING_SLOT_START+keyringSize, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(KEYRING_SLOT_START, KEYRING_SLOT_START+keyringSize, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10850,7 +10831,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
}
- res = _CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10870,7 +10851,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
}
else if (pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
{
- res = _CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10889,7 +10870,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
}
}
- res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10909,9 +10890,9 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
}
else // equipped bag
{
- res = _CanStoreItem_InBag(bag, dest, pProto, count, false, false, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, false, false, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
- res = _CanStoreItem_InBag(bag, dest, pProto, count, false, true, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, false, true, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
{
@@ -10937,7 +10918,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
// search stack for merge to
if (pProto->Stackable != 1)
{
- res = _CanStoreItem_InInventorySlots(KEYRING_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, true, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(KEYRING_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10955,7 +10936,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
}
- res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -10977,7 +10958,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
{
for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, true, false, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, true, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -10995,7 +10976,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, true, true, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, true, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11017,7 +10998,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
if (pProto->BagFamily & BAG_FAMILY_MASK_KEYS)
{
uint32 keyringSize = GetMaxKeyringSize();
- res = _CanStoreItem_InInventorySlots(KEYRING_SLOT_START, KEYRING_SLOT_START+keyringSize, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(KEYRING_SLOT_START, KEYRING_SLOT_START+keyringSize, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -11037,7 +11018,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
}
else if (pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
{
- res = _CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -11058,7 +11039,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, false, false, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, false, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11078,7 +11059,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG;
// search free slot
- res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START, INVENTORY_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
{
if (no_space_count)
@@ -11098,7 +11079,7 @@ InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &de
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, false, true, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, false, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11597,7 +11578,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
return res;
}
- res = _CanStoreItem_InSpecificSlot(bag, slot, dest, pProto, count, swap, pItem);
+ res = CanStoreItem_InSpecificSlot(bag, slot, dest, pProto, count, swap, pItem);
if (res != EQUIP_ERR_OK)
return res;
@@ -11618,7 +11599,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
{
if (bag == INVENTORY_SLOT_BAG_0)
{
- res = _CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
return res;
@@ -11627,9 +11608,9 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
}
else
{
- res = _CanStoreItem_InBag(bag, dest, pProto, count, true, false, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, true, false, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
- res = _CanStoreItem_InBag(bag, dest, pProto, count, true, true, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, true, true, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
return res;
@@ -11642,7 +11623,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
// search free slot in bag
if (bag == INVENTORY_SLOT_BAG_0)
{
- res = _CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
return res;
@@ -11651,9 +11632,9 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
}
else
{
- res = _CanStoreItem_InBag(bag, dest, pProto, count, false, false, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, false, false, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
- res = _CanStoreItem_InBag(bag, dest, pProto, count, false, true, pItem, NULL_BAG, slot);
+ res = CanStoreItem_InBag(bag, dest, pProto, count, false, true, pItem, NULL_BAG, slot);
if (res != EQUIP_ERR_OK)
return res;
@@ -11669,7 +11650,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
if (pProto->Stackable != 1)
{
// in slots
- res = _CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
return res;
@@ -11681,7 +11662,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
{
for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, true, false, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, true, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11692,7 +11673,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, true, true, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, true, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11706,7 +11687,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
{
for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, false, false, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, false, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11716,7 +11697,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
}
// search free space
- res = _CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
+ res = CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START, BANK_SLOT_ITEM_END, dest, pProto, count, false, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
return res;
@@ -11725,7 +11706,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
- res = _CanStoreItem_InBag(i, dest, pProto, count, false, true, pItem, bag, slot);
+ res = CanStoreItem_InBag(i, dest, pProto, count, false, true, pItem, bag, slot);
if (res != EQUIP_ERR_OK)
continue;
@@ -11898,8 +11879,14 @@ void Player::RemoveAmmo()
UpdateDamagePhysical(RANGED_ATTACK);
}
+Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update, int32 randomPropertyId)
+{
+ AllowedLooterSet allowedLooters;
+ return StoreNewItem(dest, item, update, randomPropertyId, allowedLooters);
+}
+
// Return stored item (if stored to stack, it can diff. from pItem). And pItem ca be deleted in this case.
-Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update, int32 randomPropertyId, AllowedLooterSet* allowedLooters)
+Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update, int32 randomPropertyId, AllowedLooterSet& allowedLooters)
{
uint32 count = 0;
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
@@ -11919,16 +11906,18 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update
if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger
CastSpell(this, proto->Spells[i].SpellId, true, pItem);
- if (allowedLooters && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound())
+ if (allowedLooters.size() > 1 && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound())
{
- pItem->SetSoulboundTradeable(allowedLooters, this, true);
+ pItem->SetSoulboundTradeable(allowedLooters);
pItem->SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, GetTotalPlayedTime());
m_itemSoulboundTradeable.push_back(pItem);
// save data
std::ostringstream ss;
- for (AllowedLooterSet::iterator itr = allowedLooters->begin(); itr != allowedLooters->end(); ++itr)
- ss << *itr << ' ';
+ AllowedLooterSet::const_iterator itr = allowedLooters.begin();
+ ss << *itr;
+ for (++itr; itr != allowedLooters.end(); ++itr)
+ ss << ' ' << *itr;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_ITEM_BOP_TRADE);
stmt->setUInt32(0, pItem->GetGUIDLow());
@@ -12051,7 +12040,7 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
pItem->SetNotRefundable(this);
- pItem->SetSoulboundTradeable(NULL, this, false);
+ pItem->ClearSoulboundTradeable(this);
RemoveTradeableItem(pItem);
pItem->SetState(ITEM_REMOVED, this);
}
@@ -12168,7 +12157,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
pItem->SetNotRefundable(this);
- pItem->SetSoulboundTradeable(NULL, this, false);
+ pItem->ClearSoulboundTradeable(this);
RemoveTradeableItem(pItem);
pItem->SetState(ITEM_REMOVED, this);
pItem2->SetState(ITEM_CHANGED, this);
@@ -12388,7 +12377,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
RemoveItemDurations(pItem);
pItem->SetNotRefundable(this);
- pItem->SetSoulboundTradeable(NULL, this, false);
+ pItem->ClearSoulboundTradeable(this);
RemoveTradeableItem(pItem);
const ItemTemplate* proto = pItem->GetTemplate();
@@ -13335,17 +13324,17 @@ void Player::UpdateSoulboundTradeItems()
{
if (!*itr)
{
- itr = m_itemSoulboundTradeable.erase(itr++);
+ m_itemSoulboundTradeable.erase(itr++);
continue;
}
if ((*itr)->GetOwnerGUID() != GetGUID())
{
- itr = m_itemSoulboundTradeable.erase(itr++);
+ m_itemSoulboundTradeable.erase(itr++);
continue;
}
if ((*itr)->CheckSoulboundTradeExpire())
{
- itr = m_itemSoulboundTradeable.erase(itr++);
+ m_itemSoulboundTradeable.erase(itr++);
continue;
}
++itr;
@@ -13591,7 +13580,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
}
}
}
- // Cast custom spell vs all equal basepoints getted from enchant_amount
+ // Cast custom spell vs all equal basepoints got from enchant_amount
if (basepoints)
CastCustomSpell(this, enchant_spell_id, &basepoints, &basepoints, &basepoints, true, item);
else
@@ -14581,8 +14570,7 @@ bool Player::CanCompleteQuest(uint32 quest_id)
if (!qInfo)
return false;
- RewardedQuestSet::iterator rewItr = m_RewardedQuests.find(quest_id);
- if (!qInfo->IsRepeatable() && rewItr != m_RewardedQuests.end())
+ if (!qInfo->IsRepeatable() && m_RewardedQuests.find(quest_id) != m_RewardedQuests.end())
return false; // not allow re-complete quest
// auto complete quest
@@ -14911,8 +14899,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
if (log_slot < MAX_QUEST_LOG_SIZE)
SetQuestSlot(log_slot, 0);
- RewardedQuestSet::const_iterator rewItr = m_RewardedQuests.find(quest_id);
- bool rewarded = (rewItr != m_RewardedQuests.end());
+ bool rewarded = (m_RewardedQuests.find(quest_id) != m_RewardedQuests.end());
// Not give XP in case already completed once repeatable quest
uint32 XP = rewarded ? 0 : uint32(quest->XPValue(this)*sWorld->getRate(RATE_XP_QUEST));
@@ -15661,11 +15648,11 @@ void Player::GroupEventHappens(uint32 questId, WorldObject const* pEventObject)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pGroupGuy = itr->getSource();
+ Player* player = itr->getSource();
// for any leave or dead (with not released body) group member at appropriate distance
- if (pGroupGuy && pGroupGuy->IsAtGroupRewardDistance(pEventObject) && !pGroupGuy->GetCorpse())
- pGroupGuy->AreaExploredOrEventHappens(questId);
+ if (player && player->IsAtGroupRewardDistance(pEventObject) && !player->GetCorpse())
+ player->AreaExploredOrEventHappens(questId);
}
}
else
@@ -17474,7 +17461,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
AllowedLooterSet looters;
for (Tokens::iterator itr = GUIDlist.begin(); itr != GUIDlist.end(); ++itr)
looters.insert(atol(*itr));
- item->SetSoulboundTradeable(&looters, this, true);
+ item->SetSoulboundTradeable(looters);
m_itemSoulboundTradeable.push_back(item);
}
else
@@ -19029,7 +19016,6 @@ void Player::Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8
player_bytes2 |= facialHair;
CharacterDatabase.PExecute("UPDATE characters SET gender = '%u', playerBytes = '%u', playerBytes2 = '%u' WHERE guid = '%u'", gender, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24), player_bytes2, GUID_LOPART(guid));
- sWorld->ReloadSingleCharacterNameData(GUID_LOPART(guid));
}
void Player::SendAttackSwingDeadTarget()
@@ -19353,7 +19339,7 @@ inline void Player::BuildPlayerChat(WorldPacket* data, uint8 msgtype, const std:
*data << uint64(GetGUID());
*data << uint32(text.length() + 1);
*data << text;
- *data << uint8(chatTag());
+ *data << uint8(GetChatTag());
}
void Player::Say(const std::string& text, const uint32 language)
@@ -19796,7 +19782,7 @@ void Player::RemoveSpellMods(Spell* spell)
for (uint8 i=0; i<MAX_SPELLMOD; ++i)
{
- for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();)
+ for (SpellModList::const_iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();)
{
SpellModifier* mod = *itr;
++itr;
@@ -19828,8 +19814,7 @@ void Player::DropModCharge(SpellModifier* mod, Spell* spell)
if (spell && mod->ownerAura && mod->charges > 0)
{
- --mod->charges;
- if (mod->charges == 0)
+ if (--mod->charges == 0)
mod->charges = -1;
spell->m_appliedMods.insert(mod->ownerAura);
@@ -21078,22 +21063,19 @@ WorldLocation Player::GetStartPosition() const
return WorldLocation(mapId, info->positionX, info->positionY, info->positionZ, 0);
}
-bool Player::isValid() const
+bool Player::IsNeverVisible() const
{
- if (!Unit::isValid())
- return false;
+ if (Unit::IsNeverVisible())
+ return true;
if (GetSession()->PlayerLogout() || GetSession()->PlayerLoading())
- return false;
+ return true;
- return true;
+ return false;
}
-bool Player::canSeeAlways(WorldObject const* obj) const
+bool Player::CanAlwaysSee(WorldObject const* obj) const
{
- if (Unit::canSeeAlways(obj))
- return true;
-
// Always can see self
if (m_mover == obj)
return true;
@@ -21105,9 +21087,9 @@ bool Player::canSeeAlways(WorldObject const* obj) const
return false;
}
-bool Player::isAlwaysDetectableFor(WorldObject const* seer) const
+bool Player::IsAlwaysDetectableFor(WorldObject const* seer) const
{
- if (Unit::isAlwaysDetectableFor(seer))
+ if (Unit::IsAlwaysDetectableFor(seer))
return true;
if (const Player* seerPlayer = seer->ToPlayer())
@@ -21500,7 +21482,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
data.Initialize(SMSG_LOGIN_SETTIMESPEED, 4 + 4 + 4);
data << uint32(secsToTimeBitFields(sWorld->GetGameTime()));
- data << (float)0.01666667f; // game speed
+ data << float(0.01666667f); // game speed
data << uint32(0); // added in 3.1.2
GetSession()->SendPacket(&data);
@@ -21545,7 +21527,7 @@ void Player::SendInitialPacketsAfterAddToMap()
if (HasAuraType(SPELL_AURA_MOD_STUN))
SetMovement(MOVE_ROOT);
- // manual send package (have code in HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); that don't must be re-applied.
+ // manual send package (have code in HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); that must not be re-applied.
if (HasAuraType(SPELL_AURA_MOD_ROOT))
{
WorldPacket data2(SMSG_FORCE_MOVE_ROOT, 10);
@@ -22324,27 +22306,27 @@ bool Player::GetsRecruitAFriendBonus(bool forXP)
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pGroupGuy = itr->getSource();
- if (!pGroupGuy)
+ Player* player = itr->getSource();
+ if (!player)
continue;
- if (!pGroupGuy->IsAtRecruitAFriendDistance(this))
+ if (!player->IsAtRecruitAFriendDistance(this))
continue; // member (alive or dead) or his corpse at req. distance
if (forXP)
{
// level must be allowed to get RaF bonus
- if (pGroupGuy->getLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
+ if (player->getLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
continue;
// level difference must be small enough to get RaF bonus, UNLESS we are lower level
- if (pGroupGuy->getLevel() < getLevel())
- if (uint8(getLevel() - pGroupGuy->getLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE))
+ if (player->getLevel() < getLevel())
+ if (uint8(getLevel() - player->getLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE))
continue;
}
- bool ARecruitedB = (pGroupGuy->GetSession()->GetRecruiterId() == GetSession()->GetAccountId());
- bool BRecruitedA = (GetSession()->GetRecruiterId() == pGroupGuy->GetSession()->GetAccountId());
+ bool ARecruitedB = (player->GetSession()->GetRecruiterId() == GetSession()->GetAccountId());
+ bool BRecruitedA = (GetSession()->GetRecruiterId() == player->GetSession()->GetAccountId());
if (ARecruitedB || BRecruitedA)
{
recruitAFriend = true;
@@ -22372,16 +22354,16 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
{
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pGroupGuy = itr->getSource();
- if (!pGroupGuy)
+ Player* player = itr->getSource();
+ if (!player)
continue;
- if (!pGroupGuy->IsAtGroupRewardDistance(pRewardSource))
+ if (!player->IsAtGroupRewardDistance(pRewardSource))
continue; // member (alive or dead) or his corpse at req. distance
// quest objectives updated only for alive group member or dead but with not released body
- if (pGroupGuy->isAlive()|| !pGroupGuy->GetCorpse())
- pGroupGuy->KilledMonsterCredit(creature_id, creature_guid);
+ if (player->isAlive()|| !player->GetCorpse())
+ player->KilledMonsterCredit(creature_id, creature_guid);
}
}
else // if (!group)
@@ -22783,10 +22765,6 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
return false;
}
-// ***********************************
-// -------------TRINITY---------------
-// ***********************************
-
void Player::StopCastingBindSight()
{
if (WorldObject* target = GetViewpoint())
@@ -23132,7 +23110,7 @@ void Player::InitRunes()
m_runes->runeState = 0;
m_runes->lastUsedRune = RUNE_BLOOD;
- for (uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint8 i = 0; i < MAX_RUNES; ++i)
{
SetBaseRune(i, runeSlotTypes[i]); // init base types
SetCurrentRune(i, runeSlotTypes[i]); // init current types
@@ -23141,13 +23119,13 @@ void Player::InitRunes()
m_runes->SetRuneState(i);
}
- for (uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
+ for (uint8 i = 0; i < NUM_RUNE_TYPES; ++i)
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f);
}
bool Player::IsBaseRuneSlotsOnCooldown(RuneType runeType) const
{
- for (uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint8 i = 0; i < MAX_RUNES; ++i)
if (GetBaseRune(i) == runeType && GetRuneCooldown(i) == 0)
return false;
@@ -23206,8 +23184,8 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
InventoryResult msg = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item->itemid, item->count);
if (msg == EQUIP_ERR_OK)
{
- AllowedLooterSet* looters = item->GetAllowedLooters();
- Item* newitem = StoreNewItem(dest, item->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
+ AllowedLooterSet looters = item->GetAllowedLooters();
+ Item* newitem = StoreNewItem(dest, item->itemid, true, item->randomPropertyId, looters);
if (qitem)
{
@@ -24720,7 +24698,7 @@ float Player::GetAverageItemLevel()
if (m_items[i] && m_items[i]->GetTemplate())
sum += m_items[i]->GetTemplate()->GetItemLevelIncludingQuality();
- count++;
+ ++count;
}
return ((float)sum) / count;
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 862b271c464..ddafefc087e 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -743,8 +743,8 @@ enum RestType
enum DuelCompleteType
{
DUEL_INTERRUPTED = 0,
- DUEL_WON = 1,
- DUEL_FLED = 2
+ DUEL_WON = 1,
+ DUEL_FLED = 2
};
enum TeleportToOptions
@@ -768,6 +768,16 @@ enum EnviromentalDamage
DAMAGE_FALL_TO_VOID = 6 // custom case for fall without durability loss
};
+enum PlayerChatTag
+{
+ CHAT_TAG_NONE = 0x00,
+ CHAT_TAG_AFK = 0x01,
+ CHAT_TAG_DND = 0x02,
+ CHAT_TAG_GM = 0x04,
+ CHAT_TAG_UNK = 0x08, // Probably battleground commentator
+ CHAT_TAG_DEV = 0x10,
+};
+
enum PlayedTimeIndex
{
PLAYED_TIME_TOTAL = 0,
@@ -1125,7 +1135,7 @@ class Player : public Unit, public GridObject<Player>
bool ToggleDND();
bool isAFK() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK); }
bool isDND() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DND); }
- uint8 chatTag() const;
+ uint8 GetChatTag() const;
std::string afkMsg;
std::string dndMsg;
@@ -1242,18 +1252,18 @@ class Player : public Unit, public GridObject<Player>
bool CanNoReagentCast(SpellInfo const* spellInfo) const;
bool HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_slot = NULL_SLOT) const;
bool HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 count, uint8 except_slot = NULL_SLOT) const;
- InventoryResult CanTakeMoreSimilarItems(Item* pItem) const { return _CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem); }
- InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count) const { return _CanTakeMoreSimilarItems(entry, count, NULL); }
+ InventoryResult CanTakeMoreSimilarItems(Item* pItem) const { return CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem); }
+ InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count) const { return CanTakeMoreSimilarItems(entry, count, NULL); }
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 item, uint32 count, uint32* no_space_count = NULL) const
{
- return _CanStoreItem(bag, slot, dest, item, count, NULL, false, no_space_count);
+ return CanStoreItem(bag, slot, dest, item, count, NULL, false, no_space_count);
}
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, Item* pItem, bool swap = false) const
{
if (!pItem)
return EQUIP_ERR_ITEM_NOT_FOUND;
uint32 count = pItem->GetCount();
- return _CanStoreItem(bag, slot, dest, pItem->GetEntry(), count, pItem, swap, NULL);
+ return CanStoreItem(bag, slot, dest, pItem->GetEntry(), count, pItem, swap, NULL);
}
InventoryResult CanStoreItems(Item** pItem, int count) const;
@@ -1269,8 +1279,8 @@ class Player : public Unit, public GridObject<Player>
bool HasItemTotemCategory(uint32 TotemCategory) const;
InventoryResult CanUseItem(ItemTemplate const* pItem) const;
InventoryResult CanUseAmmo(uint32 item) const;
-
- Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0, AllowedLooterSet* allowedLooters = NULL);
+ Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0);
+ Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId, AllowedLooterSet &allowedLooters);
Item* StoreItem(ItemPosCountVec const& pos, Item* pItem, bool update);
Item* EquipNewItem(uint16 pos, uint32 item, bool update);
Item* EquipItem(uint16 pos, Item* pItem, bool update);
@@ -1280,8 +1290,8 @@ class Player : public Unit, public GridObject<Player>
void AutoStoreLoot(uint32 loot_id, LootStore const& store, bool broadcast = false) { AutoStoreLoot(NULL_BAG, NULL_SLOT, loot_id, store, broadcast); }
void StoreLootItem(uint8 lootSlot, Loot* loot);
- InventoryResult _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
- InventoryResult _CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item* pItem = NULL, bool swap = false, uint32* no_space_count = NULL) const;
+ InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
+ InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item* pItem = NULL, bool swap = false, uint32* no_space_count = NULL) const;
void AddRefundReference(uint32 it);
void DeleteRefundReference(uint32 it);
@@ -1937,8 +1947,8 @@ class Player : public Unit, public GridObject<Player>
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
void SendResetFailedNotify(uint32 mapid);
- virtual bool SetPosition(float x, float y, float z, float orientation, bool teleport = false);
- bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
+ virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false);
+ bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
void UpdateUnderwaterState(Map* m, float x, float y, float z);
void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
@@ -2326,9 +2336,9 @@ class Player : public Unit, public GridObject<Player>
bool HaveAtClient(WorldObject const* u) const { return u == this || m_clientGUIDs.find(u->GetGUID()) != m_clientGUIDs.end(); }
- bool isValid() const;
+ bool IsNeverVisible() const;
- bool IsVisibleGloballyFor(Player* pl) const;
+ bool IsVisibleGloballyFor(Player* player) const;
void SendInitialVisiblePackets(Unit* target);
void UpdateObjectVisibility(bool forced = true);
@@ -2483,6 +2493,20 @@ class Player : public Unit, public GridObject<Player>
void AddWhisperWhiteList(uint64 guid) { WhisperList.push_back(guid); }
bool IsInWhisperWhiteList(uint64 guid);
+ //! Return collision height sent to client
+ //! we currently only send this on dismount
+ float GetCollisionHeight()
+ {
+ CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId());
+ ASSERT(displayInfo);
+ CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId);
+ ASSERT(modelData);
+
+ return modelData->CollisionHeight;
+
+ //! TODO: Need a proper calculation for collision height when mounted
+ }
+
protected:
// Gamemaster whisper whitelist
WhisperListContainer WhisperList;
@@ -2734,17 +2758,17 @@ class Player : public Unit, public GridObject<Player>
Runes *m_runes;
EquipmentSets m_EquipmentSets;
- bool canSeeAlways(WorldObject const* obj) const;
+ bool CanAlwaysSee(WorldObject const* obj) const;
- bool isAlwaysDetectableFor(WorldObject const* seer) const;
+ bool IsAlwaysDetectableFor(WorldObject const* seer) const;
uint8 m_grantableLevels;
private:
// internal common parts for CanStore/StoreItem functions
- InventoryResult _CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const;
- InventoryResult _CanStoreItem_InBag(uint8 bag, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const;
- InventoryResult _CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const;
+ InventoryResult CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const;
+ InventoryResult CanStoreItem_InBag(uint8 bag, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const;
+ InventoryResult CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const;
Item* _StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool update);
Item* _LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, Field* fields);
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 4d343d02146..e9798b61a60 100755
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -114,20 +114,20 @@ void PlayerSocial::SetFriendNote(uint32 friend_guid, std::string note)
m_playerSocialMap[friend_guid].Note = note;
}
-void PlayerSocial::SendSocialList(Player* plr)
+void PlayerSocial::SendSocialList(Player* player)
{
- if (!plr)
+ if (!player)
return;
uint32 size = m_playerSocialMap.size();
WorldPacket data(SMSG_CONTACT_LIST, (4+4+size*25)); // just can guess size
- data << uint32(7); // unk flag (0x1, 0x2, 0x4), 0x7 if it include ignore list
+ data << uint32(7); // 0x1 = Friendlist update. 0x2 = Ignorelist update. 0x4 = Mutelist update.
data << uint32(size); // friends count
for (PlayerSocialMap::iterator itr = m_playerSocialMap.begin(); itr != m_playerSocialMap.end(); ++itr)
{
- sSocialMgr->GetFriendInfo(plr, itr->first, itr->second);
+ sSocialMgr->GetFriendInfo(player, itr->first, itr->second);
data << uint64(itr->first); // player guid
data << uint32(itr->second.Flags); // player flag (0x1-friend?, 0x2-ignored?, 0x4-muted?)
@@ -144,7 +144,7 @@ void PlayerSocial::SendSocialList(Player* plr)
}
}
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CONTACT_LIST");
}
diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h
index 5faa8f1987c..78965c13948 100755
--- a/src/server/game/Entities/Player/SocialMgr.h
+++ b/src/server/game/Entities/Player/SocialMgr.h
@@ -124,7 +124,7 @@ class PlayerSocial
void RemoveFromSocialList(uint32 friend_guid, bool ignore);
void SetFriendNote(uint32 friend_guid, std::string note);
// Packet send's
- void SendSocialList(Player* plr);
+ void SendSocialList(Player* player);
// Misc
bool HasFriend(uint32 friend_guid);
bool HasIgnore(uint32 ignore_guid);
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index 10c54720350..97629e802d4 100755
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
@@ -86,9 +86,10 @@ void Totem::InitStats(uint32 duration)
void Totem::InitSummon()
{
- // use AddAura instead of CastSpell - this in fact should be an AddSpell equivalent for creatures, but nothing like that exists so far.
if (m_type == TOTEM_PASSIVE)
- AddAura(GetSpell(), this);
+ {
+ CastSpell(this, GetSpell(), true);
+ }
// Some totems can have both instant effect and passive spell
if (GetSpell(1))
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index dbe9697bcaf..28895cff35e 100755
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -489,13 +489,13 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();)
{
- Player* plr = *itr;
+ Player* player = *itr;
++itr;
- if (plr->isDead() && !plr->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
- plr->ResurrectPlayer(1.0f);
+ if (player->isDead() && !player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
+ player->ResurrectPlayer(1.0f);
- plr->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);
+ player->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT);
}
//we need to create and save new Map object with 'newMapid' because if not done -> lead to invalid Map object reference...
@@ -584,13 +584,13 @@ void Transport::Update(uint32 p_diff)
void Transport::UpdateForMap(Map const* targetMap)
{
- Map::PlayerList const& pl = targetMap->GetPlayers();
- if (pl.isEmpty())
+ Map::PlayerList const& player = targetMap->GetPlayers();
+ if (player.isEmpty())
return;
if (GetMapId() == targetMap->GetId())
{
- for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr)
{
if (this != itr->getSource()->GetTransport())
{
@@ -609,7 +609,7 @@ void Transport::UpdateForMap(Map const* targetMap)
WorldPacket out_packet;
transData.BuildPacket(&out_packet);
- for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = player.begin(); itr != player.end(); ++itr)
if (this != itr->getSource()->GetTransport())
itr->getSource()->SendDirectMessage(&out_packet);
}
@@ -673,7 +673,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
return 0;
}
- map->Add(creature);
+ map->AddToMap(creature);
m_NPCPassengerSet.insert(creature);
if (tguid == 0)
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 594203e0c46..3ab2f786086 100755
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -641,20 +641,21 @@ const float m_diminishing_k[MAX_CLASSES] =
float Player::GetMissPercentageFromDefence() const
{
- const float miss_cap[MAX_CLASSES] =
+ float const miss_cap[MAX_CLASSES] =
{
- 16.00f, // Warrior //correct
- 16.00f, // Paladin //correct
- 16.00f, // Hunter //?
- 16.00f, // Rogue //?
- 16.00f, // Priest //?
- 16.00f, // DK //correct
- 16.00f, // Shaman //?
- 16.00f, // Mage //?
- 16.00f, // Warlock //?
- 0.0f, // ??
- 16.00f // Druid //?
+ 16.00f, // Warrior //correct
+ 16.00f, // Paladin //correct
+ 16.00f, // Hunter //?
+ 16.00f, // Rogue //?
+ 16.00f, // Priest //?
+ 16.00f, // DK //correct
+ 16.00f, // Shaman //?
+ 16.00f, // Mage //?
+ 16.00f, // Warlock //?
+ 0.0f, // ??
+ 16.00f // Druid //?
};
+
float diminishing = 0.0f, nondiminishing = 0.0f;
// Modify value from defense skill (only bonus from defense rating diminishes)
nondiminishing += (GetSkillValue(SKILL_DEFENSE) - GetMaxSkillValueForLevel()) * 0.04f;
@@ -669,17 +670,17 @@ void Player::UpdateParryPercentage()
{
const float parry_cap[MAX_CLASSES] =
{
- 47.003525f, // Warrior
- 47.003525f, // Paladin
- 145.560408f, // Hunter
- 145.560408f, // Rogue
- 0.0f, // Priest
- 47.003525f, // DK
- 145.560408f, // Shaman
- 0.0f, // Mage
- 0.0f, // Warlock
- 0.0f, // ??
- 0.0f // Druid
+ 47.003525f, // Warrior
+ 47.003525f, // Paladin
+ 145.560408f, // Hunter
+ 145.560408f, // Rogue
+ 0.0f, // Priest
+ 47.003525f, // DK
+ 145.560408f, // Shaman
+ 0.0f, // Mage
+ 0.0f, // Warlock
+ 0.0f, // ??
+ 0.0f // Druid
};
// No parry
@@ -706,17 +707,17 @@ void Player::UpdateDodgePercentage()
{
const float dodge_cap[MAX_CLASSES] =
{
- 88.129021f, // Warrior
- 88.129021f, // Paladin
- 145.560408f, // Hunter
- 145.560408f, // Rogue
- 150.375940f, // Priest
- 88.129021f, // DK
- 145.560408f, // Shaman
- 150.375940f, // Mage
- 150.375940f, // Warlock
- 0.0f, // ??
- 116.890707f // Druid
+ 88.129021f, // Warrior
+ 88.129021f, // Paladin
+ 145.560408f, // Hunter
+ 145.560408f, // Rogue
+ 150.375940f, // Priest
+ 88.129021f, // DK
+ 145.560408f, // Shaman
+ 150.375940f, // Mage
+ 150.375940f, // Warlock
+ 0.0f, // ??
+ 116.890707f // Druid
};
float diminishing = 0.0f, nondiminishing = 0.0f;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index efddb25eff8..6d8f7866657 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -181,7 +181,8 @@ m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this)
for (uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
m_SummonSlot[i] = 0;
- m_ObjectSlot[0] = m_ObjectSlot[1] = m_ObjectSlot[2] = m_ObjectSlot[3] = 0;
+ for (uint8 i = 0; i < MAX_GAMEOBJECT_SLOT; ++i)
+ m_ObjectSlot[i] = 0;
m_auraUpdateIterator = m_ownedAuras.end();
@@ -585,7 +586,7 @@ bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const
void Unit::GetRandomContactPoint(const Unit* obj, float &x, float &y, float &z, float distance2dMin, float distance2dMax) const
{
float combat_reach = GetCombatReach();
- if (combat_reach < 0.1) // sometimes bugged for players
+ if (combat_reach < 0.1f) // sometimes bugged for players
combat_reach = DEFAULT_COMBAT_REACH;
uint32 attacker_number = getAttackers().size();
@@ -1573,7 +1574,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo
return (newdamage > 1) ? newdamage : 1;
}
-void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo)
+void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, uint32 const damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo)
{
if (!victim || !victim->isAlive() || !damage)
return;
@@ -1583,15 +1584,19 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
// Magic damage, check for resists
if ((schoolMask & SPELL_SCHOOL_MASK_NORMAL) == 0)
{
- float baseVictimResistance = float(victim->GetResistance(GetFirstSchoolInMask(schoolMask)));
- float ignoredResistance = float(GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, schoolMask));
+ float victimResistance = float(victim->GetResistance(schoolMask));
+ victimResistance += float(GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, schoolMask));
+
if (Player* player = ToPlayer())
- ignoredResistance += float(player->GetSpellPenetrationItemMod());
- float victimResistance = baseVictimResistance + ignoredResistance;
+ victimResistance -= float(player->GetSpellPenetrationItemMod());
+
+ // Resistance can't be lower then 0.
+ if (victimResistance < 0.0f)
+ victimResistance = 0.0f;
- static const uint32 BOSS_LEVEL = 83;
- static const float BOSS_RESISTANCE_CONSTANT = 510.0;
- uint32 level = getLevel();
+ static uint32 const BOSS_LEVEL = 83;
+ static float const BOSS_RESISTANCE_CONSTANT = 510.0f;
+ uint32 level = victim->getLevel();
float resistanceConstant = 0.0f;
if (level == BOSS_LEVEL)
@@ -2215,22 +2220,23 @@ void Unit::SendMeleeAttackStart(Unit* victim)
WorldPacket data(SMSG_ATTACKSTART, 8 + 8);
data << uint64(GetGUID());
data << uint64(victim->GetGUID());
-
SendMessageToSet(&data, true);
sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
}
void Unit::SendMeleeAttackStop(Unit* victim)
{
- if (!victim)
- return;
-
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4)); // we guess size
data.append(GetPackGUID());
- data.append(victim->GetPackGUID()); // can be 0x00...
- data << uint32(0); // can be 0x1
+ data.append(victim ? victim->GetPackGUID() : 0); // can be 0x00...
+ data << uint32(0); // can be 0x1
SendMessageToSet(&data, true);
- sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
+ sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
+
+ if (victim)
+ sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
+ else
+ sLog->outDetail("%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow());
}
bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType)
@@ -3007,7 +3013,7 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi
Spell* spell = m_currentSpells[spellType];
if (spell
&& (withDelayed || spell->getState() != SPELL_STATE_DELAYED)
- && (withInstant || spell->CalcCastTime() > 0))
+ && (withInstant || spell->GetCastTime() > 0))
{
// for example, do not let self-stun aura interrupt itself
if (!spell->IsInterruptable())
@@ -3044,7 +3050,7 @@ bool Unit::IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled, bool skip
// Maybe later some special spells will be excluded too.
// if skipInstant then instant spells shouldn't count as being casted
- if (skipInstant && m_currentSpells[CURRENT_GENERIC_SPELL] && !m_currentSpells[CURRENT_GENERIC_SPELL]->CalcCastTime())
+ if (skipInstant && m_currentSpells[CURRENT_GENERIC_SPELL] && !m_currentSpells[CURRENT_GENERIC_SPELL]->GetCastTime())
return false;
// generic spells are casted when they are not finished and not delayed
@@ -3095,7 +3101,7 @@ Spell* Unit::FindCurrentSpellBySpellId(uint32 spell_id) const
int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const
{
if (Spell const* spell = FindCurrentSpellBySpellId(spell_id))
- return spell->CalcCastTime();
+ return spell->GetCastTime();
return 0;
}
@@ -3471,10 +3477,10 @@ void Unit::RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode)
i = m_ownedAuras.begin();
}
-void Unit::RemoveOwnedAura(uint32 spellId, uint64 caster, uint8 reqEffMask, AuraRemoveMode removeMode)
+void Unit::RemoveOwnedAura(uint32 spellId, uint64 casterGUID, uint8 reqEffMask, AuraRemoveMode removeMode)
{
for (AuraMap::iterator itr = m_ownedAuras.lower_bound(spellId); itr != m_ownedAuras.upper_bound(spellId);)
- if (((itr->second->GetEffectMask() & reqEffMask) == reqEffMask) && (!caster || itr->second->GetCasterGUID() == caster))
+ if (((itr->second->GetEffectMask() & reqEffMask) == reqEffMask) && (!casterGUID || itr->second->GetCasterGUID() == casterGUID))
{
RemoveOwnedAura(itr, removeMode);
itr = m_ownedAuras.lower_bound(spellId);
@@ -3577,13 +3583,13 @@ void Unit::RemoveAura(Aura* aura, AuraRemoveMode mode)
RemoveAura(aurApp, mode);
}
-void Unit::RemoveAurasDueToSpell(uint32 spellId, uint64 caster, uint8 reqEffMask, AuraRemoveMode removeMode)
+void Unit::RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID, uint8 reqEffMask, AuraRemoveMode removeMode)
{
for (AuraApplicationMap::iterator iter = m_appliedAuras.lower_bound(spellId); iter != m_appliedAuras.upper_bound(spellId);)
{
Aura const* aura = iter->second->GetBase();
if (((aura->GetEffectMask() & reqEffMask) == reqEffMask)
- && (!caster || aura->GetCasterGUID() == caster))
+ && (!casterGUID || aura->GetCasterGUID() == casterGUID))
{
RemoveAura(iter, removeMode);
iter = m_appliedAuras.lower_bound(spellId);
@@ -3593,13 +3599,13 @@ void Unit::RemoveAurasDueToSpell(uint32 spellId, uint64 caster, uint8 reqEffMask
}
}
-void Unit::RemoveAuraFromStack(uint32 spellId, uint64 caster, AuraRemoveMode removeMode)
+void Unit::RemoveAuraFromStack(uint32 spellId, uint64 casterGUID, AuraRemoveMode removeMode)
{
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);)
{
Aura* aura = iter->second;
if ((aura->GetType() == UNIT_AURA_TYPE)
- && (!caster || aura->GetCasterGUID() == caster))
+ && (!casterGUID || aura->GetCasterGUID() == casterGUID))
{
aura->ModStackAmount(-1, removeMode);
return;
@@ -4421,14 +4427,26 @@ int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask)
float Unit::GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const
{
+ std::map<SpellGroup, int32> SameEffectSpellGroup;
float multiplier = 1.0f;
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
- if ((*i)->GetMiscValue()& misc_mask)
- AddPctN(multiplier, (*i)->GetAmount());
+ if (((*i)->GetMiscValue() & misc_mask))
+ {
+ // Check if the Aura Effect has a the Same Effect Stack Rule and if so, use the highest amount of that SpellGroup
+ // If the Aura Effect does not have this Stack Rule, it returns false so we can add to the multiplier as usual
+ if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup))
+ AddPctN(multiplier, (*i)->GetAmount());
+ }
+ }
+ // Add the highest of the Same Effect Stack Rule SpellGroups to the multiplier
+ for (std::map<SpellGroup, int32>::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr)
+ {
+ AddPctN(multiplier, itr->second);
}
+
return multiplier;
}
@@ -4645,7 +4663,7 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
gameObj->SetOwnerGUID(0);
- for (uint32 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < MAX_GAMEOBJECT_SLOT; ++i)
{
if (m_ObjectSlot[i] == gameObj->GetGUID())
{
@@ -4705,12 +4723,13 @@ void Unit::RemoveGameObject(uint32 spellid, bool del)
void Unit::RemoveAllGameObjects()
{
// remove references to unit
- for (GameObjectList::iterator i = m_gameObj.begin(); i != m_gameObj.end();)
+ while (!m_gameObj.empty())
{
+ GameObjectList::iterator i = m_gameObj.begin();
(*i)->SetOwnerGUID(0);
(*i)->SetRespawnTime(0);
(*i)->Delete();
- i = m_gameObj.erase(i);
+ m_gameObj.erase(i);
}
}
@@ -5271,7 +5290,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (ToPlayer()->GetReputationRank(934) == REP_EXALTED)
{
// triggered at positive/self casts also, current attack target used then
- if (IsFriendlyTo(target))
+ if (target && IsFriendlyTo(target))
{
target = getVictim();
if (!target)
@@ -5748,11 +5767,11 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Glyph of Ice Block
case 56372:
{
- Player* plr = ToPlayer();
- if (!plr)
+ Player* player = ToPlayer();
+ if (!player)
return false;
- SpellCooldowns const cooldowns = plr->GetSpellCooldowns();
+ SpellCooldowns const cooldowns = player->GetSpellCooldowns();
// remove cooldowns on all ranks of Frost Nova
for (SpellCooldowns::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
{
@@ -5760,7 +5779,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Frost Nova
if (cdSpell && cdSpell->SpellFamilyName == SPELLFAMILY_MAGE
&& cdSpell->SpellFamilyFlags[0] & 0x00000040)
- plr->RemoveSpellCooldown(cdSpell->Id, true);
+ player->RemoveSpellCooldown(cdSpell->Id, true);
}
break;
}
@@ -6272,7 +6291,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
{
if (procSpell->SpellVisual[0] == 750 && procSpell->Effects[1].ApplyAuraName == 3)
{
- if (target->GetTypeId() == TYPEID_UNIT)
+ if (target && target->GetTypeId() == TYPEID_UNIT)
{
triggered_spell_id = 54820;
break;
@@ -7042,26 +7061,26 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Windfury Weapon (Passive) 1-5 Ranks
case 33757:
{
- Player* plr = ToPlayer();
- if (!plr || !castItem || !castItem->IsEquipped() || !victim || !victim->isAlive())
+ Player* player = ToPlayer();
+ if (!player || !castItem || !castItem->IsEquipped() || !victim || !victim->isAlive())
return false;
// custom cooldown processing case
- if (cooldown && plr->HasSpellCooldown(dummySpell->Id))
+ if (cooldown && player->HasSpellCooldown(dummySpell->Id))
return false;
if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID())
return false;
- WeaponAttackType attType = WeaponAttackType(plr->GetAttackBySlot(castItem->GetSlot()));
+ WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
if ((attType != BASE_ATTACK && attType != OFF_ATTACK) || !isAttackReady(attType))
return false;
// Now compute real proc chance...
uint32 chance = 20;
- plr->ApplySpellMod(dummySpell->Id, SPELLMOD_CHANCE_OF_SUCCESS, chance);
+ player->ApplySpellMod(dummySpell->Id, SPELLMOD_CHANCE_OF_SUCCESS, chance);
- Item* addWeapon = plr->GetWeaponForAttack(attType == BASE_ATTACK ? OFF_ATTACK : BASE_ATTACK, true);
+ Item* addWeapon = player->GetWeaponForAttack(attType == BASE_ATTACK ? OFF_ATTACK : BASE_ATTACK, true);
uint32 enchant_id_add = addWeapon ? addWeapon->GetEnchantmentId(EnchantmentSlot(TEMP_ENCHANTMENT_SLOT)) : 0;
SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id_add);
if (pEnchant && pEnchant->spellid[0] == dummySpell->Id)
@@ -7106,7 +7125,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// apply cooldown before cast to prevent processing itself
if (cooldown)
- plr->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
+ player->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
// Attack Twice
for (uint32 i = 0; i < 2; ++i)
@@ -7232,7 +7251,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Item - Shaman T10 Elemental 4P Bonus
case 70817:
{
- if(!target)
+ if (!target)
return false;
// try to find spell Flame Shock on the target
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x10000000, 0x0, 0x0, GetGUID()))
@@ -7732,6 +7751,9 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Guard Dog
case 201:
{
+ if (!victim)
+ return false;
+
triggered_spell_id = 54445;
target = this;
float addThreat = float(CalculatePctN(procSpell->Effects[0].CalcValue(this), triggerAmount));
@@ -7980,11 +8002,8 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
else if (dummySpell->SpellIconID == 3015)
{
*handled = true;
- if (procSpell->Category == SPELLCATEGORY_JUDGEMENT)
- {
- CastSpell(victim, 68055, true);
- return true;
- }
+ CastSpell(victim, 68055, true);
+ return true;
}
// Glyph of Divinity
else if (dummySpell->Id == 54939)
@@ -8054,9 +8073,9 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
{
*handled = true;
// Convert recently used Blood Rune to Death Rune
- if (Player* plr = ToPlayer())
+ if (Player* player = ToPlayer())
{
- if (plr->getClass() != CLASS_DEATH_KNIGHT)
+ if (player->getClass() != CLASS_DEATH_KNIGHT)
return false;
RuneType rune = ToPlayer()->GetLastUsedRune();
@@ -8080,22 +8099,22 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
{
if (dummySpell->SpellIconID == 2622)
{
- if (plr->GetCurrentRune(i) == RUNE_DEATH ||
- plr->GetBaseRune(i) == RUNE_BLOOD)
+ if (player->GetCurrentRune(i) == RUNE_DEATH ||
+ player->GetBaseRune(i) == RUNE_BLOOD)
continue;
}
else
{
- if (plr->GetCurrentRune(i) == RUNE_DEATH ||
- plr->GetBaseRune(i) != RUNE_BLOOD)
+ if (player->GetCurrentRune(i) == RUNE_DEATH ||
+ player->GetBaseRune(i) != RUNE_BLOOD)
continue;
}
- if (plr->GetRuneCooldown(i) != plr->GetRuneBaseCooldown(i))
+ if (player->GetRuneCooldown(i) != player->GetRuneBaseCooldown(i))
continue;
--runesLeft;
// Mark aura as used
- plr->AddRuneByAuraEffect(i, RUNE_DEATH, aurEff);
+ player->AddRuneByAuraEffect(i, RUNE_DEATH, aurEff);
}
return true;
}
@@ -8389,6 +8408,13 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), trigger_spell_id, SPELL_AURA_PERIODIC_DAMAGE);
break;
}
+ // Item - Hunter T9 4P Bonus
+ if (auraSpellInfo->Id == 67151)
+ {
+ trigger_spell_id = 68130;
+ target = this;
+ break;
+ }
break;
}
case SPELLFAMILY_PALADIN:
@@ -8731,7 +8757,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 63156:
case 63158:
// Can proc only if target has hp below 35%
- if (!victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, procSpell, this))
+ if (!victim || !victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, procSpell, this))
return false;
break;
// Deathbringer Saurfang - Blood Beast's Blood Link
@@ -8771,11 +8797,11 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
// Blade Barrier
if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && auraSpellInfo->SpellIconID == 85)
{
- Player* plr = ToPlayer();
- if (!plr || plr->getClass() != CLASS_DEATH_KNIGHT)
+ Player* player = ToPlayer();
+ if (!player || player->getClass() != CLASS_DEATH_KNIGHT)
return false;
- if (!plr->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
+ if (!player->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
return false;
}
@@ -10124,20 +10150,20 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
// only called in Player::SetSeer
// so move it to Player?
-void Unit::AddPlayerToVision(Player* plr)
+void Unit::AddPlayerToVision(Player* player)
{
if (m_sharedVision.empty())
{
setActive(true);
SetWorldObject(true);
}
- m_sharedVision.push_back(plr);
+ m_sharedVision.push_back(player);
}
// only called in Player::SetSeer
-void Unit::RemovePlayerFromVision(Player* plr)
+void Unit::RemovePlayerFromVision(Player* player)
{
- m_sharedVision.remove(plr);
+ m_sharedVision.remove(player);
if (m_sharedVision.empty())
{
setActive(false);
@@ -10593,11 +10619,6 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellInfo const* spellProto, uint32
AddPctF(TakenTotalMod, std::max(mod, float((*i)->GetAmount())));
}
break;
- // Ebon Plague
- case 1933:
- if ((*i)->GetMiscValue() & (spellProto ? spellProto->GetSchoolMask() : 0))
- AddPctN(TakenTotalMod, (*i)->GetAmount());
- break;
}
}
@@ -11879,7 +11900,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
- if (Player* plr = ToPlayer())
+ if (Player* player = ToPlayer())
{
// mount as a vehicle
if (VehicleId)
@@ -11895,7 +11916,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
SendMessageToSet(&data, true);
data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
// mounts can also have accessories
GetVehicleKit()->InstallAllAccessories(false);
@@ -11903,7 +11924,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
}
// unsummon pet
- Pet* pet = plr->GetPet();
+ Pet* pet = player->GetPet();
if (pet)
{
Battleground* bg = ToPlayer()->GetBattleground();
@@ -11911,7 +11932,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
if (bg && bg->isArena())
pet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
else
- plr->UnsummonPetTemporaryIfAny();
+ player->UnsummonPetTemporaryIfAny();
}
}
@@ -11926,6 +11947,15 @@ void Unit::Unmount()
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
+ if (Player* thisPlayer = ToPlayer())
+ {
+ WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4);
+ data.append(GetPackGUID());
+ data << uint32(sWorld->GetGameTime()); // Packet counter
+ data << thisPlayer->GetCollisionHeight();
+ thisPlayer->GetSession()->SendPacket(&data);
+ }
+
WorldPacket data(SMSG_DISMOUNT, 8);
data.appendPackGUID(GetGUID());
SendMessageToSet(&data, true);
@@ -11947,15 +11977,15 @@ void Unit::Unmount()
// only resummon old pet if the player is already added to a map
// this prevents adding a pet to a not created map which would otherwise cause a crash
// (it could probably happen when logging in after a previous crash)
- if (Player* plr = ToPlayer())
+ if (Player* player = ToPlayer())
{
- if (Pet* pPet = plr->GetPet())
+ if (Pet* pPet = player->GetPet())
{
if (pPet->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED) && !pPet->HasUnitState(UNIT_STAT_STUNNED))
pPet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
else
- plr->ResummonPetTemporaryUnSummonedIfAny();
+ player->ResummonPetTemporaryUnSummonedIfAny();
}
}
@@ -12385,9 +12415,18 @@ int32 Unit::ModifyPower(Powers power, int32 dVal)
return gain;
}
-bool Unit::isAlwaysVisibleFor(WorldObject const* seer) const
+// returns negative amount on power reduction
+int32 Unit::ModifyPowerPct(Powers power, float pct, bool apply)
+{
+ float amount = (float)GetMaxPower(power);
+ ApplyPercentModFloatVar(amount, pct, apply);
+
+ return ModifyPower(power, (int32)amount - (int32)GetMaxPower(power));
+}
+
+bool Unit::IsAlwaysVisibleFor(WorldObject const* seer) const
{
- if (WorldObject::isAlwaysVisibleFor(seer))
+ if (WorldObject::IsAlwaysVisibleFor(seer))
return true;
// Always seen by owner
@@ -12398,9 +12437,9 @@ bool Unit::isAlwaysVisibleFor(WorldObject const* seer) const
return false;
}
-bool Unit::isAlwaysDetectableFor(WorldObject const* seer) const
+bool Unit::IsAlwaysDetectableFor(WorldObject const* seer) const
{
- if (WorldObject::isAlwaysDetectableFor(seer))
+ if (WorldObject::IsAlwaysDetectableFor(seer))
return true;
if (HasAuraTypeWithCaster(SPELL_AURA_MOD_STALKED, seer->GetGUID()))
@@ -13020,16 +13059,16 @@ int32 Unit::CalcSpellDuration(SpellInfo const* spellProto)
return duration;
}
-int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive)
+int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive, uint32 effectMask)
{
- // don't mod permament auras duration
+ // don't mod permanent auras duration
if (duration < 0)
return duration;
// cut duration only of negative effects
if (!positive)
{
- int32 mechanic = spellProto->GetAllEffectsMechanicMask();
+ int32 mechanic = spellProto->GetSpellMechanicMaskByEffectMask(effectMask);
int32 durationMod;
int32 durationMod_always = 0;
@@ -13532,10 +13571,10 @@ void Unit::SetHealth(uint32 val)
SetUInt32Value(UNIT_FIELD_HEALTH, val);
// group update
- if (Player* plr = ToPlayer())
+ if (Player* player = ToPlayer())
{
- if (plr->GetGroup())
- plr->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_CUR_HP);
+ if (player->GetGroup())
+ player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_CUR_HP);
}
else if (Pet* pet = ToCreature()->ToPet())
{
@@ -13711,7 +13750,7 @@ void Unit::RemoveFromWorld()
}
}
-void Unit::CleanupsBeforeDelete(bool finalCleanup)
+void Unit::CleanupBeforeRemoveFromMap(bool finalCleanup)
{
// This needs to be before RemoveFromWorld to make GetCaster() return a valid pointer on aura removal
InterruptNonMeleeSpells(true);
@@ -13735,6 +13774,11 @@ void Unit::CleanupsBeforeDelete(bool finalCleanup)
DeleteThreatList();
getHostileRefManager().setOnlineOfflineState(false);
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
+}
+
+void Unit::CleanupsBeforeDelete(bool finalCleanup)
+{
+ CleanupBeforeRemoveFromMap(finalCleanup);
if (Creature* thisCreature = ToCreature())
if (GetTransport())
@@ -14302,7 +14346,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
if (!handled)
- for (uint8 effIndex = 0; effIndex<MAX_SPELL_EFFECTS; ++effIndex)
+ for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
{
if (!(i->effMask & (1<<effIndex)))
continue;
@@ -14322,6 +14366,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
{
+ // target has to be valid
+ if (!target)
+ return;
+
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount(), spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
SpellNonMeleeDamage damageInfo(this, target, spellInfo->Id, spellInfo->SchoolMask);
uint32 damage = SpellDamageBonus(target, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE);
@@ -14739,9 +14787,9 @@ void Unit::ClearComboPointHolders()
{
uint32 lowguid = *m_ComboPointHolders.begin();
- Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
- if (plr && plr->GetComboTarget() == GetGUID()) // recheck for safe
- plr->ClearComboPoints(); // remove also guid from m_ComboPointHolders;
+ Player* player = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
+ if (player && player->GetComboTarget() == GetGUID()) // recheck for safe
+ player->ClearComboPoints(); // remove also guid from m_ComboPointHolders;
else
m_ComboPointHolders.erase(lowguid); // or remove manually
}
@@ -15308,9 +15356,9 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
return;
// Inform pets (if any) when player kills target)
- if (Player* plr = ToPlayer())
+ if (Player* player = ToPlayer())
{
- Pet* pet = plr->GetPet();
+ Pet* pet = player->GetPet();
if (pet && pet->isAlive() && pet->isControlled())
pet->AI()->KilledUnit(victim);
}
@@ -15605,6 +15653,9 @@ void Unit::SetControlled(bool apply, UnitState state)
case UNIT_STAT_CONFUSED:
if (!HasUnitState(UNIT_STAT_STUNNED))
{
+ ClearUnitState(UNIT_STAT_MELEE_ATTACKING);
+ SendMeleeAttackStop();
+ // SendAutoRepeatCancel ?
SetConfused(true);
CastStop();
}
@@ -15612,6 +15663,9 @@ void Unit::SetControlled(bool apply, UnitState state)
case UNIT_STAT_FLEEING:
if (!HasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
{
+ ClearUnitState(UNIT_STAT_MELEE_ATTACKING);
+ SendMeleeAttackStop();
+ // SendAutoRepeatCancel ?
SetFeared(true);
CastStop();
}
@@ -15882,10 +15936,10 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
}
else
{
- Player* plr = ToPlayer();
- if (plr->isAFK())
- plr->ToggleAFK();
- plr->SetClientControl(this, 0);
+ Player* player = ToPlayer();
+ if (player->isAFK())
+ player->ToggleAFK();
+ player->SetClientControl(this, 0);
}
// charm is set by aura, and aura effect remove handler was called during apply handler execution
@@ -16948,25 +17002,25 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
if (aurApp && aurApp->GetRemoveMode())
return;
- if (Player* plr = ToPlayer())
+ if (Player* player = ToPlayer())
{
- if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && plr->isInCombat())
+ if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && player->isInCombat())
return;
InterruptNonMeleeSpells(false);
- plr->StopCastingCharm();
- plr->StopCastingBindSight();
+ player->StopCastingCharm();
+ player->StopCastingBindSight();
Unmount();
RemoveAurasByType(SPELL_AURA_MOUNTED);
// drop flag at invisible in bg
- if (Battleground* bg = plr->GetBattleground())
- bg->EventPlayerDroppedFlag(plr);
+ if (Battleground* bg = player->GetBattleground())
+ bg->EventPlayerDroppedFlag(player);
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
- plr->UnsummonPetTemporaryIfAny();
+ player->UnsummonPetTemporaryIfAny();
}
ASSERT(!m_vehicle);
@@ -17040,8 +17094,8 @@ void Unit::_ExitVehicle(Position const* exitPosition)
SendMonsterMoveExitVehicle(&pos);
Relocate(&pos);
- if (Player* plr = ToPlayer())
- plr->ResummonPetTemporaryUnSummonedIfAny();
+ if (Player* player = ToPlayer())
+ player->ResummonPetTemporaryUnSummonedIfAny();
WorldPacket data2;
BuildHeartBeatMsg(&data2);
@@ -17152,16 +17206,16 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
{
// FIXME: this interrupts spell visual
DestroyForNearbyPlayers();
- SetPosition(x, y, z, orientation, true);
+ UpdatePosition(x, y, z, orientation, true);
}
}
-bool Unit::SetPosition(float x, float y, float z, float orientation, bool teleport)
+bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
{
// prevent crash when a bad coord is sent by the client
if (!Trinity::IsValidMapCoord(x, y, z, orientation))
{
- sLog->outDebug(LOG_FILTER_UNITS, "Unit::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
+ sLog->outDebug(LOG_FILTER_UNITS, "Unit::UpdatePosition(%f, %f, %f) .. bad coordinates!", x, y, z);
return false;
}
@@ -17356,7 +17410,7 @@ uint32 Unit::GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType
AuraEffectList const& periodicAuras = GetAuraEffectsByType(auraType);
for (AuraEffectList::const_iterator i = periodicAuras.begin(); i != periodicAuras.end(); ++i)
{
- if ((*i)->GetCasterGUID() != caster || (*i)->GetId() != spellId || (*i)->GetEffIndex() != effectIndex || (*i)->GetTotalTicks() == 0)
+ if ((*i)->GetCasterGUID() != caster || (*i)->GetId() != spellId || (*i)->GetEffIndex() != effectIndex || !(*i)->GetTotalTicks())
continue;
amount += uint32(((*i)->GetAmount() * std::max<int32>((*i)->GetTotalTicks() - int32((*i)->GetTickNumber()), 0)) / (*i)->GetTotalTicks());
break;
@@ -17372,6 +17426,17 @@ void Unit::SendClearTarget()
SendMessageToSet(&data, false);
}
+uint32 Unit::GetResistance(SpellSchoolMask mask) const
+{
+ int32 resist = -1;
+ for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
+ if (mask & (1 << i) && (resist < 0 || resist > int32(GetResistance(SpellSchools(i)))))
+ resist = int32(GetResistance(SpellSchools(i)));
+
+ // resist value will never be negative here
+ return uint32(resist);
+}
+
void CharmInfo::SetIsCommandAttack(bool val)
{
m_isCommandAttack = val;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 8f052ab41ae..5906a7f3a2b 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -44,8 +44,8 @@ enum SpellInterruptFlags
{
SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant?
SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back
- SPELL_INTERRUPT_FLAG_INTERRUPT = 0x04, // interrupt
- SPELL_INTERRUPT_FLAG_AUTOATTACK = 0x08, // enter combat
+ SPELL_INTERRUPT_FLAG_UNK3 = 0x04, // any info?
+ SPELL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt
SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10, // _complete_ interrupt on direct damage
//SPELL_INTERRUPT_UNK = 0x20 // unk, 564 of 727 spells having this spell start with "Glyph"
};
@@ -53,7 +53,8 @@ enum SpellInterruptFlags
// See SpellAuraInterruptFlags for other values definitions
enum SpellChannelInterruptFlags
{
- CHANNEL_FLAG_DELAY = 0x4000
+ CHANNEL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt
+ CHANNEL_FLAG_DELAY = 0x4000
};
enum SpellAuraInterruptFlags
@@ -1007,8 +1008,8 @@ enum CurrentSpellTypes
{
CURRENT_MELEE_SPELL = 0,
CURRENT_GENERIC_SPELL = 1,
- CURRENT_AUTOREPEAT_SPELL = 2,
- CURRENT_CHANNELED_SPELL = 3
+ CURRENT_CHANNELED_SPELL = 2,
+ CURRENT_AUTOREPEAT_SPELL = 3
};
#define CURRENT_FIRST_NON_MELEE_SPELL 1
@@ -1208,6 +1209,8 @@ enum ReactiveType
#define SUMMON_SLOT_QUEST 6
#define MAX_SUMMON_SLOT 7
+#define MAX_GAMEOBJECT_SLOT 4
+
enum PlayerTotemType
{
SUMMON_TYPE_TOTEM_FIRE = 63,
@@ -1247,6 +1250,7 @@ class Unit : public WorldObject
void AddToWorld();
void RemoveFromWorld();
+ void CleanupBeforeRemoveFromMap(bool finalCleanup);
void CleanupsBeforeDelete(bool finalCleanup = true); // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units)
DiminishingLevels GetDiminishing(DiminishingGroup group);
@@ -1306,7 +1310,7 @@ class Unit : public WorldObject
void CombatStopWithPets(bool includingCast = false);
void StopAttackFaction(uint32 faction_id);
Unit* SelectNearbyTarget(float dist = NOMINAL_MELEE_RANGE) const;
- void SendMeleeAttackStop(Unit* victim);
+ void SendMeleeAttackStop(Unit* victim = NULL);
void SendMeleeAttackStart(Unit* pVictim);
void AddUnitState(uint32 f) { m_state |= f; }
@@ -1342,6 +1346,7 @@ class Unit : public WorldObject
void SetArmor(int32 val) { SetResistance(SPELL_SCHOOL_NORMAL, val); }
uint32 GetResistance(SpellSchools school) const { return GetUInt32Value(UNIT_FIELD_RESISTANCES+school); }
+ uint32 GetResistance(SpellSchoolMask mask) const;
void SetResistance(SpellSchools school, int32 val) { SetStatInt32Value(UNIT_FIELD_RESISTANCES+school, val); }
uint32 GetHealth() const { return GetUInt32Value(UNIT_FIELD_HEALTH); }
@@ -1370,6 +1375,7 @@ class Unit : public WorldObject
void SetMaxPower(Powers power, uint32 val);
// returns the change in power
int32 ModifyPower(Powers power, int32 val);
+ int32 ModifyPowerPct(Powers power, float pct, bool apply = true);
uint32 GetAttackTime(WeaponAttackType att) const
{
@@ -1501,6 +1507,20 @@ class Unit : public WorldObject
}
virtual uint32 GetShieldBlockValue() const =0;
+ uint32 GetShieldBlockValue(uint32 soft_cap, uint32 hard_cap) const
+ {
+ uint32 value = GetShieldBlockValue();
+ if (value >= hard_cap)
+ {
+ value = (soft_cap + hard_cap) / 2;
+ }
+ else if (value > soft_cap)
+ {
+ value = soft_cap + ((value - soft_cap) / 2);
+ }
+
+ return value;
+ }
uint32 GetUnitMeleeSkill(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; }
uint32 GetDefenseSkillValue(Unit const* target = NULL) const;
uint32 GetWeaponSkillValue(WeaponAttackType attType, Unit const* target = NULL) const;
@@ -1600,9 +1620,9 @@ class Unit : public WorldObject
void SendSpellDamageImmune(Unit* target, uint32 spellId);
void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false);
- virtual bool SetPosition(float x, float y, float z, float ang, bool teleport = false);
+ virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport = false);
// returns true if unit's position really changed
- bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
+ bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
void KnockbackFrom(float x, float y, float speedXY, float speedZ);
void JumpTo(float speedXY, float speedZ, bool forward = true);
@@ -1711,8 +1731,8 @@ class Unit : public WorldObject
//Player* GetMoverSource() const;
Player* m_movedPlayer;
SharedVisionList const& GetSharedVisionList() { return m_sharedVision; }
- void AddPlayerToVision(Player* plr);
- void RemovePlayerFromVision(Player* plr);
+ void AddPlayerToVision(Player* player);
+ void RemovePlayerFromVision(Player* player);
bool HasSharedVision() const { return !m_sharedVision.empty(); }
void RemoveBindSightAuras();
void RemoveCharmAuras();
@@ -1739,7 +1759,7 @@ class Unit : public WorldObject
AuraMap const& GetOwnedAuras() const { return m_ownedAuras; }
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
- void RemoveOwnedAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
+ void RemoveOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void RemoveOwnedAura(Aura* aura, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
Aura* GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, Aura* except = NULL) const;
@@ -1749,12 +1769,12 @@ class Unit : public WorldObject
AuraApplicationMap const& GetAppliedAuras() const { return m_appliedAuras; }
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT);
- void RemoveAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
+ void RemoveAura(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT);
void RemoveAura(Aura* aur, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT);
- void RemoveAurasDueToSpell(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
- void RemoveAuraFromStack(uint32 spellId, uint64 caster = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
+ void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
+ void RemoveAuraFromStack(uint32 spellId, uint64 casterGUID = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved = 1);
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit* stealer);
void RemoveAurasDueToItemSpell(Item* castItem, uint32 spellId);
@@ -1875,7 +1895,7 @@ class Unit : public WorldObject
uint32 m_addDmgOnce;
uint64 m_SummonSlot[MAX_SUMMON_SLOT];
- uint64 m_ObjectSlot[4];
+ uint64 m_ObjectSlot[MAX_GAMEOBJECT_SLOT];
ShapeshiftForm GetShapeshiftForm() const { return ShapeshiftForm(GetByteValue(UNIT_FIELD_BYTES_2, 3)); }
void SetShapeshiftForm(ShapeshiftForm form)
@@ -1944,9 +1964,6 @@ class Unit : public WorldObject
void SetVisible(bool x);
// common function for visibility checks for player/creatures with detection code
-
- bool isValid() const { return WorldObject::isValid(); }
-
void SetPhaseMask(uint32 newPhaseMask, bool update);// overwrite WorldObject::SetPhaseMask
void UpdateObjectVisibility(bool forced = true);
@@ -2055,7 +2072,7 @@ class Unit : public WorldObject
float ApplyEffectModifiers(SpellInfo const* spellProto, uint8 effect_index, float value) const;
int32 CalculateSpellDamage(Unit const* target, SpellInfo const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const;
int32 CalcSpellDuration(SpellInfo const* spellProto);
- int32 ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive);
+ int32 ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive, uint32 effectMask);
void ModSpellCastTime(SpellInfo const* spellProto, int32 & castTime, Spell* spell=NULL);
float CalculateLevelPenalty(SpellInfo const* spellProto) const;
@@ -2284,12 +2301,8 @@ class Unit : public WorldObject
uint32 m_unitTypeMask;
- bool isAlwaysVisibleFor(WorldObject const* seer) const;
- bool canSeeAlways(WorldObject const* obj) const { return WorldObject::canSeeAlways(obj); }
-
- bool isVisibleForInState(WorldObject const* seer) const { return WorldObject::isVisibleForInState(seer); };
-
- bool isAlwaysDetectableFor(WorldObject const* seer) const;
+ bool IsAlwaysVisibleFor(WorldObject const* seer) const;
+ bool IsAlwaysDetectableFor(WorldObject const* seer) const;
private:
bool IsTriggeredAtSpellProcEvent(Unit* pVictim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent);
bool HandleDummyAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index effd43cd320..fe018ec78ce 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -172,8 +172,12 @@ void Vehicle::ApplyAllImmunities()
// Different immunities for vehicles goes below
switch (GetVehicleInfo()->m_ID)
{
- case 160:
+ // code below prevents a bug with movable cannons
+ case 160: // Strand of the Ancients
+ case 244: // Wintergrasp
+ case 510: // Isle of Conquest
_me->SetControlled(true, UNIT_STAT_ROOT);
+ // why we need to apply this? we can simple add immunities to slow mechanic in DB
_me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_DECREASE_SPEED, true);
break;
default:
@@ -445,7 +449,7 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
float pz = z + passenger->m_movementInfo.t_pos.m_positionZ;
float po = ang + passenger->m_movementInfo.t_pos.m_orientation;
- passenger->SetPosition(px, py, pz, po);
+ passenger->UpdatePosition(px, py, pz, po);
}
}
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index e81cd053003..4cc735a98d7 100755
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -1172,14 +1172,14 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
// Spawn if necessary (loaded grids only)
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
// We use spawn coords to spawn
- if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
+ if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* creature = new Creature;
//sLog->outDebug("Spawning creature %u", *itr);
if (!creature->LoadFromDB(*itr, map))
delete creature;
else
- map->Add(creature);
+ map->AddToMap(creature);
}
}
}
@@ -1201,7 +1201,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
// this base map checked as non-instanced and then only existed
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
// We use current coords to unspawn, not spawn coords since creature can have changed grid
- if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
+ if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
//sLog->outDebug("Spawning gameobject %u", *itr);
@@ -1210,7 +1210,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
else
{
if (pGameobject->isSpawnedByDefault())
- map->Add(pGameobject);
+ map->AddToMap(pGameobject);
}
}
}
@@ -1590,15 +1590,15 @@ void GameEventMgr::SaveWorldEventStateToDB(uint16 event_id)
CharacterDatabase.CommitTransaction(trans);
}
-void GameEventMgr::SendWorldStateUpdate(Player* plr, uint16 event_id)
+void GameEventMgr::SendWorldStateUpdate(Player* player, uint16 event_id)
{
GameEventConditionMap::const_iterator itr;
for (itr = mGameEvent[event_id].conditions.begin(); itr !=mGameEvent[event_id].conditions.end(); ++itr)
{
if (itr->second.done_world_state)
- plr->SendUpdateWorldState(itr->second.done_world_state, (uint32)(itr->second.done));
+ player->SendUpdateWorldState(itr->second.done_world_state, (uint32)(itr->second.done));
if (itr->second.max_world_state)
- plr->SendUpdateWorldState(itr->second.max_world_state, (uint32)(itr->second.reqNum));
+ player->SendUpdateWorldState(itr->second.max_world_state, (uint32)(itr->second.reqNum));
}
}
diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h
index 7337110fd65..a2a35a85098 100755
--- a/src/server/game/Events/GameEventMgr.h
+++ b/src/server/game/Events/GameEventMgr.h
@@ -115,11 +115,11 @@ class GameEventMgr
bool StartEvent(uint16 event_id, bool overwrite = false);
void StopEvent(uint16 event_id, bool overwrite = false);
void HandleQuestComplete(uint32 quest_id); // called on world event type quest completions
- void HandleWorldEventGossip(Player* plr, Creature* c);
+ void HandleWorldEventGossip(Player* player, Creature* c);
uint32 GetNPCFlag(Creature* cr);
uint32 GetNpcTextId(uint32 guid);
private:
- void SendWorldStateUpdate(Player* plr, uint16 event_id);
+ void SendWorldStateUpdate(Player* player, uint16 event_id);
void AddActiveEvent(uint16 event_id) { m_ActiveEvents.insert(event_id); }
void RemoveActiveEvent(uint16 event_id) { m_ActiveEvents.erase(event_id); }
void ApplyNewEvent(uint16 event_id);
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index c351efb334f..3a1b81b044d 100755
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -165,9 +165,9 @@ Unit* ObjectAccessor::FindUnit(uint64 guid)
Player* ObjectAccessor::FindPlayerByName(const char* name)
{
- ACE_GUARD_RETURN(LockType, g, *HashMapHolder<Player>::GetLock(), NULL);
- HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
- for (HashMapHolder<Player>::MapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
+ HashMapHolder<Player>::MapType const& m = GetPlayers();
+ for (HashMapHolder<Player>::MapType::const_iterator iter = m.begin(); iter != m.end(); ++iter)
if (iter->second->IsInWorld() && strcmp(name, iter->second->GetName()) == 0)
return iter->second;
@@ -176,15 +176,15 @@ Player* ObjectAccessor::FindPlayerByName(const char* name)
void ObjectAccessor::SaveAllPlayers()
{
- ACE_GUARD(LockType, g, *HashMapHolder<Player>::GetLock());
- HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
- for (HashMapHolder<Player>::MapType::iterator itr = m.begin(); itr != m.end(); ++itr)
+ TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
+ HashMapHolder<Player>::MapType const& m = GetPlayers();
+ for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
itr->second->SaveToDB();
}
Corpse* ObjectAccessor::GetCorpseForPlayerGUID(uint64 guid)
{
- ACE_GUARD_RETURN(LockType, guard, i_corpseGuard, NULL);
+ TRINITY_READ_GUARD(ACE_RW_Thread_Mutex, i_corpseLock);
Player2CorpsesMapType::iterator iter = i_player2corpse.find(guid);
if (iter == i_player2corpse.end())
@@ -199,25 +199,32 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse)
{
ASSERT(corpse && corpse->GetType() != CORPSE_BONES);
- if (corpse->FindMap())
+ //TODO: more works need to be done for corpse and other world object
+ if (Map* map = corpse->FindMap())
{
corpse->DestroyForNearbyPlayers();
- corpse->FindMap()->Remove(corpse, false);
+ if (corpse->IsInGrid())
+ map->RemoveFromMap(corpse, false);
+ else
+ {
+ corpse->RemoveFromWorld();
+ corpse->ResetMap();
+ }
}
else
corpse->RemoveFromWorld();
// Critical section
{
- ACE_GUARD(LockType, g, i_corpseGuard);
+ TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, i_corpseLock);
Player2CorpsesMapType::iterator iter = i_player2corpse.find(corpse->GetOwnerGUID());
if (iter == i_player2corpse.end()) // TODO: Fix this
return;
// build mapid*cellid -> guid_set map
- CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
- uint32 cell_id = (cell_pair.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(corpse->GetPositionX(), corpse->GetPositionY());
+ uint32 cell_id = (cellCoord.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
sObjectMgr->DeleteCorpseCellData(corpse->GetMapId(), cell_id, GUID_LOPART(corpse->GetOwnerGUID()));
@@ -231,26 +238,30 @@ void ObjectAccessor::AddCorpse(Corpse* corpse)
// Critical section
{
- ACE_GUARD(LockType, g, i_corpseGuard);
+ TRINITY_WRITE_GUARD(ACE_RW_Thread_Mutex, i_corpseLock);
ASSERT(i_player2corpse.find(corpse->GetOwnerGUID()) == i_player2corpse.end());
i_player2corpse[corpse->GetOwnerGUID()] = corpse;
// build mapid*cellid -> guid_set map
- CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
- uint32 cell_id = (cell_pair.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(corpse->GetPositionX(), corpse->GetPositionY());
+ uint32 cell_id = (cellCoord.y_coord * TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
sObjectMgr->AddCorpseCellData(corpse->GetMapId(), cell_id, GUID_LOPART(corpse->GetOwnerGUID()), corpse->GetInstanceId());
}
}
-void ObjectAccessor::AddCorpsesToGrid(GridPair const& gridpair, GridType& grid, Map* map)
+void ObjectAccessor::AddCorpsesToGrid(GridCoord const& gridpair, GridType& grid, Map* map)
{
- ACE_GUARD(LockType, g, i_corpseGuard);
+ TRINITY_READ_GUARD(ACE_RW_Thread_Mutex, i_corpseLock);
for (Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
{
- if (iter->second->GetGrid() == gridpair)
+ // We need this check otherwise a corpose may be added to a grid twice
+ if (iter->second->IsInGrid())
+ continue;
+
+ if (iter->second->GetGridCoord() == gridpair)
{
// verify, if the corpse in our instance (add only corpses which are)
if (map->Instanceable())
@@ -301,7 +312,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia
for (uint8 i = OBJECT_FIELD_TYPE + 1; i < CORPSE_END; ++i) // don't overwrite guid and object type
bones->SetUInt32Value(i, corpse->GetUInt32Value(i));
- bones->SetGrid(corpse->GetGrid());
+ bones->SetGridCoord(corpse->GetGridCoord());
// bones->m_time = m_time; // don't overwrite time
// bones->m_type = m_type; // don't overwrite type
bones->Relocate(corpse->GetPositionX(), corpse->GetPositionY(), corpse->GetPositionZ(), corpse->GetOrientation());
@@ -317,7 +328,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia
}
// add bones in grid store if grid loaded where corpse placed
- map->Add(bones);
+ map->AddToMap(bones);
}
// all references to the corpse should be removed at this point
@@ -346,17 +357,12 @@ void ObjectAccessor::Update(uint32 /*diff*/)
{
UpdateDataMapType update_players;
- // Critical section
+ while (!i_objects.empty())
{
- ACE_GUARD(LockType, g, i_updateGuard);
-
- while (!i_objects.empty())
- {
- Object* obj = *i_objects.begin();
- ASSERT(obj && obj->IsInWorld());
- i_objects.erase(i_objects.begin());
- obj->BuildUpdate(update_players);
- }
+ Object* obj = *i_objects.begin();
+ ASSERT(obj && obj->IsInWorld());
+ i_objects.erase(i_objects.begin());
+ obj->BuildUpdate(update_players);
}
WorldPacket packet; // here we allocate a std::vector with a size of 0x10000
@@ -380,7 +386,7 @@ void ObjectAccessor::UnloadAll()
/// Define the static members of HashMapHolder
template <class T> UNORDERED_MAP< uint64, T* > HashMapHolder<T>::m_objectMap;
-template <class T> ACE_Thread_Mutex HashMapHolder<T>::i_lock;
+template <class T> typename HashMapHolder<T>::LockType HashMapHolder<T>::i_lock;
/// Global definitions for the hashmap storage
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index a9be8b4971f..25fa20dce70 100755
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
@@ -48,23 +48,23 @@ class HashMapHolder
public:
typedef UNORDERED_MAP<uint64, T*> MapType;
- typedef ACE_Thread_Mutex LockType;
+ typedef ACE_RW_Thread_Mutex LockType;
static void Insert(T* o)
{
- ACE_GUARD(LockType, Guard, i_lock);
+ TRINITY_WRITE_GUARD(LockType, i_lock);
m_objectMap[o->GetGUID()] = o;
}
static void Remove(T* o)
{
- ACE_GUARD(LockType, Guard, i_lock);
+ TRINITY_WRITE_GUARD(LockType, i_lock);
m_objectMap.erase(o->GetGUID());
}
static T* Find(uint64 guid)
{
- ACE_GUARD_RETURN(LockType, Guard, i_lock, NULL);
+ TRINITY_READ_GUARD(LockType, i_lock);
typename MapType::iterator itr = m_objectMap.find(guid);
return (itr != m_objectMap.end()) ? itr->second : NULL;
}
@@ -84,8 +84,7 @@ class HashMapHolder
class ObjectAccessor
{
- friend class ACE_Singleton<ObjectAccessor, ACE_Thread_Mutex>;
- friend class WorldRunnable;
+ friend class ACE_Singleton<ObjectAccessor, ACE_Null_Mutex>;
private:
ObjectAccessor();
~ObjectAccessor();
@@ -93,15 +92,13 @@ class ObjectAccessor
ObjectAccessor& operator=(const ObjectAccessor&);
public:
- typedef UNORDERED_MAP<uint64, Corpse*> Player2CorpsesMapType;
- typedef UNORDERED_MAP<Player*, UpdateData>::value_type UpdateDataValueType;
-
// TODO: override these template functions for each holder type and add assertions
template<class T> static T* GetObjectInOrOutOfWorld(uint64 guid, T* /*typeSpecifier*/)
{
return HashMapHolder<T>::Find(guid);
}
+
static Unit* GetObjectInOrOutOfWorld(uint64 guid, Unit* /*typeSpecifier*/)
{
if (IS_PLAYER_GUID(guid))
@@ -155,15 +152,15 @@ class ObjectAccessor
if (!obj || obj->GetMapId() != mapid)
return NULL;
- CellPair p = Trinity::ComputeCellPair(x, y);
- if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ CellCoord p = Trinity::ComputeCellCoord(x, y);
+ if (!p.IsCoordValid())
{
sLog->outError("ObjectAccessor::GetObjectInWorld: invalid coordinates supplied X:%f Y:%f grid cell [%u:%u]", x, y, p.x_coord, p.y_coord);
return NULL;
}
- CellPair q = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
- if (q.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || q.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ CellCoord q = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
+ if (!q.IsCoordValid())
{
sLog->outError("ObjectAccessor::GetObjecInWorld: object (GUID: %u TypeId: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord);
return NULL;
@@ -195,83 +192,77 @@ class ObjectAccessor
static Pet* FindPet(uint64);
static Player* FindPlayer(uint64);
static Unit* FindUnit(uint64);
- Player* FindPlayerByName(const char* name);
+ static Player* FindPlayerByName(const char* name);
// when using this, you must use the hashmapholder's lock
- HashMapHolder<Player>::MapType& GetPlayers()
+ static HashMapHolder<Player>::MapType const& GetPlayers()
{
return HashMapHolder<Player>::GetContainer();
}
// when using this, you must use the hashmapholder's lock
- HashMapHolder<Creature>::MapType& GetCreatures()
- {
- return HashMapHolder<Creature>::GetContainer();
- }
-
- // when using this, you must use the hashmapholder's lock
- HashMapHolder<GameObject>::MapType& GetGameObjects()
- {
- return HashMapHolder<GameObject>::GetContainer();
- }
-
- template<class T> void AddObject(T* object)
+ //HashMapHolder<Creature>::MapType& GetCreatures()
+ //{
+ // return HashMapHolder<Creature>::GetContainer();
+ //}
+
+ //// when using this, you must use the hashmapholder's lock
+ //HashMapHolder<GameObject>::MapType& GetGameObjects()
+ //{
+ // return HashMapHolder<GameObject>::GetContainer();
+ //}
+
+ template<class T> static void AddObject(T* object)
{
HashMapHolder<T>::Insert(object);
}
- template<class T> void RemoveObject(T* object)
+ template<class T> static void RemoveObject(T* object)
{
HashMapHolder<T>::Remove(object);
}
- void RemoveObject(Player* pl)
- {
- HashMapHolder<Player>::Remove(pl);
- RemoveUpdateObject((Object*)pl);
- }
-
- void SaveAllPlayers();
+ static void SaveAllPlayers();
+ //non-static functions
void AddUpdateObject(Object* obj)
{
- ACE_GUARD(LockType, Guard, i_updateGuard);
+ TRINITY_GUARD(ACE_Thread_Mutex, i_objectLock);
i_objects.insert(obj);
}
void RemoveUpdateObject(Object* obj)
{
- ACE_GUARD(LockType, Guard, i_updateGuard);
+ TRINITY_GUARD(ACE_Thread_Mutex, i_objectLock);
i_objects.erase(obj);
}
- void Update(uint32 diff);
-
+ //Thread safe
Corpse* GetCorpseForPlayerGUID(uint64 guid);
void RemoveCorpse(Corpse* corpse);
void AddCorpse(Corpse* corpse);
- void AddCorpsesToGrid(GridPair const& gridpair, GridType& grid, Map* map);
+ void AddCorpsesToGrid(GridCoord const& gridpair, GridType& grid, Map* map);
Corpse* ConvertCorpseForPlayer(uint64 player_guid, bool insignia = false);
- void RemoveOldCorpses();
-
- typedef ACE_Thread_Mutex LockType;
- protected:
+ //Thread unsafe
+ void Update(uint32 diff);
+ void RemoveOldCorpses();
void UnloadAll();
private:
-
- Player2CorpsesMapType i_player2corpse;
-
static void _buildChangeObjectForPlayer(WorldObject*, UpdateDataMapType&);
static void _buildPacket(Player*, Object*, UpdateDataMapType&);
void _update();
+ typedef UNORDERED_MAP<uint64, Corpse*> Player2CorpsesMapType;
+ typedef UNORDERED_MAP<Player*, UpdateData>::value_type UpdateDataValueType;
+
std::set<Object*> i_objects;
+ Player2CorpsesMapType i_player2corpse;
- LockType i_updateGuard;
- LockType i_corpseGuard;
+ ACE_Thread_Mutex i_objectLock;
+ ACE_RW_Thread_Mutex i_corpseLock;
};
-#define sObjectAccessor ACE_Singleton<ObjectAccessor, ACE_Thread_Mutex>::instance()
+#define sObjectAccessor ACE_Singleton<ObjectAccessor, ACE_Null_Mutex>::instance()
#endif
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 3c3fc36da05..287ce288a88 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1568,8 +1568,8 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.creatures.insert(guid);
@@ -1584,8 +1584,8 @@ void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.creatures.erase(guid);
@@ -1627,7 +1627,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
// Spawn if necessary (loaded grids only)
// We use spawn coords to spawn
- if (!map->Instanceable() && map->IsLoaded(x, y))
+ if (!map->Instanceable() && map->IsGridLoaded(x, y))
{
GameObject* go = new GameObject;
if (!go->LoadFromDB(guid, map))
@@ -1636,7 +1636,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
delete go;
return 0;
}
- map->Add(go);
+ map->AddToMap(go);
}
sLog->outDebug(LOG_FILTER_MAPS, "AddGOData: dbguid %u entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o);
@@ -1663,7 +1663,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
if (Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId)))
{
// We use spawn coords to spawn
- if (!map->Instanceable() && map->IsLoaded(data.posX, data.posY))
+ if (!map->Instanceable() && map->IsGridLoaded(data.posX, data.posY))
{
Creature* creature = new Creature;
if (!creature->LoadFromDB(guid, map))
@@ -1672,7 +1672,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
delete creature;
return false;
}
- map->Add(creature);
+ map->AddToMap(creature);
}
}
return true;
@@ -1725,7 +1725,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
delete creature;
return 0;
}
- map->Add(creature);
+ map->AddToMap(creature);
}
}
@@ -1880,8 +1880,8 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.gameobjects.insert(guid);
@@ -1896,8 +1896,8 @@ void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.gameobjects.erase(guid);
@@ -5369,11 +5369,11 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
m->checked = fields[7].GetUInt32();
m->mailTemplateId = fields[8].GetInt16();
- Player* pl = NULL;
+ Player* player = NULL;
if (serverUp)
- pl = ObjectAccessor::FindPlayer((uint64)m->receiver);
+ player = ObjectAccessor::FindPlayer((uint64)m->receiver);
- if (pl && pl->m_mailsLoaded)
+ if (player && player->m_mailsLoaded)
{ // this code will run very improbably (the time is between 4 and 5 am, in game is online a player, who has old mail
// his in mailbox and he has already listed his mails)
delete m;
@@ -8490,13 +8490,13 @@ bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool savetodb)
return true;
}
-bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl, std::set<uint32>* skip_vendors, uint32 ORnpcflag) const
+bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* player, std::set<uint32>* skip_vendors, uint32 ORnpcflag) const
{
CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(vendor_entry);
if (!cInfo)
{
- if (pl)
- ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
+ if (player)
+ ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
sLog->outErrorDb("Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
return false;
@@ -8506,8 +8506,8 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
{
if (!skip_vendors || skip_vendors->count(vendor_entry) == 0)
{
- if (pl)
- ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
+ if (player)
+ ChatHandler(player).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
sLog->outErrorDb("Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
@@ -8519,8 +8519,8 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (!sObjectMgr->GetItemTemplate(item_id))
{
- if (pl)
- ChatHandler(pl).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
+ if (player)
+ ChatHandler(player).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
else
sLog->outErrorDb("Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id);
return false;
@@ -8528,8 +8528,8 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
{
- if (pl)
- ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
+ if (player)
+ ChatHandler(player).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
else
sLog->outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry);
return false;
@@ -8537,16 +8537,16 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (maxcount > 0 && incrtime == 0)
{
- if (pl)
- ChatHandler(pl).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
+ if (player)
+ ChatHandler(player).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
else
sLog->outErrorDb("Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
return false;
}
else if (maxcount == 0 && incrtime > 0)
{
- if (pl)
- ChatHandler(pl).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
+ if (player)
+ ChatHandler(player).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
else
sLog->outErrorDb("Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry);
return false;
@@ -8558,8 +8558,8 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (vItems->FindItemCostPair(item_id, ExtendedCost))
{
- if (pl)
- ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost);
+ if (player)
+ ChatHandler(player).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost);
else
sLog->outErrorDb("Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry);
return false;
@@ -8567,8 +8567,8 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (vItems->GetItemCount() >= MAX_VENDOR_ITEMS)
{
- if (pl)
- ChatHandler(pl).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
+ if (player)
+ ChatHandler(player).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
else
sLog->outErrorDb("Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
return false;
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index c557af1c2b2..88c593a009d 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1076,14 +1076,14 @@ class ObjectMgr
time_t GetCreatureRespawnTime(uint32 loguid, uint32 instance)
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, m_CreatureRespawnTimesMtx, 0);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_CreatureRespawnTimesMtx);
return mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t);
void RemoveCreatureRespawnTime(uint32 loguid, uint32 instance);
time_t GetGORespawnTime(uint32 loguid, uint32 instance)
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, m_GORespawnTimesMtx, 0);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_GORespawnTimesMtx);
return mGORespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t);
@@ -1140,7 +1140,7 @@ class ObjectMgr
}
void AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); // for event
bool RemoveVendorItem(uint32 entry, uint32 item, bool savetodb = true); // for event
- bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const;
+ bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const;
void LoadScriptNames();
ScriptNameMap &GetScriptNames() { return m_scriptNames; }
diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h
index a7fd879358e..13bb0afc494 100755
--- a/src/server/game/Grids/Cells/Cell.h
+++ b/src/server/game/Grids/Cells/Cell.h
@@ -29,87 +29,34 @@
class Map;
class WorldObject;
-enum District
-{
- UPPER_DISTRICT = 1,
- LOWER_DISTRICT = 1 << 1,
- LEFT_DISTRICT = 1 << 2,
- RIGHT_DISTRICT = 1 << 3,
- CENTER_DISTRICT = 1 << 4,
- UPPER_LEFT_DISTRICT = (UPPER_DISTRICT | LEFT_DISTRICT),
- UPPER_RIGHT_DISTRICT = (UPPER_DISTRICT | RIGHT_DISTRICT),
- LOWER_LEFT_DISTRICT = (LOWER_DISTRICT | LEFT_DISTRICT),
- LOWER_RIGHT_DISTRICT = (LOWER_DISTRICT | RIGHT_DISTRICT),
- ALL_DISTRICT = (UPPER_DISTRICT | LOWER_DISTRICT | LEFT_DISTRICT | RIGHT_DISTRICT | CENTER_DISTRICT)
-};
-
struct CellArea
{
- CellArea() : right_offset(0), left_offset(0), upper_offset(0), lower_offset(0) {}
- CellArea(int right, int left, int upper, int lower) : right_offset(right), left_offset(left), upper_offset(upper), lower_offset(lower) {}
- bool operator!() const { return !right_offset && !left_offset && !upper_offset && !lower_offset; }
+ CellArea() {}
+ CellArea(CellCoord low, CellCoord high) : low_bound(low), high_bound(high) {}
+
+ bool operator!() const { return low_bound == high_bound; }
- void ResizeBorders(CellPair& begin_cell, CellPair& end_cell) const
+ void ResizeBorders(CellCoord& begin_cell, CellCoord& end_cell) const
{
- begin_cell << left_offset;
- begin_cell -= lower_offset;
- end_cell >> right_offset;
- end_cell += upper_offset;
+ begin_cell = low_bound;
+ end_cell = high_bound;
}
- int right_offset;
- int left_offset;
- int upper_offset;
- int lower_offset;
+ CellCoord low_bound;
+ CellCoord high_bound;
};
struct Cell
{
Cell() { data.All = 0; }
- Cell(const Cell &cell) { data.All = cell.data.All; }
- explicit Cell(CellPair const& p);
-
- void operator|=(Cell &cell)
- {
- data.Part.reserved = 0;
- cell.data.Part.reserved = 0;
- uint32 x, y, old_x, old_y;
- Compute(x, y);
- cell.Compute(old_x, old_y);
-
- if (std::abs(int(x-old_x)) > 1 || std::abs(int(y-old_y)) > 1)
- {
- data.Part.reserved = ALL_DISTRICT;
- cell.data.Part.reserved = ALL_DISTRICT;
- return;
- }
-
- if (x < old_x)
- {
- data.Part.reserved |= LEFT_DISTRICT;
- cell.data.Part.reserved |= RIGHT_DISTRICT;
- }
- else if (old_x < x)
- {
- data.Part.reserved |= RIGHT_DISTRICT;
- cell.data.Part.reserved |= LEFT_DISTRICT;
- }
- if (y < old_y)
- {
- data.Part.reserved |= UPPER_DISTRICT;
- cell.data.Part.reserved |= LOWER_DISTRICT;
- }
- else if (old_y < y)
- {
- data.Part.reserved |= LOWER_DISTRICT;
- cell.data.Part.reserved |= UPPER_DISTRICT;
- }
- }
+ Cell(Cell const& cell) { data.All = cell.data.All; }
+ explicit Cell(CellCoord const& p);
+ explicit Cell(float x, float y);
void Compute(uint32 &x, uint32 &y) const
{
- x = data.Part.grid_x*MAX_NUMBER_OF_CELLS + data.Part.cell_x;
- y = data.Part.grid_y*MAX_NUMBER_OF_CELLS + data.Part.cell_y;
+ x = data.Part.grid_x * MAX_NUMBER_OF_CELLS + data.Part.cell_x;
+ y = data.Part.grid_y * MAX_NUMBER_OF_CELLS + data.Part.cell_y;
}
bool DiffCell(const Cell &cell) const
@@ -131,21 +78,21 @@ struct Cell
bool NoCreate() const { return data.Part.nocreate; }
void SetNoCreate() { data.Part.nocreate = 1; }
- CellPair cellPair() const
+ CellCoord GetCellCoord() const
{
- return CellPair(
- data.Part.grid_x*MAX_NUMBER_OF_CELLS+data.Part.cell_x,
- data.Part.grid_y*MAX_NUMBER_OF_CELLS+data.Part.cell_y);
+ return CellCoord(
+ data.Part.grid_x * MAX_NUMBER_OF_CELLS+data.Part.cell_x,
+ data.Part.grid_y * MAX_NUMBER_OF_CELLS+data.Part.cell_y);
}
- Cell& operator=(const Cell &cell)
+ Cell& operator=(Cell const& cell)
{
this->data.All = cell.data.All;
return *this;
}
- bool operator == (const Cell &cell) const { return (data.All == cell.data.All); }
- bool operator != (const Cell &cell) const { return !operator == (cell); }
+ bool operator == (Cell const& cell) const { return (data.All == cell.data.All); }
+ bool operator != (Cell const& cell) const { return !operator == (cell); }
union
{
struct
@@ -160,15 +107,13 @@ struct Cell
uint32 All;
} data;
- template<class T, class CONTAINER> void Visit(const CellPair&, TypeContainerVisitor<T, CONTAINER> &visitor, Map &) const;
- template<class T, class CONTAINER> void Visit(const CellPair&, TypeContainerVisitor<T, CONTAINER> &visitor, Map &, const WorldObject&, float) const;
- template<class T, class CONTAINER> void Visit(const CellPair&, TypeContainerVisitor<T, CONTAINER> &visitor, Map &, float, float, float) const;
+ template<class T, class CONTAINER> void Visit(CellCoord const&, TypeContainerVisitor<T, CONTAINER>& visitor, Map &, WorldObject const&, float) const;
+ template<class T, class CONTAINER> void Visit(CellCoord const&, TypeContainerVisitor<T, CONTAINER>& visitor, Map &, float, float, float) const;
- static CellArea CalculateCellArea(const WorldObject &obj, float radius);
static CellArea CalculateCellArea(float x, float y, float radius);
private:
- template<class T, class CONTAINER> void VisitCircle(TypeContainerVisitor<T, CONTAINER> &, Map &, const CellPair&, const CellPair&) const;
+ template<class T, class CONTAINER> void VisitCircle(TypeContainerVisitor<T, CONTAINER> &, Map &, CellCoord const&, CellCoord const&) const;
};
#endif
diff --git a/src/server/game/Grids/Cells/CellImpl.h b/src/server/game/Grids/Cells/CellImpl.h
index d36892ffcb0..af697b9f21d 100755..100644
--- a/src/server/game/Grids/Cells/CellImpl.h
+++ b/src/server/game/Grids/Cells/CellImpl.h
@@ -25,7 +25,7 @@
#include "Map.h"
#include "Object.h"
-inline Cell::Cell(CellPair const& p)
+inline Cell::Cell(CellCoord const& p)
{
data.Part.grid_x = p.x_coord / MAX_NUMBER_OF_CELLS;
data.Part.grid_y = p.y_coord / MAX_NUMBER_OF_CELLS;
@@ -35,143 +35,35 @@ inline Cell::Cell(CellPair const& p)
data.Part.reserved = 0;
}
-template<class T, class CONTAINER>
-inline void
-Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m) const
-{
- if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
- return;
-
- uint16 district = (District)this->data.Part.reserved;
- if (district == CENTER_DISTRICT)
- {
- m.Visit(*this, visitor);
- return;
- }
-
- // set up the cell range based on the district
- // the overloaded operators handle range checking
- CellPair begin_cell = standing_cell;
- CellPair end_cell = standing_cell;
-
- switch (district)
- {
- case ALL_DISTRICT:
- {
- begin_cell << 1; begin_cell -= 1; // upper left
- end_cell >> 1; end_cell += 1; // lower right
- break;
- }
- case UPPER_LEFT_DISTRICT:
- {
- begin_cell << 1; begin_cell -= 1; // upper left
- break;
- }
- case UPPER_RIGHT_DISTRICT:
- {
- begin_cell -= 1; // up
- end_cell >> 1; // right
- break;
- }
- case LOWER_LEFT_DISTRICT:
- {
- begin_cell << 1; // left
- end_cell += 1; // down
- break;
- }
- case LOWER_RIGHT_DISTRICT:
- {
- end_cell >> 1; end_cell += 1; // lower right
- break;
- }
- case LEFT_DISTRICT:
- {
- begin_cell -= 1; // up
- end_cell >> 1; end_cell += 1; // lower right
- break;
- }
- case RIGHT_DISTRICT:
- {
- begin_cell << 1; begin_cell -= 1; // upper left
- end_cell += 1; // down
- break;
- }
- case UPPER_DISTRICT:
- {
- begin_cell << 1; begin_cell -= 1; // upper left
- end_cell >> 1; // right
- break;
- }
- case LOWER_DISTRICT:
- {
- begin_cell << 1; // left
- end_cell >> 1; end_cell += 1; // lower right
- break;
- }
- default:
- {
- ASSERT(false);
- break;
- }
- }
-
- // loop the cell range
- for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
- {
- for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
- {
- CellPair cell_pair(x, y);
- Cell r_zone(cell_pair);
- r_zone.data.Part.nocreate = this->data.Part.nocreate;
- m.Visit(r_zone, visitor);
- }
- }
-}
-
-inline int CellHelper(const float radius)
-{
- if (radius < 1.0f)
- return 0;
-
- return (int)ceilf(radius/SIZE_OF_GRID_CELL);
-}
-
-inline CellArea Cell::CalculateCellArea(const WorldObject &obj, float radius)
+inline Cell::Cell(float x, float y)
{
- return Cell::CalculateCellArea(obj.GetPositionX(), obj.GetPositionY(), radius);
+ CellCoord p = Trinity::ComputeCellCoord(x, y);
+ data.Part.grid_x = p.x_coord / MAX_NUMBER_OF_CELLS;
+ data.Part.grid_y = p.y_coord / MAX_NUMBER_OF_CELLS;
+ data.Part.cell_x = p.x_coord % MAX_NUMBER_OF_CELLS;
+ data.Part.cell_y = p.y_coord % MAX_NUMBER_OF_CELLS;
+ data.Part.nocreate = 0;
+ data.Part.reserved = 0;
}
inline CellArea Cell::CalculateCellArea(float x, float y, float radius)
{
if (radius <= 0.0f)
- return CellArea();
-
- //lets calculate object coord offsets from cell borders.
- //TODO: add more correct/generic method for this task
- const float x_offset = (x - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
- const float y_offset = (y - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
-
- const float x_val = floor(x_offset + CENTER_GRID_CELL_ID + 0.5f);
- const float y_val = floor(y_offset + CENTER_GRID_CELL_ID + 0.5f);
-
- const float x_off = (x_offset - x_val + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
- const float y_off = (y_offset - y_val + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
+ {
+ CellCoord center = Trinity::ComputeCellCoord(x, y).normalize();
+ return CellArea(center, center);
+ }
- const float tmp_diff = radius - CENTER_GRID_CELL_OFFSET;
- //lets calculate upper/lower/right/left corners for cell search
- int right = CellHelper(tmp_diff + x_off);
- int left = CellHelper(tmp_diff - x_off);
- int upper = CellHelper(tmp_diff + y_off);
- int lower = CellHelper(tmp_diff - y_off);
+ CellCoord centerX = Trinity::ComputeCellCoord(x - radius, y - radius).normalize();
+ CellCoord centerY = Trinity::ComputeCellCoord(x + radius, y + radius).normalize();
- return CellArea(right, left, upper, lower);
+ return CellArea(centerX, centerY);
}
template<class T, class CONTAINER>
-inline void
-Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, float radius, float x_off, float y_off) const
+inline void Cell::Visit(CellCoord const& standing_cell, TypeContainerVisitor<T, CONTAINER>& visitor, Map& map, float radius, float x_off, float y_off) const
{
- if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ if (!standing_cell.IsCoordValid())
return;
//no jokes here... Actually placing ASSERT() here was good idea, but
@@ -179,7 +71,7 @@ Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER> &v
//maybe it is better to just return when radius <= 0.0f?
if (radius <= 0.0f)
{
- m.Visit(*this, visitor);
+ map.Visit(*this, visitor);
return;
}
//lets limit the upper value for search radius
@@ -191,57 +83,51 @@ Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER> &v
//if radius fits inside standing cell
if (!area)
{
- m.Visit(*this, visitor);
+ map.Visit(*this, visitor);
return;
}
- CellPair begin_cell = standing_cell;
- CellPair end_cell = standing_cell;
-
- area.ResizeBorders(begin_cell, end_cell);
//visit all cells, found in CalculateCellArea()
//if radius is known to reach cell area more than 4x4 then we should call optimized VisitCircle
//currently this technique works with MAX_NUMBER_OF_CELLS 16 and higher, with lower values
//there are nothing to optimize because SIZE_OF_GRID_CELL is too big...
- if (((end_cell.x_coord - begin_cell.x_coord) > 4) && ((end_cell.y_coord - begin_cell.y_coord) > 4))
+ if (((area.high_bound.x_coord - area.low_bound.x_coord) > 4) && ((area.high_bound.y_coord - area.low_bound.y_coord) > 4))
{
- VisitCircle(visitor, m, begin_cell, end_cell);
+ VisitCircle(visitor, map, area.low_bound, area.high_bound);
return;
}
//ALWAYS visit standing cell first!!! Since we deal with small radiuses
//it is very essential to call visitor for standing cell firstly...
- m.Visit(*this, visitor);
+ map.Visit(*this, visitor);
// loop the cell range
- for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
+ for (uint32 x = area.low_bound.x_coord; x <= area.high_bound.x_coord; ++x)
{
- for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
+ for (uint32 y = area.low_bound.y_coord; y <= area.high_bound.y_coord; ++y)
{
- CellPair cell_pair(x, y);
+ CellCoord cellCoord(x, y);
//lets skip standing cell since we already visited it
- if (cell_pair != standing_cell)
+ if (cellCoord != standing_cell)
{
- Cell r_zone(cell_pair);
+ Cell r_zone(cellCoord);
r_zone.data.Part.nocreate = this->data.Part.nocreate;
- m.Visit(r_zone, visitor);
+ map.Visit(r_zone, visitor);
}
}
}
}
template<class T, class CONTAINER>
-inline void
-Cell::Visit(const CellPair& l, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const WorldObject &obj, float radius) const
+inline void Cell::Visit(CellCoord const& standing_cell, TypeContainerVisitor<T, CONTAINER>& visitor, Map& map, WorldObject const& obj, float radius) const
{
//we should increase search radius by object's radius, otherwise
//we could have problems with huge creatures, which won't attack nearest players etc
- Visit(l, visitor, m, radius + obj.GetObjectSize(), obj.GetPositionX(), obj.GetPositionY());
+ Visit(standing_cell, visitor, map, radius + obj.GetObjectSize(), obj.GetPositionX(), obj.GetPositionY());
}
template<class T, class CONTAINER>
-inline void
-Cell::VisitCircle(TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const CellPair& begin_cell, const CellPair& end_cell) const
+inline void Cell::VisitCircle(TypeContainerVisitor<T, CONTAINER>& visitor, Map& map, CellCoord const& begin_cell, CellCoord const& end_cell) const
{
//here is an algorithm for 'filling' circum-squared octagon
uint32 x_shift = (uint32)ceilf((end_cell.x_coord - begin_cell.x_coord) * 0.3f - 0.5f);
@@ -254,10 +140,10 @@ Cell::VisitCircle(TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const Cel
{
for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
{
- CellPair cell_pair(x, y);
- Cell r_zone(cell_pair);
+ CellCoord cellCoord(x, y);
+ Cell r_zone(cellCoord);
r_zone.data.Part.nocreate = this->data.Part.nocreate;
- m.Visit(r_zone, visitor);
+ map.Visit(r_zone, visitor);
}
}
@@ -278,16 +164,16 @@ Cell::VisitCircle(TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const Cel
{
//we visit cells symmetrically from both sides, heading from center to sides and from up to bottom
//e.g. filling 2 trapezoids after filling central cell strip...
- CellPair cell_pair_left(x_start - step, y);
- Cell r_zone_left(cell_pair_left);
+ CellCoord cellCoord_left(x_start - step, y);
+ Cell r_zone_left(cellCoord_left);
r_zone_left.data.Part.nocreate = this->data.Part.nocreate;
- m.Visit(r_zone_left, visitor);
+ map.Visit(r_zone_left, visitor);
//right trapezoid cell visit
- CellPair cell_pair_right(x_end + step, y);
- Cell r_zone_right(cell_pair_right);
+ CellCoord cellCoord_right(x_end + step, y);
+ Cell r_zone_right(cellCoord_right);
r_zone_right.data.Part.nocreate = this->data.Part.nocreate;
- m.Visit(r_zone_right, visitor);
+ map.Visit(r_zone_right, visitor);
}
}
}
diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h
index a6e1316718e..448c4cb35fd 100755
--- a/src/server/game/Grids/Grid.h
+++ b/src/server/game/Grids/Grid.h
@@ -58,40 +58,42 @@ class Grid
*/
template<class SPECIFIC_OBJECT> void AddWorldObject(SPECIFIC_OBJECT *obj)
{
- if (!i_objects.template insert<SPECIFIC_OBJECT>(obj))
- ASSERT(false);
+ i_objects.template insert<SPECIFIC_OBJECT>(obj);
+ ASSERT(obj->IsInGrid());
}
/** an object of interested exits the grid
*/
- template<class SPECIFIC_OBJECT> void RemoveWorldObject(SPECIFIC_OBJECT *obj)
- {
- if (!i_objects.template remove<SPECIFIC_OBJECT>(obj))
- ASSERT(false);
- }
+ //Actually an unlink is enough, no need to go through the container
+ //template<class SPECIFIC_OBJECT> void RemoveWorldObject(SPECIFIC_OBJECT *obj)
+ //{
+ // ASSERT(obj->GetGridRef().isValid());
+ // i_objects.template remove<SPECIFIC_OBJECT>(obj);
+ // ASSERT(!obj->GetGridRef().isValid());
+ //}
/** Refreshes/update the grid. This required for remote grids.
*/
- void RefreshGrid(void) { /* TBI */}
+ //void RefreshGrid(void) { /* TBI */}
/** Locks a grid. Any object enters must wait until the grid is unlock.
*/
- void LockGrid(void) { /* TBI */ }
+ //void LockGrid(void) { /* TBI */ }
/** Unlocks the grid.
*/
- void UnlockGrid(void) { /* TBI */ }
+ //void UnlockGrid(void) { /* TBI */ }
- /** Grid visitor for grid objects
- */
- template<class T> void Visit(TypeContainerVisitor<T, TypeMapContainer<GRID_OBJECT_TYPES> > &visitor)
+ // Visit grid objects
+ template<class T>
+ void Visit(TypeContainerVisitor<T, TypeMapContainer<GRID_OBJECT_TYPES> > &visitor)
{
visitor.Visit(i_container);
}
- /** Grid visitor for world objects
- */
- template<class T> void Visit(TypeContainerVisitor<T, TypeMapContainer<WORLD_OBJECT_TYPES> > &visitor)
+ // Visit world objects
+ template<class T>
+ void Visit(TypeContainerVisitor<T, TypeMapContainer<WORLD_OBJECT_TYPES> > &visitor)
{
visitor.Visit(i_objects);
}
@@ -104,17 +106,18 @@ class Grid
*/
template<class SPECIFIC_OBJECT> void AddGridObject(SPECIFIC_OBJECT *obj)
{
- if (!i_container.template insert<SPECIFIC_OBJECT>(obj))
- ASSERT(false);
+ i_container.template insert<SPECIFIC_OBJECT>(obj);
+ ASSERT(obj->IsInGrid());
}
/** Removes a containter type object from the grid
*/
- template<class SPECIFIC_OBJECT> void RemoveGridObject(SPECIFIC_OBJECT *obj)
- {
- if (!i_container.template remove<SPECIFIC_OBJECT>(obj))
- ASSERT(false);
- }
+ //template<class SPECIFIC_OBJECT> void RemoveGridObject(SPECIFIC_OBJECT *obj)
+ //{
+ // ASSERT(obj->GetGridRef().isValid());
+ // i_container.template remove<SPECIFIC_OBJECT>(obj);
+ // ASSERT(!obj->GetGridRef().isValid());
+ //}
/*bool NoWorldObjectInGrid() const
{
diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h
index a284e342ca9..44e2588ef81 100755..100644
--- a/src/server/game/Grids/GridDefines.h
+++ b/src/server/game/Grids/GridDefines.h
@@ -71,21 +71,27 @@ typedef NGrid<MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTyp
typedef TypeMapContainer<AllGridObjectTypes> GridTypeMapContainer;
typedef TypeMapContainer<AllWorldObjectTypes> WorldTypeMapContainer;
-template<const unsigned int LIMIT>
+template<uint32 LIMIT>
struct CoordPair
{
- CoordPair(uint32 x=0, uint32 y=0) : x_coord(x), y_coord(y) {}
- CoordPair(const CoordPair<LIMIT> &obj) : x_coord(obj.x_coord), y_coord(obj.y_coord) {}
- bool operator == (const CoordPair<LIMIT> &obj) const { return (obj.x_coord == x_coord && obj.y_coord == y_coord); }
- bool operator != (const CoordPair<LIMIT> &obj) const { return !operator == (obj); }
- CoordPair<LIMIT>& operator=(const CoordPair<LIMIT> &obj)
+ CoordPair(uint32 x=0, uint32 y=0)
+ : x_coord(x)
+ , y_coord(y)
+ {}
+
+ CoordPair(const CoordPair<LIMIT> &obj)
+ : x_coord(obj.x_coord)
+ , y_coord(obj.y_coord)
+ {}
+
+ CoordPair<LIMIT> & operator=(const CoordPair<LIMIT> &obj)
{
x_coord = obj.x_coord;
y_coord = obj.y_coord;
return *this;
}
- void operator<<(const uint32 val)
+ void dec_x(uint32 val)
{
if (x_coord > val)
x_coord -= val;
@@ -93,15 +99,15 @@ struct CoordPair
x_coord = 0;
}
- void operator>>(const uint32 val)
+ void inc_x(uint32 val)
{
- if (x_coord+val < LIMIT)
+ if (x_coord + val < LIMIT)
x_coord += val;
else
x_coord = LIMIT - 1;
}
- void operator-=(const uint32 val)
+ void dec_y(uint32 val)
{
if (y_coord > val)
y_coord -= val;
@@ -109,20 +115,44 @@ struct CoordPair
y_coord = 0;
}
- void operator+=(const uint32 val)
+ void inc_y(uint32 val)
{
- if (y_coord+val < LIMIT)
+ if (y_coord + val < LIMIT)
y_coord += val;
else
y_coord = LIMIT - 1;
}
+ bool IsCoordValid() const
+ {
+ return x_coord < LIMIT && y_coord < LIMIT;
+ }
+
+ CoordPair& normalize()
+ {
+ x_coord = std::min(x_coord, LIMIT - 1);
+ y_coord = std::min(y_coord, LIMIT - 1);
+ return *this;
+ }
+
uint32 x_coord;
uint32 y_coord;
};
-typedef CoordPair<MAX_NUMBER_OF_GRIDS> GridPair;
-typedef CoordPair<TOTAL_NUMBER_OF_CELLS_PER_MAP> CellPair;
+template<uint32 LIMIT>
+bool operator==(const CoordPair<LIMIT> &p1, const CoordPair<LIMIT> &p2)
+{
+ return (p1.x_coord == p2.x_coord && p1.y_coord == p2.y_coord);
+}
+
+template<uint32 LIMIT>
+bool operator!=(const CoordPair<LIMIT> &p1, const CoordPair<LIMIT> &p2)
+{
+ return !(p1 == p2);
+}
+
+typedef CoordPair<MAX_NUMBER_OF_GRIDS> GridCoord;
+typedef CoordPair<TOTAL_NUMBER_OF_CELLS_PER_MAP> CellCoord;
namespace Trinity
{
@@ -133,44 +163,44 @@ namespace Trinity
double x_offset = (double(x) - center_offset)/size;
double y_offset = (double(y) - center_offset)/size;
- int x_val = int(x_offset+CENTER_VAL + 0.5);
- int y_val = int(y_offset+CENTER_VAL + 0.5);
+ int x_val = int(x_offset+CENTER_VAL + 0.5f);
+ int y_val = int(y_offset+CENTER_VAL + 0.5f);
return RET_TYPE(x_val, y_val);
}
- inline GridPair ComputeGridPair(float x, float y)
+ inline GridCoord ComputeGridCoord(float x, float y)
{
- return Compute<GridPair, CENTER_GRID_ID>(x, y, CENTER_GRID_OFFSET, SIZE_OF_GRIDS);
+ return Compute<GridCoord, CENTER_GRID_ID>(x, y, CENTER_GRID_OFFSET, SIZE_OF_GRIDS);
}
- inline CellPair ComputeCellPair(float x, float y)
+ inline CellCoord ComputeCellCoord(float x, float y)
{
- return Compute<CellPair, CENTER_GRID_CELL_ID>(x, y, CENTER_GRID_CELL_OFFSET, SIZE_OF_GRID_CELL);
+ return Compute<CellCoord, CENTER_GRID_CELL_ID>(x, y, CENTER_GRID_CELL_OFFSET, SIZE_OF_GRID_CELL);
}
- inline CellPair ComputeCellPair(float x, float y, float &x_off, float &y_off)
+ inline CellCoord ComputeCellCoord(float x, float y, float &x_off, float &y_off)
{
double x_offset = (double(x) - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
double y_offset = (double(y) - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
- int x_val = int(x_offset + CENTER_GRID_CELL_ID + 0.5);
- int y_val = int(y_offset + CENTER_GRID_CELL_ID + 0.5);
+ int x_val = int(x_offset + CENTER_GRID_CELL_ID + 0.5f);
+ int y_val = int(y_offset + CENTER_GRID_CELL_ID + 0.5f);
x_off = (float(x_offset) - x_val + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
y_off = (float(y_offset) - y_val + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
- return CellPair(x_val, y_val);
+ return CellCoord(x_val, y_val);
}
inline void NormalizeMapCoord(float &c)
{
- if (c > MAP_HALFSIZE - 0.5)
- c = MAP_HALFSIZE - 0.5;
- else if (c < -(MAP_HALFSIZE - 0.5))
- c = -(MAP_HALFSIZE - 0.5);
+ if (c > MAP_HALFSIZE - 0.5f)
+ c = MAP_HALFSIZE - 0.5f;
+ else if (c < -(MAP_HALFSIZE - 0.5f))
+ c = -(MAP_HALFSIZE - 0.5f);
}
inline bool IsValidMapCoord(float c)
{
- return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5);
+ return finite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
}
inline bool IsValidMapCoord(float x, float y)
diff --git a/src/server/game/Grids/GridLoader.h b/src/server/game/Grids/GridLoader.h
index 0e762d3a07e..43564c920e2 100755
--- a/src/server/game/Grids/GridLoader.h
+++ b/src/server/game/Grids/GridLoader.h
@@ -30,6 +30,8 @@
GridLoader manages the grid (both local and remote).
*/
+//I cannot see why this cannot be replaced by a Grid::Visit
+/*
#include "Define.h"
#include "Grid.h"
#include "TypeContainerVisitor.h"
@@ -44,8 +46,7 @@ class GridLoader
{
public:
- /** Loads the grid
- */
+ // Loads the grid
template<class LOADER>
void Load(Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> &grid, LOADER &loader)
{
@@ -54,8 +55,7 @@ class GridLoader
grid.UnlockGrid();
}
- /** Stop the grid
- */
+ // Stop the grid
template<class STOPER>
void Stop(Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> &grid, STOPER &stoper)
{
@@ -63,8 +63,8 @@ class GridLoader
stoper.Stop(grid);
grid.UnlockGrid();
}
- /** Unloads the grid
- */
+
+ // Unloads the grid
template<class UNLOADER>
void Unload(Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> &grid, UNLOADER &unloader)
{
@@ -73,5 +73,6 @@ class GridLoader
grid.UnlockGrid();
}
};
+*/
#endif
diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp
index 91bb926fd02..5f88516c9ac 100755
--- a/src/server/game/Grids/GridStates.cpp
+++ b/src/server/game/Grids/GridStates.cpp
@@ -21,24 +21,23 @@
#include "Grid.h"
#include "Log.h"
-void
-InvalidState::Update(Map &, NGridType &, GridInfo &, const uint32 /*x*/, const uint32 /*y*/, const uint32) const
+void InvalidState::Update(Map &, NGridType &, GridInfo &, const uint32) const
{
}
-void
-ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 x, const uint32 y, const uint32 t_diff) const
+void ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 t_diff) const
{
// Only check grid activity every (grid_expiry/10) ms, because it's really useless to do it every cycle
info.UpdateTimeTracker(t_diff);
if (info.getTimeTracker().Passed())
{
- if (grid.ActiveObjectsInGrid() == 0 && !m.ActiveObjectsNearGrid(x, y))
+ if (grid.ActiveObjectsInGrid() == 0 && !m.ActiveObjectsNearGrid(grid))
{
- ObjectGridStoper stoper(grid);
- stoper.StopN();
+ ObjectGridStoper worker;
+ TypeContainerVisitor<ObjectGridStoper, GridTypeMapContainer> visitor(worker);
+ grid.VisitAllGrids(visitor);
grid.SetGridState(GRID_STATE_IDLE);
- sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to IDLE state", x, y, m.GetId());
+ sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to IDLE state", grid.getX(), grid.getY(), m.GetId());
}
else
{
@@ -47,25 +46,23 @@ ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 x, co
}
}
-void
-IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 x, const uint32 y, const uint32) const
+void IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32) const
{
m.ResetGridExpiry(grid);
grid.SetGridState(GRID_STATE_REMOVAL);
- sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to REMOVAL state", x, y, m.GetId());
+ sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to REMOVAL state", grid.getX(), grid.getY(), m.GetId());
}
-void
-RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 x, const uint32 y, const uint32 t_diff) const
+void RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 t_diff) const
{
if (!info.getUnloadLock())
{
info.UpdateTimeTracker(t_diff);
if (info.getTimeTracker().Passed())
{
- if (!m.UnloadGrid(x, y, false))
+ if (!m.UnloadGrid(grid, false))
{
- sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] for map %u differed unloading due to players or active objects nearby", x, y, m.GetId());
+ sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u, %u] for map %u differed unloading due to players or active objects nearby", grid.getX(), grid.getY(), m.GetId());
m.ResetGridExpiry(grid);
}
}
diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h
index 81bf749b63f..78f70356608 100755
--- a/src/server/game/Grids/GridStates.h
+++ b/src/server/game/Grids/GridStates.h
@@ -40,35 +40,31 @@ class GridState
void setMagic() { i_Magic = MAGIC_TESTVAL; }
unsigned int i_Magic;
#endif
- virtual void Update(Map &, NGridType&, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const = 0;
+ virtual void Update(Map &, NGridType&, GridInfo &, const uint32 t_diff) const = 0;
};
class InvalidState : public GridState
{
public:
-
- void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, const uint32 t_diff) const;
};
class ActiveState : public GridState
{
public:
-
- void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, const uint32 t_diff) const;
};
class IdleState : public GridState
{
public:
-
- void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, const uint32 t_diff) const;
};
class RemovalState : public GridState
{
public:
-
- void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
+ void Update(Map &, NGridType &, GridInfo &, const uint32 t_diff) const;
};
#endif
diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h
index cd2345e439d..97a47f7d272 100755
--- a/src/server/game/Grids/NGrid.h
+++ b/src/server/game/Grids/NGrid.h
@@ -69,7 +69,7 @@ typedef enum
template
<
-unsigned int N,
+uint32 N,
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES
@@ -77,7 +77,6 @@ class GRID_OBJECT_TYPES
class NGrid
{
public:
-
typedef Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> GridType;
NGrid(uint32 id, int32 x, int32 y, time_t expiry, bool unload = true)
: i_gridId(id), i_x(x), i_y(y), i_cellstate(GRID_STATE_INVALID), i_GridObjectDataLoaded(false)
@@ -85,17 +84,15 @@ class NGrid
i_GridInfo = GridInfo(expiry, unload);
}
- const GridType& operator()(unsigned short x, unsigned short y) const
+ GridType& GetGridType(const uint32 x, const uint32 y)
{
- ASSERT(x < N);
- ASSERT(y < N);
+ ASSERT(x < N && y < N);
return i_cells[x][y];
}
- GridType& operator()(unsigned short x, unsigned short y)
+ GridType const& GetGridType(const uint32 x, const uint32 y) const
{
- ASSERT(x < N);
- ASSERT(y < N);
+ ASSERT(x < N && y < N);
return i_cells[x][y];
}
@@ -123,56 +120,54 @@ class NGrid
void ResetTimeTracker(time_t interval) { i_GridInfo.ResetTimeTracker(interval); }
void UpdateTimeTracker(time_t diff) { i_GridInfo.UpdateTimeTracker(diff); }
+ /*
template<class SPECIFIC_OBJECT> void AddWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- getGridType(x, y).AddWorldObject(obj);
+ GetGridType(x, y).AddWorldObject(obj);
}
template<class SPECIFIC_OBJECT> void RemoveWorldObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- getGridType(x, y).RemoveWorldObject(obj);
+ GetGridType(x, y).RemoveWorldObject(obj);
}
- template<class T, class TT> void Visit(TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
+ template<class SPECIFIC_OBJECT> void AddGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- for (unsigned int x=0; x < N; ++x)
- for (unsigned int y=0; y < N; ++y)
- getGridType(x, y).Visit(visitor);
+ GetGridType(x, y).AddGridObject(obj);
}
- template<class T, class TT> void Visit(const uint32 x, const uint32 y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
+ template<class SPECIFIC_OBJECT> void RemoveGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
{
- getGridType(x, y).Visit(visitor);
+ GetGridType(x, y).RemoveGridObject(obj);
}
+ */
- unsigned int ActiveObjectsInGrid(void) const
+ // Visit all Grids (cells) in NGrid (grid)
+ template<class T, class TT>
+ void VisitAllGrids(TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
{
- unsigned int count=0;
- for (unsigned int x=0; x < N; ++x)
- for (unsigned int y=0; y < N; ++y)
- count += i_cells[x][y].ActiveObjectsInGrid();
- return count;
+ for (uint32 x = 0; x < N; ++x)
+ for (uint32 y = 0; y < N; ++y)
+ GetGridType(x, y).Visit(visitor);
}
- template<class SPECIFIC_OBJECT> bool AddGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
+ // Visit a single Grid (cell) in NGrid (grid)
+ template<class T, class TT>
+ void VisitGrid(const uint32 x, const uint32 y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
{
- return getGridType(x, y).AddGridObject(obj);
+ GetGridType(x, y).Visit(visitor);
}
- template<class SPECIFIC_OBJECT> bool RemoveGridObject(const uint32 x, const uint32 y, SPECIFIC_OBJECT *obj)
+ unsigned int ActiveObjectsInGrid(void) const
{
- return getGridType(x, y).RemoveGridObject(obj);
+ unsigned int count=0;
+ for (unsigned int x=0; x < N; ++x)
+ for (unsigned int y=0; y < N; ++y)
+ count += i_cells[x][y].ActiveObjectsInGrid();
+ return count;
}
private:
-
- GridType& getGridType(const uint32 x, const uint32 y)
- {
- ASSERT(x < N);
- ASSERT(y < N);
- return i_cells[x][y];
- }
-
uint32 i_gridId;
GridInfo i_GridInfo;
GridReference<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> > i_Reference;
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index dc938859e92..ca61a82e840 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -30,8 +30,7 @@
using namespace Trinity;
-void
-VisibleNotifier::SendToSelf()
+void VisibleNotifier::SendToSelf()
{
// at this moment i_clientGUIDs have guids that not iterate at grid level checks
// but exist one case when this possible and object not out of range: transports
@@ -56,9 +55,9 @@ VisibleNotifier::SendToSelf()
if (IS_PLAYER_GUID(*it))
{
- Player* plr = ObjectAccessor::FindPlayer(*it);
- if (plr && plr->IsInWorld() && !plr->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
- plr->UpdateVisibilityOf(&i_player);
+ Player* player = ObjectAccessor::FindPlayer(*it);
+ if (player && player->IsInWorld() && !player->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
+ player->UpdateVisibilityOf(&i_player);
}
}
@@ -73,10 +72,9 @@ VisibleNotifier::SendToSelf()
i_player.SendInitialVisiblePackets(*it);
}
-void
-VisibleChangesNotifier::Visit(PlayerMapType &m)
+void VisibleChangesNotifier::Visit(PlayerMapType &m)
{
- for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if (iter->getSource() == &i_object)
continue;
@@ -91,8 +89,7 @@ VisibleChangesNotifier::Visit(PlayerMapType &m)
}
}
-void
-VisibleChangesNotifier::Visit(CreatureMapType &m)
+void VisibleChangesNotifier::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (!iter->getSource()->GetSharedVisionList().empty())
@@ -102,8 +99,7 @@ VisibleChangesNotifier::Visit(CreatureMapType &m)
(*i)->UpdateVisibilityOf(&i_object);
}
-void
-VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
+void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
@@ -126,16 +122,16 @@ void PlayerRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
- Player* plr = iter->getSource();
+ Player* player = iter->getSource();
- vis_guids.erase(plr->GetGUID());
+ vis_guids.erase(player->GetGUID());
- i_player.UpdateVisibilityOf(plr, i_data, i_visibleNow);
+ i_player.UpdateVisibilityOf(player, i_data, i_visibleNow);
- if (plr->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
+ if (player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
continue;
- plr->UpdateVisibilityOf(&i_player);
+ player->UpdateVisibilityOf(&i_player);
}
}
@@ -160,12 +156,12 @@ void CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
- Player* pl = iter->getSource();
+ Player* player = iter->getSource();
- if (!pl->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
- pl->UpdateVisibilityOf(&i_creature);
+ if (!player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
+ player->UpdateVisibilityOf(&i_creature);
- CreatureUnitRelocationWorker(&i_creature, pl);
+ CreatureUnitRelocationWorker(&i_creature, player);
}
}
@@ -215,7 +211,7 @@ void DelayedUnitRelocation::Visit(PlayerMapType &m)
if (player != viewPoint && !viewPoint->IsPositionValid())
continue;
- CellPair pair2(Trinity::ComputeCellPair(viewPoint->GetPositionX(), viewPoint->GetPositionY()));
+ CellCoord pair2(Trinity::ComputeCellCoord(viewPoint->GetPositionX(), viewPoint->GetPositionY()));
Cell cell2(pair2);
//cell.SetNoCreate(); need load cells around viewPoint or player, that's why its commented
@@ -241,8 +237,7 @@ void AIRelocationNotifier::Visit(CreatureMapType &m)
}
}
-void
-MessageDistDeliverer::Visit(PlayerMapType &m)
+void MessageDistDeliverer::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
@@ -312,17 +307,17 @@ void MessageDistDeliverer::Visit(DynamicObjectMapType &m)
/*
void
-MessageDistDeliverer::VisitObject(Player* plr)
+MessageDistDeliverer::VisitObject(Player* player)
{
- if (!i_ownTeamOnly || (i_source.GetTypeId() == TYPEID_PLAYER && plr->GetTeam() == ((Player&)i_source).GetTeam()))
+ if (!i_ownTeamOnly || (i_source.GetTypeId() == TYPEID_PLAYER && player->GetTeam() == ((Player&)i_source).GetTeam()))
{
- SendPacket(plr);
+ SendPacket(player);
}
}
*/
-template<class T> void
-ObjectUpdater::Visit(GridRefManager<T> &m)
+template<class T>
+void ObjectUpdater::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index a5bce96f653..239c3710b5b 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -61,7 +61,7 @@ namespace Trinity
struct PlayerRelocationNotifier : public VisibleNotifier
{
- PlayerRelocationNotifier(Player &pl) : VisibleNotifier(pl) {}
+ PlayerRelocationNotifier(Player &player) : VisibleNotifier(player) {}
template<class T> void Visit(GridRefManager<T> &m) { VisibleNotifier::Visit(m); }
void Visit(CreatureMapType &);
@@ -81,9 +81,9 @@ namespace Trinity
{
Map &i_map;
Cell &cell;
- CellPair &p;
+ CellCoord &p;
const float i_radius;
- DelayedUnitRelocation(Cell &c, CellPair &pair, Map &map, float radius) :
+ DelayedUnitRelocation(Cell &c, CellCoord &pair, Map &map, float radius) :
i_map(map), cell(c), p(pair), i_radius(radius) {}
template<class T> void Visit(GridRefManager<T> &) {}
void Visit(CreatureMapType &);
@@ -137,16 +137,16 @@ namespace Trinity
void Visit(DynamicObjectMapType &m);
template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
- void SendPacket(Player* plr)
+ void SendPacket(Player* player)
{
// never send packet to self
- if (plr == i_source || (team && plr->GetTeam() != team) || skipped_receiver == plr)
+ if (player == i_source || (team && player->GetTeam() != team) || skipped_receiver == player)
return;
- if (!plr->HaveAtClient(i_source))
+ if (!player->HaveAtClient(i_source))
return;
- if (WorldSession* session = plr->GetSession())
+ if (WorldSession* session = player->GetSession())
session->SendPacket(i_message);
}
};
@@ -808,6 +808,9 @@ namespace Trinity
if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
return false;
+ if(!u->isTargetableForAttack(false))
+ return false;
+
return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u);
}
private:
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index dcd4207e3e1..543a1d1e280 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -28,8 +28,7 @@
#include "SpellAuras.h"
template<class T>
-inline void
-Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
+inline void Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
@@ -38,8 +37,7 @@ Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
}
}
-inline void
-Trinity::ObjectUpdater::Visit(CreatureMapType &m)
+inline void Trinity::ObjectUpdater::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (iter->getSource()->IsInWorld())
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index 58521b76bff..56c6410e6d7 100755
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -28,26 +28,7 @@
#include "CellImpl.h"
#include "CreatureAI.h"
-class ObjectGridRespawnMover
-{
- public:
- ObjectGridRespawnMover() {}
-
- void Move(GridType &grid);
-
- template<class T> void Visit(GridRefManager<T> &) {}
- void Visit(CreatureMapType &m);
-};
-
-void
-ObjectGridRespawnMover::Move(GridType &grid)
-{
- TypeContainerVisitor<ObjectGridRespawnMover, GridTypeMapContainer > mover(*this);
- grid.Visit(mover);
-}
-
-void
-ObjectGridRespawnMover::Visit(CreatureMapType &m)
+void ObjectGridEvacuator::Visit(CreatureMapType &m)
{
// creature in unloading grid can have respawn point in another grid
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
@@ -57,20 +38,8 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
Creature* c = iter->getSource();
++iter;
- ASSERT(!c->isPet() && "ObjectGridRespawnMover don't must be called for pets");
-
- Cell const& cur_cell = c->GetCurrentCell();
-
- float resp_x, resp_y, resp_z;
- c->GetRespawnCoord(resp_x, resp_y, resp_z);
- CellPair resp_val = Trinity::ComputeCellPair(resp_x, resp_y);
- Cell resp_cell(resp_val);
-
- if (cur_cell.DiffGrid(resp_cell))
- {
- c->GetMap()->CreatureRespawnRelocation(c);
- // false result ignored: will be unload with other creatures at grid
- }
+ ASSERT(!c->isPet() && "ObjectGridRespawnMover must not be called for pets");
+ c->GetMap()->CreatureRespawnRelocation(c, true);
}
}
@@ -94,22 +63,22 @@ class ObjectWorldLoader
uint32 i_corpses;
};
-template<class T> void AddUnitState(T* /*obj*/, CellPair const& /*cell_pair*/)
+template<class T> void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord const& /*cellCoord*/)
{
}
-template<> void AddUnitState(Creature* obj, CellPair const& cell_pair)
+template<> void ObjectGridLoader::SetObjectCell(Creature* obj, CellCoord const& cellCoord)
{
- Cell cell(cell_pair);
+ Cell cell(cellCoord);
obj->SetCurrentCell(cell);
}
template <class T>
-void AddObjectHelper(CellPair &cell, GridRefManager<T> &m, uint32 &count, Map* map, T *obj)
+void AddObjectHelper(CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* map, T *obj)
{
- obj->GetGridRef().link(&m, obj);
- AddUnitState(obj, cell);
+ obj->AddToGrid(m);
+ ObjectGridLoader::SetObjectCell(obj, cell);
obj->AddToWorld();
if (obj->isActiveObject())
map->AddToActive(obj);
@@ -118,7 +87,7 @@ void AddObjectHelper(CellPair &cell, GridRefManager<T> &m, uint32 &count, Map* m
}
template <class T>
-void LoadHelper(CellGuidSet const& guid_set, CellPair &cell, GridRefManager<T> &m, uint32 &count, Map* map)
+void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager<T> &m, uint32 &count, Map* map)
{
for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
{
@@ -135,7 +104,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellPair &cell, GridRefManager<T> &
}
}
-void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType &m, uint32 &count, Map* map)
+void LoadHelper(CellCorpseSet const& cell_corpses, CellCoord &cell, CorpseMapType &m, uint32 &count, Map* map)
{
if (cell_corpses.empty())
return;
@@ -157,21 +126,26 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType
// in that case map == currMap
obj->SetMap(map);
+ if (obj->IsInGrid())
+ {
+ obj->AddToWorld();
+ continue;
+ }
+
AddObjectHelper(cell, m, count, map, obj);
}
}
-void
-ObjectGridLoader::Visit(GameObjectMapType &m)
+void ObjectGridLoader::Visit(GameObjectMapType &m)
{
uint32 x = (i_cell.GridX()*MAX_NUMBER_OF_CELLS) + i_cell.CellX();
uint32 y = (i_cell.GridY()*MAX_NUMBER_OF_CELLS) + i_cell.CellY();
- CellPair cell_pair(x, y);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord(x, y);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids const& cell_guids = sObjectMgr->GetCellObjectGuids(i_map->GetId(), i_map->GetSpawnMode(), cell_id);
- LoadHelper(cell_guids.gameobjects, cell_pair, m, i_gameObjects, i_map);
+ LoadHelper(cell_guids.gameobjects, cellCoord, m, i_gameObjects, i_map);
}
void
@@ -179,41 +153,24 @@ ObjectGridLoader::Visit(CreatureMapType &m)
{
uint32 x = (i_cell.GridX()*MAX_NUMBER_OF_CELLS) + i_cell.CellX();
uint32 y = (i_cell.GridY()*MAX_NUMBER_OF_CELLS) + i_cell.CellY();
- CellPair cell_pair(x, y);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord(x, y);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids const& cell_guids = sObjectMgr->GetCellObjectGuids(i_map->GetId(), i_map->GetSpawnMode(), cell_id);
- LoadHelper(cell_guids.creatures, cell_pair, m, i_creatures, i_map);
+ LoadHelper(cell_guids.creatures, cellCoord, m, i_creatures, i_map);
}
-void
-ObjectWorldLoader::Visit(CorpseMapType &m)
+void ObjectWorldLoader::Visit(CorpseMapType &m)
{
uint32 x = (i_cell.GridX()*MAX_NUMBER_OF_CELLS) + i_cell.CellX();
uint32 y = (i_cell.GridY()*MAX_NUMBER_OF_CELLS) + i_cell.CellY();
- CellPair cell_pair(x, y);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord(x, y);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
// corpses are always added to spawn mode 0 and they are spawned by their instance id
CellObjectGuids const& cell_guids = sObjectMgr->GetCellObjectGuids(i_map->GetId(), 0, cell_id);
- LoadHelper(cell_guids.corpses, cell_pair, m, i_corpses, i_map);
-}
-
-void
-ObjectGridLoader::Load(GridType &grid)
-{
- {
- TypeContainerVisitor<ObjectGridLoader, GridTypeMapContainer > loader(*this);
- grid.Visit(loader);
- }
-
- {
- ObjectWorldLoader wloader(*this);
- TypeContainerVisitor<ObjectWorldLoader, WorldTypeMapContainer > loader(wloader);
- grid.Visit(loader);
- i_corpses = wloader.i_corpses;
- }
+ LoadHelper(cell_guids.corpses, cellCoord, m, i_corpses, i_map);
}
void ObjectGridLoader::LoadN(void)
@@ -226,35 +183,27 @@ void ObjectGridLoader::LoadN(void)
for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
{
i_cell.data.Part.cell_y = y;
- GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
- loader.Load(i_grid(x, y), *this);
- }
- }
- sLog->outDebug(LOG_FILTER_MAPS, "%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses, i_grid.GetGridId(), i_map->GetId());
-}
-void ObjectGridUnloader::MoveToRespawnN()
-{
- for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
- {
- for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
- {
- ObjectGridRespawnMover mover;
- mover.Move(i_grid(x, y));
+ //Load creatures and game objects
+ {
+ TypeContainerVisitor<ObjectGridLoader, GridTypeMapContainer> visitor(*this);
+ i_grid.VisitGrid(x, y, visitor);
+ }
+
+ //Load corpses (not bones)
+ {
+ ObjectWorldLoader worker(*this);
+ TypeContainerVisitor<ObjectWorldLoader, WorldTypeMapContainer> visitor(worker);
+ i_grid.VisitGrid(x, y, visitor);
+ i_corpses += worker.i_corpses;
+ }
}
}
-}
-
-void
-ObjectGridUnloader::Unload(GridType &grid)
-{
- TypeContainerVisitor<ObjectGridUnloader, GridTypeMapContainer > unloader(*this);
- grid.Visit(unloader);
+ sLog->outDebug(LOG_FILTER_MAPS, "%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses, i_grid.GetGridId(), i_map->GetId());
}
template<class T>
-void
-ObjectGridUnloader::Visit(GridRefManager<T> &m)
+void ObjectGridUnloader::Visit(GridRefManager<T> &m)
{
while (!m.isEmpty())
{
@@ -262,20 +211,17 @@ ObjectGridUnloader::Visit(GridRefManager<T> &m)
// if option set then object already saved at this moment
if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
obj->SaveRespawnTime();
+ //Some creatures may summon other temp summons in CleanupsBeforeDelete()
+ //So we need this even after cleaner (maybe we can remove cleaner)
+ //Example: Flame Leviathan Turret 33139 is summoned when a creature is deleted
+ //TODO: Check if that script has the correct logic. Do we really need to summons something before deleting?
+ obj->CleanupsBeforeDelete();
///- object will get delinked from the manager when deleted
delete obj;
}
}
-void
-ObjectGridStoper::Stop(GridType &grid)
-{
- TypeContainerVisitor<ObjectGridStoper, GridTypeMapContainer > stoper(*this);
- grid.Visit(stoper);
-}
-
-void
-ObjectGridStoper::Visit(CreatureMapType &m)
+void ObjectGridStoper::Visit(CreatureMapType &m)
{
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
@@ -290,32 +236,18 @@ ObjectGridStoper::Visit(CreatureMapType &m)
}
}
-void
-ObjectGridCleaner::Stop(GridType &grid)
-{
- TypeContainerVisitor<ObjectGridCleaner, GridTypeMapContainer > stoper(*this);
- grid.Visit(stoper);
-}
-
-void
-ObjectGridCleaner::Visit(CreatureMapType &m)
-{
- for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
- iter->getSource()->CleanupsBeforeDelete();
-}
-
template<class T>
-void
-ObjectGridCleaner::Visit(GridRefManager<T> &m)
+void ObjectGridCleaner::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
- iter->getSource()->RemoveFromWorld();
+ iter->getSource()->CleanupsBeforeDelete();
}
template void ObjectGridUnloader::Visit(CreatureMapType &);
template void ObjectGridUnloader::Visit(GameObjectMapType &);
template void ObjectGridUnloader::Visit(DynamicObjectMapType &);
template void ObjectGridUnloader::Visit(CorpseMapType &);
+template void ObjectGridCleaner::Visit(CreatureMapType &);
template void ObjectGridCleaner::Visit<GameObject>(GameObjectMapType &);
template void ObjectGridCleaner::Visit<DynamicObject>(DynamicObjectMapType &);
template void ObjectGridCleaner::Visit<Corpse>(CorpseMapType &);
diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h
index 901080293a4..09a8fb2af9c 100755
--- a/src/server/game/Grids/ObjectGridLoader.h
+++ b/src/server/game/Grids/ObjectGridLoader.h
@@ -36,15 +36,15 @@ class ObjectGridLoader
: i_cell(cell), i_grid(grid), i_map(map), i_gameObjects(0), i_creatures(0), i_corpses (0)
{}
- void Load(GridType &grid);
void Visit(GameObjectMapType &m);
void Visit(CreatureMapType &m);
void Visit(CorpseMapType &) const {}
-
void Visit(DynamicObjectMapType&) const {}
void LoadN(void);
+ template<class T> static void SetObjectCell(T* obj, CellCoord const& cellCoord);
+
private:
Cell i_cell;
NGridType &i_grid;
@@ -54,79 +54,33 @@ class ObjectGridLoader
uint32 i_corpses;
};
-class ObjectGridUnloader
+//Stop the creatures before unloading the NGrid
+class ObjectGridStoper
{
public:
- ObjectGridUnloader(NGridType &grid) : i_grid(grid) {}
-
- void MoveToRespawnN();
- void UnloadN()
- {
- for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
- {
- for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
- {
- GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
- loader.Unload(i_grid(x, y), *this);
- }
- }
- }
-
- void Unload(GridType &grid);
- template<class T> void Visit(GridRefManager<T> &m);
- private:
- NGridType &i_grid;
+ void Visit(CreatureMapType &m);
+ template<class T> void Visit(GridRefManager<T> &) {}
};
-class ObjectGridStoper
+//Move the foreign creatures back to respawn positions before unloading the NGrid
+class ObjectGridEvacuator
{
public:
- ObjectGridStoper(NGridType &grid) : i_grid(grid) {}
-
- void StopN()
- {
- for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
- {
- for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
- {
- GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
- loader.Stop(i_grid(x, y), *this);
- }
- }
- }
-
- void Stop(GridType &grid);
void Visit(CreatureMapType &m);
-
- template<class NONACTIVE> void Visit(GridRefManager<NONACTIVE> &) {}
- private:
- NGridType &i_grid;
+ template<class T> void Visit(GridRefManager<T> &) {}
};
+//Clean up and remove from world
class ObjectGridCleaner
{
public:
- ObjectGridCleaner(NGridType &grid) : i_grid(grid) {}
-
- void CleanN()
- {
- for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
- {
- for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
- {
- GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
- loader.Stop(i_grid(x, y), *this);
- }
- }
- }
-
- void Stop(GridType &grid);
- void Visit(CreatureMapType &m);
template<class T> void Visit(GridRefManager<T> &);
- private:
- NGridType &i_grid;
};
-typedef GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> GridLoaderType;
+//Delete objects before deleting NGrid
+class ObjectGridUnloader
+{
+ public:
+ template<class T> void Visit(GridRefManager<T> &m);
+};
#endif
-
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 44d7f62305f..6311066f597 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -1052,8 +1052,8 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
item->is_looted = true;
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
roll->getLoot()->unlootedCount--;
- AllowedLooterSet* looters = item->GetAllowedLooters();
- player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
+ AllowedLooterSet looters = item->GetAllowedLooters();
+ player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, looters);
}
else
{
@@ -1105,8 +1105,8 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
item->is_looted = true;
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
roll->getLoot()->unlootedCount--;
- AllowedLooterSet* looters = item->GetAllowedLooters();
- player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, (looters->size() > 1) ? looters : NULL);
+ AllowedLooterSet looters = item->GetAllowedLooters();
+ player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, looters);
}
else
{
@@ -1261,11 +1261,12 @@ void Group::UpdatePlayerOutOfRange(Player* player)
WorldPacket data;
player->GetSession()->BuildPartyMemberStatsChangedPacket(player, &data);
+ Player* member;
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- player = itr->getSource();
- if (player && !player->IsWithinDist(player, player->GetSightRange(), false))
- player->GetSession()->SendPacket(&data);
+ member = itr->getSource();
+ if (member && !member->IsWithinDist(player, member->GetSightRange(), false))
+ member->GetSession()->SendPacket(&data);
}
}
@@ -1273,12 +1274,12 @@ void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int
{
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pl = itr->getSource();
- if (!pl || (ignore != 0 && pl->GetGUID() == ignore) || (ignorePlayersInBGRaid && pl->GetGroup() != this))
+ Player* player = itr->getSource();
+ if (!player || (ignore != 0 && player->GetGUID() == ignore) || (ignorePlayersInBGRaid && player->GetGroup() != this))
continue;
- if (pl->GetSession() && (group == -1 || itr->getSubGroup() == group))
- pl->GetSession()->SendPacket(packet);
+ if (player->GetSession() && (group == -1 || itr->getSubGroup() == group))
+ player->GetSession()->SendPacket(packet);
}
}
@@ -1286,10 +1287,10 @@ void Group::BroadcastReadyCheck(WorldPacket* packet)
{
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pl = itr->getSource();
- if (pl && pl->GetSession())
- if (IsLeader(pl->GetGUID()) || IsAssistant(pl->GetGUID()))
- pl->GetSession()->SendPacket(packet);
+ Player* player = itr->getSource();
+ if (player && player->GetSession())
+ if (IsLeader(player->GetGUID()) || IsAssistant(player->GetGUID()))
+ player->GetSession()->SendPacket(packet);
}
}
@@ -1297,8 +1298,8 @@ void Group::OfflineReadyCheck()
{
for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
- Player* pl = ObjectAccessor::FindPlayer(citr->guid);
- if (!pl || !pl->GetSession())
+ Player* player = ObjectAccessor::FindPlayer(citr->guid);
+ if (!player || !player->GetSession())
{
WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9);
data << uint64(citr->guid);
@@ -1328,6 +1329,7 @@ bool Group::SameSubGroup(Player const* member1, Player const* member2) const
{
if (!member1 || !member2)
return false;
+
if (member1->GetGroup() != this || member2->GetGroup() != this)
return false;
else
@@ -1364,10 +1366,8 @@ void Group::ChangeMembersGroup(uint64 guid, uint8 group)
if (!isBGGroup())
CharacterDatabase.PExecute("UPDATE group_member SET subgroup='%u' WHERE memberGuid='%u'", group, GUID_LOPART(guid));
- Player* player = ObjectAccessor::FindPlayer(guid);
-
// In case the moved player is online, update the player object with the new sub group references
- if (player)
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
{
if (player->GetGroup() == this)
player->GetGroupRef().setSubGroup(group);
@@ -1425,10 +1425,10 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
Player* pNewLooter = NULL;
for (member_citerator itr = guid_itr; itr != m_memberSlots.end(); ++itr)
{
- if (Player* pl = ObjectAccessor::FindPlayer(itr->guid))
- if (pl->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
+ if (Player* player = ObjectAccessor::FindPlayer(itr->guid))
+ if (player->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
{
- pNewLooter = pl;
+ pNewLooter = player;
break;
}
}
@@ -1438,10 +1438,10 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
// search from start
for (member_citerator itr = m_memberSlots.begin(); itr != guid_itr; ++itr)
{
- if (Player* pl = ObjectAccessor::FindPlayer(itr->guid))
- if (pl->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
+ if (Player* player = ObjectAccessor::FindPlayer(itr->guid))
+ if (player->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
{
- pNewLooter = pl;
+ pNewLooter = player;
break;
}
}
@@ -2065,4 +2065,5 @@ void Group::ToggleGroupMemberFlag(member_witerator slot, uint8 flag, bool apply)
slot->flags |= flag;
else
slot->flags &= ~flag;
-} \ No newline at end of file
+}
+
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index ed1fc80fd20..c51aa6dd7bf 100755
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -57,14 +57,14 @@ enum RollVote
enum GroupMemberOnlineStatus
{
MEMBER_STATUS_OFFLINE = 0x0000,
- MEMBER_STATUS_ONLINE = 0x0001,
- MEMBER_STATUS_PVP = 0x0002,
- MEMBER_STATUS_UNK0 = 0x0004, // dead? (health=0)
- MEMBER_STATUS_UNK1 = 0x0008, // ghost? (health=1)
- MEMBER_STATUS_UNK2 = 0x0010, // never seen
- MEMBER_STATUS_UNK3 = 0x0020, // never seen
- MEMBER_STATUS_UNK4 = 0x0040, // appears with dead and ghost flags
- MEMBER_STATUS_UNK5 = 0x0080, // never seen
+ MEMBER_STATUS_ONLINE = 0x0001, // Lua_UnitIsConnected
+ MEMBER_STATUS_PVP = 0x0002, // Lua_UnitIsPVP
+ MEMBER_STATUS_DEAD = 0x0004, // Lua_UnitIsDead
+ MEMBER_STATUS_GHOST = 0x0008, // Lua_UnitIsGhost
+ MEMBER_STATUS_PVP_FFA = 0x0010, // Lua_UnitIsPVPFreeForAll
+ MEMBER_STATUS_UNK3 = 0x0020, // used in calls from Lua_GetPlayerMapPosition/Lua_GetBattlefieldFlagPosition
+ MEMBER_STATUS_AFK = 0x0040, // Lua_UnitIsAFK
+ MEMBER_STATUS_DND = 0x0080, // Lua_UnitIsDND
};
enum GroupMemberFlags
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 0103b164f64..59c107bd40f 100755
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -762,7 +762,7 @@ bool Guild::MoveItemData::CheckItem(uint32& splitedAmount)
bool Guild::MoveItemData::CanStore(Item* pItem, bool swap, bool sendError)
{
m_vec.clear();
- InventoryResult msg = _CanStore(pItem, swap);
+ InventoryResult msg = CanStore(pItem, swap);
if (sendError && msg != EQUIP_ERR_OK)
m_pPlayer->SendEquipError(msg, pItem);
return (msg == EQUIP_ERR_OK);
@@ -850,7 +850,7 @@ void Guild::PlayerMoveItemData::LogBankEvent(SQLTransaction& trans, MoveItemData
pFrom->GetItem()->GetEntry(), count);
}
-inline InventoryResult Guild::PlayerMoveItemData::_CanStore(Item* pItem, bool swap)
+inline InventoryResult Guild::PlayerMoveItemData::CanStore(Item* pItem, bool swap)
{
return m_pPlayer->CanStoreItem(m_container, m_slotId, m_vec, pItem, swap);
}
@@ -1002,11 +1002,11 @@ bool Guild::BankMoveItemData::_ReserveSpace(uint8 slotId, Item* pItem, Item* pIt
return true;
}
-void Guild::BankMoveItemData::_CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count)
+void Guild::BankMoveItemData::CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count)
{
for (uint8 slotId = 0; (slotId < GUILD_BANK_MAX_SLOTS) && (count > 0); ++slotId)
{
- // Skip slot already processed in _CanStore (when destination slot was specified)
+ // Skip slot already processed in CanStore (when destination slot was specified)
if (slotId == skipSlotId)
continue;
@@ -1022,7 +1022,7 @@ void Guild::BankMoveItemData::_CanStoreItemInTab(Item* pItem, uint8 skipSlotId,
}
}
-InventoryResult Guild::BankMoveItemData::_CanStore(Item* pItem, bool swap)
+InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap)
{
sLog->outDebug(LOG_FILTER_GUILD, "GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u",
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
@@ -1055,13 +1055,13 @@ InventoryResult Guild::BankMoveItemData::_CanStore(Item* pItem, bool swap)
// Search for stacks to merge with
if (pItem->GetMaxStackCount() > 1)
{
- _CanStoreItemInTab(pItem, m_slotId, true, count);
+ CanStoreItemInTab(pItem, m_slotId, true, count);
if (count == 0)
return EQUIP_ERR_OK;
}
// Search free slot for item
- _CanStoreItemInTab(pItem, m_slotId, false, count);
+ CanStoreItemInTab(pItem, m_slotId, false, count);
if (count == 0)
return EQUIP_ERR_OK;
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index 2ea345f2ca1..3ac2b0a490d 100755
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -524,7 +524,7 @@ private:
uint8 GetContainer() const { return m_container; }
uint8 GetSlotId() const { return m_slotId; }
protected:
- virtual InventoryResult _CanStore(Item* pItem, bool swap) = 0;
+ virtual InventoryResult CanStore(Item* pItem, bool swap) = 0;
Guild* m_pGuild;
Player* m_pPlayer;
@@ -547,7 +547,7 @@ private:
Item* StoreItem(SQLTransaction& trans, Item* pItem);
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const;
protected:
- InventoryResult _CanStore(Item* pItem, bool swap);
+ InventoryResult CanStore(Item* pItem, bool swap);
};
class BankMoveItemData : public MoveItemData
@@ -566,12 +566,12 @@ private:
void LogAction(MoveItemData* pFrom) const;
protected:
- InventoryResult _CanStore(Item* pItem, bool swap);
+ InventoryResult CanStore(Item* pItem, bool swap);
private:
Item* _StoreItem(SQLTransaction& trans, BankTab* pTab, Item* pItem, ItemPosCount& pos, bool clone) const;
bool _ReserveSpace(uint8 slotId, Item* pItem, Item* pItemDest, uint32& count);
- void _CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count);
+ void CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count);
};
typedef UNORDERED_MAP<uint32, Member*> Members;
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index 63d54e4ec94..b4e97f40f87 100755
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
@@ -80,8 +80,8 @@ class InstanceSave
/* online players bound to the instance (perm/solo)
does not include the members of the group unless they have permanent saves */
- void AddPlayer(Player* player) { m_playerList.push_back(player); }
- bool RemovePlayer(Player* player) { m_playerList.remove(player); return UnloadIfEmpty(); }
+ void AddPlayer(Player* player) { TRINITY_GUARD(ACE_Thread_Mutex, _lock); m_playerList.push_back(player); }
+ bool RemovePlayer(Player* player) { TRINITY_GUARD(ACE_Thread_Mutex, _lock); m_playerList.remove(player); return UnloadIfEmpty(); }
/* all groups bound to the instance */
void AddGroup(Group* group) { m_groupList.push_back(group); }
bool RemoveGroup(Group* group) { m_groupList.remove(group); return UnloadIfEmpty(); }
@@ -110,6 +110,8 @@ class InstanceSave
uint32 m_mapid;
Difficulty m_difficulty;
bool m_canReset;
+
+ ACE_Thread_Mutex _lock;
};
typedef UNORDERED_MAP<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index b9b9ed281fa..f0e21f7f709 100755
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -141,34 +141,36 @@ void InstanceScript::AddDoor(GameObject* door, bool add)
for (DoorInfoMap::iterator itr = lower; itr != upper; ++itr)
{
+ DoorInfo const& data = itr->second;
+
if (add)
{
- itr->second.bossInfo->door[itr->second.type].insert(door);
- switch (itr->second.boundary)
+ data.bossInfo->door[data.type].insert(door);
+ switch (data.boundary)
{
default:
case BOUNDARY_NONE:
break;
case BOUNDARY_N:
case BOUNDARY_S:
- itr->second.bossInfo->boundary[itr->second.boundary] = door->GetPositionX();
+ data.bossInfo->boundary[data.boundary] = door->GetPositionX();
break;
case BOUNDARY_E:
case BOUNDARY_W:
- itr->second.bossInfo->boundary[itr->second.boundary] = door->GetPositionY();
+ data.bossInfo->boundary[data.boundary] = door->GetPositionY();
break;
case BOUNDARY_NW:
case BOUNDARY_SE:
- itr->second.bossInfo->boundary[itr->second.boundary] = door->GetPositionX() + door->GetPositionY();
+ data.bossInfo->boundary[data.boundary] = door->GetPositionX() + door->GetPositionY();
break;
case BOUNDARY_NE:
case BOUNDARY_SW:
- itr->second.bossInfo->boundary[itr->second.boundary] = door->GetPositionX() - door->GetPositionY();
+ data.bossInfo->boundary[data.boundary] = door->GetPositionX() - door->GetPositionY();
break;
}
}
else
- itr->second.bossInfo->door[itr->second.type].erase(door);
+ data.bossInfo->door[data.type].erase(door);
}
if (add)
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index eff811b14eb..dd17e8277d6 100755
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -436,8 +436,8 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
roundRobinPlayer = lootOwner->GetGUID();
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
- if (Player* pl = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter
- FillNotNormalLootFor(pl, pl->IsAtGroupRewardDistance(lootOwner));
+ if (Player* player = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter
+ FillNotNormalLootFor(player, player->IsAtGroupRewardDistance(lootOwner));
for (uint8 i = 0; i < items.size(); ++i)
{
@@ -453,28 +453,28 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
return true;
}
-void Loot::FillNotNormalLootFor(Player* pl, bool presentAtLooting)
+void Loot::FillNotNormalLootFor(Player* player, bool presentAtLooting)
{
- uint32 plguid = pl->GetGUIDLow();
+ uint32 plguid = player->GetGUIDLow();
QuestItemMap::const_iterator qmapitr = PlayerQuestItems.find(plguid);
if (qmapitr == PlayerQuestItems.end())
- FillQuestLoot(pl);
+ FillQuestLoot(player);
qmapitr = PlayerFFAItems.find(plguid);
if (qmapitr == PlayerFFAItems.end())
- FillFFALoot(pl);
+ FillFFALoot(player);
qmapitr = PlayerNonQuestNonFFAConditionalItems.find(plguid);
if (qmapitr == PlayerNonQuestNonFFAConditionalItems.end())
- FillNonQuestNonFFAConditionalLoot(pl, presentAtLooting);
+ FillNonQuestNonFFAConditionalLoot(player, presentAtLooting);
// if not auto-processed player will have to come and pick it up manually
if (!presentAtLooting)
return;
// Process currency items
- uint32 max_slot = GetMaxSlotInLootFor(pl);
+ uint32 max_slot = GetMaxSlotInLootFor(player);
LootItem const* item = NULL;
uint32 itemsSize = uint32(items.size());
for (uint32 i = 0; i < max_slot; ++i)
@@ -484,10 +484,10 @@ void Loot::FillNotNormalLootFor(Player* pl, bool presentAtLooting)
else
item = &quest_items[i-itemsSize];
- if (!item->is_looted && item->freeforall && item->AllowedForPlayer(pl))
+ if (!item->is_looted && item->freeforall && item->AllowedForPlayer(player))
if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item->itemid))
if (proto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
- pl->StoreLootItem(i, this);
+ player->StoreLootItem(i, this);
}
}
@@ -592,8 +592,8 @@ void Loot::NotifyItemRemoved(uint8 lootIndex)
{
i_next = i;
++i_next;
- if (Player* pl = ObjectAccessor::FindPlayer(*i))
- pl->SendNotifyLootItemRemoved(lootIndex);
+ if (Player* player = ObjectAccessor::FindPlayer(*i))
+ player->SendNotifyLootItemRemoved(lootIndex);
else
PlayersLooting.erase(i);
}
@@ -607,8 +607,8 @@ void Loot::NotifyMoneyRemoved()
{
i_next = i;
++i_next;
- if (Player* pl = ObjectAccessor::FindPlayer(*i))
- pl->SendNotifyLootMoneyRemoved();
+ if (Player* player = ObjectAccessor::FindPlayer(*i))
+ player->SendNotifyLootMoneyRemoved();
else
PlayersLooting.erase(i);
}
@@ -626,9 +626,9 @@ void Loot::NotifyQuestItemRemoved(uint8 questIndex)
{
i_next = i;
++i_next;
- if (Player* pl = ObjectAccessor::FindPlayer(*i))
+ if (Player* player = ObjectAccessor::FindPlayer(*i))
{
- QuestItemMap::const_iterator pq = PlayerQuestItems.find(pl->GetGUIDLow());
+ QuestItemMap::const_iterator pq = PlayerQuestItems.find(player->GetGUIDLow());
if (pq != PlayerQuestItems.end() && pq->second)
{
// find where/if the player has the given item in it's vector
@@ -640,7 +640,7 @@ void Loot::NotifyQuestItemRemoved(uint8 questIndex)
break;
if (j < pql.size())
- pl->SendNotifyLootItemRemoved(items.size()+j);
+ player->SendNotifyLootItemRemoved(items.size()+j);
}
}
else
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index b0adeb03784..10ae786a7d6 100755
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -149,7 +149,7 @@ struct LootItem
bool AllowedForPlayer(Player const* player) const;
void AddAllowedLooter(Player const* player);
- AllowedLooterSet* GetAllowedLooters() { return &allowedGUIDs; }
+ const AllowedLooterSet & GetAllowedLooters() const { return allowedGUIDs; }
};
struct QuestItem
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 26e058a32f3..9c395a2319c 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -141,9 +141,9 @@ void Map::LoadMap(int gx, int gy, bool reload)
// load grid map for base map
if (!m_parentMap->GridMaps[gx][gy])
- m_parentMap->EnsureGridCreated(GridPair(63-gx, 63-gy));
+ m_parentMap->EnsureGridCreated(GridCoord(63-gx, 63-gy));
- ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridPair(gx, gy));
+ ((MapInstanced*)(m_parentMap))->AddGridMapReference(GridCoord(gx, gy));
GridMaps[gx][gy] = m_parentMap->GridMaps[gx][gy];
return;
}
@@ -202,10 +202,11 @@ void Map::DeleteStateMachine()
}
Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent):
-i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId),
+_creatureToMoveLock(false), i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId),
m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE),
m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD),
-m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry), i_scriptLock(false)
+m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry),
+i_scriptLock(false)
{
m_parentMap = (_parent ? _parent : this);
for (unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
@@ -233,74 +234,52 @@ void Map::InitVisibilityDistance()
// Template specialization of utility methods
template<class T>
-void Map::AddToGrid(T* obj, NGridType *grid, Cell const& cell)
+void Map::AddToGrid(T* obj, Cell const& cell)
{
+ NGridType* grid = getNGrid(cell.GridX(), cell.GridY());
if (obj->m_isWorldObject)
- (*grid)(cell.CellX(), cell.CellY()).template AddWorldObject<T>(obj);
+ grid->GetGridType(cell.CellX(), cell.CellY()).template AddWorldObject<T>(obj);
else
- (*grid)(cell.CellX(), cell.CellY()).template AddGridObject<T>(obj);
+ grid->GetGridType(cell.CellX(), cell.CellY()).template AddGridObject<T>(obj);
}
template<>
-void Map::AddToGrid(Creature* obj, NGridType *grid, Cell const& cell)
+void Map::AddToGrid(Creature* obj, Cell const& cell)
{
+ NGridType* grid = getNGrid(cell.GridX(), cell.GridY());
if (obj->m_isWorldObject)
- (*grid)(cell.CellX(), cell.CellY()).AddWorldObject(obj);
+ grid->GetGridType(cell.CellX(), cell.CellY()).AddWorldObject(obj);
else
- (*grid)(cell.CellX(), cell.CellY()).AddGridObject(obj);
+ grid->GetGridType(cell.CellX(), cell.CellY()).AddGridObject(obj);
obj->SetCurrentCell(cell);
}
template<class T>
-void Map::RemoveFromGrid(T* obj, NGridType *grid, Cell const& cell)
-{
- if (obj->m_isWorldObject)
- (*grid)(cell.CellX(), cell.CellY()).template RemoveWorldObject<T>(obj);
- else
- (*grid)(cell.CellX(), cell.CellY()).template RemoveGridObject<T>(obj);
-}
-
-template<class T>
void Map::SwitchGridContainers(T* obj, bool on)
{
- CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
- if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
+ if (!p.IsCoordValid())
{
sLog->outError("Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
Cell cell(p);
- if (!loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)))
+ if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
return;
sLog->outStaticDebug("Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(ngrid != NULL);
- GridType &grid = (*ngrid)(cell.CellX(), cell.CellY());
+ GridType &grid = ngrid->GetGridType(cell.CellX(), cell.CellY());
+ obj->RemoveFromGrid(); //This step is not really necessary but we want to do ASSERT in remove/add
if (on)
- {
- grid.RemoveGridObject<T>(obj);
grid.AddWorldObject<T>(obj);
- /*if (!grid.RemoveGridObject<T>(obj, obj->GetGUID())
- || !grid.AddWorldObject<T>(obj, obj->GetGUID()))
- {
- ASSERT(false);
- }*/
- }
else
- {
- grid.RemoveWorldObject<T>(obj);
grid.AddGridObject<T>(obj);
- /*if (!grid.RemoveWorldObject<T>(obj, obj->GetGUID())
- || !grid.AddGridObject<T>(obj, obj->GetGUID()))
- {
- ASSERT(false);
- }*/
- }
obj->m_isWorldObject = on;
}
@@ -315,18 +294,20 @@ void Map::DeleteFromWorld(T* obj)
}
template<>
-void Map::DeleteFromWorld(Player* pl)
+void Map::DeleteFromWorld(Player* player)
{
- sObjectAccessor->RemoveObject(pl);
- delete pl;
+ sObjectAccessor->RemoveObject(player);
+ sObjectAccessor->RemoveUpdateObject(player); //TODO: I do not know why we need this, it should be removed in ~Object anyway
+ delete player;
}
-void
-Map::EnsureGridCreated(const GridPair &p)
+//Create NGrid so the object can be added to it
+//But object data is not loaded here
+void Map::EnsureGridCreated(const GridCoord &p)
{
if (!getNGrid(p.x_coord, p.y_coord))
{
- ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
+ 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);
@@ -349,8 +330,8 @@ Map::EnsureGridCreated(const GridPair &p)
}
}
-void
-Map::EnsureGridLoadedAtEnter(const Cell &cell, Player* player)
+//Load NGrid and make it active
+void Map::EnsureGridLoadedForActiveObject(const Cell &cell, WorldObject* object)
{
EnsureGridLoaded(cell);
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
@@ -359,23 +340,16 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player* player)
// refresh grid state & timer
if (grid->GetGridState() != GRID_STATE_ACTIVE)
{
- if (player)
- {
- sLog->outStaticDebug("Player %s enter cell[%u, %u] triggers loading of grid[%u, %u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), GetId());
- }
- else
- {
- sLog->outStaticDebug("Active object nearby triggers loading of grid [%u, %u] on map %u", cell.GridX(), cell.GridY(), GetId());
- }
-
+ sLog->outStaticDebug("Active object "UI64FMTD" triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId());
ResetGridExpiry(*grid, 0.1f);
grid->SetGridState(GRID_STATE_ACTIVE);
}
}
+//Create NGrid and load the object data in it
bool Map::EnsureGridLoaded(const Cell &cell)
{
- EnsureGridCreated(GridPair(cell.GridX(), cell.GridY()));
+ EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY()));
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(grid != NULL);
@@ -389,7 +363,7 @@ bool Map::EnsureGridLoaded(const Cell &cell)
loader.LoadN();
// Add resurrectable corpses to world object list in grid
- sObjectAccessor->AddCorpsesToGrid(GridPair(cell.GridX(), cell.GridY()), (*grid)(cell.CellX(), cell.CellY()), this);
+ sObjectAccessor->AddCorpsesToGrid(GridCoord(cell.GridX(), cell.GridY()), grid->GetGridType(cell.CellX(), cell.CellY()), this);
return true;
}
@@ -398,30 +372,25 @@ bool Map::EnsureGridLoaded(const Cell &cell)
void Map::LoadGrid(float x, float y)
{
- CellPair pair = Trinity::ComputeCellPair(x, y);
- Cell cell(pair);
- EnsureGridLoaded(cell);
+ EnsureGridLoaded(Cell(x, y));
}
-bool Map::Add(Player* player)
+bool Map::AddPlayerToMap(Player* player)
{
- // Check if we are adding to correct map
- ASSERT (player->GetMap() == this);
- CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
- if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ CellCoord cellCoord = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
+ if (!cellCoord.IsCoordValid())
{
- sLog->outError("Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), p.x_coord, p.y_coord);
+ sLog->outError("Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false;
}
- player->SetMap(this);
-
- Cell cell(p);
- EnsureGridLoadedAtEnter(cell, player);
- NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
- ASSERT(grid != NULL);
- AddToGrid(player, grid, cell);
+ Cell cell(cellCoord);
+ EnsureGridLoadedForActiveObject(cell, player);
+ AddToGrid(player, cell);
+ // Check if we are adding to correct map
+ ASSERT (player->GetMap() == this);
+ player->SetMap(this);
player->AddToWorld();
SendInitSelf(player);
@@ -435,68 +404,73 @@ bool Map::Add(Player* player)
}
template<class T>
-void
-Map::Add(T *obj)
+void Map::InitializeObject(T* /*obj*/)
+{
+}
+
+template<>
+void Map::InitializeObject(Creature* obj)
+{
+ obj->_moveState = CREATURE_CELL_MOVE_NONE;
+}
+
+template<class T>
+void Map::AddToMap(T *obj)
{
- CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
- if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ //TODO: Needs clean up. An object should not be added to map twice.
+ if (obj->IsInWorld())
{
- sLog->outError("Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
+ ASSERT(obj->IsInGrid());
+ obj->UpdateObjectVisibility(true);
return;
}
- Cell cell(p);
- if (obj->IsInWorld()) // need some clean up later
+ CellCoord cellCoord = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
+ if (!cellCoord.IsCoordValid())
{
- obj->UpdateObjectVisibility(true);
+ sLog->outError("Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return;
}
+ Cell cell(cellCoord);
if (obj->isActiveObject())
- EnsureGridLoadedAtEnter(cell);
+ EnsureGridLoadedForActiveObject(cell, obj);
else
- EnsureGridCreated(GridPair(cell.GridX(), cell.GridY()));
-
- NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
- ASSERT(grid != NULL);
+ EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY()));
+ AddToGrid(obj, cell);
+ sLog->outStaticDebug("Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
- AddToGrid(obj, grid, cell);
+ //Must already be set before AddToMap. Usually during obj->Create.
//obj->SetMap(this);
obj->AddToWorld();
+ InitializeObject(obj);
+
if (obj->isActiveObject())
AddToActive(obj);
- sLog->outStaticDebug("Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
-
//something, such as vehicle, needs to be update immediately
//also, trigger needs to cast spell, if not update, cannot see visual
obj->UpdateObjectVisibility(true);
}
-bool Map::loaded(const GridPair &p) const
+bool Map::IsGridLoaded(const GridCoord &p) const
{
return (getNGrid(p.x_coord, p.y_coord) && isGridObjectDataLoaded(p.x_coord, p.y_coord));
}
void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::ObjectUpdater, GridTypeMapContainer> &gridVisitor, TypeContainerVisitor<Trinity::ObjectUpdater, WorldTypeMapContainer> &worldVisitor)
{
- CellPair standing_cell(Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()));
-
- // Check for correctness of standing_cell, it also avoids problems with update_cell
- if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
+ // Check for valid position
+ if (!obj->IsPositionValid())
return;
- // the overloaded operators handle range checking
- // so there's no need for range checking inside the loop
- CellPair begin_cell(standing_cell), end_cell(standing_cell);
- //lets update mobs/objects in ALL visible cells around object!
- CellArea area = Cell::CalculateCellArea(*obj, obj->GetGridActivationRange());
- area.ResizeBorders(begin_cell, end_cell);
+ // Update mobs/objects in ALL visible cells around object!
+ CellArea area = Cell::CalculateCellArea(obj->GetPositionX(), obj->GetPositionY(), obj->GetGridActivationRange());
- for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
+ for (uint32 x = area.low_bound.x_coord; x <= area.high_bound.x_coord; ++x)
{
- for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
+ for (uint32 y = area.low_bound.y_coord; y <= area.high_bound.y_coord; ++y)
{
// marked cells are those that have been visited
// don't visit the same cell twice
@@ -505,11 +479,10 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::Obj
continue;
markCell(cell_id);
- CellPair pair(x, y);
+ CellCoord pair(x, y);
Cell cell(pair);
- cell.data.Part.reserved = CENTER_DISTRICT;
- cell.Visit(pair, gridVisitor, *this);
- cell.Visit(pair, worldVisitor, *this);
+ Visit(cell, gridVisitor);
+ Visit(cell, worldVisitor);
}
}
}
@@ -519,11 +492,11 @@ void Map::Update(const uint32 t_diff)
/// update worldsessions for existing players
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
- Player* plr = m_mapRefIter->getSource();
- if (plr && plr->IsInWorld())
+ Player* player = m_mapRefIter->getSource();
+ if (player && player->IsInWorld())
{
- //plr->Update(t_diff);
- WorldSession* pSession = plr->GetSession();
+ //player->Update(t_diff);
+ WorldSession* pSession = player->GetSession();
MapSessionFilter updater(pSession);
pSession->Update(t_diff, updater);
}
@@ -541,15 +514,15 @@ void Map::Update(const uint32 t_diff)
// to make sure calls to Map::Remove don't invalidate it
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
- Player* plr = m_mapRefIter->getSource();
+ Player* player = m_mapRefIter->getSource();
- if (!plr || !plr->IsInWorld())
+ if (!player || !player->IsInWorld())
continue;
// update players at tick
- plr->Update(t_diff);
+ player->Update(t_diff);
- VisitNearbyCellsOf(plr, grid_object_update, world_object_update);
+ VisitNearbyCellsOf(player, grid_object_update, world_object_update);
}
// non-player active objects, increasing iterator in the loop in case of object removal
@@ -607,8 +580,8 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
uint32 gx = grid->getX(), gy = grid->getY();
- CellPair cell_min(gx*MAX_NUMBER_OF_CELLS, gy*MAX_NUMBER_OF_CELLS);
- CellPair cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
+ CellCoord cell_min(gx*MAX_NUMBER_OF_CELLS, gy*MAX_NUMBER_OF_CELLS);
+ CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
for (uint32 x = cell_min.x_coord; x < cell_max.x_coord; ++x)
{
@@ -618,7 +591,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
if (!isCellMarked(cell_id))
continue;
- CellPair pair(x, y);
+ CellCoord pair(x, y);
Cell cell(pair);
cell.SetNoCreate();
@@ -648,8 +621,8 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
uint32 gx = grid->getX(), gy = grid->getY();
- CellPair cell_min(gx*MAX_NUMBER_OF_CELLS, gy*MAX_NUMBER_OF_CELLS);
- CellPair cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
+ CellCoord cell_min(gx*MAX_NUMBER_OF_CELLS, gy*MAX_NUMBER_OF_CELLS);
+ CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
for (uint32 x = cell_min.x_coord; x < cell_max.x_coord; ++x)
{
@@ -659,7 +632,7 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
if (!isCellMarked(cell_id))
continue;
- CellPair pair(x, y);
+ CellCoord pair(x, y);
Cell cell(pair);
cell.SetNoCreate();
Visit(cell, grid_notifier);
@@ -669,29 +642,16 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
}
}
-void Map::Remove(Player* player, bool remove)
+void Map::RemovePlayerFromMap(Player* player, bool remove)
{
player->RemoveFromWorld();
SendRemoveTransports(player);
- CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
- if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
- sLog->outCrash("Map::Remove: Player is in invalid cell!");
+ player->UpdateObjectVisibility(true);
+ if (player->IsInGrid())
+ player->RemoveFromGrid();
else
- {
- Cell cell(p);
- if (!getNGrid(cell.data.Part.grid_x, cell.data.Part.grid_y))
- sLog->outError("Map::Remove() i_grids was NULL x:%d, y:%d", cell.data.Part.grid_x, cell.data.Part.grid_y);
- else
- {
- sLog->outStaticDebug("Remove player %s from grid[%u, %u]", player->GetName(), cell.GridX(), cell.GridY());
- NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
- ASSERT(grid != NULL);
-
- player->UpdateObjectVisibility(true);
- RemoveFromGrid(player, grid, cell);
- }
- }
+ ASSERT(remove); //maybe deleted in logoutplayer when player is not in a map
if (remove)
DeleteFromWorld(player);
@@ -701,28 +661,14 @@ void Map::Remove(Player* player, bool remove)
template<class T>
void
-Map::Remove(T *obj, bool remove)
+Map::RemoveFromMap(T *obj, bool remove)
{
obj->RemoveFromWorld();
if (obj->isActiveObject())
RemoveFromActive(obj);
- CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
- if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
- sLog->outError("Map::Remove: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
- else
- {
- Cell cell(p);
- if (loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)))
- {
- sLog->outStaticDebug("Remove object " UI64FMTD " from grid[%u, %u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
- NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
- ASSERT(grid != NULL);
-
- obj->UpdateObjectVisibility(true);
- RemoveFromGrid(obj, grid, cell);
- }
- }
+ obj->UpdateObjectVisibility(true);
+ obj->RemoveFromGrid();
obj->ResetMap();
@@ -740,11 +686,8 @@ Map::PlayerRelocation(Player* player, float x, float y, float z, float orientati
{
ASSERT(player);
- CellPair old_val = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
- CellPair new_val = Trinity::ComputeCellPair(x, y);
-
- Cell old_cell(old_val);
- Cell new_cell(new_val);
+ Cell old_cell(player->GetPositionX(), player->GetPositionY());
+ Cell new_cell(x, y);
player->Relocate(x, y, z, orientation);
@@ -752,14 +695,12 @@ Map::PlayerRelocation(Player* player, float x, float y, float z, float orientati
{
sLog->outStaticDebug("Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
- NGridType* oldGrid = getNGrid(old_cell.GridX(), old_cell.GridY());
- RemoveFromGrid(player, oldGrid, old_cell);
+ player->RemoveFromGrid();
if (old_cell.DiffGrid(new_cell))
- EnsureGridLoadedAtEnter(new_cell, player);
+ EnsureGridLoadedForActiveObject(new_cell, player);
- NGridType* newGrid = getNGrid(new_cell.GridX(), new_cell.GridY());
- AddToGrid(player, newGrid, new_cell);
+ AddToGrid(player, new_cell);
}
player->UpdateObjectVisibility(false);
@@ -771,9 +712,7 @@ Map::CreatureRelocation(Creature* creature, float x, float y, float z, float ang
ASSERT(CheckGridIntegrity(creature, false));
Cell old_cell = creature->GetCurrentCell();
-
- CellPair new_val = Trinity::ComputeCellPair(x, y);
- Cell new_cell(new_val);
+ Cell new_cell(x, y);
if (!respawnRelocationOnFail && !getNGrid(new_cell.GridX(), new_cell.GridY()))
return;
@@ -791,6 +730,7 @@ Map::CreatureRelocation(Creature* creature, float x, float y, float z, float ang
{
creature->Relocate(x, y, z, ang);
creature->UpdateObjectVisibility(false);
+ RemoveCreatureFromMoveList(creature);
}
ASSERT(CheckGridIntegrity(creature, true));
@@ -798,34 +738,55 @@ Map::CreatureRelocation(Creature* creature, float x, float y, float z, float ang
void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang)
{
- if (!c)
+ if (_creatureToMoveLock) //can this happen?
return;
- i_creaturesToMove[c] = CreatureMover(x, y, z, ang);
+ if (c->_moveState == CREATURE_CELL_MOVE_NONE)
+ _creaturesToMove.push_back(c);
+ c->SetNewCellPosition(x, y, z, ang);
+}
+
+void Map::RemoveCreatureFromMoveList(Creature* c)
+{
+ if (_creatureToMoveLock) //can this happen?
+ return;
+
+ if (c->_moveState == CREATURE_CELL_MOVE_ACTIVE)
+ c->_moveState = CREATURE_CELL_MOVE_INACTIVE;
}
void Map::MoveAllCreaturesInMoveList()
{
- while (!i_creaturesToMove.empty())
+ _creatureToMoveLock = true;
+ for(std::vector<Creature*>::iterator itr = _creaturesToMove.begin(); itr != _creaturesToMove.end(); ++itr)
{
- // get data and remove element;
- CreatureMoveList::iterator iter = i_creaturesToMove.begin();
- Creature* c = iter->first;
- const CreatureMover &cm = iter->second;
+ Creature* c = *itr;
+ if(c->FindMap() != this) //pet is teleported to another map
+ continue;
+
+ if(c->_moveState != CREATURE_CELL_MOVE_ACTIVE)
+ {
+ c->_moveState = CREATURE_CELL_MOVE_NONE;
+ continue;
+ }
+
+ c->_moveState = CREATURE_CELL_MOVE_NONE;
+ if(!c->IsInWorld())
+ continue;
// do move or do move to respawn or remove creature if previous all fail
- if (CreatureCellRelocation(c, Cell(Trinity::ComputeCellPair(cm.x, cm.y))))
+ if (CreatureCellRelocation(c, Cell(c->_newPosition.m_positionX, c->_newPosition.m_positionY)))
{
// update pos
- c->Relocate(cm.x, cm.y, cm.z, cm.ang);
- //CreatureRelocationNotify(c, new_cell, new_cell.cellPair());
+ c->Relocate(c->_newPosition);
+ //CreatureRelocationNotify(c, new_cell, new_cell.cellCoord());
c->UpdateObjectVisibility(false);
}
else
{
// if creature can't be move in new cell/grid (not loaded) move it to repawn cell/grid
// creature coordinates will be updated and notifiers send
- if (!CreatureRespawnRelocation(c))
+ if (!CreatureRespawnRelocation(c, false))
{
// ... or unload (if respawn grid also not loaded)
#ifdef TRINITY_DEBUG
@@ -843,9 +804,9 @@ void Map::MoveAllCreaturesInMoveList()
AddObjectToRemoveList(c);
}
}
-
- i_creaturesToMove.erase(iter);
}
+ _creaturesToMove.clear();
+ _creatureToMoveLock = false;
}
bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
@@ -860,8 +821,8 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY());
#endif
- RemoveFromGrid(c, getNGrid(old_cell.GridX(), old_cell.GridY()), old_cell);
- AddToGrid(c, getNGrid(new_cell.GridX(), new_cell.GridY()), new_cell);
+ c->RemoveFromGrid();
+ AddToGrid(c, new_cell);
}
else
{
@@ -876,28 +837,28 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
// in diff. grids but active creature
if (c->isActiveObject())
{
- EnsureGridLoadedAtEnter(new_cell);
+ EnsureGridLoadedForActiveObject(new_cell, c);
#ifdef TRINITY_DEBUG
sLog->outDebug(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
- RemoveFromGrid(c, getNGrid(old_cell.GridX(), old_cell.GridY()), old_cell);
- AddToGrid(c, getNGrid(new_cell.GridX(), new_cell.GridY()), new_cell);
+ c->RemoveFromGrid();
+ AddToGrid(c, new_cell);
return true;
}
// in diff. loaded grid normal creature
- if (loaded(GridPair(new_cell.GridX(), new_cell.GridY())))
+ if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY())))
{
#ifdef TRINITY_DEBUG
sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
- RemoveFromGrid(c, getNGrid(old_cell.GridX(), old_cell.GridY()), old_cell);
- EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
- AddToGrid(c, getNGrid(new_cell.GridX(), new_cell.GridY()), new_cell);
+ c->RemoveFromGrid();
+ EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY()));
+ AddToGrid(c, new_cell);
return true;
}
@@ -909,13 +870,15 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
return false;
}
-bool Map::CreatureRespawnRelocation(Creature* c)
+bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly)
{
float resp_x, resp_y, resp_z, resp_o;
- c->GetRespawnCoord(resp_x, resp_y, resp_z, &resp_o);
+ c->GetRespawnPosition(resp_x, resp_y, resp_z, &resp_o);
+ Cell resp_cell(resp_x, resp_y);
- CellPair resp_val = Trinity::ComputeCellPair(resp_x, resp_y);
- Cell resp_cell(resp_val);
+ //creature will be unloaded with grid
+ if (diffGridOnly && !c->GetCurrentCell().DiffGrid(resp_cell))
+ return true;
c->CombatStop();
c->GetMotionMaster()->Clear();
@@ -929,7 +892,7 @@ bool Map::CreatureRespawnRelocation(Creature* c)
{
c->Relocate(resp_x, resp_y, resp_z, resp_o);
c->GetMotionMaster()->Initialize(); // prevent possible problems with default move generators
- //CreatureRelocationNotify(c, resp_cell, resp_cell.cellPair());
+ //CreatureRelocationNotify(c, resp_cell, resp_cell.GetCellCoord());
c->UpdateObjectVisibility(false);
return true;
}
@@ -937,19 +900,17 @@ bool Map::CreatureRespawnRelocation(Creature* c)
return false;
}
-bool Map::UnloadGrid(const uint32 x, const uint32 y, bool unloadAll)
+bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll)
{
- NGridType *grid = getNGrid(x, y);
- ASSERT(grid != NULL);
+ const uint32 x = ngrid.getX();
+ const uint32 y = ngrid.getY();
{
- if (!unloadAll && ActiveObjectsNearGrid(x, y))
+ if (!unloadAll && ActiveObjectsNearGrid(ngrid))
return false;
sLog->outDebug(LOG_FILTER_MAPS, "Unloading grid[%u, %u] for map %u", x, y, GetId());
- ObjectGridUnloader unloader(*grid);
-
if (!unloadAll)
{
// Finish creature moves, remove and delete all creatures with delayed remove before moving to respawn grids
@@ -957,22 +918,31 @@ bool Map::UnloadGrid(const uint32 x, const uint32 y, bool unloadAll)
MoveAllCreaturesInMoveList();
// move creatures to respawn grids if this is diff.grid or to remove list
- unloader.MoveToRespawnN();
+ ObjectGridEvacuator worker;
+ TypeContainerVisitor<ObjectGridEvacuator, GridTypeMapContainer> visitor(worker);
+ ngrid.VisitAllGrids(visitor);
// Finish creature moves, remove and delete all creatures with delayed remove before unload
MoveAllCreaturesInMoveList();
}
- ObjectGridCleaner cleaner(*grid);
- cleaner.CleanN();
+ {
+ ObjectGridCleaner worker;
+ TypeContainerVisitor<ObjectGridCleaner, GridTypeMapContainer> visitor(worker);
+ ngrid.VisitAllGrids(visitor);
+ }
RemoveAllObjectsInRemoveList();
- unloader.UnloadN();
+ {
+ ObjectGridUnloader worker;
+ TypeContainerVisitor<ObjectGridUnloader, GridTypeMapContainer> visitor(worker);
+ ngrid.VisitAllGrids(visitor);
+ }
ASSERT(i_objectsToRemove.empty());
- delete grid;
+ delete &ngrid;
setNGrid(NULL, x, y);
}
int gx = (MAX_NUMBER_OF_GRIDS - 1) - x;
@@ -992,7 +962,7 @@ bool Map::UnloadGrid(const uint32 x, const uint32 y, bool unloadAll)
VMAP::VMapFactory::createOrGetVMapManager()->unloadMap(GetId(), gx, gy);
}
else
- ((MapInstanced*)m_parentMap)->RemoveGridMapReference(GridPair(gx, gy));
+ ((MapInstanced*)m_parentMap)->RemoveGridMapReference(GridCoord(gx, gy));
GridMaps[gx][gy] = NULL;
}
@@ -1006,12 +976,12 @@ void Map::RemoveAllPlayers()
{
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
- Player* plr = itr->getSource();
- if (!plr->IsBeingTeleportedFar())
+ Player* player = itr->getSource();
+ if (!player->IsBeingTeleportedFar())
{
// this is happening for bg
- sLog->outError("Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", plr->GetName(), GetId());
- plr->TeleportTo(plr->m_homebindMapId, plr->m_homebindX, plr->m_homebindY, plr->m_homebindZ, plr->GetOrientation());
+ sLog->outError("Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName(), GetId());
+ player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
}
}
}
@@ -1020,13 +990,13 @@ void Map::RemoveAllPlayers()
void Map::UnloadAll()
{
// clear all delayed moves, useless anyway do this moves before map unload.
- i_creaturesToMove.clear();
+ _creaturesToMove.clear();
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();)
{
NGridType &grid(*i->getSource());
++i;
- UnloadGrid(grid.getX(), grid.getY(), true); // deletes the grid and removes it from the GridRefManager
+ UnloadGrid(grid, true); // deletes the grid and removes it from the GridRefManager
}
}
@@ -1551,7 +1521,7 @@ inline GridMap* Map::GetGrid(float x, float y)
int gy=(int)(32-y/SIZE_OF_GRIDS); //grid y
// ensure GridMap is loaded
- EnsureGridCreated(GridPair(63-gx, 63-gy));
+ EnsureGridCreated(GridCoord(63-gx, 63-gy));
return GridMaps[gx][gy];
}
@@ -1820,7 +1790,7 @@ bool Map::IsInWater(float x, float y, float pZ, LiquidData* data) const
LiquidData liquid_status;
LiquidData* liquid_ptr = data ? data : &liquid_status;
if (getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, liquid_ptr))
- return true;
+ return true;
}
return false;
}
@@ -1838,9 +1808,7 @@ bool Map::IsUnderWater(float x, float y, float z) const
bool Map::CheckGridIntegrity(Creature* c, bool moved) const
{
Cell const& cur_cell = c->GetCurrentCell();
-
- CellPair xy_val = Trinity::ComputeCellPair(c->GetPositionX(), c->GetPositionY());
- Cell xy_cell(xy_val);
+ Cell xy_cell(c->GetPositionX(), c->GetPositionY());
if (xy_cell != cur_cell)
{
sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u, %u]cell[%u, %u] instead of grid[%u, %u]cell[%u, %u]",
@@ -1859,20 +1827,18 @@ const char* Map::GetMapName() const
return i_mapEntry ? i_mapEntry->name[sWorld->GetDefaultDbcLocale()] : "UNNAMEDMAP\x0";
}
-void Map::UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair)
+void Map::UpdateObjectVisibility(WorldObject* obj, Cell cell, CellCoord cellpair)
{
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::VisibleChangesNotifier notifier(*obj);
TypeContainerVisitor<Trinity::VisibleChangesNotifier, WorldTypeMapContainer > player_notifier(notifier);
cell.Visit(cellpair, player_notifier, *this, *obj, obj->GetVisibilityRange());
}
-void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpair)
+void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpair)
{
Trinity::VisibleNotifier notifier(*player);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
TypeContainerVisitor<Trinity::VisibleNotifier, WorldTypeMapContainer > world_notifier(notifier);
TypeContainerVisitor<Trinity::VisibleNotifier, GridTypeMapContainer > grid_notifier(notifier);
@@ -1989,7 +1955,7 @@ void Map::DelayedUpdate(const uint32 t_diff)
GridInfo* info = i->getSource()->getGridInfoRef();
++i; // The update might delete the map and we need the next map before the iterator gets invalid
ASSERT(grid->GetGridState() >= 0 && grid->GetGridState() < MAX_GRID_STATE);
- si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, grid->getX(), grid->getY(), t_diff);
+ si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, t_diff);
}
}
}
@@ -2051,20 +2017,20 @@ void Map::RemoveAllObjectsInRemoveList()
if (!corpse)
sLog->outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
else
- Remove(corpse, true);
+ RemoveFromMap(corpse, true);
break;
}
case TYPEID_DYNAMICOBJECT:
- Remove((DynamicObject*)obj, true);
+ RemoveFromMap((DynamicObject*)obj, true);
break;
case TYPEID_GAMEOBJECT:
- Remove((GameObject*)obj, true);
+ RemoveFromMap((GameObject*)obj, true);
break;
case TYPEID_UNIT:
// in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call
// make sure that like sources auras/etc removed before destructor start
obj->ToCreature()->CleanupsBeforeDelete();
- Remove(obj->ToCreature(), true);
+ RemoveFromMap(obj->ToCreature(), true);
break;
default:
sLog->outError("Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
@@ -2092,28 +2058,25 @@ void Map::SendToPlayers(WorldPacket const* data) const
itr->getSource()->GetSession()->SendPacket(data);
}
-bool Map::ActiveObjectsNearGrid(uint32 x, uint32 y) const
+bool Map::ActiveObjectsNearGrid(NGridType const& ngrid) const
{
- ASSERT(x < MAX_NUMBER_OF_GRIDS);
- ASSERT(y < MAX_NUMBER_OF_GRIDS);
-
- CellPair cell_min(x*MAX_NUMBER_OF_CELLS, y*MAX_NUMBER_OF_CELLS);
- CellPair cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
+ CellCoord cell_min(ngrid.getX() * MAX_NUMBER_OF_CELLS, ngrid.getY() * MAX_NUMBER_OF_CELLS);
+ CellCoord cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
//we must find visible range in cells so we unload only non-visible cells...
float viewDist = GetVisibilityRange();
int cell_range = (int)ceilf(viewDist / SIZE_OF_GRID_CELL) + 1;
- cell_min << cell_range;
- cell_min -= cell_range;
- cell_max >> cell_range;
- cell_max += cell_range;
+ cell_min.dec_x(cell_range);
+ cell_min.dec_y(cell_range);
+ cell_max.inc_x(cell_range);
+ cell_max.inc_y(cell_range);
for (MapRefManager::const_iterator iter = m_mapRefManager.begin(); iter != m_mapRefManager.end(); ++iter)
{
- Player* plr = iter->getSource();
+ Player* player = iter->getSource();
- CellPair p = Trinity::ComputeCellPair(plr->GetPositionX(), plr->GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) &&
(cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord))
return true;
@@ -2123,7 +2086,7 @@ bool Map::ActiveObjectsNearGrid(uint32 x, uint32 y) const
{
WorldObject* obj = *iter;
- CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if ((cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) &&
(cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord))
return true;
@@ -2140,13 +2103,13 @@ void Map::AddToActive(Creature* c)
if (!c->isPet() && c->GetDBTableGUIDLow())
{
float x, y, z;
- c->GetRespawnCoord(x, y, z);
- GridPair p = Trinity::ComputeGridPair(x, y);
+ c->GetRespawnPosition(x, y, z);
+ GridCoord p = Trinity::ComputeGridCoord(x, y);
if (getNGrid(p.x_coord, p.y_coord))
getNGrid(p.x_coord, p.y_coord)->incUnloadActiveLock();
else
{
- GridPair p2 = Trinity::ComputeGridPair(c->GetPositionX(), c->GetPositionY());
+ GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY());
sLog->outError("Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord);
}
@@ -2161,28 +2124,28 @@ void Map::RemoveFromActive(Creature* c)
if (!c->isPet() && c->GetDBTableGUIDLow())
{
float x, y, z;
- c->GetRespawnCoord(x, y, z);
- GridPair p = Trinity::ComputeGridPair(x, y);
+ c->GetRespawnPosition(x, y, z);
+ GridCoord p = Trinity::ComputeGridCoord(x, y);
if (getNGrid(p.x_coord, p.y_coord))
getNGrid(p.x_coord, p.y_coord)->decUnloadActiveLock();
else
{
- GridPair p2 = Trinity::ComputeGridPair(c->GetPositionX(), c->GetPositionY());
+ GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY());
sLog->outError("Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord);
}
}
}
-template void Map::Add(Corpse*);
-template void Map::Add(Creature*);
-template void Map::Add(GameObject*);
-template void Map::Add(DynamicObject*);
+template void Map::AddToMap(Corpse*);
+template void Map::AddToMap(Creature*);
+template void Map::AddToMap(GameObject*);
+template void Map::AddToMap(DynamicObject*);
-template void Map::Remove(Corpse*, bool);
-template void Map::Remove(Creature*, bool);
-template void Map::Remove(GameObject*, bool);
-template void Map::Remove(DynamicObject*, bool);
+template void Map::RemoveFromMap(Corpse*, bool);
+template void Map::RemoveFromMap(Creature*, bool);
+template void Map::RemoveFromMap(GameObject*, bool);
+template void Map::RemoveFromMap(DynamicObject*, bool);
/* ******* Dungeon Instance Maps ******* */
@@ -2277,14 +2240,14 @@ bool InstanceMap::CanEnter(Player* player)
/*
Do map specific checks and add the player to the map if successful.
*/
-bool InstanceMap::Add(Player* player)
+bool InstanceMap::AddPlayerToMap(Player* player)
{
// TODO: Not sure about checking player level: already done in HandleAreaTriggerOpcode
// GMs still can teleport player in instance.
// Is it needed?
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
// Check moved to void WorldSession::HandleMoveWorldportAckOpcode()
//if (!CanEnter(player))
//return false;
@@ -2387,7 +2350,7 @@ bool InstanceMap::Add(Player* player)
}
// this will acquire the same mutex so it cannot be in the previous block
- Map::Add(player);
+ Map::AddPlayerToMap(player);
if (i_data)
i_data->OnPlayerEnter(player);
@@ -2403,13 +2366,13 @@ void InstanceMap::Update(const uint32 t_diff)
i_data->Update(t_diff);
}
-void InstanceMap::Remove(Player* player, bool remove)
+void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
{
sLog->outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
//if last player set unload timer
if (!m_unloadTimer && m_mapRefManager.getSize() == 1)
m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
- Map::Remove(player, remove);
+ Map::RemovePlayerFromMap(player, remove);
// for normal instances schedule the reset after all players have left
SetResetSchedule(true);
}
@@ -2504,20 +2467,20 @@ void InstanceMap::PermBindAllPlayers(Player* player)
// group members outside the instance group don't get bound
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
- Player* plr = itr->getSource();
+ Player* player = itr->getSource();
// players inside an instance cannot be bound to other instances
// some players may already be permanently bound, in this case nothing happens
- InstancePlayerBind* bind = plr->GetBoundInstance(save->GetMapId(), save->GetDifficulty());
+ InstancePlayerBind* bind = player->GetBoundInstance(save->GetMapId(), save->GetDifficulty());
if (!bind || !bind->perm)
{
- plr->BindToInstance(save, true);
+ player->BindToInstance(save, true);
WorldPacket data(SMSG_INSTANCE_SAVE_CREATED, 4);
data << uint32(0);
- plr->GetSession()->SendPacket(&data);
+ player->GetSession()->SendPacket(&data);
}
// if the leader is not in the instance the group will not get a perm bind
- if (group && group->GetLeaderGUID() == plr->GetGUID())
+ if (group && group->GetLeaderGUID() == player->GetGUID())
group->BindToInstance(save, true);
}
}
@@ -2623,23 +2586,23 @@ bool BattlegroundMap::CanEnter(Player* player)
return Map::CanEnter(player);
}
-bool BattlegroundMap::Add(Player* player)
+bool BattlegroundMap::AddPlayerToMap(Player* player)
{
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
//Check moved to void WorldSession::HandleMoveWorldportAckOpcode()
//if (!CanEnter(player))
//return false;
// reset instance validity, battleground maps do not homebind
player->m_InstanceValid = true;
}
- return Map::Add(player);
+ return Map::AddPlayerToMap(player);
}
-void BattlegroundMap::Remove(Player* player, bool remove)
+void BattlegroundMap::RemovePlayerFromMap(Player* player, bool remove)
{
sLog->outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName());
- Map::Remove(player, remove);
+ Map::RemovePlayerFromMap(player, remove);
}
void BattlegroundMap::SetUnload()
@@ -2651,9 +2614,9 @@ void BattlegroundMap::RemoveAllPlayers()
{
if (HavePlayers())
for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
- if (Player* plr = itr->getSource())
- if (!plr->IsBeingTeleportedFar())
- plr->TeleportTo(plr->GetBattlegroundEntryPoint());
+ if (Player* player = itr->getSource())
+ if (!player->IsBeingTeleportedFar())
+ player->TeleportTo(player->GetBattlegroundEntryPoint());
}
Creature*
@@ -2678,4 +2641,4 @@ void Map::UpdateIteratorBack(Player* player)
{
if (m_mapRefIter == player->GetMapRef())
m_mapRefIter = m_mapRefIter->nocheck_prev();
-} \ No newline at end of file
+}
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index bbd3b20ecfb..58db314deaf 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -193,14 +193,6 @@ public:
ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0);
};
-struct CreatureMover
-{
- CreatureMover() : x(0.0f), y(0.0f), z(0.0f), ang(0.0f) {}
- CreatureMover(float _x, float _y, float _z, float _ang) : x(_x), y(_y), z(_z), ang(_ang) {}
-
- float x, y, z, ang;
-};
-
// 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__)
#pragma pack(1)
@@ -226,8 +218,6 @@ enum LevelRequirementVsMode
#pragma pack(pop)
#endif
-typedef UNORDERED_MAP<Creature*, CreatureMover> CreatureMoveList;
-
#define MAX_HEIGHT 100000.0f // can be use for find ground height at surface
#define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
#define MAX_FALL_DISTANCE 250000.0f // "unlimited fall" to find VMap ground if it is available, just larger than MAX_HEIGHT - INVALID_HEIGHT
@@ -254,10 +244,10 @@ class Map : public GridRefManager<NGridType>
return false;
}
- virtual bool Add(Player*);
- virtual void Remove(Player*, bool);
- template<class T> void Add(T *);
- template<class T> void Remove(T *, bool);
+ virtual bool AddPlayerToMap(Player*);
+ virtual void RemovePlayerFromMap(Player*, bool);
+ template<class T> void AddToMap(T *);
+ template<class T> void RemoveFromMap(T *, bool);
void VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::ObjectUpdater, GridTypeMapContainer> &gridVisitor, TypeContainerVisitor<Trinity::ObjectUpdater, WorldTypeMapContainer> &worldVisitor);
virtual void Update(const uint32);
@@ -273,20 +263,19 @@ class Map : public GridRefManager<NGridType>
bool IsRemovalGrid(float x, float y) const
{
- GridPair p = Trinity::ComputeGridPair(x, y);
+ GridCoord p = Trinity::ComputeGridCoord(x, y);
return !getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL;
}
- bool IsLoaded(float x, float y) const
+ bool IsGridLoaded(float x, float y) const
{
- GridPair p = Trinity::ComputeGridPair(x, y);
- return loaded(p);
+ return IsGridLoaded(Trinity::ComputeGridCoord(x, y));
}
- bool GetUnloadLock(const GridPair &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
- void SetUnloadLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
+ bool GetUnloadLock(const GridCoord &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
+ void SetUnloadLock(const GridCoord &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
void LoadGrid(float x, float y);
- bool UnloadGrid(const uint32 x, const uint32 y, bool pForce);
+ bool UnloadGrid(NGridType& ngrid, bool pForce);
virtual void UnloadAll();
void ResetGridExpiry(NGridType &grid, float factor = 1) const
@@ -344,7 +333,8 @@ class Map : public GridRefManager<NGridType>
void RemoveAllObjectsInRemoveList();
virtual void RemoveAllPlayers();
- bool CreatureRespawnRelocation(Creature* c); // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader
+ // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader
+ bool CreatureRespawnRelocation(Creature* c, bool diffGridOnly);
// assert print helper
bool CheckGridIntegrity(Creature* c, bool moved) const;
@@ -380,8 +370,8 @@ class Map : public GridRefManager<NGridType>
void AddObjectToSwitchList(WorldObject* obj, bool on);
virtual void DelayedUpdate(const uint32 diff);
- void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair);
- void UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpair);
+ void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellCoord cellpair);
+ void UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpair);
void resetMarkedCells() { marked_cells.reset(); }
bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); }
@@ -389,7 +379,7 @@ class Map : public GridRefManager<NGridType>
bool HavePlayers() const { return !m_mapRefManager.isEmpty(); }
uint32 GetPlayersCountExceptGMs() const;
- bool ActiveObjectsNearGrid(uint32 x, uint32 y) const;
+ bool ActiveObjectsNearGrid(NGridType const& ngrid) const;
void AddWorldObject(WorldObject* obj) { i_worldObjects.insert(obj); }
void RemoveWorldObject(WorldObject* obj) { i_worldObjects.erase(obj); }
@@ -429,8 +419,8 @@ class Map : public GridRefManager<NGridType>
GameObject* GetGameObject(uint64 guid);
DynamicObject* GetDynamicObject(uint64 guid);
- MapInstanced* ToMainstanced(){ if (Instanceable()) return reinterpret_cast<MapInstanced*>(this); else return NULL; }
- const MapInstanced* ToMainstanced() const { if (Instanceable()) return (const MapInstanced*)((MapInstanced*)this); else return NULL; }
+ MapInstanced* ToMapInstanced(){ if (Instanceable()) return reinterpret_cast<MapInstanced*>(this); else return NULL; }
+ const MapInstanced* ToMapInstanced() const { if (Instanceable()) return (const MapInstanced*)((MapInstanced*)this); else return NULL; }
InstanceMap* ToInstanceMap(){ if (IsDungeon()) return reinterpret_cast<InstanceMap*>(this); else return NULL; }
const InstanceMap* ToInstanceMap() const { if (IsDungeon()) return (const InstanceMap*)((InstanceMap*)this); else return NULL; }
@@ -449,13 +439,17 @@ class Map : public GridRefManager<NGridType>
bool CreatureCellRelocation(Creature* creature, Cell new_cell);
+ template<class T> void InitializeObject(T* obj);
void AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang);
- CreatureMoveList i_creaturesToMove;
+ void RemoveCreatureFromMoveList(Creature* c);
+
+ bool _creatureToMoveLock;
+ std::vector<Creature*> _creaturesToMove;
- bool loaded(const GridPair &) const;
- void EnsureGridCreated(const GridPair &);
+ bool IsGridLoaded(const GridCoord &) const;
+ void EnsureGridCreated(const GridCoord &);
bool EnsureGridLoaded(Cell const&);
- void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
+ void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object);
void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); }
@@ -464,8 +458,7 @@ class Map : public GridRefManager<NGridType>
NGridType* getNGrid(uint32 x, uint32 y) const
{
- ASSERT(x < MAX_NUMBER_OF_GRIDS);
- ASSERT(y < MAX_NUMBER_OF_GRIDS);
+ ASSERT(x < MAX_NUMBER_OF_GRIDS && y < MAX_NUMBER_OF_GRIDS);
return i_grids[x][y];
}
@@ -477,7 +470,7 @@ class Map : public GridRefManager<NGridType>
void UpdateActiveCells(const float &x, const float &y, const uint32 t_diff);
protected:
- void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
+ void SetUnloadReferenceLock(const GridCoord &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
ACE_Thread_Mutex Lock;
@@ -530,10 +523,7 @@ class Map : public GridRefManager<NGridType>
// Type specific code for add/remove to/from grid
template<class T>
- void AddToGrid(T*, NGridType *, Cell const&);
-
- template<class T>
- void RemoveFromGrid(T*, NGridType *, Cell const&);
+ void AddToGrid(T* object, Cell const& cell);
template<class T>
void DeleteFromWorld(T*);
@@ -577,8 +567,8 @@ class InstanceMap : public Map
public:
InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent);
~InstanceMap();
- bool Add(Player*);
- void Remove(Player*, bool);
+ bool AddPlayerToMap(Player*);
+ void RemovePlayerFromMap(Player*, bool);
void Update(const uint32);
void CreateInstanceData(bool load);
bool Reset(uint8 method);
@@ -607,8 +597,8 @@ class BattlegroundMap : public Map
BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode);
~BattlegroundMap();
- bool Add(Player*);
- void Remove(Player*, bool);
+ bool AddPlayerToMap(Player*);
+ void RemovePlayerFromMap(Player*, bool);
bool CanEnter(Player* player);
void SetUnload();
//void UnloadAll(bool pForce);
@@ -622,28 +612,25 @@ class BattlegroundMap : public Map
};
template<class T, class CONTAINER>
-inline void
-Map::Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor)
+inline void Map::Visit(Cell const& cell, TypeContainerVisitor<T, CONTAINER>& visitor)
{
const uint32 x = cell.GridX();
const uint32 y = cell.GridY();
const uint32 cell_x = cell.CellX();
const uint32 cell_y = cell.CellY();
- if (!cell.NoCreate() || loaded(GridPair(x, y)))
+ if (!cell.NoCreate() || IsGridLoaded(GridCoord(x, y)))
{
EnsureGridLoaded(cell);
- getNGrid(x, y)->Visit(cell_x, cell_y, visitor);
+ getNGrid(x, y)->VisitGrid(cell_x, cell_y, visitor);
}
}
template<class NOTIFIER>
-inline void
-Map::VisitAll(const float &x, const float &y, float radius, NOTIFIER &notifier)
+inline void Map::VisitAll(float const& x, float const& y, float radius, NOTIFIER& notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier);
@@ -654,12 +641,10 @@ Map::VisitAll(const float &x, const float &y, float radius, NOTIFIER &notifier)
// should be used with Searcher notifiers, tries to search world if nothing found in grid
template<class NOTIFIER>
-inline void
-Map::VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER &notifier)
+inline void Map::VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier);
@@ -672,12 +657,10 @@ Map::VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER &not
}
template<class NOTIFIER>
-inline void
-Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier)
+inline void Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier);
@@ -685,12 +668,10 @@ Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier
}
template<class NOTIFIER>
-inline void
-Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier)
+inline void Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier);
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 418218a52b3..bbade4c9dc3 100755
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -173,7 +173,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player* player)
InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty)
{
// load/create a map
- ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
// make sure we have a valid map id
const MapEntry* entry = sMapStore.LookupEntry(GetId());
@@ -207,7 +207,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
// load/create a map
- ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
sLog->outDebug(LOG_FILTER_MAPS, "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());
diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h
index 1913f0add51..af303ed0e9e 100755
--- a/src/server/game/Maps/MapInstanced.h
+++ b/src/server/game/Maps/MapInstanced.h
@@ -43,17 +43,17 @@ class MapInstanced : public Map
Map* FindMap(uint32 InstanceId) const { return _FindMap(InstanceId); }
bool DestroyInstance(InstancedMaps::iterator &itr);
- void AddGridMapReference(const GridPair &p)
+ void AddGridMapReference(const GridCoord &p)
{
++GridMapReference[p.x_coord][p.y_coord];
- SetUnloadReferenceLock(GridPair(63-p.x_coord, 63-p.y_coord), true);
+ SetUnloadReferenceLock(GridCoord(63-p.x_coord, 63-p.y_coord), true);
}
- void RemoveGridMapReference(GridPair const& p)
+ void RemoveGridMapReference(GridCoord const& p)
{
--GridMapReference[p.x_coord][p.y_coord];
if (!GridMapReference[p.x_coord][p.y_coord])
- SetUnloadReferenceLock(GridPair(63-p.x_coord, 63-p.y_coord), false);
+ SetUnloadReferenceLock(GridCoord(63-p.x_coord, 63-p.y_coord), false);
}
InstancedMaps &GetInstancedMaps() { return m_InstancedMaps; }
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 0b7abacad28..22eaa77cc94 100755
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -101,7 +101,7 @@ Map* MapManager::_createBaseMap(uint32 id)
if (m == NULL)
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
const MapEntry* entry = sMapStore.LookupEntry(id);
if (entry && entry->Instanceable())
@@ -248,7 +248,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
instaceIdToCheck = save->GetInstanceId();
// instanceId can never be 0 - will not be found
- if (!player->CheckInstanceCount(instaceIdToCheck))
+ if (!player->CheckInstanceCount(instaceIdToCheck) && !player->isDead())
{
player->SendTransferAborted(mapid, TRANSFER_ABORT_TOO_MANY_INSTANCES);
return false;
@@ -292,7 +292,7 @@ void MapManager::DoDelayedMovesAndRemoves()
bool MapManager::ExistMapAndVMap(uint32 mapid, float x, float y)
{
- GridPair p = Trinity::ComputeGridPair(x, y);
+ GridCoord p = Trinity::ComputeGridCoord(x, y);
int gx=63-p.x_coord;
int gy=63-p.y_coord;
@@ -335,7 +335,7 @@ void MapManager::UnloadAll()
uint32 MapManager::GetNumInstances()
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, 0);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
uint32 ret = 0;
for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
@@ -352,7 +352,7 @@ uint32 MapManager::GetNumInstances()
uint32 MapManager::GetNumPlayersInInstances()
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, 0);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
uint32 ret = 0;
for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp
index 7e6b2f03bd0..80025680753 100644
--- a/src/server/game/Maps/MapUpdater.cpp
+++ b/src/server/game/Maps/MapUpdater.cpp
@@ -81,7 +81,7 @@ int MapUpdater::deactivate()
int MapUpdater::wait()
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, m_mutex, -1);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
while (pending_requests > 0)
m_condition.wait();
@@ -91,7 +91,7 @@ int MapUpdater::wait()
int MapUpdater::schedule_update(Map& map, ACE_UINT32 diff)
{
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, m_mutex, -1);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
++pending_requests;
@@ -113,7 +113,7 @@ bool MapUpdater::activated()
void MapUpdater::update_finished()
{
- ACE_GUARD(ACE_Thread_Mutex, guard, m_mutex);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
if (pending_requests == 0)
{
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index f562010549b..cbcad520e5f 100755
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -156,7 +156,7 @@ namespace Trinity
return baseGain;
}
- inline uint32 Gain(Player* pl, Unit* u)
+ inline uint32 Gain(Player* player, Unit* u)
{
uint32 gain;
@@ -167,7 +167,7 @@ namespace Trinity
gain = 0;
else
{
- gain = BaseGain(pl->getLevel(), u->getLevel(), GetContentLevelsForMapAndZone(u->GetMapId(), u->GetZoneId()));
+ gain = BaseGain(player->getLevel(), u->getLevel(), GetContentLevelsForMapAndZone(u->GetMapId(), u->GetZoneId()));
if (gain != 0 && u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isElite())
{
@@ -181,7 +181,7 @@ namespace Trinity
gain = uint32(gain * sWorld->getRate(RATE_XP_KILL));
}
- sScriptMgr->OnGainCalculation(gain, pl, u);
+ sScriptMgr->OnGainCalculation(gain, player, u);
return gain;
}
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index fa18cd801a4..a99d0f37c02 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -53,6 +53,7 @@ enum Gender
// Race value is index in ChrRaces.dbc
enum Races
{
+ RACE_NONE = 0,
RACE_HUMAN = 1,
RACE_ORC = 2,
RACE_DWARF = 3,
@@ -408,7 +409,7 @@ enum SpellAttr3
enum SpellAttr4
{
SPELL_ATTR4_UNK0 = 0x00000001, // 0
- SPELL_ATTR4_UNK1 = 0x00000002, // 1 proc on finishing move?
+ SPELL_ATTR4_PROC_ONLY_ON_DUMMY = 0x00000002, // 1 proc only on SPELL_EFFECT_DUMMY?
SPELL_ATTR4_UNK2 = 0x00000004, // 2
SPELL_ATTR4_UNK3 = 0x00000008, // 3
SPELL_ATTR4_UNK4 = 0x00000010, // 4 This will no longer cause guards to attack on use??
@@ -2377,7 +2378,7 @@ enum QuestSort
QUEST_SORT_ROGUE = 162,
QUEST_SORT_ALCHEMY = 181,
QUEST_SORT_LEATHERWORKING = 182,
- QUEST_SORT_ENGINERING = 201,
+ QUEST_SORT_ENGINEERING = 201,
QUEST_SORT_TREASURE_MAP = 221,
QUEST_SORT_SUNKEN_TEMPLE_OLD = 241,
QUEST_SORT_HUNTER = 261,
@@ -2479,7 +2480,7 @@ enum SkillType
SKILL_PET_IMP = 188,
SKILL_PET_FELHUNTER = 189,
SKILL_TAILORING = 197,
- SKILL_ENGINERING = 202,
+ SKILL_ENGINEERING = 202,
SKILL_PET_SPIDER = 203,
SKILL_PET_VOIDWALKER = 204,
SKILL_PET_SUCCUBUS = 205,
@@ -2599,7 +2600,7 @@ inline uint32 SkillByQuestSort(int32 QuestSort)
case QUEST_SORT_BLACKSMITHING: return SKILL_BLACKSMITHING;
case QUEST_SORT_ALCHEMY: return SKILL_ALCHEMY;
case QUEST_SORT_LEATHERWORKING: return SKILL_LEATHERWORKING;
- case QUEST_SORT_ENGINERING: return SKILL_ENGINERING;
+ case QUEST_SORT_ENGINEERING: return SKILL_ENGINEERING;
case QUEST_SORT_TAILORING: return SKILL_TAILORING;
case QUEST_SORT_COOKING: return SKILL_COOKING;
case QUEST_SORT_FIRST_AID: return SKILL_FIRST_AID;
@@ -2815,7 +2816,8 @@ enum DiminishingGroup
DIMINISHING_SILENCE = 16,
DIMINISHING_SLEEP = 17,
DIMINISHING_TAUNT = 18,
- DIMINISHING_LIMITONLY = 19
+ DIMINISHING_LIMITONLY = 19,
+ DIMINISHING_DRAGONS_BREATH = 20,
};
enum SummonCategory
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
index 991b03c44e4..7c3b26c2646 100755
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
@@ -29,10 +29,9 @@
#endif
template<class T>
-void
-ConfusedMovementGenerator<T>::Initialize(T &unit)
+void ConfusedMovementGenerator<T>::Initialize(T &unit)
{
- const float wander_distance = 11;
+ float const wanderDistance = 4;
float x, y, z;
x = unit.GetPositionX();
y = unit.GetPositionY();
@@ -47,8 +46,8 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
for (uint8 idx = 0; idx <= MAX_CONF_WAYPOINTS; ++idx)
{
- float wanderX = x + wander_distance*(float)rand_norm() - wander_distance/2;
- float wanderY = y + wander_distance*(float)rand_norm() - wander_distance/2;
+ float wanderX = x + wanderDistance * (float)rand_norm() - wanderDistance/2;
+ float wanderY = y + wanderDistance * (float)rand_norm() - wanderDistance/2;
Trinity::NormalizeMapCoord(wanderX);
Trinity::NormalizeMapCoord(wanderY);
@@ -68,7 +67,7 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
}
// Taken from FleeingMovementGenerator
- if (!(new_z - z) || wander_distance / fabs(new_z - z) > 1.0f)
+ if (!(new_z - z) || wanderDistance / fabs(new_z - z) > 1.0f)
{
i_waypoints[idx][0] = wanderX;
i_waypoints[idx][1] = wanderY;
@@ -89,29 +88,26 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
unit.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
unit.CastStop();
unit.StopMoving();
- unit.RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
+ unit.AddUnitMovementFlag(MOVEMENTFLAG_WALKING); // Should actually be splineflag
unit.AddUnitState(UNIT_STAT_CONFUSED);
}
template<>
-void
-ConfusedMovementGenerator<Creature>::_InitSpecific(Creature &creature, bool &is_water_ok, bool &is_land_ok)
+void ConfusedMovementGenerator<Creature>::_InitSpecific(Creature &creature, bool &is_water_ok, bool &is_land_ok)
{
is_water_ok = creature.canSwim();
is_land_ok = creature.canWalk();
}
template<>
-void
-ConfusedMovementGenerator<Player>::_InitSpecific(Player &, bool &is_water_ok, bool &is_land_ok)
+void ConfusedMovementGenerator<Player>::_InitSpecific(Player &, bool &is_water_ok, bool &is_land_ok)
{
is_water_ok = true;
is_land_ok = true;
}
template<class T>
-void
-ConfusedMovementGenerator<T>::Reset(T &unit)
+void ConfusedMovementGenerator<T>::Reset(T &unit)
{
i_nextMove = 1;
i_nextMoveTime.Reset(0);
@@ -120,8 +116,7 @@ ConfusedMovementGenerator<T>::Reset(T &unit)
}
template<class T>
-bool
-ConfusedMovementGenerator<T>::Update(T &unit, const uint32 diff)
+bool ConfusedMovementGenerator<T>::Update(T &unit, const uint32 diff)
{
if (!&unit)
return true;
@@ -141,7 +136,7 @@ ConfusedMovementGenerator<T>::Update(T &unit, const uint32 diff)
unit.ClearUnitState(UNIT_STAT_MOVE);
i_nextMove = urand(1, MAX_CONF_WAYPOINTS);
- i_nextMoveTime.Reset(urand(0, 1500-1)); // TODO: check the minimum reset time, should be probably higher
+ i_nextMoveTime.Reset(urand(100, 1000));
}
}
}
@@ -164,11 +159,11 @@ ConfusedMovementGenerator<T>::Update(T &unit, const uint32 diff)
}
template<class T>
-void
-ConfusedMovementGenerator<T>::Finalize(T &unit)
+void ConfusedMovementGenerator<T>::Finalize(T &unit)
{
unit.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
unit.ClearUnitState(UNIT_STAT_CONFUSED);
+
if (unit.GetTypeId() == TYPEID_UNIT && unit.getVictim())
unit.SetTarget(unit.getVictim()->GetGUID());
}
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index 3d7a65a4ccc..6d5c803bea8 100755
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -58,6 +58,10 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 diff)
arrived = true;
return false;
}
+ else if (!unit.HasUnitState(UNIT_STAT_MOVE) && !unit.HasUnitState(UNIT_STAT_JUMPING))
+ {
+ i_destinationHolder.StartTravel(traveller);
+ }
return true;
}
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 4ad2f0638d0..808d8318ea9 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -206,7 +206,13 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 diff)
MovementInform(unit);
unit.UpdateWaypointID(i_currentNode);
unit.ClearUnitState(UNIT_STAT_ROAMING);
- unit.Relocate(node->x, node->y, node->z);
+ if (node->orientation)
+ {
+ unit.Relocate(node->x, node->y, node->z, node->orientation);
+ unit.SetFacing(node->orientation, NULL);
+ }
+ else
+ unit.Relocate(node->x, node->y, node->z);
}
}
else
@@ -266,7 +272,7 @@ void FlightPathMovementGenerator::Finalize(Player & player)
float y = 0;
float z = 0;
i_destinationHolder.GetLocationNow(player.GetBaseMap(), x, y, z);
- player.SetPosition(x, y, z, player.GetOrientation());
+ player.UpdatePosition(x, y, z, player.GetOrientation());
}
diff --git a/src/server/game/Movement/Traveller.h b/src/server/game/Movement/Traveller.h
index 27700eb61c4..9cd6a6cda17 100755
--- a/src/server/game/Movement/Traveller.h
+++ b/src/server/game/Movement/Traveller.h
@@ -85,7 +85,7 @@ inline float Traveller<Creature>::Speed()
template<>
inline void Traveller<Creature>::Relocation(float x, float y, float z, float orientation)
{
- i_traveller.SetPosition(x, y, z, orientation);
+ i_traveller.UpdatePosition(x, y, z, orientation);
}
template<>
@@ -136,7 +136,7 @@ inline float Traveller<Player>::GetMoveDestinationTo(float x, float y, float z)
template<>
inline void Traveller<Player>::Relocation(float x, float y, float z, float orientation)
{
- i_traveller.SetPosition(x, y, z, orientation);
+ i_traveller.UpdatePosition(x, y, z, orientation);
}
template<>
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp
index 0ce2a097422..2859fb9227b 100755
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
@@ -43,7 +43,7 @@ void WaypointMgr::Load()
{
uint32 oldMSTime = getMSTime();
- QueryResult result = WorldDatabase.Query("SELECT id, point, position_x, position_y, position_z, move_flag, delay, action, action_chance FROM waypoint_data ORDER BY id, point");
+ QueryResult result = WorldDatabase.Query("SELECT id, point, position_x, position_y, position_z, orientation, move_flag, delay, action, action_chance FROM waypoint_data ORDER BY id, point");
if (!result)
{
@@ -65,6 +65,7 @@ void WaypointMgr::Load()
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
float z = fields[4].GetFloat();
+ float o = fields[5].GetFloat();
Trinity::NormalizeMapCoord(x);
Trinity::NormalizeMapCoord(y);
@@ -73,10 +74,11 @@ void WaypointMgr::Load()
wp->x = x;
wp->y = y;
wp->z = z;
- wp->run = fields[5].GetBool();
- wp->delay = fields[6].GetUInt32();
- wp->event_id = fields[7].GetUInt32();
- wp->event_chance = fields[8].GetUInt8();
+ wp->orientation = o;
+ wp->run = fields[6].GetBool();
+ wp->delay = fields[7].GetUInt32();
+ wp->event_id = fields[8].GetUInt32();
+ wp->event_chance = fields[9].GetUInt8();
path.push_back(wp);
++count;
@@ -98,7 +100,7 @@ void WaypointMgr::ReloadPath(uint32 id)
_waypointStore.erase(itr);
}
- QueryResult result = WorldDatabase.PQuery("SELECT point, position_x, position_y, position_z, move_flag, delay, action, action_chance FROM waypoint_data WHERE id = %u ORDER BY point", id);
+ QueryResult result = WorldDatabase.PQuery("SELECT point, position_x, position_y, position_z, orientation, move_flag, delay, action, action_chance FROM waypoint_data WHERE id = %u ORDER BY point", id);
if (!result)
return;
@@ -112,6 +114,7 @@ void WaypointMgr::ReloadPath(uint32 id)
float x = fields[1].GetFloat();
float y = fields[2].GetFloat();
float z = fields[3].GetFloat();
+ float o = fields[4].GetFloat();
Trinity::NormalizeMapCoord(x);
Trinity::NormalizeMapCoord(y);
@@ -120,10 +123,11 @@ void WaypointMgr::ReloadPath(uint32 id)
wp->x = x;
wp->y = y;
wp->z = z;
- wp->run = fields[4].GetBool();
- wp->delay = fields[5].GetUInt32();
- wp->event_id = fields[6].GetUInt32();
- wp->event_chance = fields[7].GetUInt8();
+ wp->orientation = o;
+ wp->run = fields[5].GetBool();
+ wp->delay = fields[6].GetUInt32();
+ wp->event_id = fields[7].GetUInt32();
+ wp->event_chance = fields[8].GetUInt8();
path.push_back(wp);
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h
index 4b374984232..be4a0c8f9bf 100755
--- a/src/server/game/Movement/Waypoints/WaypointManager.h
+++ b/src/server/game/Movement/Waypoints/WaypointManager.h
@@ -26,7 +26,7 @@
struct WaypointData
{
uint32 id;
- float x, y, z;
+ float x, y, z, orientation;
bool run;
uint32 delay;
uint32 event_id;
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index b925150ef71..d641971faa0 100755
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -36,22 +36,22 @@ m_State(OBJECTIVESTATE_NEUTRAL), m_neutralValuePct(0), m_PvP(pvp)
{
}
-bool OPvPCapturePoint::HandlePlayerEnter(Player* plr)
+bool OPvPCapturePoint::HandlePlayerEnter(Player* player)
{
if (m_capturePoint)
{
- plr->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
- plr->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32)ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
- plr->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
+ player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
+ player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32)ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
+ player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
}
- return m_activePlayers[plr->GetTeamId()].insert(plr).second;
+ return m_activePlayers[player->GetTeamId()].insert(player).second;
}
-void OPvPCapturePoint::HandlePlayerLeave(Player* plr)
+void OPvPCapturePoint::HandlePlayerLeave(Player* player)
{
if (m_capturePoint)
- plr->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 0);
- m_activePlayers[plr->GetTeamId()].erase(plr);
+ player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 0);
+ m_activePlayers[player->GetTeamId()].erase(player);
}
void OPvPCapturePoint::SendChangePhase()
@@ -239,24 +239,24 @@ OutdoorPvP::~OutdoorPvP()
DeleteSpawns();
}
-void OutdoorPvP::HandlePlayerEnterZone(Player* plr, uint32 /*zone*/)
+void OutdoorPvP::HandlePlayerEnterZone(Player* player, uint32 /*zone*/)
{
- m_players[plr->GetTeamId()].insert(plr);
+ m_players[player->GetTeamId()].insert(player);
}
-void OutdoorPvP::HandlePlayerLeaveZone(Player* plr, uint32 /*zone*/)
+void OutdoorPvP::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/)
{
// inform the objectives of the leaving
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- itr->second->HandlePlayerLeave(plr);
+ itr->second->HandlePlayerLeave(player);
// remove the world state information from the player (we can't keep everyone up to date, so leave out those who are not in the concerning zones)
- if (!plr->GetSession()->PlayerLogout())
- SendRemoveWorldStates(plr);
- m_players[plr->GetTeamId()].erase(plr);
- sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %s left an outdoorpvp zone", plr->GetName());
+ if (!player->GetSession()->PlayerLogout())
+ SendRemoveWorldStates(player);
+ m_players[player->GetTeamId()].erase(player);
+ sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %s left an outdoorpvp zone", player->GetName());
}
-void OutdoorPvP::HandlePlayerResurrects(Player* /*plr*/, uint32 /*zone*/)
+void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/)
{
}
@@ -463,88 +463,88 @@ void OutdoorPvP::HandleKill(Player* killer, Unit* killed)
}
}
-bool OutdoorPvP::IsInsideObjective(Player* plr) const
+bool OutdoorPvP::IsInsideObjective(Player* player) const
{
for (OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if (itr->second->IsInsideObjective(plr))
+ if (itr->second->IsInsideObjective(player))
return true;
return false;
}
-bool OPvPCapturePoint::IsInsideObjective(Player* plr) const
+bool OPvPCapturePoint::IsInsideObjective(Player* player) const
{
- return m_activePlayers[plr->GetTeamId()].find(plr) != m_activePlayers[plr->GetTeamId()].end();
+ return m_activePlayers[player->GetTeamId()].find(player) != m_activePlayers[player->GetTeamId()].end();
}
-bool OutdoorPvP::HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go)
+bool OutdoorPvP::HandleCustomSpell(Player* player, uint32 spellId, GameObject* go)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if (itr->second->HandleCustomSpell(plr, spellId, go))
+ if (itr->second->HandleCustomSpell(player, spellId, go))
return true;
return false;
}
-bool OPvPCapturePoint::HandleCustomSpell(Player* plr, uint32 /*spellId*/, GameObject* /*go*/)
+bool OPvPCapturePoint::HandleCustomSpell(Player* player, uint32 /*spellId*/, GameObject* /*go*/)
{
- if (!plr->IsOutdoorPvPActive())
+ if (!player->IsOutdoorPvPActive())
return false;
return false;
}
-bool OutdoorPvP::HandleOpenGo(Player* plr, uint64 guid)
+bool OutdoorPvP::HandleOpenGo(Player* player, uint64 guid)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if (itr->second->HandleOpenGo(plr, guid) >= 0)
+ if (itr->second->HandleOpenGo(player, guid) >= 0)
return true;
return false;
}
-bool OutdoorPvP::HandleGossipOption(Player* plr, uint64 guid, uint32 id)
+bool OutdoorPvP::HandleGossipOption(Player* player, uint64 guid, uint32 id)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if (itr->second->HandleGossipOption(plr, guid, id))
+ if (itr->second->HandleGossipOption(player, guid, id))
return true;
return false;
}
-bool OutdoorPvP::CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso)
+bool OutdoorPvP::CanTalkTo(Player* player, Creature* c, GossipMenuItems const& gso)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if (itr->second->CanTalkTo(plr, c, gso))
+ if (itr->second->CanTalkTo(player, c, gso))
return true;
return false;
}
-bool OutdoorPvP::HandleDropFlag(Player* plr, uint32 id)
+bool OutdoorPvP::HandleDropFlag(Player* player, uint32 id)
{
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
- if (itr->second->HandleDropFlag(plr, id))
+ if (itr->second->HandleDropFlag(player, id))
return true;
return false;
}
-bool OPvPCapturePoint::HandleGossipOption(Player* /*plr*/, uint64 /*guid*/, uint32 /*id*/)
+bool OPvPCapturePoint::HandleGossipOption(Player* /*player*/, uint64 /*guid*/, uint32 /*id*/)
{
return false;
}
-bool OPvPCapturePoint::CanTalkTo(Player* /*plr*/, Creature* /*c*/, GossipMenuItems const& /*gso*/)
+bool OPvPCapturePoint::CanTalkTo(Player* /*player*/, Creature* /*c*/, GossipMenuItems const& /*gso*/)
{
return false;
}
-bool OPvPCapturePoint::HandleDropFlag(Player* /*plr*/, uint32 /*id*/)
+bool OPvPCapturePoint::HandleDropFlag(Player* /*player*/, uint32 /*id*/)
{
return false;
}
-int32 OPvPCapturePoint::HandleOpenGo(Player* /*plr*/, uint64 guid)
+int32 OPvPCapturePoint::HandleOpenGo(Player* /*player*/, uint64 guid)
{
std::map<uint64, uint32>::iterator itr = m_ObjectTypes.find(guid);
if (itr != m_ObjectTypes.end())
@@ -554,7 +554,7 @@ int32 OPvPCapturePoint::HandleOpenGo(Player* /*plr*/, uint64 guid)
return -1;
}
-bool OutdoorPvP::HandleAreaTrigger(Player* /*plr*/, uint32 /*trigger*/)
+bool OutdoorPvP::HandleAreaTrigger(Player* /*player*/, uint32 /*trigger*/)
{
return false;
}
@@ -572,9 +572,9 @@ void OutdoorPvP::RegisterZone(uint32 zoneId)
sOutdoorPvPMgr->AddZone(zoneId, this);
}
-bool OutdoorPvP::HasPlayer(Player* plr) const
+bool OutdoorPvP::HasPlayer(Player* player) const
{
- return m_players[plr->GetTeamId()].find(plr) != m_players[plr->GetTeamId()].end();
+ return m_players[player->GetTeamId()].find(player) != m_players[player->GetTeamId()].end();
}
void OutdoorPvP::TeamCastSpell(TeamId team, int32 spellId)
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index 1969d1f98e1..c57eddc7f86 100755
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -104,15 +104,15 @@ class OPvPCapturePoint
void SendObjectiveComplete(uint32 id, uint64 guid);
// used when player is activated/inactivated in the area
- virtual bool HandlePlayerEnter(Player* plr);
- virtual void HandlePlayerLeave(Player* plr);
+ virtual bool HandlePlayerEnter(Player* player);
+ virtual void HandlePlayerLeave(Player* player);
// checks if player is in range of a capture credit marker
- bool IsInsideObjective(Player* plr) const;
+ bool IsInsideObjective(Player* player) const;
- virtual bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go);
+ virtual bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go);
- virtual int32 HandleOpenGo(Player* plr, uint64 guid);
+ virtual int32 HandleOpenGo(Player* player, uint64 guid);
// returns true if the state of the objective has changed, in this case, the OutdoorPvP must send a world state ui update.
virtual bool Update(uint32 diff);
@@ -123,11 +123,11 @@ class OPvPCapturePoint
virtual void SendChangePhase();
- virtual bool HandleGossipOption(Player* plr, uint64 guid, uint32 gossipid);
+ virtual bool HandleGossipOption(Player* player, uint64 guid, uint32 gossipid);
- virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso);
+ virtual bool CanTalkTo(Player* player, Creature* c, GossipMenuItems const& gso);
- virtual bool HandleDropFlag(Player* plr, uint32 spellId);
+ virtual bool HandleDropFlag(Player* player, uint32 spellId);
virtual void DeleteSpawns();
@@ -208,13 +208,13 @@ class OutdoorPvP : public ZoneScript
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
// called when a player triggers an areatrigger
- virtual bool HandleAreaTrigger(Player* plr, uint32 trigger);
+ virtual bool HandleAreaTrigger(Player* player, uint32 trigger);
// called on custom spell
- virtual bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go);
+ virtual bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go);
// called on go use
- virtual bool HandleOpenGo(Player* plr, uint64 guid);
+ virtual bool HandleOpenGo(Player* player, uint64 guid);
// setup stuff
virtual bool SetupOutdoorPvP() {return true;}
@@ -234,18 +234,18 @@ class OutdoorPvP : public ZoneScript
virtual void HandleKillImpl(Player* /*killer*/, Unit* /*killed*/) {}
// checks if player is in range of a capture credit marker
- bool IsInsideObjective(Player* plr) const;
+ bool IsInsideObjective(Player* player) const;
// awards rewards for player kill
- virtual void AwardKillBonus(Player* /*plr*/) {}
+ virtual void AwardKillBonus(Player* /*player*/) {}
uint32 GetTypeId() {return m_TypeId;}
- virtual bool HandleDropFlag(Player* plr, uint32 spellId);
+ virtual bool HandleDropFlag(Player* player, uint32 spellId);
- virtual bool HandleGossipOption(Player* plr, uint64 guid, uint32 gossipid);
+ virtual bool HandleGossipOption(Player* player, uint64 guid, uint32 gossipid);
- virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso);
+ virtual bool CanTalkTo(Player* player, Creature* c, GossipMenuItems const& gso);
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
@@ -261,14 +261,14 @@ class OutdoorPvP : public ZoneScript
bool m_sendUpdate;
// world state stuff
- virtual void SendRemoveWorldStates(Player* /*plr*/) {}
+ virtual void SendRemoveWorldStates(Player* /*player*/) {}
void BroadcastPacket(WorldPacket & data) const;
- virtual void HandlePlayerEnterZone(Player* plr, uint32 zone);
- virtual void HandlePlayerLeaveZone(Player* plr, uint32 zone);
+ virtual void HandlePlayerEnterZone(Player* player, uint32 zone);
+ virtual void HandlePlayerLeaveZone(Player* player, uint32 zone);
- virtual void HandlePlayerResurrects(Player* plr, uint32 zone);
+ virtual void HandlePlayerResurrects(Player* player, uint32 zone);
void AddCapturePoint(OPvPCapturePoint* cp)
{
@@ -285,7 +285,7 @@ class OutdoorPvP : public ZoneScript
void RegisterZone(uint32 zoneid);
- bool HasPlayer(Player* plr) const;
+ bool HasPlayer(Player* player) const;
void TeamCastSpell(TeamId team, int32 spellId);
};
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index dda0e7bcb61..4a0da1d3b55 100755
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -115,31 +115,31 @@ void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle)
m_OutdoorPvPMap[zoneid] = handle;
}
-void OutdoorPvPMgr::HandlePlayerEnterZone(Player* plr, uint32 zoneid)
+void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
{
OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid);
if (itr == m_OutdoorPvPMap.end())
return;
- if (itr->second->HasPlayer(plr))
+ if (itr->second->HasPlayer(player))
return;
- itr->second->HandlePlayerEnterZone(plr, zoneid);
- sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u entered outdoorpvp id %u", plr->GetGUIDLow(), itr->second->GetTypeId());
+ itr->second->HandlePlayerEnterZone(player, zoneid);
+ sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
}
-void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* plr, uint32 zoneid)
+void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
{
OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid);
if (itr == m_OutdoorPvPMap.end())
return;
// teleport: remove once in removefromworld, once in updatezone
- if (!itr->second->HasPlayer(plr))
+ if (!itr->second->HasPlayer(player))
return;
- itr->second->HandlePlayerLeaveZone(plr, zoneid);
- sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u left outdoorpvp id %u", plr->GetGUIDLow(), itr->second->GetTypeId());
+ itr->second->HandlePlayerLeaveZone(player, zoneid);
+ sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
}
OutdoorPvP* OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid)
@@ -164,11 +164,11 @@ void OutdoorPvPMgr::Update(uint32 diff)
}
}
-bool OutdoorPvPMgr::HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go)
+bool OutdoorPvPMgr::HandleCustomSpell(Player* player, uint32 spellId, GameObject* go)
{
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
- if ((*itr)->HandleCustomSpell(plr, spellId, go))
+ if ((*itr)->HandleCustomSpell(player, spellId, go))
return true;
}
return false;
@@ -183,21 +183,21 @@ ZoneScript* OutdoorPvPMgr::GetZoneScript(uint32 zoneId)
return NULL;
}
-bool OutdoorPvPMgr::HandleOpenGo(Player* plr, uint64 guid)
+bool OutdoorPvPMgr::HandleOpenGo(Player* player, uint64 guid)
{
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
- if ((*itr)->HandleOpenGo(plr, guid))
+ if ((*itr)->HandleOpenGo(player, guid))
return true;
}
return false;
}
-void OutdoorPvPMgr::HandleGossipOption(Player* plr, uint64 guid, uint32 gossipid)
+void OutdoorPvPMgr::HandleGossipOption(Player* player, uint64 guid, uint32 gossipid)
{
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
- if ((*itr)->HandleGossipOption(plr, guid, gossipid))
+ if ((*itr)->HandleGossipOption(player, guid, gossipid))
return;
}
}
@@ -212,21 +212,21 @@ bool OutdoorPvPMgr::CanTalkTo(Player* player, Creature* creature, GossipMenuItem
return false;
}
-void OutdoorPvPMgr::HandleDropFlag(Player* plr, uint32 spellId)
+void OutdoorPvPMgr::HandleDropFlag(Player* player, uint32 spellId)
{
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
- if ((*itr)->HandleDropFlag(plr, spellId))
+ if ((*itr)->HandleDropFlag(player, spellId))
return;
}
}
-void OutdoorPvPMgr::HandlePlayerResurrects(Player* plr, uint32 zoneid)
+void OutdoorPvPMgr::HandlePlayerResurrects(Player* player, uint32 zoneid)
{
OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid);
if (itr == m_OutdoorPvPMap.end())
return;
- if (itr->second->HasPlayer(plr))
- itr->second->HandlePlayerResurrects(plr, zoneid);
+ if (itr->second->HasPlayer(player))
+ itr->second->HandlePlayerResurrects(player, zoneid);
}
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
index 6f0e0ba91b9..32639cb692e 100755
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
@@ -49,22 +49,22 @@ class OutdoorPvPMgr
void InitOutdoorPvP();
// called when a player enters an outdoor pvp area
- void HandlePlayerEnterZone(Player* plr, uint32 areaflag);
+ void HandlePlayerEnterZone(Player* player, uint32 areaflag);
// called when player leaves an outdoor pvp area
- void HandlePlayerLeaveZone(Player* plr, uint32 areaflag);
+ void HandlePlayerLeaveZone(Player* player, uint32 areaflag);
// called when player resurrects
- void HandlePlayerResurrects(Player* plr, uint32 areaflag);
+ void HandlePlayerResurrects(Player* player, uint32 areaflag);
// return assigned outdoor pvp
OutdoorPvP* GetOutdoorPvPToZoneId(uint32 zoneid);
// handle custom (non-exist in dbc) spell if registered
- bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go);
+ bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go);
// handle custom go if registered
- bool HandleOpenGo(Player* plr, uint64 guid);
+ bool HandleOpenGo(Player* player, uint64 guid);
ZoneScript* GetZoneScript(uint32 zoneId);
@@ -76,7 +76,7 @@ class OutdoorPvPMgr
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso);
- void HandleDropFlag(Player* plr, uint32 spellId);
+ void HandleDropFlag(Player* player, uint32 spellId);
private:
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index 03accce42ed..bbef60aa5e7 100755
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -260,7 +260,7 @@ void PoolGroup<Quest>::Despawn1Object(uint32 quest_id)
QuestRelations::iterator lastElement = questMap->upper_bound(itr->second);
for (; qitr != lastElement; ++qitr)
{
- if (qitr->first == itr->second)
+ if (qitr->first == itr->second && qitr->second == itr->first)
{
questMap->erase(qitr); // iterator is now no more valid
break; // but we can exit loop since the element is found
@@ -279,7 +279,7 @@ void PoolGroup<Quest>::Despawn1Object(uint32 quest_id)
QuestRelations::iterator lastElement = questMap->upper_bound(itr->second);
for (; qitr != lastElement; ++qitr)
{
- if (qitr->first == itr->second)
+ if (qitr->first == itr->second && qitr->second == itr->first)
{
questMap->erase(qitr); // iterator is now no more valid
break; // but we can exit loop since the element is found
@@ -361,7 +361,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
// Spawn if necessary (loaded grids only)
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
// We use spawn coords to spawn
- if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
+ if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* creature = new Creature;
//sLog->outDebug(LOG_FILTER_POOLSYS, "Spawning creature %u", guid);
@@ -371,7 +371,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
return;
}
else
- map->Add(creature);
+ map->AddToMap(creature);
}
}
}
@@ -387,7 +387,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
// this base map checked as non-instanced and then only existed
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
// We use current coords to unspawn, not spawn coords since creature can have changed grid
- if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
+ if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
//sLog->outDebug(LOG_FILTER_POOLSYS, "Spawning gameobject %u", guid);
@@ -399,7 +399,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
else
{
if (pGameobject->isSpawnedByDefault())
- map->Add(pGameobject);
+ map->AddToMap(pGameobject);
}
}
}
@@ -507,7 +507,7 @@ void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
{
if (CreatureData const* data = sObjectMgr->GetCreatureData(obj->guid))
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
- creature->GetMap()->Add(creature);
+ creature->GetMap()->AddToMap(creature);
}
// Method that does the respawn job on the specified gameobject
@@ -516,7 +516,7 @@ void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
{
if (GameObjectData const* data = sObjectMgr->GetGOData(obj->guid))
if (GameObject* pGameobject = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
- pGameobject->GetMap()->Add(pGameobject);
+ pGameobject->GetMap()->AddToMap(pGameobject);
}
// Nothing to do for a child Pool
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index a1a1f5d5cac..9650afb60e2 100755
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -205,6 +205,11 @@ int32 Quest::GetRewOrReqMoney() const
return int32(RewOrReqMoney * sWorld->getRate(RATE_DROP_MONEY));
}
+bool Quest::IsAutoComplete() const
+{
+ return QuestMethod == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE);
+}
+
bool Quest::IsAllowedInRaid() const
{
if (IsRaidQuest())
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 61d492ce88c..90e52660160 100755
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -246,7 +246,7 @@ class Quest
uint32 GetQuestStartScript() const { return QuestStartScript; }
uint32 GetQuestCompleteScript() const { return QuestCompleteScript; }
bool IsRepeatable() const { return QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE; }
- bool IsAutoComplete() const { return QuestMethod ? false : true; }
+ bool IsAutoComplete() const;
uint32 GetFlags() const { return QuestFlags; }
bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 2f849116f81..c4c8dec5500 100755
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -358,7 +358,7 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
if (incremental)
{
// int32 *= float cause one point loss?
- standing = int32(floor((float)standing * sWorld->getRate(RATE_REPUTATION_GAIN) + 0.5));
+ standing = int32(floor((float)standing * sWorld->getRate(RATE_REPUTATION_GAIN) + 0.5f));
standing += itr->second.Standing + BaseRep;
}
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index 3ded63fe812..88c9795e896 100755
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
@@ -266,21 +266,20 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script
}
}
-inline GameObject* Map::_FindGameObject(WorldObject* pSearchObject, uint32 guid) const
+inline GameObject* Map::_FindGameObject(WorldObject* searchObject, uint32 guid) const
{
- GameObject* pGameObject = NULL;
+ GameObject* gameobject = NULL;
- CellPair p(Trinity::ComputeCellPair(pSearchObject->GetPositionX(), pSearchObject->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
- Trinity::GameObjectWithDbGUIDCheck goCheck(*pSearchObject, guid);
- Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(pSearchObject, pGameObject, goCheck);
+ Trinity::GameObjectWithDbGUIDCheck goCheck(*searchObject, guid);
+ Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(searchObject, gameobject, goCheck);
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > objectChecker(checker);
- cell.Visit(p, objectChecker, *pSearchObject->GetMap());
+ cell.Visit(p, objectChecker, *searchObject->GetMap(), *searchObject, searchObject->GetGridActivationRange());
- return pGameObject;
+ return gameobject;
}
/// Process queued scripts
@@ -539,8 +538,8 @@ void Map::ScriptsProcess()
// when script called for item spell casting then target == (unit or GO) and source is player
WorldObject* worldObject;
- Player* pTarget = target->ToPlayer();
- if (pTarget)
+ Player* plrTarget = target->ToPlayer();
+ if (plrTarget)
{
if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER)
{
@@ -552,8 +551,8 @@ void Map::ScriptsProcess()
}
else
{
- pTarget = source->ToPlayer();
- if (target)
+ plrTarget = source->ToPlayer();
+ if (plrTarget)
{
if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER)
{
@@ -566,19 +565,18 @@ void Map::ScriptsProcess()
else
{
sLog->outError("%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
- step.script->GetDebugInfo().c_str(),
- source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0,
- target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0);
+ step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow(),
+ target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
}
}
// quest id and flags checked at script loading
if ((worldObject->GetTypeId() != TYPEID_UNIT || ((Unit*)worldObject)->isAlive()) &&
- (step.script->QuestExplored.Distance == 0 || worldObject->IsWithinDistInMap(pTarget, float(step.script->QuestExplored.Distance))))
- pTarget->AreaExploredOrEventHappens(step.script->QuestExplored.QuestID);
+ (step.script->QuestExplored.Distance == 0 || worldObject->IsWithinDistInMap(plrTarget, float(step.script->QuestExplored.Distance))))
+ plrTarget->AreaExploredOrEventHappens(step.script->QuestExplored.QuestID);
else
- pTarget->FailQuest(step.script->QuestExplored.QuestID);
+ plrTarget->FailQuest(step.script->QuestExplored.QuestID);
break;
}
@@ -628,7 +626,7 @@ void Map::ScriptsProcess()
pGO->SetLootState(GO_READY);
pGO->SetRespawnTime(nTimeToDespawn);
- pGO->GetMap()->Add(pGO);
+ pGO->GetMap()->AddToMap(pGO);
}
}
break;
@@ -819,15 +817,14 @@ void Map::ScriptsProcess()
{
WorldObject* wSource = dynamic_cast <WorldObject*> (source);
- CellPair p(Trinity::ComputeCellPair(wSource->GetPositionX(), wSource->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(wSource->GetPositionX(), wSource->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::CreatureWithDbGUIDCheck target_check(wSource, step.script->CallScript.CreatureEntry);
Trinity::CreatureSearcher<Trinity::CreatureWithDbGUIDCheck> checker(wSource, cTarget, target_check);
TypeContainerVisitor<Trinity::CreatureSearcher <Trinity::CreatureWithDbGUIDCheck>, GridTypeMapContainer > unit_checker(checker);
- cell.Visit(p, unit_checker, *wSource->GetMap());
+ cell.Visit(p, unit_checker, *wSource->GetMap(), *wSource, wSource->GetGridActivationRange());
}
else //check hashmap holders
{
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 120227c172d..925b352e616 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -295,7 +295,6 @@ void ScriptMgr::Unload()
void ScriptMgr::LoadDatabase()
{
- sScriptSystemMgr->LoadVersion();
sScriptSystemMgr->LoadScriptTexts();
sScriptSystemMgr->LoadScriptTextsCustom();
sScriptSystemMgr->LoadScriptWaypoints();
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index 8c6f5626101..d0f9a0380b0 100755
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -23,25 +23,6 @@
ScriptPointVector const SystemMgr::_empty;
-void SystemMgr::LoadVersion()
-{
- // Get Version information
- QueryResult result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1");
-
- if (result)
- {
- Field* fields = result->Fetch();
-
- sLog->outString("TSCR: Database version is: %s", fields[0].GetCString());
- sLog->outString();
- }
- else
- {
- sLog->outError("TSCR: Missing `version`.`script_version` information.");
- sLog->outString();
- }
-}
-
void SystemMgr::LoadScriptTexts()
{
sLog->outString("TSCR: Loading Script Texts...");
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index a17033dc920..daa7fe0d596 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -64,7 +64,6 @@ class SystemMgr
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
//Database
- void LoadVersion();
void LoadScriptTexts();
void LoadScriptTextsCustom();
void LoadScriptWaypoints();
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
index a67006382ff..2f8a27740be 100755
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
@@ -125,7 +125,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
recv_data >> buyout;
recv_data >> etime;
- Player* pl = GetPlayer();
+ Player* player = GetPlayer();
if (!item || !bid || !etime)
return; //check for cheaters
@@ -162,11 +162,11 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- Item* it = pl->GetItemByGuid(item);
+ Item* it = player->GetItemByGuid(item);
//do not allow to sell already auctioned items
if (sAuctionMgr->GetAItem(GUID_LOPART(item)))
{
- sLog->outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", pl->GetName(), GUID_LOPART(item));
+ sLog->outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", player->GetName(), GUID_LOPART(item));
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
@@ -199,7 +199,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
//we have to take deposit :
uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, it, count);
- if (!pl->HasEnoughMoney(deposit))
+ if (!player->HasEnoughMoney(deposit))
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
return;
@@ -211,7 +211,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
GetPlayerName(), GetAccountId(), it->GetTemplate()->Name1.c_str(), it->GetEntry(), count);
}
- pl->ModifyMoney(-int32(deposit));
+ player->ModifyMoney(-int32(deposit));
uint32 auction_time = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
@@ -223,7 +223,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
AH->auctioneer = GUID_LOPART(auctioneer);
AH->item_guidlow = GUID_LOPART(item);
AH->item_template = it->GetEntry();
- AH->owner = pl->GetGUIDLow();
+ AH->owner = player->GetGUIDLow();
AH->startbid = bid;
AH->bidder = 0;
AH->bid = 0;
@@ -236,13 +236,13 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
sAuctionMgr->AddAItem(it);
auctionHouse->AddAuction(AH);
- pl->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
+ player->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
it->DeleteFromInventoryDB(trans);
it->SaveToDB(trans); // recursive and not have transaction guard into self, not in inventiory and can be save standalone
AH->SaveToDB(trans);
- pl->SaveInventoryAndGoldToDB(trans);
+ player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
@@ -276,9 +276,9 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
- Player* pl = GetPlayer();
+ Player* player = GetPlayer();
- if (!auction || auction->owner == pl->GetGUIDLow())
+ if (!auction || auction->owner == player->GetGUIDLow())
{
//you cannot bid your own auction:
SendAuctionCommandResult(0, AUCTION_PLACE_BID, CANNOT_BID_YOUR_AUCTION_ERROR);
@@ -287,7 +287,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
// impossible have online own another character (use this for speedup check in case online owner)
Player* auction_owner = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER));
- if (!auction_owner && sObjectMgr->GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == pl->GetSession()->GetAccountId())
+ if (!auction_owner && sObjectMgr->GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == player->GetSession()->GetAccountId())
{
//you cannot bid your another character auction:
SendAuctionCommandResult(0, AUCTION_PLACE_BID, CANNOT_BID_YOUR_AUCTION_ERROR);
@@ -306,7 +306,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
return;
}
- if (!pl->HasEnoughMoney(price))
+ if (!player->HasEnoughMoney(price))
{
//you don't have enought money!, client tests!
//SendAuctionCommandResult(auction->auctionId, AUCTION_PLACE_BID, ???);
@@ -319,19 +319,19 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
{
if (auction->bidder > 0)
{
- if (auction->bidder == pl->GetGUIDLow())
- pl->ModifyMoney(-int32(price - auction->bid));
+ if (auction->bidder == player->GetGUIDLow())
+ player->ModifyMoney(-int32(price - auction->bid));
else
{
// mail to last bidder and return money
sAuctionMgr->SendAuctionOutbiddedMail(auction, price, GetPlayer(), trans);
- pl->ModifyMoney(-int32(price));
+ player->ModifyMoney(-int32(price));
}
}
else
- pl->ModifyMoney(-int32(price));
+ player->ModifyMoney(-int32(price));
- auction->bidder = pl->GetGUIDLow();
+ auction->bidder = player->GetGUIDLow();
auction->bid = price;
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, price);
@@ -342,15 +342,15 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
else
{
//buyout:
- if (pl->GetGUIDLow() == auction->bidder)
- pl->ModifyMoney(-int32(auction->buyout - auction->bid));
+ if (player->GetGUIDLow() == auction->bidder)
+ player->ModifyMoney(-int32(auction->buyout - auction->bid));
else
{
- pl->ModifyMoney(-int32(auction->buyout));
+ player->ModifyMoney(-int32(auction->buyout));
if (auction->bidder) //buyout for bidded auction ..
sAuctionMgr->SendAuctionOutbiddedMail(auction, auction->buyout, GetPlayer(), trans);
}
- auction->bidder = pl->GetGUIDLow();
+ auction->bidder = player->GetGUIDLow();
auction->bid = auction->buyout;
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, auction->buyout);
@@ -367,7 +367,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
sAuctionMgr->RemoveAItem(auction->item_guidlow);
auctionHouse->RemoveAuction(auction, item_template);
}
- pl->SaveInventoryAndGoldToDB(trans);
+ player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
}
@@ -394,10 +394,10 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
- Player* pl = GetPlayer();
+ Player* player = GetPlayer();
SQLTransaction trans = CharacterDatabase.BeginTransaction();
- if (auction && auction->owner == pl->GetGUIDLow())
+ if (auction && auction->owner == player->GetGUIDLow())
{
Item* pItem = sAuctionMgr->GetAItem(auction->item_guidlow);
if (pItem)
@@ -405,11 +405,11 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
if (auction->bidder > 0) // If we have a bidder, we have to send him the money he paid
{
uint32 auctionCut = auction->GetAuctionCut();
- if (!pl->HasEnoughMoney(auctionCut)) //player doesn't have enough money, maybe message needed
+ if (!player->HasEnoughMoney(auctionCut)) //player doesn't have enough money, maybe message needed
return;
//some auctionBidderNotification would be needed, but don't know that parts..
sAuctionMgr->SendAuctionCancelledToBidderMail(auction, trans);
- pl->ModifyMoney(-int32(auctionCut));
+ player->ModifyMoney(-int32(auctionCut));
}
// Return the item by mail
std::ostringstream msgAuctionCanceledOwner;
@@ -418,7 +418,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
// item will deleted or added to received mail list
MailDraft(msgAuctionCanceledOwner.str(), "") // TODO: fix body
.AddItem(pItem)
- .SendMailTo(trans, pl, auction, MAIL_CHECK_MASK_COPIED);
+ .SendMailTo(trans, player, auction, MAIL_CHECK_MASK_COPIED);
}
else
{
@@ -431,7 +431,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
{
SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR);
//this code isn't possible ... maybe there should be assert
- sLog->outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", pl->GetGUIDLow(), auctionId);
+ sLog->outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId);
return;
}
@@ -440,7 +440,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
// Now remove the auction
- pl->SaveInventoryAndGoldToDB(trans);
+ player->SaveInventoryAndGoldToDB(trans);
auction->DeleteFromDB(trans);
CharacterDatabase.CommitTransaction(trans);
@@ -479,7 +479,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4));
- Player* pl = GetPlayer();
+ Player* player = GetPlayer();
data << (uint32) 0; //add 0 as count
uint32 count = 0;
uint32 totalcount = 0;
@@ -496,7 +496,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
}
}
- auctionHouse->BuildListBidderItems(data, pl, count, totalcount);
+ auctionHouse->BuildListBidderItems(data, player, count, totalcount);
data.put<uint32>(0, count); // add count to placeholder
data << totalcount;
data << (uint32)300; //unk 2.3.0
diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
index 8f32ac84cb8..4c6ec6571a4 100755
--- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
@@ -25,12 +25,14 @@
#include "Opcodes.h"
#include "Player.h"
-void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
+void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recv_data*/)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
+ uint64 guid = _player->GetGUID();
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_CALENDAR [" UI64FMTD "]", guid);
- time_t cur_time = time(NULL);
+ time_t cur_time = time_t(time(NULL));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_SEND_CALENDAR [" UI64FMTD "]", guid);
WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR, 4+4*0+4+4*0+4+4);
data << uint32(0); // invite count
@@ -58,48 +60,52 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
}
*/
- data << uint32(0); // unk
- data << uint32(secsToTimeBitFields(cur_time)); // current time
+ data << uint32(cur_time); // server time
+ data << uint32(secsToTimeBitFields(cur_time)); // server time
uint32 counter = 0;
size_t p_counter = data.wpos();
- data << uint32(counter); // instance save count
+ data << uint32(counter); // instance save count
- for (int i = 0; i < MAX_DIFFICULTY; ++i)
- {
+ 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)
- {
if (itr->second.perm)
{
- InstanceSave* save = itr->second.save;
+ 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
+ data << uint64(save->GetInstanceId()); // instance save id as unique instance copy id
++counter;
}
- }
- }
data.put<uint32>(p_counter, counter);
- data << uint32(1135753200); // unk (28.12.2005 12:00)
+ data << uint32(1135753200); // unk (28.12.2005 07:00)
counter = 0;
p_counter = data.wpos();
- data << uint32(counter); // raid reset count
+ data << uint32(counter); // raid reset count
+ std::set<uint32> sentMaps;
+
ResetTimeByMapDifficultyMap const& resets = sInstanceSaveMgr->GetResetTimeMap();
for (ResetTimeByMapDifficultyMap::const_iterator itr = resets.begin(); itr != resets.end(); ++itr)
{
- uint32 mapid = PAIR32_LOPART(itr->first);
- MapEntry const* mapEnt = sMapStore.LookupEntry(mapid);
- if (!mapEnt || !mapEnt->IsRaid())
+ uint32 mapId = PAIR32_LOPART(itr->first);
+
+ if (sentMaps.find(mapId) != sentMaps.end())
+ continue;
+
+ MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
+ if (!mapEntry || !mapEntry->IsRaid())
continue;
- data << uint32(mapid);
+ sentMaps.insert(mapId);
+
+ data << uint32(mapId);
data << uint32(itr->second - cur_time);
- data << uint32(mapEnt->unk_time);
+ data << uint32(mapEntry->unk_time);
++counter;
}
@@ -126,17 +132,16 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
}
*/
- sLog->outDebug(LOG_FILTER_NETWORKIO, "Sending calendar");
SendPacket(&data);
}
-void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data)
+void WorldSession::HandleCalendarGetEvent(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GET_EVENT");
recv_data.read_skip<uint64>(); // unk
}
-void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
+void WorldSession::HandleCalendarGuildFilter(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GUILD_FILTER");
recv_data.read_skip<uint32>(); // unk1
@@ -144,13 +149,13 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
recv_data.read_skip<uint32>(); // unk3
}
-void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data)
+void WorldSession::HandleCalendarArenaTeam(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_ARENA_TEAM");
recv_data.read_skip<uint32>(); // unk
}
-void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
+void WorldSession::HandleCalendarAddEvent(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_ADD_EVENT");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -185,7 +190,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
//}
}
-void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
+void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_UPDATE_EVENT");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -203,7 +208,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
//recv_data >> uint32
}
-void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
+void WorldSession::HandleCalendarRemoveEvent(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_REMOVE_EVENT");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -214,7 +219,7 @@ void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
}
-void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
+void WorldSession::HandleCalendarCopyEvent(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_COPY_EVENT");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -225,7 +230,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
}
-void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
+void WorldSession::HandleCalendarEventInvite(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_INVITE");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -238,7 +243,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
}
-void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
+void WorldSession::HandleCalendarEventRsvp(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_RSVP");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -249,7 +254,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
}
-void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
+void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -260,7 +265,7 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
//recv_data >> uint64
}
-void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
+void WorldSession::HandleCalendarEventStatus(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_STATUS");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -272,7 +277,7 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
//recv_data >> uint32
}
-void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
+void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -284,7 +289,7 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
//recv_data >> uint32
}
-void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
+void WorldSession::HandleCalendarComplain(WorldPacket& recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_COMPLAIN");
recv_data.rfinish(); // set to end to avoid warnings spam
@@ -294,7 +299,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
//recv_data >> uint64
}
-void WorldSession::HandleCalendarGetNumPending(WorldPacket & /*recv_data*/)
+void WorldSession::HandleCalendarGetNumPending(WorldPacket& /*recv_data*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 7b504060789..6863ef17685 100755
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -686,6 +686,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
sLog->outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sLog->outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sScriptMgr->OnPlayerCreate(&newChar);
+ sWorld->AddCharacterNameData(newChar.GetGUIDLow(), std::string(newChar.GetName()), newChar.getGender(), newChar.getRace(), newChar.getClass());
delete createInfo;
_charCreateCallback.SetParam(NULL);
@@ -741,6 +742,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sScriptMgr->OnPlayerDelete(guid);
+ sWorld->DeleteCharaceterNameData(GUID_LOPART(guid));
if (sLog->IsOutCharDump()) // optimize GetPlayerDump call
{
@@ -918,7 +920,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
}
}
- if (!pCurrChar->GetMap()->Add(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
+ if (!pCurrChar->GetMap()->AddPlayerToMap(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
{
AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId());
if (at)
@@ -1168,6 +1170,8 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(QueryResult result, std:
data << uint64(guid);
data << newname;
SendPacket(&data);
+
+ sWorld->UpdateCharacterNameData(guidLow, newname);
}
void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
@@ -1414,6 +1418,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
CharacterDatabase.PExecute("UPDATE characters set name = '%s', at_login = at_login & ~ %u WHERE guid ='%u'", newname.c_str(), uint32(AT_LOGIN_CUSTOMIZE), GUID_LOPART(guid));
CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid ='%u'", GUID_LOPART(guid));
+ sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newname, gender);
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1+8+(newname.size()+1)+6);
data << uint8(RESPONSE_SUCCESS);
@@ -1426,8 +1431,6 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
data << uint8(hairColor);
data << uint8(facialHair);
SendPacket(&data);
-
- sWorld->ReloadSingleCharacterNameData(GUID_LOPART(guid));
}
void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
@@ -1633,6 +1636,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
trans->PAppend("UPDATE `characters` SET name='%s', race='%u', at_login=at_login & ~ %u WHERE guid='%u'", newname.c_str(), race, used_loginFlag, lowGuid);
trans->PAppend("DELETE FROM character_declinedname WHERE guid ='%u'", lowGuid);
+ sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newname, gender, race);
BattlegroundTeamId team = BG_TEAM_ALLIANCE;
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
index 83d92df4f7a..852549b3f53 100755
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
@@ -495,8 +495,8 @@ namespace Trinity
class EmoteChatBuilder
{
public:
- EmoteChatBuilder(Player const& pl, uint32 text_emote, uint32 emote_num, Unit const* target)
- : i_player(pl), i_text_emote(text_emote), i_emote_num(emote_num), i_target(target) {}
+ EmoteChatBuilder(Player const& player, uint32 text_emote, uint32 emote_num, Unit const* target)
+ : i_player(player), i_text_emote(text_emote), i_emote_num(emote_num), i_target(target) {}
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
@@ -566,10 +566,9 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data)
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
- CellPair p = Trinity::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
+ CellCoord p = Trinity::ComputeCellCoord(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
index 48bc305ce30..b1e6f3fdc3f 100755
--- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
@@ -27,7 +27,7 @@
void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
{
uint64 guid;
- Player* pl;
+ Player* player;
Player* plTarget;
recvPacket >> guid;
@@ -35,21 +35,21 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
if (!GetPlayer()->duel) // ignore accept from duel-sender
return;
- pl = GetPlayer();
- plTarget = pl->duel->opponent;
+ player = GetPlayer();
+ plTarget = player->duel->opponent;
- if (pl == pl->duel->initiator || !plTarget || pl == plTarget || pl->duel->startTime != 0 || plTarget->duel->startTime != 0)
+ if (player == player->duel->initiator || !plTarget || player == plTarget || player->duel->startTime != 0 || plTarget->duel->startTime != 0)
return;
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_DUEL_ACCEPTED");
- sLog->outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(), pl->GetName());
+ sLog->outStaticDebug("Player 1 is: %u (%s)", player->GetGUIDLow(), player->GetName());
sLog->outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName());
time_t now = time(NULL);
- pl->duel->startTimer = now;
+ player->duel->startTimer = now;
plTarget->duel->startTimer = now;
- pl->SendDuelCountdown(3000);
+ player->SendDuelCountdown(3000);
plTarget->SendDuelCountdown(3000);
}
diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
index 57a54bd440f..65865280459 100755
--- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
@@ -306,9 +306,9 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data)
return;
}
- if (Player* plr = grp->GetInvited(guid))
+ if (Player* player = grp->GetInvited(guid))
{
- plr->UninviteFromGroup();
+ player->UninviteFromGroup();
return;
}
@@ -350,9 +350,9 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
return;
}
- if (Player* plr = grp->GetInvited(membername))
+ if (Player* player = grp->GetInvited(membername))
{
- plr->UninviteFromGroup();
+ player->UninviteFromGroup();
return;
}
@@ -850,10 +850,8 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
if (mask & GROUP_UPDATE_FLAG_VEHICLE_SEAT)
{
- if (player->GetVehicle()){
- Vehicle* vv=player->GetVehicle();
- *data << (uint32) vv->GetVehicleInfo()->m_seatID[player->m_movementInfo.t_seat];
- }
+ if (Vehicle* veh = player->GetVehicle())
+ *data << (uint32) veh->GetVehicleInfo()->m_seatID[player->m_movementInfo.t_seat];
}
if (mask & GROUP_UPDATE_FLAG_PET_AURAS)
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
index eca466436be..f4e3af72892 100755
--- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
@@ -1341,7 +1341,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
_player->ToggleMetaGemsActive(slot, true); //turn on all metagems (except for target item)
- itemTarget->SetSoulboundTradeable(NULL, _player, false); // clear tradeable flag
+ itemTarget->ClearSoulboundTradeable(_player); // clear tradeable flag
}
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
index fab7bf841c2..1ff1181bc6a 100755
--- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
@@ -419,8 +419,8 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck)
data << uint64(guid); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- Player* plr = ObjectAccessor::FindPlayer(guid);
- data << uint8(plr ? plr->getLevel() : 0); // Level
+ Player* player = ObjectAccessor::FindPlayer(guid);
+ data << uint8(player ? player->getLevel() : 0); // Level
for (LfgRolesMap::const_iterator it = pRoleCheck->roles.begin(); it != pRoleCheck->roles.end(); ++it)
{
@@ -432,8 +432,8 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck)
data << uint64(guid); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- plr = ObjectAccessor::FindPlayer(guid);
- data << uint8(plr ? plr->getLevel() : 0); // Level
+ player = ObjectAccessor::FindPlayer(guid);
+ data << uint8(player ? player->getLevel() : 0); // Level
}
}
SendPacket(&data);
diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
index 83d3fad3b21..05b4afc99e7 100755
--- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
@@ -489,10 +489,10 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
}
// list of players allowed to receive this item in trade
- AllowedLooterSet* looters = item.GetAllowedLooters();
+ AllowedLooterSet looters = item.GetAllowedLooters();
// not move item from loot to target inventory
- Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomPropertyId, (looters->size() > 1) ? looters : NULL);
+ Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomPropertyId, looters);
target->SendNewItem(newitem, uint32(item.count), false, false, true);
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item.itemid, item.count);
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, pLoot->loot_type, item.count);
diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
index 432a8bf3f6a..785fcdbf067 100755
--- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
@@ -75,9 +75,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
if (receiver.empty())
return;
- Player* pl = _player;
+ Player* player = _player;
- if (pl->getLevel() < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ))
+ if (player->getLevel() < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ))
{
SendNotification(GetTrinityString(LANG_MAIL_SENDER_REQ), sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ));
return;
@@ -90,16 +90,16 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
if (!rc)
{
sLog->outDetail("Player %u is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
- pl->GetGUIDLow(), receiver.c_str(), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_NOT_FOUND);
+ player->GetGUIDLow(), receiver.c_str(), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_NOT_FOUND);
return;
}
- sLog->outDetail("Player %u is sending mail to %s (GUID: %u) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", pl->GetGUIDLow(), receiver.c_str(), GUID_LOPART(rc), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
+ sLog->outDetail("Player %u is sending mail to %s (GUID: %u) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", player->GetGUIDLow(), receiver.c_str(), GUID_LOPART(rc), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
- if (pl->GetGUID() == rc)
+ if (player->GetGUID() == rc)
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_CANNOT_SEND_TO_SELF);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_CANNOT_SEND_TO_SELF);
return;
}
@@ -107,9 +107,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
uint32 reqmoney = cost + money;
- if (!pl->HasEnoughMoney(reqmoney))
+ if (!player->HasEnoughMoney(reqmoney))
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_ENOUGH_MONEY);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_ENOUGH_MONEY);
return;
}
@@ -142,14 +142,14 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
//do not allow to have more than 100 mails in mailbox.. mails count is in opcode uint8!!! - so max can be 255..
if (mails_count > 100)
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_CAP_REACHED);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_CAP_REACHED);
return;
}
// test the receiver's Faction... or all items are account bound
bool accountBound = items_count ? true : false;
for (uint8 i = 0; i < items_count; ++i)
{
- Item* item = pl->GetItemByGuid(itemGUIDs[i]);
+ Item* item = player->GetItemByGuid(itemGUIDs[i]);
if (item)
{
ItemTemplate const* itemProto = item->GetTemplate();
@@ -161,9 +161,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
}
- if (!accountBound && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && AccountMgr::IsPlayerAccount(GetSecurity()))
+ if (!accountBound && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && player->GetTeam() != rc_team && AccountMgr::IsPlayerAccount(GetSecurity()))
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM);
return;
}
@@ -183,56 +183,56 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
{
if (!itemGUIDs[i])
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_MAIL_ATTACHMENT_INVALID);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_MAIL_ATTACHMENT_INVALID);
return;
}
- Item* item = pl->GetItemByGuid(itemGUIDs[i]);
+ Item* item = player->GetItemByGuid(itemGUIDs[i]);
// prevent sending bag with items (cheat: can be placed in bag after adding equipped empty bag to mail)
if (!item)
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_MAIL_ATTACHMENT_INVALID);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_MAIL_ATTACHMENT_INVALID);
return;
}
if (!item->CanBeTraded(true))
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_MAIL_BOUND_ITEM);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_MAIL_BOUND_ITEM);
return;
}
- if (item->IsBoundAccountWide() && item->IsSoulBound() && pl->GetSession()->GetAccountId() != rc_account)
+ if (item->IsBoundAccountWide() && item->IsSoulBound() && player->GetSession()->GetAccountId() != rc_account)
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS);
return;
}
if (item->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION))
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_MAIL_BOUND_ITEM);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_MAIL_BOUND_ITEM);
return;
}
if (COD && item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_CANT_SEND_WRAPPED_COD);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_CANT_SEND_WRAPPED_COD);
return;
}
if (item->IsNotEmptyBag())
{
- pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS);
+ player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS);
return;
}
items[i] = item;
}
- pl->SendMailResult(0, MAIL_SEND, MAIL_OK);
+ player->SendMailResult(0, MAIL_SEND, MAIL_OK);
- pl->ModifyMoney(-int32(reqmoney));
- pl->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL, cost);
+ player->ModifyMoney(-int32(reqmoney));
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL, cost);
bool needItemDelay = false;
@@ -254,7 +254,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
item->SetNotRefundable(GetPlayer()); // makes the item no longer refundable
- pl->MoveItemFromInventory(items[i]->GetBagSlot(), item->GetSlot(), true);
+ player->MoveItemFromInventory(items[i]->GetBagSlot(), item->GetSlot(), true);
item->DeleteFromInventoryDB(trans); // deletes item from character's inventory
item->SetOwnerGUID(rc);
@@ -264,7 +264,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
// if item send to character at another account, then apply item delivery delay
- needItemDelay = pl->GetSession()->GetAccountId() != rc_account;
+ needItemDelay = player->GetSession()->GetAccountId() != rc_account;
}
if (money > 0 && !AccountMgr::IsPlayerAccount(GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
@@ -281,9 +281,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
draft
.AddMoney(money)
.AddCOD(COD)
- .SendMailTo(trans, MailReceiver(receive, GUID_LOPART(rc)), MailSender(pl), body.empty() ? MAIL_CHECK_MASK_COPIED : MAIL_CHECK_MASK_HAS_BODY, deliver_delay);
+ .SendMailTo(trans, MailReceiver(receive, GUID_LOPART(rc)), MailSender(player), body.empty() ? MAIL_CHECK_MASK_COPIED : MAIL_CHECK_MASK_HAS_BODY, deliver_delay);
- pl->SaveInventoryAndGoldToDB(trans);
+ player->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
}
@@ -298,14 +298,14 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data)
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
- Player* pl = _player;
- Mail* m = pl->GetMail(mailId);
+ Player* player = _player;
+ Mail* m = player->GetMail(mailId);
if (m)
{
- if (pl->unReadMails)
- --pl->unReadMails;
+ if (player->unReadMails)
+ --player->unReadMails;
m->checked = m->checked | MAIL_CHECK_MASK_READ;
- pl->m_mailsUpdated = true;
+ player->m_mailsUpdated = true;
m->state = MAIL_STATE_CHANGED;
}
}
@@ -323,20 +323,20 @@ void WorldSession::HandleMailDelete(WorldPacket & recv_data)
return;
Mail* m = _player->GetMail(mailId);
- Player* pl = _player;
- pl->m_mailsUpdated = true;
+ Player* player = _player;
+ player->m_mailsUpdated = true;
if (m)
{
// delete shouldn't show up for COD mails
if (m->COD)
{
- pl->SendMailResult(mailId, MAIL_DELETED, MAIL_ERR_INTERNAL_ERROR);
+ player->SendMailResult(mailId, MAIL_DELETED, MAIL_ERR_INTERNAL_ERROR);
return;
}
m->state = MAIL_STATE_DELETED;
}
- pl->SendMailResult(mailId, MAIL_DELETED, MAIL_OK);
+ player->SendMailResult(mailId, MAIL_DELETED, MAIL_OK);
}
void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
@@ -350,11 +350,11 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
- Player* pl = _player;
- Mail* m = pl->GetMail(mailId);
+ Player* player = _player;
+ Mail* m = player->GetMail(mailId);
if (!m || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL))
{
- pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
+ player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
return;
}
//we can return mail now
@@ -362,7 +362,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
trans->PAppend("DELETE FROM mail WHERE id = '%u'", mailId); // needed?
trans->PAppend("DELETE FROM mail_items WHERE mail_id = '%u'", mailId);
- pl->RemoveMail(mailId);
+ player->RemoveMail(mailId);
// only return mail if the player exists (and delete if not existing)
if (m->messageType == MAIL_NORMAL && m->sender)
@@ -375,7 +375,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
{
for (MailItemInfoVec::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
{
- Item* item = pl->GetMItem(itr2->item_guid);
+ Item* item = player->GetMItem(itr2->item_guid);
if (item)
draft.AddItem(item);
else
@@ -383,7 +383,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
//WTF?
}
- pl->RemoveMItem(itr2->item_guid);
+ player->RemoveMItem(itr2->item_guid);
}
}
draft.AddMoney(m->money).SendReturnToSender(GetAccountId(), m->receiver, m->sender, trans);
@@ -392,7 +392,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction(trans);
delete m; //we can deallocate old mail
- pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_OK);
+ player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_OK);
}
//called when player takes item attached in mail
@@ -408,23 +408,23 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
- Player* pl = _player;
+ Player* player = _player;
- Mail* m = pl->GetMail(mailId);
+ Mail* m = player->GetMail(mailId);
if (!m || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL))
{
- pl->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_INTERNAL_ERROR);
+ player->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_INTERNAL_ERROR);
return;
}
// prevent cheating with skip client money check
- if (!pl->HasEnoughMoney(m->COD))
+ if (!player->HasEnoughMoney(m->COD))
{
- pl->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_NOT_ENOUGH_MONEY);
+ player->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_NOT_ENOUGH_MONEY);
return;
}
- Item* it = pl->GetMItem(itemId);
+ Item* it = player->GetMItem(itemId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, it, false);
@@ -471,24 +471,24 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
.SendMailTo(trans, MailReceiver(receive, m->sender), MailSender(MAIL_NORMAL, m->receiver), MAIL_CHECK_MASK_COD_PAYMENT);
}
- pl->ModifyMoney(-int32(m->COD));
+ player->ModifyMoney(-int32(m->COD));
}
m->COD = 0;
m->state = MAIL_STATE_CHANGED;
- pl->m_mailsUpdated = true;
- pl->RemoveMItem(it->GetGUIDLow());
+ player->m_mailsUpdated = true;
+ player->RemoveMItem(it->GetGUIDLow());
uint32 count = it->GetCount(); // save counts before store and possible merge with deleting
- pl->MoveItemToInventory(dest, it, true);
+ player->MoveItemToInventory(dest, it, true);
- pl->SaveInventoryAndGoldToDB(trans);
- pl->_SaveMail(trans);
+ player->SaveInventoryAndGoldToDB(trans);
+ player->_SaveMail(trans);
CharacterDatabase.CommitTransaction(trans);
- pl->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_OK, 0, itemId, count);
+ player->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_OK, 0, itemId, count);
}
else
- pl->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_EQUIP_ERROR, msg);
+ player->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_EQUIP_ERROR, msg);
}
void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data)
@@ -501,26 +501,26 @@ void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data)
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
- Player* pl = _player;
+ Player* player = _player;
- Mail* m = pl->GetMail(mailId);
+ Mail* m = player->GetMail(mailId);
if (!m || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL))
{
- pl->SendMailResult(mailId, MAIL_MONEY_TAKEN, MAIL_ERR_INTERNAL_ERROR);
+ player->SendMailResult(mailId, MAIL_MONEY_TAKEN, MAIL_ERR_INTERNAL_ERROR);
return;
}
- pl->SendMailResult(mailId, MAIL_MONEY_TAKEN, MAIL_OK);
+ player->SendMailResult(mailId, MAIL_MONEY_TAKEN, MAIL_OK);
- pl->ModifyMoney(m->money);
+ player->ModifyMoney(m->money);
m->money = 0;
m->state = MAIL_STATE_CHANGED;
- pl->m_mailsUpdated = true;
+ player->m_mailsUpdated = true;
// save money and mail to prevent cheating
SQLTransaction trans = CharacterDatabase.BeginTransaction();
- pl->SaveGoldToDB(trans);
- pl->_SaveMail(trans);
+ player->SaveGoldToDB(trans);
+ player->_SaveMail(trans);
CharacterDatabase.CommitTransaction(trans);
}
@@ -533,11 +533,11 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data)
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
- Player* pl = _player;
+ Player* player = _player;
//load players mails, and mailed items
- if (!pl->m_mailsLoaded)
- pl ->_LoadMail();
+ if (!player->m_mailsLoaded)
+ player ->_LoadMail();
// client can't work with packets > max int16 value
const uint32 maxPacketSize = 32767;
@@ -550,7 +550,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data)
data << uint8(0); // mail's count
time_t cur_time = time(NULL);
- for (PlayerMails::iterator itr = pl->GetMailBegin(); itr != pl->GetMailEnd(); ++itr)
+ for (PlayerMails::iterator itr = player->GetMailBegin(); itr != player->GetMailEnd(); ++itr)
{
// packet send mail count as uint8, prevent overflow
if (mailsCount >= 254)
@@ -605,7 +605,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data)
for (uint8 i = 0; i < item_count; ++i)
{
- Item* item = pl->GetMItem((*itr)->items[i].item_guid);
+ Item* item = player->GetMItem((*itr)->items[i].item_guid);
// item index (0-6?)
data << uint8(i);
// item guid low?
@@ -658,17 +658,17 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
- Player* pl = _player;
+ Player* player = _player;
- Mail* m = pl->GetMail(mailId);
+ Mail* m = player->GetMail(mailId);
if (!m || (m->body.empty() && !m->mailTemplateId) || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL))
{
- pl->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_ERR_INTERNAL_ERROR);
+ player->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_ERR_INTERNAL_ERROR);
return;
}
Item* bodyItem = new Item; // This is not bag and then can be used new Item.
- if (!bodyItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl))
+ if (!bodyItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, player))
{
delete bodyItem;
return;
@@ -680,7 +680,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
MailTemplateEntry const* mailTemplateEntry = sMailTemplateStore.LookupEntry(m->mailTemplateId);
if (!mailTemplateEntry)
{
- pl->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_ERR_INTERNAL_ERROR);
+ player->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_ERR_INTERNAL_ERROR);
return;
}
@@ -700,14 +700,14 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
{
m->checked = m->checked | MAIL_CHECK_MASK_COPIED;
m->state = MAIL_STATE_CHANGED;
- pl->m_mailsUpdated = true;
+ player->m_mailsUpdated = true;
- pl->StoreItem(dest, bodyItem, true);
- pl->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_OK);
+ player->StoreItem(dest, bodyItem, true);
+ player->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_OK);
}
else
{
- pl->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_ERR_EQUIP_ERROR, msg);
+ player->SendMailResult(mailId, MAIL_MADE_PERMANENT, MAIL_ERR_EQUIP_ERROR, msg);
delete bodyItem;
}
}
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index 1b0cef69c04..7327cdbba65 100755
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -239,8 +239,8 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
data << uint32(matchcount); // placeholder, count of players matching criteria
data << uint32(displaycount); // placeholder, count of players displayed
- ACE_GUARD(ACE_Thread_Mutex, g, *HashMapHolder<Player>::GetLock());
- HashMapHolder<Player>::MapType& m = sObjectAccessor->GetPlayers();
+ TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
+ HashMapHolder<Player>::MapType const& m = sObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
if (AccountMgr::IsPlayerAccount(security))
@@ -339,12 +339,6 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
if ((matchcount++) >= sWorld->getIntConfig(CONFIG_MAX_WHO))
continue;
- if (itr->second->isGameMaster())
- {
- pname = "<GM>";
- pname.append(itr->second->GetName());
- }
-
data << pname; // player name
data << gname; // guild name
data << uint32(lvl); // player level
@@ -1196,18 +1190,18 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
_player->SetSelection(guid);
- Player* plr = ObjectAccessor::FindPlayer(guid);
- if (!plr) // wrong player
+ Player* player = ObjectAccessor::FindPlayer(guid);
+ if (!player) // wrong player
return;
uint32 talent_points = 0x47;
- uint32 guid_size = plr->GetPackGUID().wpos();
+ uint32 guid_size = player->GetPackGUID().wpos();
WorldPacket data(SMSG_INSPECT_TALENT, guid_size+4+talent_points);
- data.append(plr->GetPackGUID());
+ data.append(player->GetPackGUID());
if (sWorld->getBoolConfig(CONFIG_TALENTS_INSPECTING) || _player->isGameMaster())
{
- plr->BuildPlayerTalentsInfoData(&data);
+ player->BuildPlayerTalentsInfoData(&data);
}
else
{
@@ -1216,7 +1210,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
data << uint8(0); // talentGroupIndex
}
- plr->BuildEnchantmentsInfoData(&data);
+ player->BuildEnchantmentsInfoData(&data);
SendPacket(&data);
}
@@ -1297,15 +1291,15 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
return;
}
- Player* plr = sObjectAccessor->FindPlayerByName(charname.c_str());
+ Player* player = sObjectAccessor->FindPlayerByName(charname.c_str());
- if (!plr)
+ if (!player)
{
SendNotification(LANG_PLAYER_NOT_EXIST_OR_OFFLINE, charname.c_str());
return;
}
- uint32 accid = plr->GetSession()->GetAccountId();
+ uint32 accid = player->GetSession()->GetAccountId();
QueryResult result = LoginDatabase.PQuery("SELECT username, email, last_ip FROM account WHERE id=%u", accid);
if (!result)
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
index bf971cae32f..90368ae3011 100755
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
@@ -68,7 +68,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
if (GetPlayer()->IsInWorld())
{
sLog->outCrash("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId());
- oldMap->Remove(GetPlayer(), false);
+ oldMap->RemovePlayerFromMap(GetPlayer(), false);
}
// relocate the player to the teleport destination
@@ -88,7 +88,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->SetMap(newMap);
GetPlayer()->SendInitialPacketsBeforeAddToMap();
- if (!GetPlayer()->GetMap()->Add(GetPlayer()))
+ if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer()))
{
sLog->outError("WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.GetMapId());
GetPlayer()->ResetMap();
@@ -215,7 +215,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
WorldLocation const& dest = plMover->GetTeleportDest();
- plMover->SetPosition(dest, true);
+ plMover->UpdatePosition(dest, true);
uint32 newzone, newarea;
plMover->GetZoneAndAreaId(newzone, newarea);
@@ -355,7 +355,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
return;
}
- mover->SetPosition(movementInfo.pos);
+ mover->UpdatePosition(movementInfo.pos);
if (plMover) // nothing is charmed, or player charmed
{
@@ -373,7 +373,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
if (plMover->isAlive())
{
plMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
- // pl can be alive if GM/etc
+ // player can be alive if GM/etc
// change the death state to CORPSE to prevent the death timer from
// starting in the next player update
if (!plMover->isAlive())
diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
index bfd1fae2306..bf951619e63 100755
--- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
@@ -31,27 +31,44 @@
#include "Pet.h"
#include "MapManager.h"
-void WorldSession::SendNameQueryOpcode(Player* p)
+void WorldSession::SendNameQueryOpcode(uint64 guid)
{
- if (!p)
- return;
+ Player* player = NULL;
+ const CharacterNameData* nameData = sWorld->GetCharacterNameData(GUID_LOPART(guid));
+ if (nameData)
+ player = ObjectAccessor::FindPlayer(guid);
+
// guess size
WorldPacket data(SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+10));
- data.append(p->GetPackGUID()); // player guid
+ data.appendPackGUID(guid);
data << uint8(0); // added in 3.1
- data << p->GetName(); // played name
- data << uint8(0); // realm name for cross realm BG usage
- data << uint8(p->getRace());
- data << uint8(p->getGender());
- data << uint8(p->getClass());
- if (DeclinedName const* names = p->GetDeclinedNames())
+ if (nameData)
{
- data << uint8(1); // is declined
- for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
- data << names->name[i];
+ data << nameData->m_name; // played name
+ data << uint8(0); // realm name for cross realm BG usage
+ data << uint8(nameData->m_race);
+ data << uint8(nameData->m_gender);
+ data << uint8(nameData->m_class);
}
else
- data << uint8(0); // is not declined
+ {
+ data << std::string(GetTrinityString(LANG_NON_EXIST_CHARACTER));
+ data << uint32(0);
+ }
+
+ if (player)
+ {
+ if (DeclinedName const* names = player->GetDeclinedNames())
+ {
+ data << uint8(1); // is declined
+ for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ data << names->name[i];
+ }
+ else
+ data << uint8(0); // is not declined
+ }
+ else //TODO: decline names may also need to be stored in char name data
+ data << uint8(0);
SendPacket(&data);
}
@@ -65,32 +82,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
// This is disable by default to prevent lots of console spam
// sLog->outString("HandleNameQueryOpcode %u", guid);
- if (Player* pChar = ObjectAccessor::FindPlayer(guid))
- SendNameQueryOpcode(pChar);
- else
- {
- if (CharacterNameData* cname = sWorld->GetCharacterNameData(guid))
- {
- WorldPacket data(SMSG_NAME_QUERY_RESPONSE, 8+1+1+1+1+1+1+10);
- data.appendPackGUID(guid);
- data << uint8(0);
- if (cname->m_name == "")
- {
- data << std::string(GetTrinityString(LANG_NON_EXIST_CHARACTER));
- data << uint32(0);
- }
- else
- {
- data << cname->m_name;
- data << uint8(0);
- data << uint8(cname->m_race);
- data << uint8(cname->m_gender);
- data << uint8(cname->m_class);
- }
- data << uint8(0);
- SendPacket(&data);
- }
- }
+ SendNameQueryOpcode(guid);
}
void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recv_data*/)
@@ -387,8 +379,8 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
- if (PageTextLocale const* pl = sObjectMgr->GetPageTextLocale(pageID))
- ObjectMgr::GetLocaleString(pl->Text, loc_idx, Text);
+ if (PageTextLocale const* player = sObjectMgr->GetPageTextLocale(pageID))
+ ObjectMgr::GetLocaleString(player->Text, loc_idx, Text);
data << Text;
data << uint32(pageText->NextPage);
diff --git a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp b/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp
index 7187241cc3a..256f8b327ff 100644
--- a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp
@@ -129,16 +129,16 @@ void WorldSession::HandleEnterPlayerVehicle(WorldPacket &data)
uint64 guid;
data >> guid;
- if (Player* pl = ObjectAccessor::FindPlayer(guid))
+ if (Player* player = ObjectAccessor::FindPlayer(guid))
{
- if (!pl->GetVehicleKit())
+ if (!player->GetVehicleKit())
return;
- if (!pl->IsInRaidWith(_player))
+ if (!player->IsInRaidWith(_player))
return;
- if (!pl->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
+ if (!player->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
return;
- _player->EnterVehicle(pl);
+ _player->EnterVehicle(player);
}
}
@@ -157,23 +157,23 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
if (IS_PLAYER_GUID(guid))
{
- Player* plr = ObjectAccessor::FindPlayer(guid);
- if (!plr)
+ Player* player = ObjectAccessor::FindPlayer(guid);
+ if (!player)
{
sLog->outError("Player %u tried to eject player %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
return;
}
- if (!plr->IsOnVehicle(vehicle->GetBase()))
+ if (!player->IsOnVehicle(vehicle->GetBase()))
{
sLog->outError("Player %u tried to eject player %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
return;
}
- VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(plr);
+ VehicleSeatEntry const* seat = vehicle->GetSeatForPassenger(player);
ASSERT(seat);
if (seat->IsEjectable())
- plr->ExitVehicle();
+ player->ExitVehicle();
else
sLog->outError("Player %u attempted to eject player %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
}
diff --git a/src/server/game/Server/Protocol/WorldLog.cpp b/src/server/game/Server/Protocol/WorldLog.cpp
index 579e4363253..334c189af81 100755
--- a/src/server/game/Server/Protocol/WorldLog.cpp
+++ b/src/server/game/Server/Protocol/WorldLog.cpp
@@ -61,7 +61,7 @@ void WorldLog::outTimestampLog(char const* fmt, ...)
{
if (LogWorld())
{
- ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
ASSERT(i_file);
Log::outTimestamp(i_file);
@@ -89,7 +89,7 @@ void WorldLog::outLog(char const* fmt, ...)
{
if (LogWorld())
{
- ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
+ TRINITY_GUARD(ACE_Thread_Mutex, Lock);
ASSERT(i_file);
va_list args;
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index cc57b72d9b4..14c86286718 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -55,12 +55,12 @@ bool MapSessionFilter::Process(WorldPacket* packet)
if (opHandle.packetProcessing == PROCESS_THREADUNSAFE)
return false;
- Player* plr = m_pSession->GetPlayer();
- if (!plr)
+ Player* player = m_pSession->GetPlayer();
+ if (!player)
return false;
//in Map::Update() we do not process packets where player is not in world!
- return plr->IsInWorld();
+ return player->IsInWorld();
}
//we should process ALL packets when player is not in world/logged in
@@ -77,12 +77,12 @@ bool WorldSessionFilter::Process(WorldPacket* packet)
return true;
//no player attached? -> our client! ^^
- Player* plr = m_pSession->GetPlayer();
- if (!plr)
+ Player* player = m_pSession->GetPlayer();
+ if (!player)
return true;
//lets process all packets for non-in-the-world player
- return (plr->IsInWorld() == false);
+ return (player->IsInWorld() == false);
}
/// WorldSession constructor
@@ -494,7 +494,7 @@ void WorldSession::LogoutPlayer(bool Save)
_player->CleanupsBeforeDelete();
sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow());
Map* _map = _player->GetMap();
- _map->Remove(_player, true);
+ _map->RemovePlayerFromMap(_player, true);
SetPlayer(NULL); // deleted in Remove call
///- Send the 'logout complete' packet to the client
@@ -964,9 +964,9 @@ void WorldSession::SendAddonsInfo()
SendPacket(&data);
}
-void WorldSession::SetPlayer(Player* plr)
+void WorldSession::SetPlayer(Player* player)
{
- _player = plr;
+ _player = player;
// set m_GUID that can be used while player loggined and later until m_playerRecentlyLogout not reset
if (_player)
@@ -999,6 +999,7 @@ void WorldSession::ProcessQueryCallbacks()
HandleCharCreateCallback(pResult, _charCreateCallback.GetParam());
// Don't call FreeResult() here, the callback handler will do that depending on the events in the callback chain
}
+
//! HandlePlayerLoginOpcode
if (_charLoginCallback.ready())
{
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 8b8b3b96b85..4a83c2d4092 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -223,10 +223,10 @@ class WorldSession
void SizeError(WorldPacket const& packet, uint32 size) const;
- void ReadAddonsInfo(WorldPacket &data);
+ void ReadAddonsInfo(WorldPacket& data);
void SendAddonsInfo();
- void ReadMovementInfo(WorldPacket &data, MovementInfo* mi);
+ void ReadMovementInfo(WorldPacket& data, MovementInfo* mi);
void WriteMovementInfo(WorldPacket* data, MovementInfo* mi);
void SendPacket(WorldPacket const* packet);
@@ -247,7 +247,7 @@ class WorldSession
char const* GetPlayerName() const;
void SetSecurity(AccountTypes security) { _security = security; }
std::string const& GetRemoteAddress() { return m_Address; }
- void SetPlayer(Player* plr);
+ void SetPlayer(Player* player);
uint8 Expansion() const { return m_expansion; }
/// Session in auth.queue currently
@@ -278,11 +278,11 @@ class WorldSession
void SendAuthWaitQue(uint32 position);
//void SendTestCreatureQueryOpcode(uint32 entry, uint64 guid, uint32 testvalue);
- void SendNameQueryOpcode(Player* p);
+ void SendNameQueryOpcode(uint64 guid);
void SendTrainerList(uint64 guid);
void SendTrainerList(uint64 guid, const std::string& strTitle);
- void SendListInventory(uint64 vendorGuid);
+ void SendListInventory(uint64 guid);
void SendShowBank(uint64 guid);
void SendTabardVendorActivate(uint64 guid);
void SendSpiritResurrect();
@@ -381,9 +381,7 @@ class WorldSession
}
bool IsConnectionIdle() const
{
- if (m_timeOutTime <= 0 && !m_inQueue)
- return true;
- return false;
+ return (m_timeOutTime <= 0 && !m_inQueue);
}
// Recruit-A-Friend Handling
@@ -421,11 +419,11 @@ class WorldSession
void HandleInspectHonorStatsOpcode(WorldPacket& recvPacket);
void HandleMoveWaterWalkAck(WorldPacket& recvPacket);
- void HandleFeatherFallAck(WorldPacket &recv_data);
+ void HandleFeatherFallAck(WorldPacket& recv_data);
- void HandleMoveHoverAck(WorldPacket & recv_data);
+ void HandleMoveHoverAck(WorldPacket& recv_data);
- void HandleMountSpecialAnimOpcode(WorldPacket &recvdata);
+ void HandleMountSpecialAnimOpcode(WorldPacket& recvdata);
// character view
void HandleShowingHelmOpcode(WorldPacket& recv_data);
@@ -438,7 +436,7 @@ class WorldSession
void HandleMoveKnockBackAck(WorldPacket& recvPacket);
void HandleMoveTeleportAck(WorldPacket& recvPacket);
- void HandleForceSpeedChangeAck(WorldPacket & recv_data);
+ void HandleForceSpeedChangeAck(WorldPacket& recv_data);
void HandlePingOpcode(WorldPacket& recvPacket);
void HandleAuthSessionOpcode(WorldPacket& recvPacket);
@@ -483,10 +481,10 @@ class WorldSession
void HandleAreaTriggerOpcode(WorldPacket& recvPacket);
- void HandleSetFactionAtWar(WorldPacket & recv_data);
- void HandleSetFactionCheat(WorldPacket & recv_data);
- void HandleSetWatchedFactionOpcode(WorldPacket & recv_data);
- void HandleSetFactionInactiveOpcode(WorldPacket & recv_data);
+ void HandleSetFactionAtWar(WorldPacket& recv_data);
+ void HandleSetFactionCheat(WorldPacket& recv_data);
+ void HandleSetWatchedFactionOpcode(WorldPacket& recv_data);
+ void HandleSetFactionInactiveOpcode(WorldPacket& recv_data);
void HandleUpdateAccountData(WorldPacket& recvPacket);
void HandleRequestAccountData(WorldPacket& recvPacket);
@@ -507,17 +505,17 @@ class WorldSession
void HandleMoveWorldportAckOpcode(); // for server-side calls
void HandleMovementOpcodes(WorldPacket& recvPacket);
- void HandleSetActiveMoverOpcode(WorldPacket &recv_data);
- void HandleMoveNotActiveMover(WorldPacket &recv_data);
- void HandleDismissControlledVehicle(WorldPacket &recv_data);
- void HandleRequestVehicleExit(WorldPacket &recv_data);
- void HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data);
- void HandleMoveTimeSkippedOpcode(WorldPacket &recv_data);
+ void HandleSetActiveMoverOpcode(WorldPacket& recv_data);
+ void HandleMoveNotActiveMover(WorldPacket& recv_data);
+ void HandleDismissControlledVehicle(WorldPacket& recv_data);
+ void HandleRequestVehicleExit(WorldPacket& recv_data);
+ void HandleChangeSeatsOnControlledVehicle(WorldPacket& recv_data);
+ void HandleMoveTimeSkippedOpcode(WorldPacket& recv_data);
- void HandleRequestRaidInfoOpcode(WorldPacket & recv_data);
+ void HandleRequestRaidInfoOpcode(WorldPacket& recv_data);
- void HandleBattlefieldStatusOpcode(WorldPacket &recv_data);
- void HandleBattleMasterHelloOpcode(WorldPacket &recv_data);
+ void HandleBattlefieldStatusOpcode(WorldPacket& recv_data);
+ void HandleBattleMasterHelloOpcode(WorldPacket& recv_data);
void HandleGroupInviteOpcode(WorldPacket& recvPacket);
//void HandleGroupCancelOpcode(WorldPacket& recvPacket);
@@ -527,17 +525,17 @@ class WorldSession
void HandleGroupUninviteGuidOpcode(WorldPacket& recvPacket);
void HandleGroupSetLeaderOpcode(WorldPacket& recvPacket);
void HandleGroupDisbandOpcode(WorldPacket& recvPacket);
- void HandleOptOutOfLootOpcode(WorldPacket &recv_data);
+ void HandleOptOutOfLootOpcode(WorldPacket& recv_data);
void HandleLootMethodOpcode(WorldPacket& recvPacket);
- void HandleLootRoll(WorldPacket &recv_data);
- void HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data);
- void HandleRaidTargetUpdateOpcode(WorldPacket & recv_data);
- void HandleRaidReadyCheckOpcode(WorldPacket & recv_data);
- void HandleRaidReadyCheckFinishedOpcode(WorldPacket & recv_data);
- void HandleGroupRaidConvertOpcode(WorldPacket & recv_data);
- void HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data);
- void HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data);
- void HandlePartyAssignmentOpcode(WorldPacket & recv_data);
+ void HandleLootRoll(WorldPacket& recv_data);
+ void HandleRequestPartyMemberStatsOpcode(WorldPacket& recv_data);
+ void HandleRaidTargetUpdateOpcode(WorldPacket& recv_data);
+ void HandleRaidReadyCheckOpcode(WorldPacket& recv_data);
+ void HandleRaidReadyCheckFinishedOpcode(WorldPacket& recv_data);
+ void HandleGroupRaidConvertOpcode(WorldPacket& recv_data);
+ void HandleGroupChangeSubGroupOpcode(WorldPacket& recv_data);
+ void HandleGroupAssistantLeaderOpcode(WorldPacket& recv_data);
+ void HandlePartyAssignmentOpcode(WorldPacket& recv_data);
void HandlePetitionBuyOpcode(WorldPacket& recv_data);
void HandlePetitionShowSignOpcode(WorldPacket& recv_data);
@@ -613,25 +611,25 @@ class WorldSession
void HandleUnacceptTradeOpcode(WorldPacket& recvPacket);
void HandleAuctionHelloOpcode(WorldPacket& recvPacket);
- void HandleAuctionListItems(WorldPacket & recv_data);
- void HandleAuctionListBidderItems(WorldPacket & recv_data);
- void HandleAuctionSellItem(WorldPacket & recv_data);
- void HandleAuctionRemoveItem(WorldPacket & recv_data);
- void HandleAuctionListOwnerItems(WorldPacket & recv_data);
- void HandleAuctionPlaceBid(WorldPacket & recv_data);
- void HandleAuctionListPendingSales(WorldPacket & recv_data);
-
- void HandleGetMailList(WorldPacket & recv_data);
- void HandleSendMail(WorldPacket & recv_data);
- void HandleMailTakeMoney(WorldPacket & recv_data);
- void HandleMailTakeItem(WorldPacket & recv_data);
- void HandleMailMarkAsRead(WorldPacket & recv_data);
- void HandleMailReturnToSender(WorldPacket & recv_data);
- void HandleMailDelete(WorldPacket & recv_data);
- void HandleItemTextQuery(WorldPacket & recv_data);
- void HandleMailCreateTextItem(WorldPacket & recv_data);
- void HandleQueryNextMailTime(WorldPacket & recv_data);
- void HandleCancelChanneling(WorldPacket & recv_data);
+ void HandleAuctionListItems(WorldPacket& recv_data);
+ void HandleAuctionListBidderItems(WorldPacket& recv_data);
+ void HandleAuctionSellItem(WorldPacket& recv_data);
+ void HandleAuctionRemoveItem(WorldPacket& recv_data);
+ void HandleAuctionListOwnerItems(WorldPacket& recv_data);
+ void HandleAuctionPlaceBid(WorldPacket& recv_data);
+ void HandleAuctionListPendingSales(WorldPacket& recv_data);
+
+ void HandleGetMailList(WorldPacket& recv_data);
+ void HandleSendMail(WorldPacket& recv_data);
+ void HandleMailTakeMoney(WorldPacket& recv_data);
+ void HandleMailTakeItem(WorldPacket& recv_data);
+ void HandleMailMarkAsRead(WorldPacket& recv_data);
+ void HandleMailReturnToSender(WorldPacket& recv_data);
+ void HandleMailDelete(WorldPacket& recv_data);
+ void HandleItemTextQuery(WorldPacket& recv_data);
+ void HandleMailCreateTextItem(WorldPacket& recv_data);
+ void HandleQueryNextMailTime(WorldPacket& recv_data);
+ void HandleCancelChanneling(WorldPacket& recv_data);
void SendItemPageInfo(ItemTemplate* itemProto);
void HandleSplitItemOpcode(WorldPacket& recvPacket);
@@ -645,9 +643,9 @@ class WorldSession
void HandleListInventoryOpcode(WorldPacket& recvPacket);
void HandleAutoStoreBagItemOpcode(WorldPacket& recvPacket);
void HandleReadItem(WorldPacket& recvPacket);
- void HandleAutoEquipItemSlotOpcode(WorldPacket & recvPacket);
- void HandleSwapItem(WorldPacket & recvPacket);
- void HandleBuybackItem(WorldPacket & recvPacket);
+ void HandleAutoEquipItemSlotOpcode(WorldPacket& recvPacket);
+ void HandleSwapItem(WorldPacket& recvPacket);
+ void HandleBuybackItem(WorldPacket& recvPacket);
void HandleAutoBankItemOpcode(WorldPacket& recvPacket);
void HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket);
void HandleWrapItemOpcode(WorldPacket& recvPacket);
@@ -728,18 +726,18 @@ class WorldSession
void HandlePageQuerySkippedOpcode(WorldPacket& recvPacket);
void HandlePageTextQueryOpcode(WorldPacket& recvPacket);
- void HandleTutorialFlag (WorldPacket & recv_data);
- void HandleTutorialClear(WorldPacket & recv_data);
- void HandleTutorialReset(WorldPacket & recv_data);
+ void HandleTutorialFlag (WorldPacket& recv_data);
+ void HandleTutorialClear(WorldPacket& recv_data);
+ void HandleTutorialReset(WorldPacket& recv_data);
//Pet
- void HandlePetAction(WorldPacket & recv_data);
+ void HandlePetAction(WorldPacket& recv_data);
void HandlePetStopAttack(WorldPacket& recv_data);
void HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2);
- void HandlePetNameQuery(WorldPacket & recv_data);
- void HandlePetSetAction(WorldPacket & recv_data);
- void HandlePetAbandon(WorldPacket & recv_data);
- void HandlePetRename(WorldPacket & recv_data);
+ void HandlePetNameQuery(WorldPacket& recv_data);
+ void HandlePetSetAction(WorldPacket& recv_data);
+ void HandlePetAbandon(WorldPacket& recv_data);
+ void HandlePetRename(WorldPacket& recv_data);
void HandlePetCancelAuraOpcode(WorldPacket& recvPacket);
void HandlePetSpellAutocastOpcode(WorldPacket& recvPacket);
void HandlePetCastSpellOpcode(WorldPacket& recvPacket);
@@ -756,15 +754,15 @@ class WorldSession
void HandleDismissCritter(WorldPacket& recv_data);
//Battleground
- void HandleBattlemasterHelloOpcode(WorldPacket &recv_data);
- void HandleBattlemasterJoinOpcode(WorldPacket &recv_data);
+ void HandleBattlemasterHelloOpcode(WorldPacket& recv_data);
+ void HandleBattlemasterJoinOpcode(WorldPacket& recv_data);
void HandleBattlegroundPlayerPositionsOpcode(WorldPacket& recv_data);
- void HandlePVPLogDataOpcode(WorldPacket &recv_data);
- void HandleBattleFieldPortOpcode(WorldPacket &recv_data);
- void HandleBattlefieldListOpcode(WorldPacket &recv_data);
- void HandleLeaveBattlefieldOpcode(WorldPacket &recv_data);
- void HandleBattlemasterJoinArena(WorldPacket &recv_data);
- void HandleReportPvPAFK(WorldPacket &recv_data);
+ void HandlePVPLogDataOpcode(WorldPacket& recv_data);
+ void HandleBattleFieldPortOpcode(WorldPacket& recv_data);
+ void HandleBattlefieldListOpcode(WorldPacket& recv_data);
+ void HandleLeaveBattlefieldOpcode(WorldPacket& recv_data);
+ void HandleBattlemasterJoinArena(WorldPacket& recv_data);
+ void HandleReportPvPAFK(WorldPacket& recv_data);
void HandleWardenDataOpcode(WorldPacket& recv_data);
void HandleWorldTeleportOpcode(WorldPacket& recv_data);
@@ -783,17 +781,17 @@ class WorldSession
void HandleInstanceLockResponse(WorldPacket& recvPacket);
// Looking for Dungeon/Raid
- void HandleLfgSetCommentOpcode(WorldPacket & recv_data);
+ void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
void HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& recv_data);
void HandleLfgPartyLockInfoRequestOpcode(WorldPacket& recv_data);
- void HandleLfgJoinOpcode(WorldPacket &recv_data);
- void HandleLfgLeaveOpcode(WorldPacket & /*recv_data*/);
- void HandleLfgSetRolesOpcode(WorldPacket &recv_data);
- void HandleLfgProposalResultOpcode(WorldPacket &recv_data);
- void HandleLfgSetBootVoteOpcode(WorldPacket &recv_data);
- void HandleLfgTeleportOpcode(WorldPacket &recv_data);
- void HandleLfrSearchOpcode(WorldPacket &recv_data);
- void HandleLfrLeaveOpcode(WorldPacket &recv_data);
+ void HandleLfgJoinOpcode(WorldPacket& recv_data);
+ void HandleLfgLeaveOpcode(WorldPacket& recv_data);
+ void HandleLfgSetRolesOpcode(WorldPacket& recv_data);
+ void HandleLfgProposalResultOpcode(WorldPacket& recv_data);
+ void HandleLfgSetBootVoteOpcode(WorldPacket& recv_data);
+ void HandleLfgTeleportOpcode(WorldPacket& recv_data);
+ void HandleLfrSearchOpcode(WorldPacket& recv_data);
+ void HandleLfrLeaveOpcode(WorldPacket& recv_data);
void SendLfgUpdatePlayer(const LfgUpdateData& updateData);
void SendLfgUpdateParty(const LfgUpdateData& updateData);
@@ -836,7 +834,7 @@ class WorldSession
void HandleItemRefundInfoRequest(WorldPacket& recv_data);
void HandleItemRefund(WorldPacket& recv_data);
- void HandleChannelVoiceOnOpcode(WorldPacket & recv_data);
+ void HandleChannelVoiceOnOpcode(WorldPacket& recv_data);
void HandleVoiceSessionEnableOpcode(WorldPacket& recv_data);
void HandleSetActiveVoiceChannel(WorldPacket& recv_data);
void HandleSetTaxiBenchmarkOpcode(WorldPacket& recv_data);
@@ -878,7 +876,7 @@ class WorldSession
void HandleCalendarGetNumPending(WorldPacket& recv_data);
void HandleSpellClick(WorldPacket& recv_data);
- void HandleMirrorImageDataRequest(WorldPacket & recv_data);
+ void HandleMirrorImageDataRequest(WorldPacket& recv_data);
void HandleAlterAppearance(WorldPacket& recv_data);
void HandleRemoveGlyph(WorldPacket& recv_data);
void HandleCharCustomize(WorldPacket& recv_data);
@@ -890,8 +888,8 @@ class WorldSession
void HandleReadyForAccountDataTimes(WorldPacket& recv_data);
void HandleQueryQuestsCompleted(WorldPacket& recv_data);
void HandleQuestPOIQuery(WorldPacket& recv_data);
- void HandleEjectPassenger(WorldPacket &data);
- void HandleEnterPlayerVehicle(WorldPacket &data);
+ void HandleEjectPassenger(WorldPacket& data);
+ void HandleEnterPlayerVehicle(WorldPacket& data);
void HandleUpdateProjectilePosition(WorldPacket& recvPacket);
private:
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 3875156289e..0ddc03e3d5c 100755
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -802,7 +802,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
recvPacket >> clientSeed;
recvPacket >> unk5 >> unk6 >> unk7;
recvPacket >> unk4;
- recvPacket.read (digest, 20);
+ recvPacket.read(digest, 20);
sLog->outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
BuiltNumberClient,
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index ec29273d6b0..5fb66524976 100755
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
@@ -109,7 +109,7 @@ class ReactorRunnable : protected ACE_Task_Base
int AddSocket (WorldSocket* sock)
{
- ACE_GUARD_RETURN (ACE_Thread_Mutex, Guard, m_NewSockets_Lock, -1);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_NewSockets_Lock);
++m_Connections;
sock->AddReference();
@@ -130,7 +130,7 @@ class ReactorRunnable : protected ACE_Task_Base
void AddNewSockets()
{
- ACE_GUARD (ACE_Thread_Mutex, Guard, m_NewSockets_Lock);
+ TRINITY_GUARD(ACE_Thread_Mutex, m_NewSockets_Lock);
if (m_NewSockets.empty())
return;
@@ -192,7 +192,7 @@ class ReactorRunnable : protected ACE_Task_Base
}
}
- sLog->outStaticDebug ("Network Thread Exitting");
+ sLog->outStaticDebug ("Network Thread exits");
return 0;
}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 4876f435f55..152f94ad420 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -719,7 +719,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
case SPELL_AURA_MOD_THREAT:
{
uint8 level_diff = 0;
- float multiplier = 0.0;
+ float multiplier = 0.0f;
switch (GetId())
{
// Arcane Shroud
@@ -903,25 +903,6 @@ void AuraEffect::CalculateSpellMod()
default:
break;
}
- case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
- switch (GetId())
- {
- case 51466: // Elemental oath
- case 51470: // Elemental oath
- // "while Clearcasting from Elemental Focus is active, you deal 5%/10% more spell damage."
- if (!m_spellmod)
- {
- m_spellmod = new SpellModifier(GetBase());
- m_spellmod->op = SPELLMOD_EFFECT2;
- m_spellmod->type = SPELLMOD_FLAT;
- m_spellmod->spellId = GetId();
- m_spellmod->mask[1] = 0x0004000;
- }
- m_spellmod->value = GetBase()->GetUnitOwner()->CalculateSpellDamage(GetBase()->GetUnitOwner(), GetSpellInfo(), 1);
- break;
- default:
- break;
- }
break;
case SPELL_AURA_ADD_FLAT_MODIFIER:
case SPELL_AURA_ADD_PCT_MODIFIER:
@@ -1588,9 +1569,9 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
target->RemoveAurasDueToSpell(spellId2);
// Improved Barkskin - apply/remove armor bonus due to shapeshift
- if (Player* pl=target->ToPlayer())
+ if (Player* player=target->ToPlayer())
{
- if (pl->HasSpell(63410) || pl->HasSpell(63411))
+ if (player->HasSpell(63410) || player->HasSpell(63411))
{
target->RemoveAurasDueToSpell(66530);
target->CastSpell(target, 66530, true);
@@ -2866,7 +2847,7 @@ void AuraEffect::HandleAuraAllowFlight(AuraApplication const* aurApp, uint8 mode
if (target->GetTypeId() == TYPEID_UNIT)
target->SetFlying(apply);
- if (Player* plr = target->m_movedPlayer)
+ if (Player* player = target->m_movedPlayer)
{
// allow flying
WorldPacket data;
@@ -2876,7 +2857,7 @@ void AuraEffect::HandleAuraAllowFlight(AuraApplication const* aurApp, uint8 mode
data.Initialize(SMSG_MOVE_UNSET_CAN_FLY, 12);
data.append(target->GetPackGUID());
data << uint32(0); // unk
- plr->SendDirectMessage(&data);
+ player->SendDirectMessage(&data);
}
}
@@ -3265,16 +3246,16 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(AuraApplication const* aurApp,
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
if (mode & AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK && (apply || (!target->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !target->HasAuraType(SPELL_AURA_FLY))))
{
- if (Player* plr = target->m_movedPlayer)
+ if (Player* player = target->m_movedPlayer)
{
WorldPacket data;
if (apply)
data.Initialize(SMSG_MOVE_SET_CAN_FLY, 12);
else
data.Initialize(SMSG_MOVE_UNSET_CAN_FLY, 12);
- data.append(plr->GetPackGUID());
+ data.append(player->GetPackGUID());
data << uint32(0); // unknown
- plr->SendDirectMessage(&data);
+ player->SendDirectMessage(&data);
}
}
@@ -4003,8 +3984,18 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(AuraApplication const* aurAp
// return;
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType);
+ float amount = float(GetAmount());
- target->HandleStatModifier(unitMod, TOTAL_PCT, float(GetAmount()), apply);
+ if (apply)
+ {
+ target->HandleStatModifier(unitMod, TOTAL_PCT, amount, apply);
+ target->ModifyPowerPct(powerType, amount, apply);
+ }
+ else
+ {
+ target->ModifyPowerPct(powerType, amount, apply);
+ target->HandleStatModifier(unitMod, TOTAL_PCT, amount, apply);
+ }
}
void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -5403,9 +5394,9 @@ void AuraEffect::HandleAuraConvertRune(AuraApplication const* aurApp, uint8 mode
if (target->GetTypeId() != TYPEID_PLAYER)
return;
- Player* plr = (Player*)target;
+ Player* player = (Player*)target;
- if (plr->getClass() != CLASS_DEATH_KNIGHT)
+ if (player->getClass() != CLASS_DEATH_KNIGHT)
return;
uint32 runes = m_amount;
@@ -5414,17 +5405,17 @@ void AuraEffect::HandleAuraConvertRune(AuraApplication const* aurApp, uint8 mode
{
for (uint32 i = 0; i < MAX_RUNES && runes; ++i)
{
- if (GetMiscValue() != plr->GetCurrentRune(i))
+ if (GetMiscValue() != player->GetCurrentRune(i))
continue;
- if (!plr->GetRuneCooldown(i))
+ if (!player->GetRuneCooldown(i))
{
- plr->AddRuneByAuraEffect(i, RuneType(GetMiscValueB()), this);
+ player->AddRuneByAuraEffect(i, RuneType(GetMiscValueB()), this);
--runes;
}
}
}
else
- plr->RemoveRunesByAuraEffect(this);
+ player->RemoveRunesByAuraEffect(this);
}
void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, bool apply) const
@@ -5608,6 +5599,9 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
case 66149: // Bullet Controller Periodic - 10 Man
case 68396: // Bullet Controller Periodic - 25 Man
{
+ if (!caster)
+ break;
+
caster->CastCustomSpell(66152, SPELLVALUE_MAX_TARGETS, urand(1, 6), target, true);
caster->CastCustomSpell(66153, SPELLVALUE_MAX_TARGETS, urand(1, 6), target, true);
break;
@@ -5720,9 +5714,8 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
// eff_radius == 0
float radius = GetSpellInfo()->GetMaxRange(false);
- CellPair p(Trinity::ComputeCellPair(target->GetPositionX(), target->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(target->GetPositionX(), target->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
Trinity::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck u_check(target, radius);
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck> checker(target, targets, u_check);
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index df6ac44f2cc..525084a70ed 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -557,7 +557,14 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
else
{
// owner has to be in world, or effect has to be applied to self
- ASSERT((!GetOwner()->IsInWorld() && GetOwner() == itr->first) || GetOwner()->IsInMap(itr->first));
+ if (!GetOwner()->IsSelfOrInSameMap(itr->first))
+ {
+ //TODO: There is a crash caused by shadowfiend load addon
+ sLog->outCrash("Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
+ GetOwner()->GetName(), GetOwner()->IsInWorld() ? GetOwner()->GetMap()->GetId() : uint32(-1),
+ itr->first->GetName(), itr->first->IsInWorld() ? itr->first->GetMap()->GetId() : uint32(-1));
+ ASSERT(false);
+ }
itr->first->_CreateAuraApplication(this, itr->second);
++itr;
}
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index fd782519410..dc56e04c3b5 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -598,9 +598,8 @@ WorldObject* Spell::FindCorpseUsing()
// non-standard target selection
float max_range = m_spellInfo->GetMaxRange(false);
- CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(m_caster->GetPositionX(), m_caster->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
WorldObject* result = NULL;
@@ -1202,7 +1201,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
m_spellAura = NULL; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied
//Spells with this flag cannot trigger if effect is casted on self
- // Slice and Dice, relentless strikes, eviscerate
bool canEffectTrigger = !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_CANT_TRIGGER_PROC) && unitTarget->CanProc() && CanExecuteTriggersOnHit(mask);
Unit* spellHitTarget = NULL;
@@ -1433,7 +1431,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
if (m_spellInfo->Speed > 0.0f && unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE) && unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
return SPELL_MISS_EVADE;
- if (m_caster->IsValidAttackTarget(unit))
+ if (m_caster->_IsValidAttackTarget(unit, m_spellInfo))
{
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
//TODO: This is a hack. But we do not know what types of stealth should be interrupted by CC
@@ -1539,7 +1537,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
if (AuraApplication* aurApp = m_spellAura->GetApplicationOfTarget(m_originalCaster->GetGUID()))
positive = aurApp->IsPositive();
- duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive);
+ duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive, effectMask);
// Haste modifies duration of channeled spells
if (m_spellInfo->IsChanneled())
@@ -1598,12 +1596,12 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
// this is executed after spell proc spells on target hit
// spells are triggered for each hit spell target
// info confirmed with retail sniffs of permafrost and shadow weaving
- if (!m_hitTriggerSpells.empty() && CanExecuteTriggersOnHit(effMask))
+ if (!m_hitTriggerSpells.empty())
{
int _duration = 0;
for (HitTriggerSpells::const_iterator i = m_hitTriggerSpells.begin(); i != m_hitTriggerSpells.end(); ++i)
{
- if (roll_chance_i(i->second))
+ if (CanExecuteTriggersOnHit(effMask, i->first) && roll_chance_i(i->second))
{
m_caster->CastSpell(unit, i->first, true);
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first->Id);
@@ -3836,19 +3834,23 @@ void Spell::SendSpellGo()
if (castFlags & CAST_FLAG_RUNE_LIST) // rune cooldowns list
{
- Player* player = m_caster->ToPlayer();
- uint8 runeMaskInitial = m_runesState;
- uint8 runeMaskAfterCast = player->GetRunesState();
- data << uint8(runeMaskInitial); // runes state before
- data << uint8(runeMaskAfterCast); // runes state after
- for (uint8 i = 0; i < MAX_RUNES; ++i)
+ //TODO: There is a crash caused by a spell with CAST_FLAG_RUNE_LIST casted by a creature
+ //The creature is the mover of a player, so HandleCastSpellOpcode uses it as the caster
+ if (Player* player = m_caster->ToPlayer())
{
- uint8 mask = (1 << i);
- if (mask & runeMaskInitial && !(mask & runeMaskAfterCast)) // usable before andon cooldown now...
+ uint8 runeMaskInitial = m_runesState;
+ uint8 runeMaskAfterCast = player->GetRunesState();
+ data << uint8(runeMaskInitial); // runes state before
+ data << uint8(runeMaskAfterCast); // runes state after
+ for (uint8 i = 0; i < MAX_RUNES; ++i)
{
- // float casts ensure the division is performed on floats as we need float result
- float baseCd = float(player->GetRuneBaseCooldown(i));
- data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255); // rune cooldown passed
+ uint8 mask = (1 << i);
+ if (mask & runeMaskInitial && !(mask & runeMaskAfterCast)) // usable before andon cooldown now...
+ {
+ // float casts ensure the division is performed on floats as we need float result
+ float baseCd = float(player->GetRuneBaseCooldown(i));
+ data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255); // rune cooldown passed
+ }
}
}
}
@@ -4328,9 +4330,9 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return SPELL_CAST_OK;
- Player* plr = (Player*)m_caster;
+ Player* player = (Player*)m_caster;
- if (plr->getClass() != CLASS_DEATH_KNIGHT)
+ if (player->getClass() != CLASS_DEATH_KNIGHT)
return SPELL_CAST_OK;
SpellRuneCostEntry const* src = sSpellRuneCostStore.LookupEntry(runeCostID);
@@ -4354,8 +4356,8 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID)
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
- RuneType rune = plr->GetCurrentRune(i);
- if ((plr->GetRuneCooldown(i) == 0) && (runeCost[rune] > 0))
+ RuneType rune = player->GetCurrentRune(i);
+ if ((player->GetRuneCooldown(i) == 0) && (runeCost[rune] > 0))
runeCost[rune]--;
}
@@ -5639,7 +5641,16 @@ SpellCastResult Spell::CheckRange(bool strict)
if (!strict && m_casttime == 0)
return SPELL_CAST_OK;
- uint32 range_type = m_spellInfo->RangeEntry ? m_spellInfo->RangeEntry->type : 0;
+ uint32 range_type = 0;
+
+ if (m_spellInfo->RangeEntry)
+ {
+ // self cast is used for triggered spells, no range checking needed
+ if (m_spellInfo->RangeEntry->ID == 1)
+ return SPELL_CAST_OK;
+
+ range_type = m_spellInfo->RangeEntry->type;
+ }
Unit* target = m_targets.GetUnitTarget();
float max_range = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo);
@@ -5820,9 +5831,8 @@ SpellCastResult Spell::CheckItems()
// check spell focus object
if (m_spellInfo->RequiresSpellFocus)
{
- CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(m_caster->GetPositionX(), m_caster->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
GameObject* ok = NULL;
Trinity::GameObjectFocusCheck go_check(m_caster, m_spellInfo->RequiresSpellFocus);
@@ -6409,7 +6419,8 @@ bool Spell::IsNextMeleeSwingSpell() const
bool Spell::IsAutoActionResetSpell() const
{
- return !IsTriggered() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK);
+ // TODO: changed SPELL_INTERRUPT_FLAG_AUTOATTACK -> SPELL_INTERRUPT_FLAG_INTERRUPT to fix compile - is this check correct at all?
+ return !IsTriggered() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT);
}
bool Spell::IsNeedSendToClient() const
@@ -7085,17 +7096,17 @@ void Spell::CallScriptAfterUnitTargetSelectHandlers(std::list<Unit*>& unitTarget
}
}
-bool Spell::CanExecuteTriggersOnHit(uint8 effMask) const
+bool Spell::CanExecuteTriggersOnHit(uint8 effMask, SpellInfo const* spellInfo) const
{
- // check which effects can trigger proc
- // don't allow to proc for dummy-only spell target hits
- // prevents triggering/procing effects twice from spells like Eviscerate
- for (uint8 i = 0;effMask && i < MAX_SPELL_EFFECTS; ++i)
+ bool only_on_dummy = (spellInfo && (spellInfo->AttributesEx4 & SPELL_ATTR4_PROC_ONLY_ON_DUMMY));
+ // If triggered spell has SPELL_ATTR4_PROC_ONLY_ON_DUMMY then it can only proc on a casted spell with SPELL_EFFECT_DUMMY
+ // If triggered spell doesn't have SPELL_ATTR4_PROC_ONLY_ON_DUMMY then it can NOT proc on SPELL_EFFECT_DUMMY (needs confirmation)
+ for (uint8 i = 0;i < MAX_SPELL_EFFECTS; ++i)
{
- if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_DUMMY)
- effMask &= ~(1<<i);
+ if ((effMask & (1 << i)) && (only_on_dummy == (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_DUMMY)))
+ return true;
}
- return effMask;
+ return false;
}
void Spell::PrepareTriggersExecutedOnHit()
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 27b0844f32e..624c3b9b9b3 100755
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -453,7 +453,7 @@ class Spell
UsedSpellMods m_appliedMods;
- int32 CalcCastTime() const { return m_casttime; }
+ int32 GetCastTime() const { return m_casttime; }
bool IsAutoRepeat() const { return m_autoRepeat; }
void SetAutoRepeat(bool rep) { m_autoRepeat = rep; }
void ReSetTimer() { m_timer = m_casttime > 0 ? m_casttime : 0; }
@@ -633,7 +633,7 @@ class Spell
void CallScriptAfterUnitTargetSelectHandlers(std::list<Unit*>& unitTargets, SpellEffIndex effIndex);
std::list<SpellScript*> m_loadedScripts;
- bool CanExecuteTriggersOnHit(uint8 effMask) const;
+ bool CanExecuteTriggersOnHit(uint8 effMask, SpellInfo const* spellInfo = NULL) const;
void PrepareTriggersExecutedOnHit();
typedef std::list< std::pair<SpellInfo const*, int32> > HitTriggerSpells;
HitTriggerSpells m_hitTriggerSpells;
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 926a2280d18..db48f2b8693 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -456,7 +456,11 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
ApplyPctF(damage, m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
// Shield Slam
else if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
- damage += int32(m_caster->ApplyEffectModifiers(m_spellInfo, effIndex, float(m_caster->GetShieldBlockValue())));
+ {
+ uint8 level = m_caster->getLevel();
+ uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f), uint32(float(level) * 34.5f));
+ damage += int32(m_caster->ApplyEffectModifiers(m_spellInfo, effIndex, float(block_value)));
+ }
// Victory Rush
else if (m_spellInfo->SpellFamilyFlags[1] & 0x100)
ApplyPctF(damage, m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
@@ -716,7 +720,9 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
// Shield of Righteousness
if (m_spellInfo->SpellFamilyFlags[EFFECT_1] & 0x100000)
{
- damage += CalculatePctN(m_caster->GetShieldBlockValue(), m_spellInfo->Effects[EFFECT_1].CalcValue());
+ uint8 level = m_caster->getLevel();
+ uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 29.5f), uint32(float(level) * 39.5f));
+ damage += CalculatePctN(block_value, m_spellInfo->Effects[EFFECT_1].CalcValue());
break;
}
break;
@@ -1663,13 +1669,6 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
}
return;
}
- // Priest Shadowfiend (34433) need apply mana gain trigger aura on pet
- case 41967:
- {
- if (Unit* pet = unitTarget->GetGuardianPet())
- pet->CastSpell(pet, 28305, true);
- return;
- }
}
}
@@ -2142,6 +2141,16 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
&& effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
+ //! it's possible for spells with this spell effect to either have a target or no target
+ //! in case of a target, we will execute this handler on SPELL_EFFECT_HANDLE_HIT_TARGET
+ //! with all relevant variables, and we will skip SPELL_EFFECT_HANDLE_HIT
+ if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT)
+ {
+ if (GetSpellInfo()->Effects[effIndex].TargetA.GetTarget() != 0 ||
+ GetSpellInfo()->Effects[effIndex].TargetB.GetTarget() != 0)
+ return;
+ }
+
WorldObject* target = NULL;
// call events for target if present
@@ -2238,6 +2247,13 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
addhealth += damageAmount;
}
+ // Runic Healing Injector (heal increased by 25% for engineers - 3.2.0 patch change)
+ else if (m_spellInfo->Id == 67489)
+ {
+ if (Player* player = m_caster->ToPlayer())
+ if (player->HasSkill(SKILL_ENGINEERING))
+ AddPctN(addhealth, 25);
+ }
// Swiftmend - consumes Regrowth or Rejuvenation
else if (m_spellInfo->TargetAuraState == AURA_STATE_SWIFTMEND && unitTarget->HasAuraState(AURA_STATE_SWIFTMEND, m_spellInfo, m_caster))
{
@@ -2575,7 +2591,7 @@ void Spell::EffectPersistentAA(SpellEffIndex effIndex)
return;
}
- dynObj->GetMap()->Add(dynObj);
+ dynObj->GetMap()->AddToMap(dynObj);
if (Aura* aura = Aura::TryCreate(m_spellInfo, MAX_EFFECT_MASK, dynObj, caster, &m_spellValue->EffectBasePoints[0]))
{
@@ -2630,6 +2646,13 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
case 48542: // Revitalize
damage = int32(CalculatePctN(unitTarget->GetMaxPower(power), damage));
break;
+ case 67490: // Runic Mana Injector (mana gain increased by 25% for engineers - 3.2.0 patch change)
+ {
+ if (Player* player = m_caster->ToPlayer())
+ if (player->HasSkill(SKILL_ENGINEERING))
+ AddPctN(damage, 25);
+ break;
+ }
case 71132: // Glyph of Shadow Word: Pain
damage = int32(CalculatePctN(unitTarget->GetCreateMana(), 1)); // set 1 as value, missing in dbc
break;
@@ -3368,7 +3391,7 @@ void Spell::EffectDistract(SpellEffIndex /*effIndex*/)
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
{
// For players just turn them
- unitTarget->ToPlayer()->SetPosition(unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), angle, false);
+ unitTarget->ToPlayer()->UpdatePosition(unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), angle, false);
unitTarget->ToPlayer()->SendTeleportAckPacket();
}
else
@@ -3422,7 +3445,7 @@ void Spell::EffectAddFarsight(SpellEffIndex effIndex)
dynObj->SetDuration(duration);
dynObj->setActive(true); //must before add to map to be put in world container
- dynObj->GetMap()->Add(dynObj); //grid will also be loaded
+ dynObj->GetMap()->AddToMap(dynObj); //grid will also be loaded
dynObj->SetCasterViewpoint();
}
@@ -3575,7 +3598,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget, PERM_ENCHANTMENT_SLOT, true);
- itemTarget->SetSoulboundTradeable(NULL, item_owner, false);
+ itemTarget->ClearSoulboundTradeable(item_owner);
}
}
@@ -3639,7 +3662,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget, PRISMATIC_ENCHANTMENT_SLOT, true);
- itemTarget->SetSoulboundTradeable(NULL, item_owner, false);
+ itemTarget->ClearSoulboundTradeable(item_owner);
}
void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
@@ -3812,7 +3835,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
// add to world
- pet->GetMap()->Add(pet->ToCreature());
+ pet->GetMap()->AddToMap(pet->ToCreature());
// visual effect for levelup
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level);
@@ -4320,19 +4343,22 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
// TODO: not all spells that used this effect apply cooldown at school spells
// also exist case: apply cooldown to interrupted cast only and to all spells
- for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; ++i)
+ // there is no CURRENT_AUTOREPEAT_SPELL spells that can be interrupted
+ for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_AUTOREPEAT_SPELL; ++i)
{
if (Spell* spell = unitTarget->GetCurrentSpell(CurrentSpellTypes(i)))
{
SpellInfo const* curSpellInfo = spell->m_spellInfo;
// check if we can interrupt spell
if ((spell->getState() == SPELL_STATE_CASTING
- || (spell->getState() == SPELL_STATE_PREPARING && spell->CalcCastTime() > 0.0f))
- && curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
+ || (spell->getState() == SPELL_STATE_PREPARING && spell->GetCastTime() > 0.0f))
+ && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE
+ && ((i == CURRENT_GENERIC_SPELL && curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT)
+ || (i == CURRENT_CHANNELED_SPELL && curSpellInfo->ChannelInterruptFlags & CHANNEL_INTERRUPT_FLAG_INTERRUPT)))
{
if (m_originalCaster)
{
- int32 duration = m_originalCaster->ModSpellDuration(m_spellInfo, unitTarget, m_originalCaster->CalcSpellDuration(m_spellInfo), false);
+ int32 duration = m_originalCaster->ModSpellDuration(m_spellInfo, unitTarget, m_originalCaster->CalcSpellDuration(m_spellInfo), false, 1 << effIndex);
unitTarget->ProhibitSpellSchool(curSpellInfo->GetSchoolMask(), duration/*GetSpellDuration(m_spellInfo)*/);
}
ExecuteLogEffectInterruptCast(effIndex, unitTarget, curSpellInfo->Id);
@@ -4378,12 +4404,12 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
// Wild object not have owner and check clickable by players
- map->Add(pGameObj);
+ map->AddToMap(pGameObj);
if (pGameObj->GetGoType() == GAMEOBJECT_TYPE_FLAGDROP && m_caster->GetTypeId() == TYPEID_PLAYER)
{
- Player* pl = m_caster->ToPlayer();
- Battleground* bg = pl->GetBattleground();
+ Player* player = m_caster->ToPlayer();
+ Battleground* bg = player->GetBattleground();
switch (pGameObj->GetMapId())
{
@@ -4393,7 +4419,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
{
uint32 team = ALLIANCE;
- if (pl->GetTeam() == team)
+ if (player->GetTeam() == team)
team = HORDE;
((BattlegroundWS*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID(), team);
@@ -4423,7 +4449,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, linkedGO);
// Wild object not have owner and check clickable by players
- map->Add(linkedGO);
+ map->AddToMap(linkedGO);
}
else
{
@@ -4937,6 +4963,25 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
return;
}
+ case 57347: // Retrieving (Wintergrasp RP-GG pickup spell)
+ {
+ if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT || m_caster->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ unitTarget->ToCreature()->DespawnOrUnsummon();
+
+ return;
+ }
+ case 57349: // Drop RP-GG (Wintergrasp RP-GG at death drop spell)
+ {
+ if (m_caster->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ // Delete item from inventory at death
+ m_caster->ToPlayer()->DestroyItemCount(damage, 5, true);
+
+ return;
+ }
case 58418: // Portal to Orgrimmar
case 58420: // Portal to Stormwind
{
@@ -5328,11 +5373,11 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
case 64142: // Upper Deck - Create Foam Sword
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- Player* plr = unitTarget->ToPlayer();
+ Player* player = unitTarget->ToPlayer();
static uint32 const itemId[] = {45061, 45176, 45177, 45178, 45179, 0};
// player can only have one of these items
for (uint32 const* itr = &itemId[0]; *itr; ++itr)
- if (plr->HasItemCount(*itr, 1, true))
+ if (player->HasItemCount(*itr, 1, true))
return;
DoCreateItem(effIndex, itemId[urand(0, 4)]);
return;
@@ -5583,7 +5628,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
m_caster->AddGameObject(pGameObj);
- map->Add(pGameObj);
+ map->AddToMap(pGameObj);
//END
// Send request
@@ -5934,7 +5979,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
- map->Add(pGameObj);
+ map->AddToMap(pGameObj);
m_caster->m_ObjectSlot[slot] = pGameObj->GetGUID();
}
@@ -6139,15 +6184,15 @@ void Spell::EffectSelfResurrect(SpellEffIndex effIndex)
mana = CalculatePctN(m_caster->GetMaxPower(POWER_MANA), damage);
}
- Player* plr = m_caster->ToPlayer();
- plr->ResurrectPlayer(0.0f);
+ Player* player = m_caster->ToPlayer();
+ player->ResurrectPlayer(0.0f);
- plr->SetHealth(health);
- plr->SetPower(POWER_MANA, mana);
- plr->SetPower(POWER_RAGE, 0);
- plr->SetPower(POWER_ENERGY, plr->GetMaxPower(POWER_ENERGY));
+ player->SetHealth(health);
+ player->SetPower(POWER_MANA, mana);
+ player->SetPower(POWER_RAGE, 0);
+ player->SetPower(POWER_ENERGY, player->GetMaxPower(POWER_ENERGY));
- plr->SpawnCorpseBones();
+ player->SpawnCorpseBones();
}
void Spell::EffectSkinning(SpellEffIndex /*effIndex*/)
@@ -6630,7 +6675,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
//m_caster->AddGameObject(pGameObj);
//m_ObjToDel.push_back(pGameObj);
- cMap->Add(pGameObj);
+ cMap->AddToMap(pGameObj);
if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
{
@@ -6645,7 +6690,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, linkedGO);
- linkedGO->GetMap()->Add(linkedGO);
+ linkedGO->GetMap()->AddToMap(linkedGO);
}
else
{
@@ -6921,9 +6966,9 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
- Player* plr = m_caster->ToPlayer();
+ Player* player = m_caster->ToPlayer();
- if (plr->getClass() != CLASS_DEATH_KNIGHT)
+ if (player->getClass() != CLASS_DEATH_KNIGHT)
return;
// needed later
@@ -6933,9 +6978,9 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
if (count == 0) count = 1;
for (uint32 j = 0; j < MAX_RUNES && count > 0; ++j)
{
- if (plr->GetRuneCooldown(j) && plr->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
+ if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
{
- plr->SetRuneCooldown(j, 0);
+ player->SetRuneCooldown(j, 0);
--count;
}
}
@@ -6948,8 +6993,8 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
- if (plr->GetRuneCooldown(i) && (plr->GetCurrentRune(i) == RUNE_FROST || plr->GetCurrentRune(i) == RUNE_DEATH))
- plr->SetRuneCooldown(i, 0);
+ if (player->GetRuneCooldown(i) && (player->GetCurrentRune(i) == RUNE_FROST || player->GetCurrentRune(i) == RUNE_DEATH))
+ player->SetRuneCooldown(i, 0);
}
}
}
@@ -6968,7 +7013,7 @@ void Spell::EffectCreateTamedPet(SpellEffIndex effIndex)
return;
// add to world
- pet->GetMap()->Add(pet->ToCreature());
+ pet->GetMap()->AddToMap(pet->ToCreature());
// unitTarget has pet now
unitTarget->SetMinion(pet, true);
@@ -7069,9 +7114,9 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
// level of pet summoned using engineering item based at engineering skill level
if (m_CastItem && caster->GetTypeId() == TYPEID_PLAYER)
if (ItemTemplate const* proto = m_CastItem->GetTemplate())
- if (proto->RequiredSkill == SKILL_ENGINERING)
- if (uint16 skill202 = caster->ToPlayer()->GetSkillValue(SKILL_ENGINERING))
- level = skill202/5;
+ if (proto->RequiredSkill == SKILL_ENGINEERING)
+ if (uint16 skill202 = caster->ToPlayer()->GetSkillValue(SKILL_ENGINEERING))
+ level = skill202 / 5;
//float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
float radius = 5.0f;
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 543baa82789..972276c7d26 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1735,6 +1735,17 @@ uint32 SpellInfo::GetEffectMechanicMask(uint8 effIndex) const
return mask;
}
+uint32 SpellInfo::GetSpellMechanicMaskByEffectMask(uint32 effectMask) const
+{
+ uint32 mask = 0;
+ if (Mechanic)
+ mask |= 1<< Mechanic;
+ for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if ((effectMask & (1 << i)) && Effects[i].Mechanic)
+ mask |= 1<< Effects[i].Mechanic;
+ return mask;
+}
+
Mechanics SpellInfo::GetEffectMechanic(uint8 effIndex) const
{
if (Effects[effIndex].IsEffect() && Effects[effIndex].Mechanic)
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index b4f4ca8c11e..7faf0de890d 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -444,6 +444,7 @@ public:
SpellSchoolMask GetSchoolMask() const;
uint32 GetAllEffectsMechanicMask() const;
uint32 GetEffectMechanicMask(uint8 effIndex) const;
+ uint32 GetSpellMechanicMaskByEffectMask(uint32 effectMask) const;
Mechanics GetEffectMechanic(uint8 effIndex) const;
uint32 GetDispelMask() const;
static uint32 GetDispelMask(DispelType type);
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index cfa28080b2b..c85758c3897 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -96,7 +96,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
return DIMINISHING_CONTROLLED_ROOT;
// Dragon's Breath
else if (spellproto->SpellFamilyFlags[0] & 0x800000)
- return DIMINISHING_DISORIENT;
+ return DIMINISHING_DRAGONS_BREATH;
break;
}
case SPELLFAMILY_WARRIOR:
@@ -167,7 +167,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
}
case SPELLFAMILY_HUNTER:
{
- // Hunter's mark
+ // Hunter's Mark
if ((spellproto->SpellFamilyFlags[0] & 0x400) && spellproto->SpellIconID == 538)
return DIMINISHING_LIMITONLY;
// Scatter Shot (own diminishing)
@@ -321,20 +321,20 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
{
switch (group)
{
+ case DIMINISHING_BANISH:
case DIMINISHING_CONTROLLED_STUN:
- case DIMINISHING_STUN:
- case DIMINISHING_ENTRAPMENT:
case DIMINISHING_CONTROLLED_ROOT:
- case DIMINISHING_ROOT:
+ case DIMINISHING_CYCLONE:
+ case DIMINISHING_DISORIENT:
+ case DIMINISHING_ENTRAPMENT:
case DIMINISHING_FEAR:
+ case DIMINISHING_HORROR:
case DIMINISHING_MIND_CONTROL:
- case DIMINISHING_DISORIENT:
- case DIMINISHING_CYCLONE:
- case DIMINISHING_BANISH:
- case DIMINISHING_LIMITONLY:
case DIMINISHING_OPENING_STUN:
- case DIMINISHING_HORROR:
+ case DIMINISHING_ROOT:
+ case DIMINISHING_STUN:
case DIMINISHING_SLEEP:
+ case DIMINISHING_LIMITONLY:
return true;
default:
return false;
@@ -351,7 +351,7 @@ SpellMgr::~SpellMgr()
}
/// Some checks for spells, to prevent adding deprecated/broken spells for trainers, spell book, etc
-bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* pl, bool msg)
+bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg)
{
// not exist
if (!spellInfo)
@@ -378,8 +378,8 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* pl, bool msg)
{
if (msg)
{
- if (pl)
- ChatHandler(pl).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
+ if (player)
+ ChatHandler(player).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
else
sLog->outErrorDb("Craft spell %u not have create item entry.", spellInfo->Id);
}
@@ -392,8 +392,8 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* pl, bool msg)
{
if (msg)
{
- if (pl)
- ChatHandler(pl).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
+ if (player)
+ ChatHandler(player).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
else
sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
}
@@ -406,12 +406,12 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* pl, bool msg)
case SPELL_EFFECT_LEARN_SPELL:
{
SpellInfo const* spellInfo2 = sSpellMgr->GetSpellInfo(spellInfo->Effects[i].TriggerSpell);
- if (!IsSpellValid(spellInfo2, pl, msg))
+ if (!IsSpellValid(spellInfo2, player, msg))
{
if (msg)
{
- if (pl)
- ChatHandler(pl).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
+ if (player)
+ ChatHandler(player).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
else
sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
}
@@ -430,8 +430,8 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* pl, bool msg)
{
if (msg)
{
- if (pl)
- ChatHandler(pl).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
+ if (player)
+ ChatHandler(player).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
else
sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
}
@@ -694,6 +694,38 @@ void SpellMgr::GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>&
}
}
+bool SpellMgr::AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, int32 amount, std::map<SpellGroup, int32>& groups) const
+{
+ uint32 spellId = spellInfo->GetFirstRankSpell()->Id;
+ SpellSpellGroupMapBounds spellGroup = GetSpellSpellGroupMapBounds(spellId);
+ // Find group with SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT if it belongs to one
+ for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second ; ++itr)
+ {
+ SpellGroup group = itr->second;
+ SpellGroupStackMap::const_iterator found = mSpellGroupStack.find(group);
+ if (found != mSpellGroupStack.end())
+ {
+ if (found->second == SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT)
+ {
+ // Put the highest amount in the map
+ if (groups.find(group) == groups.end())
+ groups[group] = amount;
+ else
+ {
+ int32 curr_amount = groups[group];
+ // Take absolute value because this also counts for the highest negative aura
+ if (abs(curr_amount) < abs(amount))
+ groups[group] = amount;
+ }
+ // return because a spell should be in only one SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT group
+ return true;
+ }
+ }
+ }
+ // Not in a SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT group, so return false
+ return false;
+}
+
SpellGroupStackRule SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const
{
uint32 spellid_1 = spellInfo1->GetFirstRankSpell()->Id;
@@ -2937,7 +2969,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetB[0] = 0;
break;
case 31344: // Howl of Azgalor
- spellInfo->EffectRadiusIndex[0] = 12; // 100yards instead of 50000?!
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yards instead of 50000?!
break;
case 42818: // Headless Horseman - Wisp Flight Port
case 42821: // Headless Horseman - Wisp Flight Missile
@@ -2973,7 +3005,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 59725: // Improved Spell Reflection - aoe aura
// Target entry seems to be wrong for this spell :/
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER_AREA_PARTY;
- spellInfo->EffectRadiusIndex[0] = 45;
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_10_YARDS_2;
break;
case 44978: case 45001: case 45002: // Wild Magic
case 45004: case 45006: case 45010: // Wild Magic
@@ -3077,7 +3109,7 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
break;
case 29809: // Desecration Arm - 36 instead of 37 - typo? :/
- spellInfo->EffectRadiusIndex[0] = 37;
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_7_YARDS;
break;
// Master Shapeshifter: missing stance data for forms other than bear - bear version has correct data
// To prevent aura staying on target after talent unlearned
@@ -3090,11 +3122,18 @@ void SpellMgr::LoadDbcDataCorrections()
case 48422:
spellInfo->Stances = 1 << (FORM_TREE - 1);
break;
+ case 51466: // Elemental Oath (Rank 1)
+ case 51470: // Elemental Oath (Rank 2)
+ spellInfo->Effect[EFFECT_1] = SPELL_EFFECT_APPLY_AURA;
+ spellInfo->EffectApplyAuraName[EFFECT_1] = SPELL_AURA_ADD_FLAT_MODIFIER;
+ spellInfo->EffectMiscValue[EFFECT_1] = SPELLMOD_EFFECT2;
+ spellInfo->EffectSpellClassMask[EFFECT_1] = flag96(0x00000000, 0x00004000, 0x00000000);
+ break;
case 47569: // Improved Shadowform (Rank 1)
// with this spell atrribute aura can be stacked several times
spellInfo->Attributes &= ~SPELL_ATTR0_NOT_SHAPESHIFT;
break;
- case 64904: //Hymn of Hope
+ case 64904: // Hymn of Hope
spellInfo->EffectApplyAuraName[EFFECT_1] = SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT;
break;
case 30421: // Nether Portal - Perseverence
@@ -3109,6 +3148,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 51726:
spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS;
spellInfo->SpellFamilyFlags[2] = 0x10;
+ spellInfo->EffectApplyAuraName[1] = SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN;
break;
case 41913: // Parasitic Shadowfiend Passive
spellInfo->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends
@@ -3139,6 +3179,24 @@ void SpellMgr::LoadDbcDataCorrections()
case 6474: // Earthbind Totem (instant pulse)
spellInfo->AttributesEx5 |= SPELL_ATTR5_START_PERIODIC_AT_APPLY;
break;
+ case 2895: // Wrath of Air Totem rank 1 (Aura)
+ case 68933: // Wrath of Air Totem rank 2 (Aura)
+ spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
+ spellInfo->EffectImplicitTargetB[0] = 0;
+ break;
+ case 52109: // Flametongue Totem rank 1 (Aura)
+ case 52110: // Flametongue Totem rank 2 (Aura)
+ case 52111: // Flametongue Totem rank 3 (Aura)
+ case 52112: // Flametongue Totem rank 4 (Aura)
+ case 52113: // Flametongue Totem rank 5 (Aura)
+ case 58651: // Flametongue Totem rank 6 (Aura)
+ case 58654: // Flametongue Totem rank 7 (Aura)
+ case 58655: // Flametongue Totem rank 8 (Aura)
+ spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
+ spellInfo->EffectImplicitTargetA[1] = TARGET_UNIT_CASTER;
+ spellInfo->EffectImplicitTargetB[0] = 0;
+ spellInfo->EffectImplicitTargetB[1] = 0;
+ break;
case 53241: // Marked for Death (Rank 1)
case 53243: // Marked for Death (Rank 2)
case 53244: // Marked for Death (Rank 3)
@@ -3177,7 +3235,7 @@ void SpellMgr::LoadDbcDataCorrections()
// ULDUAR SPELLS
//
case 62374: // Pursued (Flame Leviathan)
- spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd
break;
case 63342: // Focused Eyebeam Summon Trigger (Kologarn)
spellInfo->MaxAffectedTargets = 1;
@@ -3245,7 +3303,7 @@ void SpellMgr::LoadDbcDataCorrections()
break;
case 69055: // Saber Lash (Lord Marrowgar)
case 70814: // Saber Lash (Lord Marrowgar)
- spellInfo->EffectRadiusIndex[0] = 8; // 5yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_5_YARDS; // 5yd
break;
case 69075: // Bone Storm (Lord Marrowgar)
case 70834: // Bone Storm (Lord Marrowgar)
@@ -3257,7 +3315,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 71160: // Plague Stench (Stinky)
case 71161: // Plague Stench (Stinky)
case 71123: // Decimate (Stinky & Precious)
- spellInfo->EffectRadiusIndex[0] = 12; // 100yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yd
break;
case 72723: // Resistant Skin (Deathbringer Saurfang adds)
// this spell initially granted Shadow damage immunity, however it was removed but the data was left in client
@@ -3284,7 +3342,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 72464: // Mutated Plague (Professor Putricide)
case 72506: // Mutated Plague (Professor Putricide)
case 72507: // Mutated Plague (Professor Putricide)
- spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd
break;
case 70911: // Unbound Plague (Professor Putricide) (needs target selection script)
case 72854: // Unbound Plague (Professor Putricide) (needs target selection script)
@@ -3295,7 +3353,7 @@ void SpellMgr::LoadDbcDataCorrections()
case 71518: // Unholy Infusion Quest Credit (Professor Putricide)
case 72934: // Blood Infusion Quest Credit (Blood-Queen Lana'thel)
case 72289: // Frost Infusion Quest Credit (Sindragosa)
- spellInfo->EffectRadiusIndex[0] = 28; // another missing radius
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // another missing radius
break;
case 71708: // Empowered Flare (Blood Prince Council)
case 72785: // Empowered Flare (Blood Prince Council)
@@ -3322,7 +3380,7 @@ void SpellMgr::LoadDbcDataCorrections()
break;
case 72706: // Achievement Check (Valithria Dreamwalker)
case 71357: // Order Whelp
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
break;
case 70598: // Sindragosa's Fury
spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_CASTER;
@@ -3346,12 +3404,12 @@ void SpellMgr::LoadDbcDataCorrections()
case 73708: // Defile
case 73709: // Defile
case 73710: // Defile
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
- spellInfo->EffectRadiusIndex[1] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
+ spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd
break;
case 69030: // Val'kyr Target Search
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
- spellInfo->EffectRadiusIndex[1] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
+ spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd
break;
case 69198: // Raging Spirit Visual
spellInfo->rangeIndex = 13; // 50000yd
@@ -3360,9 +3418,9 @@ void SpellMgr::LoadDbcDataCorrections()
case 74295: // Harvest Souls
case 74296: // Harvest Souls
case 74297: // Harvest Souls
- spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
- spellInfo->EffectRadiusIndex[1] = 28; // 50000yd
- spellInfo->EffectRadiusIndex[2] = 28; // 50000yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd
+ spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_50000_YARDS; // 50000yd
+ spellInfo->EffectRadiusIndex[2] = EFFECT_RADIUS_50000_YARDS; // 50000yd
break;
case 73655: // Harvest Soul
spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_DONE_BONUS;
@@ -3374,34 +3432,34 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->DurationIndex = 28; // 5 seconds
break;
case 73529: // Shadow Trap
- spellInfo->EffectRadiusIndex[1] = 13; // 10yd
+ spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_10_YARDS; // 10yd
break;
case 74282: // Shadow Trap (searcher)
- spellInfo->EffectRadiusIndex[0] = 15; // 3yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_3_YARDS; // 3yd
break;
case 72595: // Restore Soul
case 73650: // Restore Soul
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
break;
case 74086: // Destroy Soul
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
break;
case 74302: // Summon Spirit Bomb
case 74342: // Summon Spirit Bomb
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
spellInfo->MaxAffectedTargets = 1;
break;
case 74341: // Summon Spirit Bomb
case 74343: // Summon Spirit Bomb
- spellInfo->EffectRadiusIndex[0] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS; // 200yd
spellInfo->MaxAffectedTargets = 3;
break;
case 73579: // Summon Spirit Bomb
- spellInfo->EffectRadiusIndex[0] = 20; // 25yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_25_YARDS; // 25yd
break;
case 72350: // Fury of Frostmourne
- spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
- spellInfo->EffectRadiusIndex[1] = 28; // 50000yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd
+ spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_50000_YARDS; // 50000yd
break;
case 75127: // Kill Frostmourne Players
case 72351: // Fury of Frostmourne
@@ -3409,18 +3467,18 @@ void SpellMgr::LoadDbcDataCorrections()
case 72429: // Mass Resurrection
case 73159: // Play Movie
case 73582: // Trigger Vile Spirit (Inside, Heroic)
- spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd
break;
case 72376: // Raise Dead
spellInfo->MaxAffectedTargets = 3;
- spellInfo->EffectRadiusIndex[0] = 28; // 50000yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_50000_YARDS; // 50000yd
break;
case 71809: // Jump
spellInfo->rangeIndex = 3; // 20yd
- spellInfo->EffectRadiusIndex[0] = 20; // 25yd
+ spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_25_YARDS; // 25yd
break;
case 72405: // Broken Frostmourne
- spellInfo->EffectRadiusIndex[1] = 22; // 200yd
+ spellInfo->EffectRadiusIndex[1] = EFFECT_RADIUS_200_YARDS; // 200yd
break;
default:
break;
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index d701ab2882c..552519d9940 100755
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -322,6 +322,7 @@ typedef UNORDERED_MAP<uint32, SpellBonusEntry> SpellBonusMap;
enum SpellGroup
{
+ SPELL_GROUP_NONE = 0,
SPELL_GROUP_ELIXIR_BATTLE = 1,
SPELL_GROUP_ELIXIR_GUARDIAN = 2,
SPELL_GROUP_ELIXIR_UNSTABLE = 3,
@@ -344,8 +345,9 @@ enum SpellGroupStackRule
SPELL_GROUP_STACK_RULE_DEFAULT = 0,
SPELL_GROUP_STACK_RULE_EXCLUSIVE = 1,
SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER = 2,
+ SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT = 3,
};
-#define SPELL_GROUP_STACK_RULE_MAX 3
+#define SPELL_GROUP_STACK_RULE_MAX 4
typedef std::map<SpellGroup, SpellGroupStackRule> SpellGroupStackMap;
@@ -379,6 +381,68 @@ struct SpellTargetPosition
float target_Orientation;
};
+// Enum with EffectRadiusIndex and their actual radius
+enum EffectRadiusIndex
+{
+ EFFECT_RADIUS_2_YARDS = 7,
+ EFFECT_RADIUS_5_YARDS = 8,
+ EFFECT_RADIUS_20_YARDS = 9,
+ EFFECT_RADIUS_30_YARDS = 10,
+ EFFECT_RADIUS_45_YARDS = 11,
+ EFFECT_RADIUS_100_YARDS = 12,
+ EFFECT_RADIUS_10_YARDS = 13,
+ EFFECT_RADIUS_8_YARDS = 14,
+ EFFECT_RADIUS_3_YARDS = 15,
+ EFFECT_RADIUS_1_YARD = 16,
+ EFFECT_RADIUS_13_YARDS = 17,
+ EFFECT_RADIUS_15_YARDS = 18,
+ EFFECT_RADIUS_18_YARDS = 19,
+ EFFECT_RADIUS_25_YARDS = 20,
+ EFFECT_RADIUS_35_YARDS = 21,
+ EFFECT_RADIUS_200_YARDS = 22,
+ EFFECT_RADIUS_40_YARDS = 23,
+ EFFECT_RADIUS_65_YARDS = 24,
+ EFFECT_RADIUS_70_YARDS = 25,
+ EFFECT_RADIUS_4_YARDS = 26,
+ EFFECT_RADIUS_50_YARDS = 27,
+ EFFECT_RADIUS_50000_YARDS = 28,
+ EFFECT_RADIUS_6_YARDS = 29,
+ EFFECT_RADIUS_500_YARDS = 30,
+ EFFECT_RADIUS_80_YARDS = 31,
+ EFFECT_RADIUS_12_YARDS = 32,
+ EFFECT_RADIUS_99_YARDS = 33,
+ EFFECT_RADIUS_55_YARDS = 35,
+ EFFECT_RADIUS_0_YARDS = 36,
+ EFFECT_RADIUS_7_YARDS = 37,
+ EFFECT_RADIUS_21_YARDS = 38,
+ EFFECT_RADIUS_34_YARDS = 39,
+ EFFECT_RADIUS_9_YARDS = 40,
+ EFFECT_RADIUS_150_YARDS = 41,
+ EFFECT_RADIUS_11_YARDS = 42,
+ EFFECT_RADIUS_16_YARDS = 43,
+ EFFECT_RADIUS_0_5_YARDS = 44, // 0.5 yards
+ EFFECT_RADIUS_10_YARDS_2 = 45,
+ EFFECT_RADIUS_5_YARDS_2 = 46,
+ EFFECT_RADIUS_15_YARDS_2 = 47,
+ EFFECT_RADIUS_60_YARDS = 48,
+ EFFECT_RADIUS_90_YARDS = 49,
+ EFFECT_RADIUS_15_YARDS_3 = 50,
+ EFFECT_RADIUS_60_YARDS_2 = 51,
+ EFFECT_RADIUS_5_YARDS_3 = 52,
+ EFFECT_RADIUS_60_YARDS_3 = 53,
+ EFFECT_RADIUS_50000_YARDS_2 = 54,
+ EFFECT_RADIUS_130_YARDS = 55,
+ EFFECT_RADIUS_38_YARDS = 56,
+ EFFECT_RADIUS_45_YARDS_2 = 57,
+ EFFECT_RADIUS_32_YARDS = 59,
+ EFFECT_RADIUS_44_YARDS = 60,
+ EFFECT_RADIUS_14_YARDS = 61,
+ EFFECT_RADIUS_47_YARDS = 62,
+ EFFECT_RADIUS_23_YARDS = 63,
+ EFFECT_RADIUS_3_5_YARDS = 64, // 3.5 yards
+ EFFECT_RADIUS_80_YARDS_2 = 65
+};
+
typedef UNORDERED_MAP<uint32, SpellTargetPosition> SpellTargetPositionMap;
// Spell pet auras
@@ -553,7 +617,7 @@ class SpellMgr
// Accessors (const or static functions)
public:
// Spell correctess for client using
- static bool IsSpellValid(SpellInfo const* spellInfo, Player* pl = NULL, bool msg = true);
+ static bool IsSpellValid(SpellInfo const* spellInfo, Player* player = NULL, bool msg = true);
// Spell difficulty
uint32 GetSpellDifficultyId(uint32 spellId) const;
@@ -596,6 +660,7 @@ class SpellMgr
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const;
// Spell Group Stack Rules table
+ bool AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, int32 amount, std::map<SpellGroup, int32>& groups) const;
SpellGroupStackRule CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const;
// Spell proc event table
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index f901c0acac8..2915bab4b77 100755
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -381,12 +381,12 @@ void CreatureTextMgr::SendChatPacket(WorldPacket* data, WorldObject* source, Cha
const SessionMap smap = sWorld->GetAllSessions();
for (SessionMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter)
{
- if (Player* plr = (*iter).second->GetPlayer())
+ if (Player* player = (*iter).second->GetPlayer())
{
if (data->GetOpcode() == SMSG_MESSAGECHAT)//override whisperguid with actual player's guid
- data->put<uint64>(1+4+8+4+4+(int32)(strlen(source->GetName())+1), uint64(plr->GetGUID()));
- if (plr->GetSession() && (!team || Team(plr->GetTeam()) == team) && (!gmOnly || plr->isGameMaster()))
- plr->GetSession()->SendPacket(data);
+ data->put<uint64>(1+4+8+4+4+(int32)(strlen(source->GetName())+1), uint64(player->GetGUID()));
+ if (player->GetSession() && (!team || Team(player->GetTeam()) == team) && (!gmOnly || player->isGameMaster()))
+ player->GetSession()->SendPacket(data);
}
}
return;
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index 92fa001fe46..bdb912aa8b0 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -443,6 +443,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
typedef PetIds::value_type PetIdsPair;
PetIds petids;
+ uint8 gender;
+ uint8 race;
+ uint8 playerClass;
SQLTransaction trans = CharacterDatabase.BeginTransaction();
while (!feof(fin))
{
@@ -512,6 +515,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
if (!changenth(line, 2, chraccount)) // characters.account update
ROLLBACK(DUMP_FILE_BROKEN);
+ race = uint8(atol(getnth(line, 4).c_str()));
+ playerClass = uint8(atol(getnth(line, 5).c_str()));
+ gender = uint8(atol(getnth(line, 6).c_str()));
if (name == "")
{
// check if the original name already exists
@@ -520,10 +526,8 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE name = '%s'", name.c_str());
if (result)
- {
if (!changenth(line, 37, "1")) // characters.at_login set to "rename on login"
ROLLBACK(DUMP_FILE_BROKEN);
- }
}
else if (!changenth(line, 3, name.c_str())) // characters.name
ROLLBACK(DUMP_FILE_BROKEN);
@@ -654,6 +658,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
CharacterDatabase.CommitTransaction(trans);
+ // in case of name conflict player has to rename at login anyway
+ sWorld->AddCharacterNameData(guid, name, gender, race, playerClass);
+
sObjectMgr->m_hiItemGuid += items.size();
sObjectMgr->m_mailid += mails.size();
@@ -664,4 +671,3 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
return DUMP_SUCCESS;
}
-
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 34b93c71fb4..8aca4563b91 100755
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -132,10 +132,6 @@ World::~World()
VMAP::VMapFactory::clear();
- // Clean up character name data
- for (std::map<uint32, CharacterNameData*>::iterator itr = m_CharacterNameDataMap.begin(); itr != m_CharacterNameDataMap.end(); ++itr)
- delete itr->second;
-
//TODO free addSessQueue
}
@@ -2750,22 +2746,18 @@ void World::UpdateMaxSessionCounters()
void World::LoadDBVersion()
{
- QueryResult result = WorldDatabase.Query("SELECT db_version, script_version, cache_id FROM version LIMIT 1");
+ QueryResult result = WorldDatabase.Query("SELECT db_version, cache_id FROM version LIMIT 1");
if (result)
{
Field* fields = result->Fetch();
m_DBVersion = fields[0].GetString();
- m_CreatureEventAIVersion = fields[1].GetString();
// will be overwrite by config values if different and non-0
- m_int_configs[CONFIG_CLIENTCACHE_VERSION] = fields[2].GetUInt32();
+ m_int_configs[CONFIG_CLIENTCACHE_VERSION] = fields[1].GetUInt32();
}
if (m_DBVersion.empty())
m_DBVersion = "Unknown world database.";
-
- if (m_CreatureEventAIVersion.empty())
- m_CreatureEventAIVersion = "Unknown creature EventAI.";
}
void World::ProcessStartEvent()
@@ -2864,58 +2856,48 @@ void World::LoadCharacterNameData()
return;
}
- ACE_Guard<ACE_Thread_Mutex> guard(m_CharacterNameDataMapMutex);
-
uint32 count = 0;
do
{
Field *fields = result->Fetch();
- CharacterNameData* data = new CharacterNameData;
- data->m_name = fields[1].GetString();
- data->m_race = fields[2].GetUInt8();
- data->m_gender = fields[3].GetUInt8();
- data->m_class = fields[4].GetUInt8();
-
- m_CharacterNameDataMap[fields[0].GetUInt32()] = data;
+ AddCharacterNameData(fields[0].GetUInt32(), fields[1].GetString(),
+ fields[3].GetUInt8() /*gender*/, fields[2].GetUInt8() /*race*/, fields[4].GetUInt8() /*class*/);
++count;
} while (result->NextRow());
sLog->outString("Loaded name data for %u characters", count);
}
-void World::ReloadSingleCharacterNameData(uint32 guid)
+void World::AddCharacterNameData(uint32 guid, std::string const& name, uint8 gender, uint8 race, uint8 playerClass)
{
- ACE_Guard<ACE_Thread_Mutex> guard(m_CharacterNameDataMapMutex);
+ CharacterNameData& data = _characterNameDataMap[guid];
+ data.m_name = name;
+ data.m_race = race;
+ data.m_gender = gender;
+ data.m_class = playerClass;
+}
- std::map<uint32, CharacterNameData*>::iterator itr = m_CharacterNameDataMap.find(guid);
+void World::UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 gender /*= GENDER_NONE*/, uint8 race /*= RACE_NONE*/)
+{
+ std::map<uint32, CharacterNameData>::iterator itr = _characterNameDataMap.find(guid);
+ if (itr == _characterNameDataMap.end())
+ return;
- if (itr != m_CharacterNameDataMap.end())
- {
- delete itr->second;
- m_CharacterNameDataMap.erase(itr);
- }
+ itr->second.m_name = name;
- QueryResult result = CharacterDatabase.PQuery("SELECT name, race, gender, class FROM characters WHERE guid = '%u'", guid);
- if (result)
- {
- Field *fields = result->Fetch();
- CharacterNameData* newdata = new CharacterNameData;
- newdata->m_name = fields[0].GetString();
- newdata->m_race = fields[1].GetUInt8();
- newdata->m_gender = fields[2].GetUInt8();
- newdata->m_class = fields[3].GetUInt8();
- m_CharacterNameDataMap[guid] = newdata;
- }
+ if (gender != GENDER_NONE)
+ itr->second.m_gender = gender;
+
+ if (race != RACE_NONE)
+ itr->second.m_race = race;
}
-CharacterNameData* World::GetCharacterNameData(uint32 guid)
+CharacterNameData const* World::GetCharacterNameData(uint32 guid) const
{
- ACE_Guard<ACE_Thread_Mutex> guard(m_CharacterNameDataMapMutex);
-
- std::map<uint32, CharacterNameData*>::iterator itr = m_CharacterNameDataMap.find(guid);
- if (itr != m_CharacterNameDataMap.end())
- return itr->second;
+ std::map<uint32, CharacterNameData>::const_iterator itr = _characterNameDataMap.find(guid);
+ if (itr != _characterNameDataMap.end())
+ return &itr->second;
else
return NULL;
}
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 7430dd22420..f643ae60287 100755
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -722,10 +722,9 @@ class World
LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const { if (m_availableDbcLocaleMask & (1 << locale)) return locale; else return m_defaultDbcLocale; }
- //used World DB version
+ // used World DB version
void LoadDBVersion();
char const* GetDBVersion() const { return m_DBVersion.c_str(); }
- char const* GetCreatureEventAIVersion() const { return m_CreatureEventAIVersion.c_str(); }
void RecordTimeDiff(const char * text, ...);
@@ -739,8 +738,10 @@ class World
bool isEventKillStart;
- CharacterNameData *GetCharacterNameData(uint32 guid);
- void ReloadSingleCharacterNameData(uint32 guid);
+ CharacterNameData const* GetCharacterNameData(uint32 guid) const;
+ void AddCharacterNameData(uint32 guid, std::string const& name, uint8 gender, uint8 race, uint8 playerClass);
+ void UpdateCharacterNameData(uint32 guid, std::string const& name, uint8 gender = GENDER_NONE, uint8 race = RACE_NONE);
+ void DeleteCharaceterNameData(uint32 guid) { _characterNameDataMap.erase(guid); }
uint32 GetCleaningFlags() const { return m_CleaningFlags; }
void SetCleaningFlags(uint32 flags) { m_CleaningFlags = flags; }
@@ -819,18 +820,16 @@ class World
//Player Queue
Queue m_QueuedPlayer;
- //sessions that are added async
+ // sessions that are added async
void AddSession_(WorldSession* s);
ACE_Based::LockedQueue<WorldSession*, ACE_Thread_Mutex> addSessQueue;
- //used versions
+ // used versions
std::string m_DBVersion;
- std::string m_CreatureEventAIVersion;
std::list<std::string> m_Autobroadcasts;
- std::map<uint32, CharacterNameData*> m_CharacterNameDataMap;
- ACE_Thread_Mutex m_CharacterNameDataMapMutex;
+ std::map<uint32, CharacterNameData> _characterNameDataMap;
void LoadCharacterNameData();
void ProcessQueryCallbacks();
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 1b3454e5ae6..ae3250ad7b7 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -60,7 +60,7 @@ public:
return commandTable;
}
- static bool HandleAccountAddonCommand(ChatHandler* handler, const char* args)
+ static bool HandleAccountAddonCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
@@ -69,11 +69,11 @@ public:
return false;
}
- char *szExp = strtok((char*)args, " ");
+ char* exp = strtok((char*)args, " ");
- uint32 account_id = handler->GetSession()->GetAccountId();
+ uint32 accountId = handler->GetSession()->GetAccountId();
- int expansion = atoi(szExp); //get int anyway (0 if error)
+ int expansion = atoi(exp); //get int anyway (0 if error)
if (expansion < 0 || uint8(expansion) > sWorld->getIntConfig(CONFIG_EXPANSION))
{
handler->SendSysMessage(LANG_IMPROPER_VALUE);
@@ -82,78 +82,74 @@ public:
}
// No SQL injection
- LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id);
+ LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, accountId);
handler->PSendSysMessage(LANG_ACCOUNT_ADDON, expansion);
return true;
}
/// Create an account
- static bool HandleAccountCreateCommand(ChatHandler* handler, const char* args)
+ static bool HandleAccountCreateCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
///- %Parse the command line arguments
- char *szAcc = strtok((char*)args, " ");
- char *szPassword = strtok(NULL, " ");
- if (!szAcc || !szPassword)
+ char* accountName = strtok((char*)args, " ");
+ char* password = strtok(NULL, " ");
+ if (!accountName || !password)
return false;
- // normalized in AccountMgr::CreateAccount
- std::string account_name = szAcc;
- std::string password = szPassword;
-
- AccountOpResult result = AccountMgr::CreateAccount(account_name, password);
+ AccountOpResult result = AccountMgr::CreateAccount(std::string(accountName), std::string(password));
switch (result)
{
- case AOR_OK:
- handler->PSendSysMessage(LANG_ACCOUNT_CREATED, account_name.c_str());
- break;
- case AOR_NAME_TOO_LONG:
- handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG);
- handler->SetSentErrorMessage(true);
- return false;
- case AOR_NAME_ALREDY_EXIST:
- handler->SendSysMessage(LANG_ACCOUNT_ALREADY_EXIST);
- handler->SetSentErrorMessage(true);
- return false;
- case AOR_DB_INTERNAL_ERROR:
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED_SQL_ERROR, account_name.c_str());
- handler->SetSentErrorMessage(true);
- return false;
- default:
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED, account_name.c_str());
- handler->SetSentErrorMessage(true);
- return false;
+ case AOR_OK:
+ handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
+ break;
+ case AOR_NAME_TOO_LONG:
+ handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG);
+ handler->SetSentErrorMessage(true);
+ return false;
+ case AOR_NAME_ALREDY_EXIST:
+ handler->SendSysMessage(LANG_ACCOUNT_ALREADY_EXIST);
+ handler->SetSentErrorMessage(true);
+ return false;
+ case AOR_DB_INTERNAL_ERROR:
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED_SQL_ERROR, accountName);
+ handler->SetSentErrorMessage(true);
+ return false;
+ default:
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_CREATED, accountName);
+ handler->SetSentErrorMessage(true);
+ return false;
}
return true;
}
/// Delete a user account and all associated characters in this realm
- /// \todo This function has to be enhanced to respect the login/realm split (delete char, delete account chars in realm, delete account chars in realm then delete account
- static bool HandleAccountDeleteCommand(ChatHandler* handler, const char* args)
+ /// \todo This function has to be enhanced to respect the login/realm split (delete char, delete account chars in realm then delete account)
+ static bool HandleAccountDeleteCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
///- Get the account name from the command line
- char *account_name_str=strtok ((char*)args, " ");
- if (!account_name_str)
+ char* account = strtok((char*)args, " ");
+ if (!account)
return false;
- std::string account_name = account_name_str;
- if (!AccountMgr::normalizeString(account_name))
+ std::string accountName = account;
+ if (!AccountMgr::normalizeString(accountName))
{
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
return false;
}
- uint32 account_id = AccountMgr::GetId(account_name);
- if (!account_id)
+ uint32 accountId = AccountMgr::GetId(accountName);
+ if (!accountId)
{
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
return false;
}
@@ -161,34 +157,34 @@ public:
/// Commands not recommended call from chat, but support anyway
/// can delete only for account with less security
/// This is also reject self apply in fact
- if (handler->HasLowerSecurityAccount (NULL, account_id, true))
+ if (handler->HasLowerSecurityAccount(NULL, accountId, true))
return false;
- AccountOpResult result = AccountMgr::DeleteAccount(account_id);
+ AccountOpResult result = AccountMgr::DeleteAccount(accountId);
switch (result)
{
- case AOR_OK:
- handler->PSendSysMessage(LANG_ACCOUNT_DELETED, account_name.c_str());
- break;
- case AOR_NAME_NOT_EXIST:
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
- handler->SetSentErrorMessage(true);
- return false;
- case AOR_DB_INTERNAL_ERROR:
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR, account_name.c_str());
- handler->SetSentErrorMessage(true);
- return false;
- default:
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED, account_name.c_str());
- handler->SetSentErrorMessage(true);
- return false;
+ case AOR_OK:
+ handler->PSendSysMessage(LANG_ACCOUNT_DELETED, accountName.c_str());
+ break;
+ case AOR_NAME_NOT_EXIST:
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
+ handler->SetSentErrorMessage(true);
+ return false;
+ case AOR_DB_INTERNAL_ERROR:
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR, accountName.c_str());
+ handler->SetSentErrorMessage(true);
+ return false;
+ default:
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_DELETED, accountName.c_str());
+ handler->SetSentErrorMessage(true);
+ return false;
}
return true;
}
/// Display info on users currently in the realm
- static bool HandleAccountOnlineListCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleAccountOnlineListCommand(ChatHandler* handler, char const* /*args*/)
{
///- Get the list of accounts ID logged to the realm
QueryResult resultDB = CharacterDatabase.Query("SELECT name, account, map, zone FROM characters WHERE online > 0");
@@ -218,6 +214,7 @@ public:
"LEFT JOIN account_access aa "
"ON (a.id = aa.id) "
"WHERE a.id = '%u'", account);
+
if (resultLogin)
{
Field* fieldsLogin = resultLogin->Fetch();
@@ -229,13 +226,13 @@ public:
else
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
- }while (resultDB->NextRow());
+ } while (resultDB->NextRow());
handler->SendSysMessage(LANG_ACCOUNT_LIST_BAR);
return true;
}
- static bool HandleAccountLockCommand(ChatHandler* handler, const char* args)
+ static bool HandleAccountLockCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
@@ -244,15 +241,15 @@ public:
return false;
}
- std::string argstr = (char*)args;
- if (argstr == "on")
+ std::string param = (char*)args;
+ if (param == "on")
{
LoginDatabase.PExecute("UPDATE account SET locked = '1' WHERE id = '%d'", handler->GetSession()->GetAccountId());
handler->PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED);
return true;
}
- if (argstr == "off")
+ if (param == "off")
{
LoginDatabase.PExecute("UPDATE account SET locked = '0' WHERE id = '%d'", handler->GetSession()->GetAccountId());
handler->PSendSysMessage(LANG_COMMAND_ACCLOCKUNLOCKED);
@@ -264,7 +261,7 @@ public:
return false;
}
- static bool HandleAccountPasswordCommand(ChatHandler* handler, const char* args)
+ static bool HandleAccountPasswordCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
@@ -273,95 +270,95 @@ public:
return false;
}
- char *old_pass = strtok((char*)args, " ");
- char *new_pass = strtok(NULL, " ");
- char *new_pass_c = strtok(NULL, " ");
+ char* oldPassword = strtok((char*)args, " ");
+ char* newPassword = strtok(NULL, " ");
+ char* passwordConfirmation = strtok(NULL, " ");
- if (!old_pass || !new_pass || !new_pass_c)
+ if (!oldPassword || !newPassword || !passwordConfirmation)
{
handler->SendSysMessage(LANG_CMD_SYNTAX);
handler->SetSentErrorMessage(true);
return false;
}
- if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), std::string(old_pass)))
+ if (!AccountMgr::CheckPassword(handler->GetSession()->GetAccountId(), std::string(oldPassword)))
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
return false;
}
- if (strcmp(new_pass, new_pass_c) != 0)
+ if (strcmp(newPassword, passwordConfirmation) != 0)
{
handler->SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH);
handler->SetSentErrorMessage(true);
return false;
}
- AccountOpResult result = AccountMgr::ChangePassword(handler->GetSession()->GetAccountId(), std::string(new_pass));
+ AccountOpResult result = AccountMgr::ChangePassword(handler->GetSession()->GetAccountId(), std::string(newPassword));
switch (result)
{
- case AOR_OK:
- handler->SendSysMessage(LANG_COMMAND_PASSWORD);
- break;
- case AOR_PASS_TOO_LONG:
- handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
- handler->SetSentErrorMessage(true);
- return false;
- default:
- handler->SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD);
- handler->SetSentErrorMessage(true);
- return false;
+ case AOR_OK:
+ handler->SendSysMessage(LANG_COMMAND_PASSWORD);
+ break;
+ case AOR_PASS_TOO_LONG:
+ handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
+ handler->SetSentErrorMessage(true);
+ return false;
+ default:
+ handler->SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD);
+ handler->SetSentErrorMessage(true);
+ return false;
}
return true;
}
- static bool HandleAccountCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleAccountCommand(ChatHandler* handler, char const* /*args*/)
{
- AccountTypes gmlevel = handler->GetSession()->GetSecurity();
- handler->PSendSysMessage(LANG_ACCOUNT_LEVEL, uint32(gmlevel));
+ AccountTypes gmLevel = handler->GetSession()->GetSecurity();
+ handler->PSendSysMessage(LANG_ACCOUNT_LEVEL, uint32(gmLevel));
return true;
}
/// Set/Unset the expansion level for an account
- static bool HandleAccountSetAddonCommand(ChatHandler* handler, const char *args)
+ static bool HandleAccountSetAddonCommand(ChatHandler* handler, char const* args)
{
///- Get the command line arguments
- char *szAcc = strtok((char*)args, " ");
- char *szExp = strtok(NULL, " ");
+ char* account = strtok((char*)args, " ");
+ char* exp = strtok(NULL, " ");
- if (!szAcc)
+ if (!account)
return false;
- std::string account_name;
- uint32 account_id;
+ std::string accountName;
+ uint32 accountId;
- if (!szExp)
+ if (!exp)
{
Player* player = handler->getSelectedPlayer();
if (!player)
return false;
- account_id = player->GetSession()->GetAccountId();
- AccountMgr::GetName(account_id, account_name);
- szExp = szAcc;
+ accountId = player->GetSession()->GetAccountId();
+ AccountMgr::GetName(accountId, accountName);
+ exp = account;
}
else
{
///- Convert Account name to Upper Format
- account_name = szAcc;
- if (!AccountMgr::normalizeString(account_name))
+ accountName = account;
+ if (!AccountMgr::normalizeString(accountName))
{
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
return false;
}
- account_id = AccountMgr::GetId(account_name);
- if (!account_id)
+ accountId = AccountMgr::GetId(accountName);
+ if (!accountId)
{
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
return false;
}
@@ -370,21 +367,21 @@ public:
// Let set addon state only for lesser (strong) security level
// or to self account
- if (handler->GetSession() && handler->GetSession()->GetAccountId () != account_id &&
- handler->HasLowerSecurityAccount (NULL, account_id, true))
+ if (handler->GetSession() && handler->GetSession()->GetAccountId () != accountId &&
+ handler->HasLowerSecurityAccount(NULL, accountId, true))
return false;
- int expansion = atoi(szExp); //get int anyway (0 if error)
+ int expansion = atoi(exp); //get int anyway (0 if error)
if (expansion < 0 || uint8(expansion) > sWorld->getIntConfig(CONFIG_EXPANSION))
return false;
// No SQL injection
- LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id);
- handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, account_name.c_str(), account_id, expansion);
+ LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, accountId);
+ handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName.c_str(), accountId, expansion);
return true;
}
- static bool HandleAccountSetGmLevelCommand(ChatHandler* handler, const char *args)
+ static bool HandleAccountSetGmLevelCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -433,16 +430,16 @@ public:
// handler->getSession() == NULL only for console
targetAccountId = (isAccountNameGiven) ? AccountMgr::GetId(targetAccountName) : handler->getSelectedPlayer()->GetSession()->GetAccountId();
int32 gmRealmID = (isAccountNameGiven) ? atoi(arg3) : atoi(arg2);
- uint32 plSecurity;
+ uint32 playerSecurity;
if (handler->GetSession())
- plSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), gmRealmID);
+ playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), gmRealmID);
else
- plSecurity = SEC_CONSOLE;
+ playerSecurity = SEC_CONSOLE;
// can set security level only for target with less security and to less security that we have
// This is also reject self apply in fact
targetSecurity = AccountMgr::GetSecurity(targetAccountId, gmRealmID);
- if (targetSecurity >= plSecurity || gm >= plSecurity)
+ if (targetSecurity >= playerSecurity || gm >= playerSecurity)
{
handler->SendSysMessage(LANG_YOURS_SECURITY_IS_LOW);
handler->SetSentErrorMessage(true);
@@ -450,7 +447,7 @@ public:
}
// Check and abort if the target gm has a higher rank on one of the realms and the new realm is -1
- if (gmRealmID == -1 && !AccountMgr::IsConsoleAccount(plSecurity))
+ if (gmRealmID == -1 && !AccountMgr::IsConsoleAccount(playerSecurity))
{
QueryResult result = LoginDatabase.PQuery("SELECT * FROM account_access WHERE id = '%u' AND gmlevel > '%d'", targetAccountId, gm);
if (result)
@@ -476,73 +473,75 @@ public:
LoginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u' AND (RealmID = '%d' OR RealmID = '-1')", targetAccountId, realmID);
if (gm != 0)
- LoginDatabase.PExecute("INSERT INTO account_access VALUES ('%u', '%d', '%d')", targetAccountId, gm, realmID);
+ LoginDatabase.PExecute("INSERT INTO account_access VALUES ('%u', '%d', '%d')", targetAccountId, gm, gmRealmID);
+
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm);
return true;
}
/// Set password for account
- static bool HandleAccountSetPasswordCommand(ChatHandler* handler, const char *args)
+ static bool HandleAccountSetPasswordCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
///- Get the command line arguments
- char *szAccount = strtok ((char*)args, " ");
- char *szPassword1 = strtok (NULL, " ");
- char *szPassword2 = strtok (NULL, " ");
+ char* account = strtok((char*)args, " ");
+ char* password = strtok(NULL, " ");
+ char* passwordConfirmation = strtok(NULL, " ");
- if (!szAccount||!szPassword1 || !szPassword2)
+ if (!account || !password || !passwordConfirmation)
return false;
- std::string account_name = szAccount;
- if (!AccountMgr::normalizeString(account_name))
+ std::string accountName = account;
+ if (!AccountMgr::normalizeString(accountName))
{
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
return false;
}
- uint32 targetAccountId = AccountMgr::GetId(account_name);
+ uint32 targetAccountId = AccountMgr::GetId(accountName);
if (!targetAccountId)
{
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SetSentErrorMessage(true);
return false;
}
/// can set password only for target with less security
/// This is also reject self apply in fact
- if (handler->HasLowerSecurityAccount (NULL, targetAccountId, true))
+ if (handler->HasLowerSecurityAccount(NULL, targetAccountId, true))
return false;
- if (strcmp(szPassword1, szPassword2))
+ if (strcmp(password, passwordConfirmation))
{
- handler->SendSysMessage (LANG_NEW_PASSWORDS_NOT_MATCH);
- handler->SetSentErrorMessage (true);
+ handler->SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH);
+ handler->SetSentErrorMessage(true);
return false;
}
- AccountOpResult result = AccountMgr::ChangePassword(targetAccountId, szPassword1);
+ AccountOpResult result = AccountMgr::ChangePassword(targetAccountId, password);
switch (result)
{
- case AOR_OK:
- handler->SendSysMessage(LANG_COMMAND_PASSWORD);
- break;
- case AOR_NAME_NOT_EXIST:
- handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, account_name.c_str());
- handler->SetSentErrorMessage(true);
- return false;
- case AOR_PASS_TOO_LONG:
- handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
- handler->SetSentErrorMessage(true);
- return false;
- default:
- handler->SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD);
- handler->SetSentErrorMessage(true);
- return false;
+ case AOR_OK:
+ handler->SendSysMessage(LANG_COMMAND_PASSWORD);
+ break;
+ case AOR_NAME_NOT_EXIST:
+ handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
+ handler->SetSentErrorMessage(true);
+ return false;
+ case AOR_PASS_TOO_LONG:
+ handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
+ handler->SetSentErrorMessage(true);
+ return false;
+ default:
+ handler->SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD);
+ handler->SetSentErrorMessage(true);
+ return false;
}
+
return true;
}
};
diff --git a/src/server/scripts/Commands/cs_achievement.cpp b/src/server/scripts/Commands/cs_achievement.cpp
index 88e07a07fe7..61ce13f0ecb 100644
--- a/src/server/scripts/Commands/cs_achievement.cpp
+++ b/src/server/scripts/Commands/cs_achievement.cpp
@@ -45,7 +45,7 @@ public:
return commandTable;
}
- static bool HandleAchievementAddCommand(ChatHandler* handler, const char *args)
+ static bool HandleAchievementAddCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -53,8 +53,8 @@ public:
uint32 achievementId = atoi((char*)args);
if (!achievementId)
{
- if (char* cId = handler->extractKeyFromLink((char*)args, "Hachievement"))
- achievementId = atoi(cId);
+ if (char* id = handler->extractKeyFromLink((char*)args, "Hachievement"))
+ achievementId = atoi(id);
if (!achievementId)
return false;
}
@@ -67,8 +67,8 @@ public:
return false;
}
- if (AchievementEntry const* pAE = GetAchievementStore()->LookupEntry(achievementId))
- target->CompletedAchievement(pAE);
+ if (AchievementEntry const* achievementEntry = GetAchievementStore()->LookupEntry(achievementId))
+ target->CompletedAchievement(achievementEntry);
return true;
}
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index dca2f1e4f0e..9e1d5717f1f 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -98,7 +98,7 @@ public:
return commandTable;
}
- static bool HandleDebugPlayCinematicCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugPlayCinematicCommand(ChatHandler* handler, char const* args)
{
// USAGE: .debug play cinematic #cinematicid
// #cinematicid - ID decimal number from CinemaicSequences.dbc (1st column)
@@ -109,20 +109,20 @@ public:
return false;
}
- uint32 dwId = atoi((char*)args);
+ uint32 id = atoi((char*)args);
- if (!sCinematicSequencesStore.LookupEntry(dwId))
+ if (!sCinematicSequencesStore.LookupEntry(id))
{
- handler->PSendSysMessage(LANG_CINEMATIC_NOT_EXIST, dwId);
+ handler->PSendSysMessage(LANG_CINEMATIC_NOT_EXIST, id);
handler->SetSentErrorMessage(true);
return false;
}
- handler->GetSession()->GetPlayer()->SendCinematicStart(dwId);
+ handler->GetSession()->GetPlayer()->SendCinematicStart(id);
return true;
}
- static bool HandleDebugPlayMovieCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugPlayMovieCommand(ChatHandler* handler, char const* args)
{
// USAGE: .debug play movie #movieid
// #movieid - ID decimal number from Movie.dbc (1st column)
@@ -133,21 +133,21 @@ public:
return false;
}
- uint32 dwId = atoi((char*)args);
+ uint32 id = atoi((char*)args);
- if (!sMovieStore.LookupEntry(dwId))
+ if (!sMovieStore.LookupEntry(id))
{
- handler->PSendSysMessage(LANG_MOVIE_NOT_EXIST, dwId);
+ handler->PSendSysMessage(LANG_MOVIE_NOT_EXIST, id);
handler->SetSentErrorMessage(true);
return false;
}
- handler->GetSession()->GetPlayer()->SendMovieStart(dwId);
+ handler->GetSession()->GetPlayer()->SendMovieStart(id);
return true;
}
//Play sound
- static bool HandleDebugPlaySoundCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugPlaySoundCommand(ChatHandler* handler, char const* args)
{
// USAGE: .debug playsound #soundid
// #soundid - ID decimal number from SoundEntries.dbc (1st column)
@@ -158,11 +158,11 @@ public:
return false;
}
- uint32 dwSoundId = atoi((char*)args);
+ uint32 soundId = atoi((char*)args);
- if (!sSoundEntriesStore.LookupEntry(dwSoundId))
+ if (!sSoundEntriesStore.LookupEntry(soundId))
{
- handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, dwSoundId);
+ handler->PSendSysMessage(LANG_SOUND_NOT_EXIST, soundId);
handler->SetSentErrorMessage(true);
return false;
}
@@ -176,48 +176,48 @@ public:
}
if (handler->GetSession()->GetPlayer()->GetSelection())
- unit->PlayDistanceSound(dwSoundId, handler->GetSession()->GetPlayer());
+ unit->PlayDistanceSound(soundId, handler->GetSession()->GetPlayer());
else
- unit->PlayDirectSound(dwSoundId, handler->GetSession()->GetPlayer());
+ unit->PlayDirectSound(soundId, handler->GetSession()->GetPlayer());
- handler->PSendSysMessage(LANG_YOU_HEAR_SOUND, dwSoundId);
+ handler->PSendSysMessage(LANG_YOU_HEAR_SOUND, soundId);
return true;
}
- static bool HandleDebugSendSpellFailCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendSpellFailCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char* px = strtok((char*)args, " ");
- if (!px)
+ char* result = strtok((char*)args, " ");
+ if (!result)
return false;
- uint8 failnum = (uint8)atoi(px);
- if (failnum == 0 && *px != '0')
+ uint8 failNum = (uint8)atoi(result);
+ if (failNum == 0 && *result != '0')
return false;
- char* p1 = strtok(NULL, " ");
- uint8 failarg1 = p1 ? (uint8)atoi(p1) : 0;
+ char* fail1 = strtok(NULL, " ");
+ uint8 failArg1 = fail1 ? (uint8)atoi(fail1) : 0;
- char* p2 = strtok(NULL, " ");
- uint8 failarg2 = p2 ? (uint8)atoi(p2) : 0;
+ char* fail2 = strtok(NULL, " ");
+ uint8 failArg2 = fail2 ? (uint8)atoi(fail2) : 0;
WorldPacket data(SMSG_CAST_FAILED, 5);
data << uint8(0);
data << uint32(133);
- data << uint8(failnum);
- if (p1 || p2)
- data << uint32(failarg1);
- if (p2)
- data << uint32(failarg2);
+ data << uint8(failNum);
+ if (fail1 || fail2)
+ data << uint32(failArg1);
+ if (fail2)
+ data << uint32(failArg2);
handler->GetSession()->SendPacket(&data);
return true;
}
- static bool HandleDebugSendEquipErrorCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendEquipErrorCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -227,7 +227,7 @@ public:
return true;
}
- static bool HandleDebugSendSellErrorCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendSellErrorCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -237,7 +237,7 @@ public:
return true;
}
- static bool HandleDebugSendBuyErrorCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendBuyErrorCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -247,7 +247,7 @@ public:
return true;
}
- static bool HandleDebugSendOpcodeCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleDebugSendOpcodeCommand(ChatHandler* handler, char const* /*args*/)
{
Unit* unit = handler->getSelectedUnit();
Player* player = NULL;
@@ -255,7 +255,9 @@ public:
player = handler->GetSession()->GetPlayer();
else
player = (Player*)unit;
- if (!unit) unit = player;
+
+ if (!unit)
+ unit = player;
std::ifstream ifs("opcode.txt");
if (ifs.bad())
@@ -296,9 +298,7 @@ public:
}
// regular data
else
- {
ifs.putback(commentToken[1]);
- }
}
parsedStream.put(commentToken[0]);
}
@@ -418,7 +418,7 @@ public:
return true;
}
- static bool HandleDebugUpdateWorldStateCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugUpdateWorldStateCommand(ChatHandler* handler, char const* args)
{
char* w = strtok((char*)args, " ");
char* s = strtok(NULL, " ");
@@ -432,14 +432,16 @@ public:
return true;
}
- static bool HandleDebugAreaTriggersCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleDebugAreaTriggersCommand(ChatHandler* handler, char const* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
if (!player->isDebugAreaTriggers)
{
handler->PSendSysMessage(LANG_DEBUG_AREATRIGGER_ON);
player->isDebugAreaTriggers = true;
- } else {
+ }
+ else
+ {
handler->PSendSysMessage(LANG_DEBUG_AREATRIGGER_OFF);
player->isDebugAreaTriggers = false;
}
@@ -447,12 +449,12 @@ public:
}
//Send notification in channel
- static bool HandleDebugSendChannelNotifyCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendChannelNotifyCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- const char *name = "test";
+ char const* name = "test";
uint8 code = atoi(args);
WorldPacket data(SMSG_CHANNEL_NOTIFY, (1+10));
@@ -465,12 +467,12 @@ public:
}
//Send notification in chat
- static bool HandleDebugSendChatMsgCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendChatMsgCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- const char *msg = "testtest";
+ char const* msg = "testtest";
uint8 type = atoi(args);
WorldPacket data;
ChatHandler::FillMessageData(&data, handler->GetSession(), type, 0, "chan", handler->GetSession()->GetPlayer()->GetGUID(), msg, handler->GetSession()->GetPlayer());
@@ -478,54 +480,64 @@ public:
return true;
}
- static bool HandleDebugSendQuestPartyMsgCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendQuestPartyMsgCommand(ChatHandler* handler, char const* args)
{
uint32 msg = atol((char*)args);
handler->GetSession()->GetPlayer()->SendPushToPartyResponse(handler->GetSession()->GetPlayer(), msg);
return true;
}
- static bool HandleDebugGetLootRecipientCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleDebugGetLootRecipientCommand(ChatHandler* handler, char const* /*args*/)
{
Creature* target = handler->getSelectedCreature();
if (!target)
return false;
- handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, DB GUID %u) is %s", target->GetName(), target->GetGUIDLow(), target->GetDBTableGUIDLow(), target->hasLootRecipient()?(target->GetLootRecipient()?target->GetLootRecipient()->GetName():"offline"):"no loot recipient");
+ handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, DB GUID %u) is %s", target->GetName(), target->GetGUIDLow(), target->GetDBTableGUIDLow(), target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName() : "offline") : "no loot recipient");
return true;
}
- static bool HandleDebugSendQuestInvalidMsgCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendQuestInvalidMsgCommand(ChatHandler* handler, char const* args)
{
uint32 msg = atol((char*)args);
handler->GetSession()->GetPlayer()->SendCanTakeQuestResponse(msg);
return true;
}
- static bool HandleDebugGetItemStateCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugGetItemStateCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- std::string state_str = args;
+ std::string itemState = args;
ItemUpdateState state = ITEM_UNCHANGED;
- bool list_queue = false, check_all = false;
- if (state_str == "unchanged") state = ITEM_UNCHANGED;
- else if (state_str == "changed") state = ITEM_CHANGED;
- else if (state_str == "new") state = ITEM_NEW;
- else if (state_str == "removed") state = ITEM_REMOVED;
- else if (state_str == "queue") list_queue = true;
- else if (state_str == "check_all") check_all = true;
- else return false;
+ bool listQueue = false;
+ bool checkAll = false;
+
+ if (itemState == "unchanged")
+ state = ITEM_UNCHANGED;
+ else if (itemState == "changed")
+ state = ITEM_CHANGED;
+ else if (itemState == "new")
+ state = ITEM_NEW;
+ else if (itemState == "removed")
+ state = ITEM_REMOVED;
+ else if (itemState == "queue")
+ listQueue = true;
+ else if (itemState == "check_all")
+ checkAll = true;
+ else
+ return false;
Player* player = handler->getSelectedPlayer();
- if (!player) player = handler->GetSession()->GetPlayer();
+ if (!player)
+ player = handler->GetSession()->GetPlayer();
- if (!list_queue && !check_all)
+ if (!listQueue && !checkAll)
{
- state_str = "The player has the following " + state_str + " items: ";
- handler->SendSysMessage(state_str.c_str());
+ itemState = "The player has the following " + itemState + " items: ";
+ handler->SendSysMessage(itemState.c_str());
for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
@@ -546,60 +558,73 @@ public:
}
}
- if (list_queue)
+ if (listQueue)
{
- std::vector<Item*> &updateQueue = player->GetItemUpdateQueue();
+ std::vector<Item*>& updateQueue = player->GetItemUpdateQueue();
for (size_t i = 0; i < updateQueue.size(); ++i)
{
Item* item = updateQueue[i];
- if (!item) continue;
+ if (!item)
+ continue;
Bag* container = item->GetContainer();
- uint8 bag_slot = container ? container->GetSlot() : uint8(INVENTORY_SLOT_BAG_0);
+ uint8 bagSlot = container ? container->GetSlot() : uint8(INVENTORY_SLOT_BAG_0);
std::string st;
switch (item->GetState())
{
- case ITEM_UNCHANGED: st = "unchanged"; break;
- case ITEM_CHANGED: st = "changed"; break;
- case ITEM_NEW: st = "new"; break;
- case ITEM_REMOVED: st = "removed"; break;
+ case ITEM_UNCHANGED:
+ st = "unchanged";
+ break;
+ case ITEM_CHANGED:
+ st = "changed";
+ break;
+ case ITEM_NEW:
+ st = "new";
+ break;
+ case ITEM_REMOVED:
+ st = "removed";
+ break;
}
- handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bag_slot, item->GetSlot(), item->GetGUIDLow(), st.c_str());
+ handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUIDLow(), st.c_str());
}
if (updateQueue.empty())
handler->PSendSysMessage("The player's updatequeue is empty");
}
- if (check_all)
+ if (checkAll)
{
bool error = false;
- std::vector<Item*> &updateQueue = player->GetItemUpdateQueue();
+ std::vector<Item*>& updateQueue = player->GetItemUpdateQueue();
for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
continue;
Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
- if (!item) continue;
+ if (!item)
+ continue;
if (item->GetSlot() != i)
{
handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUIDLow(), item->GetSlot());
- error = true; continue;
+ error = true;
+ continue;
}
if (item->GetOwnerGUID() != player->GetGUID())
{
handler->PSendSysMessage("The item with slot %d and itemguid %d does have non-matching owner guid (%d) and player guid (%d) !", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
if (Bag* container = item->GetContainer())
{
handler->PSendSysMessage("The item with slot %d and guid %d has a container (slot: %d, guid: %d) but shouldn't!", item->GetSlot(), item->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
if (item->IsInUpdateQueue())
@@ -608,25 +633,29 @@ public:
if (qp > updateQueue.size())
{
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUIDLow(), qp);
- error = true; continue;
+ error = true;
+ continue;
}
if (updateQueue[qp] == NULL)
{
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUIDLow(), qp);
- error = true; continue;
+ error = true;
+ continue;
}
if (updateQueue[qp] != item)
{
handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
}
else if (item->GetState() != ITEM_UNCHANGED)
{
handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUIDLow(), item->GetState());
- error = true; continue;
+ error = true;
+ continue;
}
if (Bag* bag = item->ToBag())
@@ -634,31 +663,36 @@ public:
for (uint8 j = 0; j < bag->GetBagSize(); ++j)
{
Item* item2 = bag->GetItemByPos(j);
- if (!item2) continue;
+ if (!item2)
+ continue;
if (item2->GetSlot() != j)
{
handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUIDLow(), item2->GetSlot());
- error = true; continue;
+ error = true;
+ continue;
}
if (item2->GetOwnerGUID() != player->GetGUID())
{
handler->PSendSysMessage("The item in bag %d at slot %d and with itemguid %d, the owner's guid (%d) and the player's guid (%d) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), GUID_LOPART(item2->GetOwnerGUID()), player->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
Bag* container = item2->GetContainer();
if (!container)
{
handler->PSendSysMessage("The item in bag %d at slot %d with guid %d has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
if (container != bag)
{
handler->PSendSysMessage("The item in bag %d at slot %d with guid %d has a different container(slot %d guid %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
if (item2->IsInUpdateQueue())
@@ -667,25 +701,29 @@ public:
if (qp > updateQueue.size())
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
- error = true; continue;
+ error = true;
+ continue;
}
if (updateQueue[qp] == NULL)
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp);
- error = true; continue;
+ error = true;
+ continue;
}
if (updateQueue[qp] != item2)
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
}
else if (item2->GetState() != ITEM_UNCHANGED)
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), item2->GetState());
- error = true; continue;
+ error = true;
+ continue;
}
}
}
@@ -694,33 +732,40 @@ public:
for (size_t i = 0; i < updateQueue.size(); ++i)
{
Item* item = updateQueue[i];
- if (!item) continue;
+ if (!item)
+ continue;
if (item->GetOwnerGUID() != player->GetGUID())
{
handler->PSendSysMessage("queue(" SIZEFMTD "): For the item with guid %d, the owner's guid (%d) and the player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
if (item->GetQueuePos() != i)
{
handler->PSendSysMessage("queue(" SIZEFMTD "): For the item with guid %d, the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
- if (item->GetState() == ITEM_REMOVED) continue;
+ if (item->GetState() == ITEM_REMOVED)
+ continue;
+
Item* test = player->GetItemByPos(item->GetBagSlot(), item->GetSlot());
if (test == NULL)
{
handler->PSendSysMessage("queue(" SIZEFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have any item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
if (test != item)
{
handler->PSendSysMessage("queue(" SIZEFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, an item which guid is %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
- error = true; continue;
+ error = true;
+ continue;
}
}
if (!error)
@@ -730,54 +775,54 @@ public:
return true;
}
- static bool HandleDebugBattlegroundCommand(ChatHandler* /*handler*/, const char* /*args*/)
+ static bool HandleDebugBattlegroundCommand(ChatHandler* /*handler*/, char const* /*args*/)
{
sBattlegroundMgr->ToggleTesting();
return true;
}
- static bool HandleDebugArenaCommand(ChatHandler* /*handler*/, const char* /*args*/)
+ static bool HandleDebugArenaCommand(ChatHandler* /*handler*/, char const* /*args*/)
{
sBattlegroundMgr->ToggleArenaTesting();
return true;
}
- static bool HandleDebugThreatListCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleDebugThreatListCommand(ChatHandler* handler, char const* /*args*/)
{
Creature* target = handler->getSelectedCreature();
if (!target || target->isTotem() || target->isPet())
return false;
- std::list<HostileReference*>& tlist = target->getThreatManager().getThreatList();
+ std::list<HostileReference*>& threatList = target->getThreatManager().getThreatList();
std::list<HostileReference*>::iterator itr;
- uint32 cnt = 0;
+ uint32 count = 0;
handler->PSendSysMessage("Threat list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
- for (itr = tlist.begin(); itr != tlist.end(); ++itr)
+ for (itr = threatList.begin(); itr != threatList.end(); ++itr)
{
Unit* unit = (*itr)->getTarget();
if (!unit)
continue;
- ++cnt;
- handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), (*itr)->getThreat());
+ ++count;
+ handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName(), unit->GetGUIDLow(), (*itr)->getThreat());
}
handler->SendSysMessage("End of threat list.");
return true;
}
- static bool HandleDebugHostileRefListCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleDebugHostileRefListCommand(ChatHandler* handler, char const* /*args*/)
{
Unit* target = handler->getSelectedUnit();
if (!target)
target = handler->GetSession()->GetPlayer();
HostileReference* ref = target->getHostileRefManager().getFirst();
- uint32 cnt = 0;
+ uint32 count = 0;
handler->PSendSysMessage("Hostil reference list of %s (guid %u)", target->GetName(), target->GetGUIDLow());
while (ref)
{
if (Unit* unit = ref->getSource()->getOwner())
{
- ++cnt;
- handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", cnt, unit->GetName(), unit->GetGUIDLow(), ref->getThreat());
+ ++count;
+ handler->PSendSysMessage(" %u. %s (guid %u) - threat %f", count, unit->GetName(), unit->GetGUIDLow(), ref->getThreat());
}
ref = ref->next();
}
@@ -785,7 +830,7 @@ public:
return true;
}
- static bool HandleDebugSetVehicleIdCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSetVehicleIdCommand(ChatHandler* handler, char const* args)
{
Unit* target = handler->getSelectedUnit();
if (!target || target->IsVehicle())
@@ -804,7 +849,7 @@ public:
return true;
}
- static bool HandleDebugEnterVehicleCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugEnterVehicleCommand(ChatHandler* handler, char const* args)
{
Unit* target = handler->getSelectedUnit();
if (!target || !target->IsVehicle())
@@ -839,7 +884,7 @@ public:
return true;
}
- static bool HandleDebugSpawnVehicleCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSpawnVehicleCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -880,12 +925,12 @@ public:
return false;
}
- map->Add(v->ToCreature());
+ map->AddToMap(v->ToCreature());
return true;
}
- static bool HandleDebugSendLargePacketCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleDebugSendLargePacketCommand(ChatHandler* handler, char const* /*args*/)
{
const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. ";
std::ostringstream ss;
@@ -895,7 +940,7 @@ public:
return true;
}
- static bool HandleDebugSendSetPhaseShiftCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSendSetPhaseShiftCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -905,7 +950,7 @@ public:
return true;
}
- static bool HandleDebugGetItemValueCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugGetItemValueCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -934,7 +979,7 @@ public:
return true;
}
- static bool HandleDebugSetItemValueCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSetItemValueCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -963,7 +1008,7 @@ public:
return true;
}
- static bool HandleDebugItemExpireCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugItemExpireCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -986,17 +1031,17 @@ public:
}
//show animation
- static bool HandleDebugAnimCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugAnimCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- uint32 anim_id = atoi((char*)args);
- handler->GetSession()->GetPlayer()->HandleEmoteCommand(anim_id);
+ uint32 animId = atoi((char*)args);
+ handler->GetSession()->GetPlayer()->HandleEmoteCommand(animId);
return true;
}
- static bool HandleDebugSetAuraStateCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSetAuraStateCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
@@ -1026,16 +1071,16 @@ public:
return true;
}
- static bool HandleDebugSetValueCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugSetValueCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char* px = strtok((char*)args, " ");
- char* py = strtok(NULL, " ");
- char* pz = strtok(NULL, " ");
+ char* x = strtok((char*)args, " ");
+ char* y = strtok(NULL, " ");
+ char* z = strtok(NULL, " ");
- if (!px || !py)
+ if (!x || !y)
return false;
WorldObject* target = handler->getSelectedObject();
@@ -1048,41 +1093,42 @@ public:
uint64 guid = target->GetGUID();
- uint32 Opcode = (uint32)atoi(px);
- if (Opcode >= target->GetValuesCount())
+ uint32 opcode = (uint32)atoi(x);
+ if (opcode >= target->GetValuesCount())
{
- handler->PSendSysMessage(LANG_TOO_BIG_INDEX, Opcode, GUID_LOPART(guid), target->GetValuesCount());
+ handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, GUID_LOPART(guid), target->GetValuesCount());
return false;
}
- bool isint32 = true;
- if (pz)
- isint32 = (bool)atoi(pz);
- if (isint32)
+ bool isInt32 = true;
+ if (z)
+ isInt32 = (bool)atoi(z);
+
+ if (isInt32)
{
- uint32 iValue = (uint32)atoi(py);
- target->SetUInt32Value(Opcode, iValue);
- handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), Opcode, iValue);
+ uint32 value = (uint32)atoi(y);
+ target->SetUInt32Value(opcode , value);
+ handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), opcode, value);
}
else
{
- float fValue = (float)atof(py);
- target->SetFloatValue(Opcode, fValue);
- handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), Opcode, fValue);
+ float value = (float)atof(y);
+ target->SetFloatValue(opcode , value);
+ handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), opcode, value);
}
return true;
}
- static bool HandleDebugGetValueCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugGetValueCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char* px = strtok((char*)args, " ");
- char* pz = strtok(NULL, " ");
+ char* x = strtok((char*)args, " ");
+ char* z = strtok(NULL, " ");
- if (!px)
+ if (!x)
return false;
Unit* target = handler->getSelectedUnit();
@@ -1095,62 +1141,62 @@ public:
uint64 guid = target->GetGUID();
- uint32 Opcode = (uint32)atoi(px);
- if (Opcode >= target->GetValuesCount())
+ uint32 opcode = (uint32)atoi(x);
+ if (opcode >= target->GetValuesCount())
{
- handler->PSendSysMessage(LANG_TOO_BIG_INDEX, Opcode, GUID_LOPART(guid), target->GetValuesCount());
+ handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, GUID_LOPART(guid), target->GetValuesCount());
return false;
}
- bool isint32 = true;
- if (pz)
- isint32 = (bool)atoi(pz);
+ bool isInt32 = true;
+ if (z)
+ isInt32 = (bool)atoi(z);
- if (isint32)
+ if (isInt32)
{
- uint32 iValue = target->GetUInt32Value(Opcode);
- handler->PSendSysMessage(LANG_GET_UINT_FIELD, GUID_LOPART(guid), Opcode, iValue);
+ uint32 value = target->GetUInt32Value(opcode);
+ handler->PSendSysMessage(LANG_GET_UINT_FIELD, GUID_LOPART(guid), opcode, value);
}
else
{
- float fValue = target->GetFloatValue(Opcode);
- handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, GUID_LOPART(guid), Opcode, fValue);
+ float value = target->GetFloatValue(opcode);
+ handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, GUID_LOPART(guid), opcode, value);
}
return true;
}
- static bool HandleDebugMod32ValueCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugMod32ValueCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char* px = strtok((char*)args, " ");
- char* py = strtok(NULL, " ");
+ char* x = strtok((char*)args, " ");
+ char* y = strtok(NULL, " ");
- if (!px || !py)
+ if (!x || !y)
return false;
- uint32 Opcode = (uint32)atoi(px);
- int Value = atoi(py);
+ uint32 opcode = (uint32)atoi(x);
+ int value = atoi(y);
- if (Opcode >= handler->GetSession()->GetPlayer()->GetValuesCount())
+ if (opcode >= handler->GetSession()->GetPlayer()->GetValuesCount())
{
- handler->PSendSysMessage(LANG_TOO_BIG_INDEX, Opcode, handler->GetSession()->GetPlayer()->GetGUIDLow(), handler->GetSession()->GetPlayer()->GetValuesCount());
+ handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, handler->GetSession()->GetPlayer()->GetGUIDLow(), handler->GetSession()->GetPlayer()->GetValuesCount());
return false;
}
- int CurrentValue = (int)handler->GetSession()->GetPlayer()->GetUInt32Value(Opcode);
+ int currentValue = (int)handler->GetSession()->GetPlayer()->GetUInt32Value(opcode);
- CurrentValue += Value;
- handler->GetSession()->GetPlayer()->SetUInt32Value(Opcode, (uint32)CurrentValue);
+ currentValue += value;
+ handler->GetSession()->GetPlayer()->SetUInt32Value(opcode , (uint32)currentValue);
- handler->PSendSysMessage(LANG_CHANGE_32BIT_FIELD, Opcode, CurrentValue);
+ handler->PSendSysMessage(LANG_CHANGE_32BIT_FIELD, opcode, currentValue);
return true;
}
- static bool HandleDebugUpdateCommand(ChatHandler* handler, const char* args)
+ static bool HandleDebugUpdateCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -1158,49 +1204,48 @@ public:
uint32 updateIndex;
uint32 value;
- char* pUpdateIndex = strtok((char*)args, " ");
+ char* index = strtok((char*)args, " ");
- Unit* chr = handler->getSelectedUnit();
- if (chr == NULL)
+ Unit* unit = handler->getSelectedUnit();
+ if (!unit)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
- if (!pUpdateIndex)
- {
+ if (!index)
return true;
- }
- updateIndex = atoi(pUpdateIndex);
+
+ updateIndex = atoi(index);
//check updateIndex
- if (chr->GetTypeId() == TYPEID_PLAYER)
- {
- if (updateIndex >= PLAYER_END) return true;
- }
- else
+ if (unit->GetTypeId() == TYPEID_PLAYER)
{
- if (updateIndex >= UNIT_END) return true;
+ if (updateIndex >= PLAYER_END)
+ return true;
}
+ else if (updateIndex >= UNIT_END)
+ return true;
- char* pvalue = strtok(NULL, " ");
- if (!pvalue)
+ char* val = strtok(NULL, " ");
+ if (!val)
{
- value=chr->GetUInt32Value(updateIndex);
+ value = unit->GetUInt32Value(updateIndex);
- handler->PSendSysMessage(LANG_UPDATE, chr->GetGUIDLow(), updateIndex, value);
+ handler->PSendSysMessage(LANG_UPDATE, unit->GetGUIDLow(), updateIndex, value);
return true;
}
- value=atoi(pvalue);
+ value = atoi(val);
- handler->PSendSysMessage(LANG_UPDATE_CHANGE, chr->GetGUIDLow(), updateIndex, value);
+ handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUIDLow(), updateIndex, value);
- chr->SetUInt32Value(updateIndex, value);
+ unit->SetUInt32Value(updateIndex, value);
return true;
}
- static bool HandleDebugSet32BitCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleDebugSet32BitCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -1213,21 +1258,21 @@ public:
return false;
}
- char* px = strtok((char*)args, " ");
- char* py = strtok(NULL, " ");
+ char* x = strtok((char*)args, " ");
+ char* y = strtok(NULL, " ");
- if (!px || !py)
+ if (!x || !y)
return false;
- uint32 Opcode = (uint32)atoi(px);
- uint32 Value = (uint32)atoi(py);
- if (Value > 32) //uint32 = 32 bits
+ uint32 opcode = (uint32)atoi(x);
+ uint32 val = (uint32)atoi(y);
+ if (val > 32) //uint32 = 32 bits
return false;
- uint32 iValue = Value ? 1 << (Value - 1) : 0;
- target->SetUInt32Value(Opcode, iValue);
+ uint32 value = val ? 1 << (val - 1) : 0;
+ target->SetUInt32Value(opcode, value);
- handler->PSendSysMessage(LANG_SET_32BIT_FIELD, Opcode, iValue);
+ handler->PSendSysMessage(LANG_SET_32BIT_FIELD, opcode, value);
return true;
}
};
diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp
index 20ade38d676..3bd745df4f4 100644
--- a/src/server/scripts/Commands/cs_event.cpp
+++ b/src/server/scripts/Commands/cs_event.cpp
@@ -49,7 +49,7 @@ public:
return commandTable;
}
- static bool HandleEventActiveListCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleEventActiveListCommand(ChatHandler* handler, char const* /*args*/)
{
uint32 counter = 0;
@@ -60,13 +60,13 @@ public:
for (GameEventMgr::ActiveEvents::const_iterator itr = activeEvents.begin(); itr != activeEvents.end(); ++itr)
{
- uint32 event_id = *itr;
- GameEventData const& eventData = events[event_id];
+ uint32 eventId = *itr;
+ GameEventData const& eventData = events[eventId];
if (handler->GetSession())
- handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, event_id, event_id, eventData.description.c_str(), active);
+ handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description.c_str(), active);
else
- handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, event_id, eventData.description.c_str(), active);
+ handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description.c_str(), active);
++counter;
}
@@ -78,28 +78,28 @@ public:
return true;
}
- static bool HandleEventInfoCommand(ChatHandler* handler, const char* args)
+ static bool HandleEventInfoCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
// id or [name] Shift-click form |color|Hgameevent:id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameevent");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameevent");
+ if (!id)
return false;
- uint32 event_id = atoi(cId);
+ uint32 eventId = atoi(id);
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
- if (event_id >=events.size())
+ if (eventId >= events.size())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
handler->SetSentErrorMessage(true);
return false;
}
- GameEventData const& eventData = events[event_id];
+ GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
@@ -108,47 +108,47 @@ public:
}
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
- bool active = activeEvents.find(event_id) != activeEvents.end();
+ bool active = activeEvents.find(eventId) != activeEvents.end();
char const* activeStr = active ? handler->GetTrinityString(LANG_ACTIVE) : "";
std::string startTimeStr = TimeToTimestampStr(eventData.start);
std::string endTimeStr = TimeToTimestampStr(eventData.end);
- uint32 delay = sGameEventMgr->NextCheck(event_id);
- time_t nextTime = time(NULL)+delay;
- std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL)+delay) : "-";
+ uint32 delay = sGameEventMgr->NextCheck(eventId);
+ time_t nextTime = time(NULL) + delay;
+ std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL) + delay) : "-";
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE);
std::string lengthStr = secsToTimeString(eventData.length * MINUTE);
- handler->PSendSysMessage(LANG_EVENT_INFO, event_id, eventData.description.c_str(), activeStr,
+ handler->PSendSysMessage(LANG_EVENT_INFO, eventId, eventData.description.c_str(), activeStr,
startTimeStr.c_str(), endTimeStr.c_str(), occurenceStr.c_str(), lengthStr.c_str(),
nextStr.c_str());
return true;
}
- static bool HandleEventStartCommand(ChatHandler* handler, const char* args)
+ static bool HandleEventStartCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
// id or [name] Shift-click form |color|Hgameevent:id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameevent");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameevent");
+ if (!id)
return false;
- int32 event_id = atoi(cId);
+ int32 eventId = atoi(id);
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
- if (event_id < 1 || uint32(event_id) >= events.size())
+ if (eventId < 1 || uint32(eventId) >= events.size())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
handler->SetSentErrorMessage(true);
return false;
}
- GameEventData const& eventData = events[event_id];
+ GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
@@ -157,39 +157,39 @@ public:
}
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
- if (activeEvents.find(event_id) != activeEvents.end())
+ if (activeEvents.find(eventId) != activeEvents.end())
{
- handler->PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE, event_id);
+ handler->PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE, eventId);
handler->SetSentErrorMessage(true);
return false;
}
- sGameEventMgr->StartEvent(event_id, true);
+ sGameEventMgr->StartEvent(eventId, true);
return true;
}
- static bool HandleEventStopCommand(ChatHandler* handler, const char* args)
+ static bool HandleEventStopCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
// id or [name] Shift-click form |color|Hgameevent:id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameevent");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameevent");
+ if (!id)
return false;
- int32 event_id = atoi(cId);
+ int32 eventId = atoi(id);
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
- if (event_id < 1 || uint32(event_id) >= events.size())
+ if (eventId < 1 || uint32(eventId) >= events.size())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
handler->SetSentErrorMessage(true);
return false;
}
- GameEventData const& eventData = events[event_id];
+ GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
@@ -199,14 +199,14 @@ public:
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
- if (activeEvents.find(event_id) == activeEvents.end())
+ if (activeEvents.find(eventId) == activeEvents.end())
{
- handler->PSendSysMessage(LANG_EVENT_NOT_ACTIVE, event_id);
+ handler->PSendSysMessage(LANG_EVENT_NOT_ACTIVE, eventId);
handler->SetSentErrorMessage(true);
return false;
}
- sGameEventMgr->StopEvent(event_id, true);
+ sGameEventMgr->StopEvent(eventId, true);
return true;
}
};
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index 9a7146c641c..ab077af0863 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -53,7 +53,7 @@ public:
}
// Enables or disables hiding of the staff badge
- static bool HandleGMChatCommand(ChatHandler* handler, const char* args)
+ static bool HandleGMChatCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
@@ -65,16 +65,16 @@ public:
return true;
}
- std::string argstr = (char*)args;
+ std::string param = (char*)args;
- if (argstr == "on")
+ if (param == "on")
{
handler->GetSession()->GetPlayer()->SetGMChat(true);
handler->GetSession()->SendNotification(LANG_GM_CHAT_ON);
return true;
}
- if (argstr == "off")
+ if (param == "off")
{
handler->GetSession()->GetPlayer()->SetGMChat(false);
handler->GetSession()->SendNotification(LANG_GM_CHAT_OFF);
@@ -86,7 +86,7 @@ public:
return false;
}
- static bool HandleGMFlyCommand(ChatHandler* handler, const char* args)
+ static bool HandleGMFlyCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -112,17 +112,17 @@ public:
return true;
}
- static bool HandleGMListIngameCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleGMListIngameCommand(ChatHandler* handler, char const* /*args*/)
{
bool first = true;
bool footer = false;
- ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
- HashMapHolder<Player>::MapType &m = sObjectAccessor->GetPlayers();
+ TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
+ HashMapHolder<Player>::MapType const& m = sObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
- AccountTypes itr_sec = itr->second->GetSession()->GetSecurity();
- if ((itr->second->isGameMaster() || (!AccountMgr::IsPlayerAccount(itr_sec) && itr_sec <= AccountTypes(sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_GM_LIST)))) &&
+ AccountTypes itrSec = itr->second->GetSession()->GetSecurity();
+ if ((itr->second->isGameMaster() || (!AccountMgr::IsPlayerAccount(itrSec) && itrSec <= AccountTypes(sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_GM_LIST)))) &&
(!handler->GetSession() || itr->second->IsVisibleGloballyFor(handler->GetSession()->GetPlayer())))
{
if (first)
@@ -132,12 +132,12 @@ public:
handler->SendSysMessage(LANG_GMS_ON_SRV);
handler->SendSysMessage("========================");
}
- const char* name = itr->second->GetName();
- uint8 security = itr_sec;
+ char const* name = itr->second->GetName();
+ uint8 security = itrSec;
uint8 max = ((16 - strlen(name)) / 2);
uint8 max2 = max;
- if (((max)+(max2)+(strlen(name))) == 16)
- max2 = ((max)-1);
+ if ((max + max2 + strlen(name)) == 16)
+ max2 = max - 1;
if (handler->GetSession())
handler->PSendSysMessage("| %s GMLevel %u", name, security);
else
@@ -152,7 +152,7 @@ public:
}
/// Display the list of GMs
- static bool HandleGMListFullCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleGMListFullCommand(ChatHandler* handler, char const* /*args*/)
{
///- Get the accounts with GM Level >0
QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u", SEC_MODERATOR);
@@ -164,19 +164,17 @@ public:
do
{
Field* fields = result->Fetch();
- const char* name = fields[0].GetCString();
+ char const* name = fields[0].GetCString();
uint8 security = fields[1].GetUInt8();
- uint8 max = ((16 - strlen(name)) / 2);
+ uint8 max = (16 - strlen(name)) / 2;
uint8 max2 = max;
- if (((max)+(max2)+(strlen(name))) == 16)
- max2 = ((max)-1);
+ if ((max + max2 + strlen(name)) == 16)
+ max2 = max - 1;
if (handler->GetSession())
handler->PSendSysMessage("| %s GMLevel %u", name, security);
else
handler->PSendSysMessage("|%*s%s%*s| %u |", max, " ", name, max2, " ", security);
- }
- while (result->NextRow());
-
+ } while (result->NextRow());
handler->SendSysMessage("========================");
}
else
@@ -185,24 +183,24 @@ public:
}
//Enable\Disable Invisible mode
- static bool HandleGMVisibleCommand(ChatHandler* handler, const char* args)
+ static bool HandleGMVisibleCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
- handler->PSendSysMessage(LANG_YOU_ARE, handler->GetSession()->GetPlayer()->isGMVisible() ? handler->GetTrinityString(LANG_VISIBLE) : handler->GetTrinityString(LANG_INVISIBLE));
+ handler->PSendSysMessage(LANG_YOU_ARE, handler->GetSession()->GetPlayer()->isGMVisible() ? handler->GetTrinityString(LANG_VISIBLE) : handler->GetTrinityString(LANG_INVISIBLE));
return true;
}
- std::string argstr = (char*)args;
+ std::string param = (char*)args;
- if (argstr == "on")
+ if (param == "on")
{
handler->GetSession()->GetPlayer()->SetGMVisible(true);
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
return true;
}
- if (argstr == "off")
+ if (param == "off")
{
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
handler->GetSession()->GetPlayer()->SetGMVisible(false);
@@ -215,7 +213,7 @@ public:
}
//Enable\Disable GM Mode
- static bool HandleGMCommand(ChatHandler* handler, const char* args)
+ static bool HandleGMCommand(ChatHandler* handler, char const* args)
{
if (!*args)
{
@@ -226,9 +224,9 @@ public:
return true;
}
- std::string argstr = (char*)args;
+ std::string param = (char*)args;
- if (argstr == "on")
+ if (param == "on")
{
handler->GetSession()->GetPlayer()->SetGameMaster(true);
handler->GetSession()->SendNotification(LANG_GM_ON);
@@ -240,7 +238,7 @@ public:
return true;
}
- if (argstr == "off")
+ if (param == "off")
{
handler->GetSession()->GetPlayer()->SetGameMaster(false);
handler->GetSession()->SendNotification(LANG_GM_OFF);
diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp
index 118ab9eb13a..5ed2d6a3dd8 100644
--- a/src/server/scripts/Commands/cs_go.cpp
+++ b/src/server/scripts/Commands/cs_go.cpp
@@ -57,6 +57,7 @@ public:
};
return commandTable;
}
+
/** \brief Teleport the GM to the specified creature
*
* .gocreature <GUID> --> TP using creature.guid
@@ -68,59 +69,52 @@ public:
* you will be teleported to the first one that is found.
*/
//teleport to creature
- static bool HandleGoCreatureCommand(ChatHandler* handler, const char* args)
+ static bool HandleGoCreatureCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- Player* _player = handler->GetSession()->GetPlayer();
+
+ Player* player = handler->GetSession()->GetPlayer();
// "id" or number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r
- char* pParam1 = handler->extractKeyFromLink((char*)args, "Hcreature");
- if (!pParam1)
+ char* param1 = handler->extractKeyFromLink((char*)args, "Hcreature");
+ if (!param1)
return false;
std::ostringstream whereClause;
// User wants to teleport to the NPC's template entry
- if (strcmp(pParam1, "id") == 0)
+ if (strcmp(param1, "id") == 0)
{
- //sLog->outError("DEBUG: ID found");
-
// Get the "creature_template.entry"
// number or [name] Shift-click form |color|Hcreature_entry:creature_id|h[name]|h|r
char* tail = strtok(NULL, "");
if (!tail)
return false;
- char* cId = handler->extractKeyFromLink(tail, "Hcreature_entry");
- if (!cId)
+ char* id = handler->extractKeyFromLink(tail, "Hcreature_entry");
+ if (!id)
return false;
- int32 tEntry = atoi(cId);
- //sLog->outError("DEBUG: ID value: %d", tEntry);
- if (!tEntry)
+ int32 entry = atoi(id);
+ if (!entry)
return false;
- whereClause << "WHERE id = '" << tEntry << '\'';
+ whereClause << "WHERE id = '" << entry << '\'';
}
else
{
- //sLog->outError("DEBUG: ID *not found*");
-
- int32 guid = atoi(pParam1);
+ int32 guid = atoi(param1);
// Number is invalid - maybe the user specified the mob's name
if (!guid)
{
- std::string name = pParam1;
+ std::string name = param1;
WorldDatabase.EscapeString(name);
whereClause << ", creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" '" << name << '\'';
}
else
- {
whereClause << "WHERE guid = '" << guid << '\'';
- }
}
- //sLog->outError("DEBUG: %s", whereClause.c_str());
QueryResult result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z, orientation, map, guid, id FROM creature %s", whereClause.str().c_str());
if (!result)
@@ -137,12 +131,12 @@ public:
float y = fields[1].GetFloat();
float z = fields[2].GetFloat();
float ort = fields[3].GetFloat();
- int mapid = fields[4].GetUInt16();
+ int mapId = fields[4].GetUInt16();
uint32 guid = fields[5].GetUInt32();
uint32 id = fields[6].GetUInt32();
// if creature is in same map with caster go at its current location
- if (Creature* creature = sObjectAccessor->GetCreature(*_player, MAKE_NEW_GUID(guid, id, HIGHGUID_UNIT)))
+ if (Creature* creature = sObjectAccessor->GetCreature(*player, MAKE_NEW_GUID(guid, id, HIGHGUID_UNIT)))
{
x = creature->GetPositionX();
y = creature->GetPositionY();
@@ -150,46 +144,47 @@ public:
ort = creature->GetOrientation();
}
- if (!MapManager::IsValidMapCoord(mapid, x, y, z, ort))
+ if (!MapManager::IsValidMapCoord(mapId, x, y, z, ort))
{
- handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
+ handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
handler->SetSentErrorMessage(true);
return false;
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- _player->TeleportTo(mapid, x, y, z, ort);
+ player->TeleportTo(mapId, x, y, z, ort);
return true;
}
- static bool HandleGoGraveyardCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleGoGraveyardCommand(ChatHandler* handler, char const* args)
{
- Player* _player = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
if (!*args)
return false;
- char *gyId = strtok((char*)args, " ");
+ char* gyId = strtok((char*)args, " ");
if (!gyId)
return false;
- int32 i_gyId = atoi(gyId);
+ int32 graveyardId = atoi(gyId);
- if (!i_gyId)
+ if (!graveyardId)
return false;
- WorldSafeLocsEntry const* gy = sWorldSafeLocsStore.LookupEntry(i_gyId);
+ WorldSafeLocsEntry const* gy = sWorldSafeLocsStore.LookupEntry(graveyardId);
if (!gy)
{
- handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST, i_gyId);
+ handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNOEXIST, graveyardId);
handler->SetSentErrorMessage(true);
return false;
}
@@ -202,93 +197,92 @@ public:
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- _player->TeleportTo(gy->map_id, gy->x, gy->y, gy->z, _player->GetOrientation());
+ player->TeleportTo(gy->map_id, gy->x, gy->y, gy->z, player->GetOrientation());
return true;
}
+
//teleport to grid
- static bool HandleGoGridCommand(ChatHandler* handler, const char* args)
+ static bool HandleGoGridCommand(ChatHandler* handler, char const* args)
{
- if (!*args) return false;
- Player* _player = handler->GetSession()->GetPlayer();
+ if (!*args)
+ return false;
+
+ Player* player = handler->GetSession()->GetPlayer();
- char* px = strtok((char*)args, " ");
- char* py = strtok(NULL, " ");
- char* pmapid = strtok(NULL, " ");
+ char* gridX = strtok((char*)args, " ");
+ char* gridY = strtok(NULL, " ");
+ char* id = strtok(NULL, " ");
- if (!px || !py)
+ if (!gridX || !gridY)
return false;
- float grid_x = (float)atof(px);
- float grid_y = (float)atof(py);
- uint32 mapid;
- if (pmapid)
- mapid = (uint32)atoi(pmapid);
- else mapid = _player->GetMapId();
+ uint32 mapId = id ? (uint32)atoi(id) : player->GetMapId();
// center of grid
- float x = (grid_x-CENTER_GRID_ID+0.5f)*SIZE_OF_GRIDS;
- float y = (grid_y-CENTER_GRID_ID+0.5f)*SIZE_OF_GRIDS;
+ float x = ((float)atof(gridX) - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS;
+ float y = ((float)atof(gridY) - CENTER_GRID_ID + 0.5f) * SIZE_OF_GRIDS;
- if (!MapManager::IsValidMapCoord(mapid, x, y))
+ if (!MapManager::IsValidMapCoord(mapId, x, y))
{
- handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
+ handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
handler->SetSentErrorMessage(true);
return false;
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- Map const* map = sMapMgr->CreateBaseMap(mapid);
+ Map const* map = sMapMgr->CreateBaseMap(mapId);
float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
- _player->TeleportTo(mapid, x, y, z, _player->GetOrientation());
+ player->TeleportTo(mapId, x, y, z, player->GetOrientation());
return true;
}
+
//teleport to gameobject
- static bool HandleGoObjectCommand(ChatHandler* handler, const char* args)
+ static bool HandleGoObjectCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- Player* _player = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- int32 guid = atoi(cId);
+ int32 guid = atoi(id);
if (!guid)
return false;
float x, y, z, ort;
- int mapid;
+ int mapId;
// by DB guid
- if (GameObjectData const* go_data = sObjectMgr->GetGOData(guid))
+ if (GameObjectData const* goData = sObjectMgr->GetGOData(guid))
{
- x = go_data->posX;
- y = go_data->posY;
- z = go_data->posZ;
- ort = go_data->orientation;
- mapid = go_data->mapid;
+ x = goData->posX;
+ y = goData->posY;
+ z = goData->posZ;
+ ort = goData->orientation;
+ mapId = goData->mapid;
}
else
{
@@ -297,45 +291,46 @@ public:
return false;
}
- if (!MapManager::IsValidMapCoord(mapid, x, y, z, ort))
+ if (!MapManager::IsValidMapCoord(mapId, x, y, z, ort))
{
- handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
+ handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
handler->SetSentErrorMessage(true);
return false;
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- _player->TeleportTo(mapid, x, y, z, ort);
+ player->TeleportTo(mapId, x, y, z, ort);
return true;
}
- static bool HandleGoTaxinodeCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleGoTaxinodeCommand(ChatHandler* handler, char const* args)
{
- Player* _player = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
if (!*args)
return false;
- char* cNodeId = handler->extractKeyFromLink((char*)args, "Htaxinode");
- if (!cNodeId)
+ char* id = handler->extractKeyFromLink((char*)args, "Htaxinode");
+ if (!id)
return false;
- int32 i_nodeId = atoi(cNodeId);
- if (!i_nodeId)
+ int32 nodeId = atoi(id);
+ if (!nodeId)
return false;
- TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i_nodeId);
+ TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(nodeId);
if (!node)
{
- handler->PSendSysMessage(LANG_COMMAND_GOTAXINODENOTFOUND, i_nodeId);
+ handler->PSendSysMessage(LANG_COMMAND_GOTAXINODENOTFOUND, nodeId);
handler->SetSentErrorMessage(true);
return false;
}
@@ -349,38 +344,39 @@ public:
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- _player->TeleportTo(node->map_id, node->x, node->y, node->z, _player->GetOrientation());
+ player->TeleportTo(node->map_id, node->x, node->y, node->z, player->GetOrientation());
return true;
}
- static bool HandleGoTriggerCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleGoTriggerCommand(ChatHandler* handler, char const* args)
{
- Player* _player = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
if (!*args)
return false;
- char *atId = strtok((char*)args, " ");
- if (!atId)
+ char* id = strtok((char*)args, " ");
+ if (!id)
return false;
- int32 i_atId = atoi(atId);
+ int32 areaTriggerId = atoi(id);
- if (!i_atId)
+ if (!areaTriggerId)
return false;
- AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(i_atId);
+ AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(areaTriggerId);
if (!at)
{
- handler->PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, i_atId);
+ handler->PSendSysMessage(LANG_COMMAND_GOAREATRNOTFOUND, areaTriggerId);
handler->SetSentErrorMessage(true);
return false;
}
@@ -393,49 +389,50 @@ public:
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- _player->TeleportTo(at->mapid, at->x, at->y, at->z, _player->GetOrientation());
+ player->TeleportTo(at->mapid, at->x, at->y, at->z, player->GetOrientation());
return true;
}
+
//teleport at coordinates
- static bool HandleGoZoneXYCommand(ChatHandler* handler, const char* args)
+ static bool HandleGoZoneXYCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- Player* _player = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
- char* px = strtok((char*)args, " ");
- char* py = strtok(NULL, " ");
+ char* zoneX = strtok((char*)args, " ");
+ char* zoneY = strtok(NULL, " ");
char* tail = strtok(NULL, "");
- char* cAreaId = handler->extractKeyFromLink(tail, "Harea"); // string or [name] Shift-click form |color|Harea:area_id|h[name]|h|r
+ char* id = handler->extractKeyFromLink(tail, "Harea"); // string or [name] Shift-click form |color|Harea:area_id|h[name]|h|r
- if (!px || !py)
+ if (!zoneX || !zoneY)
return false;
- float x = (float)atof(px);
- float y = (float)atof(py);
+ float x = (float)atof(zoneX);
+ float y = (float)atof(zoneY);
// prevent accept wrong numeric args
- if ((x == 0.0f && *px != '0') || (y == 0.0f && *py != '0'))
+ if ((x == 0.0f && *zoneX != '0') || (y == 0.0f && *zoneY != '0'))
return false;
- uint32 areaid = cAreaId ? (uint32)atoi(cAreaId) : _player->GetZoneId();
+ uint32 areaId = id ? (uint32)atoi(id) : player->GetZoneId();
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaid);
+ AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId);
if (x < 0 || x > 100 || y < 0 || y > 100 || !areaEntry)
{
- handler->PSendSysMessage(LANG_INVALID_ZONE_COORD, x, y, areaid);
+ handler->PSendSysMessage(LANG_INVALID_ZONE_COORD, x, y, areaId);
handler->SetSentErrorMessage(true);
return false;
}
@@ -462,99 +459,90 @@ public:
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
- _player->TeleportTo(zoneEntry->mapid, x, y, z, _player->GetOrientation());
+ player->TeleportTo(zoneEntry->mapid, x, y, z, player->GetOrientation());
return true;
}
+
//teleport at coordinates, including Z and orientation
- static bool HandleGoXYZCommand(ChatHandler* handler, const char* args)
+ static bool HandleGoXYZCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- Player* _player = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
- char* px = strtok((char*)args, " ");
- char* py = strtok(NULL, " ");
- char* pz = strtok(NULL, " ");
- char* pmapid = strtok(NULL, " ");
+ char* goX = strtok((char*)args, " ");
+ char* goY = strtok(NULL, " ");
+ char* goZ = strtok(NULL, " ");
+ char* id = strtok(NULL, " ");
char* port = strtok(NULL, " ");
- if (!px || !py)
+ if (!goX || !goY)
return false;
- float x = (float)atof(px);
- float y = (float)atof(py);
+ float x = (float)atof(goX);
+ float y = (float)atof(goY);
float z;
- float ort;
- uint32 mapid;
-
- if (pmapid)
- mapid = (uint32)atoi(pmapid);
- else
- mapid = _player->GetMapId();
-
- if ( port )
- ort = (float)atof(port);
- else
- ort = _player->GetOrientation();
-
- if ( pz )
+ float ort = port ? (float)atof(port) : player->GetOrientation();
+ uint32 mapId = id ? (uint32)atoi(id) : player->GetMapId();
+
+ if (goZ)
{
- z = (float)atof(pz);
- if (!MapManager::IsValidMapCoord(mapid, x, y, z))
+ z = (float)atof(goZ);
+ if (!MapManager::IsValidMapCoord(mapId, x, y, z))
{
- handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
+ handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
handler->SetSentErrorMessage(true);
return false;
}
}
else
{
- if (!MapManager::IsValidMapCoord(mapid, x, y))
+ if (!MapManager::IsValidMapCoord(mapId, x, y))
{
- handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapid);
+ handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, mapId);
handler->SetSentErrorMessage(true);
return false;
}
- Map const* map = sMapMgr->CreateBaseMap(mapid);
+ Map const* map = sMapMgr->CreateBaseMap(mapId);
z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
}
// stop flight if need
- if (_player->isInFlight())
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- _player->SaveRecallPosition();
-
- _player->TeleportTo(mapid, x, y, z, ort);
+ player->SaveRecallPosition();
+ player->TeleportTo(mapId, x, y, z, ort);
return true;
}
- static bool HandleGoTicketCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleGoTicketCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char *sTicketId = strtok((char*)args, " ");
- if (!sTicketId)
+ char* id = strtok((char*)args, " ");
+ if (!id)
return false;
- uint32 ticketId = atoi(sTicketId);
+ uint32 ticketId = atoi(id);
if (!ticketId)
return false;
@@ -565,16 +553,16 @@ public:
return true;
}
- Player* _player = handler->GetSession()->GetPlayer();
- if (_player->isInFlight())
+ Player* player = handler->GetSession()->GetPlayer();
+ if (player->isInFlight())
{
- _player->GetMotionMaster()->MovementExpired();
- _player->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
else
- _player->SaveRecallPosition();
+ player->SaveRecallPosition();
- ticket->TeleportTo(_player);
+ ticket->TeleportTo(player);
return true;
}
};
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index f8e636fb961..4c9960992e1 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -69,35 +69,35 @@ public:
return commandTable;
}
- static bool HandleGameObjectActivateCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectActivateCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- uint32 lowguid = atoi(cId);
- if (!lowguid)
+ uint32 guidLow = atoi(id);
+ if (!guidLow)
return false;
- GameObject* obj = NULL;
+ GameObject* object = NULL;
// by DB guid
- if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
- obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
+ if (GameObjectData const* goData = sObjectMgr->GetGOData(guidLow))
+ object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, goData->id);
- if (!obj)
+ if (!object)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow);
handler->SetSentErrorMessage(true);
return false;
}
// Activate
- obj->SetLootState(GO_READY);
- obj->UseDoorOrButton(10000);
+ object->SetLootState(GO_READY);
+ object->UseDoorOrButton(10000);
handler->PSendSysMessage("Object activated!");
@@ -105,92 +105,92 @@ public:
}
//spawn go
- static bool HandleGameObjectAddCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectAddCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
+ if (!id)
return false;
- uint32 id = atol(cId);
- if (!id)
+ uint32 objectId = atol(id);
+ if (!objectId)
return false;
char* spawntimeSecs = strtok(NULL, " ");
- const GameObjectTemplate* gInfo = sObjectMgr->GetGameObjectTemplate(id);
+ const GameObjectTemplate* objectInfo = sObjectMgr->GetGameObjectTemplate(objectId);
- if (!gInfo)
+ if (!objectInfo)
{
- handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
+ handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, objectId);
handler->SetSentErrorMessage(true);
return false;
}
- if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
+ if (objectInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(objectInfo->displayId))
{
// report to DB errors log as in loading case
- sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", id, gInfo->type, gInfo->displayId);
- handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, id);
+ sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId);
+ handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, objectId);
handler->SetSentErrorMessage(true);
return false;
}
- Player* chr = handler->GetSession()->GetPlayer();
- float x = float(chr->GetPositionX());
- float y = float(chr->GetPositionY());
- float z = float(chr->GetPositionZ());
- float o = float(chr->GetOrientation());
- Map* map = chr->GetMap();
+ Player* player = handler->GetSession()->GetPlayer();
+ float x = float(player->GetPositionX());
+ float y = float(player->GetPositionY());
+ float z = float(player->GetPositionZ());
+ float o = float(player->GetOrientation());
+ Map* map = player->GetMap();
- GameObject* pGameObj = new GameObject;
- uint32 db_lowGUID = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT);
+ GameObject* object = new GameObject;
+ uint32 guidLow = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT);
- if (!pGameObj->Create(db_lowGUID, gInfo->entry, map, chr->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
+ if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
{
- delete pGameObj;
+ delete object;
return false;
}
if (spawntimeSecs)
{
uint32 value = atoi((char*)spawntimeSecs);
- pGameObj->SetRespawnTime(value);
- //sLog->outDebug(LOG_FILTER_TSCR, "*** spawntimeSecs: %d", value);
+ object->SetRespawnTime(value);
}
// fill the gameobject data and save to the db
- pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
+ object->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), player->GetPhaseMaskForSpawn());
// this will generate a new guid if the object is in an instance
- if (!pGameObj->LoadFromDB(db_lowGUID, map))
+ if (!object->LoadFromDB(guidLow, map))
{
- delete pGameObj;
+ delete object;
return false;
}
- map->Add(pGameObj);
+ map->AddToMap(object);
// TODO: is it really necessary to add both the real and DB table guid here ?
- sObjectMgr->AddGameobjectToGrid(db_lowGUID, sObjectMgr->GetGOData(db_lowGUID));
+ sObjectMgr->AddGameobjectToGrid(guidLow, sObjectMgr->GetGOData(guidLow));
- handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, id, gInfo->name.c_str(), db_lowGUID, x, y, z);
+ handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, objectId, objectInfo->name.c_str(), guidLow, x, y, z);
return true;
}
// add go, temp only
- static bool HandleGameObjectAddTempCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectAddTempCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
- char* charID = strtok((char*)args, " ");
- if (!charID)
+
+ char* id = strtok((char*)args, " ");
+ if (!id)
return false;
- Player* chr = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
char* spawntime = strtok(NULL, " ");
uint32 spawntm = 300;
@@ -198,46 +198,47 @@ public:
if (spawntime)
spawntm = atoi((char*)spawntime);
- float x = chr->GetPositionX();
- float y = chr->GetPositionY();
- float z = chr->GetPositionZ();
- float ang = chr->GetOrientation();
+ float x = player->GetPositionX();
+ float y = player->GetPositionY();
+ float z = player->GetPositionZ();
+ float ang = player->GetOrientation();
float rot2 = sin(ang/2);
float rot3 = cos(ang/2);
- uint32 id = atoi(charID);
+ uint32 objectId = atoi(id);
- chr->SummonGameObject(id, x, y, z, ang, 0, 0, rot2, rot3, spawntm);
+ player->SummonGameObject(objectId, x, y, z, ang, 0, 0, rot2, rot3, spawntm);
return true;
}
- static bool HandleGameObjectTargetCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectTargetCommand(ChatHandler* handler, char const* args)
{
- Player* pl = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
QueryResult result;
GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr->GetActiveEventList();
+
if (*args)
{
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject_entry");
+ if (!id)
return false;
- uint32 id = atol(cId);
+ uint32 objectId = atol(id);
- if (id)
+ if (objectId)
result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE map = '%i' AND id = '%u' ORDER BY order_ ASC LIMIT 1",
- pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), id);
+ player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), objectId);
else
{
- std::string name = cId;
+ std::string name = id;
WorldDatabase.EscapeString(name);
result = WorldDatabase.PQuery(
"SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
- pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), name.c_str());
+ player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), name.c_str());
}
}
else
@@ -250,8 +251,8 @@ public:
{
if (initString)
{
- eventFilter << "OR eventEntry IN (" <<*itr;
- initString =false;
+ eventFilter << "OR eventEntry IN (" << *itr;
+ initString = false;
}
else
eventFilter << ',' << *itr;
@@ -277,25 +278,25 @@ public:
bool found = false;
float x, y, z, o;
- uint32 lowguid, id;
- uint16 mapid, phase;
- uint32 pool_id;
+ uint32 guidLow, id;
+ uint16 mapId, phase;
+ uint32 poolId;
do
{
Field* fields = result->Fetch();
- lowguid = fields[0].GetUInt32();
+ guidLow = fields[0].GetUInt32();
id = fields[1].GetUInt32();
x = fields[2].GetFloat();
y = fields[3].GetFloat();
z = fields[4].GetFloat();
o = fields[5].GetFloat();
- mapid = fields[6].GetUInt16();
+ mapId = fields[6].GetUInt16();
phase = fields[7].GetUInt16();
- pool_id = sPoolMgr->IsPartOfAPool<GameObject>(lowguid);
- if (!pool_id || sPoolMgr->IsSpawnedObject<GameObject>(lowguid))
+ poolId = sPoolMgr->IsPartOfAPool<GameObject>(guidLow);
+ if (!poolId || sPoolMgr->IsSpawnedObject<GameObject>(guidLow))
found = true;
- } while (result->NextRow() && (!found));
+ } while (result->NextRow() && !found);
if (!found)
{
@@ -303,21 +304,21 @@ public:
return false;
}
- GameObjectTemplate const* goI = sObjectMgr->GetGameObjectTemplate(id);
+ GameObjectTemplate const* objectInfo = sObjectMgr->GetGameObjectTemplate(id);
- if (!goI)
+ if (!objectInfo)
{
handler->PSendSysMessage(LANG_GAMEOBJECT_NOT_EXIST, id);
return false;
}
- GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid, id, HIGHGUID_GAMEOBJECT));
+ GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(guidLow, id, HIGHGUID_GAMEOBJECT));
- handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, lowguid, goI->name.c_str(), lowguid, id, x, y, z, mapid, o, phase);
+ handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name.c_str(), guidLow, id, x, y, z, mapId, o, phase);
if (target)
{
- int32 curRespawnDelay = int32(target->GetRespawnTimeEx()-time(NULL));
+ int32 curRespawnDelay = int32(target->GetRespawnTimeEx() - time(NULL));
if (curRespawnDelay < 0)
curRespawnDelay = 0;
@@ -330,219 +331,217 @@ public:
}
//delete object by selection or guid
- static bool HandleGameObjectDeleteCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectDeleteCommand(ChatHandler* handler, char const* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- uint32 lowguid = atoi(cId);
- if (!lowguid)
+ uint32 guidLow = atoi(id);
+ if (!guidLow)
return false;
- GameObject* obj = NULL;
+ GameObject* object = NULL;
// by DB guid
- if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
- obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
+ if (GameObjectData const* gameObjectData = sObjectMgr->GetGOData(guidLow))
+ object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, gameObjectData->id);
- if (!obj)
+ if (!object)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow);
handler->SetSentErrorMessage(true);
return false;
}
- uint64 owner_guid = obj->GetOwnerGUID();
- if (owner_guid)
+ uint64 ownerGuid = object->GetOwnerGUID();
+ if (ownerGuid)
{
- Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), owner_guid);
- if (!owner || !IS_PLAYER_GUID(owner_guid))
+ Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), ownerGuid);
+ if (!owner || !IS_PLAYER_GUID(ownerGuid))
{
- handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, GUID_LOPART(owner_guid), obj->GetGUIDLow());
+ handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, GUID_LOPART(ownerGuid), object->GetGUIDLow());
handler->SetSentErrorMessage(true);
return false;
}
- owner->RemoveGameObject(obj, false);
+ owner->RemoveGameObject(object, false);
}
- obj->SetRespawnTime(0); // not save respawn time
- obj->Delete();
- obj->DeleteFromDB();
+ object->SetRespawnTime(0); // not save respawn time
+ object->Delete();
+ object->DeleteFromDB();
- handler->PSendSysMessage(LANG_COMMAND_DELOBJMESSAGE, obj->GetGUIDLow());
+ handler->PSendSysMessage(LANG_COMMAND_DELOBJMESSAGE, object->GetGUIDLow());
return true;
}
//turn selected object
- static bool HandleGameObjectTurnCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectTurnCommand(ChatHandler* handler, char const* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- uint32 lowguid = atoi(cId);
- if (!lowguid)
+ uint32 guidLow = atoi(id);
+ if (!guidLow)
return false;
- GameObject* obj = NULL;
+ GameObject* object = NULL;
// by DB guid
- if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
- obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
+ if (GameObjectData const* gameObjectData = sObjectMgr->GetGOData(guidLow))
+ object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, gameObjectData->id);
- if (!obj)
+ if (!object)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow);
handler->SetSentErrorMessage(true);
return false;
}
- char* po = strtok(NULL, " ");
+ char* orientation = strtok(NULL, " ");
float o;
- if (po)
- {
- o = (float)atof(po);
- }
+ if (orientation)
+ o = (float)atof(orientation);
else
{
- Player* chr = handler->GetSession()->GetPlayer();
- o = chr->GetOrientation();
+ Player* player = handler->GetSession()->GetPlayer();
+ o = player->GetOrientation();
}
- obj->Relocate(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), o);
- obj->UpdateRotationFields();
- obj->DestroyForNearbyPlayers();
- obj->UpdateObjectVisibility();
+ object->Relocate(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), o);
+ object->UpdateRotationFields();
+ object->DestroyForNearbyPlayers();
+ object->UpdateObjectVisibility();
- obj->SaveToDB();
- obj->Refresh();
+ object->SaveToDB();
+ object->Refresh();
- handler->PSendSysMessage(LANG_COMMAND_TURNOBJMESSAGE, obj->GetGUIDLow(), obj->GetGOInfo()->name.c_str(), obj->GetGUIDLow(), o);
+ handler->PSendSysMessage(LANG_COMMAND_TURNOBJMESSAGE, object->GetGUIDLow(), object->GetGOInfo()->name.c_str(), object->GetGUIDLow(), o);
return true;
}
//move selected object
- static bool HandleGameObjectMoveCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectMoveCommand(ChatHandler* handler, char const* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- uint32 lowguid = atoi(cId);
- if (!lowguid)
+ uint32 guidLow = atoi(id);
+ if (!guidLow)
return false;
- GameObject* obj = NULL;
+ GameObject* object = NULL;
// by DB guid
- if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
- obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
+ if (GameObjectData const* gameObjectData = sObjectMgr->GetGOData(guidLow))
+ object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, gameObjectData->id);
- if (!obj)
+ if (!object)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow);
handler->SetSentErrorMessage(true);
return false;
}
- char* px = strtok(NULL, " ");
- char* py = strtok(NULL, " ");
- char* pz = strtok(NULL, " ");
+ char* toX = strtok(NULL, " ");
+ char* toY = strtok(NULL, " ");
+ char* toZ = strtok(NULL, " ");
- if (!px)
+ if (!toX)
{
- Player* chr = handler->GetSession()->GetPlayer();
- obj->Relocate(chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), obj->GetOrientation());
- obj->DestroyForNearbyPlayers();
- obj->UpdateObjectVisibility();
+ Player* player = handler->GetSession()->GetPlayer();
+ object->Relocate(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), object->GetOrientation());
+ object->DestroyForNearbyPlayers();
+ object->UpdateObjectVisibility();
}
else
{
- if (!py || !pz)
+ if (!toY || !toZ)
return false;
- float x = (float)atof(px);
- float y = (float)atof(py);
- float z = (float)atof(pz);
+ float x = (float)atof(toX);
+ float y = (float)atof(toY);
+ float z = (float)atof(toZ);
- if (!MapManager::IsValidMapCoord(obj->GetMapId(), x, y, z))
+ if (!MapManager::IsValidMapCoord(object->GetMapId(), x, y, z))
{
- handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, obj->GetMapId());
+ handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, object->GetMapId());
handler->SetSentErrorMessage(true);
return false;
}
- obj->Relocate(x, y, z, obj->GetOrientation());
- obj->DestroyForNearbyPlayers();
- obj->UpdateObjectVisibility();
+ object->Relocate(x, y, z, object->GetOrientation());
+ object->DestroyForNearbyPlayers();
+ object->UpdateObjectVisibility();
}
- obj->SaveToDB();
- obj->Refresh();
+ object->SaveToDB();
+ object->Refresh();
- handler->PSendSysMessage(LANG_COMMAND_MOVEOBJMESSAGE, obj->GetGUIDLow(), obj->GetGOInfo()->name.c_str(), obj->GetGUIDLow());
+ handler->PSendSysMessage(LANG_COMMAND_MOVEOBJMESSAGE, object->GetGUIDLow(), object->GetGOInfo()->name.c_str(), object->GetGUIDLow());
return true;
}
- //set pahsemask for selected object
- static bool HandleGameObjectSetPhaseCommand(ChatHandler* handler, const char* args)
+ //set phasemask for selected object
+ static bool HandleGameObjectSetPhaseCommand(ChatHandler* handler, char const* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- uint32 lowguid = atoi(cId);
- if (!lowguid)
+ uint32 guidLow = atoi(id);
+ if (!guidLow)
return false;
- GameObject* obj = NULL;
+ GameObject* object = NULL;
// by DB guid
- if (GameObjectData const* go_data = sObjectMgr->GetGOData(lowguid))
- obj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, go_data->id);
+ if (GameObjectData const* gameObjectData = sObjectMgr->GetGOData(guidLow))
+ object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, gameObjectData->id);
- if (!obj)
+ if (!object)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow);
handler->SetSentErrorMessage(true);
return false;
}
- char* phaseStr = strtok (NULL, " ");
- uint32 phasemask = phaseStr? atoi(phaseStr) : 0;
- if (phasemask == 0)
+ char* phase = strtok (NULL, " ");
+ uint32 phaseMask = phase ? atoi(phase) : 0;
+ if (phaseMask == 0)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}
- obj->SetPhaseMask(phasemask, true);
- obj->SaveToDB();
+ object->SetPhaseMask(phaseMask, true);
+ object->SaveToDB();
return true;
}
- static bool HandleGameObjectNearCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectNearCommand(ChatHandler* handler, char const* args)
{
float distance = (!*args) ? 10.0f : (float)(atof(args));
uint32 count = 0;
- Player* pl = handler->GetSession()->GetPlayer();
+ Player* player = handler->GetSession()->GetPlayer();
QueryResult result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, map, "
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
- pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
- pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), distance*distance);
+ player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(),
+ player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), distance * distance);
if (result)
{
@@ -554,14 +553,14 @@ public:
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
float z = fields[4].GetFloat();
- uint16 mapid = fields[5].GetUInt16();
+ uint16 mapId = fields[5].GetUInt16();
- GameObjectTemplate const* gInfo = sObjectMgr->GetGameObjectTemplate(entry);
+ GameObjectTemplate const* gameObjectInfo = sObjectMgr->GetGameObjectTemplate(entry);
- if (!gInfo)
+ if (!gameObjectInfo)
continue;
- handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name.c_str(), x, y, z, mapid);
+ handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gameObjectInfo->name.c_str(), x, y, z, mapId);
++count;
} while (result->NextRow());
@@ -572,99 +571,97 @@ public:
}
//show info of gameobject
- static bool HandleGameObjectInfoCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectInfoCommand(ChatHandler* handler, char const* args)
{
uint32 entry = 0;
uint32 type = 0;
- uint32 displayid = 0;
+ uint32 displayId = 0;
std::string name;
uint32 lootId = 0;
if (!*args)
{
- if (WorldObject* obj = handler->getSelectedObject())
- entry = obj->GetEntry();
+ if (WorldObject* object = handler->getSelectedObject())
+ entry = object->GetEntry();
else
entry = atoi((char*)args);
}
- GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
+ GameObjectTemplate const* gameObjectInfo = sObjectMgr->GetGameObjectTemplate(entry);
- if (!goinfo)
+ if (!gameObjectInfo)
return false;
- type = goinfo->type;
- displayid = goinfo->displayId;
- name = goinfo->name;
+ type = gameObjectInfo->type;
+ displayId = gameObjectInfo->displayId;
+ name = gameObjectInfo->name;
if (type == GAMEOBJECT_TYPE_CHEST)
- lootId = goinfo->chest.lootId;
+ lootId = gameObjectInfo->chest.lootId;
else if (type == GAMEOBJECT_TYPE_FISHINGHOLE)
- lootId = goinfo->fishinghole.lootId;
+ lootId = gameObjectInfo->fishinghole.lootId;
handler->PSendSysMessage(LANG_GOINFO_ENTRY, entry);
handler->PSendSysMessage(LANG_GOINFO_TYPE, type);
handler->PSendSysMessage(LANG_GOINFO_LOOTID, lootId);
- handler->PSendSysMessage(LANG_GOINFO_DISPLAYID, displayid);
+ handler->PSendSysMessage(LANG_GOINFO_DISPLAYID, displayId);
handler->PSendSysMessage(LANG_GOINFO_NAME, name.c_str());
return true;
}
- static bool HandleGameObjectSetStateCommand(ChatHandler* handler, const char* args)
+ static bool HandleGameObjectSetStateCommand(ChatHandler* handler, char const* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
- char* cId = handler->extractKeyFromLink((char*)args, "Hgameobject");
- if (!cId)
+ char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
+ if (!id)
return false;
- uint32 lowguid = atoi(cId);
- if (!lowguid)
+ uint32 guidLow = atoi(id);
+ if (!guidLow)
return false;
- GameObject* gobj = NULL;
+ GameObject* object = NULL;
- if (GameObjectData const* goData = sObjectMgr->GetGOData(lowguid))
- gobj = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid, goData->id);
+ if (GameObjectData const* gameObjectData = sObjectMgr->GetGOData(guidLow))
+ object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, gameObjectData->id);
- if (!gobj)
+ if (!object)
{
- handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
+ handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow);
handler->SetSentErrorMessage(true);
return false;
}
- char* ctype = strtok(NULL, " ");
- if (!ctype)
+ char* type = strtok(NULL, " ");
+ if (!type)
return false;
- int32 type = atoi(ctype);
- if (type < 0)
+ int32 objectType = atoi(type);
+ if (objectType < 0)
{
- if (type == -1)
- gobj->SendObjectDeSpawnAnim(gobj->GetGUID());
- else if (type == -2)
- {
+ if (objectType == -1)
+ object->SendObjectDeSpawnAnim(object->GetGUID());
+ else if (objectType == -2)
return false;
- }
return true;
}
- char* cstate = strtok(NULL, " ");
- if (!cstate)
+ char* state = strtok(NULL, " ");
+ if (!state)
return false;
- int32 state = atoi(cstate);
+ int32 objectState = atoi(state);
- if (type < 4)
- gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state);
- else if (type == 4)
+ if (objectType < 4)
+ object->SetByteValue(GAMEOBJECT_BYTES_1, objectType, objectState);
+ else if (objectType == 4)
{
WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM, 8+4);
- data << gobj->GetGUID();
- data << (uint32)(state);
- gobj->SendMessageToSet(&data, true);
+ data << object->GetGUID();
+ data << (uint32)(objectState);
+ object->SendMessageToSet(&data, true);
}
- handler->PSendSysMessage("Set gobject type %d state %d", type, state);
+ handler->PSendSysMessage("Set gobject type %d state %d", objectType, objectState);
return true;
}
};
diff --git a/src/server/scripts/Commands/cs_gps.cpp b/src/server/scripts/Commands/cs_gps.cpp
index 2a270527fb8..bafaae465ef 100644
--- a/src/server/scripts/Commands/cs_gps.cpp
+++ b/src/server/scripts/Commands/cs_gps.cpp
@@ -43,16 +43,16 @@ public:
return commandTable;
}
- static bool HandleGPSCommand(ChatHandler* handler, const char *args)
+ static bool HandleGPSCommand(ChatHandler* handler, char const* args)
{
- WorldObject* obj = NULL;
+ WorldObject* object = NULL;
if (*args)
{
uint64 guid = handler->extractGuidFromLink((char*)args);
if (guid)
- obj = (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*handler->GetSession()->GetPlayer(), guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
+ object = (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*handler->GetSession()->GetPlayer(), guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
- if (!obj)
+ if (!object)
{
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
handler->SetSentErrorMessage(true);
@@ -61,71 +61,73 @@ public:
}
else
{
- obj = handler->getSelectedUnit();
+ object = handler->getSelectedUnit();
- if (!obj)
+ if (!object)
{
handler->SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
}
- CellPair cell_val = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
- Cell cell(cell_val);
- uint32 zone_id, area_id;
- obj->GetZoneAndAreaId(zone_id, area_id);
+ CellCoord cellCoord = Trinity::ComputeCellCoord(object->GetPositionX(), object->GetPositionY());
+ Cell cell(cellCoord);
- MapEntry const* mapEntry = sMapStore.LookupEntry(obj->GetMapId());
- AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zone_id);
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(area_id);
+ uint32 zoneId, areaId;
+ object->GetZoneAndAreaId(zoneId, areaId);
- float zone_x = obj->GetPositionX();
- float zone_y = obj->GetPositionY();
+ MapEntry const* mapEntry = sMapStore.LookupEntry(object->GetMapId());
+ AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zoneId);
+ AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId);
- Map2ZoneCoordinates(zone_x, zone_y, zone_id);
+ float zoneX = object->GetPositionX();
+ float zoneY = object->GetPositionY();
- Map const* map = obj->GetMap();
- float ground_z = map->GetHeight(obj->GetPositionX(), obj->GetPositionY(), MAX_HEIGHT);
- float floor_z = map->GetHeight(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ());
+ Map2ZoneCoordinates(zoneX, zoneY, zoneId);
- GridPair p = Trinity::ComputeGridPair(obj->GetPositionX(), obj->GetPositionY());
+ Map const* map = object->GetMap();
+ float groundZ = map->GetHeight(object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
+ float floorZ = map->GetHeight(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
+
+ GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
// 63? WHY?
- int gx = 63 - p.x_coord;
- int gy = 63 - p.y_coord;
+ int gridX = 63 - gridCoord.x_coord;
+ int gridY = 63 - gridCoord.y_coord;
- uint32 have_map = Map::ExistMap(obj->GetMapId(), gx, gy) ? 1 : 0;
- uint32 have_vmap = Map::ExistVMap(obj->GetMapId(), gx, gy) ? 1 : 0;
+ uint32 haveMap = Map::ExistMap(object->GetMapId(), gridX, gridY) ? 1 : 0;
+ uint32 haveVMap = Map::ExistVMap(object->GetMapId(), gridX, gridY) ? 1 : 0;
- if (have_vmap)
+ if (haveVMap)
{
- if (map->IsOutdoors(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ()))
+ if (map->IsOutdoors(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ()))
handler->PSendSysMessage("You are outdoors");
else
handler->PSendSysMessage("You are indoors");
}
- else handler->PSendSysMessage("no VMAP available for area info");
+ else
+ handler->PSendSysMessage("no VMAP available for area info");
handler->PSendSysMessage(LANG_MAP_POSITION,
- obj->GetMapId(), (mapEntry ? mapEntry->name[handler->GetSessionDbcLocale()] : "<unknown>"),
- zone_id, (zoneEntry ? zoneEntry->area_name[handler->GetSessionDbcLocale()] : "<unknown>"),
- area_id, (areaEntry ? areaEntry->area_name[handler->GetSessionDbcLocale()] : "<unknown>"),
- obj->GetPhaseMask(),
- obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), obj->GetOrientation(),
- cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(),
- zone_x, zone_y, ground_z, floor_z, have_map, have_vmap);
-
- LiquidData liquid_status;
- ZLiquidStatus res = map->getLiquidStatus(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), MAP_ALL_LIQUIDS, &liquid_status);
- if (res)
- {
- handler->PSendSysMessage(LANG_LIQUID_STATUS, liquid_status.level, liquid_status.depth_level, liquid_status.type, res);
- }
+ object->GetMapId(), (mapEntry ? mapEntry->name[handler->GetSessionDbcLocale()] : "<unknown>"),
+ zoneId, (zoneEntry ? zoneEntry->area_name[handler->GetSessionDbcLocale()] : "<unknown>"),
+ areaId, (areaEntry ? areaEntry->area_name[handler->GetSessionDbcLocale()] : "<unknown>"),
+ object->GetPhaseMask(),
+ object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation(),
+ cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), object->GetInstanceId(),
+ zoneX, zoneY, groundZ, floorZ, haveMap, haveVMap);
+
+ LiquidData liquidStatus;
+ ZLiquidStatus status = map->getLiquidStatus(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), MAP_ALL_LIQUIDS, &liquidStatus);
+
+ if (status)
+ handler->PSendSysMessage(LANG_LIQUID_STATUS, liquidStatus.level, liquidStatus.depth_level, liquidStatus.type, status);
+
return true;
}
- static bool HandleWPGPSCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleWPGPSCommand(ChatHandler* handler, char const* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp
index 6f44000017d..f6c6d89c0b7 100644
--- a/src/server/scripts/Commands/cs_honor.cpp
+++ b/src/server/scripts/Commands/cs_honor.cpp
@@ -39,12 +39,14 @@ public:
{ "", SEC_GAMEMASTER, false, &HandleHonorAddCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
+
static ChatCommand honorCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, NULL, "", honorAddCommandTable },
{ "update", SEC_GAMEMASTER, false, &HandleHonorUpdateCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
+
static ChatCommand commandTable[] =
{
{ "honor", SEC_GAMEMASTER, false, NULL, "", honorCommandTable },
@@ -52,7 +54,8 @@ public:
};
return commandTable;
}
- static bool HandleHonorAddCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleHonorAddCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -73,7 +76,8 @@ public:
target->RewardHonor(NULL, 1, amount);
return true;
}
- static bool HandleHonorAddKillCommand(ChatHandler* handler, const char* /*args*/)
+
+ static bool HandleHonorAddKillCommand(ChatHandler* handler, char const* /*args*/)
{
Unit* target = handler->getSelectedUnit();
if (!target)
@@ -90,7 +94,8 @@ public:
handler->GetSession()->GetPlayer()->RewardHonor(target, 1);
return true;
}
- static bool HandleHonorUpdateCommand(ChatHandler* handler, const char* /*args*/)
+
+ static bool HandleHonorUpdateCommand(ChatHandler* handler, char const* /*args*/)
{
Player* target = handler->getSelectedPlayer();
if (!target)
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp
index 9eb315b0b6a..d03291d6d5d 100644
--- a/src/server/scripts/Commands/cs_learn.cpp
+++ b/src/server/scripts/Commands/cs_learn.cpp
@@ -37,28 +37,29 @@ public:
{
static ChatCommand learnAllMyCommandTable[] =
{
- { "class", SEC_ADMINISTRATOR, false, &HandleLearnAllMyClassCommand, "", NULL },
- { "pettalents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyPetTalentsCommand, "", NULL },
- { "spells", SEC_ADMINISTRATOR, false, &HandleLearnAllMySpellsCommand, "", NULL },
- { "talents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyTalentsCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
+ { "class", SEC_ADMINISTRATOR, false, &HandleLearnAllMyClassCommand, "", NULL },
+ { "pettalents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyPetTalentsCommand, "", NULL },
+ { "spells", SEC_ADMINISTRATOR, false, &HandleLearnAllMySpellsCommand, "", NULL },
+ { "talents", SEC_ADMINISTRATOR, false, &HandleLearnAllMyTalentsCommand, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
};
+
static ChatCommand learnAllCommandTable[] =
{
- { "my", SEC_ADMINISTRATOR, false, NULL, "", learnAllMyCommandTable },
- { "gm", SEC_GAMEMASTER, false, &HandleLearnAllGMCommand, "", NULL },
- { "crafts", SEC_GAMEMASTER, false, &HandleLearnAllCraftsCommand, "", NULL },
- { "default", SEC_MODERATOR, false, &HandleLearnAllDefaultCommand, "", NULL },
- { "lang", SEC_MODERATOR, false, &HandleLearnAllLangCommand, "", NULL },
- { "recipes", SEC_GAMEMASTER, false, &HandleLearnAllRecipesCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
+ { "my", SEC_ADMINISTRATOR, false, NULL, "", learnAllMyCommandTable },
+ { "gm", SEC_GAMEMASTER, false, &HandleLearnAllGMCommand, "", NULL },
+ { "crafts", SEC_GAMEMASTER, false, &HandleLearnAllCraftsCommand, "", NULL },
+ { "default", SEC_MODERATOR, false, &HandleLearnAllDefaultCommand, "", NULL },
+ { "lang", SEC_MODERATOR, false, &HandleLearnAllLangCommand, "", NULL },
+ { "recipes", SEC_GAMEMASTER, false, &HandleLearnAllRecipesCommand, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
};
static ChatCommand learnCommandTable[] =
{
- { "all", SEC_ADMINISTRATOR, false, NULL, "", learnAllCommandTable },
- { "", SEC_ADMINISTRATOR, false, &HandleLearnCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
+ { "all", SEC_ADMINISTRATOR, false, NULL, "", learnAllCommandTable },
+ { "", SEC_ADMINISTRATOR, false, &HandleLearnCommand, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
};
static ChatCommand commandTable[] =
@@ -68,7 +69,8 @@ public:
};
return commandTable;
}
- static bool HandleLearnCommand(ChatHandler* handler, const char* args)
+
+ static bool HandleLearnCommand(ChatHandler* handler, char const* args)
{
Player* targetPlayer = handler->getSelectedPlayer();
@@ -84,8 +86,8 @@ public:
if (!spell || !sSpellMgr->GetSpellInfo(spell))
return false;
- char const* allStr = strtok(NULL, " ");
- bool allRanks = allStr ? (strncmp(allStr, "all", strlen(allStr)) == 0) : false;
+ char const* all = strtok(NULL, " ");
+ bool allRanks = all ? (strncmp(all, "all", strlen(all)) == 0) : false;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer()))
@@ -110,14 +112,14 @@ public:
else
targetPlayer->learnSpell(spell, false);
- uint32 first_spell = sSpellMgr->GetFirstSpellInChain(spell);
- if (GetTalentSpellCost(first_spell))
+ uint32 firstSpell = sSpellMgr->GetFirstSpellInChain(spell);
+ if (GetTalentSpellCost(firstSpell))
targetPlayer->SendTalentsInfoData(false);
return true;
}
- static bool HandleLearnAllGMCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllGMCommand(ChatHandler* handler, char const* /*args*/)
{
for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i)
{
@@ -135,19 +137,19 @@ public:
return true;
}
- static bool HandleLearnAllMyClassCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllMyClassCommand(ChatHandler* handler, char const* /*args*/)
{
HandleLearnAllMySpellsCommand(handler, "");
HandleLearnAllMyTalentsCommand(handler, "");
return true;
}
- static bool HandleLearnAllMySpellsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllMySpellsCommand(ChatHandler* handler, char const* /*args*/)
{
- ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->getClass());
- if (!clsEntry)
+ ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->getClass());
+ if (!classEntry)
return true;
- uint32 family = clsEntry->spellfamily;
+ uint32 family = classEntry->spellfamily;
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
{
@@ -172,8 +174,8 @@ public:
continue;
// skip spells with first rank learned as talent (and all talents then also)
- uint32 first_rank = sSpellMgr->GetFirstSpellInChain(spellInfo->Id);
- if (GetTalentSpellCost(first_rank) > 0)
+ uint32 firstRank = sSpellMgr->GetFirstSpellInChain(spellInfo->Id);
+ if (GetTalentSpellCost(firstRank) > 0)
continue;
// skip broken spells
@@ -187,7 +189,7 @@ public:
return true;
}
- static bool HandleLearnAllMyTalentsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllMyTalentsCommand(ChatHandler* handler, char const* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
uint32 classMask = player->getClassMask();
@@ -207,7 +209,7 @@ public:
// search highest talent rank
uint32 spellId = 0;
- for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
{
if (talentInfo->RankID[rank] != 0)
{
@@ -234,7 +236,7 @@ public:
return true;
}
- static bool HandleLearnAllMyPetTalentsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllMyPetTalentsCommand(ChatHandler* handler, char const* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
@@ -246,23 +248,23 @@ public:
return false;
}
- CreatureTemplate const* ci = pet->GetCreatureInfo();
- if (!ci)
+ CreatureTemplate const* creatureInfo = pet->GetCreatureInfo();
+ if (!creatureInfo)
{
handler->SendSysMessage(LANG_WRONG_PET_TYPE);
handler->SetSentErrorMessage(true);
return false;
}
- CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family);
- if (!pet_family)
+ CreatureFamilyEntry const* petFamily = sCreatureFamilyStore.LookupEntry(creatureInfo->family);
+ if (!petFamily)
{
handler->SendSysMessage(LANG_WRONG_PET_TYPE);
handler->SetSentErrorMessage(true);
return false;
}
- if (pet_family->petTalentType < 0) // not hunter pet
+ if (petFamily->petTalentType < 0) // not hunter pet
{
handler->SendSysMessage(LANG_WRONG_PET_TYPE);
handler->SetSentErrorMessage(true);
@@ -280,30 +282,30 @@ public:
continue;
// prevent learn talent for different family (cheating)
- if (((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask) == 0)
+ if (((1 << petFamily->petTalentType) & talentTabInfo->petTalentMask) == 0)
continue;
// search highest talent rank
- uint32 spellid = 0;
+ uint32 spellId = 0;
for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if (talentInfo->RankID[rank] != 0)
{
- spellid = talentInfo->RankID[rank];
+ spellId = talentInfo->RankID[rank];
break;
}
}
- if (!spellid) // ??? none spells in talent
+ if (!spellId) // ??? none spells in talent
continue;
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false))
continue;
// learn highest rank of talent and learn all non-talent spell ranks (recursive by tree)
- pet->learnSpellHighRank(spellid);
+ pet->learnSpellHighRank(spellId);
}
pet->SetFreeTalentPoints(0);
@@ -312,7 +314,7 @@ public:
return true;
}
- static bool HandleLearnAllLangCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllLangCommand(ChatHandler* handler, char const* /*args*/)
{
// skipping UNIVERSAL language (0)
for (uint8 i = 1; i < LANGUAGES_COUNT; ++i)
@@ -322,7 +324,7 @@ public:
return true;
}
- static bool HandleLearnAllDefaultCommand(ChatHandler* handler, const char* args)
+ static bool HandleLearnAllDefaultCommand(ChatHandler* handler, char const* args)
{
Player* target;
if (!handler->extractPlayerTarget((char*)args, &target))
@@ -335,9 +337,8 @@ public:
return true;
}
- static bool HandleLearnAllCraftsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleLearnAllCraftsCommand(ChatHandler* handler, char const* /*args*/)
{
-
for (uint32 i = 0; i < sSkillLineStore.GetNumRows(); ++i)
{
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(i);
@@ -355,7 +356,7 @@ public:
return true;
}
- static bool HandleLearnAllRecipesCommand(ChatHandler* handler, const char* args)
+ static bool HandleLearnAllRecipesCommand(ChatHandler* handler, char const* args)
{
// Learns all recipes of specified profession and sets skill to max
// Example: .learn all_recipes enchanting
@@ -370,13 +371,13 @@ public:
if (!*args)
return false;
- std::wstring wnamepart;
+ std::wstring namePart;
- if (!Utf8toWStr(args, wnamepart))
+ if (!Utf8toWStr(args, namePart))
return false;
// converting string that we try to find to lower case
- wstrToLower(wnamepart);
+ wstrToLower(namePart);
std::string name;
@@ -392,29 +393,29 @@ public:
!skillInfo->canLink) // only prof with recipes have set
continue;
- int loc = handler->GetSessionDbcLocale();
- name = skillInfo->name[loc];
+ int locale = handler->GetSessionDbcLocale();
+ name = skillInfo->name[locale];
if (name.empty())
continue;
- if (!Utf8FitTo(name, wnamepart))
+ if (!Utf8FitTo(name, namePart))
{
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
+ locale = 0;
+ for (; locale < TOTAL_LOCALES; ++locale)
{
- if (loc == handler->GetSessionDbcLocale())
+ if (locale == handler->GetSessionDbcLocale())
continue;
- name = skillInfo->name[loc];
+ name = skillInfo->name[locale];
if (name.empty())
continue;
- if (Utf8FitTo(name, wnamepart))
+ if (Utf8FitTo(name, namePart))
break;
}
}
- if (loc < TOTAL_LOCALES)
+ if (locale < TOTAL_LOCALES)
{
targetSkillInfo = skillInfo;
break;
@@ -431,7 +432,8 @@ public:
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str());
return true;
}
- static void HandleLearnSkillRecipesHelper(Player* player, uint32 skill_id)
+
+ static void HandleLearnSkillRecipesHelper(Player* player, uint32 skillId)
{
uint32 classmask = player->getClassMask();
@@ -442,7 +444,7 @@ public:
continue;
// wrong skill
- if (skillLine->skillId != skill_id)
+ if (skillLine->skillId != skillId)
continue;
// not high rank
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index cdb87fde354..20d0994b911 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -149,13 +149,13 @@ public:
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
creature->LoadFromDB(db_guid, map);
- map->Add(creature);
+ map->AddToMap(creature);
sObjectMgr->AddCreatureToGrid(db_guid, sObjectMgr->GetCreatureData(db_guid));
return true;
}
//add item in vendorlist
- static bool HandleNpcAddVendorItemCommand(ChatHandler* handler, const char* args)
+ static bool HandleNpcAddVendorItemCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
@@ -168,7 +168,11 @@ public:
return false;
}
- uint32 itemId = atol(pitem);
+ int32 item_int = atol(pitem);
+ if (item_int <= 0)
+ return false;
+
+ uint32 itemId = item_int;
char* fmaxcount = strtok(NULL, " "); //add maxcount, default: 0
uint32 maxcount = 0;
@@ -623,7 +627,7 @@ public:
const_cast<CreatureData*>(data)->posZ = z;
const_cast<CreatureData*>(data)->orientation = o;
}
- creature->GetMap()->CreatureRelocation(creature, x, y, z, o);
+ creature->SetPosition(x, y, z, o);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
{
@@ -1142,7 +1146,7 @@ public:
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
// add to world
- pet->GetMap()->Add(pet->ToCreature());
+ pet->GetMap()->AddToMap(pet->ToCreature());
// visual effect for levelup
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level);
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index 17c076f903c..8bfa010463a 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -125,6 +125,29 @@ public:
if (!handler->extractPlayerTarget(nameStr, &target, &target_guid, &target_name))
return false;
+ if (strcmp(teleStr, "$home") == 0) // References target's homebind
+ {
+ if (target)
+ target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation());
+ else
+ {
+ QueryResult resultDB = CharacterDatabase.PQuery("SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = %u", target_guid);
+ if (resultDB)
+ {
+ Field* fieldsDB = resultDB->Fetch();
+ uint32 mapId = fieldsDB[0].GetUInt32();
+ uint32 zoneId = fieldsDB[1].GetUInt32();
+ float posX = fieldsDB[2].GetFloat();
+ float posY = fieldsDB[3].GetFloat();
+ float posZ = fieldsDB[4].GetFloat();
+
+ Player::SavePositionInDB(mapId, posX, posY, posZ, 0, zoneId, target_guid);
+ }
+ }
+
+ return true;
+ }
+
// id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r
GameTele const* tele = handler->extractGameTeleFromLink(teleStr);
if (!tele)
@@ -228,38 +251,38 @@ public:
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
- Player* pl = itr->getSource();
+ Player* player = itr->getSource();
- if (!pl || !pl->GetSession())
+ if (!player || !player->GetSession())
continue;
// check online security
- if (handler->HasLowerSecurity(pl, 0))
+ if (handler->HasLowerSecurity(player, 0))
return false;
- std::string plNameLink = handler->GetNameLink(pl);
+ std::string plNameLink = handler->GetNameLink(player);
- if (pl->IsBeingTeleported())
+ if (player->IsBeingTeleported())
{
handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
continue;
}
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
- if (handler->needReportToTarget(pl))
- (ChatHandler(pl)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
+ if (handler->needReportToTarget(player))
+ (ChatHandler(player)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
// stop flight if need
- if (pl->isInFlight())
+ if (player->isInFlight())
{
- pl->GetMotionMaster()->MovementExpired();
- pl->CleanupAfterTaxiFlight();
+ player->GetMotionMaster()->MovementExpired();
+ player->CleanupAfterTaxiFlight();
}
// save only in non-flight case
else
- pl->SaveRecallPosition();
+ player->SaveRecallPosition();
- pl->TeleportTo(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation);
+ player->TeleportTo(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation);
}
return true;
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index 34ea264fd9e..f754a32fbfc 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -591,7 +591,7 @@ public:
wpCreature2->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
wpCreature2->LoadFromDB(wpCreature2->GetDBTableGUIDLow(), map);
- map->Add(wpCreature2);
+ map->AddToMap(wpCreature2);
//sMapMgr->GetMap(npcCreature->GetMapId())->Add(wpCreature2);
}
@@ -790,12 +790,12 @@ public:
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(), map);
- map->Add(wpCreature);
+ map->AddToMap(wpCreature);
if (target)
{
wpCreature->SetDisplayId(target->GetDisplayId());
- wpCreature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
+ wpCreature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
}
}
@@ -837,12 +837,12 @@ public:
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
creature->LoadFromDB(creature->GetDBTableGUIDLow(), map);
- map->Add(creature);
+ map->AddToMap(creature);
if (target)
{
creature->SetDisplayId(target->GetDisplayId());
- creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
+ creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
}
return true;
@@ -858,7 +858,7 @@ public:
else
Maxpoint = 0;
- result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z FROM waypoint_data WHERE point ='%u' AND id = '%u'", Maxpoint, pathid);
+ result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z, orientation FROM waypoint_data WHERE point ='%u' AND id = '%u'", Maxpoint, pathid);
if (!result)
{
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDLAST, pathid);
@@ -866,13 +866,13 @@ public:
return false;
}
Field* fields = result->Fetch();
- float x = fields[0].GetFloat();
- float y = fields[1].GetFloat();
- float z = fields[2].GetFloat();
+ float x = fields[0].GetFloat();
+ float y = fields[1].GetFloat();
+ float z = fields[2].GetFloat();
+ float o = fields[3].GetFloat();
uint32 id = VISUAL_WAYPOINT;
Player* chr = handler->GetSession()->GetPlayer();
- float o = chr->GetOrientation();
Map* map = chr->GetMap();
Creature* creature = new Creature;
@@ -885,12 +885,12 @@ public:
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
creature->LoadFromDB(creature->GetDBTableGUIDLow(), map);
- map->Add(creature);
+ map->AddToMap(creature);
if (target)
{
creature->SetDisplayId(target->GetDisplayId());
- creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
+ creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f);
}
return true;
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
index e3295a6c45e..89a58e93853 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
@@ -52,33 +52,31 @@ class mob_av_marshal_or_warmaster : public CreatureScript
public:
mob_av_marshal_or_warmaster()
- : CreatureScript("mob_av_marshal_or_warmaster")
- {
- }
+ : CreatureScript("mob_av_marshal_or_warmaster") {}
struct mob_av_marshal_or_warmasterAI : public ScriptedAI
{
- mob_av_marshal_or_warmasterAI(Creature* c) : ScriptedAI(c) {}
+ mob_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 uiChargeTimer;
- uint32 uiCleaveTimer;
- uint32 uiDemoralizingShoutTimer;
- uint32 uiWhirlwind1Timer;
- uint32 uiWhirlwind2Timer;
- uint32 uiEnrageTimer;
- uint32 uiResetTimer;
+ uint32 ChargeTimer;
+ uint32 CleaveTimer;
+ uint32 DemoralizingShoutTimer;
+ uint32 Whirlwind1Timer;
+ uint32 Whirlwind2Timer;
+ uint32 EnrageTimer;
+ uint32 ResetTimer;
bool bHasAura;
void Reset()
{
- uiChargeTimer = urand(2*IN_MILLISECONDS, 12*IN_MILLISECONDS);
- uiCleaveTimer = urand(1*IN_MILLISECONDS, 11*IN_MILLISECONDS);
- uiDemoralizingShoutTimer = urand(2*IN_MILLISECONDS, 2*IN_MILLISECONDS);
- uiWhirlwind1Timer = urand(1*IN_MILLISECONDS, 12*IN_MILLISECONDS);
- uiWhirlwind2Timer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- uiEnrageTimer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- uiResetTimer = 5*IN_MILLISECONDS;
+ ChargeTimer = urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
+ CleaveTimer = urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS);
+ DemoralizingShoutTimer = urand(2 * IN_MILLISECONDS, 2 * IN_MILLISECONDS);
+ Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
+ Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ EnrageTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ ResetTimer = 5 * IN_MILLISECONDS;
bHasAura = false;
}
@@ -126,49 +124,49 @@ class mob_av_marshal_or_warmaster : public CreatureScript
if (!UpdateVictim())
return;
- if (uiChargeTimer <= diff)
+ if (ChargeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CHARGE);
- uiChargeTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else uiChargeTimer -= diff;
+ ChargeTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
+ } else ChargeTimer -= diff;
- if (uiCleaveTimer <= diff)
+ if (CleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
- uiCleaveTimer = urand(10*IN_MILLISECONDS, 16*IN_MILLISECONDS);
- } else uiCleaveTimer -= diff;
+ CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
+ } else CleaveTimer -= diff;
- if (uiDemoralizingShoutTimer <= diff)
+ if (DemoralizingShoutTimer <= diff)
{
DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT);
- uiDemoralizingShoutTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else uiDemoralizingShoutTimer -= diff;
+ DemoralizingShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
+ } else DemoralizingShoutTimer -= diff;
- if (uiWhirlwind1Timer <= diff)
+ if (Whirlwind1Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
- uiWhirlwind1Timer = urand(6*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- } else uiWhirlwind1Timer -= diff;
+ Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ } else Whirlwind1Timer -= diff;
- if (uiWhirlwind2Timer <= diff)
+ if (Whirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
- uiWhirlwind2Timer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else uiWhirlwind2Timer -= diff;
+ Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
+ } else Whirlwind2Timer -= diff;
- if (uiEnrageTimer <= diff)
+ if (EnrageTimer <= diff)
{
DoCast(me->getVictim(), SPELL_ENRAGE);
- uiEnrageTimer = urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- }else uiEnrageTimer -= diff;
+ EnrageTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
+ }else EnrageTimer -= diff;
// check if creature is not outside of building
- if (uiResetTimer <= diff)
+ if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
- uiResetTimer = 5*IN_MILLISECONDS;
- } else uiResetTimer -= diff;
+ ResetTimer = 5 * IN_MILLISECONDS;
+ } else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index f1884b7c0e9..d66c138ebf2 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -48,7 +48,7 @@ public:
struct mob_water_elementalAI : public ScriptedAI
{
- mob_water_elementalAI(Creature* c) : ScriptedAI(c) {}
+ mob_water_elementalAI(Creature* creature) : ScriptedAI(creature) {}
uint32 waterBoltTimer;
uint64 balindaGUID;
@@ -56,8 +56,8 @@ public:
void Reset()
{
- waterBoltTimer = 3*IN_MILLISECONDS;
- resetTimer = 5*IN_MILLISECONDS;
+ waterBoltTimer = 3 * IN_MILLISECONDS;
+ resetTimer = 5 * IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -68,7 +68,7 @@ public:
if (waterBoltTimer < diff)
{
DoCast(me->getVictim(), SPELL_WATERBOLT);
- waterBoltTimer = 5*IN_MILLISECONDS;
+ waterBoltTimer = 5 * IN_MILLISECONDS;
} else waterBoltTimer -= diff;
// check if creature is not outside of building
@@ -77,7 +77,7 @@ public:
if (Creature* pBalinda = Unit::GetCreature(*me, balindaGUID))
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
- resetTimer = 5*IN_MILLISECONDS;
+ resetTimer = 5 * IN_MILLISECONDS;
} else resetTimer -= diff;
DoMeleeAttackIfReady();
@@ -97,7 +97,7 @@ public:
struct boss_balindaAI : public ScriptedAI
{
- boss_balindaAI(Creature* c) : ScriptedAI(c), summons(me) {}
+ boss_balindaAI(Creature* creature) : ScriptedAI(creature), summons(me) {}
uint32 arcaneExplosionTimer;
uint32 coneOfColdTimer;
@@ -110,11 +110,11 @@ public:
void Reset()
{
- arcaneExplosionTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- coneOfColdTimer = 8*IN_MILLISECONDS;
- fireBoltTimer = 1*IN_MILLISECONDS;
- frostboltTimer = 4*IN_MILLISECONDS;
- resetTimer = 5*IN_MILLISECONDS;
+ arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
+ coneOfColdTimer = 8 * IN_MILLISECONDS;
+ fireBoltTimer = 1 * IN_MILLISECONDS;
+ frostboltTimer = 4 * IN_MILLISECONDS;
+ resetTimer = 5 * IN_MILLISECONDS;
waterElementalTimer = 0;
summons.DespawnAll();
@@ -151,32 +151,32 @@ public:
if (waterElementalTimer < diff)
{
if (summons.empty())
- me->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILLISECONDS);
- waterElementalTimer = 50*IN_MILLISECONDS;
+ me->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45 * IN_MILLISECONDS);
+ waterElementalTimer = 50 * IN_MILLISECONDS;
} else waterElementalTimer -= diff;
if (arcaneExplosionTimer < diff)
{
DoCast(me->getVictim(), SPELL_ARCANE_EXPLOSION);
- arcaneExplosionTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
+ arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else arcaneExplosionTimer -= diff;
if (coneOfColdTimer < diff)
{
DoCast(me->getVictim(), SPELL_CONE_OF_COLD);
- coneOfColdTimer = urand(10*IN_MILLISECONDS, 20*IN_MILLISECONDS);
+ coneOfColdTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else coneOfColdTimer -= diff;
if (fireBoltTimer < diff)
{
DoCast(me->getVictim(), SPELL_FIREBALL);
- fireBoltTimer = urand(5*IN_MILLISECONDS, 9*IN_MILLISECONDS);
+ fireBoltTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
} else fireBoltTimer -= diff;
if (frostboltTimer < diff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLT);
- frostboltTimer = urand(4*IN_MILLISECONDS, 12*IN_MILLISECONDS);
+ frostboltTimer = urand(4 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
} else frostboltTimer -= diff;
// check if creature is not outside of building
@@ -187,7 +187,7 @@ public:
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- resetTimer = 5*IN_MILLISECONDS;
+ resetTimer = 5 * IN_MILLISECONDS;
} else resetTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
index e7a7b1a01ba..c72014b96d7 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
@@ -48,23 +48,23 @@ public:
struct boss_drektharAI : public ScriptedAI
{
- boss_drektharAI(Creature* c) : ScriptedAI(c) {}
+ boss_drektharAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 uiWhirlwindTimer;
- uint32 uiWhirlwind2Timer;
- uint32 uiKnockdownTimer;
- uint32 uiFrenzyTimer;
- uint32 uiYellTimer;
- uint32 uiResetTimer;
+ uint32 WhirlwindTimer;
+ uint32 Whirlwind2Timer;
+ uint32 KnockdownTimer;
+ uint32 FrenzyTimer;
+ uint32 YellTimer;
+ uint32 ResetTimer;
void Reset()
{
- uiWhirlwindTimer = urand(1*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- uiWhirlwind2Timer = urand(1*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- uiKnockdownTimer = 12*IN_MILLISECONDS;
- uiFrenzyTimer = 6*IN_MILLISECONDS;
- uiResetTimer = 5*IN_MILLISECONDS;
- uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
+ WhirlwindTimer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ Whirlwind2Timer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ KnockdownTimer = 12 * IN_MILLISECONDS;
+ FrenzyTimer = 6 * IN_MILLISECONDS;
+ ResetTimer = 5 * IN_MILLISECONDS;
+ YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
}
void EnterCombat(Unit* /*who*/)
@@ -83,46 +83,46 @@ public:
if (!UpdateVictim())
return;
- if (uiWhirlwindTimer <= diff)
+ if (WhirlwindTimer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND);
- uiWhirlwindTimer = urand(8*IN_MILLISECONDS, 18*IN_MILLISECONDS);
- } else uiWhirlwindTimer -= diff;
+ WhirlwindTimer = urand(8 * IN_MILLISECONDS, 18 * IN_MILLISECONDS);
+ } else WhirlwindTimer -= diff;
- if (uiWhirlwind2Timer <= diff)
+ if (Whirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
- uiWhirlwind2Timer = urand(7*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else uiWhirlwind2Timer -= diff;
+ Whirlwind2Timer = urand(7 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
+ } else Whirlwind2Timer -= diff;
- if (uiKnockdownTimer <= diff)
+ if (KnockdownTimer <= diff)
{
DoCast(me->getVictim(), SPELL_KNOCKDOWN);
- uiKnockdownTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else uiKnockdownTimer -= diff;
+ KnockdownTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
+ } else KnockdownTimer -= diff;
- if (uiFrenzyTimer <= diff)
+ if (FrenzyTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRENZY);
- uiFrenzyTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else uiFrenzyTimer -= diff;
+ FrenzyTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
+ } else FrenzyTimer -= diff;
- if (uiYellTimer <= diff)
+ if (YellTimer <= diff)
{
DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5), me);
- uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
- } else uiYellTimer -= diff;
+ YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
+ } else YellTimer -= diff;
// check if creature is not outside of building
- if (uiResetTimer <= diff)
+ if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILLISECONDS;
- } else uiResetTimer -= diff;
+ ResetTimer = 5 * IN_MILLISECONDS;
+ } else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
index 40d1ca2fe68..2b338833f4b 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
@@ -39,23 +39,23 @@ public:
struct boss_galvangarAI : public ScriptedAI
{
- boss_galvangarAI(Creature* c) : ScriptedAI(c) {}
+ boss_galvangarAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 uiCleaveTimer;
- uint32 uiFrighteningShoutTimer;
- uint32 uiWhirlwind1Timer;
- uint32 uiWhirlwind2Timer;
- uint32 uiMortalStrikeTimer;
- uint32 uiResetTimer;
+ uint32 CleaveTimer;
+ uint32 FrighteningShoutTimer;
+ uint32 Whirlwind1Timer;
+ uint32 Whirlwind2Timer;
+ uint32 MortalStrikeTimer;
+ uint32 ResetTimer;
void Reset()
{
- uiCleaveTimer = urand(1*IN_MILLISECONDS, 9*IN_MILLISECONDS);
- uiFrighteningShoutTimer = urand(2*IN_MILLISECONDS, 19*IN_MILLISECONDS);
- uiWhirlwind1Timer = urand(1*IN_MILLISECONDS, 13*IN_MILLISECONDS);
- uiWhirlwind2Timer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- uiMortalStrikeTimer = urand(5*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- uiResetTimer = 5*IN_MILLISECONDS;
+ CleaveTimer = urand(1 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
+ FrighteningShoutTimer = urand(2 * IN_MILLISECONDS, 19 * IN_MILLISECONDS);
+ Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 13 * IN_MILLISECONDS);
+ Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ MortalStrikeTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ ResetTimer = 5 * IN_MILLISECONDS;
}
void EnterCombat(Unit* /*who*/)
@@ -73,46 +73,46 @@ public:
if (!UpdateVictim())
return;
- if (uiCleaveTimer <= diff)
+ if (CleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
- uiCleaveTimer = urand(10*IN_MILLISECONDS, 16*IN_MILLISECONDS);
- } else uiCleaveTimer -= diff;
+ CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
+ } else CleaveTimer -= diff;
- if (uiFrighteningShoutTimer <= diff)
+ if (FrighteningShoutTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
- uiFrighteningShoutTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else uiFrighteningShoutTimer -= diff;
+ FrighteningShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
+ } else FrighteningShoutTimer -= diff;
- if (uiWhirlwind1Timer <= diff)
+ if (Whirlwind1Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
- uiWhirlwind1Timer = urand(6*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- } else uiWhirlwind1Timer -= diff;
+ Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 10 * IN_MILLISECONDS);
+ } else Whirlwind1Timer -= diff;
- if (uiWhirlwind2Timer <= diff)
+ if (Whirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
- uiWhirlwind2Timer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else uiWhirlwind2Timer -= diff;
+ Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
+ } else Whirlwind2Timer -= diff;
- if (uiMortalStrikeTimer <= diff)
+ if (MortalStrikeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
- uiMortalStrikeTimer = urand(10*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else uiMortalStrikeTimer -= diff;
+ MortalStrikeTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
+ } else MortalStrikeTimer -= diff;
// check if creature is not outside of building
- if (uiResetTimer <= diff)
+ if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILLISECONDS;
- } else uiResetTimer -= diff;
+ ResetTimer = 5 * IN_MILLISECONDS;
+ } else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
index 973e7ca5f64..c933757c14a 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
@@ -46,21 +46,21 @@ public:
struct boss_vanndarAI : public ScriptedAI
{
- boss_vanndarAI(Creature* c) : ScriptedAI(c) {}
+ boss_vanndarAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 uiAvatarTimer;
- uint32 uiThunderclapTimer;
- uint32 uiStormboltTimer;
- uint32 uiResetTimer;
- uint32 uiYellTimer;
+ uint32 AvatarTimer;
+ uint32 ThunderclapTimer;
+ uint32 StormboltTimer;
+ uint32 ResetTimer;
+ uint32 YellTimer;
void Reset()
{
- uiAvatarTimer = 3*IN_MILLISECONDS;
- uiThunderclapTimer = 4*IN_MILLISECONDS;
- uiStormboltTimer = 6*IN_MILLISECONDS;
- uiResetTimer = 5*IN_MILLISECONDS;
- uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS);
+ AvatarTimer = 3 * IN_MILLISECONDS;
+ ThunderclapTimer = 4 * IN_MILLISECONDS;
+ StormboltTimer = 6 * IN_MILLISECONDS;
+ ResetTimer = 5 * IN_MILLISECONDS;
+ YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
}
void EnterCombat(Unit* /*who*/)
@@ -79,40 +79,40 @@ public:
if (!UpdateVictim())
return;
- if (uiAvatarTimer <= diff)
+ if (AvatarTimer <= diff)
{
DoCast(me->getVictim(), SPELL_AVATAR);
- uiAvatarTimer = urand(15*IN_MILLISECONDS, 20*IN_MILLISECONDS);
- } else uiAvatarTimer -= diff;
+ AvatarTimer = urand(15 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ } else AvatarTimer -= diff;
- if (uiThunderclapTimer <= diff)
+ if (ThunderclapTimer <= diff)
{
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
- uiThunderclapTimer = urand(5*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else uiThunderclapTimer -= diff;
+ ThunderclapTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
+ } else ThunderclapTimer -= diff;
- if (uiStormboltTimer <= diff)
+ if (StormboltTimer <= diff)
{
DoCast(me->getVictim(), SPELL_STORMBOLT);
- uiStormboltTimer = urand(10*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else uiStormboltTimer -= diff;
+ StormboltTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
+ } else StormboltTimer -= diff;
- if (uiYellTimer <= diff)
+ if (YellTimer <= diff)
{
DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5, YELL_RANDOM6, YELL_RANDOM7), me);
- uiYellTimer = urand(20*IN_MILLISECONDS, 30*IN_MILLISECONDS); //20 to 30 seconds
- } else uiYellTimer -= diff;
+ YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds
+ } else YellTimer -= diff;
// check if creature is not outside of building
- if (uiResetTimer <= diff)
+ if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
{
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILLISECONDS;
- } else uiResetTimer -= diff;
+ ResetTimer = 5 * IN_MILLISECONDS;
+ } else ResetTimer -= diff;
DoMeleeAttackIfReady();
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index f205d1d7932..36a91ab3d51 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -15,35 +15,11 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Blackrock_Depths
-SD%Complete: 95
-SDComment: Quest support: 4001, 4342, 7604, 4322. Vendor Lokhtos Darkbargainer. Need to rewrite the Jail Break support
-SDCategory: Blackrock Depths
-EndScriptData */
-
-/* ContentData
-go_shadowforge_brazier
-at_ring_of_law
-npc_grimstone
-mob_phalanx
-npc_kharan_mighthammer
-npc_lokhtos_darkbargainer
-npc_dughal_stormwing
-npc_marshal_windsor
-npc_marshal_reginald_windsor
-npc_tobias_seecher
-npc_rocknot
-EndContentData */
-
#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "blackrock_depths.h"
-/*######
-+## go_shadowforge_brazier
-+######*/
-
+//go_shadowforge_brazier
class go_shadowforge_brazier : public GameObjectScript
{
public:
@@ -65,13 +41,9 @@ public:
}
return false;
}
-
};
-/*######
-## npc_grimstone
-######*/
-
+// npc_grimstone
enum eGrimstone
{
NPC_GRIMSTONE = 10096,
@@ -120,21 +92,17 @@ public:
}
return false;
}
-
};
-/*######
-## npc_grimstone
-######*/
-
+// npc_grimstone
enum GrimstoneTexts
{
- SCRIPT_TEXT1 = -1230003,
- SCRIPT_TEXT2 = -1230004,
- SCRIPT_TEXT3 = -1230005,
- SCRIPT_TEXT4 = -1230006,
- SCRIPT_TEXT5 = -1230007,
- SCRIPT_TEXT6 = -1230008
+ SCRIPT_TEXT1 = -1230003,
+ SCRIPT_TEXT2 = -1230004,
+ SCRIPT_TEXT3 = -1230005,
+ SCRIPT_TEXT4 = -1230006,
+ SCRIPT_TEXT5 = -1230007,
+ SCRIPT_TEXT6 = -1230008
};
//TODO: implement quest part of event (different end boss)
@@ -150,19 +118,19 @@ public:
struct npc_grimstoneAI : public npc_escortAI
{
- npc_grimstoneAI(Creature* c) : npc_escortAI(c)
+ npc_grimstoneAI(Creature* creature) : npc_escortAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
MobSpawnId = rand()%6;
}
InstanceScript* instance;
- uint8 EventPhase;
+ uint8 EventPhase;
uint32 Event_Timer;
- uint8 MobSpawnId;
- uint8 MobCount;
+ uint8 MobSpawnId;
+ uint8 MobCount;
uint32 MobDeath_Timer;
uint64 RingMobGUID[4];
@@ -174,16 +142,16 @@ public:
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- EventPhase = 0;
- Event_Timer = 1000;
+ EventPhase = 0;
+ Event_Timer = 1000;
- MobCount = 0;
- MobDeath_Timer = 0;
+ MobCount = 0;
+ MobDeath_Timer = 0;
for (uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
RingMobGUID[i] = 0;
- RingBossGUID = 0;
+ RingBossGUID = 0;
CanWalk = false;
}
@@ -215,24 +183,24 @@ public:
{
case 0:
DoScriptText(SCRIPT_TEXT1, me);//2
- CanWalk = false;
- Event_Timer = 5000;
+ CanWalk = false;
+ Event_Timer = 5000;
break;
case 1:
DoScriptText(SCRIPT_TEXT2, me);//4
- CanWalk = false;
- Event_Timer = 5000;
+ CanWalk = false;
+ Event_Timer = 5000;
break;
case 2:
- CanWalk = false;
+ CanWalk = false;
break;
case 3:
DoScriptText(SCRIPT_TEXT3, me);//5
break;
case 4:
DoScriptText(SCRIPT_TEXT4, me);//6
- CanWalk = false;
- Event_Timer = 5000;
+ CanWalk = false;
+ Event_Timer = 5000;
break;
case 5:
if (instance)
@@ -259,16 +227,16 @@ public:
{
if (MobDeath_Timer <= diff)
{
- MobDeath_Timer = 2500;
+ MobDeath_Timer = 2500;
if (RingBossGUID)
{
Creature* boss = Unit::GetCreature(*me, RingBossGUID);
if (boss && !boss->isAlive() && boss->isDead())
{
- RingBossGUID = 0;
- Event_Timer = 5000;
- MobDeath_Timer = 0;
+ RingBossGUID = 0;
+ Event_Timer = 5000;
+ MobDeath_Timer = 0;
return;
}
return;
@@ -279,7 +247,7 @@ public:
Creature* mob = Unit::GetCreature(*me, RingMobGUID[i]);
if (mob && !mob->isAlive() && mob->isDead())
{
- RingMobGUID[i] = 0;
+ RingMobGUID[i] = 0;
--MobCount;
//seems all are gone, so set timer to continue and discontinue this
@@ -365,18 +333,14 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
-/*######
-## mob_phalanx
-######*/
-
+// mob_phalanx
enum PhalanxSpells
{
- SPELL_THUNDERCLAP = 8732,
- SPELL_FIREBALLVOLLEY = 22425,
- SPELL_MIGHTYBLOW = 14099
+ SPELL_THUNDERCLAP = 8732,
+ SPELL_FIREBALLVOLLEY = 22425,
+ SPELL_MIGHTYBLOW = 14099
};
class mob_phalanx : public CreatureScript
@@ -399,9 +363,9 @@ public:
void Reset()
{
- ThunderClap_Timer = 12000;
- FireballVolley_Timer =0;
- MightyBlow_Timer = 15000;
+ ThunderClap_Timer = 12000;
+ FireballVolley_Timer = 0;
+ MightyBlow_Timer = 15000;
}
void UpdateAI(const uint32 diff)
@@ -437,22 +401,17 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
-/*######
-## npc_kharan_mighthammer
-######*/
-
+// npc_kharan_mighthammer
enum KharamQuests
{
- QUEST_4001 = 4001,
- QUEST_4342 = 4342
+ QUEST_4001 = 4001,
+ QUEST_4342 = 4342
};
#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!"
#define GOSSIP_ITEM_KHARAN_2 "All is not lost, Kharan!"
-
#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me."
#define GOSSIP_ITEM_KHARAN_4 "Not enough, you need to tell me more."
#define GOSSIP_ITEM_KHARAN_5 "So what happened?"
@@ -467,13 +426,13 @@ class npc_kharan_mighthammer : public CreatureScript
public:
npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
+ switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
player->SEND_GOSSIP_MENU(2475, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
@@ -534,13 +493,9 @@ public:
return true;
}
-
};
-/*######
-## npc_lokhtos_darkbargainer
-######*/
-
+// npc_lokhtos_darkbargainer
enum LokhtosItems
{
ITEM_THRORIUM_BROTHERHOOD_CONTRACT = 18628,
@@ -565,15 +520,15 @@ class npc_lokhtos_darkbargainer : public CreatureScript
public:
npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
}
- if (uiAction == GOSSIP_ACTION_TRADE)
+ if (action == GOSSIP_ACTION_TRADE)
player->GetSession()->SendListInventory(creature->GetGUID());
return true;
@@ -601,18 +556,15 @@ public:
return true;
}
-
};
-/*######
-## npc_dughal_stormwing
-######*/
-
+// npc_dughal_stormwing
enum DughalQuests
{
- QUEST_JAIL_BREAK = 4322
+ QUEST_JAIL_BREAK = 4322
};
+// DELETE THIS IF IT IS NOT NEEDED!
#define SAY_DUGHAL_FREE "Thank you, $N! I'm free!!!"
#define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!"
@@ -633,10 +585,10 @@ public:
return dughal_stormwingAI;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 Sender, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
player->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID());
@@ -707,14 +659,11 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
*/
-/*######
-## npc_marshal_windsor
-######*/
+// npc_marshal_windsor
#define SAY_WINDSOR_AGGRO1 "You locked up the wrong Marshal. Prepare to be destroyed!"
#define SAY_WINDSOR_AGGRO2 "I bet you're sorry now, aren't you !?!!"
#define SAY_WINDSOR_AGGRO3 "You better hold me back $N or they are going to feel some prison house beatings."
@@ -771,7 +720,6 @@ public:
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
creature->setFaction(11);
}
-
}
return false;
}
@@ -875,14 +823,11 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
*/
-/*######
-## npc_marshal_reginald_windsor
-######*/
+// npc_marshal_reginald_windsor
#define SAY_REGINALD_WINDSOR_0_1 "Can you feel the power, $N??? It's time to ROCK!"
#define SAY_REGINALD_WINDSOR_0_2 "Now we just have to free Tobias and we can get out of here. This way!"
#define SAY_REGINALD_WINDSOR_5_1 "Open it."
@@ -1096,13 +1041,10 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
*/
-/*######
-## npc_tobias_seecher
-######*/
+// npc_tobias_seecher
#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!"
/*
class npc_tobias_seecher : public CreatureScript
@@ -1123,10 +1065,10 @@ public:
return tobias_seecherAI;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 uiSender, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 Sender, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
+ if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
player->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID());
@@ -1198,28 +1140,24 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
*/
-/*######
-## npc_rocknot
-######*/
-
+// npc_rocknot
enum RocknotSays
{
- SAY_GOT_BEER = -1230000
+ SAY_GOT_BEER = -1230000
};
enum RocknotSpells
{
- SPELL_DRUNKEN_RAGE = 14872
+ SPELL_DRUNKEN_RAGE = 14872
};
enum RocknotQuests
{
- QUEST_ALE = 4295
+ QUEST_ALE = 4295
};
class npc_rocknot : public CreatureScript
@@ -1248,6 +1186,7 @@ public:
{
DoScriptText(SAY_GOT_BEER, creature);
creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
+
if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
escortAI->Start(false, false);
}
@@ -1263,9 +1202,9 @@ public:
struct npc_rocknotAI : public npc_escortAI
{
- npc_rocknotAI(Creature* c) : npc_escortAI(c)
+ npc_rocknotAI(Creature* creature) : npc_escortAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
InstanceScript* instance;
@@ -1278,8 +1217,8 @@ public:
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
- BreakKeg_Timer = 0;
- BreakDoor_Timer = 0;
+ BreakKeg_Timer = 0;
+ BreakDoor_Timer = 0;
}
void DoGo(uint32 id, uint32 state)
@@ -1324,8 +1263,8 @@ public:
if (BreakKeg_Timer <= diff)
{
DoGo(DATA_GO_BAR_KEG, 0);
- BreakKeg_Timer = 0;
- BreakDoor_Timer = 1000;
+ BreakKeg_Timer = 0;
+ BreakDoor_Timer = 1000;
} else BreakKeg_Timer -= diff;
}
@@ -1351,13 +1290,8 @@ public:
npc_escortAI::UpdateAI(diff);
}
};
-
};
-/*######
-##
-######*/
-
void AddSC_blackrock_depths()
{
new go_shadowforge_brazier();
@@ -1366,9 +1300,11 @@ void AddSC_blackrock_depths()
new mob_phalanx();
new npc_kharan_mighthammer();
new npc_lokhtos_darkbargainer();
- //new npc_dughal_stormwing();
- //new npc_tobias_seecher();
- //new npc_marshal_windsor();
- //new npc_marshal_reginald_windsor();
new npc_rocknot();
+ // Fix us
+ /*new npc_dughal_stormwing();
+ new npc_tobias_seecher();
+ new npc_marshal_windsor();
+ new npc_marshal_reginald_windsor();
+ */
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
index ad663415cbe..86bd0a0b393 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Ambassador_Flamelash
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -42,15 +35,15 @@ public:
struct boss_ambassador_flamelashAI : public ScriptedAI
{
- boss_ambassador_flamelashAI(Creature* c) : ScriptedAI(c) {}
+ boss_ambassador_flamelashAI(Creature* creature) : ScriptedAI(creature) {}
uint32 FireBlast_Timer;
uint32 Spirit_Timer;
void Reset()
{
- FireBlast_Timer = 2000;
- Spirit_Timer = 24000;
+ FireBlast_Timer = 2000;
+ Spirit_Timer = 24000;
}
void EnterCombat(Unit* /*who*/) {}
@@ -88,7 +81,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_ambassador_flamelash()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
index 1edb5d99463..3d37d1885da 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Anubshiah
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -46,7 +39,7 @@ public:
struct boss_anubshiahAI : public ScriptedAI
{
- boss_anubshiahAI(Creature* c) : ScriptedAI(c) {}
+ boss_anubshiahAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowBolt_Timer;
uint32 CurseOfTongues_Timer;
@@ -56,16 +49,14 @@ public:
void Reset()
{
- ShadowBolt_Timer = 7000;
- CurseOfTongues_Timer = 24000;
- CurseOfWeakness_Timer = 12000;
- DemonArmor_Timer = 3000;
- EnvelopingWeb_Timer = 16000;
+ ShadowBolt_Timer = 7000;
+ CurseOfTongues_Timer = 24000;
+ CurseOfWeakness_Timer = 12000;
+ DemonArmor_Timer = 3000;
+ EnvelopingWeb_Timer = 16000;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -113,7 +104,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_anubshiah()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
index 1d9878a331a..deda95ff454 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Emperor_Dagran_Thaurissan
-SD%Complete: 99
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
#include "blackrock_depths.h"
@@ -50,7 +43,7 @@ public:
struct boss_draganthaurissanAI : public ScriptedAI
{
- boss_draganthaurissanAI(Creature* c) : ScriptedAI(c)
+ boss_draganthaurissanAI(Creature* creature) : ScriptedAI(creature)
{
instance = me->GetInstanceScript();
}
@@ -62,9 +55,9 @@ public:
void Reset()
{
- HandOfThaurissan_Timer = 4000;
- AvatarOfFlame_Timer = 25000;
- //Counter= 0;
+ HandOfThaurissan_Timer = 4000;
+ AvatarOfFlame_Timer = 25000;
+ //Counter = 0;
}
void EnterCombat(Unit* /*who*/)
@@ -107,7 +100,7 @@ public:
//else
//{
HandOfThaurissan_Timer = 5000;
- //Counter = 0;
+ //Counter = 0;
//}
} else HandOfThaurissan_Timer -= diff;
@@ -121,7 +114,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_draganthaurissan()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
index 9b290b2e352..d402e70d671 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_General_Angerforge
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -44,7 +37,7 @@ public:
struct boss_general_angerforgeAI : public ScriptedAI
{
- boss_general_angerforgeAI(Creature* c) : ScriptedAI(c) {}
+ boss_general_angerforgeAI(Creature* creature) : ScriptedAI(creature) {}
uint32 MightyBlow_Timer;
uint32 HamString_Timer;
@@ -54,16 +47,14 @@ public:
void Reset()
{
- MightyBlow_Timer = 8000;
- HamString_Timer = 12000;
- Cleave_Timer = 16000;
- Adds_Timer = 0;
- Medics = false;
+ MightyBlow_Timer = 8000;
+ HamString_Timer = 12000;
+ Cleave_Timer = 16000;
+ Adds_Timer = 0;
+ Medics = false;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void SummonAdds(Unit* victim)
{
@@ -129,7 +120,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_general_angerforge()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
index c82c5f82965..1055e20bddd 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Gorosh_the_Dervish
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -43,15 +36,15 @@ public:
struct boss_gorosh_the_dervishAI : public ScriptedAI
{
- boss_gorosh_the_dervishAI(Creature* c) : ScriptedAI(c) {}
+ boss_gorosh_the_dervishAI(Creature* creature) : ScriptedAI(creature) {}
uint32 WhirlWind_Timer;
uint32 MortalStrike_Timer;
void Reset()
{
- WhirlWind_Timer = 12000;
- MortalStrike_Timer = 22000;
+ WhirlWind_Timer = 12000;
+ MortalStrike_Timer = 22000;
}
void EnterCombat(Unit* /*who*/)
@@ -81,7 +74,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_gorosh_the_dervish()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
index e8b794a2edb..df850a276b7 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Grizzle
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -43,20 +36,18 @@ public:
struct boss_grizzleAI : public ScriptedAI
{
- boss_grizzleAI(Creature* c) : ScriptedAI(c) {}
+ boss_grizzleAI(Creature* creature) : ScriptedAI(creature) {}
uint32 GroundTremor_Timer;
uint32 Frenzy_Timer;
void Reset()
{
- GroundTremor_Timer = 12000;
- Frenzy_Timer =0;
+ GroundTremor_Timer = 12000;
+ Frenzy_Timer = 0;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -86,7 +77,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_grizzle()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
index 5b7ce8bd760..28e8b47f680 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_High_Interrogator_Gerstahn
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -45,7 +38,7 @@ public:
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
{
- boss_high_interrogator_gerstahnAI(Creature* c) : ScriptedAI(c) {}
+ boss_high_interrogator_gerstahnAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ShadowWordPain_Timer;
uint32 ManaBurn_Timer;
@@ -54,15 +47,13 @@ public:
void Reset()
{
- ShadowWordPain_Timer = 4000;
- ManaBurn_Timer = 14000;
- PsychicScream_Timer = 32000;
- ShadowShield_Timer = 8000;
+ ShadowWordPain_Timer = 4000;
+ ManaBurn_Timer = 14000;
+ PsychicScream_Timer = 32000;
+ ShadowShield_Timer = 8000;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -103,7 +94,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_high_interrogator_gerstahn()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
index 4c6bbf33e59..0f767f7bc23 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Magmus
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -33,7 +26,7 @@ enum Spells
enum eEnums
{
- DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h
+ DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h
};
class boss_magmus : public CreatureScript
@@ -48,20 +41,18 @@ public:
struct boss_magmusAI : public ScriptedAI
{
- boss_magmusAI(Creature* c) : ScriptedAI(c) {}
+ boss_magmusAI(Creature* creature) : ScriptedAI(creature) {}
uint32 FieryBurst_Timer;
uint32 WarStomp_Timer;
void Reset()
{
- FieryBurst_Timer = 5000;
- WarStomp_Timer =0;
+ FieryBurst_Timer = 5000;
+ WarStomp_Timer = 0;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -95,7 +86,6 @@ public:
instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true);
}
};
-
};
void AddSC_boss_magmus()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
index ac05f8d86bb..6c10a4a7cce 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Moira_Bronzbeard
-SD%Complete: 90
-SDComment: Healing of Emperor NYI
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
enum Spells
@@ -47,7 +40,7 @@ public:
struct boss_moira_bronzebeardAI : public ScriptedAI
{
- boss_moira_bronzebeardAI(Creature* c) : ScriptedAI(c) {}
+ boss_moira_bronzebeardAI(Creature* creature) : ScriptedAI(creature) {}
uint32 Heal_Timer;
uint32 MindBlast_Timer;
@@ -56,15 +49,13 @@ public:
void Reset()
{
- Heal_Timer = 12000; //These times are probably wrong
- MindBlast_Timer = 16000;
- ShadowWordPain_Timer = 2000;
- Smite_Timer = 8000;
+ Heal_Timer = 12000; // These times are probably wrong
+ MindBlast_Timer = 16000;
+ ShadowWordPain_Timer = 2000;
+ Smite_Timer = 8000;
}
- void EnterCombat(Unit* /*who*/)
- {
- }
+ void EnterCombat(Unit* /*who*/) {}
void UpdateAI(const uint32 diff)
{
@@ -92,10 +83,8 @@ public:
DoCast(me->getVictim(), SPELL_SMITE);
Smite_Timer = 10000;
} else Smite_Timer -= diff;
-
}
};
-
};
void AddSC_boss_moira_bronzebeard()
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 aecb3445b01..2fa19405153 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -16,30 +16,23 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Tomb_Of_Seven
-SD%Complete: 90
-SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Missing event.
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
#include "blackrock_depths.h"
enum Spells
{
- SPELL_SMELT_DARK_IRON = 14891,
- SPELL_LEARN_SMELT = 14894,
+ SPELL_SMELT_DARK_IRON = 14891,
+ SPELL_LEARN_SMELT = 14894,
};
enum Quests
{
- QUEST_SPECTRAL_CHALICE = 4083
+ QUEST_SPECTRAL_CHALICE = 4083
};
enum Misc
{
- DATA_SKILLPOINT_MIN = 230
+ DATA_SKILLPOINT_MIN = 230
};
#define GOSSIP_ITEM_TEACH_1 "Teach me the art of smelting dark iron"
@@ -52,10 +45,10 @@ class boss_gloomrel : public CreatureScript
public:
boss_gloomrel() : CreatureScript("boss_gloomrel") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
+ switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
@@ -92,7 +85,6 @@ public:
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
-
};
enum DoomrelSpells
@@ -112,10 +104,10 @@ class boss_doomrel : public CreatureScript
public:
boss_doomrel() : CreatureScript("boss_doomrel") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*Sender*/, uint32 action)
{
player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
+ switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -150,9 +142,9 @@ public:
struct boss_doomrelAI : public ScriptedAI
{
- boss_doomrelAI(Creature* c) : ScriptedAI(c)
+ boss_doomrelAI(Creature* creature) : ScriptedAI(creature)
{
- instance = c->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
InstanceScript* instance;
@@ -164,11 +156,11 @@ public:
void Reset()
{
- ShadowVolley_Timer = 10000;
- Immolate_Timer = 18000;
- CurseOfWeakness_Timer = 5000;
- DemonArmor_Timer = 16000;
- Voidwalkers = false;
+ ShadowVolley_Timer = 10000;
+ Immolate_Timer = 18000;
+ CurseOfWeakness_Timer = 5000;
+ DemonArmor_Timer = 16000;
+ Voidwalkers = false;
me->setFaction(FACTION_FRIEND);
@@ -252,7 +244,6 @@ public:
DoMeleeAttackIfReady();
}
};
-
};
void AddSC_boss_tomb_of_seven()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
index 36135d6ea55..ae81c3bed64 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Instance_Blackrock_Depths
-SD%Complete: 100
-SDComment:
-SDCategory: Blackrock Depths
-EndScriptData */
-
#include "ScriptPCH.h"
#include "blackrock_depths.h"
@@ -63,7 +56,6 @@ enum eEnums
GO_GOLEM_ROOM_N = 170573, // Magmus door North
GO_GOLEM_ROOM_S = 170574, // Magmus door Soutsh
GO_THRONE_ROOM = 170575, // Throne door
-
GO_SPECTRAL_CHALICE = 164869,
GO_CHEST_SEVEN = 169243
};
@@ -82,7 +74,7 @@ public:
{
instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) {}
- uint32 m_auiEncounter[MAX_ENCOUNTER];
+ uint32 encounter[MAX_ENCOUNTER];
std::string str_data;
uint64 EmperorGUID;
@@ -121,59 +113,59 @@ public:
void Initialize()
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
-
- EmperorGUID = 0;
- PhalanxGUID = 0;
- MagmusGUID = 0;
- MoiraGUID = 0;
-
- GoArena1GUID = 0;
- GoArena2GUID = 0;
- GoArena3GUID = 0;
- GoArena4GUID = 0;
- GoShadowLockGUID = 0;
- GoShadowMechGUID = 0;
- GoShadowGiantGUID = 0;
- GoShadowDummyGUID = 0;
- GoBarKegGUID = 0;
- GoBarKegTrapGUID = 0;
- GoBarDoorGUID = 0;
- GoTombEnterGUID = 0;
- GoTombExitGUID = 0;
- GoLyceumGUID = 0;
- GoSFSGUID = 0;
- GoSFNGUID = 0;
- GoGolemNGUID = 0;
- GoGolemSGUID = 0;
- GoThroneGUID = 0;
- GoChestGUID = 0;
- GoSpectralChaliceGUID = 0;
-
- BarAleCount = 0;
- GhostKillCount = 0;
- TombEventStarterGUID = 0;
+ memset(&encounter, 0, sizeof(encounter));
+
+ EmperorGUID = 0;
+ PhalanxGUID = 0;
+ MagmusGUID = 0;
+ MoiraGUID = 0;
+
+ GoArena1GUID = 0;
+ GoArena2GUID = 0;
+ GoArena3GUID = 0;
+ GoArena4GUID = 0;
+ GoShadowLockGUID = 0;
+ GoShadowMechGUID = 0;
+ GoShadowGiantGUID = 0;
+ GoShadowDummyGUID = 0;
+ GoBarKegGUID = 0;
+ GoBarKegTrapGUID = 0;
+ GoBarDoorGUID = 0;
+ GoTombEnterGUID = 0;
+ GoTombExitGUID = 0;
+ GoLyceumGUID = 0;
+ GoSFSGUID = 0;
+ GoSFNGUID = 0;
+ GoGolemNGUID = 0;
+ GoGolemSGUID = 0;
+ GoThroneGUID = 0;
+ GoChestGUID = 0;
+ GoSpectralChaliceGUID = 0;
+
+ BarAleCount = 0;
+ GhostKillCount = 0;
+ TombEventStarterGUID = 0;
TombTimer = TIMER_TOMBOFTHESEVEN;
- TombEventCounter = 0;
+ TombEventCounter = 0;
for (uint8 i = 0; i < 7; ++i)
- TombBossGUIDs[i] = 0;
+ TombBossGUIDs[i] = 0;
}
void OnCreatureCreate(Creature* creature)
{
switch (creature->GetEntry())
{
- case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break;
- case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break;
- case NPC_MOIRA: MoiraGUID = creature->GetGUID(); break;
- case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break;
- case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break;
- case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break;
- case NPC_VILEREL: TombBossGUIDs[3] = creature->GetGUID(); break;
- case NPC_SEETHREL: TombBossGUIDs[4] = creature->GetGUID(); break;
- case NPC_GLOOMREL: TombBossGUIDs[5] = creature->GetGUID(); break;
- case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break;
+ case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break;
+ case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break;
+ case NPC_MOIRA: MoiraGUID = creature->GetGUID(); break;
+ case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break;
+ case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break;
+ case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break;
+ case NPC_VILEREL: TombBossGUIDs[3] = creature->GetGUID(); break;
+ case NPC_SEETHREL: TombBossGUIDs[4] = creature->GetGUID(); break;
+ case NPC_GLOOMREL: TombBossGUIDs[5] = creature->GetGUID(); break;
+ case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break;
case NPC_MAGMUS:
MagmusGUID = creature->GetGUID();
if (!creature->isAlive())
@@ -239,25 +231,25 @@ public:
switch (type)
{
case TYPE_RING_OF_LAW:
- m_auiEncounter[0] = data;
+ encounter[0] = data;
break;
case TYPE_VAULT:
- m_auiEncounter[1] = data;
+ encounter[1] = data;
break;
case TYPE_BAR:
if (data == SPECIAL)
++BarAleCount;
else
- m_auiEncounter[2] = data;
+ encounter[2] = data;
break;
case TYPE_TOMB_OF_SEVEN:
- m_auiEncounter[3] = data;
+ encounter[3] = data;
break;
case TYPE_LYCEUM:
- m_auiEncounter[4] = data;
+ encounter[4] = data;
break;
case TYPE_IRON_HALL:
- m_auiEncounter[5] = data;
+ encounter[5] = data;
break;
case DATA_GHOSTKILL:
GhostKillCount += data;
@@ -269,8 +261,8 @@ public:
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
- saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' '
- << m_auiEncounter[3] << ' ' << m_auiEncounter[4] << ' ' << m_auiEncounter[5] << ' ' << GhostKillCount;
+ saveStream << encounter[0] << ' ' << encounter[1] << ' ' << encounter[2] << ' '
+ << encounter[3] << ' ' << encounter[4] << ' ' << encounter[5] << ' ' << GhostKillCount;
str_data = saveStream.str();
@@ -284,20 +276,20 @@ public:
switch (type)
{
case TYPE_RING_OF_LAW:
- return m_auiEncounter[0];
+ return encounter[0];
case TYPE_VAULT:
- return m_auiEncounter[1];
+ return encounter[1];
case TYPE_BAR:
- if (m_auiEncounter[2] == IN_PROGRESS && BarAleCount == 3)
+ if (encounter[2] == IN_PROGRESS && BarAleCount == 3)
return SPECIAL;
else
- return m_auiEncounter[2];
+ return encounter[2];
case TYPE_TOMB_OF_SEVEN:
- return m_auiEncounter[3];
+ return encounter[3];
case TYPE_LYCEUM:
- return m_auiEncounter[4];
+ return encounter[4];
case TYPE_IRON_HALL:
- return m_auiEncounter[5];
+ return encounter[5];
case DATA_GHOSTKILL:
return GhostKillCount;
}
@@ -362,12 +354,12 @@ public:
OUT_LOAD_INST_DATA(in);
std::istringstream loadStream(in);
- loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
- >> m_auiEncounter[4] >> m_auiEncounter[5] >> GhostKillCount;
+ loadStream >> encounter[0] >> encounter[1] >> encounter[2] >> encounter[3]
+ >> encounter[4] >> encounter[5] >> GhostKillCount;
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- m_auiEncounter[i] = NOT_STARTED;
+ if (encounter[i] == IN_PROGRESS)
+ encounter[i] = NOT_STARTED;
if (GhostKillCount > 0 && GhostKillCount < 7)
GhostKillCount = 0;//reset tomb of seven event
if (GhostKillCount >= 7)
@@ -459,7 +451,6 @@ public:
TombOfSevenEnd();
}
};
-
};
void AddSC_instance_blackrock_depths()
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
index 5c68b933568..eec118b2972 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
@@ -58,10 +58,10 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_FIRE_NOVA, 6*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CLEAVE, 8*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CONFLIGURATION, 15*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_THUNDERCLAP, 17*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FIRE_NOVA, 6 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CONFLIGURATION, 15 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THUNDERCLAP, 17 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -85,19 +85,19 @@ public:
{
case EVENT_FIRE_NOVA:
DoCast(me->getVictim(), SPELL_FIRENOVA);
- events.ScheduleEvent(EVENT_FIRE_NOVA, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FIRE_NOVA, 10 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 8*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS);
break;
case EVENT_CONFLIGURATION:
DoCast(me->getVictim(), SPELL_CONFLIGURATION);
- events.ScheduleEvent(EVENT_CONFLIGURATION, 18*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CONFLIGURATION, 18 * IN_MILLISECONDS);
break;
case EVENT_THUNDERCLAP:
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
- events.ScheduleEvent(EVENT_THUNDERCLAP, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THUNDERCLAP, 20 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
index b08478a1145..88b1bbc49e2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
@@ -74,9 +74,9 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_SUMMON_DRAGON_PACK, 3*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_SUMMON_ORC_PACK, 60*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_AGGRO, 60*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMON_DRAGON_PACK, 3 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMON_ORC_PACK, 60 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_AGGRO, 60 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -87,7 +87,7 @@ public:
void SummonCreatureWithRandomTarget(uint32 creatureId, uint8 count)
{
for (uint8 n = 0; n < count; n++)
- if (Unit* Summoned = me->SummonCreature(creatureId, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240*IN_MILLISECONDS))
+ if (Unit* Summoned = me->SummonCreature(creatureId, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240 * IN_MILLISECONDS))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
Summoned->AddThreat(target, 250.0f);
}
@@ -99,7 +99,7 @@ public:
if (!SummonedRend && HealthBelowPct(11))
{
- events.ScheduleEvent(EVENT_SUMMON_REND, 8*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUMMON_REND, 8 * IN_MILLISECONDS);
SummonedRend = true;
}
@@ -118,10 +118,10 @@ public:
me->InterruptNonMeleeSpells(false);
// Gyth model
me->SetDisplayId(me->GetCreatureInfo()->Modelid1);
- me->SummonCreature(NPC_WARCHIEF_REND_BLACKHAND, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CORROSIVE_ACID, 8*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_FREEZE, 11*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_FLAME_BREATH, 4*IN_MILLISECONDS);
+ me->SummonCreature(NPC_WARCHIEF_REND_BLACKHAND, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CORROSIVE_ACID, 8 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FREEZE, 11 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLAME_BREATH, 4 * IN_MILLISECONDS);
events.CancelEvent(EVENT_SUMMON_REND);
break;
case EVENT_AGGRO:
@@ -152,11 +152,11 @@ public:
break;
case EVENT_CORROSIVE_ACID:
DoCast(me->getVictim(), SPELL_CORROSIVE_ACID);
- events.ScheduleEvent(EVENT_CORROSIVE_ACID, 7*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CORROSIVE_ACID, 7 * IN_MILLISECONDS);
break;
case EVENT_FREEZE:
DoCast(me->getVictim(), SPELL_FREEZE);
- events.ScheduleEvent(EVENT_FREEZE, 16*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FREEZE, 16 * IN_MILLISECONDS);
break;
case EVENT_FLAME_BREATH:
DoCast(me->getVictim(), SPELL_FLAMEBREATH);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
index 5a3adfe499f..59c1ea1c9a4 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
@@ -59,8 +59,8 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_CROWD_PUMMEL, 8*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_MIGHTY_BLOW, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CROWD_PUMMEL, 8 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MIGHTY_BLOW, 14 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -76,7 +76,7 @@ public:
//Summon Gizrul
if (!Summoned && HealthBelowPct(25))
{
- me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300*IN_MILLISECONDS);
+ me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS);
Summoned = true;
}
@@ -91,11 +91,11 @@ public:
{
case EVENT_CROWD_PUMMEL:
DoCast(me->getVictim(), SPELL_CROWDPUMMEL);
- events.ScheduleEvent(EVENT_CROWD_PUMMEL, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CROWD_PUMMEL, 14 * IN_MILLISECONDS);
break;
case EVENT_MIGHTY_BLOW:
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
- events.ScheduleEvent(EVENT_MIGHTY_BLOW, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MIGHTY_BLOW, 10 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
index d1c1a2db699..4c91f79624a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
@@ -64,13 +64,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_WARSTOMP, 15*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CLEAVE, 6*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_STRIKE, 10*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_REND, 14*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_SUNDER_ARMOR, 2*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_KNOCK_AWAY, 18*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_SLOW, 24*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_WARSTOMP, 15 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 6 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_STRIKE, 10 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_REND, 14 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUNDER_ARMOR, 2 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_KNOCK_AWAY, 18 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SLOW, 24 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -94,31 +94,31 @@ public:
{
case EVENT_WARSTOMP:
DoCast(me->getVictim(), SPELL_WARSTOMP);
- events.ScheduleEvent(EVENT_WARSTOMP, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_WARSTOMP, 14 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 8*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS);
break;
case EVENT_STRIKE:
DoCast(me->getVictim(), SPELL_STRIKE);
- events.ScheduleEvent(EVENT_STRIKE, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_STRIKE, 10 * IN_MILLISECONDS);
break;
case EVENT_REND:
DoCast(me->getVictim(), SPELL_REND);
- events.ScheduleEvent(EVENT_REND, 18*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_REND, 18 * IN_MILLISECONDS);
break;
case EVENT_SUNDER_ARMOR:
DoCast(me->getVictim(), SPELL_SUNDERARMOR);
- events.ScheduleEvent(EVENT_SUNDER_ARMOR, 25*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SUNDER_ARMOR, 25 * IN_MILLISECONDS);
break;
case EVENT_KNOCK_AWAY:
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
- events.ScheduleEvent(EVENT_KNOCK_AWAY, 12*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS);
break;
case EVENT_SLOW:
DoCast(me->getVictim(), SPELL_SLOW);
- events.ScheduleEvent(EVENT_SLOW, 18*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SLOW, 18 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
index 3c467b1c7a8..a2314518f28 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
@@ -55,8 +55,8 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_CRYSTALIZE, 20*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_MOTHERS_MILK, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CRYSTALIZE, 20 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -86,11 +86,11 @@ public:
{
case EVENT_CRYSTALIZE:
DoCast(me, SPELL_CRYSTALIZE);
- events.ScheduleEvent(EVENT_CRYSTALIZE, 15*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CRYSTALIZE, 15 * IN_MILLISECONDS);
break;
case EVENT_MOTHERS_MILK:
DoCast(me, SPELL_MOTHERSMILK);
- events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5*IN_MILLISECONDS, 12500));
+ events.ScheduleEvent(EVENT_MOTHERS_MILK, urand(5 * IN_MILLISECONDS, 12500));
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
index 4f71bdef129..28680ef5049 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
@@ -71,10 +71,10 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_BLAST_WAVE, 20*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_SHOUT, 2*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CLEAVE, 6*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_KNOCK_AWAY, 12*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SHOUT, 2 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 6 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -91,9 +91,9 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
- if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300*IN_MILLISECONDS))
+ if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS))
warlord->AI()->AttackStart(target);
- if (Creature* berserker = me->SummonCreature(NPC_SMOLDERTHORN_BERSERKER, SummonLocation2, TEMPSUMMON_TIMED_DESPAWN, 300*IN_MILLISECONDS))
+ if (Creature* berserker = me->SummonCreature(NPC_SMOLDERTHORN_BERSERKER, SummonLocation2, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS))
berserker->AI()->AttackStart(target);
Summoned = true;
}
@@ -110,19 +110,19 @@ public:
{
case EVENT_BLAST_WAVE:
DoCast(me->getVictim(), SPELL_BLASTWAVE);
- events.ScheduleEvent(EVENT_BLAST_WAVE, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS);
break;
case EVENT_SHOUT:
DoCast(me->getVictim(), SPELL_SHOUT);
- events.ScheduleEvent(EVENT_SHOUT, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SHOUT, 10 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 7*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS);
break;
case EVENT_KNOCK_AWAY:
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
- events.ScheduleEvent(EVENT_KNOCK_AWAY, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_KNOCK_AWAY, 14 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
index c938561eb9c..b4d44d85dec 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -57,9 +57,9 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_FIRENOVA, 6*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_FLAMEBUFFET, 3*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_PYROBLAST, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FIRENOVA, 6 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLAMEBUFFET, 3 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_PYROBLAST, 14 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -83,16 +83,16 @@ public:
{
case EVENT_FIRENOVA:
DoCast(me->getVictim(), SPELL_FIRENOVA);
- events.ScheduleEvent(EVENT_FIRENOVA, 6*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FIRENOVA, 6 * IN_MILLISECONDS);
break;
case EVENT_FLAMEBUFFET:
DoCast(me->getVictim(), SPELL_FLAMEBUFFET);
- events.ScheduleEvent(EVENT_FLAMEBUFFET, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLAMEBUFFET, 14 * IN_MILLISECONDS);
break;
case EVENT_PYROBLAST:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_PYROBLAST);
- events.ScheduleEvent(EVENT_PYROBLAST, 15*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_PYROBLAST, 15 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
index ee954d1adfa..bb8f45082dc 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
@@ -56,8 +56,8 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_SHOOT, 1*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_STUN_BOMB, 16*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SHOOT, 1 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_STUN_BOMB, 16 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -85,7 +85,7 @@ public:
break;
case EVENT_STUN_BOMB:
DoCast(me->getVictim(), SPELL_STUNBOMB);
- events.ScheduleEvent(EVENT_STUN_BOMB, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_STUN_BOMB, 14 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
index 634b65e0002..762de86a82b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
@@ -56,9 +56,9 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_WHIRLWIND, 20*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CLEAVE, 5*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_THUNDERCLAP, 9*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_WHIRLWIND, 20 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 5 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THUNDERCLAP, 9 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -82,15 +82,15 @@ public:
{
case EVENT_WHIRLWIND:
DoCast(me->getVictim(), SPELL_WHIRLWIND);
- events.ScheduleEvent(EVENT_WHIRLWIND, 18*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_WHIRLWIND, 18 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 10 * IN_MILLISECONDS);
break;
case EVENT_THUNDERCLAP:
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
- events.ScheduleEvent(EVENT_THUNDERCLAP, 16*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THUNDERCLAP, 16 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
index 71ce5c8d48e..fcd41f97ad0 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
@@ -57,9 +57,9 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_HEX, 8*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CLEAVE, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_HEX, 8 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -83,16 +83,16 @@ public:
{
case EVENT_CURSE_OF_BLOOD:
DoCast(me->getVictim(), SPELL_CURSEOFBLOOD);
- events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 45 * IN_MILLISECONDS);
break;
case EVENT_HEX:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_HEX);
- events.ScheduleEvent(EVENT_HEX, 15*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_HEX, 15 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 7*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 7 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
index ea7a4b79ee2..f2b3f3ff87b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
@@ -56,9 +56,9 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_FLAME_BREAK, 12*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_IMMOLATE, 3*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLAME_BREAK, 12 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_IMMOLATE, 3 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -82,16 +82,16 @@ public:
{
case EVENT_FLAME_BREAK:
DoCast(me->getVictim(), SPELL_FLAMEBREAK);
- events.ScheduleEvent(EVENT_FLAME_BREAK, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLAME_BREAK, 10 * IN_MILLISECONDS);
break;
case EVENT_IMMOLATE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_IMMOLATE);
- events.ScheduleEvent(EVENT_IMMOLATE, 8*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_IMMOLATE, 8 * IN_MILLISECONDS);
break;
case EVENT_TERRIFYING_ROAR:
DoCast(me->getVictim(), SPELL_TERRIFYINGROAR);
- events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
index b1ae9b07630..40ead810600 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
@@ -62,12 +62,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- events.ScheduleEvent(EVENT_SNAP_KICK, 8*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_CLEAVE, 14*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_UPPERCUT, 20*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_MORTAL_STRIKE, 12*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_PUMMEL, 32*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_THROW_AXE, 1*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SNAP_KICK, 8 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_UPPERCUT, 20 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, 12 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_PUMMEL, 32 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS);
}
void JustDied(Unit* /*who*/)
@@ -91,27 +91,27 @@ public:
{
case EVENT_SNAP_KICK:
DoCast(me->getVictim(), SPELL_SNAPKICK);
- events.ScheduleEvent(EVENT_SNAP_KICK, 6*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_SNAP_KICK, 6 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
- events.ScheduleEvent(EVENT_CLEAVE, 12*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_CLEAVE, 12 * IN_MILLISECONDS);
break;
case EVENT_UPPERCUT:
DoCast(me->getVictim(), SPELL_UPPERCUT);
- events.ScheduleEvent(EVENT_UPPERCUT, 14*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_UPPERCUT, 14 * IN_MILLISECONDS);
break;
case EVENT_MORTAL_STRIKE:
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
- events.ScheduleEvent(EVENT_MORTAL_STRIKE, 10*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, 10 * IN_MILLISECONDS);
break;
case EVENT_PUMMEL:
DoCast(me->getVictim(), SPELL_PUMMEL);
- events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16 * IN_MILLISECONDS);
break;
case EVENT_THROW_AXE:
DoCast(me->getVictim(), SPELL_THROWAXE);
- events.ScheduleEvent(EVENT_THROW_AXE, 8*IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_THROW_AXE, 8 * IN_MILLISECONDS);
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
index d65c1c68090..cff1c831eee 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
@@ -33,7 +33,7 @@ public:
{
instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) {}
- uint32 Encounter[MAX_ENCOUNTER];
+ uint32 encounter[MAX_ENCOUNTER];
std::string m_strInstData;
uint64 HighlordOmokk;
uint64 ShadowHunterVoshgajin;
@@ -53,27 +53,27 @@ public:
void Initialize()
{
SetBossNumber(MAX_ENCOUNTER);
- HighlordOmokk = 0;
- ShadowHunterVoshgajin = 0;
- WarMasterVoone = 0;
- MotherSmolderweb = 0;
- UrokDoomhowl = 0;
- QuartermasterZigris = 0;
- GizrultheSlavener = 0;
- Halycon = 0;
- OverlordWyrmthalak = 0;
- PyroguardEmberseer = 0;
- WarchiefRendBlackhand = 0;
- Gyth = 0;
- TheBeast = 0;
- GeneralDrakkisath = 0;
+ HighlordOmokk = 0;
+ ShadowHunterVoshgajin = 0;
+ WarMasterVoone = 0;
+ MotherSmolderweb = 0;
+ UrokDoomhowl = 0;
+ QuartermasterZigris = 0;
+ GizrultheSlavener = 0;
+ Halycon = 0;
+ OverlordWyrmthalak = 0;
+ PyroguardEmberseer = 0;
+ WarchiefRendBlackhand = 0;
+ Gyth = 0;
+ TheBeast = 0;
+ GeneralDrakkisath = 0;
}
bool IsEncounterInProgress() const
{
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{
- if (Encounter[i] == IN_PROGRESS)
+ if (encounter[i] == IN_PROGRESS)
return true;
}
return false;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index ce4a2a10cac..c64fc6f2dab 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -206,7 +206,7 @@ public:
{
float x = KaelLocations[0][0];
float y = KaelLocations[0][1];
- me->GetMap()->CreatureRelocation(me, x, y, LOCATION_Z, 0.0f);
+ me->SetPosition(x, y, LOCATION_Z, 0.0f);
//me->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues...
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i)
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
index e6610294071..a6bb95995be 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
@@ -51,9 +51,11 @@ public:
phase = 0;
me->GetPosition(x, y, z);
- z += 4; x -= 3.5; y -= 5;
+ z += 4.0f;
+ x -= 3.5f;
+ y -= 5.0f;
me->GetMotionMaster()->Clear(false);
- me->GetMap()->CreatureRelocation(me, x, y, z, 0.0f);
+ me->SetPosition(x, y, z, 0.0f);
}
void UpdateAI(const uint32 diff)
@@ -78,7 +80,9 @@ public:
break;
case 1:
player->GetClosePoint(x, y, z, me->GetObjectSize());
- z += 2.5; x -= 2; y -= 1.5;
+ z += 2.5f;
+ x -= 2.0f;
+ y -= 1.5f;
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetTarget(player->GetGUID());
me->SetVisible(true);
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 667e1cd279e..9afbeaa0172 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -756,7 +756,7 @@ public:
{
float x, y, z;
me->GetPosition(x, y, z); //this visual aura some under ground
- me->GetMap()->CreatureRelocation(me, x, y, z + 0.35f, 0.0f);
+ me->SetPosition(x, y, z + 0.35f, 0.0f);
Despawn();
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
if (debuff)
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index 4de719d684e..4e3f3899b35 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -484,15 +484,14 @@ public:
float x, y, z;
me->GetPosition(x, y, z);
- CellPair pair(Trinity::ComputeCellPair(x, y));
+ CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, entry, 100);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
- cell.Visit(pair, cSearcher, *(me->GetMap()));
+ cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 2e4e92685ea..df3bb5d4525 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -661,7 +661,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_SATH_DEATH, me);
- me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
+ me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
TeleportAllPlayersBack();
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
{
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index ba2d638d45f..413897c94e8 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -189,22 +189,21 @@ class boss_akilzon : public CreatureScript
for (uint8 i = 2; i < StormCount; ++i)
bp0 *= 2;
- CellPair p(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
std::list<Unit*> tempUnitMap;
{
- Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(me, me, 999);
+ Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(me, me, SIZE_OF_GRIDS);
Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(me, tempUnitMap, u_check);
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher);
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
- cell.Visit(p, world_unit_searcher, *(me->GetMap()));
- cell.Visit(p, grid_unit_searcher, *(me->GetMap()));
+ cell.Visit(p, world_unit_searcher, *me->GetMap(), *me, SIZE_OF_GRIDS);
+ cell.Visit(p, grid_unit_searcher, *me->GetMap(), *me, SIZE_OF_GRIDS);
}
//dealdamege
for (std::list<Unit*>::const_iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i)
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index d4d4e7314b4..162c84f1fa7 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -335,7 +335,7 @@ class boss_hexlord_malacrass : public CreatureScript
else
{
creature->AI()->EnterEvadeMode();
- creature->GetMap()->CreatureRelocation(me, Pos_X[i], POS_Y, POS_Z, ORIENT);
+ creature->SetPosition(Pos_X[i], POS_Y, POS_Z, ORIENT);
creature->StopMoving();
}
}
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index d2ad81b4910..aea9e322583 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -233,9 +233,8 @@ class boss_janalai : public CreatureScript
me->GetPosition(x, y, z);
{
- CellPair pair(Trinity::ComputeCellPair(x, y));
+ CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, MOB_EGG, 100);
@@ -243,7 +242,7 @@ class boss_janalai : public CreatureScript
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
- cell.Visit(pair, cSearcher, *(me->GetMap()));
+ cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
}
//sLog->outError("Eggs %d at middle", templist.size());
@@ -267,9 +266,8 @@ class boss_janalai : public CreatureScript
me->GetPosition(x, y, z);
{
- CellPair pair(Trinity::ComputeCellPair(x, y));
+ CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, MOB_FIRE_BOMB, 100);
@@ -277,7 +275,7 @@ class boss_janalai : public CreatureScript
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
- cell.Visit(pair, cSearcher, *(me->GetMap()));
+ cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
}
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
@@ -519,9 +517,8 @@ class mob_janalai_hatcher : public CreatureScript
me->GetPosition(x, y, z);
{
- CellPair pair(Trinity::ComputeCellPair(x, y));
+ CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, 23817, 50);
@@ -529,7 +526,7 @@ class mob_janalai_hatcher : public CreatureScript
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
- cell.Visit(pair, cSearcher, *(me->GetMap()));
+ cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
}
//sLog->outError("Eggs %d at %d", templist.size(), side);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
index 17968766a5f..3ff465a3c1d 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
@@ -162,9 +162,8 @@ class boss_nalorakk : public CreatureScript
me->GetPosition(x, y, z);
{
- CellPair pair(Trinity::ComputeCellPair(x, y));
+ CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllFriendlyCreaturesInGrid check(me);
@@ -172,7 +171,7 @@ class boss_nalorakk : public CreatureScript
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher);
- cell.Visit(pair, cSearcher, *(me->GetMap()));
+ cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
}
if (templist.empty())
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index f70c764f306..f45c943b0f1 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -91,9 +91,9 @@ class boss_mandokir : public CreatureScript
MortalStrike_Timer = 1000;
Check_Timer = 1000;
- targetX = 0.0;
- targetY = 0.0;
- targetZ = 0.0;
+ targetX = 0.0f;
+ targetY = 0.0f;
+ targetZ = 0.0f;
TargetInRange = 0;
WatchTarget = 0;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index b9ae61c122e..f6704a50e6f 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -185,7 +185,7 @@ class boss_marli : public CreatureScript
if (target)
{
DoCast(target, SPELL_CHARGE);
- //me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
+ //me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
//me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1);
AttackStart(target);
}
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index 10b7066068b..d02cce3f17c 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -35,91 +35,6 @@ EndContentData */
#include "ScriptedEscortAI.h"
/*######
-## npc_prospector_anvilward
-######*/
-
-#define GOSSIP_HELLO "I need a moment of your time, sir."
-#define GOSSIP_SELECT "Why... yes, of course. I've something to show you right inside this building, Mr. Anvilward."
-
-enum eProspectorAnvilward
-{
- SAY_ANVIL1 = -1000209,
- SAY_ANVIL2 = -1000210,
- QUEST_THE_DWARVEN_SPY = 8483,
-};
-
-class npc_prospector_anvilward : public CreatureScript
-{
-public:
- npc_prospector_anvilward() : CreatureScript("npc_prospector_anvilward") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
- {
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
- player->SEND_GOSSIP_MENU(8240, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->CLOSE_GOSSIP_MENU();
- if (npc_escortAI* pEscortAI = CAST_AI(npc_prospector_anvilward::npc_prospector_anvilwardAI, creature->AI()))
- pEscortAI->Start(true, false, player->GetGUID());
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- player->SEND_GOSSIP_MENU(8239, creature->GetGUID());
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_prospector_anvilwardAI(creature);
- }
-
- struct npc_prospector_anvilwardAI : public npc_escortAI
- {
- // CreatureAI functions
- npc_prospector_anvilwardAI(Creature* c) : npc_escortAI(c) {}
-
- // Pure Virtual Functions
- void WaypointReached(uint32 i)
- {
- Player* player = GetPlayerForEscort();
-
- if (!player)
- return;
-
- switch (i)
- {
- case 0: DoScriptText(SAY_ANVIL1, me, player); break;
- case 5: DoScriptText(SAY_ANVIL2, me, player); break;
- case 6: me->setFaction(24); break;
- }
- }
-
- void Reset()
- {
- me->RestoreFaction();
- }
-
- void JustDied(Unit* /*killer*/)
- {
- me->RestoreFaction();
- }
- };
-
-};
-
-/*######
## Quest 9686 Second Trial
######*/
@@ -711,7 +626,6 @@ public:
void AddSC_eversong_woods()
{
- new npc_prospector_anvilward();
new npc_second_trial_controller();
new npc_second_trial_paladin();
new go_second_trial();
diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp
index 042c8f695c7..b8f2499c4e6 100644
--- a/src/server/scripts/EasternKingdoms/undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/undercity.cpp
@@ -107,10 +107,10 @@ public:
{
if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY)
{
- if (Unit* target = Unit::GetUnit(*summoned, targetGUID))
+ if (Creature* target = Unit::GetCreature(*summoned, targetGUID))
{
target->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0);
- target->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
+ target->SetPosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false);
}
@@ -187,7 +187,7 @@ public:
{
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->SendMonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, 5000);
- me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
+ me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
EventMove = false;
} else EventMove_Timer -= diff;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 6186369a3a0..187ff9b9dd7 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -459,7 +459,9 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
creature = me->SummonCreature(entry, SpawnPointSpecial[SPAWN_NEAR_TOWER][0]+irand(-20, 20), SpawnPointSpecial[SPAWN_NEAR_TOWER][1]+irand(-20, 20), SpawnPointSpecial[SPAWN_NEAR_TOWER][2]+irand(-10, 10), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
if (creature)
CAST_AI(hyjal_trashAI, creature->AI())->useFlyPath = true;
- }else{//summon at gate
+ }
+ else
+ {//summon at gate
creature = me->SummonCreature(entry, SpawnPointSpecial[SPAWN_GARG_GATE][0]+irand(-10, 10), SpawnPointSpecial[SPAWN_GARG_GATE][1]+irand(-10, 10), SpawnPointSpecial[SPAWN_GARG_GATE][2]+irand(-10, 10), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
}
break;
@@ -910,6 +912,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
DoMeleeAttackIfReady();
}
+
void hyjalAI::JustDied(Unit* /*killer*/)
{
if (IsDummy)return;
@@ -932,23 +935,20 @@ void hyjalAI::JustDied(Unit* /*killer*/)
instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die
}
}
+
void hyjalAI::HideNearPos(float x, float y)
{
- CellPair pair(Trinity::ComputeCellPair(x, y));
+ CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
// First get all creatures.
std::list<Creature*> creatures;
Trinity::AllFriendlyCreaturesInGrid creature_check(me);
Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
- TypeContainerVisitor
- <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>,
- GridTypeMapContainer> creature_visitor(creature_searcher);
- // Get Creatures
- cell.Visit(pair, creature_visitor, *(me->GetMap()));
+ TypeContainerVisitor <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher);
+ cell.Visit(pair, creature_visitor, *(me->GetMap()), *me, me->GetGridActivationRange());
if (!creatures.empty())
{
@@ -959,18 +959,19 @@ void hyjalAI::HideNearPos(float x, float y)
}
}
}
+
void hyjalAI::RespawnNearPos(float x, float y)
{
- CellPair p(Trinity::ComputeCellPair(x, y));
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
Cell cell(p);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::RespawnDo u_do;
Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(me, u_do);
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
- cell.Visit(p, obj_worker, *me->GetMap());
+ cell.Visit(p, obj_worker, *me->GetMap(), *me, me->GetGridActivationRange());
}
+
void hyjalAI::WaypointReached(uint32 i)
{
if (i == 1 || (i == 0 && me->GetEntry() == THRALL))
@@ -992,9 +993,8 @@ void hyjalAI::WaypointReached(uint32 i)
}
//do some talking
//all alive guards walk near here
- CellPair pair(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord pair(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
// First get all creatures.
@@ -1005,7 +1005,7 @@ void hyjalAI::WaypointReached(uint32 i)
<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>,
GridTypeMapContainer> creature_visitor(creature_searcher);
- cell.Visit(pair, creature_visitor, *(me->GetMap()));
+ cell.Visit(pair, creature_visitor, *(me->GetMap()), *me, me->GetGridActivationRange());
if (!creatures.empty())
{
@@ -1034,9 +1034,8 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
{
if (TeleportTimer <= diff)
{
- CellPair pair(Trinity::ComputeCellPair(me->GetPositionX(), me->GetPositionY()));
+ CellCoord pair(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(pair);
- cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
std::list<Creature*> creatures;
@@ -1046,7 +1045,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>,
GridTypeMapContainer> creature_visitor(creature_searcher);
- cell.Visit(pair, creature_visitor, *(me->GetMap()));
+ cell.Visit(pair, creature_visitor, *(me->GetMap()), *me, me->GetGridActivationRange());
if (!creatures.empty())
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index ef75307c625..748d0dfa071 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -1202,7 +1202,7 @@ public:
me->GetPosition(x, y, z);
z = me->GetMap()->GetHeight(x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
- me->GetMap()->CreatureRelocation(me, x, y, z, 0);
+ me->SetPosition(x, y, z, 0);
}
void EnterCombat(Unit* /*who*/) {}
@@ -1321,7 +1321,7 @@ public:
me->GetPosition(x, y, z);
z = me->GetMap()->GetHeight(x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
- me->GetMap()->CreatureRelocation(me, x, y, z, 0);
+ me->SetPosition(x, y, z, 0);
hyjal_trashAI::JustDied(victim);
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index dd2531d5aad..4cc1069b838 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -1073,7 +1073,7 @@ public:
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
{
- me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
+ me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
if (Creature* pPortal = me->SummonCreature(MOB_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -1185,7 +1185,7 @@ public:
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
{
- me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
+ me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index b0033aa582a..0ba6bdb1154 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -157,15 +157,15 @@ public:
switch (urand(0, 2))
{
case 0:
- me->GetMap()->CreatureRelocation(me, -8340.782227f, 2083.814453f, 125.648788f, 0.0f);
+ me->SetPosition(-8340.782227f, 2083.814453f, 125.648788f, 0.0f);
DoResetThreat();
break;
case 1:
- me->GetMap()->CreatureRelocation(me, -8341.546875f, 2118.504639f, 133.058151f, 0.0f);
+ me->SetPosition(-8341.546875f, 2118.504639f, 133.058151f, 0.0f);
DoResetThreat();
break;
case 2:
- me->GetMap()->CreatureRelocation(me, -8318.822266f, 2058.231201f, 133.058151f, 0.0f);
+ me->SetPosition(-8318.822266f, 2058.231201f, 133.058151f, 0.0f);
DoResetThreat();
break;
}
@@ -252,7 +252,7 @@ public:
me->RemoveAllAuras();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetVisible(false);
- me->GetMap()->CreatureRelocation(me, bossc->x, bossc->y, bossc->z, bossc->r);
+ me->SetPosition(bossc->x, bossc->y, bossc->z, bossc->r);
Invisible = true;
DoResetThreat();
DoStopAttack();
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index c501a060194..29b92957ace 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -216,15 +216,12 @@ struct boss_twinemperorsAI : public ScriptedAI
if (pOtherBoss)
{
//me->MonsterYell("Teleporting ...", LANG_UNIVERSAL, 0);
- float other_x = pOtherBoss->GetPositionX();
- float other_y = pOtherBoss->GetPositionY();
- float other_z = pOtherBoss->GetPositionZ();
- float other_o = pOtherBoss->GetOrientation();
-
- Map* thismap = me->GetMap();
- thismap->CreatureRelocation(pOtherBoss, me->GetPositionX(),
- me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- thismap->CreatureRelocation(me, other_x, other_y, other_z, other_o);
+ Position thisPos;
+ thisPos.Relocate(me);
+ Position otherPos;
+ otherPos.Relocate(pOtherBoss);
+ pOtherBoss->SetPosition(thisPos);
+ me->SetPosition(otherPos);
SetAfterTeleport();
CAST_AI(boss_twinemperorsAI, pOtherBoss->AI())->SetAfterTeleport();
diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp
index 88e46e7fb26..6fbc424f3d4 100644
--- a/src/server/scripts/Kalimdor/azshara.cpp
+++ b/src/server/scripts/Kalimdor/azshara.cpp
@@ -357,7 +357,7 @@ public:
Map* map = me->GetMap();
if (map)
{
- map->CreatureRelocation(me, 3706.39f, -3969.15f, 35.9118f, 0);
+ me->SetPosition(3706.39f, -3969.15f, 35.9118f, 0);
me->AI_SendMoveToPacket(3706.39f, -3969.15f, 35.9118f, 0, 0, 0);
}
//begin swimming and summon depth charges
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h
index e19054d2f46..e19054d2f46 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/ahnkahet.h
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
index cde97f8d37b..cde97f8d37b 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
index a2371fa0121..a2371fa0121 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
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 bc4d4ba5eea..bc4d4ba5eea 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
index b2975797a02..b2975797a02 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index 9a7dc2f2cc9..9a7dc2f2cc9 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp
index 5ba11dd5353..5ba11dd5353 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
index dea3d6eaede..605f3a11c8a 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
@@ -118,7 +118,7 @@ public:
return;
float x=0.0f, y=0.0f, z=0.0f;
- me->GetRespawnCoord(x, y, z);
+ me->GetRespawnPosition(x, y, z);
if (uiCheckDistanceTimer <= uiDiff)
uiCheckDistanceTimer = 5*IN_MILLISECONDS;
diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt
index 63e714d17aa..53b47884e57 100644
--- a/src/server/scripts/Northrend/CMakeLists.txt
+++ b/src/server/scripts/Northrend/CMakeLists.txt
@@ -18,23 +18,23 @@ set(scripts_STAT_SRCS
Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
- Northrend/Ulduar/ulduar/boss_general_vezax.cpp
- Northrend/Ulduar/ulduar/ulduar_teleporter.cpp
- Northrend/Ulduar/ulduar/boss_thorim.cpp
- Northrend/Ulduar/ulduar/boss_ignis.cpp
- Northrend/Ulduar/ulduar/boss_algalon.cpp
- Northrend/Ulduar/ulduar/instance_ulduar.cpp
- Northrend/Ulduar/ulduar/boss_auriaya.cpp
- Northrend/Ulduar/ulduar/boss_yoggsaron.cpp
- Northrend/Ulduar/ulduar/boss_hodir.cpp
- Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp
- Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
- Northrend/Ulduar/ulduar/boss_xt002.cpp
- Northrend/Ulduar/ulduar/boss_mimiron.cpp
- Northrend/Ulduar/ulduar/ulduar.h
- Northrend/Ulduar/ulduar/boss_freya.cpp
- Northrend/Ulduar/ulduar/boss_razorscale.cpp
- Northrend/Ulduar/ulduar/boss_kologarn.cpp
+ Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
+ Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
+ Northrend/Ulduar/Ulduar/boss_thorim.cpp
+ Northrend/Ulduar/Ulduar/boss_ignis.cpp
+ Northrend/Ulduar/Ulduar/boss_algalon.cpp
+ Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+ Northrend/Ulduar/Ulduar/boss_auriaya.cpp
+ Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
+ Northrend/Ulduar/Ulduar/boss_hodir.cpp
+ Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
+ Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+ Northrend/Ulduar/Ulduar/boss_xt002.cpp
+ Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+ Northrend/Ulduar/Ulduar/ulduar.h
+ Northrend/Ulduar/Ulduar/boss_freya.cpp
+ Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+ Northrend/Ulduar/Ulduar/boss_kologarn.cpp
Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
Northrend/Ulduar/HallsOfStone/halls_of_stone.h
Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
@@ -142,13 +142,13 @@ set(scripts_STAT_SRCS
Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
- Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
- Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
- Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
- Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
- Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
- Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
- Northrend/AzjolNerub/ahnkahet/ahnkahet.h
+ Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
+ Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+ Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp
+ Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+ Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
+ Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
+ Northrend/AzjolNerub/Ahnkahet/ahnkahet.h
Northrend/VioletHold/boss_zuramat.cpp
Northrend/VioletHold/instance_violet_hold.cpp
Northrend/VioletHold/boss_lavanthor.cpp
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 1ca1c69831c..be83c4d326a 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -284,7 +284,7 @@ public:
if (m_uiPenetratingColdTimer <= uiDiff)
{
- me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5));
+ me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5, 2, 5));
m_uiPenetratingColdTimer = 20*IN_MILLISECONDS;
} else m_uiPenetratingColdTimer -= uiDiff;
@@ -577,7 +577,7 @@ public:
me->SetReactState(REACT_PASSIVE);
me->SetFlying(true);
me->SetDisplayId(25144);
- me->SetSpeed(MOVE_RUN, 0.5, false);
+ me->SetSpeed(MOVE_RUN, 0.5f, false);
me->GetMotionMaster()->MoveRandom(20.0f);
DoCast(SPELL_FROST_SPHERE);
}
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 ec573f75bc6..df166c1bf04 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -490,11 +490,14 @@ public:
void UpdateAI(const uint32 uiDiff)
{
- if (!UpdateVictim())
- return;
-
if (m_instance && m_instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
+ {
me->DespawnOrUnsummon();
+ return;
+ }
+
+ if (!UpdateVictim())
+ return;
if (m_uiShivanSlashTimer <= uiDiff)
{
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 adbe59555b6..68223f170c5 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
@@ -114,6 +114,8 @@ struct outroPosition
{ { 0, 0 }, { 0.0f, 0.0f, 0.0f, 0.0f } }
};
+Position const CrucibleSummonPos = {5672.294f,2520.686f, 713.4386f, 0.9599311f};
+
#define DATA_THREE_FACED 1
class boss_devourer_of_souls : public CreatureScript
@@ -154,6 +156,8 @@ class boss_devourer_of_souls : public CreatureScript
{
DoScriptText(RAND(SAY_FACE_ANGER_AGGRO, SAY_FACE_DESIRE_AGGRO), me);
+ if (!me->FindNearestCreature(NPC_CRUCIBLE_OF_SOULS, 60)) // Prevent double spawn
+ instance->instance->SummonCreature(NPC_CRUCIBLE_OF_SOULS, CrucibleSummonPos);
events.ScheduleEvent(EVENT_PHANTOM_BLAST, 5000);
events.ScheduleEvent(EVENT_MIRRORED_SOUL, 8000);
events.ScheduleEvent(EVENT_WELL_OF_SOULS, 30000);
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
index 85062cc2901..9f34e412847 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
@@ -46,5 +46,6 @@ enum Creatures
NPC_CHAMPION_3_HORDE = 37588,
NPC_CHAMPION_1_ALLIANCE = 37496,
NPC_CHAMPION_2_ALLIANCE = 37497,
+ NPC_CRUCIBLE_OF_SOULS = 37094,
};
#endif
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
index 4c74488b6a6..d8fddad41dc 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -270,7 +270,7 @@ class spell_garfrost_permafrost : public SpellScriptLoader
{
for (std::list<GameObject*>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
{
- if ((*itr)->isVisibleForInState(target))
+ if (!(*itr)->IsInvisibleDueToDespawn())
{
if ((*itr)->IsInBetween(caster, target, 4.0f))
{
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 b351d7de9d7..4a5d609eb67 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -239,25 +239,6 @@ class boss_blood_council_controller : public CreatureScript
_invocationOrder[1] = InvocationData(instance->GetData64(DATA_PRINCE_KELESETH_GUID), SPELL_INVOCATION_OF_BLOOD_KELESETH, EMOTE_KELESETH_INVOCATION, 71080);
_invocationOrder[2] = InvocationData(instance->GetData64(DATA_PRINCE_TALDARAM_GUID), SPELL_INVOCATION_OF_BLOOD_TALDARAM, EMOTE_TALDARAM_INVOCATION, 71081);
}
-
- if (IsHeroic())
- {
- Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
- if (PlList.isEmpty())
- return;
-
- for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
- {
- if (Player* player = i->getSource())
- {
- if (player->isGameMaster())
- continue;
-
- if (player->isAlive())
- player->AddAura(SPELL_SHADOW_PRISON_DUMMY, player);
- }
- }
- }
}
void SetData(uint32 /*type*/, uint32 data)
@@ -297,8 +278,6 @@ class boss_blood_council_controller : public CreatureScript
killer->Kill(prince);
}
}
-
- instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_SHADOW_PRISON_DUMMY);
}
void UpdateAI(uint32 const diff)
@@ -409,8 +388,6 @@ class boss_prince_keleseth_icc : public CreatureScript
me->SetHealth(_spawnHealth);
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
me->SetReactState(REACT_DEFENSIVE);
- if (IsHeroic())
- DoCast(me, SPELL_SHADOW_PRISON);
}
void EnterCombat(Unit* /*who*/)
@@ -421,6 +398,12 @@ class boss_prince_keleseth_icc : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 600000);
events.ScheduleEvent(EVENT_SHADOW_RESONANCE, urand(10000, 15000));
events.ScheduleEvent(EVENT_SHADOW_LANCE, 2000);
+
+ if (IsHeroic())
+ {
+ me->AddAura(SPELL_SHADOW_PRISON, me);
+ DoCast(me, SPELL_SHADOW_PRISON_DUMMY);
+ }
}
void JustDied(Unit* /*killer*/)
@@ -629,8 +612,6 @@ class boss_prince_taldaram_icc : public CreatureScript
me->SetHealth(_spawnHealth);
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
me->SetReactState(REACT_DEFENSIVE);
- if (IsHeroic())
- DoCast(me, SPELL_SHADOW_PRISON);
}
void MoveInLineOfSight(Unit* /*who*/)
@@ -645,6 +626,8 @@ class boss_prince_taldaram_icc : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 600000);
events.ScheduleEvent(EVENT_GLITTERING_SPARKS, urand(12000, 15000));
events.ScheduleEvent(EVENT_CONJURE_FLAME, 20000);
+ if (IsHeroic())
+ me->AddAura(SPELL_SHADOW_PRISON, me);
}
void JustDied(Unit* /*killer*/)
@@ -852,8 +835,6 @@ class boss_prince_valanar_icc : public CreatureScript
me->SetHealth(me->GetMaxHealth());
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
me->SetReactState(REACT_DEFENSIVE);
- if (IsHeroic())
- DoCast(me, SPELL_SHADOW_PRISON);
}
void MoveInLineOfSight(Unit* /*who*/)
@@ -868,6 +849,8 @@ class boss_prince_valanar_icc : public CreatureScript
events.ScheduleEvent(EVENT_BERSERK, 600000);
events.ScheduleEvent(EVENT_KINETIC_BOMB, urand(18000, 24000));
events.ScheduleEvent(EVENT_SHOCK_VORTEX, urand(15000, 20000));
+ if (IsHeroic())
+ me->AddAura(SPELL_SHADOW_PRISON, me);
}
void JustDied(Unit* /*killer*/)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
index b117dadf045..fd693789064 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp
@@ -291,6 +291,10 @@ class npc_stinky_icc : public CreatureScript
_events.Reset();
_events.ScheduleEvent(EVENT_DECIMATE, urand(20000, 25000));
_events.ScheduleEvent(EVENT_MORTAL_WOUND, urand(3000, 7000));
+ }
+
+ void EnterCombat(Unit* /*target*/)
+ {
DoCast(me, SPELL_PLAGUE_STENCH);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 9e4079a7a15..ae6f3feb57f 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -375,7 +375,7 @@ class boss_lady_deathwhisper : public CreatureScript
{
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
- events.ScheduleEvent(EVENT_P2_SUMMON_WAVE, urand(30000, 60000), 0, PHASE_TWO);
+ events.ScheduleEvent(EVENT_P2_SUMMON_WAVE, 45000, 0, PHASE_TWO);
}
}
}
@@ -438,7 +438,7 @@ class boss_lady_deathwhisper : public CreatureScript
case EVENT_DEATH_AND_DECAY:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_DEATH_AND_DECAY);
- events.ScheduleEvent(EVENT_DEATH_AND_DECAY, urand(10000, 12000));
+ events.ScheduleEvent(EVENT_DEATH_AND_DECAY, urand(22000, 30000));
break;
case EVENT_DOMINATE_MIND_H:
Talk(SAY_DOMINATE_MIND);
@@ -449,7 +449,7 @@ class boss_lady_deathwhisper : public CreatureScript
break;
case EVENT_P1_SUMMON_WAVE:
SummonWaveP1();
- events.ScheduleEvent(EVENT_P1_SUMMON_WAVE, 60000, 0, PHASE_ONE);
+ events.ScheduleEvent(EVENT_P1_SUMMON_WAVE, IsHeroic() ? 45000 : 60000, 0, PHASE_ONE);
break;
case EVENT_P1_SHADOW_BOLT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
@@ -485,7 +485,7 @@ class boss_lady_deathwhisper : public CreatureScript
break;
case EVENT_P2_SUMMON_WAVE:
SummonWaveP2();
- events.ScheduleEvent(EVENT_P2_SUMMON_WAVE, 60000, 0, PHASE_TWO);
+ events.ScheduleEvent(EVENT_P2_SUMMON_WAVE, 45000, 0, PHASE_TWO);
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index a6e3e78c96a..a84471d132b 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -78,6 +78,7 @@ enum Spells
// Slime Puddle
SPELL_GROW_STACKER = 70345,
+ SPELL_GROW = 70347,
SPELL_SLIME_PUDDLE_AURA = 70343,
// Gas Cloud
@@ -253,6 +254,9 @@ class boss_professor_putricide : public CreatureScript
case NPC_GROWING_OOZE_PUDDLE:
summon->CastSpell(summon, SPELL_GROW_STACKER, true);
summon->CastSpell(summon, SPELL_SLIME_PUDDLE_AURA, true);
+ // blizzard casts this spell 7 times initially (confirmed in sniff)
+ for (uint8 i = 0; i < 7; ++i)
+ summon->CastSpell(summon, SPELL_GROW, true);
break;
case NPC_GAS_CLOUD:
// no possible aura seen in sniff adding the aurastate
@@ -811,38 +815,45 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
}
};
+class ExactDistanceCheck
+{
+ public:
+ ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) {}
+
+ bool operator()(Unit* unit)
+ {
+ return _source->GetExactDist2d(unit) > _dist;
+ }
+
+ private:
+ Unit* _source;
+ float _dist;
+};
+
class spell_putricide_slime_puddle : public SpellScriptLoader
{
public:
spell_putricide_slime_puddle() : SpellScriptLoader("spell_putricide_slime_puddle") { }
- class spell_putricide_slime_puddle_AuraScript : public AuraScript
+ class spell_putricide_slime_puddle_SpellScript : public SpellScript
{
- PrepareAuraScript(spell_putricide_slime_puddle_AuraScript);
+ PrepareSpellScript(spell_putricide_slime_puddle_SpellScript);
- void HandleTriggerSpell(AuraEffect const* aurEff)
+ void ScaleRange(std::list<Unit*>& targets)
{
- PreventDefaultAction();
- if (Unit* caster = GetCaster())
- {
- int32 radiusMod = 4;
- if (Aura* size = caster->GetAura(70347))
- radiusMod += size->GetStackAmount();
-
- uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
- caster->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, radiusMod * 100, caster, true);
- }
+ targets.remove_if(ExactDistanceCheck(GetCaster(), 2.5f * GetCaster()->GetFloatValue(OBJECT_FIELD_SCALE_X)));
}
void Register()
{
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_slime_puddle_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_slime_puddle_SpellScript::ScaleRange, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_slime_puddle_SpellScript::ScaleRange, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
}
};
- AuraScript* GetAuraScript() const
+ SpellScript* GetSpellScript() const
{
- return new spell_putricide_slime_puddle_AuraScript();
+ return new spell_putricide_slime_puddle_SpellScript();
}
};
@@ -1047,7 +1058,6 @@ class spell_putricide_unbound_plague : public SpellScriptLoader
return;
uint32 plagueId = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNBOUND_PLAGUE, GetCaster());
- uint32 searcherId = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNBOUND_PLAGUE_SEARCHER, GetCaster());
if (!GetHitUnit()->HasAura(plagueId))
{
@@ -1057,10 +1067,10 @@ class spell_putricide_unbound_plague : public SpellScriptLoader
{
if (Aura* newPlague = professor->AddAura(plagueId, GetHitUnit()))
{
- newPlague->SetMaxDuration(oldPlague->GetDuration());
+ newPlague->SetMaxDuration(oldPlague->GetMaxDuration());
newPlague->SetDuration(oldPlague->GetDuration());
oldPlague->Remove();
- GetCaster()->RemoveAurasDueToSpell(searcherId);
+ GetCaster()->RemoveAurasDueToSpell(SPELL_UNBOUND_PLAGUE_SEARCHER);
GetCaster()->CastSpell(GetCaster(), SPELL_PLAGUE_SICKNESS, true);
GetCaster()->CastSpell(GetCaster(), SPELL_UNBOUND_PLAGUE_PROTECTION, true);
professor->CastSpell(GetHitUnit(), SPELL_UNBOUND_PLAGUE_SEARCHER, true);
@@ -1110,14 +1120,14 @@ class spell_putricide_eat_ooze : public SpellScriptLoader
if (Aura* grow = target->GetAura(uint32(GetEffectValue())))
{
- if (grow->GetStackAmount() < 4)
+ if (grow->GetStackAmount() < 3)
{
target->RemoveAurasDueToSpell(SPELL_GROW_STACKER);
target->RemoveAura(grow);
- target->DespawnOrUnsummon();
+ target->DespawnOrUnsummon(1);
}
else
- grow->ModStackAmount(-4);
+ grow->ModStackAmount(-3);
}
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index dca53f1a5e7..29c3276467b 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -242,6 +242,9 @@ class boss_sindragosa : public CreatureScript
{
if (action == ACTION_START_FROSTWYRM)
{
+ if (TempSummon* summon = me->ToTempSummon())
+ summon->SetTempSummonType(TEMPSUMMON_DEAD_DESPAWN);
+
instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, 255);
if (me->isDead())
return;
@@ -968,10 +971,10 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
{
PreventHitDefaultEffect(effIndex);
- if (!GetHitUnit()->isAlive())
+ if (!GetHitUnit()->isAlive() || !_targetCount)
return;
- float resistance = float(GetHitUnit()->GetResistance(GetFirstSchoolInMask(SpellSchoolMask(GetSpellInfo()->SchoolMask))));
+ float resistance = float(GetHitUnit()->GetResistance(SpellSchoolMask(GetSpellInfo()->SchoolMask)));
uint32 minResistFactor = uint32((resistance / (resistance + 510.0f))* 10.0f) * 2;
uint32 randomResist = urand(0, (9 - minResistFactor) * 100)/100 + minResistFactor;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 1688624be91..38f334058b8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -1227,7 +1227,7 @@ class npc_tirion_fordring_tft : public CreatureScript
SetEquipmentSlots(true); // remove glow on ashbringer
}
- void sGossipSelect(Player* player, uint32 sender, uint32 action)
+ void sGossipSelect(Player* /*player*/, uint32 sender, uint32 action)
{
if (me->GetCreatureInfo()->GossipMenuId == sender && !action)
{
@@ -1407,14 +1407,14 @@ class npc_raging_spirit : public CreatureScript
DoCast(me, SPELL_BOSS_HITTIN_YA, true);
}
- void IsSummonedBy(Unit* summoner)
+ void IsSummonedBy(Unit* /*summoner*/)
{
// player is the spellcaster so register summon manually
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING)))
lichKing->AI()->JustSummoned(me);
}
- void JustDied(Unit* killer)
+ void JustDied(Unit* /*killer*/)
{
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING)))
lichKing->AI()->SummonedCreatureDespawn(me);
@@ -1931,7 +1931,7 @@ class npc_spirit_bomb : public CreatureScript
{
}
- void IsSummonedBy(Unit* summoner)
+ void IsSummonedBy(Unit* /*summoner*/)
{
float destX, destY, destZ;
me->GetPosition(destX, destY);
@@ -1954,7 +1954,7 @@ class npc_spirit_bomb : public CreatureScript
{
}
- void UpdateAI(uint32 const diff)
+ void UpdateAI(uint32 const /*diff*/)
{
UpdateVictim();
// no melee attacks
@@ -1983,7 +1983,7 @@ class npc_broken_frostmourne : public CreatureScript
_events.Reset();
}
- void IsSummonedBy(Unit* summoner)
+ void IsSummonedBy(Unit* /*summoner*/)
{
_events.SetPhase(PHASE_OUTRO);
_events.ScheduleEvent(EVENT_OUTRO_KNOCK_BACK, 3000, 0, PHASE_OUTRO);
@@ -2087,7 +2087,6 @@ class spell_the_lich_king_necrotic_plague : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* newCaster = GetTarget();
switch (GetTargetApplication()->GetRemoveMode())
{
case AURA_REMOVE_BY_ENEMY_SPELL:
@@ -2250,7 +2249,7 @@ class spell_the_lich_king_shadow_trap_visual : public SpellScriptLoader
{
PrepareAuraScript(spell_the_lich_king_shadow_trap_visual_AuraScript);
- void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes mode)
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
GetTarget()->CastSpell(GetTarget(), SPELL_SHADOW_TRAP_AURA, TRIGGERED_NONE);
@@ -2633,7 +2632,7 @@ class spell_the_lich_king_cast_back_to_caster : public SpellScriptLoader
{
PrepareSpellScript(spell_the_lich_king_cast_back_to_caster_SpellScript);
- void HandleScript(SpellEffIndex effIndex)
+ void HandleScript(SpellEffIndex /*effIndex*/)
{
GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index 41bed882166..1242e90c2f3 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
@@ -78,6 +78,13 @@ class at_frozen_throne_teleport : public AreaTriggerScript
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/)
{
+ if (player->isInCombat())
+ {
+ if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(FROZEN_THRONE_TELEPORT))
+ Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT);
+ return true;
+ }
+
if (InstanceScript* instance = player->GetInstanceScript())
if (instance->GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE &&
instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE &&
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index 9c3c9156d63..96c061f4c98 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -683,7 +683,7 @@ public:
// Note: summon must be done by trigger and not by KT.
// Otherwise, they attack immediately as KT is in combat.
- for (uint8 i = 0; i <= MAX_ABOMINATIONS; ++i)
+ for (uint8 i = 0; i < MAX_ABOMINATIONS; ++i)
{
if (Creature* sum = trigger->SummonCreature(NPC_ABOMINATION, PosAbominations[i]))
{
@@ -692,7 +692,7 @@ public:
sum->SetReactState(REACT_DEFENSIVE);
}
}
- for (uint8 i = 0; i <= MAX_WASTES; ++i)
+ for (uint8 i = 0; i < MAX_WASTES; ++i)
{
if (Creature* sum = trigger->SummonCreature(NPC_WASTE, PosWastes[i]))
{
@@ -701,7 +701,7 @@ public:
sum->SetReactState(REACT_DEFENSIVE);
}
}
- for (uint8 i = 0; i <= MAX_WEAVERS; ++i)
+ for (uint8 i = 0; i < MAX_WEAVERS; ++i)
{
if (Creature* sum = trigger->SummonCreature(NPC_WEAVER, PosWeavers[i]))
{
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 09fe37d140c..4d4b8e90e7b 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
@@ -86,6 +86,7 @@ public:
return true;
}
+ //TODO: this should be handled in map, maybe add a summon function in map
// There is no other way afaik...
void SpawnGameObject(uint32 entry, Position& pos)
{
@@ -98,7 +99,7 @@ public:
return;
}
- instance->Add(go);
+ instance->AddToMap(go);
}
void OnGameObjectCreate(GameObject* go)
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
index 1c7b538eb02..a8edd40d6b5 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
@@ -238,7 +238,7 @@ public:
for (uint8 n = 0; n < 3; ++n)
time[n] = 0;
me->GetMotionMaster()->Clear();
- me->GetMap()->CreatureRelocation(me, CenterOfRoom.GetPositionX(), CenterOfRoom.GetPositionY(), CenterOfRoom.GetPositionZ(), CenterOfRoom.GetOrientation());
+ me->SetPosition(CenterOfRoom.GetPositionX(), CenterOfRoom.GetPositionY(), CenterOfRoom.GetPositionZ(), CenterOfRoom.GetOrientation());
DoCast(me, SPELL_TELESTRA_BACK);
me->SetVisible(true);
if (Phase == 1)
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp
index 3888cc43bc9..3888cc43bc9 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
index 2e2ca25385c..a8a4fad5e4e 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
@@ -56,8 +56,9 @@ enum AssemblySpells
SPELL_CHAIN_LIGHTNING = 61879,
SPELL_OVERLOAD = 61869,
SPELL_LIGHTNING_WHIRL = 61915,
- SPELL_LIGHTNING_TENDRILS = 61887,
- SPELL_LIGHTNING_TENDRILS_SELF_VISUAL = 61883,
+ SPELL_LIGHTNING_TENDRILS_10M = 61887,
+ SPELL_LIGHTNING_TENDRILS_25M = 63486,
+ SPELL_LIGHTNING_TENDRILS_VISUAL = 61883,
SPELL_STORMSHIELD = 64187,
};
@@ -215,7 +216,6 @@ class boss_steelbreaker : public CreatureScript
{
_Reset();
phase = 0;
- me->ResetLootMode();
me->RemoveAllAuras();
RespawnEncounter(instance, me);
}
@@ -342,7 +342,6 @@ class boss_runemaster_molgeim : public CreatureScript
{
_Reset();
phase = 0;
- me->ResetLootMode();
me->RemoveAllAuras();
RespawnEncounter(instance, me);
}
@@ -575,9 +574,10 @@ class boss_stormcaller_brundir : public CreatureScript
{
_Reset();
phase = 0;
- me->ResetLootMode();
me->RemoveAllAuras();
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_INTERRUPT, false); // Should be interruptable unless overridden by spell (Overload)
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, false); // Reset immumity, Brundir should be stunnable by default
RespawnEncounter(instance, me);
}
@@ -609,6 +609,7 @@ class boss_stormcaller_brundir : public CreatureScript
{
DoCast(me, SPELL_STORMSHIELD);
events.RescheduleEvent(EVENT_LIGHTNING_TENDRILS, urand(50000, 60000));
+ me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); // Apply immumity to stuns
}
break;
@@ -677,10 +678,10 @@ class boss_stormcaller_brundir : public CreatureScript
break;
case EVENT_LIGHTNING_TENDRILS:
DoScriptText(SAY_BRUNDIR_FLIGHT, me);
- DoCast(SPELL_LIGHTNING_TENDRILS);
+ DoCast(RAID_MODE(SPELL_LIGHTNING_TENDRILS_10M, SPELL_LIGHTNING_TENDRILS_25M));
+ DoCast(SPELL_LIGHTNING_TENDRILS_VISUAL);
me->AttackStop();
- me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- DoCast(SPELL_LIGHTNING_TENDRILS_SELF_VISUAL);
+ //me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->GetMotionMaster()->Initialize();
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), FINAL_FLIGHT_Z);
events.DelayEvents(35000);
@@ -707,11 +708,12 @@ class boss_stormcaller_brundir : public CreatureScript
events.ScheduleEvent(EVENT_GROUND, 2500);
break;
case EVENT_GROUND:
- me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- me->RemoveAurasDueToSpell(SPELL_LIGHTNING_TENDRILS);
- me->RemoveAurasDueToSpell(SPELL_LIGHTNING_TENDRILS_SELF_VISUAL);
+ //me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->RemoveAurasDueToSpell(RAID_MODE(SPELL_LIGHTNING_TENDRILS_10M, SPELL_LIGHTNING_TENDRILS_25M));
+ me->RemoveAurasDueToSpell(SPELL_LIGHTNING_TENDRILS_VISUAL);
DoStartMovement(me->getVictim());
events.CancelEvent(EVENT_GROUND);
+ me->getThreatManager().resetAllAggro();
break;
case EVENT_MOVE_POSITION:
if (me->IsWithinMeleeRange(me->getVictim()))
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
index bcc417c50cd..bcc417c50cd 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
index ec336d3402c..ad79d1b56cc 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -757,7 +757,7 @@ class boss_flame_leviathan_safety_container : public CreatureScript
me->GetPosition(x, y, z);
z = me->GetMap()->GetHeight(x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
- me->GetMap()->CreatureRelocation(me, x, y, z, 0);
+ me->SetPosition(x, y, z, 0);
}
void UpdateAI(uint32 const /*diff*/)
@@ -1680,7 +1680,8 @@ class spell_pursue : public SpellScriptLoader
void FilterTargetsSubsequently(std::list<Unit*>& targets)
{
targets.clear();
- targets.push_back(_target);
+ if(_target)
+ targets.push_back(_target);
}
void HandleScript(SpellEffIndex /*eff*/)
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index 86ea898e6ee..e7d8b070e53 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -24,11 +24,6 @@
#include "GridNotifiersImpl.h"
#include "ulduar.h"
-/*
- * **** TODO ****
- * Achievements *
- */
-
enum FreyaYells
{
// Freya
@@ -188,6 +183,7 @@ enum FreyaNpcs
enum FreyaActions
{
ACTION_ELDER_DEATH = 1,
+ ACTION_ELDER_FREYA_KILLED = 2,
};
enum FreyaEvents
@@ -286,7 +282,6 @@ class boss_freya : public CreatureScript
uint32 deforestation[6][2];
uint32 elementalTimer[2];
uint32 diffTimer;
- uint32 waveTime;
uint8 trioWaveCount;
uint8 trioWaveController;
uint8 waveCount;
@@ -295,14 +290,12 @@ class boss_freya : public CreatureScript
bool checkElementalAlive[2];
bool trioDefeated[2];
- bool waveInProgress;
bool random[3];
void Reset()
{
_Reset();
summons.clear();
- waveTime = 0;
trioWaveCount = 0;
trioWaveController = 0;
waveCount = 0;
@@ -319,7 +312,6 @@ class boss_freya : public CreatureScript
checkElementalAlive[n] = true;
trioDefeated[n] = false;
}
- waveInProgress = false;
for (uint8 n = 0; n < 3; ++n)
random[n] = false;
}
@@ -329,35 +321,12 @@ class boss_freya : public CreatureScript
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
}
- void DamageTaken(Unit* /*who*/, uint32& damage)
+ void DamageTaken(Unit* who, uint32& damage)
{
- if (damage >= me->GetHealth() && instance)
+ if (damage >= me->GetHealth())
{
damage = 0;
- DoScriptText(SAY_DEATH, me);
- me->SetReactState(REACT_PASSIVE);
- _JustDied();
- me->RemoveAllAuras();
- me->AttackStop();
- me->setFaction(35);
- me->DeleteThreatList();
- me->CombatStop(true);
- me->DespawnOrUnsummon(7500);
- me->CastSpell(me, SPELL_KNOCK_ON_WOOD_CREDIT, true);
-
- Creature* Elder[3];
- for (uint8 n = 0; n < 3; ++n)
- {
- Elder[n] = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF + n));
- if (Elder[n] && Elder[n]->isAlive())
- {
- Elder[n]->setFaction(35);
- Elder[n]->RemoveAllAuras();
- Elder[n]->AttackStop();
- Elder[n]->CombatStop(true);
- Elder[n]->DeleteThreatList();
- }
- }
+ JustDied(who);
}
}
@@ -466,8 +435,6 @@ class boss_freya : public CreatureScript
events.ScheduleEvent(EVENT_UNSTABLE_ENERGY, urand(15000, 20000));
break;
case EVENT_WAVE:
- waveTime = 0;
- waveInProgress = true;
SpawnWave();
if (waveCount < 6)
events.ScheduleEvent(EVENT_WAVE, WAVE_TIME);
@@ -501,9 +468,6 @@ class boss_freya : public CreatureScript
diffTimer += diff; // For getting time difference for Deforestation achievement
- if (waveInProgress)
- waveTime += diff; // Time from the last wave
-
// Elementals must be killed within 12 seconds of each other, or they will all revive and heal
Creature* Elemental[3][2];
for (uint8 i = 0; i < 2; ++i)
@@ -547,7 +511,6 @@ class boss_freya : public CreatureScript
trioDefeated[i] = true;
Elemental[n][i]->CastSpell(me, SPELL_REMOVE_10STACK, true);
}
- TimeCheck();
}
}
}
@@ -637,9 +600,32 @@ class boss_freya : public CreatureScript
/* 25N */ {62952, 62954, 62956, 62958}
};
- who->CastSpell((Unit*)NULL, summonSpell[me->GetMap()->GetDifficulty()][elderCount], true);
+ me->CastSpell((Unit*)NULL, summonSpell[me->GetMap()->GetDifficulty()][elderCount], true);
+ DoScriptText(SAY_DEATH, me);
+ me->SetReactState(REACT_PASSIVE);
_JustDied();
+ me->RemoveAllAuras();
+ me->AttackStop();
+ me->setFaction(35);
+ me->DeleteThreatList();
+ me->CombatStop(true);
+ me->DespawnOrUnsummon(7500);
+ me->CastSpell(me, SPELL_KNOCK_ON_WOOD_CREDIT, true);
+
+ Creature* Elder[3];
+ for (uint8 n = 0; n < 3; ++n)
+ {
+ Elder[n] = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF + n));
+ if (Elder[n] && Elder[n]->isAlive())
+ {
+ Elder[n]->RemoveAllAuras();
+ Elder[n]->AttackStop();
+ Elder[n]->CombatStop(true);
+ Elder[n]->DeleteThreatList();
+ Elder[n]->GetAI()->DoAction(ACTION_ELDER_FREYA_KILLED);
+ }
+ }
}
void JustSummoned(Creature* summoned)
@@ -657,6 +643,7 @@ class boss_freya : public CreatureScript
break;
case NPC_DETONATING_LASHER:
case NPC_ANCIENT_CONSERVATOR:
+ default:
summons.push_back(summoned->GetGUID());
break;
}
@@ -679,29 +666,14 @@ class boss_freya : public CreatureScript
summoned->CastSpell(who, SPELL_DETONATE, true);
summoned->ForcedDespawn(5000);
summons.remove(summoned->GetGUID());
- TimeCheck();
break;
case NPC_ANCIENT_CONSERVATOR:
summoned->CastSpell(me, SPELL_REMOVE_25STACK, true);
summoned->ForcedDespawn(5000);
summons.remove(summoned->GetGUID());
- TimeCheck();
break;
}
}
-
- void TimeCheck()
- {
- if (waveCount >= 6)
- return;
-
- waveInProgress = false;
- uint32 timeDifference = WAVE_TIME - waveTime;
- if (timeDifference <= TIME_DIFFERENCE)
- events.RescheduleEvent(EVENT_WAVE, timeDifference);
- else
- events.RescheduleEvent(EVENT_WAVE, TIME_DIFFERENCE);
- }
};
CreatureAI* GetAI(Creature* creature) const
@@ -811,6 +783,10 @@ class boss_elder_brightleaf : public CreatureScript
++elderCount;
lumberjack = true;
break;
+ case ACTION_ELDER_FREYA_KILLED:
+ me->DespawnOrUnsummon(10000);
+ _JustDied();
+ break;
}
}
@@ -933,6 +909,10 @@ class boss_elder_stonebark : public CreatureScript
++elderCount;
lumberjack = true;
break;
+ case ACTION_ELDER_FREYA_KILLED:
+ me->DespawnOrUnsummon(10000);
+ _JustDied();
+ break;
}
}
@@ -1042,6 +1022,10 @@ class boss_elder_ironbranch : public CreatureScript
++elderCount;
lumberjack = true;
break;
+ case ACTION_ELDER_FREYA_KILLED:
+ me->DespawnOrUnsummon(10000);
+ _JustDied();
+ break;
}
}
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 7d00c0e59fc..7d00c0e59fc 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index bb21da94bc5..bb21da94bc5 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index b8876ae577a..b8876ae577a 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index 5da1c485986..5da1c485986 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 11b7c54975e..11b7c54975e 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index 0e3a8926203..0e3a8926203 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
index f993c419b8c..f993c419b8c 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index ae803b24642..ae803b24642 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
index e4b21e1f66e..e4b21e1f66e 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index 3c5697a7995..3c5697a7995 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
index f11212d535e..f11212d535e 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
index 05b1e395d1e..05b1e395d1e 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar_teleporter.cpp
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index 55211f3f047..dc2d34326a7 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -130,7 +130,7 @@ public:
me->SetHealth(0);
me->InterruptNonMeleeSpells(true);
me->RemoveAllAuras();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->GetMotionMaster()->MovementExpired(false);
me->GetMotionMaster()->MoveIdle();
me->SetStandState(UNIT_STAND_STATE_DEAD);
@@ -152,7 +152,7 @@ public:
{
bIsUndead = true;
bEventInProgress = false;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->UpdateEntry(MOB_INGVAR_UNDEAD);
me->SetInCombatWith(me->getVictim());
me->GetMotionMaster()->MoveChase(me->getVictim());
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index 1b70de6244e..45534824860 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -48,7 +48,7 @@ enum Yells
};
enum Creatures
{
- CREATURE_ARTHAS = 24266, // Image of Arthas
+ CREATURE_ARTHAS = 29280, // Image of Arthas
CREATURE_SVALA_SORROWGRAVE = 26668, // Svala after transformation
CREATURE_SVALA = 29281, // Svala before transformation
CREATURE_RITUAL_CHANNELER = 27281
@@ -136,7 +136,6 @@ public:
if (Creature* pArthas = me->SummonCreature(CREATURE_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
{
pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- pArthas->SetFloatValue(OBJECT_FIELD_SCALE_X, 5);
uiArthasGUID = pArthas->GetGUID();
}
}
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
index 41d43a08f5d..41e80b1b777 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
@@ -260,7 +260,7 @@ class mob_frozen_orb_stalker : public CreatureScript
{
Position pos;
me->GetNearPoint(toravon, pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0.0f, 10.0f, 0.0f);
- me->SetPosition(pos, true);
+ me->SetPosition(pos);
DoCast(me, SPELL_FROZEN_ORB_SUMMON);
}
}
diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp
index be9e9308f4f..8ff5a314dcc 100644
--- a/src/server/scripts/Northrend/dalaran.cpp
+++ b/src/server/scripts/Northrend/dalaran.cpp
@@ -70,8 +70,9 @@ public:
return;
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
-
- if (!player || player->isGameMaster() || player->IsBeingTeleported())
+
+ // If player has Disguise aura for quest A Meeting With The Magister or An Audience With The Arcanist, do not teleport it away but let it pass
+ if (!player || player->isGameMaster() || player->IsBeingTeleported() || player->HasAura(70973) || player->HasAura(70971))
return;
switch (me->GetEntry())
diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp
index 5dab265617e..aa3b696f5fd 100644
--- a/src/server/scripts/Northrend/zuldrak.cpp
+++ b/src/server/scripts/Northrend/zuldrak.cpp
@@ -1219,9 +1219,9 @@ public:
{
if (uiMissleTimer <= uiDiff)
{
- DoCast(me, uiSpell); // this spell is not supported ... YET!
+ if (uiSpell) // Sometimes it is 0, why?
+ DoCast(me, uiSpell); // this spell (what spell) is not supported ... YET!
uiMissleTimer = urand(2000, 7000);
-
} else uiMissleTimer -= uiDiff;
}
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
index c081f0970f2..9b0a4a469ae 100755
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp
@@ -384,7 +384,7 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameO
int32 count = 10;
uint32 itemid = 24538;
// bomb id count
- uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemid, count, &noSpaceForCount);
+ InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemid, count, &noSpaceForCount);
if (msg != EQUIP_ERR_OK) // convert to possible store amount
count -= noSpaceForCount;
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
index 7727f761588..23477741ba1 100755
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
@@ -170,7 +170,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
else
{
go->SetRespawnTime(0);
- map->Add(go);
+ map->AddToMap(go);
}
}
}
@@ -199,7 +199,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
else
{
go->SetRespawnTime(0);
- map->Add(go);
+ map->AddToMap(go);
}
}
}
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index 7b0c8fc017e..a9f84016a04 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -193,7 +193,7 @@ public:
void MoveInLineOfSight(Unit* who)
{
- if (!HasTaunted && me->IsWithinDistInMap(who, 150.0))
+ if (!HasTaunted && me->IsWithinDistInMap(who, 150.0f))
{
DoScriptText(SAY_INTRO, me);
HasTaunted = true;
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 9b985d6d93e..6d3a5f181d4 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -291,7 +291,7 @@ public:
if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH))
i_pl->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
- me->GetMap()->CreatureRelocation(me, VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
+ me->SetPosition(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
DoCast(me, SPELL_DRAW_SHADOWS, true);
DoCast(me, SPELL_RAIN_OF_FIRE);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 60845ae6365..a690f3cbd9b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -66,69 +66,71 @@ const char* SAY_KILL2 = "This is too easy!";
#define SAY_ENRAGE "You've wasted too much time mortals, now you shall fall!"
#define SOUND_ENRAGE 11474
-/************** Spells *************/
+enum Spells
// Normal Form
-#define SPELL_SHEAR 37335 // 41032 is bugged, cannot be block/dodge/parry// Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5f second cast
-#define SPELL_FLAME_CRASH 40832 // Summons an invis/unselect passive mob that has an aura of flame in a circle around him.
-#define SPELL_DRAW_SOUL 40904 // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect)
-#define SPELL_PARASITIC_SHADOWFIEND 41917 // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off)
-#define SPELL_PARASITIC_SHADOWFIEND2 41914 // Used by Parasitic
-#define SPELL_SUMMON_PARASITICS 41915 // Summons 2 Parasitic Shadowfiends on the target. It's supposed to be cast as soon as the Parasitic Shadowfiend debuff is gone, but the spells aren't linked :(
-#define SPELL_AGONIZING_FLAMES 40932 // 4k fire damage initial to target and anyone w/i 5 yards. PHASE 3 ONLY
-#define SPELL_ENRAGE 40683 // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY
+{
+ SPELL_SHEAR = 37335, // 41032 is bugged, cannot be block/dodge/parry// Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5f second cast
+ SPELL_FLAME_CRASH = 40832,
+ SPELL_DRAW_SOUL = 40904,
+ SPELL_PARASITIC_SHADOWFIEND = 41917,
+ SPELL_PARASITIC_SHADOWFIEND2 = 41914,
+ SPELL_SUMMON_PARASITICS = 41915,
+ SPELL_AGONIZING_FLAMES = 40932,
+ SPELL_ENRAGE = 40683,
// Flying (Phase 2)
-#define SPELL_THROW_GLAIVE 39635 // Throws a glaive on the ground
-#define SPELL_THROW_GLAIVE2 39849 // Animation for the above spell
-#define SPELL_GLAIVE_RETURNS 39873 // Glaive flies back to Illidan
-#define SPELL_FIREBALL 40598 // 2.5fk-3.5fk damage in 10 yard radius. 2 second cast time.
-#define SPELL_DARK_BARRAGE 40585 // 10 second channeled spell, 3k shadow damage per second.
+ SPELL_THROW_GLAIVE = 39635,
+ SPELL_THROW_GLAIVE2 = 39849, // Animation for the spell above
+ SPELL_GLAIVE_RETURNS = 39873,
+ SPELL_FIREBALL = 40598,
+ SPELL_DARK_BARRAGE = 40585,
// Demon Form
-#define SPELL_DEMON_TRANSFORM_1 40511 // First phase of animations for transforming into Dark Illidan (fall to ground)
-#define SPELL_DEMON_TRANSFORM_2 40398 // Second phase of animations (kneel)
-#define SPELL_DEMON_TRANSFORM_3 40510 // Final phase of animations (stand up and roar)
-#define SPELL_DEMON_FORM 40506 // Transforms into Demon Illidan. Has an Aura of Dread on him.
-#define SPELL_SHADOW_BLAST 41078 // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target.
-#define SPELL_FLAME_BURST 41126 // Hurls fire at entire raid for ~3.5fk damage every 10 seconds. Resistable. (Does not work: Script effect)
-#define SPELL_FLAME_BURST_EFFECT 41131 // The actual damage. Have each player cast it on itself (workaround)
+ SPELL_DEMON_TRANSFORM_1 = 40511,
+ SPELL_DEMON_TRANSFORM_2 = 40398,
+ SPELL_DEMON_TRANSFORM_3 = 40510,
+ SPELL_DEMON_FORM = 40506,
+ SPELL_SHADOW_BLAST = 41078,
+ SPELL_FLAME_BURST = 41126,
+ SPELL_FLAME_BURST_EFFECT = 41131, // The actual damage. Have each player cast it on itself (workaround)
// Other Illidan spells
-#define SPELL_KNEEL 39656 // Before beginning encounter, this is how he appears (talking to skully).
-#define SPELL_SHADOW_PRISON 40647 // Illidan casts this spell to immobilize entire raid when he summons Maiev.
-#define SPELL_DEATH 41220 // This spell doesn't do anything except stun Illidan and set him on his knees.
-#define SPELL_BERSERK 45078 // Damage increased by 500%, attack speed by 150%
-#define SPELL_DUAL_WIELD 42459
-//Phase Normal spells
-#define SPELL_FLAME_CRASH_EFFECT 40836 // Firey blue ring of circle that the other flame crash summons
-#define SPELL_SUMMON_SHADOWDEMON 41117 // Summon four shadowfiends
-#define SPELL_SHADOWFIEND_PASSIVE 41913 // Passive aura for shadowfiends
-#define SPELL_SHADOW_DEMON_PASSIVE 41079 // Adds the "shadowform" aura to Shadow Demons.
-#define SPELL_CONSUME_SOUL 41080 // Once the Shadow Demons reach their target, they use this to kill them
-#define SPELL_PARALYZE 41083 // Shadow Demons cast this on their target
-#define SPELL_PURPLE_BEAM 39123 // Purple Beam connecting Shadow Demon to their target
-//Phase Flight spells
-#define SPELL_AZZINOTH_CHANNEL 39857 // Glaives cast it on Flames. Not sure if this is the right spell.
-#define SPELL_EYE_BLAST_TRIGGER 40017 // This summons Demon Form every few seconds and deals ~20k damage in its radius
-#define SPELL_EYE_BLAST 39908 // This does the blue flamey animation.
-#define SPELL_BLAZE_EFFECT 40610 // Green flame on the ground, triggers damage (5k) every few seconds
-#define SPELL_BLAZE_SUMMON 40637 // Summons the Blaze creature
-#define SPELL_DEMON_FIRE 40029 // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it.
-#define SPELL_FLAME_BLAST 40631 // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage.
-#define SPELL_CHARGE 41581 //40602 // Flames of Azzinoth charges whoever is too far from them. They enrage after this. For simplicity, we'll use the same enrage as Illidan.
-#define SPELL_FLAME_ENRAGE 45078
-//Akama spells
-#define SPELL_AKAMA_DOOR_CHANNEL 41268 // Akama's channel spell on the door before the Temple Summit
-#define SPELL_DEATHSWORN_DOOR_CHANNEL 41269 // Olum and Udalo's channel spell on the door before the Temple Summit
-#define SPELL_AKAMA_DOOR_FAIL 41271 // Not sure where this is really used...
-#define SPELL_HEALING_POTION 40535 // Akama uses this to heal himself to full.
-#define SPELL_CHAIN_LIGHTNING 40536 // 6938 to 8062 for 5 targets
-//Maiev spells
-#define SPELL_CAGE_TRAP_DUMMY 40761 // Put this in DB for cage trap GO.
-#define SPELL_CAGED 40695 // Caged Trap triggers will cast this on Illidan if he is within 3 yards
-#define SPELL_CAGE_TRAP_SUMMON 40694 // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working)
-#define SPELL_CAGE_TRAP_BEAM 40713 // 8 Triggers on the ground in an octagon cast spells like this on Illidan 'caging him'
-#define SPELL_TELEPORT_VISUAL 41232 // Teleport visual for Maiev
-#define SPELL_SHADOW_STRIKE 40685 // 4375 to 5625 every 3 seconds for 12 seconds
-#define SPELL_THROW_DAGGER 41152 // 5400 to 6600 damage, need dagger
-#define SPELL_FAN_BLADES 39954 // bugged visual
+ SPELL_KNEEL = 39656, // Before beginning encounter, this is how he appears (talking to skully).
+ SPELL_SHADOW_PRISON = 40647,
+ SPELL_DEATH = 41220,
+ SPELL_BERSERK = 45078,
+ SPELL_DUAL_WIELD = 42459,
+// Phase Normal spells
+ SPELL_FLAME_CRASH_EFFECT = 40836,
+ SPELL_SUMMON_SHADOWDEMON = 41117,
+ SPELL_SHADOWFIEND_PASSIVE = 41913,
+ SPELL_SHADOW_DEMON_PASSIVE = 41079,
+ SPELL_CONSUME_SOUL = 41080,
+ SPELL_PARALYZE = 41083,
+ SPELL_PURPLE_BEAM = 39123,
+// Phase Flight spells
+ SPELL_AZZINOTH_CHANNEL = 39857, // Glaives cast it on Flames. Not sure if this is the right spell.
+ SPELL_EYE_BLAST_TRIGGER = 40017,
+ SPELL_EYE_BLAST = 39908,
+ SPELL_BLAZE_EFFECT = 40610,
+ SPELL_BLAZE_SUMMON = 40637,
+ SPELL_DEMON_FIRE = 40029,
+ SPELL_FLAME_BLAST = 40631,
+ SPELL_CHARGE = 41581,
+ SPELL_FLAME_ENRAGE = 45078,
+// Akama spells
+ SPELL_AKAMA_DOOR_CHANNEL = 41268,
+ SPELL_DEATHSWORN_DOOR_CHANNEL = 41269,
+ SPELL_AKAMA_DOOR_FAIL = 41271, // Not sure where this is really used...
+ SPELL_HEALING_POTION = 40535,
+ SPELL_CHAIN_LIGHTNING = 40536,
+// Maiev spells
+ SPELL_CAGE_TRAP_DUMMY = 40761, // Put this in DB for cage trap GO.
+ SPELL_CAGED = 40695,
+ SPELL_CAGE_TRAP_SUMMON = 40694, // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working)
+ SPELL_CAGE_TRAP_BEAM = 40713,
+ SPELL_TELEPORT_VISUAL = 41232,
+ SPELL_SHADOW_STRIKE = 40685,
+ SPELL_THROW_DAGGER = 41152,
+ SPELL_FAN_BLADES = 39954, // bugged visual
+};
// Other defines
#define CENTER_X 676.740f
@@ -174,7 +176,7 @@ enum PhaseIllidan
PHASE_FLIGHT_SEQUENCE = 7,
PHASE_TRANSFORM_SEQUENCE = 8,
PHASE_ILLIDAN_MAX = 9,
-};//Maiev uses the same phase
+}; // Maiev uses the same phase
enum PhaseAkama
{
@@ -191,7 +193,7 @@ enum EventIllidan
{
EVENT_NULL = 0,
EVENT_BERSERK = 1,
- //normal phase
+ // normal phase
EVENT_TAUNT = 2,
EVENT_SHEAR = 3,
EVENT_FLAME_CRASH = 4,
@@ -201,17 +203,17 @@ enum EventIllidan
EVENT_AGONIZING_FLAMES = 8,
EVENT_TRANSFORM_NORMAL = 9,
EVENT_ENRAGE = 10,
- //flight phase
+ // flight phase
EVENT_FIREBALL = 2,
EVENT_DARK_BARRAGE = 3,
EVENT_EYE_BLAST = 4,
EVENT_MOVE_POINT = 5,
- //demon phase
+ // demon phase
EVENT_SHADOW_BLAST = 2,
EVENT_FLAME_BURST = 3,
EVENT_SHADOWDEMON = 4,
EVENT_TRANSFORM_DEMON = 5,
- //sequence phase
+ // sequence phase
EVENT_TALK_SEQUENCE = 2,
EVENT_FLIGHT_SEQUENCE = 2,
EVENT_TRANSFORM_SEQUENCE = 2,
@@ -249,6 +251,7 @@ struct Yells
};
static const Yells Conversation[22] =
+
{
{11463, "Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.", ILLIDAN_STORMRAGE, 8000, 0, true},
{0, "", ILLIDAN_STORMRAGE, 5000, 396, true},
@@ -259,19 +262,20 @@ static const Yells Conversation[22] =
{0, "", AKAMA, 2000, 15, true},
{11466, "You are not prepared!", ILLIDAN_STORMRAGE, 3000, 406, true},
{0, "", EMPTY, 1000, 0, true},
- {0, "", EMPTY, 0, 0, false}, //9
+ {0, "", EMPTY, 0, 0, false}, // 9
{11476, "Is this it, mortals? Is this all the fury you can muster?", ILLIDAN_STORMRAGE, 8000, 0, true},
{11491, "Their fury pales before mine, Illidan. We have some unsettled business between us.", MAIEV_SHADOWSONG, 8000, 5, true},
{11477, "Maiev... How is this even possible?", ILLIDAN_STORMRAGE, 5000, 1, true},
{11492, "Ah... my long hunt is finally over. Today, Justice will be done!", MAIEV_SHADOWSONG, 8000, 15, true},
- {11470, "Feel the hatred of ten thousand years!", ILLIDAN_STORMRAGE, 1000, 0, false}, //14
- {11496, "Ahh... It is finished. You are beaten.", MAIEV_SHADOWSONG, 6000, 0, true}, //15
+ {11470, "Feel the hatred of ten thousand years!", ILLIDAN_STORMRAGE, 1000, 0, false}, // 14
+ {11496, "Ahh... It is finished. You are beaten.", MAIEV_SHADOWSONG, 6000, 0, true}, // 15
+
{11478, "You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..", ILLIDAN_STORMRAGE, 30000, 65, true}, // Emote dead for now. Kill him later
{11497, "He is right. I feel nothing... I am nothing... Farewell, champions.", MAIEV_SHADOWSONG, 9000, 0, true},
{11498, "", MAIEV_SHADOWSONG, 5000, 0, true},
- {11498, "", EMPTY, 1000, 0, true}, //19 Maiev disappear
+ {11498, "", EMPTY, 1000, 0, true}, // 19 Maiev disappear
{11387, "The Light will fill these dismal halls once again. I swear it.", AKAMA, 8000, 0, true},
- {0, "", EMPTY, 1000, 0, false}//21
+ {0, "", EMPTY, 1000, 0, false} // 21
};
static const Yells RandomTaunts[4]=
@@ -306,14 +310,14 @@ static const Locations HoverPosition[4]=
static const Locations GlaivePosition[4]=
{
{695.105f, 305.303f, 354.256f},
- {659.338f, 305.303f, 354.256f}, //the distance between two glaives is 36
+ {659.338f, 305.303f, 354.256f}, // the distance between two glaives is 36
{700.105f, 305.303f, 354.256f},
{664.338f, 305.303f, 354.256f}
};
static const Locations EyeBlast[2]=
{
- {677.0f, 350.0f, 354.0f}, //start point, pass through glaive point
+ {677.0f, 350.0f, 354.0f}, // start point, pass through glaive point
{677.0f, 260.0f, 354.0f}
};
@@ -350,7 +354,7 @@ static const Animation DemonTransformation[10]=
{
{SPELL_DEMON_TRANSFORM_1, 0, 1000, 0, 0, 6, true},
{SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, true},
- {0, 0, 3000, 1073741824, 21322, 6, false}, //stunned, cannot cast demon form
+ {0, 0, 3000, 1073741824, 21322, 6, false}, // stunned, cannot cast demon form
{SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, false},
{SPELL_DEMON_FORM, SPELL_DEMON_TRANSFORM_3, 0, 0, 0, 4, false},
{SPELL_DEMON_TRANSFORM_1, 0, 1000, 0, 0, 6, false},
@@ -435,10 +439,10 @@ public:
if (FlameBlastTimer <= diff)
{
- DoCast(me->getVictim(), SPELL_BLAZE_SUMMON, true); //appear at victim
+ DoCast(me->getVictim(), SPELL_BLAZE_SUMMON, true); // appear at victim
DoCast(me->getVictim(), SPELL_FLAME_BLAST);
- FlameBlastTimer = 15000; //10000 is official-like?
- DoZoneInCombat(); //in case someone is revived
+ FlameBlastTimer = 15000; // 10000 is official-like?
+ DoZoneInCombat(); // in case someone is revived
} else FlameBlastTimer -= diff;
if (CheckTimer <= diff)
@@ -515,7 +519,7 @@ public:
void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/)
{
- if (FlightCount == 7) //change hover point
+ if (FlightCount == 7) // change hover point
{
if (me->getVictim())
{
@@ -678,7 +682,7 @@ public:
me->AttackStop();
break;
case PHASE_FLIGHT_SEQUENCE:
- if (Phase == PHASE_NORMAL) //lift off
+ if (Phase == PHASE_NORMAL) // lift off
{
FlightCount = 1;
Timer[EVENT_FLIGHT_SEQUENCE] = 1;
@@ -688,7 +692,7 @@ public:
me->GetMotionMaster()->Clear(false);
me->AttackStop();
}
- else //land
+ else // land
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break;
case PHASE_TRANSFORM_SEQUENCE:
@@ -749,7 +753,7 @@ public:
Trigger->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
Trigger->GetMotionMaster()->MovePoint(0, final.x, final.y, final.z);
- //Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ // Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetTarget(Trigger->GetGUID());
DoCast(Trigger, SPELL_EYE_BLAST);
}
@@ -792,7 +796,7 @@ public:
{
switch (FlightCount)
{
- case 1://lift off
+ case 1: // lift off
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
me->StopMoving();
@@ -800,11 +804,11 @@ public:
DoPlaySoundToSet(me, SOUND_TAKEOFF);
Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
break;
- case 2://move to center
- me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); //+5, for SPELL_THROW_GLAIVE bug
+ case 2: // move to center
+ me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); // +5, for SPELL_THROW_GLAIVE bug
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
- case 3://throw one glaive
+ case 3: // throw one glaive
{
uint8 i=1;
Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
@@ -819,7 +823,7 @@ public:
}
Timer[EVENT_FLIGHT_SEQUENCE] = 700;
break;
- case 4://throw another
+ case 4: // throw another
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
{
uint8 i=0;
@@ -835,19 +839,19 @@ public:
}
Timer[EVENT_FLIGHT_SEQUENCE] = 5000;
break;
- case 5://summon flames
+ case 5: // summon flames
SummonFlamesOfAzzinoth();
Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
break;
- case 6://fly to hover point
+ case 6: // fly to hover point
me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z);
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
- case 7://return to center
+ case 7: // return to center
me->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z);
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
- case 8://glaive return
+ case 8: // glaive return
for (uint8 i = 0; i < 2; ++i)
{
if (GlaiveGUID[i])
@@ -862,7 +866,7 @@ public:
}
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break;
- case 9://land
+ case 9: // land
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->StopMoving();
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
@@ -880,7 +884,7 @@ public:
}
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break;
- case 10://attack
+ case 10: // attack
DoResetThreat();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
@@ -1001,12 +1005,12 @@ public:
{
switch (Event)
{
- //PHASE_NORMAL
+ // PHASE_NORMAL
case EVENT_BERSERK:
me->MonsterYell(SAY_ENRAGE, LANG_UNIVERSAL, 0);
DoPlaySoundToSet(me, SOUND_ENRAGE);
DoCast(me, SPELL_BERSERK, true);
- Timer[EVENT_BERSERK] = 5000;//The buff actually lasts forever.
+ Timer[EVENT_BERSERK] = 5000; // The buff actually lasts forever.
break;
case EVENT_TAUNT:
@@ -1023,7 +1027,7 @@ public:
case EVENT_SHEAR:
// no longer exists in 3.0f.2
- //DoCast(me->getVictim(), SPELL_SHEAR);
+ // DoCast(me->getVictim(), SPELL_SHEAR);
Timer[EVENT_SHEAR] = 25000 + (rand()%16 * 1000);
break;
@@ -1049,7 +1053,7 @@ public:
Timer[EVENT_DRAW_SOUL] = 50000 + rand()%10000;
break;
- //PHASE_NORMAL_2
+ // PHASE_NORMAL_2
case EVENT_AGONIZING_FLAMES:
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES);
Timer[EVENT_AGONIZING_FLAMES] = 0;
@@ -1059,7 +1063,7 @@ public:
EnterPhase(PHASE_TRANSFORM_SEQUENCE);
break;
- //PHASE_NORMAL_MAIEV
+ // PHASE_NORMAL_MAIEV
case EVENT_ENRAGE:
DoCast(me, SPELL_ENRAGE);
Timer[EVENT_ENRAGE] = 0;
@@ -1092,7 +1096,7 @@ public:
case EVENT_MOVE_POINT:
Phase = PHASE_FLIGHT_SEQUENCE;
- Timer[EVENT_FLIGHT_SEQUENCE] = 0;//do not start Event when changing hover point
+ Timer[EVENT_FLIGHT_SEQUENCE] = 0; // do not start Event when changing hover point
HoverPoint += (rand()%3 + 1);
if (HoverPoint > 3)
HoverPoint -= 4;
@@ -1204,7 +1208,7 @@ public:
{
GETUNIT(Illidan, IllidanGUID);
if (Illidan && me->IsWithinDistInMap(Illidan, 25))
- BlinkToPlayer();//Do not let dread aura hurt her.
+ BlinkToPlayer();// Do not let dread aura hurt her.
AttackStartNoMove(who);
}
else
@@ -1217,7 +1221,7 @@ public:
EnterPhase(PhaseIllidan(param));
}
- void EnterPhase(PhaseIllidan NextPhase)//This is in fact Illidan's phase.
+ void EnterPhase(PhaseIllidan NextPhase) // This is in fact Illidan's phase.
{
switch (NextPhase)
{
@@ -1350,7 +1354,7 @@ public:
if (GETCRE(Illidan, IllidanGUID))
CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(me->GetGUID());
me->AttackStop();
- Timer[EVENT_MAIEV_STEALTH] = 60000; //reappear after 1 minute
+ Timer[EVENT_MAIEV_STEALTH] = 60000; // reappear after 1 minute
MaxTimer = 1;
}
@@ -1403,17 +1407,18 @@ public:
DoorGUID[0] = instance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_R);
DoorGUID[1] = instance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_L);
- if (JustCreated)//close all doors at create
+ if (JustCreated) // close all doors at create
{
instance->HandleGameObject(GateGUID, false);
for (uint8 i = 0; i < 2; ++i)
instance->HandleGameObject(DoorGUID[i], false);
- //JustCreated = false;
- }else
- {//open all doors, raid wiped
+ }
+ else // open all doors, raid wiped
+ {
instance->HandleGameObject(GateGUID, true);
- WalkCount = 1;//skip first wp
+ WalkCount = 1; // skip first wp
+
for (uint8 i = 0; i < 2; ++i)
instance->HandleGameObject(DoorGUID[i], true);
}
@@ -1513,7 +1518,7 @@ public:
if (GETGO(Gate, GateGUID))
Gate->GetPosition(x, y, z);
else
- return;//if door not spawned, don't crash server
+ return; // if door not spawned, don't crash server
if (Creature* Channel = me->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
{
@@ -1581,11 +1586,11 @@ public:
me->AddThreat(Illidan, 10000000.0f);
me->GetMotionMaster()->MoveChase(Illidan);
}
- Timer = 30000; //chain lightning
+ Timer = 30000; // chain lightning
break;
case PHASE_FIGHT_MINIONS:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- Timer = 10000 + rand()%6000;//summon minion
+ Timer = 10000 + rand()%6000; // summon minion
break;
case PHASE_RETURN:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -1655,7 +1660,7 @@ public:
Spirit[1]->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL, false);
Timer = 5000;
break;
- case 3: //open the gate
+ case 3: // open the gate
me->InterruptNonMeleeSpells(true);
Spirit[0]->InterruptNonMeleeSpells(true);
Spirit[1]->InterruptNonMeleeSpells(true);
@@ -1767,7 +1772,7 @@ public:
float x, y, z;
me->GetPosition(x, y, z);
Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
- //Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
+ // Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
if (Elite)
{
Elite->AI()->AttackStart(me);
@@ -1967,7 +1972,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence()
Summons.DespawnAll();
break;
case 17:
- if (GETUNIT(Akama, AkamaGUID))
+ if (GETCRE(Akama, AkamaGUID))
{
if (!me->IsWithinDistInMap(Akama, 15))
{
@@ -1975,10 +1980,11 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence()
me->GetPosition(x, y, z);
x += 10; y += 10;
Akama->GetMotionMaster()->Clear(false);
- //Akama->GetMotionMaster()->MoveIdle();
- Akama->GetMap()->CreatureRelocation(me, x, y, z, 0.0f);
- Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0);//Illidan must not die until Akama arrives.
+ // Akama->GetMotionMaster()->MoveIdle();
+ Akama->SetPosition(x, y, z, 0.0f);
+ Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0); // Illidan must not die until Akama arrives.
Akama->GetMotionMaster()->MoveChase(me);
+
}
}
break;
@@ -2051,7 +2057,8 @@ public:
DespawnTimer = 5000;
if (who->HasAura(SPELL_ENRAGE))
who->RemoveAurasDueToSpell(SPELL_ENRAGE); // Dispel his enrage
- //if (GameObject* CageTrap = instance->instance->GetGameObject(instance->GetData64(CageTrapGUID)))
+ // if (GameObject* CageTrap = instance->instance->GetGameObject(instance->GetData64(CageTrapGUID)))
+
// CageTrap->SetLootState(GO_JUST_DEACTIVATED);
}
}
@@ -2067,13 +2074,13 @@ public:
else DespawnTimer -= diff;
}
- //if (IllidanGUID && !SummonedBeams)
- //{
+ // if (IllidanGUID && !SummonedBeams)
+ // {
// if (Unit* Illidan = Unit::GetUnit(*me, IllidanGUID)
// {
- // //TODO: Find proper spells and properly apply 'caged' Illidan effect
+ // // TODO: Find proper spells and properly apply 'caged' Illidan effect
// }
- //}
+ // }
}
};
@@ -2166,7 +2173,7 @@ public:
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
{
if (spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE)
- me->SetDisplayId(21431);//appear when hit by Illidan's glaive
+ me->SetDisplayId(21431);// appear when hit by Illidan's glaive
}
};
@@ -2214,9 +2221,9 @@ public:
if (!me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND)
&& !me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2))
{
- if (Creature* illidan = Unit::GetCreature((*me), IllidanGUID))//summon only in 1. phase
+ if (Creature* illidan = Unit::GetCreature((*me), IllidanGUID))// summon only in 1. phase
if (CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, illidan->AI())->Phase == PHASE_NORMAL)
- me->CastSpell(me->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); //do not stack
+ me->CastSpell(me->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); // do not stack
}
me->AttackerStateUpdate(me->getVictim());
me->resetAttackTimer();
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 ce1f8739493..58585d0028e 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -641,7 +641,7 @@ public:
void EnterCombat(Unit* /*who*/) {}
- void BeginEvent(Player* pl)
+ void BeginEvent(Player* player)
{
if (!instance)
return;
@@ -662,7 +662,7 @@ public:
me->CombatStart(Shade);
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
Shade->SetTarget(me->GetGUID());
- if (pl) Shade->AddThreat(pl, 1.0f);
+ if (player) Shade->AddThreat(player, 1.0f);
DoZoneInCombat(Shade);
EventBegun = true;
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index 19280bd71f5..dcbc2832f27 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -291,7 +291,7 @@ class boss_alar : public CreatureScript
if (me->IsWithinDist3d(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 5.0f))
dist = 5.0f;
WaitTimer = 1000 + uint32(floor(dist / 80 * 1000.0f));
- me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f);
+ me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f);
me->StopMoving();
WaitEvent = WE_LAND;
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index f079f68d943..6fac13aa8ad 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -278,7 +278,7 @@ class boss_high_astromancer_solarian : public CreatureScript
Phase1_Timer = 50000;
//After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind.
me->GetMotionMaster()->Clear();
- me->GetMap()->CreatureRelocation(me, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
+ me->SetPosition(CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
for (uint8 i=0; i <= 2; ++i)
{
if (!i)
@@ -346,7 +346,7 @@ class boss_high_astromancer_solarian : public CreatureScript
//15 seconds later Solarian reappears out of one of the 3 portals. Simultaneously, 2 healers appear in the two other portals.
int i = rand()%3;
me->GetMotionMaster()->Clear();
- me->GetMap()->CreatureRelocation(me, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O);
+ me->SetPosition(Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O);
for (int j=0; j <= 2; j++)
if (j != i)
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 52a23196ee0..d987601c5bd 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -819,7 +819,7 @@ class boss_kaelthas : public CreatureScript
me->StopMoving();
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
- me->GetMap()->CreatureRelocation(me, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
+ me->SetPosition(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, 0, 0);
me->InterruptNonMeleeSpells(false);
@@ -886,7 +886,7 @@ class boss_kaelthas : public CreatureScript
me->StopMoving();
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
- me->GetMap()->CreatureRelocation(me, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
+ me->SetPosition(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MOVEMENTFLAG_NONE, 0);
// 1) Kael'thas will portal the whole raid right into his body
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index b639050320c..c556253ecf1 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -19,330 +19,20 @@
/* ScriptData
SDName: Nagrand
SD%Complete: 90
-SDComment: Quest support: 9849, 9868, 9918, 9874, 9991, 10107, 10108, 10044, 10172, 10646, 10085, 10987. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text)
+SDComment: Quest support: 9868, 9874, 10044, 10172, 10085. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text)
SDCategory: Nagrand
EndScriptData */
/* ContentData
-mob_shattered_rumbler
-mob_lump
-npc_altruis_the_sufferer
npc_greatmother_geyah
-npc_lantresor_of_the_blade
npc_maghar_captive
npc_creditmarker_visit_with_ancestors
-mob_sparrowhawk
EndContentData */
#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
-## mob_shattered_rumbler - this should be done with ACID
-######*/
-
-class mob_shattered_rumbler : public CreatureScript
-{
-public:
- mob_shattered_rumbler() : CreatureScript("mob_shattered_rumbler") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_shattered_rumblerAI (creature);
- }
-
- struct mob_shattered_rumblerAI : public ScriptedAI
- {
- bool Spawn;
-
- mob_shattered_rumblerAI(Creature* c) : ScriptedAI(c) {}
-
- void Reset()
- {
- Spawn = false;
- }
-
- void EnterCombat(Unit* /*who*/) {}
-
- void SpellHit(Unit* Hitter, const SpellInfo* Spellkind)
- {
- if (Spellkind->Id == 32001 && !Spawn)
- {
- float x = me->GetPositionX();
- float y = me->GetPositionY();
- float z = me->GetPositionZ();
-
- Hitter->SummonCreature(18181, x+(0.7f * (rand()%30)), y+(rand()%5), z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
- Hitter->SummonCreature(18181, x+(rand()%5), y-(rand()%5), z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
- Hitter->SummonCreature(18181, x-(rand()%5), y+(0.5f *(rand()%60)), z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
- me->setDeathState(CORPSE);
- Spawn = true;
- }
- return;
- }
- };
-
-};
-
-/*######
-## mob_lump
-######*/
-
-#define SPELL_VISUAL_SLEEP 16093
-#define SPELL_SPEAR_THROW 32248
-
-#define LUMP_SAY0 -1000190
-#define LUMP_SAY1 -1000191
-
-#define LUMP_DEFEAT -1000192
-
-#define GOSSIP_HL "I need answers, ogre!"
-#define GOSSIP_SL1 "Why are Boulderfist out this far? You know that this is Kurenai territory."
-#define GOSSIP_SL2 "And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar."
-#define GOSSIP_SL3 "This means war, Lump! War I say!"
-
-class mob_lump : public CreatureScript
-{
-public:
- mob_lump() : CreatureScript("mob_lump") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
- {
- case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(9353, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(9354, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(9355, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+3:
- player->SEND_GOSSIP_MENU(9356, creature->GetGUID());
- player->TalkedToCreature(18354, creature->GetGUID());
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->GetQuestStatus(9918) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(9352, creature->GetGUID());
-
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_lumpAI(creature);
- }
-
- struct mob_lumpAI : public ScriptedAI
- {
- mob_lumpAI(Creature* c) : ScriptedAI(c)
- {
- bReset = false;
- }
-
- uint32 Reset_Timer;
- uint32 Spear_Throw_Timer;
- bool bReset;
-
- void Reset()
- {
- Reset_Timer = 60000;
- Spear_Throw_Timer = 2000;
-
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }
-
- void AttackedBy(Unit* pAttacker)
- {
- if (me->getVictim())
- return;
-
- if (me->IsFriendlyTo(pAttacker))
- return;
-
- AttackStart(pAttacker);
- }
-
- void DamageTaken(Unit* done_by, uint32 & damage)
- {
- if (done_by->GetTypeId() == TYPEID_PLAYER && me->HealthBelowPctDamaged(30, damage))
- {
- if (!bReset && CAST_PLR(done_by)->GetQuestStatus(9918) == QUEST_STATUS_INCOMPLETE)
- {
- //Take 0 damage
- damage = 0;
-
- CAST_PLR(done_by)->AttackStop();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveAllAuras();
- me->DeleteThreatList();
- me->CombatStop(true);
- me->setFaction(1080); //friendly
- me->SetStandState(UNIT_STAND_STATE_SIT);
- DoScriptText(LUMP_DEFEAT, me);
-
- bReset = true;
- }
- }
- }
-
- void EnterCombat(Unit* /*who*/)
- {
- if (me->HasAura(SPELL_VISUAL_SLEEP))
- me->RemoveAura(SPELL_VISUAL_SLEEP);
-
- if (!me->IsStandState())
- me->SetStandState(UNIT_STAND_STATE_STAND);
-
- DoScriptText(RAND(LUMP_SAY0, LUMP_SAY1), me);
- }
-
- void UpdateAI(const uint32 diff)
- {
- //check if we waiting for a reset
- if (bReset)
- {
- if (Reset_Timer <= diff)
- {
- EnterEvadeMode();
- bReset = false;
- me->setFaction(1711); //hostile
- return;
- }
- else Reset_Timer -= diff;
- }
-
- //Return since we have no target
- if (!UpdateVictim())
- return;
-
- //Spear_Throw_Timer
- if (Spear_Throw_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_SPEAR_THROW);
- Spear_Throw_Timer = 20000;
- } else Spear_Throw_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
- };
-
-};
-
-/*######
-## npc_altruis_the_sufferer
-######*/
-
-#define GOSSIP_HATS1 "I see twisted steel and smell sundered earth."
-#define GOSSIP_HATS2 "Well...?"
-#define GOSSIP_HATS3 "[PH] Story about Illidan's Pupil"
-
-#define GOSSIP_SATS1 "Legion?"
-#define GOSSIP_SATS2 "And now?"
-#define GOSSIP_SATS3 "How do you see them now?"
-#define GOSSIP_SATS4 "Forge camps?"
-#define GOSSIP_SATS5 "Ok."
-#define GOSSIP_SATS6 "[PH] Story done"
-
-class npc_altruis_the_sufferer : public CreatureScript
-{
-public:
- npc_altruis_the_sufferer() : CreatureScript("npc_altruis_the_sufferer") { }
-
- bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* /*quest*/)
- {
- if (!player->GetQuestRewardStatus(9991)) //Survey the Land, q-id 9991
- {
- player->CLOSE_GOSSIP_MENU();
- player->ActivateTaxiPathTo(532); //TaxiPath 532
- }
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
- {
- case GOSSIP_ACTION_INFO_DEF+10:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
- player->SEND_GOSSIP_MENU(9420, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+11:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
- player->SEND_GOSSIP_MENU(9421, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+12:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
- player->SEND_GOSSIP_MENU(9422, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+13:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
- player->SEND_GOSSIP_MENU(9423, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+14:
- player->SEND_GOSSIP_MENU(9424, creature->GetGUID());
- break;
-
- case GOSSIP_ACTION_INFO_DEF+20:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
- player->SEND_GOSSIP_MENU(9427, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+21:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(9991);
- break;
-
- case GOSSIP_ACTION_INFO_DEF+30:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31);
- player->SEND_GOSSIP_MENU(384, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+31:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(10646);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- //gossip before obtaining Survey the Land
- if (player->GetQuestStatus(9991) == QUEST_STATUS_NONE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
-
- //gossip when Survey the Land is incomplete (technically, after the flight)
- if (player->GetQuestStatus(9991) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HATS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20);
-
- //wowwiki.com/Varedis
- if (player->GetQuestStatus(10646) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HATS3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30);
-
- player->SEND_GOSSIP_MENU(9419, creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
## npc_greatmother_geyah
######*/
@@ -453,83 +143,6 @@ public:
};
-/*######
-## npc_lantresor_of_the_blade
-######*/
-
-#define GOSSIP_HLB "I have killed many of your ogres, Lantresor. I have no fear."
-#define GOSSIP_SLB1 "Should I know? You look like an orc to me."
-#define GOSSIP_SLB2 "And the other half?"
-#define GOSSIP_SLB3 "I have heard of your kind, but I never thought to see the day when I would meet a half-breed."
-#define GOSSIP_SLB4 "My apologies. I did not mean to offend. I am here on behalf of my people."
-#define GOSSIP_SLB5 "My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces."
-#define GOSSIP_SLB6 "We will fight you until the end, then, Lantresor. We will not stand idly by as you pillage our towns and kill our people."
-#define GOSSIP_SLB7 "What do I need to do?"
-
-class npc_lantresor_of_the_blade : public CreatureScript
-{
-public:
- npc_lantresor_of_the_blade() : CreatureScript("npc_lantresor_of_the_blade") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
- {
- case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(9362, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(9363, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(9364, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
- player->SEND_GOSSIP_MENU(9365, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
- player->SEND_GOSSIP_MENU(9366, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
- player->SEND_GOSSIP_MENU(9367, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
- player->SEND_GOSSIP_MENU(9368, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+7:
- player->SEND_GOSSIP_MENU(9369, creature->GetGUID());
- if (player->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(10107);
- if (player->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(10108);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HLB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(9361, creature->GetGUID());
-
- return true;
- }
-
-};
-
/*#####
## npc_maghar_captive
#####*/
@@ -747,113 +360,9 @@ public:
};
/*######
-## mob_sparrowhawk
+## go_corkis_prison and npc_corki
######*/
-#define SPELL_SPARROWHAWK_NET 39810
-#define SPELL_ITEM_CAPTIVE_SPARROWHAWK 39812
-
-class mob_sparrowhawk : public CreatureScript
-{
-public:
- mob_sparrowhawk() : CreatureScript("mob_sparrowhawk") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new mob_sparrowhawkAI (creature);
- }
-
- struct mob_sparrowhawkAI : public ScriptedAI
- {
-
- mob_sparrowhawkAI(Creature* c) : ScriptedAI(c) {}
-
- uint32 Check_Timer;
- uint64 PlayerGUID;
- bool fleeing;
-
- void Reset()
- {
- me->RemoveAurasDueToSpell(SPELL_SPARROWHAWK_NET);
- Check_Timer = 1000;
- PlayerGUID = 0;
- fleeing = false;
- }
- void AttackStart(Unit* who)
- {
- if (PlayerGUID)
- return;
-
- ScriptedAI::AttackStart(who);
- }
-
- void EnterCombat(Unit* /*who*/) {}
-
- void MoveInLineOfSight(Unit* who)
- {
- if (!who || PlayerGUID)
- return;
-
- if (!PlayerGUID && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 30) && CAST_PLR(who)->GetQuestStatus(10987) == QUEST_STATUS_INCOMPLETE)
- {
- PlayerGUID = who->GetGUID();
- return;
- }
-
- ScriptedAI::MoveInLineOfSight(who);
- }
-
- void UpdateAI(const uint32 diff)
- {
- if (Check_Timer <= diff)
- {
- if (PlayerGUID)
- {
- if (fleeing && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != FLEEING_MOTION_TYPE)
- fleeing = false;
-
- Player* player = Unit::GetPlayer(*me, PlayerGUID);
- if (player && me->IsWithinDistInMap(player, 30))
- {
- if (!fleeing)
- {
- me->DeleteThreatList();
- me->GetMotionMaster()->MoveFleeing(player);
- fleeing = true;
- }
- }
- else if (fleeing)
- {
- me->GetMotionMaster()->MovementExpired(false);
- PlayerGUID = 0;
- fleeing = false;
- }
- }
- Check_Timer = 1000;
- } else Check_Timer -= diff;
-
- if (PlayerGUID)
- return;
-
- ScriptedAI::UpdateAI(diff);
- }
-
- void SpellHit(Unit* caster, const SpellInfo* spell)
- {
- if (caster->GetTypeId() == TYPEID_PLAYER)
- {
- if (spell->Id == SPELL_SPARROWHAWK_NET && CAST_PLR(caster)->GetQuestStatus(10987) == QUEST_STATUS_INCOMPLETE)
- {
- DoCast(caster, SPELL_ITEM_CAPTIVE_SPARROWHAWK, true);
- me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
- }
- }
- return;
- }
- };
-};
-
enum CorkiData
{
// first quest
@@ -916,10 +425,6 @@ public:
}
};
-/*######
-## npc_corki
-######*/
-
class npc_corki : public CreatureScript
{
public:
@@ -970,16 +475,237 @@ public:
};
};
+/*#####
+## npc_kurenai_captive
+#####*/
+
+enum KurenaiCaptive
+{
+ SAY_KUR_START = 0,
+ SAY_KUR_NO_ESCAPE = 1,
+ SAY_KUR_MORE = 2,
+ SAY_KUR_MORE_TWO = 3,
+ SAY_KUR_LIGHTNING = 4,
+ SAY_KUR_SHOCK = 5,
+ SAY_KUR_COMPLETE = 6,
+
+ SPELL_KUR_CHAIN_LIGHTNING = 16006,
+ SPELL_KUR_EARTHBIND_TOTEM = 15786,
+ SPELL_KUR_FROST_SHOCK = 12548,
+ SPELL_KUR_HEALING_WAVE = 12491,
+
+ QUEST_TOTEM_KARDASH_A = 9879,
+
+ NPC_KUR_MURK_RAIDER = 18203,
+ NPC_KUR_MURK_BRUTE = 18211,
+ NPC_KUR_MURK_SCAVENGER = 18207,
+ NPC_KUR_MURK_PUTRIFIER = 18202,
+};
+
+static float kurenaiAmbushA[]= {-1568.805786f, 8533.873047f, 1.958f};
+static float kurenaiAmbushB[]= {-1491.554321f, 8506.483398f, 1.248f};
+
+class npc_kurenai_captive : public CreatureScript
+{
+public:
+ npc_kurenai_captive() : CreatureScript("npc_kurenai_captive") { }
+
+ bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
+ {
+ if (quest->GetQuestId() == QUEST_TOTEM_KARDASH_A)
+ {
+ if (npc_kurenai_captiveAI* EscortAI = dynamic_cast<npc_kurenai_captiveAI*>(creature->AI()))
+ {
+ creature->SetStandState(UNIT_STAND_STATE_STAND);
+ EscortAI->Start(true, false, player->GetGUID(), quest);
+ DoScriptText(SAY_KUR_START, creature);
+
+ creature->SummonCreature(NPC_KUR_MURK_RAIDER, kurenaiAmbushA[0]+2.5f, kurenaiAmbushA[1]-2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ creature->SummonCreature(NPC_KUR_MURK_BRUTE, kurenaiAmbushA[0]-2.5f, kurenaiAmbushA[1]+2.5f, kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ creature->SummonCreature(NPC_KUR_MURK_SCAVENGER, kurenaiAmbushA[0], kurenaiAmbushA[1], kurenaiAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ }
+ }
+ return true;
+ }
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_kurenai_captiveAI(creature);
+ }
+
+ struct npc_kurenai_captiveAI : public npc_escortAI
+ {
+ npc_kurenai_captiveAI(Creature* creature) : npc_escortAI(creature) { }
+
+ uint32 ChainLightningTimer;
+ uint32 HealTimer;
+ uint32 FrostShockTimer;
+
+ void Reset()
+ {
+ ChainLightningTimer = 1000;
+ HealTimer = 0;
+ FrostShockTimer = 6000;
+ }
+
+ void EnterCombat(Unit* /*who*/)
+ {
+ DoCast(me, SPELL_KUR_EARTHBIND_TOTEM, false);
+ }
+
+ void JustDied(Unit* /*killer*/)
+ {
+ if (!HasEscortState(STATE_ESCORT_ESCORTING))
+ return;
+
+ if (Player* player = GetPlayerForEscort())
+ {
+ if (player->GetQuestStatus(QUEST_TOTEM_KARDASH_A) != QUEST_STATUS_COMPLETE)
+ player->FailQuest(QUEST_TOTEM_KARDASH_A);
+ }
+ }
+
+ void WaypointReached(uint32 PointId)
+ {
+ switch(PointId)
+ {
+ case 3:
+ {
+ Talk(SAY_KUR_MORE);
+
+ if (Creature* temp = me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
+ Talk(SAY_KUR_MORE_TWO);
+
+ me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0]-2.5f, kurenaiAmbushB[1]-2.5f, kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_KUR_MURK_SCAVENGER, kurenaiAmbushB[0]+2.5f, kurenaiAmbushB[1]+2.5f, kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_KUR_MURK_SCAVENGER, kurenaiAmbushB[0]+2.5f, kurenaiAmbushB[1]-2.5f, kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ break;
+ }
+ case 7:
+ {
+ Talk(SAY_KUR_COMPLETE);
+
+ if (Player* player = GetPlayerForEscort())
+ player->GroupEventHappens(QUEST_TOTEM_KARDASH_A, me);
+
+ SetRun();
+ break;
+ }
+ }
+ }
+
+ void JustSummoned(Creature* summoned)
+ {
+ if (summoned->GetEntry() == NPC_KUR_MURK_BRUTE)
+ Talk(SAY_KUR_NO_ESCAPE);
+
+ // This function is for when we summoned enemies to fight - so that does NOT mean we should make our totem count in this!
+ if (summoned->isTotem())
+ return;
+
+ summoned->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
+ summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
+ summoned->AI()->AttackStart(me);
+ }
+
+ void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell)
+ {
+ if (spell->Id == SPELL_KUR_CHAIN_LIGHTNING)
+ {
+ if (rand()%30)
+ return;
+
+ Talk(SAY_KUR_LIGHTNING);
+ }
+
+ if (spell->Id == SPELL_KUR_FROST_SHOCK)
+ {
+ if (rand()%30)
+ return;
+
+ Talk(SAY_KUR_SHOCK);
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if (me->HasUnitState(UNIT_STAT_CASTING))
+ return;
+
+ if (ChainLightningTimer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_KUR_CHAIN_LIGHTNING);
+ ChainLightningTimer = urand(7000,14000);
+ } else ChainLightningTimer -= diff;
+
+ if (HealthBelowPct(30))
+ {
+ if (HealTimer <= diff)
+ {
+ DoCast(me, SPELL_KUR_HEALING_WAVE);
+ HealTimer = 5000;
+ } else HealTimer -= diff;
+ }
+
+ if (FrostShockTimer <= diff)
+ {
+ DoCast(me->getVictim(), SPELL_KUR_FROST_SHOCK);
+ FrostShockTimer = urand(7500,15000);
+ } else FrostShockTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+};
+
+/*######
+## go_warmaul_prison
+######*/
+
+enum FindingTheSurvivorsData
+{
+ QUEST_FINDING_THE_SURVIVORS = 9948,
+ NPC_MAGHAR_PRISONER = 18428,
+
+ SAY_FREE = 0,
+};
+
+class go_warmaul_prison : public GameObjectScript
+{
+ public:
+ go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { }
+
+ bool OnGossipHello(Player* player, GameObject* go)
+ {
+ if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
+ return false;
+
+ if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f))
+ {
+ if (prisoner)
+ {
+ go->UseDoorOrButton();
+ if (player)
+ player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0);
+
+ prisoner->AI()->Talk(SAY_FREE, player->GetGUID());
+ prisoner->ForcedDespawn(6000);
+ }
+ }
+ return true;
+ }
+};
+
void AddSC_nagrand()
{
- new mob_shattered_rumbler();
- new mob_lump();
- new npc_altruis_the_sufferer();
new npc_greatmother_geyah();
- new npc_lantresor_of_the_blade();
new npc_maghar_captive();
new npc_creditmarker_visit_with_ancestors();
- new mob_sparrowhawk();
new npc_corki();
new go_corkis_prison();
+ new npc_kurenai_captive();
+ new go_warmaul_prison();
}
diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp
index f2aa9fe5786..6ac60e2086b 100644
--- a/src/server/scripts/Outland/shattrath_city.cpp
+++ b/src/server/scripts/Outland/shattrath_city.cpp
@@ -369,7 +369,7 @@ public:
{
if (CAST_PLR(who)->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE)
{
- float Radius = 10.0;
+ float Radius = 10.0f;
if (me->IsWithinDistInMap(who, Radius))
{
Start(false, false, who->GetGUID());
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 6ae9577070e..3b2cc5f5e00 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -899,7 +899,6 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
};
};
-
enum SalvagingLifesStength
{
NPC_SHARD_KILL_CREDIT = 29303,
@@ -950,6 +949,7 @@ enum eBattleStandard
{
NPC_KING_OF_THE_MOUNTAINT_KC = 31766,
};
+
class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
{
public:
@@ -978,6 +978,54 @@ public:
}
};
+enum ChumTheWaterSummons
+{
+ SUMMON_ANGRY_KVALDIR = 66737,
+ SUMMON_NORTH_SEA_MAKO = 66738,
+ SUMMON_NORTH_SEA_THRESHER = 66739,
+ SUMMON_NORTH_SEA_BLUE_SHARK = 66740
+};
+
+class spell_q14112_14145_chum_the_water: public SpellScriptLoader
+{
+public:
+ spell_q14112_14145_chum_the_water() : SpellScriptLoader("spell_q14112_14145_chum_the_water") { }
+
+ class spell_q14112_14145_chum_the_water_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q14112_14145_chum_the_water_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SUMMON_ANGRY_KVALDIR))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_MAKO))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_THRESHER))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_BLUE_SHARK))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, RAND(SUMMON_ANGRY_KVALDIR, SUMMON_NORTH_SEA_MAKO, SUMMON_NORTH_SEA_THRESHER, SUMMON_NORTH_SEA_BLUE_SHARK));
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q14112_14145_chum_the_water_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q14112_14145_chum_the_water_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -1001,4 +1049,5 @@ void AddSC_quest_spell_scripts()
new spell_q9874_liquid_fire();
new spell_q12805_lifeblood_dummy();
new spell_q13280_13283_plant_battle_standard();
+ new spell_q14112_14145_chum_the_water();
}
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index a9ed794ab45..517746dac55 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -24,14 +24,8 @@ SDCategory: Areatrigger
EndScriptData */
/* ContentData
-at_aldurthar_gate q13315/q13351
at_coilfang_waterfall 4591
at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm
-at_ravenholdt
-at_warsong_slaughterhouse
-at_warsong_grainery
-at_torp_farm
-at_warsong_farms q11686
at_stormwright_shelf q12741
at_last_rites q12019
at_sholazar_waygate q12548
@@ -40,46 +34,6 @@ EndContentData */
#include "ScriptPCH.h"
/*######
-## AreaTrigger_at_aldurthar_gate
-######*/
-
-enum eAldurtharGate
-{
- TRIGGER_SOUTH = 5284,
-
- TRIGGER_CENTRAL = 5285,
- TRIGGER_NORTH = 5286,
- TRIGGER_NORTHWEST = 5287,
-
- NPC_SOUTH_GATE = 32195,
- NPC_CENTRAL_GATE = 32196,
- NPC_NORTH_GATE = 32197,
- NPC_NORTHWEST_GATE = 32199
-};
-
-class AreaTrigger_at_aldurthar_gate : public AreaTriggerScript
-{
- public:
-
- AreaTrigger_at_aldurthar_gate()
- : AreaTriggerScript("at_aldurthar_gate")
- {
- }
-
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
- {
- switch (trigger->id)
- {
- case TRIGGER_SOUTH: player->KilledMonsterCredit(NPC_SOUTH_GATE, 0); break;
- case TRIGGER_CENTRAL: player->KilledMonsterCredit(NPC_CENTRAL_GATE, 0); break;
- case TRIGGER_NORTH: player->KilledMonsterCredit(NPC_NORTH_GATE, 0); break;
- case TRIGGER_NORTHWEST: player->KilledMonsterCredit(NPC_NORTHWEST_GATE, 0); break;
- }
- return true;
- }
-};
-
-/*######
## at_coilfang_waterfall
######*/
@@ -151,71 +105,6 @@ class AreaTrigger_at_legion_teleporter : public AreaTriggerScript
}
};
-enum eRavenholdt
-{
- QUEST_MANOR_RAVENHOLDT = 6681,
- NPC_RAVENHOLDT = 13936
-};
-
-class AreaTrigger_at_ravenholdt : public AreaTriggerScript
-{
- public:
-
- AreaTrigger_at_ravenholdt()
- : AreaTriggerScript("at_ravenholdt")
- {
- }
-
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
- {
- if (player->GetQuestStatus(QUEST_MANOR_RAVENHOLDT) == QUEST_STATUS_INCOMPLETE)
- player->KilledMonsterCredit(NPC_RAVENHOLDT, 0);
-
- return false;
- }
-};
-
-/*######
-## at_warsong_farms
-######*/
-
-enum eWarsongFarms
-{
- QUEST_THE_WARSONG_FARMS = 11686,
-
- NPC_CREDIT_SLAUGHTERHOUSE = 25672,
- NPC_CREDIT_GRAINERY = 25669,
- NPC_CREDIT_TORP_FARM = 25671,
-
- AT_SLAUGHTERHOUSE = 4873,
- AT_GRAINERY = 4871,
- AT_TORP_FARM = 4872
-};
-
-class AreaTrigger_at_warsong_farms : public AreaTriggerScript
-{
- public:
-
- AreaTrigger_at_warsong_farms()
- : AreaTriggerScript("at_warsong_farms")
- {
- }
-
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
- {
- if (!player->isDead() && player->GetQuestStatus(QUEST_THE_WARSONG_FARMS) == QUEST_STATUS_INCOMPLETE)
- {
- switch (trigger->id)
- {
- case AT_SLAUGHTERHOUSE: player->KilledMonsterCredit(NPC_CREDIT_SLAUGHTERHOUSE, 0); break;
- case AT_GRAINERY: player->KilledMonsterCredit(NPC_CREDIT_GRAINERY, 0); break;
- case AT_TORP_FARM: player->KilledMonsterCredit(NPC_CREDIT_TORP_FARM, 0); break;
- }
- }
- return true;
- }
-};
-
/*######
## at_stormwright_shelf
######*/
@@ -370,11 +259,8 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
void AddSC_areatrigger_scripts()
{
- new AreaTrigger_at_aldurthar_gate();
new AreaTrigger_at_coilfang_waterfall();
new AreaTrigger_at_legion_teleporter();
- new AreaTrigger_at_ravenholdt();
- new AreaTrigger_at_warsong_farms();
new AreaTrigger_at_stormwright_shelf();
new AreaTrigger_at_scent_larkorwi();
new AreaTrigger_at_last_rites();
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index cdeac03d76e..f83b728ee01 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -165,7 +165,7 @@ public:
bool OnGossipHello(Player* player, GameObject* /*pGO*/)
{
- if (player->HasSkill(SKILL_ENGINERING) && player->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !player->HasSpell(22704))
+ if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 300 && !player->HasSpell(22704))
{
player->CastSpell(player, 22864, false);
}
@@ -1176,14 +1176,79 @@ public:
class go_massive_seaforium_charge : public GameObjectScript
{
-public:
- go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
+ public:
+ go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
- bool OnGossipHello(Player* /*player*/, GameObject* go)
- {
- go->SetLootState(GO_JUST_DEACTIVATED);
- return true;
- }
+ bool OnGossipHello(Player* /*player*/, GameObject* go)
+ {
+ go->SetLootState(GO_JUST_DEACTIVATED);
+ return true;
+ }
+};
+
+/*######
+## go_gjalerbron_cage
+######*/
+
+enum OfKeysAndCages
+{
+ QUEST_ALLIANCE_OF_KEYS_AND_CAGES = 11231,
+ QUEST_HORDE_OF_KEYS_AND_CAGES = 11265,
+ NPC_GJALERBRON_PRISONER = 24035,
+ SAY_FREE = 0,
+};
+
+class go_gjalerbron_cage : public GameObjectScript
+{
+ public:
+ go_gjalerbron_cage() : GameObjectScript("go_gjalerbron_cage") { }
+
+ bool OnGossipHello(Player* player, GameObject* go)
+ {
+ if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) ||
+ (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE))
+ {
+ if (Creature* prisoner = go->FindNearestCreature(NPC_GJALERBRON_PRISONER, 5.0f))
+ {
+ go->UseDoorOrButton();
+
+ if (player)
+ player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, 0);
+
+ prisoner->AI()->Talk(SAY_FREE);
+ prisoner->ForcedDespawn(6000);
+ }
+ }
+ return true;
+ }
+};
+
+/*########
+## go_large_gjalerbron_cage
+#####*/
+
+class go_large_gjalerbron_cage : public GameObjectScript
+{
+ public:
+ go_large_gjalerbron_cage() : GameObjectScript("go_large_gjalerbron_cage") { }
+
+ bool OnGossipHello(Player* player, GameObject* go)
+ {
+ if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) ||
+ (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE))
+ {
+ std::list<Creature*> prisonerList;
+ GetCreatureListWithEntryInGrid(prisonerList, go, NPC_GJALERBRON_PRISONER, INTERACTION_DISTANCE);
+ for (std::list<Creature*>::const_iterator itr = prisonerList.begin(); itr != prisonerList.end(); ++itr)
+ {
+ go->UseDoorOrButton();
+ player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, (*itr)->GetGUID());
+ (*itr)->ForcedDespawn(6000);
+ (*itr)->AI()->Talk(SAY_FREE);
+ }
+ }
+ return false;
+ }
};
void AddSC_go_scripts()
@@ -1224,4 +1289,6 @@ void AddSC_go_scripts()
new go_amberpine_outhouse;
new go_hive_pod;
new go_massive_seaforium_charge;
+ new go_gjalerbron_cage;
+ new go_large_gjalerbron_cage;
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 149e1e455aa..01f12086477 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -774,7 +774,7 @@ public:
{
bool res = false;
npcTextId = textId;
- if (player->GetBaseSkillValue(SKILL_ENGINERING) >= skillValue && player->HasSpell(reqSpellId))
+ if (player->GetBaseSkillValue(SKILL_ENGINEERING) >= skillValue && player->HasSpell(reqSpellId))
{
if (!player->HasSpell(spellId))
res = true;
@@ -790,7 +790,7 @@ public:
std::string gossipItem;
bool canLearn = false;
- if (player->HasSkill(SKILL_ENGINERING))
+ if (player->HasSkill(SKILL_ENGINEERING))
{
switch (creature->GetEntry())
{
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index ffecf020d24..bc9c0c62ccc 100755
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
@@ -146,12 +146,12 @@ inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
enum TimeConstants
{
- MINUTE = 60,
- HOUR = MINUTE*60,
- DAY = HOUR*24,
- WEEK = DAY*7,
- MONTH = DAY*30,
- YEAR = MONTH*12,
+ MINUTE = 60,
+ HOUR = MINUTE*60,
+ DAY = HOUR*24,
+ WEEK = DAY*7,
+ MONTH = DAY*30,
+ YEAR = MONTH*12,
IN_MILLISECONDS = 1000
};
@@ -203,4 +203,17 @@ typedef std::vector<std::string> StringVector;
#endif
#define MAX_QUERY_LEN 32*1024
+
+#define TRINITY_GUARD(MUTEX, LOCK) \
+ ACE_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
+ if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+
+# define TRINITY_WRITE_GUARD(MUTEX, LOCK) \
+ ACE_Write_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
+ if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+
+# define TRINITY_READ_GUARD(MUTEX, LOCK) \
+ ACE_Read_Guard< MUTEX > TRINITY_GUARD_OBJECT (LOCK); \
+ if (TRINITY_GUARD_OBJECT.locked() == 0) ASSERT(false);
+
#endif
diff --git a/src/server/shared/Cryptography/ARC4.h b/src/server/shared/Cryptography/ARC4.h
index 777dbb8cb99..abf753be02f 100755
--- a/src/server/shared/Cryptography/ARC4.h
+++ b/src/server/shared/Cryptography/ARC4.h
@@ -19,7 +19,7 @@
#ifndef _AUTH_SARC4_H
#define _AUTH_SARC4_H
-#include "Common.h"
+#include "Define.h"
#include <openssl/evp.h>
class ARC4
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
index 146f4e992b7..a2db02dfbe3 100755
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
@@ -18,12 +18,11 @@
#include "AuthCrypt.h"
#include "Cryptography/HMACSHA1.h"
-#include "Logging/Log.h"
#include "Cryptography/BigNumber.h"
AuthCrypt::AuthCrypt() : _clientDecrypt(SHA_DIGEST_LENGTH), _serverEncrypt(SHA_DIGEST_LENGTH)
+ , _initialized(false)
{
- _initialized = false;
}
AuthCrypt::~AuthCrypt()
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
index 0304ef6b69e..e7463b0d962 100755
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
@@ -19,7 +19,6 @@
#ifndef _AUTHCRYPT_H
#define _AUTHCRYPT_H
-#include <Common.h>
#include "Cryptography/ARC4.h"
class BigNumber;
diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp
index 6149a680594..76cb74d5e13 100755
--- a/src/server/shared/Cryptography/BigNumber.cpp
+++ b/src/server/shared/Cryptography/BigNumber.cpp
@@ -18,31 +18,30 @@
#include "Cryptography/BigNumber.h"
#include <openssl/bn.h>
+#include <openssl/crypto.h>
#include <algorithm>
BigNumber::BigNumber()
-{
- _bn = BN_new();
- _array = NULL;
-}
+ : _bn(BN_new())
+ , _array(NULL)
+{ }
BigNumber::BigNumber(const BigNumber &bn)
-{
- _bn = BN_dup(bn._bn);
- _array = NULL;
-}
+ : _bn(BN_dup(bn._bn))
+ , _array(NULL)
+{ }
BigNumber::BigNumber(uint32 val)
+ : _bn(BN_new())
+ , _array(NULL)
{
- _bn = BN_new();
BN_set_word(_bn, val);
- _array = NULL;
}
BigNumber::~BigNumber()
{
BN_free(_bn);
- if (_array) delete[] _array;
+ delete[] _array;
}
void BigNumber::SetDword(uint32 val)
@@ -76,6 +75,8 @@ void BigNumber::SetRand(int numbits)
BigNumber BigNumber::operator=(const BigNumber &bn)
{
+ if (this == &bn)
+ return *this;
BN_copy(_bn, bn._bn);
return *this;
}
diff --git a/src/server/shared/Cryptography/BigNumber.h b/src/server/shared/Cryptography/BigNumber.h
index 485d4ced470..eb450c27777 100755
--- a/src/server/shared/Cryptography/BigNumber.h
+++ b/src/server/shared/Cryptography/BigNumber.h
@@ -19,7 +19,7 @@
#ifndef _AUTH_BIGNUMBER_H
#define _AUTH_BIGNUMBER_H
-#include "Common.h"
+#include "Define.h"
struct bignum_st;
diff --git a/src/server/shared/Cryptography/HMACSHA1.h b/src/server/shared/Cryptography/HMACSHA1.h
index 180ac6f4262..2d6e0c276a8 100755
--- a/src/server/shared/Cryptography/HMACSHA1.h
+++ b/src/server/shared/Cryptography/HMACSHA1.h
@@ -19,7 +19,8 @@
#ifndef _AUTH_HMAC_H
#define _AUTH_HMAC_H
-#include "Common.h"
+#include "Define.h"
+#include <string>
#include <openssl/hmac.h>
#include <openssl/sha.h>
diff --git a/src/server/shared/Cryptography/SHA1.h b/src/server/shared/Cryptography/SHA1.h
index 27e2d3290d0..9cb9b7b90f9 100755
--- a/src/server/shared/Cryptography/SHA1.h
+++ b/src/server/shared/Cryptography/SHA1.h
@@ -19,9 +19,9 @@
#ifndef _AUTH_SHA1_H
#define _AUTH_SHA1_H
-#include "Common.h"
+#include "Define.h"
+#include <string>
#include <openssl/sha.h>
-#include <openssl/crypto.h>
class BigNumber;
diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h
index 0fb3eb25347..7f6f5fa661c 100755
--- a/src/server/shared/Dynamic/TypeContainer.h
+++ b/src/server/shared/Dynamic/TypeContainer.h
@@ -108,11 +108,11 @@ class TypeMapContainer
}
/// Removes the object from the container, and returns the removed object
- template<class SPECIFIC_TYPE> bool remove(SPECIFIC_TYPE* obj)
- {
- SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj);
- return (t != NULL);
- }
+ //template<class SPECIFIC_TYPE> bool remove(SPECIFIC_TYPE* obj)
+ //{
+ // SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj);
+ // return (t != NULL);
+ //}
ContainerMapList<OBJECT_TYPES> & GetElements(void) { return i_elements; }
const ContainerMapList<OBJECT_TYPES> & GetElements(void) const { return i_elements;}
diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h
index 981cd82197f..9bfbf47da93 100755
--- a/src/server/shared/Dynamic/TypeContainerFunctions.h
+++ b/src/server/shared/Dynamic/TypeContainerFunctions.h
@@ -62,7 +62,7 @@ namespace Trinity
template<class SPECIFIC_TYPE> SPECIFIC_TYPE* Insert(ContainerMapList<SPECIFIC_TYPE> &elements, SPECIFIC_TYPE *obj)
{
//elements._element[hdl] = obj;
- obj->GetGridRef().link(&elements._element, obj);
+ obj->AddToGrid(elements._element);
return obj;
};
@@ -84,31 +84,30 @@ namespace Trinity
return (t != NULL ? t : Insert(elements._TailElements, obj));
}
- // non-const remove method
- template<class SPECIFIC_TYPE> SPECIFIC_TYPE* Remove(ContainerMapList<SPECIFIC_TYPE> & /*elements*/, SPECIFIC_TYPE *obj)
- {
- obj->GetGridRef().unlink();
- return obj;
- }
-
- template<class SPECIFIC_TYPE> SPECIFIC_TYPE* Remove(ContainerMapList<TypeNull> &/*elements*/, SPECIFIC_TYPE * /*obj*/)
- {
- return NULL;
- }
-
- // this is a missed
- template<class SPECIFIC_TYPE, class T> SPECIFIC_TYPE* Remove(ContainerMapList<T> &/*elements*/, SPECIFIC_TYPE * /*obj*/)
- {
- return NULL; // a missed
- }
-
- template<class SPECIFIC_TYPE, class T, class H> SPECIFIC_TYPE* Remove(ContainerMapList<TypeList<H, T> > &elements, SPECIFIC_TYPE *obj)
- {
- // The head element is bad
- SPECIFIC_TYPE* t = Remove(elements._elements, obj);
- return ( t != NULL ? t : Remove(elements._TailElements, obj) );
- }
-
+ //// non-const remove method
+ //template<class SPECIFIC_TYPE> SPECIFIC_TYPE* Remove(ContainerMapList<SPECIFIC_TYPE> & /*elements*/, SPECIFIC_TYPE *obj)
+ //{
+ // obj->GetGridRef().unlink();
+ // return obj;
+ //}
+
+ //template<class SPECIFIC_TYPE> SPECIFIC_TYPE* Remove(ContainerMapList<TypeNull> &/*elements*/, SPECIFIC_TYPE * /*obj*/)
+ //{
+ // return NULL;
+ //}
+
+ //// this is a missed
+ //template<class SPECIFIC_TYPE, class T> SPECIFIC_TYPE* Remove(ContainerMapList<T> &/*elements*/, SPECIFIC_TYPE * /*obj*/)
+ //{
+ // return NULL; // a missed
+ //}
+
+ //template<class SPECIFIC_TYPE, class T, class H> SPECIFIC_TYPE* Remove(ContainerMapList<TypeList<H, T> > &elements, SPECIFIC_TYPE *obj)
+ //{
+ // // The head element is bad
+ // SPECIFIC_TYPE* t = Remove(elements._elements, obj);
+ // return ( t != NULL ? t : Remove(elements._TailElements, obj) );
+ //}
}
#endif
diff --git a/src/server/shared/Dynamic/UnorderedMap.h b/src/server/shared/Dynamic/UnorderedMap.h
index c698cc0a823..92a7dddf8a8 100755
--- a/src/server/shared/Dynamic/UnorderedMap.h
+++ b/src/server/shared/Dynamic/UnorderedMap.h
@@ -71,4 +71,3 @@ namespace __gnu_cxx
using std::hash_map;
#endif
#endif
-
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index 56c02a8e77b..15008f13c10 100755
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -139,7 +139,7 @@ void Log::Initialize()
{
bool m_gmlog_timestamp = ConfigMgr::GetBoolDefault("GmLogTimestamp", false);
- size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
+ size_t dot_pos = m_gmlog_filename_format.find_last_of('.');
if (dot_pos!=m_gmlog_filename_format.npos)
{
if (m_gmlog_timestamp)
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index 5c23616ac5c..5b2eb6aafb6 100755
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -102,8 +102,10 @@ const int Colors = int(WHITE)+1;
class Log
{
friend class ACE_Singleton<Log, ACE_Thread_Mutex>;
- Log();
- ~Log();
+
+ private:
+ Log();
+ ~Log();
public:
void Initialize();
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp
index 187258e41b3..5919529c6bf 100755
--- a/src/server/shared/Utilities/Util.cpp
+++ b/src/server/shared/Utilities/Util.cpp
@@ -17,7 +17,6 @@
*/
#include "Util.h"
-
#include "utf8.h"
#ifdef USE_SFMT_FOR_RNG
#include "SFMT.h"
@@ -162,13 +161,13 @@ std::string secsToTimeString(uint64 timeInSecs, bool shortText, bool hoursOnly)
std::ostringstream ss;
if (days)
- ss << days << (shortText ? "d " : " Day(s) ");
+ ss << days << (shortText ? "d" : " Day(s) ");
if (hours || hoursOnly)
- ss << hours << (shortText ? "h " : " Hour(s) ");
+ ss << hours << (shortText ? "h" : " Hour(s) ");
if (!hoursOnly)
{
if (minutes)
- ss << minutes << (shortText ? "m " : " Minute(s) ");
+ ss << minutes << (shortText ? "m" : " Minute(s) ");
if (secs || (!days && !hours && !minutes) )
ss << secs << (shortText ? "s" : " Second(s).");
}
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index cf5ad79f878..564f6028eca 100755
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -115,6 +115,7 @@ void commandFinished(void*, bool /*success*/)
printf("TC> ");
fflush(stdout);
}
+
/**
* Collects all GUIDs (and related info) from deleted characters which are still in the database.
*
@@ -562,10 +563,11 @@ void CliRunnable::run()
{
///- Display the list of available CLI functions then beep
//sLog->outString("");
- #if PLATFORM != PLATFORM_WINDOWS
+#if PLATFORM != PLATFORM_WINDOWS
rl_attempted_completion_function = cli_completion;
rl_event_hook = cli_hook_func;
- #endif
+#endif
+
if (ConfigMgr::GetBoolDefault("BeepAtStart", true))
printf("\a"); // \a = Alert
@@ -580,49 +582,49 @@ void CliRunnable::run()
char *command_str ; // = fgets(commandbuf, sizeof(commandbuf), stdin);
- #if PLATFORM == PLATFORM_WINDOWS
+#if PLATFORM == PLATFORM_WINDOWS
char commandbuf[256];
command_str = fgets(commandbuf, sizeof(commandbuf), stdin);
- #else
+#else
command_str = readline("TC>");
rl_bind_key('\t', rl_complete);
- #endif
+#endif
+
if (command_str != NULL)
{
- for (int x=0; command_str[x]; x++)
- if (command_str[x]=='\r'||command_str[x]=='\n')
+ for (int x=0; command_str[x]; ++x)
+ if (command_str[x] == '\r' || command_str[x] == '\n')
{
- command_str[x]=0;
+ command_str[x] = 0;
break;
}
if (!*command_str)
{
- #if PLATFORM == PLATFORM_WINDOWS
+#if PLATFORM == PLATFORM_WINDOWS
printf("TC>");
- #endif
+#endif
continue;
}
std::string command;
if (!consoleToUtf8(command_str, command)) // convert from console encoding to utf8
{
- #if PLATFORM == PLATFORM_WINDOWS
+#if PLATFORM == PLATFORM_WINDOWS
printf("TC>");
- #endif
+#endif
continue;
}
+
fflush(stdout);
sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
- #if PLATFORM != PLATFORM_WINDOWS
+#if PLATFORM != PLATFORM_WINDOWS
add_history(command.c_str());
- #endif
-
+#endif
}
else if (feof(stdin))
{
World::StopNow(SHUTDOWN_EXIT_CODE);
}
-
}
}
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index 5260140fef0..42d72aa2c6f 100755
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -462,7 +462,6 @@ bool Master::_StartDB()
sWorld->LoadDBVersion();
sLog->outString("Using World DB: %s", sWorld->GetDBVersion());
- sLog->outString("Using creature EventAI: %s", sWorld->GetCreatureEventAIVersion());
return true;
}
diff --git a/src/server/worldserver/RemoteAccess/RARunnable.cpp b/src/server/worldserver/RemoteAccess/RARunnable.cpp
index d7cee88b994..60145cf99aa 100644
--- a/src/server/worldserver/RemoteAccess/RARunnable.cpp
+++ b/src/server/worldserver/RemoteAccess/RARunnable.cpp
@@ -33,22 +33,17 @@
#include "RASocket.h"
-RARunnable::RARunnable() : m_Reactor(NULL)
+RARunnable::RARunnable()
{
- ACE_Reactor_Impl* imp = 0;
+ ACE_Reactor_Impl* imp = NULL;
#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
-
imp = new ACE_Dev_Poll_Reactor();
-
imp->max_notify_iterations (128);
imp->restart (1);
-
#else
-
imp = new ACE_TP_Reactor();
imp->max_notify_iterations (128);
-
#endif
m_Reactor = new ACE_Reactor (imp, 1);
@@ -68,7 +63,6 @@ void RARunnable::run()
uint16 raport = ConfigMgr::GetIntDefault("Ra.Port", 3443);
std::string stringip = ConfigMgr::GetStringDefault("Ra.IP", "0.0.0.0");
-
ACE_INET_Addr listen_addr(raport, stringip.c_str());
if (acceptor.open(listen_addr, m_Reactor) == -1)
@@ -84,7 +78,6 @@ void RARunnable::run()
// don't be too smart to move this outside the loop
// the run_reactor_event_loop will modify interval
ACE_Time_Value interval(0, 100000);
-
if (m_Reactor->run_reactor_event_loop(interval) == -1)
break;
}