aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/auth_database.sql149
-rw-r--r--sql/base/characters_database.sql31
-rw-r--r--sql/old/3.3.5a/2012_01_08_00_world_version.sql (renamed from sql/updates/world/2012_01_08_00_world_version.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_01_world_sai.sql (renamed from sql/updates/world/2012_01_08_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_02_world_creature_template.sql (renamed from sql/updates/world/2012_01_08_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_03_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_08_03_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_04_world_quest_template.sql (renamed from sql/updates/world/2012_01_08_04_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_05_world_conditions.sql (renamed from sql/updates/world/2012_01_08_05_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_06_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_06_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_07_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_07_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_08_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_08_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_09_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_09_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_11_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_11_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_12_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_12_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_13_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_13_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_14_world_creature_text.sql (renamed from sql/updates/world/2012_01_08_14_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_15_world_script_texts.sql (renamed from sql/updates/world/2012_01_08_15_world_script_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_16_world_misc.sql (renamed from sql/updates/world/2012_01_08_16_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_creature_addon.sql (renamed from sql/updates/world/2012_01_08_18_world_creature_addon.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_spell_linked_spell.sql (renamed from sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_waypoint_data.sql (renamed from sql/updates/world/2012_01_08_18_world_waypoint_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_18_world_waypoint_scripts.sql (renamed from sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_08_19_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_00_world_creature_text.sql (renamed from sql/updates/world/2012_01_09_00_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_09_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_01_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_01_world_creature_text.sql (renamed from sql/updates/world/2012_01_09_01_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_09_01_world_smart_scripts.sql (renamed from sql/updates/world/2012_01_09_01_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_00_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_00_world_disables.sql (renamed from sql/updates/world/2012_01_11_00_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_11_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_01_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_11_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_11_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_12_00_world_sai.sql (renamed from sql/updates/world/2012_01_12_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_00_world_creature.sql (renamed from sql/updates/world/2012_01_13_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_13_01_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_02_world_sai.sql (renamed from sql/updates/world/2012_01_13_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_13_03_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_04_world_creature_texts.sql (renamed from sql/updates/world/2012_01_13_04_world_creature_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_05_world_creature_texts.sql (renamed from sql/updates/world/2012_01_13_05_world_creature_texts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_13_06_world_creature_text.sql (renamed from sql/updates/world/2012_01_13_06_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_00_characters_lfg_data.sql (renamed from sql/updates/characters/2012_01_14_00_characters_lfg_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_00_world_gossip_menu.sql (renamed from sql/updates/world/2012_01_14_00_world_gossip_menu.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_01_world_npc_trainer.sql (renamed from sql/updates/world/2012_01_14_01_world_npc_trainer.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_02_world_spell_proc_event.sql (renamed from sql/updates/world/2012_01_14_02_world_spell_proc_event.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_14_03_world_trinity_string.sql (renamed from sql/updates/world/2012_01_14_03_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_15_00_world_loot_template.sql (renamed from sql/updates/world/2012_01_15_00_world_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_15_02_world_creature_template.sql (renamed from sql/updates/world/2012_01_15_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql (renamed from sql/updates/world/2012_01_15_03_world_item_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql (renamed from sql/updates/world/2012_01_16_00_world_stored_procedure.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_01_world_sai.sql (renamed from sql/updates/world/2012_01_16_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_02_world_sai.sql (renamed from sql/updates/world/2012_01_16_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_03_world_sai.sql (renamed from sql/updates/world/2012_01_16_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_04_world_sai.sql (renamed from sql/updates/world/2012_01_16_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_05_world_sai.sql (renamed from sql/updates/world/2012_01_16_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_06_world_sai.sql (renamed from sql/updates/world/2012_01_16_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_07_world_sai.sql (renamed from sql/updates/world/2012_01_16_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_08_world_sai.sql (renamed from sql/updates/world/2012_01_16_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_16_09_world_sai.sql (renamed from sql/updates/world/2012_01_16_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_17_00_world_misc.sql (renamed from sql/updates/world/2012_01_17_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_17_01_world_conditions.sql (renamed from sql/updates/world/2012_01_17_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_00_world_quest_template.sql (renamed from sql/updates/world/2012_01_19_00_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_01_world_sai.sql (renamed from sql/updates/world/2012_01_19_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_02_world_quest_template.sql (renamed from sql/updates/world/2012_01_19_02_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_03_world_sai.sql (renamed from sql/updates/world/2012_01_19_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_04_world_sai.sql (renamed from sql/updates/world/2012_01_19_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_05_world_sai.sql (renamed from sql/updates/world/2012_01_19_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_06_world_sai.sql (renamed from sql/updates/world/2012_01_19_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_07_world_sai.sql (renamed from sql/updates/world/2012_01_19_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_19_08_world_sai.sql (renamed from sql/updates/world/2012_01_19_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_00_world_creature.sql (renamed from sql/updates/world/2012_01_21_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_00_world_sai.sql (renamed from sql/updates/world/2012_01_21_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_01_world_npc_vendor.sql (renamed from sql/updates/world/2012_01_21_01_world_npc_vendor.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_21_02_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_00_world_command.sql (renamed from sql/updates/world/2012_01_22_00_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_00_world_sai.sql (renamed from sql/updates/world/2012_01_22_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_01_world_conditions.sql (renamed from sql/updates/world/2012_01_22_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_22_02_world_creature_addon.sql (renamed from sql/updates/world/2012_01_22_02_world_creature_addon.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_00_characters_character_queststatus_rewarded.sql (renamed from sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_00_world_game_event_seasonal_questrelation.sql (renamed from sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_00_world_sai.sql (renamed from sql/updates/world/2012_01_23_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_01_world_creature_script_names.sql (renamed from sql/updates/world/2012_01_23_01_world_creature_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_02_world_disables.sql (renamed from sql/updates/world/2012_01_23_02_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql (renamed from sql/updates/world/2012_01_23_04_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_05_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_23_05_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_06_world_achievement_criteria_data.sql (renamed from sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_23_07_world_creature_text.sql (renamed from sql/updates/world/2012_01_23_07_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_24_00_world_misc.sql (renamed from sql/updates/world/2012_01_24_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_24_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_24_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_26_00_world_sai.sql (renamed from sql/updates/world/2012_01_26_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql (renamed from sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_28_00_world_conditions.sql (renamed from sql/updates/world/2012_01_28_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_00_world_conditions.sql (renamed from sql/updates/world/2012_01_29_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_00_world_spell_dbc.sql (renamed from sql/updates/world/2012_01_29_00_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_01_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_02_world_spell_trigger_spell.sql (renamed from sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_03_world_misc.sql (renamed from sql/updates/world/2012_01_29_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_29_04_world_misc.sql (renamed from sql/updates/world/2012_01_29_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_00_world_conditions.sql (renamed from sql/updates/world/2012_01_30_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_01_world_conditions.sql (renamed from sql/updates/world/2012_01_30_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_01_30_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_01_30_02_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_03_world_creature_loot_template.sql (renamed from sql/updates/world/2012_01_30_03_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_30_05_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql136
-rw-r--r--sql/old/3.3.5a/2012_01_31_01_world_misc.sql8
-rw-r--r--sql/old/3.3.5a/2012_02_01_00_world_misc.sql5
-rw-r--r--sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql60
-rw-r--r--sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql2196
-rw-r--r--sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_creature.sql5
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql7
-rw-r--r--sql/old/3.3.5a/2012_02_04_01_world_creature.sql12
-rw-r--r--sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_05_00_world_misc.sql126
-rw-r--r--sql/old/3.3.5a/2012_02_05_01_world_game_event.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_05_02_world_creature.sql22
-rw-r--r--sql/old/3.3.5a/2012_02_05_03_world_game_event.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_05_04_world_misc.sql11
-rw-r--r--sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_06_00_world_misc.sql731
-rw-r--r--sql/old/3.3.5a/2012_02_07_00_world_misc.sql60
-rw-r--r--sql/old/3.3.5a/2012_02_08_00_world_misc.sql20
-rw-r--r--sql/old/3.3.5a/2012_02_08_01_world_misc.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_08_02_world_misc.sql27
-rw-r--r--sql/old/3.3.5a/2012_02_08_03_world_misc.sql24
-rw-r--r--sql/old/3.3.5a/2012_02_08_04_world_misc.sql4
-rw-r--r--sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql23
-rw-r--r--sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql12
-rw-r--r--sql/old/3.3.5a/2012_02_08_07_world_pool.sql11
-rw-r--r--sql/old/3.3.5a/2012_02_08_08_world_pool.sql16
-rw-r--r--sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_08_10_world_gossip.sql110
-rw-r--r--sql/old/3.3.5a/2012_02_08_11_world_pool.sql24
-rw-r--r--sql/old/3.3.5a/2012_02_08_12_world_sai.sql7
-rw-r--r--sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql13
-rw-r--r--sql/old/3.3.5a/2012_02_08_14_world_sai.sql13
-rw-r--r--sql/old/3.3.5a/2012_02_08_15_world_misc.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_08_16_world_sai.sql22
-rw-r--r--sql/old/3.3.5a/2012_02_10_00_world_conditions.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql3
-rw-r--r--sql/old/3.3.5a/2012_02_10_02_world_conditions.sql9
-rw-r--r--sql/old/3.3.5a/2012_02_10_03_world_conditions.sql2
-rw-r--r--sql/old/3.3.5a/2012_02_10_04_world_conditions.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_11_00_world_creature.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_11_01_world_creature.sql14
-rw-r--r--sql/old/3.3.5a/2012_02_11_02_world_pool.sql19
-rw-r--r--sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql13
-rw-r--r--sql/old/3.3.5a/2012_02_11_04_world_sai.sql49
-rw-r--r--sql/old/3.3.5a/2012_02_11_05_world_sai.sql65
-rw-r--r--sql/old/3.3.5a/2012_02_11_06_world_sai.sql16
-rw-r--r--sql/old/3.3.5a/2012_02_11_07_world_sai.sql7
-rw-r--r--sql/old/3.3.5a/2012_02_11_08_world_sai.sql1
-rw-r--r--sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql88
-rw-r--r--sql/old/3.3.5a/2012_02_11_10_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/2012_02_12_00_world_gossip.sql132
-rw-r--r--sql/old/3.3.5a/2012_02_12_01_world_sai.sql243
-rw-r--r--sql/old/3.3.5a/2012_02_12_02_world_creature.sql57
-rw-r--r--sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql147
-rw-r--r--sql/old/3.3.5a/2012_02_12_04_world_sai.sql12
-rw-r--r--sql/updates/auth/2012_02_19_00_auth_account.sql2
-rw-r--r--sql/updates/characters/2012_02_19_00_characters_warden_action.sql7
-rw-r--r--sql/updates/world/2012_02_13_00_world_version.sql1
-rw-r--r--sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql7
-rw-r--r--sql/updates/world/2012_02_15_00_world_quest_template.sql1
-rw-r--r--sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql13
-rw-r--r--sql/updates/world/2012_02_15_02_world_item_template.sql3
-rw-r--r--sql/updates/world/2012_02_15_03_world_quest_template.sql18
-rw-r--r--sql/updates/world/2012_02_15_04_world_quest_template.sql17
-rw-r--r--sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql3
-rw-r--r--sql/updates/world/2012_02_15_07_00_world_creature.sql57
-rw-r--r--sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql147
-rw-r--r--sql/updates/world/2012_02_15_07_02_world_misc.sql120
-rw-r--r--sql/updates/world/2012_02_15_08_world_sai.sql9
-rw-r--r--sql/updates/world/2012_02_15_09_world_spell_proc_event.sql6
-rw-r--r--sql/updates/world/2012_02_16_00_world_conditions.sql12800
-rw-r--r--sql/updates/world/2012_02_16_01_world_conditions.sql3
-rw-r--r--sql/updates/world/2012_02_17_00_world_waypoints.sql77
-rw-r--r--sql/updates/world/2012_02_18_00_world_spell_script_names.sql69
-rw-r--r--sql/updates/world/2012_02_18_01_world_spell_dbc.sql3
-rw-r--r--sql/updates/world/2012_02_18_02_world_gossip.sql52
-rw-r--r--sql/updates/world/2012_02_18_03_world_gossip.sql1068
-rw-r--r--sql/updates/world/2012_02_18_04_world_spell_script_names.sql6
-rw-r--r--sql/updates/world/2012_02_18_05_world_creatures.sql3
-rw-r--r--sql/updates/world/2012_02_18_06_world_gossip.sql166
-rw-r--r--sql/updates/world/2012_02_18_07_world_gossip.sql44
-rw-r--r--sql/updates/world/2012_02_18_08_world_gossip.sql5
-rw-r--r--sql/updates/world/2012_02_19_00_world_quest_template.sql14
-rw-r--r--sql/updates/world/2012_02_19_01_world_quest_template.sql11
-rw-r--r--sql/updates/world/2012_02_19_02_world_gameobject.sql4
-rw-r--r--sql/updates/world/2012_02_19_03_world_warden_checks.sql802
-rw-r--r--sql/updates/world/2012_02_19_04_world_misc_db_updates.sql21
-rw-r--r--sql/updates/world/2012_02_19_05_world_say_text.sql7
-rw-r--r--sql/updates/world/2012_02_19_06_world_say_text.sql20
-rw-r--r--sql/updates/world/2012_02_20_00_world_sai.sql4
-rw-r--r--sql/updates/world/2012_02_20_01_world_misc_db.sql8
-rw-r--r--sql/updates/world/2012_02_20_02_world_conditons.sql275
-rw-r--r--sql/updates/world/2012_02_21_00_world_creature_loot_template.sql78
-rw-r--r--sql/updates/world/2012_02_21_01_world_conditions.sql3592
-rw-r--r--sql/updates/world/2012_02_21_02_world_creature_loot_template.sql11
-rw-r--r--sql/updates/world/2012_02_21_03_world_creature_loot_template.sql26
-rw-r--r--sql/updates/world/2012_02_21_04_world_creature_loot_template.sql16
-rw-r--r--sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql39
-rw-r--r--sql/updates/world/2012_02_21_06_world_Gossip.sql184
-rw-r--r--sql/updates/world/2012_02_22_00_world_SAI.sql39
-rw-r--r--sql/updates/world/2012_02_22_01_world_say_text.sql34
-rw-r--r--sql/updates/world/2012_02_22_02_world_misc.sql57
-rw-r--r--sql/updates/world/2012_02_22_03_world_conditions.sql3
-rwxr-xr-xsrc/server/authserver/Server/AuthSocket.cpp18
-rwxr-xr-xsrc/server/authserver/Server/AuthSocket.h1
-rwxr-xr-xsrc/server/authserver/Server/RealmSocket.cpp2
-rwxr-xr-xsrc/server/authserver/Server/RealmSocket.h3
-rwxr-xr-xsrc/server/collision/BoundingIntervalHierarchy.h22
-rw-r--r--src/server/collision/BoundingIntervalHierarchyWrapper.h109
-rw-r--r--src/server/collision/CMakeLists.txt27
-rw-r--r--src/server/collision/DynamicTree.cpp255
-rw-r--r--src/server/collision/DynamicTree.h62
-rw-r--r--src/server/collision/Management/VMapManager2.cpp3
-rwxr-xr-xsrc/server/collision/Management/VMapManager2.h2
-rw-r--r--src/server/collision/Maps/MapTree.cpp8
-rw-r--r--src/server/collision/Maps/TileAssembler.cpp379
-rwxr-xr-xsrc/server/collision/Maps/TileAssembler.h29
-rw-r--r--src/server/collision/Models/GameObjectModel.cpp173
-rw-r--r--src/server/collision/Models/GameObjectModel.h69
-rw-r--r--src/server/collision/Models/WorldModel.cpp4
-rwxr-xr-xsrc/server/collision/Models/WorldModel.h3
-rw-r--r--src/server/collision/RegularGrid.h218
-rw-r--r--src/server/collision/VMapDefinitions.h4
-rwxr-xr-xsrc/server/game/AI/CoreAI/CombatAI.cpp8
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp29
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.h2
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAI.cpp9
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAIMgr.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp13
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h5
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp56
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h13
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h16
-rwxr-xr-xsrc/server/game/Achievements/AchievementMgr.cpp3
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp36
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h1
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.cpp12
-rwxr-xr-xsrc/server/game/Battlegrounds/ArenaTeam.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp112
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.h16
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAA.cpp18
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.cpp39
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAB.h8
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundAV.cpp36
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundBE.cpp28
-rw-r--r--[-rwxr-xr-x]src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp63
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundDS.h21
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.cpp28
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundEY.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundIC.cpp28
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundNA.cpp20
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRB.cpp14
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRL.cpp20
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRV.cpp55
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundRV.h9
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundSA.cpp37
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundWS.cpp224
-rwxr-xr-xsrc/server/game/Battlegrounds/Zones/BattlegroundWS.h20
-rw-r--r--src/server/game/CMakeLists.txt8
-rwxr-xr-xsrc/server/game/Chat/Commands/Level1.cpp4
-rwxr-xr-xsrc/server/game/Chat/Commands/TicketCommands.cpp2
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp1531
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.h289
-rwxr-xr-xsrc/server/game/DataStores/DBCStores.cpp5
-rwxr-xr-xsrc/server/game/DataStores/DBCStructure.h2
-rwxr-xr-xsrc/server/game/DataStores/DBCfmt.h2
-rwxr-xr-xsrc/server/game/DungeonFinding/LFGMgr.cpp14
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp14
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.h3
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp124
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.h10
-rwxr-xr-xsrc/server/game/Entities/Item/Item.cpp37
-rwxr-xr-xsrc/server/game/Entities/Item/Item.h19
-rwxr-xr-xsrc/server/game/Entities/Object/Object.cpp72
-rwxr-xr-xsrc/server/game/Entities/Object/Object.h8
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp8
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp305
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h32
-rwxr-xr-xsrc/server/game/Entities/Transport/Transport.cpp4
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp369
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h33
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp9
-rw-r--r--src/server/game/Entities/Vehicle/VehicleDefines.h8
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp777
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h513
-rw-r--r--src/server/game/Grids/GridDefines.h10
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.cpp13
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h101
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiersImpl.h111
-rwxr-xr-xsrc/server/game/Groups/Group.cpp2
-rwxr-xr-xsrc/server/game/Handlers/AuctionHouseHandler.cpp260
-rwxr-xr-xsrc/server/game/Handlers/CalendarHandler.cpp4
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp11
-rwxr-xr-xsrc/server/game/Handlers/MiscHandler.cpp30
-rwxr-xr-xsrc/server/game/Handlers/NPCHandler.cpp16
-rwxr-xr-xsrc/server/game/Handlers/PetHandler.cpp1
-rwxr-xr-xsrc/server/game/Handlers/PetitionsHandler.cpp5
-rwxr-xr-xsrc/server/game/Handlers/QueryHandler.cpp2
-rwxr-xr-xsrc/server/game/Handlers/QuestHandler.cpp4
-rwxr-xr-xsrc/server/game/Handlers/SpellHandler.cpp18
-rwxr-xr-xsrc/server/game/Handlers/TaxiHandler.cpp9
-rwxr-xr-xsrc/server/game/Instances/InstanceScript.cpp2
-rwxr-xr-xsrc/server/game/Loot/LootMgr.cpp10
-rwxr-xr-xsrc/server/game/Maps/Map.cpp170
-rwxr-xr-xsrc/server/game/Maps/Map.h86
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h1108
-rwxr-xr-xsrc/server/game/Movement/MotionMaster.cpp209
-rwxr-xr-xsrc/server/game/Movement/MotionMaster.h47
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp2
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp2
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp11
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp21
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h5
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp23
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h5
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp2
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h2
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h16
-rw-r--r--src/server/game/Movement/Spline/Spline.cpp2
-rw-r--r--src/server/game/Movement/Spline/Spline.h6
-rwxr-xr-xsrc/server/game/Quests/QuestDef.cpp7
-rwxr-xr-xsrc/server/game/Quests/QuestDef.h22
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.cpp116
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.h38
-rwxr-xr-xsrc/server/game/Scripting/ScriptLoader.cpp4
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp16
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.h5
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp3
-rwxr-xr-xsrc/server/game/Server/WorldSession.cpp38
-rwxr-xr-xsrc/server/game/Server/WorldSession.h10
-rwxr-xr-xsrc/server/game/Server/WorldSocket.cpp20
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp8
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h7
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp76
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.h45
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2649
-rwxr-xr-xsrc/server/game/Spells/Spell.h193
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp813
-rw-r--r--src/server/game/Spells/SpellInfo.cpp430
-rw-r--r--src/server/game/Spells/SpellInfo.h36
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp15
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.h12
-rwxr-xr-xsrc/server/game/Spells/SpellScript.cpp23
-rwxr-xr-xsrc/server/game/Spells/SpellScript.h27
-rw-r--r--src/server/game/Tools/PlayerDump.cpp26
-rw-r--r--src/server/game/Warden/Modules/WardenModuleMac.h614
-rw-r--r--src/server/game/Warden/Modules/WardenModuleWin.h1204
-rw-r--r--src/server/game/Warden/Warden.cpp234
-rw-r--r--src/server/game/Warden/Warden.h147
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp196
-rw-r--r--src/server/game/Warden/WardenCheckMgr.h74
-rw-r--r--src/server/game/Warden/WardenMac.cpp260
-rw-r--r--src/server/game/Warden/WardenMac.h46
-rw-r--r--src/server/game/Warden/WardenWin.cpp523
-rw-r--r--src/server/game/Warden/WardenWin.h94
-rwxr-xr-xsrc/server/game/World/World.cpp28
-rwxr-xr-xsrc/server/game/World/World.h9
-rw-r--r--src/server/scripts/CMakeLists.txt4
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp8
-rw-r--r--src/server/scripts/Commands/cs_go.cpp2
-rw-r--r--src/server/scripts/Commands/cs_gps.cpp4
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/CMakeLists.txt1
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp115
-rw-r--r--src/server/scripts/EasternKingdoms/arathi_highlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/blasted_lands.cpp111
-rw-r--r--src/server/scripts/EasternKingdoms/searing_gorge.cpp179
-rw-r--r--src/server/scripts/EasternKingdoms/tirisfal_glades.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/westfall.cpp4
-rw-r--r--src/server/scripts/Examples/example_spell.cpp4
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp14
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp8
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp6
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp6
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp8
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp8
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp2
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp4
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp8
-rw-r--r--src/server/scripts/Kalimdor/desolace.cpp2
-rw-r--r--src/server/scripts/Kalimdor/durotar.cpp2
-rw-r--r--src/server/scripts/Kalimdor/dustwallow_marsh.cpp6
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp4
-rw-r--r--src/server/scripts/Kalimdor/mulgore.cpp2
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp2
-rw-r--r--src/server/scripts/Kalimdor/stonetalon_mountains.cpp2
-rw-r--r--src/server/scripts/Kalimdor/tanaris.cpp2
-rw-r--r--src/server/scripts/Kalimdor/the_barrens.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp3
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp4
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp6
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp12
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp6
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp4
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp10
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp154
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp16
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp12
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp8
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp2
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp8
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp16
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp8
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp1
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp35
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp19
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp12
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp2
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp53
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp9
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp6
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp71
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp12
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp30
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp8
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_moragg.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp18
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp2
-rw-r--r--src/server/scripts/Northrend/dalaran.cpp2
-rw-r--r--src/server/scripts/Northrend/grizzly_hills.cpp8
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp157
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp85
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp12
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp8
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp71
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp55
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp4
-rw-r--r--src/server/scripts/Outland/blades_edge_mountains.cpp8
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp2
-rw-r--r--src/server/scripts/Spells/CMakeLists.txt1
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp194
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp61
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp1104
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp110
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp718
-rw-r--r--src/server/scripts/Spells/spell_item.cpp1811
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp142
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp501
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp52
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp1090
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp282
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp308
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp169
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp305
-rwxr-xr-xsrc/server/scripts/World/achievement_scripts.cpp19
-rw-r--r--src/server/scripts/World/go_scripts.cpp2
-rw-r--r--src/server/scripts/World/item_scripts.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp148
-rw-r--r--src/server/shared/Cryptography/WardenKeyGeneration.h73
-rwxr-xr-xsrc/server/shared/Database/Implementation/CharacterDatabase.h2
-rwxr-xr-xsrc/server/shared/Database/Implementation/LoginDatabase.cpp2
-rwxr-xr-xsrc/server/shared/Database/MySQLConnection.h7
-rwxr-xr-xsrc/server/shared/Database/QueryResult.cpp32
-rwxr-xr-xsrc/server/shared/Database/QueryResult.h26
-rwxr-xr-xsrc/server/shared/Logging/Log.cpp24
-rwxr-xr-xsrc/server/shared/Logging/Log.h5
-rwxr-xr-xsrc/server/shared/Threading/Callback.h2
-rwxr-xr-xsrc/server/shared/Utilities/Util.cpp13
-rwxr-xr-xsrc/server/shared/Utilities/Util.h1
-rw-r--r--src/server/worldserver/CMakeLists.txt4
-rwxr-xr-xsrc/server/worldserver/TCSoap/TCSoap.cpp2
-rw-r--r--src/server/worldserver/worldserver.conf.dist100
-rw-r--r--src/tools/CMakeLists.txt4
-rw-r--r--src/tools/vmap3_extractor/model.h52
-rw-r--r--src/tools/vmap3_extractor/vmapexport.h13
-rw-r--r--src/tools/vmap4_assembler/CMakeLists.txt (renamed from src/tools/vmap3_assembler/CMakeLists.txt)13
-rw-r--r--src/tools/vmap4_assembler/VMapAssembler.cpp (renamed from src/tools/vmap3_assembler/VMapAssembler.cpp)0
-rw-r--r--src/tools/vmap4_extractor/CMakeLists.txt (renamed from src/tools/vmap3_extractor/CMakeLists.txt)10
-rw-r--r--src/tools/vmap4_extractor/adtfile.cpp (renamed from src/tools/vmap3_extractor/adtfile.cpp)69
-rw-r--r--src/tools/vmap4_extractor/adtfile.h (renamed from src/tools/vmap3_extractor/adtfile.h)22
-rw-r--r--src/tools/vmap4_extractor/dbcfile.cpp (renamed from src/tools/vmap3_extractor/dbcfile.cpp)18
-rw-r--r--src/tools/vmap4_extractor/dbcfile.h (renamed from src/tools/vmap3_extractor/dbcfile.h)18
-rw-r--r--src/tools/vmap4_extractor/gameobject_extract.cpp99
-rw-r--r--src/tools/vmap4_extractor/model.cpp (renamed from src/tools/vmap3_extractor/model.cpp)41
-rw-r--r--src/tools/vmap4_extractor/model.h77
-rw-r--r--src/tools/vmap4_extractor/modelheaders.h (renamed from src/tools/vmap3_extractor/modelheaders.h)18
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq.cpp (renamed from src/tools/vmap3_extractor/mpq_libmpq.cpp)0
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq04.h (renamed from src/tools/vmap3_extractor/mpq_libmpq04.h)13
-rw-r--r--src/tools/vmap4_extractor/vec3d.h (renamed from src/tools/vmap3_extractor/vec3d.h)0
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp (renamed from src/tools/vmap3_extractor/vmapexport.cpp)238
-rw-r--r--src/tools/vmap4_extractor/vmapexport.h42
-rw-r--r--src/tools/vmap4_extractor/wdtfile.cpp (renamed from src/tools/vmap3_extractor/wdtfile.cpp)18
-rw-r--r--src/tools/vmap4_extractor/wdtfile.h (renamed from src/tools/vmap3_extractor/wdtfile.h)0
-rw-r--r--src/tools/vmap4_extractor/wmo.cpp (renamed from src/tools/vmap3_extractor/wmo.cpp)20
-rw-r--r--src/tools/vmap4_extractor/wmo.h (renamed from src/tools/vmap3_extractor/wmo.h)18
530 files changed, 41952 insertions, 9520 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index efa8c4ba7bc..2a86ad75166 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -1,8 +1,8 @@
--- MySQL dump 10.11
+-- MySQL dump 10.13 Distrib 5.5.19, for Win64 (x86)
--
--- Host: localhost Database: realmd
+-- Host: localhost Database: auth
-- ------------------------------------------------------
--- Server version 5.0.45-Debian_1ubuntu3.1-log
+-- Server version 5.5.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -15,30 +15,6 @@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
---
--- Table structure for table `account_access`
---
-
-DROP TABLE IF EXISTS `account_access`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_access` (
- `id` int(11) unsigned NOT NULL,
- `gmlevel` tinyint(3) unsigned NOT NULL,
- `RealmID` int(11) NOT NULL default '-1',
- PRIMARY KEY (`id`,`RealmID`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_access`
---
-
-LOCK TABLES `account_access` WRITE;
-/*!40000 ALTER TABLE `account_access` DISABLE KEYS */;
-/*!40000 ALTER TABLE `account_access` ENABLE KEYS */;
-UNLOCK TABLES;
-
--
-- Table structure for table `account`
--
@@ -47,26 +23,27 @@ DROP TABLE IF EXISTS `account`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account` (
- `id` int(11) unsigned NOT NULL auto_increment COMMENT 'Identifier',
- `username` varchar(32) NOT NULL default '',
- `sha_pass_hash` varchar(40) NOT NULL default '',
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
+ `username` varchar(32) NOT NULL DEFAULT '',
+ `sha_pass_hash` varchar(40) NOT NULL DEFAULT '',
`sessionkey` longtext,
`v` longtext,
`s` longtext,
`email` text,
- `joindate` timestamp NOT NULL default CURRENT_TIMESTAMP,
- `last_ip` varchar(30) NOT NULL default '127.0.0.1',
- `failed_logins` int(11) unsigned NOT NULL default '0',
- `locked` tinyint(3) unsigned NOT NULL default '0',
- `last_login` timestamp NOT NULL default '0000-00-00 00:00:00',
- `online` tinyint(4) NOT NULL default '0',
- `expansion` tinyint(3) unsigned NOT NULL default '3',
- `mutetime` bigint(40) NOT NULL default '0',
- `locale` tinyint(3) unsigned NOT NULL default '0',
- `recruiter` int(11) NOT NULL default '0',
- PRIMARY KEY (`id`),
+ `joindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `last_ip` varchar(30) NOT NULL DEFAULT '127.0.0.1',
+ `failed_logins` int(11) unsigned NOT NULL DEFAULT '0',
+ `locked` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `online` tinyint(4) NOT NULL DEFAULT '0',
+ `expansion` tinyint(3) unsigned NOT NULL DEFAULT '2',
+ `mutetime` bigint(40) NOT NULL DEFAULT '0',
+ `locale` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `os` varchar(4) NOT NULL DEFAULT '',
+ `recruiter` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`),
UNIQUE KEY `idx_username` (`username`)
-) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC COMMENT='Account System';
+) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Account System';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -79,6 +56,30 @@ LOCK TABLES `account` WRITE;
UNLOCK TABLES;
--
+-- Table structure for table `account_access`
+--
+
+DROP TABLE IF EXISTS `account_access`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `account_access` (
+ `id` int(11) unsigned NOT NULL,
+ `gmlevel` tinyint(3) unsigned NOT NULL,
+ `RealmID` int(11) NOT NULL DEFAULT '-1',
+ PRIMARY KEY (`id`,`RealmID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `account_access`
+--
+
+LOCK TABLES `account_access` WRITE;
+/*!40000 ALTER TABLE `account_access` DISABLE KEYS */;
+/*!40000 ALTER TABLE `account_access` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
-- Table structure for table `account_banned`
--
@@ -86,13 +87,13 @@ DROP TABLE IF EXISTS `account_banned`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account_banned` (
- `id` int(11) NOT NULL default '0' COMMENT 'Account id',
- `bandate` bigint(40) NOT NULL default '0',
- `unbandate` bigint(40) NOT NULL default '0',
+ `id` int(11) NOT NULL DEFAULT '0' COMMENT 'Account id',
+ `bandate` bigint(40) NOT NULL DEFAULT '0',
+ `unbandate` bigint(40) NOT NULL DEFAULT '0',
`bannedby` varchar(50) NOT NULL,
`banreason` varchar(255) NOT NULL,
- `active` tinyint(4) NOT NULL default '1',
- PRIMARY KEY (`id`,`bandate`)
+ `active` tinyint(4) NOT NULL DEFAULT '1',
+ PRIMARY KEY (`id`,`bandate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Ban List';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -113,12 +114,12 @@ DROP TABLE IF EXISTS `ip_banned`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ip_banned` (
- `ip` varchar(32) NOT NULL default '127.0.0.1',
+ `ip` varchar(32) NOT NULL DEFAULT '127.0.0.1',
`bandate` bigint(40) NOT NULL,
`unbandate` bigint(40) NOT NULL,
- `bannedby` varchar(50) NOT NULL default '[Console]',
- `banreason` varchar(255) NOT NULL default 'no reason',
- PRIMARY KEY (`ip`,`bandate`)
+ `bannedby` varchar(50) NOT NULL DEFAULT '[Console]',
+ `banreason` varchar(255) NOT NULL DEFAULT 'no reason',
+ PRIMARY KEY (`ip`,`bandate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Banned IPs';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -163,11 +164,11 @@ DROP TABLE IF EXISTS `realmcharacters`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `realmcharacters` (
- `realmid` int(11) unsigned NOT NULL default '0',
+ `realmid` int(11) unsigned NOT NULL DEFAULT '0',
`acctid` bigint(20) unsigned NOT NULL,
- `numchars` tinyint(3) unsigned NOT NULL default '0',
- PRIMARY KEY (`realmid`,`acctid`),
- KEY (acctid)
+ `numchars` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`realmid`,`acctid`),
+ KEY `acctid` (`acctid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm Character Tracker';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -188,17 +189,17 @@ DROP TABLE IF EXISTS `realmlist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `realmlist` (
- `id` int(11) unsigned NOT NULL auto_increment,
- `name` varchar(32) NOT NULL default '',
- `address` varchar(32) NOT NULL default '127.0.0.1',
- `port` int(11) NOT NULL default '8085',
- `icon` tinyint(3) unsigned NOT NULL default '0',
- `color` tinyint(3) unsigned NOT NULL default '2',
- `timezone` tinyint(3) unsigned NOT NULL default '0',
- `allowedSecurityLevel` tinyint(3) unsigned NOT NULL default '0',
- `population` float unsigned NOT NULL default '0',
- `gamebuild` int(11) unsigned NOT NULL default '14545',
- PRIMARY KEY (`id`),
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(32) NOT NULL DEFAULT '',
+ `address` varchar(32) NOT NULL DEFAULT '127.0.0.1',
+ `port` int(11) NOT NULL DEFAULT '8085',
+ `icon` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `color` tinyint(3) unsigned NOT NULL DEFAULT '2',
+ `timezone` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `allowedSecurityLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `population` float unsigned NOT NULL DEFAULT '0',
+ `gamebuild` int(11) unsigned NOT NULL DEFAULT '14545',
+ PRIMARY KEY (`id`),
UNIQUE KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm System';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -223,12 +224,12 @@ DROP TABLE IF EXISTS `uptime`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `uptime` (
`realmid` int(11) unsigned NOT NULL,
- `starttime` bigint(20) unsigned NOT NULL default '0',
- `startstring` varchar(64) NOT NULL default '',
- `uptime` bigint(20) unsigned NOT NULL default '0',
- `maxplayers` smallint(5) unsigned NOT NULL default '0',
- `revision` VARCHAR(255) NOT NULL DEFAULT 'Trinitycore',
- PRIMARY KEY (`realmid`,`starttime`)
+ `starttime` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `startstring` varchar(64) NOT NULL DEFAULT '',
+ `uptime` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `maxplayers` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `revision` varchar(255) NOT NULL DEFAULT 'Trinitycore',
+ PRIMARY KEY (`realmid`,`starttime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -250,6 +251,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2008-01-10 11:37:06
-
--- Updated on 2010-01-29 23:21:45 GMT+1
+-- Dump completed on 2012-02-19 13:18:35
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 2d24e1918ad..5f4b90d9f17 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -1945,11 +1945,11 @@ DROP TABLE IF EXISTS `lfg_data`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lfg_data` (
- `guid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
- `dungeon` INT(10) UNSIGNED NOT NULL DEFAULT '0',
- `state` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
+ `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
+ `dungeon` int(10) unsigned NOT NULL DEFAULT '0',
+ `state` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
-) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='LFG Data';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='LFG Data';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -2207,6 +2207,29 @@ LOCK TABLES `reserved_name` WRITE;
UNLOCK TABLES;
--
+-- Table structure for table `warden_action`
+--
+
+DROP TABLE IF EXISTS `warden_action`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `warden_action` (
+ `wardenId` smallint(5) unsigned NOT NULL,
+ `action` tinyint(3) unsigned DEFAULT NULL,
+ PRIMARY KEY (`wardenId`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `warden_action`
+--
+
+LOCK TABLES `warden_action` WRITE;
+/*!40000 ALTER TABLE `warden_action` DISABLE KEYS */;
+/*!40000 ALTER TABLE `warden_action` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
-- Table structure for table `worldstates`
--
diff --git a/sql/updates/world/2012_01_08_00_world_version.sql b/sql/old/3.3.5a/2012_01_08_00_world_version.sql
index 721fea914f1..721fea914f1 100644
--- a/sql/updates/world/2012_01_08_00_world_version.sql
+++ b/sql/old/3.3.5a/2012_01_08_00_world_version.sql
diff --git a/sql/updates/world/2012_01_08_01_world_sai.sql b/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
index fcdc21662c0..fcdc21662c0 100644
--- a/sql/updates/world/2012_01_08_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_08_01_world_sai.sql
diff --git a/sql/updates/world/2012_01_08_02_world_creature_template.sql b/sql/old/3.3.5a/2012_01_08_02_world_creature_template.sql
index a544118aa4f..a544118aa4f 100644
--- a/sql/updates/world/2012_01_08_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_08_02_world_creature_template.sql
diff --git a/sql/updates/world/2012_01_08_03_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_08_03_world_gossip_menu.sql
index 6555d25fbc3..6555d25fbc3 100644
--- a/sql/updates/world/2012_01_08_03_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_08_03_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_08_04_world_quest_template.sql b/sql/old/3.3.5a/2012_01_08_04_world_quest_template.sql
index fdc3c401302..fdc3c401302 100644
--- a/sql/updates/world/2012_01_08_04_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_01_08_04_world_quest_template.sql
diff --git a/sql/updates/world/2012_01_08_05_world_conditions.sql b/sql/old/3.3.5a/2012_01_08_05_world_conditions.sql
index b8e43e7d0e2..b8e43e7d0e2 100644
--- a/sql/updates/world/2012_01_08_05_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_08_05_world_conditions.sql
diff --git a/sql/updates/world/2012_01_08_06_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_06_world_creature_text.sql
index 31331faaa95..31331faaa95 100644
--- a/sql/updates/world/2012_01_08_06_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_06_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_07_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_07_world_creature_text.sql
index 0cb9601a156..0cb9601a156 100644
--- a/sql/updates/world/2012_01_08_07_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_07_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_08_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_08_world_creature_text.sql
index 7c4a1f9ba7d..7c4a1f9ba7d 100644
--- a/sql/updates/world/2012_01_08_08_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_08_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_09_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_09_world_creature_text.sql
index 55f777dc733..55f777dc733 100644
--- a/sql/updates/world/2012_01_08_09_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_09_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_11_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_11_world_creature_text.sql
index ae4e544b3f7..ae4e544b3f7 100644
--- a/sql/updates/world/2012_01_08_11_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_11_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_12_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_12_world_creature_text.sql
index 13b452e7b6a..13b452e7b6a 100644
--- a/sql/updates/world/2012_01_08_12_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_12_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_13_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_13_world_creature_text.sql
index 83e9f70f049..83e9f70f049 100644
--- a/sql/updates/world/2012_01_08_13_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_13_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_14_world_creature_text.sql b/sql/old/3.3.5a/2012_01_08_14_world_creature_text.sql
index d62ac5fdd20..d62ac5fdd20 100644
--- a/sql/updates/world/2012_01_08_14_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_08_14_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_08_15_world_script_texts.sql b/sql/old/3.3.5a/2012_01_08_15_world_script_texts.sql
index b0614eda526..b0614eda526 100644
--- a/sql/updates/world/2012_01_08_15_world_script_texts.sql
+++ b/sql/old/3.3.5a/2012_01_08_15_world_script_texts.sql
diff --git a/sql/updates/world/2012_01_08_16_world_misc.sql b/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
index 63cd81ff869..63cd81ff869 100644
--- a/sql/updates/world/2012_01_08_16_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_08_16_world_misc.sql
diff --git a/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_08_18_world_achievement_criteria_data.sql
index e20fd1c55bb..e20fd1c55bb 100644
--- a/sql/updates/world/2012_01_08_18_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_08_18_world_creature_addon.sql b/sql/old/3.3.5a/2012_01_08_18_world_creature_addon.sql
index 7570cc14afe..7570cc14afe 100644
--- a/sql/updates/world/2012_01_08_18_world_creature_addon.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_creature_addon.sql
diff --git a/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql b/sql/old/3.3.5a/2012_01_08_18_world_spell_linked_spell.sql
index 927c6c0c663..927c6c0c663 100644
--- a/sql/updates/world/2012_01_08_18_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2012_01_08_18_world_waypoint_data.sql b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_data.sql
index e443f7c055a..e443f7c055a 100644
--- a/sql/updates/world/2012_01_08_18_world_waypoint_data.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_data.sql
diff --git a/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_scripts.sql
index f6c147155ea..f6c147155ea 100644
--- a/sql/updates/world/2012_01_08_18_world_waypoint_scripts.sql
+++ b/sql/old/3.3.5a/2012_01_08_18_world_waypoint_scripts.sql
diff --git a/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_08_19_world_achievement_criteria_data.sql
index 6cd1a367e81..6cd1a367e81 100644
--- a/sql/updates/world/2012_01_08_19_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_08_19_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_09_00_world_creature_text.sql b/sql/old/3.3.5a/2012_01_09_00_world_creature_text.sql
index 2a70be00b12..2a70be00b12 100644
--- a/sql/updates/world/2012_01_09_00_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_09_00_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_09_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_09_00_world_spell_script_names.sql
index 7279fc54413..7279fc54413 100644
--- a/sql/updates/world/2012_01_09_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_09_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_09_01_world_achievement_criteria_data.sql
index ae3c2ec960a..ae3c2ec960a 100644
--- a/sql/updates/world/2012_01_09_01_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_09_01_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_09_01_world_creature_text.sql b/sql/old/3.3.5a/2012_01_09_01_world_creature_text.sql
index d1ec26bd7f4..d1ec26bd7f4 100644
--- a/sql/updates/world/2012_01_09_01_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_09_01_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_09_01_world_smart_scripts.sql b/sql/old/3.3.5a/2012_01_09_01_world_smart_scripts.sql
index a7304fa6e6a..a7304fa6e6a 100644
--- a/sql/updates/world/2012_01_09_01_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_01_09_01_world_smart_scripts.sql
diff --git a/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_11_00_world_achievement_criteria_data.sql
index 6c5d8ae7866..6c5d8ae7866 100644
--- a/sql/updates/world/2012_01_11_00_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_11_00_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_11_00_world_disables.sql b/sql/old/3.3.5a/2012_01_11_00_world_disables.sql
index 18f9a5c3964..18f9a5c3964 100644
--- a/sql/updates/world/2012_01_11_00_world_disables.sql
+++ b/sql/old/3.3.5a/2012_01_11_00_world_disables.sql
diff --git a/sql/updates/world/2012_01_11_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_11_00_world_spell_script_names.sql
index 82428ef989e..82428ef989e 100644
--- a/sql/updates/world/2012_01_11_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_11_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_11_01_world_achievement_criteria_data.sql
index aa3ec94a5a8..aa3ec94a5a8 100644
--- a/sql/updates/world/2012_01_11_01_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_11_01_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_11_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_11_01_world_spell_script_names.sql
index 4600f190c4e..4600f190c4e 100644
--- a/sql/updates/world/2012_01_11_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_11_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_12_00_world_sai.sql b/sql/old/3.3.5a/2012_01_12_00_world_sai.sql
index 6acbd0bd293..6acbd0bd293 100644
--- a/sql/updates/world/2012_01_12_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_12_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_13_00_world_creature.sql b/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
index bb20ec25863..bb20ec25863 100644
--- a/sql/updates/world/2012_01_13_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_01_13_00_world_creature.sql
diff --git a/sql/updates/world/2012_01_13_01_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
index 968e169ecab..968e169ecab 100644
--- a/sql/updates/world/2012_01_13_01_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_13_01_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_13_02_world_sai.sql b/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
index 1a11714c5c7..1a11714c5c7 100644
--- a/sql/updates/world/2012_01_13_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_13_02_world_sai.sql
diff --git a/sql/updates/world/2012_01_13_03_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
index 98dda69bf1a..98dda69bf1a 100644
--- a/sql/updates/world/2012_01_13_03_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_13_03_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_13_04_world_creature_texts.sql b/sql/old/3.3.5a/2012_01_13_04_world_creature_texts.sql
index ffab5673873..ffab5673873 100644
--- a/sql/updates/world/2012_01_13_04_world_creature_texts.sql
+++ b/sql/old/3.3.5a/2012_01_13_04_world_creature_texts.sql
diff --git a/sql/updates/world/2012_01_13_05_world_creature_texts.sql b/sql/old/3.3.5a/2012_01_13_05_world_creature_texts.sql
index 87aee698a11..87aee698a11 100644
--- a/sql/updates/world/2012_01_13_05_world_creature_texts.sql
+++ b/sql/old/3.3.5a/2012_01_13_05_world_creature_texts.sql
diff --git a/sql/updates/world/2012_01_13_06_world_creature_text.sql b/sql/old/3.3.5a/2012_01_13_06_world_creature_text.sql
index 99429cfad5f..99429cfad5f 100644
--- a/sql/updates/world/2012_01_13_06_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_13_06_world_creature_text.sql
diff --git a/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql b/sql/old/3.3.5a/2012_01_14_00_characters_lfg_data.sql
index 3c6671a3914..3c6671a3914 100644
--- a/sql/updates/characters/2012_01_14_00_characters_lfg_data.sql
+++ b/sql/old/3.3.5a/2012_01_14_00_characters_lfg_data.sql
diff --git a/sql/updates/world/2012_01_14_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_01_14_00_world_gossip_menu.sql
index f328d101c57..f328d101c57 100644
--- a/sql/updates/world/2012_01_14_00_world_gossip_menu.sql
+++ b/sql/old/3.3.5a/2012_01_14_00_world_gossip_menu.sql
diff --git a/sql/updates/world/2012_01_14_01_world_npc_trainer.sql b/sql/old/3.3.5a/2012_01_14_01_world_npc_trainer.sql
index 0f3e598b5a3..0f3e598b5a3 100644
--- a/sql/updates/world/2012_01_14_01_world_npc_trainer.sql
+++ b/sql/old/3.3.5a/2012_01_14_01_world_npc_trainer.sql
diff --git a/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_01_14_02_world_spell_proc_event.sql
index 846afdda6cc..846afdda6cc 100644
--- a/sql/updates/world/2012_01_14_02_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2012_01_14_02_world_spell_proc_event.sql
diff --git a/sql/updates/world/2012_01_14_03_world_trinity_string.sql b/sql/old/3.3.5a/2012_01_14_03_world_trinity_string.sql
index 7dab007f774..7dab007f774 100644
--- a/sql/updates/world/2012_01_14_03_world_trinity_string.sql
+++ b/sql/old/3.3.5a/2012_01_14_03_world_trinity_string.sql
diff --git a/sql/updates/world/2012_01_15_00_world_loot_template.sql b/sql/old/3.3.5a/2012_01_15_00_world_loot_template.sql
index af61833536d..af61833536d 100644
--- a/sql/updates/world/2012_01_15_00_world_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_00_world_loot_template.sql
diff --git a/sql/updates/world/2012_01_15_02_world_creature_template.sql b/sql/old/3.3.5a/2012_01_15_02_world_creature_template.sql
index 4b6dcad8a33..4b6dcad8a33 100644
--- a/sql/updates/world/2012_01_15_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_02_world_creature_template.sql
diff --git a/sql/updates/world/2012_01_15_03_world_item_loot_template.sql b/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
index bbe9994e897..bbe9994e897 100644
--- a/sql/updates/world/2012_01_15_03_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_15_03_world_item_loot_template.sql
diff --git a/sql/updates/world/2012_01_16_00_world_stored_procedure.sql b/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
index 4a5b66df7b2..4a5b66df7b2 100644
--- a/sql/updates/world/2012_01_16_00_world_stored_procedure.sql
+++ b/sql/old/3.3.5a/2012_01_16_00_world_stored_procedure.sql
diff --git a/sql/updates/world/2012_01_16_01_world_sai.sql b/sql/old/3.3.5a/2012_01_16_01_world_sai.sql
index 881f6cb919c..881f6cb919c 100644
--- a/sql/updates/world/2012_01_16_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_01_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_02_world_sai.sql b/sql/old/3.3.5a/2012_01_16_02_world_sai.sql
index 435675fd143..435675fd143 100644
--- a/sql/updates/world/2012_01_16_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_02_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_03_world_sai.sql b/sql/old/3.3.5a/2012_01_16_03_world_sai.sql
index f5e0d90983f..f5e0d90983f 100644
--- a/sql/updates/world/2012_01_16_03_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_03_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_04_world_sai.sql b/sql/old/3.3.5a/2012_01_16_04_world_sai.sql
index 85087a57dec..85087a57dec 100644
--- a/sql/updates/world/2012_01_16_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_04_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_05_world_sai.sql b/sql/old/3.3.5a/2012_01_16_05_world_sai.sql
index d5966dfc3ec..d5966dfc3ec 100644
--- a/sql/updates/world/2012_01_16_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_05_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_06_world_sai.sql b/sql/old/3.3.5a/2012_01_16_06_world_sai.sql
index 62231b60fdc..62231b60fdc 100644
--- a/sql/updates/world/2012_01_16_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_06_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_07_world_sai.sql b/sql/old/3.3.5a/2012_01_16_07_world_sai.sql
index 79324bd2c0b..79324bd2c0b 100644
--- a/sql/updates/world/2012_01_16_07_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_07_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_08_world_sai.sql b/sql/old/3.3.5a/2012_01_16_08_world_sai.sql
index 0857b8fd45b..0857b8fd45b 100644
--- a/sql/updates/world/2012_01_16_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_08_world_sai.sql
diff --git a/sql/updates/world/2012_01_16_09_world_sai.sql b/sql/old/3.3.5a/2012_01_16_09_world_sai.sql
index d82fc341ff0..d82fc341ff0 100644
--- a/sql/updates/world/2012_01_16_09_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_16_09_world_sai.sql
diff --git a/sql/updates/world/2012_01_17_00_world_misc.sql b/sql/old/3.3.5a/2012_01_17_00_world_misc.sql
index 300d239bd43..300d239bd43 100644
--- a/sql/updates/world/2012_01_17_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_17_00_world_misc.sql
diff --git a/sql/updates/world/2012_01_17_01_world_conditions.sql b/sql/old/3.3.5a/2012_01_17_01_world_conditions.sql
index 6c562ba4d45..6c562ba4d45 100644
--- a/sql/updates/world/2012_01_17_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_17_01_world_conditions.sql
diff --git a/sql/updates/world/2012_01_19_00_world_quest_template.sql b/sql/old/3.3.5a/2012_01_19_00_world_quest_template.sql
index f1af6e7eedd..f1af6e7eedd 100644
--- a/sql/updates/world/2012_01_19_00_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_01_19_00_world_quest_template.sql
diff --git a/sql/updates/world/2012_01_19_01_world_sai.sql b/sql/old/3.3.5a/2012_01_19_01_world_sai.sql
index 969eea6c4dd..969eea6c4dd 100644
--- a/sql/updates/world/2012_01_19_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_01_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_02_world_quest_template.sql b/sql/old/3.3.5a/2012_01_19_02_world_quest_template.sql
index 7bff373242d..7bff373242d 100644
--- a/sql/updates/world/2012_01_19_02_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_01_19_02_world_quest_template.sql
diff --git a/sql/updates/world/2012_01_19_03_world_sai.sql b/sql/old/3.3.5a/2012_01_19_03_world_sai.sql
index 6588e6a1ba8..6588e6a1ba8 100644
--- a/sql/updates/world/2012_01_19_03_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_03_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_04_world_sai.sql b/sql/old/3.3.5a/2012_01_19_04_world_sai.sql
index 6c1530ce4ee..6c1530ce4ee 100644
--- a/sql/updates/world/2012_01_19_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_04_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_05_world_sai.sql b/sql/old/3.3.5a/2012_01_19_05_world_sai.sql
index 2e6a743167e..2e6a743167e 100644
--- a/sql/updates/world/2012_01_19_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_05_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_06_world_sai.sql b/sql/old/3.3.5a/2012_01_19_06_world_sai.sql
index 817d6bd9aaa..817d6bd9aaa 100644
--- a/sql/updates/world/2012_01_19_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_06_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_07_world_sai.sql b/sql/old/3.3.5a/2012_01_19_07_world_sai.sql
index 3b0e27667e6..3b0e27667e6 100644
--- a/sql/updates/world/2012_01_19_07_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_07_world_sai.sql
diff --git a/sql/updates/world/2012_01_19_08_world_sai.sql b/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
index 5b26998a607..5b26998a607 100644
--- a/sql/updates/world/2012_01_19_08_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_19_08_world_sai.sql
diff --git a/sql/updates/world/2012_01_21_00_world_creature.sql b/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
index b4a015380c3..b4a015380c3 100644
--- a/sql/updates/world/2012_01_21_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_01_21_00_world_creature.sql
diff --git a/sql/updates/world/2012_01_21_00_world_sai.sql b/sql/old/3.3.5a/2012_01_21_00_world_sai.sql
index e275c521e74..e275c521e74 100644
--- a/sql/updates/world/2012_01_21_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_21_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_21_01_world_npc_vendor.sql b/sql/old/3.3.5a/2012_01_21_01_world_npc_vendor.sql
index f8c7d0f4327..f8c7d0f4327 100644
--- a/sql/updates/world/2012_01_21_01_world_npc_vendor.sql
+++ b/sql/old/3.3.5a/2012_01_21_01_world_npc_vendor.sql
diff --git a/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_21_02_world_achievement_criteria_data.sql
index a9c2781d57f..a9c2781d57f 100644
--- a/sql/updates/world/2012_01_21_02_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_21_02_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_22_00_world_command.sql b/sql/old/3.3.5a/2012_01_22_00_world_command.sql
index c87b7b3f825..c87b7b3f825 100644
--- a/sql/updates/world/2012_01_22_00_world_command.sql
+++ b/sql/old/3.3.5a/2012_01_22_00_world_command.sql
diff --git a/sql/updates/world/2012_01_22_00_world_sai.sql b/sql/old/3.3.5a/2012_01_22_00_world_sai.sql
index 8df31981de1..8df31981de1 100644
--- a/sql/updates/world/2012_01_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_22_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_22_01_world_conditions.sql b/sql/old/3.3.5a/2012_01_22_01_world_conditions.sql
index 9aaea4f8ac1..9aaea4f8ac1 100644
--- a/sql/updates/world/2012_01_22_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_22_01_world_conditions.sql
diff --git a/sql/updates/world/2012_01_22_02_world_creature_addon.sql b/sql/old/3.3.5a/2012_01_22_02_world_creature_addon.sql
index 808d728610e..808d728610e 100644
--- a/sql/updates/world/2012_01_22_02_world_creature_addon.sql
+++ b/sql/old/3.3.5a/2012_01_22_02_world_creature_addon.sql
diff --git a/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql b/sql/old/3.3.5a/2012_01_23_00_characters_character_queststatus_rewarded.sql
index d81cf3a6617..d81cf3a6617 100644
--- a/sql/updates/characters/2012_01_23_00_characters_character_queststatus_rewarded.sql
+++ b/sql/old/3.3.5a/2012_01_23_00_characters_character_queststatus_rewarded.sql
diff --git a/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql b/sql/old/3.3.5a/2012_01_23_00_world_game_event_seasonal_questrelation.sql
index 40bf28a1ead..40bf28a1ead 100644
--- a/sql/updates/world/2012_01_23_00_world_game_event_seasonal_questrelation.sql
+++ b/sql/old/3.3.5a/2012_01_23_00_world_game_event_seasonal_questrelation.sql
diff --git a/sql/updates/world/2012_01_23_00_world_sai.sql b/sql/old/3.3.5a/2012_01_23_00_world_sai.sql
index d73561b6cd6..d73561b6cd6 100644
--- a/sql/updates/world/2012_01_23_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_23_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_23_01_world_creature_script_names.sql b/sql/old/3.3.5a/2012_01_23_01_world_creature_script_names.sql
index d7c2b22725e..d7c2b22725e 100644
--- a/sql/updates/world/2012_01_23_01_world_creature_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_23_01_world_creature_script_names.sql
diff --git a/sql/updates/world/2012_01_23_02_world_disables.sql b/sql/old/3.3.5a/2012_01_23_02_world_disables.sql
index 0a1be704dac..0a1be704dac 100644
--- a/sql/updates/world/2012_01_23_02_world_disables.sql
+++ b/sql/old/3.3.5a/2012_01_23_02_world_disables.sql
diff --git a/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
index 4d1f4536455..4d1f4536455 100644
--- a/sql/updates/world/2012_01_23_03_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_23_03_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_23_04_world_creature_text.sql b/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
index f505a86b16c..f505a86b16c 100644
--- a/sql/updates/world/2012_01_23_04_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_23_04_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_23_05_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_23_05_world_spell_script_names.sql
index 6f3b4907e5b..6f3b4907e5b 100644
--- a/sql/updates/world/2012_01_23_05_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_23_05_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_01_23_06_world_achievement_criteria_data.sql
index 33899c3f512..33899c3f512 100644
--- a/sql/updates/world/2012_01_23_06_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_01_23_06_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_01_23_07_world_creature_text.sql b/sql/old/3.3.5a/2012_01_23_07_world_creature_text.sql
index 90ac11e363c..90ac11e363c 100644
--- a/sql/updates/world/2012_01_23_07_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_01_23_07_world_creature_text.sql
diff --git a/sql/updates/world/2012_01_24_00_world_misc.sql b/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
index 8703cd7aa42..8703cd7aa42 100644
--- a/sql/updates/world/2012_01_24_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_24_00_world_misc.sql
diff --git a/sql/updates/world/2012_01_24_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_24_00_world_spell_script_names.sql
index 0e772c3c200..0e772c3c200 100644
--- a/sql/updates/world/2012_01_24_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_24_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_26_00_world_sai.sql b/sql/old/3.3.5a/2012_01_26_00_world_sai.sql
index ee69e263e2e..ee69e263e2e 100644
--- a/sql/updates/world/2012_01_26_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_01_26_00_world_sai.sql
diff --git a/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql b/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
index 1dc2749807e..1dc2749807e 100644
--- a/sql/updates/world/2012_01_27_00_world_player_factionchange_items.sql
+++ b/sql/old/3.3.5a/2012_01_27_00_world_player_factionchange_items.sql
diff --git a/sql/updates/world/2012_01_28_00_world_conditions.sql b/sql/old/3.3.5a/2012_01_28_00_world_conditions.sql
index e66d893db35..e66d893db35 100644
--- a/sql/updates/world/2012_01_28_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_28_00_world_conditions.sql
diff --git a/sql/updates/world/2012_01_29_00_world_conditions.sql b/sql/old/3.3.5a/2012_01_29_00_world_conditions.sql
index 8a04993a03e..8a04993a03e 100644
--- a/sql/updates/world/2012_01_29_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_29_00_world_conditions.sql
diff --git a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql b/sql/old/3.3.5a/2012_01_29_00_world_spell_dbc.sql
index bbde43e3313..bbde43e3313 100644
--- a/sql/updates/world/2012_01_29_00_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2012_01_29_00_world_spell_dbc.sql
diff --git a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_01_29_01_world_spell_bonus_data.sql
index d31489b8fce..d31489b8fce 100644
--- a/sql/updates/world/2012_01_29_01_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_01_29_01_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql b/sql/old/3.3.5a/2012_01_29_02_world_spell_trigger_spell.sql
index 13f9380c950..13f9380c950 100644
--- a/sql/updates/world/2012_01_29_02_world_spell_trigger_spell.sql
+++ b/sql/old/3.3.5a/2012_01_29_02_world_spell_trigger_spell.sql
diff --git a/sql/updates/world/2012_01_29_03_world_misc.sql b/sql/old/3.3.5a/2012_01_29_03_world_misc.sql
index 3253b5cd55b..3253b5cd55b 100644
--- a/sql/updates/world/2012_01_29_03_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_29_03_world_misc.sql
diff --git a/sql/updates/world/2012_01_29_04_world_misc.sql b/sql/old/3.3.5a/2012_01_29_04_world_misc.sql
index 3686957e433..3686957e433 100644
--- a/sql/updates/world/2012_01_29_04_world_misc.sql
+++ b/sql/old/3.3.5a/2012_01_29_04_world_misc.sql
diff --git a/sql/updates/world/2012_01_30_00_world_conditions.sql b/sql/old/3.3.5a/2012_01_30_00_world_conditions.sql
index 48b9c63b5cb..48b9c63b5cb 100644
--- a/sql/updates/world/2012_01_30_00_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_30_00_world_conditions.sql
diff --git a/sql/updates/world/2012_01_30_01_world_conditions.sql b/sql/old/3.3.5a/2012_01_30_01_world_conditions.sql
index bcaf0af435a..bcaf0af435a 100644
--- a/sql/updates/world/2012_01_30_01_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_01_30_01_world_conditions.sql
diff --git a/sql/updates/world/2012_01_30_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_01_30_01_world_spell_script_names.sql
index 6e4b10094e5..6e4b10094e5 100644
--- a/sql/updates/world/2012_01_30_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_01_30_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_01_30_02_world_creature_loot_template.sql
index 429d470a77f..429d470a77f 100644
--- a/sql/updates/world/2012_01_30_02_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_02_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_01_30_03_world_creature_loot_template.sql
index 531c472c263..531c472c263 100644
--- a/sql/updates/world/2012_01_30_03_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_03_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
index 3ef39fe43d2..3ef39fe43d2 100644
--- a/sql/updates/world/2012_01_30_04_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_04_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_30_05_world_gameobject_loot_template.sql
index 8196663eebe..8196663eebe 100644
--- a/sql/updates/world/2012_01_30_05_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_01_30_05_world_gameobject_loot_template.sql
diff --git a/sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..91f26990488
--- /dev/null
+++ b/sql/old/3.3.5a/2012_01_31_00_world_gameobject_loot_template.sql
@@ -0,0 +1,136 @@
+-- Change all Copper Ore Nodes in the Underlight Mines to be other id
+UPDATE `gameobject` SET `id`=181248 WHERE `guid` IN (75024,75051,75090,75099,75105) AND `id`=1731;
+-- Same for the Tin Nodes in the Underlight Mines
+UPDATE `gameobject` SET `id`=181249 WHERE `guid` IN (75025,75052,75091,75100,75106) AND `id`=1732;
+
+-- Change all Copper Ore Nodes in Beal Modan to match the other id
+UPDATE `gameobject` SET `id`=103713 WHERE `guid` IN (5096,13067,120336) AND `id` IN (1731,3763);
+
+-- fix wrongly increased counts (aka cata guildperk changed data)
+-- Copper
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1502 AND `item`=2770;
+UPDATE `gameobject_loot_template` SET `maxcount`=6 WHERE `entry`=1502 AND `item`=2835;
+-- Tin
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1503 AND `item`=2771;
+UPDATE `gameobject_loot_template` SET `maxcount`=7 WHERE `entry`=1503 AND `item`=2836;
+-- Silver
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1504 AND `item`=2775;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1504 AND `item`=2775;
+-- Iron
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1505 AND `item`=2772;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1505 AND `item`=2772;
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1505 AND `item`=2838;
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1505 AND `item`=2838;
+-- Gold
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=1506 AND `item`=2776;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=1506 AND `item`=2776;
+-- Mithril
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=1742 AND `item`=3858;
+UPDATE `gameobject_loot_template` SET `maxcount`=7 WHERE `entry`=1742 AND `item`=7912;
+-- Truesilver
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=5045 AND `item`=7911;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=5045 AND `item`=7911;
+-- Small Thorium
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=1 WHERE `entry`=9597 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=9597 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `maxcount`=4 WHERE `entry`=9597 AND `item`=12365;
+-- Rich Thorium
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=2 WHERE `entry`=12883 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `maxcount`=5 WHERE `entry`=12883 AND `item`=10620;
+UPDATE `gameobject_loot_template` SET `mincountOrRef`=2 WHERE `entry`=12883 AND `item`=12365;
+UPDATE `gameobject_loot_template` SET `maxcount`=6 WHERE `entry`=12883 AND `item`=12365;
+
+-- Remove Underlight Ore from all other copper ore nodes:
+DELETE FROM `gameobject_loot_template` WHERE `item`=22634; -- Underlight Ore
+DELETE FROM `gameobject_loot_template` WHERE `item`=2798; -- Rethban Ore
+DELETE FROM `gameobject_loot_template` WHERE `item`=11513; -- Tainted Vitriol
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup`=17939 AND `SourceEntry`=11513;
+
+-- Set LootIDvariables for Special Nodes
+SET @CopperUM := 18092;
+SET @TinUM := 18093;
+SET @CopperRR := 1735;
+SET @TinRR := 1736;
+SET @CopperB := 2626;
+SET @TinB := 2627;
+SET @GoldOoze := 17939;
+SET @MithrilFW := 13961;
+SET @TruesilverFW := 17938;
+SET @ThoriumFW := 13960;
+SET @ThoriumGems = 12900;
+
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@CopperUM,@CopperRR,@TinUM,@TinRR,@CopperB,@TinB,@GoldOoze,@MithrilFW,@TruesilverFW,@ThoriumFW);
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Underlight Mine Special Nodes
+(@CopperUM,2770,100,1,0,1,5), -- Copper Ore
+(@CopperUM,2835, 25,1,0,1,6), -- Rough Stone
+(@CopperUM,774 ,5,1,1,1,1), -- Malachite
+(@CopperUM,1210,5,1,1,1,1), -- Shadowgem
+(@CopperUM,818 ,5,1,1,1,1), -- Tigerseye
+(@CopperUM,22634,-100,1,0,1,2), -- Underlight Ore (only if on quest)
+-- Chanced Tin also have to drop it
+(@TinUM,2771,100,1,0,1,5), -- Tin Ore
+(@TinUM,2836,25,1,0,1,7), -- Coarse Stone
+(@TinUM,1206,5,1,1,1,1), -- Moss Agate
+(@TinUM,1705,5,1,1,1,1), -- Lesser Moonstone
+(@TinUM,1210,5,1,1,1,1), -- Shadowgem
+(@TinUM,1529,5,1,1,1,1), -- Jade
+(@TinUM,22634,-100,1,0,1,2), -- Underlight Ore (only on quest)
+-- Redridge Special Nodes
+(@CopperRR,2770,100,1,0,1,5), -- Copper Ore
+(@CopperRR,2835, 25,1,0,1,6), -- Rough Stone
+(@CopperRR,774 ,5,1,1,1,1), -- Malachite
+(@CopperRR,1210,5,1,1,1,1), -- Shadowgem
+(@CopperRR,818 ,5,1,1,1,1), -- Tigerseye
+(@CopperRR,2798,-100,1,0,1,4), -- Rethban Ore
+-- Chanced Tin also have to drop it
+(@TinRR,2771,100,1,0,1,5), -- Tin Ore
+(@TinRR,2836,25,1,0,1,7), -- Coarse Stone
+(@TinRR,1206,5,1,1,1,1), -- Moss Agate
+(@TinRR,1705,5,1,1,1,1), -- Lesser Moonstone
+(@TinRR,1210,5,1,1,1,1), -- Shadowgem
+(@TinRR,1529,5,1,1,1,1), -- Jade
+(@TinRR,2798,-100,1,0,1,2), -- Rethban Ore (only on quest)
+-- The Barrens Copper Vein contain Blood Shards
+(@CopperB,2770,100,1,0,1,5), -- Copper Ore
+(@CopperB,2835, 25,1,0,1,6), -- Rough Stone
+(@CopperB,774 ,5,1,1,1,1), -- Malachite
+(@CopperB,1210,5,1,1,1,1), -- Shadowgem
+(@CopperB,818 ,5,1,1,1,1), -- Tigerseye
+(@CopperB,5075,5,1,1,1,3), -- Blood Shard (only in barrens)
+-- Chanced Tin also have to drop it
+(@TinB,2771,100,1,0,1,5), -- Tin Ore
+(@TinB,2836,25,1,0,1,7), -- Coarse Stone
+(@TinB,1206,5,1,1,1,1), -- Moss Agate
+(@TinB,1705,5,1,1,1,1), -- Lesser Moonstone
+(@TinB,1210,5,1,1,1,1), -- Shadowgem
+(@TinB,1529,5,1,1,1,1), -- Jade
+(@TinB,5075,5,1,1,1,4), -- Blood Shard (only in barrens ?)
+-- Ooze Covered Gold Vein
+(@GoldOoze,2776,100,1,0,2,4), -- Gold Ore
+(@GoldOoze,3864,5,1,1,1,1), -- Citrine
+(@GoldOoze,1705,5,1,1,1,1), -- Lesser Moonstone
+(@GoldOoze,7909,5,1,1,1,1), -- Aquamarine
+-- Felwood Mithril Vein
+(@MithrilFW,3858,100,1,0,1,5), -- Mithril Ore
+(@MithrilFW,7912,80,1,0,1,7), -- Solid Stone
+(@MithrilFW,7909,5,1,1,1,1), -- Aquamarine
+(@MithrilFW,3864,5,1,1,1,1), -- Citrine
+(@MithrilFW,7910,5,1,1,1,1), -- Star Ruby
+(@MithrilFW,9262,5,1,1,1,1), -- Black Vitriol
+(@MithrilFW,11513,25,1,0,1,4), -- Tainted Vitriol
+-- Chanced Truesilver also needs it
+(@TruesilverFW,7911,100,1,0,1,4), -- Truesilver Ore
+(@TruesilverFW,7909,5,1,1,1,1), -- Aquamarine
+(@TruesilverFW,3864,5,1,1,1,1), -- Citrine
+(@TruesilverFW,7910,5,1,1,1,1), -- Star Ruby
+(@TruesilverFW,11513,25,1,0,1,4), -- Tainted Vitriol
+-- Chance Thoriuym also needs it
+-- Small Thorium Vein+Tainted Vitriol
+(@ThoriumFW,10620,100,1,0,1,8), -- Thorium Ore
+(@ThoriumFW,12365,100,1,0,1,10), -- Dense Stone
+(@ThoriumFW,1,15,1,0,-@ThoriumGems,1), -- One From Gems
+(@ThoriumFW,11513,50,1,0,1,1); -- Tainted Vitriol
+
+
diff --git a/sql/old/3.3.5a/2012_01_31_01_world_misc.sql b/sql/old/3.3.5a/2012_01_31_01_world_misc.sql
new file mode 100644
index 00000000000..c359f186431
--- /dev/null
+++ b/sql/old/3.3.5a/2012_01_31_01_world_misc.sql
@@ -0,0 +1,8 @@
+-- Delete the criteria from the disables table
+DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3880;
+
+-- criteria data for achievement Not So Fast
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=3880;
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `TYPE`, `value1`, `value2`, `ScriptName`) VALUES
+(3880,6,3277,0, ''),
+(3880,7,23451,0, '');
diff --git a/sql/old/3.3.5a/2012_02_01_00_world_misc.sql b/sql/old/3.3.5a/2012_02_01_00_world_misc.sql
new file mode 100644
index 00000000000..e137f7a8238
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_01_00_world_misc.sql
@@ -0,0 +1,5 @@
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=9798 AND `type`=6;
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=63399;
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUES
+(63399, 'spell_gen_tournament_pennant');
diff --git a/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql b/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
new file mode 100644
index 00000000000..4223835bee3
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_02_00_world_item_loot_template.sql
@@ -0,0 +1,60 @@
+-- Update reference for hallowed end
+SET @Ref := 10020;
+DELETE FROM `reference_loot_template` WHERE `entry` IN (@Ref,10021);
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Masks
+(@Ref,20391,2,1,0,1,1), -- Flimsy Male Gnome Mask
+(@Ref,20392,2,1,0,1,1), -- Flimsy Female Gnome Mask
+(@Ref,20561,2,1,0,1,1), -- Flimsy Male Dwarf Mask
+(@Ref,20562,2,1,0,1,1), -- Flimsy Female Dwarf Mask
+(@Ref,20563,2,1,0,1,1), -- Flimsy Female Night Elf Mask
+(@Ref,20564,2,1,0,1,1), -- Flimsy Male Night Elf Mask
+(@Ref,20565,2,1,0,1,1), -- Flimsy Female Human Mask
+(@Ref,20566,2,1,0,1,1), -- Flimsy Male Human Mask
+(@Ref,20567,2,1,0,1,1), -- Flimsy Female Troll Mask
+(@Ref,20568,2,1,0,1,1), -- Flimsy Male Troll Mask
+(@Ref,20569,2,1,0,1,1), -- Flimsy Female Orc Mask
+(@Ref,20570,2,1,0,1,1), -- Flimsy Male Orc Mask
+(@Ref,20571,2,1,0,1,1), -- Flimsy Female Tauren Mask
+(@Ref,20572,2,1,0,1,1), -- Flimsy Male Tauren Mask
+(@Ref,20573,2,1,0,1,1), -- Flimsy Male Undead Mask
+(@Ref,20574,2,1,0,1,1), -- Flimsy Female Undead Mask
+(@Ref,34000,2,1,0,1,1), -- Flimsy Female Blood Elf Mask
+(@Ref,34001,2,1,0,1,1), -- Flimsy Female Draenei Mask
+(@Ref,34002,2,1,0,1,1), -- Flimsy Male Blood Elf Mask
+(@Ref,34003,2,1,0,1,1), -- Flimsy Male Draenei Mask
+-- Wands
+(@Ref,20397,2,1,0,1,1), -- Hallowed Wand - Pirate
+(@Ref,20398,2,1,0,1,1), -- Hallowed Wand - Ninja
+(@Ref,20399,2,1,0,1,1), -- Hallowed Wand - Leper Gnome
+(@Ref,20409,2,1,0,1,1), -- Hallowed Wand - Ghost
+(@Ref,20410,2,1,0,1,1), -- Hallowed Wand - Bat
+(@Ref,20411,2,1,0,1,1), -- Hallowed Wand - Skeleton
+(@Ref,20413,2,1,0,1,1), -- Hallowed Wand - Random
+(@Ref,20414,2,1,0,1,1), -- Hallowed Wand - Wisp
+-- Pets
+(@Ref,33154,5,1,0,1,1), -- Sinister Squashling
+(@Ref,33292,5,1,0,1,1), -- Hallowed Helm
+-- Candies
+(@Ref,20388,15,1,0,4,6), -- Lollipop
+(@Ref,20389,15,1,0,4,6), -- Candy Corn
+(@Ref,20390,15,1,0,4,6), -- Candy Bar
+(@Ref,37604,30,1,0,10,10), -- Tooth Pick
+(@Ref,37582,30,1,0,1,2), -- Pyroblast Cinnamon Ball
+(@Ref,37583,30,1,0,1,2), -- G.N.E.R.D.S.
+(@Ref,37584,30,1,0,1,2), -- Soothing Spearmint Candy
+(@Ref,37585,30,1,0,1,2), -- Chewy Fel Taffy
+(@Ref,37606,15,1,0,1,1); -- Penny Pouch
+
+-- Assign loot to the special bags
+DELETE FROM `item_loot_template` WHERE `entry` IN (54516,37586);
+INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Loot Filled Pumpkin:
+(54516,33226,100,1,0,2,3), -- Tricky Treat
+(54516,1,100,1,0,-@Ref,1), -- Referenced Specials
+(54516,33808,2,1,0,1,1), -- The Horseman's Helm
+(54516,38175,2,1,0,1,1), -- The Horseman's Blade
+(54516,37012,0.1,1,0,1,1), -- The Horseman's Reins
+-- Handfull of Treats:
+(37586,33226,100,1,0,2,3), -- Tricky Treat
+(37586,1,100,1,0,-@Ref,1); -- Referenced Specials
diff --git a/sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql
new file mode 100644
index 00000000000..e56662f2e9d
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_03_00_world_gossip_menu.sql
@@ -0,0 +1,2196 @@
+-- XXXXXXXXXXXXXXXXXXXXX
+-- X Mage Trainers X
+-- XXXXXXXXXXXXXXXXXXXXX
+
+-- Gossip Condition for Mage Trainers
+SET @GOSSIP := 63; -- http://www.wowhead.com/npc=2128 "Tirisfal Glades" http://www.wowhead.com/npc=23103 "Undercity"
+SET @TEXTYES := 562;
+SET @TEXTNO := 563;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=23103;
+
+SET @GOSSIP := 64; -- http://www.wowhead.com/npc=5880 "Durotar"
+SET @TEXTYES := 564;
+SET @TEXTNO := 565;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4484; -- http://www.wowhead.com/npc=5498 "Stormwind City"
+SET @TEXTYES := 538;
+SET @TEXTNO := 539;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4485; -- http://www.wowhead.com/npc=5497 "Stormwind City"
+SET @TEXTYES := 538;
+SET @TEXTNO := 539;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4486; -- http://www.wowhead.com/npc=331 "Stormwind City"
+SET @TEXTYES := 538;
+SET @TEXTNO := 539;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4517; -- http://www.wowhead.com/npc=7311 "Orgrimmar"
+SET @TEXTYES := 564;
+SET @TEXTNO := 565;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4518; -- http://old.wowhead.com/npc=5883 "Orgrimmar"
+SET @TEXTYES := 564;
+SET @TEXTNO := 565;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4519; -- http://old.wowhead.com/npc=5885 "Orgrimmar"
+SET @TEXTYES := 564;
+SET @TEXTNO := 565;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4520; -- http://old.wowhead.com/npc=5882 "Orgrimmar"
+SET @TEXTYES := 564;
+SET @TEXTNO := 565;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4537; -- http://www.wowhead.com/npc=4568 "Undercity"
+SET @TEXTYES := 562;
+SET @TEXTNO := 563;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4538; -- http://www.wowhead.com/npc=4567 "Undercity"
+SET @TEXTYES := 562;
+SET @TEXTNO := 563;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4539; -- http://www.wowhead.com/npc=4566 "Undercity"
+SET @TEXTYES := 562;
+SET @TEXTNO := 563;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4552; -- http://www.wowhead.com/npc=5144 5145,5146,7312 "Ironforge"
+SET @TEXTYES := 560;
+SET @TEXTNO := 561;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4651; -- http://old.wowhead.com/npc=5884 "Durotar"
+SET @TEXTYES := 564;
+SET @TEXTNO := 565;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4654; -- http://www.wowhead.com/npc=2124 "Tirisfal Glades"
+SET @TEXTYES := 562;
+SET @TEXTNO := 563;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4660; -- http://www.wowhead.com/npc=198 "Elwynn Forest"
+SET @TEXTYES := 538;
+SET @TEXTNO := 539;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4661; -- http://www.wowhead.com/npc=328 "Elwynn Forest"
+SET @TEXTYES := 538;
+SET @TEXTNO := 539;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4685; -- http://www.wowhead.com/npc=1228 "Dun Morogh"
+SET @TEXTYES := 558;
+SET @TEXTNO := 559;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 4686; -- http://old.wowhead.com/npc=944 "Dun Morogh"
+SET @TEXTYES := 560;
+SET @TEXTNO := 561;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 6648; -- 15279,16269,16651,16652,16653 "Blood elf Mage trainers"
+SET @TEXTYES := 9190;
+SET @TEXTNO := 9191;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 7264; -- 16500,16749,17481,17513,17514 "Draenei Mage Trainers"
+SET @TEXTYES := 8589;
+SET @TEXTNO := 8590;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 9990; -- http://www.wowhead.com/npc=28956 28958 "Dalaran Mage Trainers"
+SET @TEXTYES := 13845;
+SET @TEXTNO := 13846;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+SET @GOSSIP := 9580; -- http://www.wowhead.com/npc=27704 "Dustwallow Marsh"
+SET @TEXTYES := 12929;
+SET @TEXTNO := 12930;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=27704;
+
+-- Gossip Condition for Mage Trainers
+SET @GOSSIP := 7366; -- http://www.wowhead.com/npc=17105 "Darnassus"
+SET @TEXTYES := 8799;
+SET @TEXTNO := 8800;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=17105;
+
+-- Gossip Condition for Mage Trainers
+SET @GOSSIP := 4535; -- http://www.wowhead.com/npc=3049 "Thunder Bluff"
+SET @TEXTYES := 562;
+SET @TEXTNO := 663;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3049;
+
+-- XXXXXXXXXXXXXXXXXXXXXX
+-- X Warlock Trainers X
+-- XXXXXXXXXXXXXXXXXXXXXX
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 1503;
+SET @TEXTYES := 2175;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 1522;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 2381;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5723;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 2383;
+SET @TEXTYES := 5714;
+SET @TEXTNO := 5715;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 2384;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4503;
+SET @TEXTYES := 5693;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4504;
+SET @TEXTYES := 5693;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4505;
+SET @TEXTYES := 5693;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4566;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4567;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5723;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4603;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5723;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4604;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5723;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4609;
+SET @TEXTYES := 5719;
+SET @TEXTNO := 5720;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I submit myself for further training my master.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4610;
+SET @TEXTYES := 5719;
+SET @TEXTNO := 5720;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I submit myself for further training, my master.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=4565;
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4641;
+SET @TEXTYES := 5714;
+SET @TEXTNO := 5715;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4643;
+SET @TEXTYES := 5714;
+SET @TEXTNO := 5715;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4655;
+SET @TEXTYES := 5719;
+SET @TEXTNO := 5720;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I submit myself for further training my master.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4656;
+SET @TEXTYES := 5719;
+SET @TEXTNO := 5720;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I submit myself for further training my master.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4667;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4681;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5723;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4682;
+SET @TEXTYES := 2193;
+SET @TEXTNO := 5722;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 6628;
+SET @TEXTYES := 7882;
+SET @TEXTNO := 7903;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 7437;
+SET @TEXTYES := 9006;
+SET @TEXTNO := 7903;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in warlock training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"Learn about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 7566;
+SET @TEXTYES := 9184;
+SET @TEXTNO := 9185;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"It is a greater knowledge of the ways of the warlock that I crave.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warlock Trainers
+SET @GOSSIP := 4642;
+SET @TEXTYES := 5714;
+SET @TEXTNO := 5715;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,256,0,0,0,'','Show gossip text if player is a Warlock'),
+(14,@GOSSIP,@TEXTNO,0,15,1279,0,0,0,'','Show gossip text if player is not a Warlock');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"It is a greater knowledge of the ways of the warlock that I crave.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=988;
+
+-- XXXXXXXXXXXXXXXXXXXXXX
+-- X Paladin Trainers X
+-- XXXXXXXXXXXXXXXXXXXXXX
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 2304;
+SET @TEXTYES := 2999;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5149;
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4556;
+SET @TEXTYES := 3974;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5148;
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4557;
+SET @TEXTYES := 3974;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5147;
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4469;
+SET @TEXTYES := 3976;
+SET @TEXTNO := 3977;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4470;
+SET @TEXTYES := 3976;
+SET @TEXTNO := 3977;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4471;
+SET @TEXTYES := 3976;
+SET @TEXTNO := 3977;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4662;
+SET @TEXTYES := 3976;
+SET @TEXTNO := 3977;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=8140;
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4463;
+SET @TEXTYES := 3976;
+SET @TEXTNO := 3977;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4464;
+SET @TEXTYES := 3976;
+SET @TEXTNO := 3977;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4477;
+SET @TEXTYES := 3974;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4478;
+SET @TEXTYES := 3974;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 7260;
+SET @TEXTYES := 8582;
+SET @TEXTNO := 8584;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 8111;
+SET @TEXTYES := 10040;
+SET @TEXTNO := 10041;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- XXXXXXXXXXXXXXXXXXXXXX
+-- X Warrior Trainers X
+-- XXXXXXXXXXXXXXXXXXXXXX
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 523;
+SET @TEXTYES := 1040;
+SET @TEXTNO := 4985;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=985;
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 655;
+SET @TEXTYES := 1218;
+SET @TEXTNO := 4973;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3408;
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 656;
+SET @TEXTYES := 1219;
+SET @TEXTNO := 4984;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4091;
+SET @TEXTYES := 4992;
+SET @TEXTNO := 4993;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Yes. I have.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4475;
+SET @TEXTYES := 1216;
+SET @TEXTNO := 5721;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4481;
+SET @TEXTYES := 1216;
+SET @TEXTNO := 5721;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4482;
+SET @TEXTYES := 1216;
+SET @TEXTNO := 5721;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4509;
+SET @TEXTYES := 1040;
+SET @TEXTNO := 4985;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4511;
+SET @TEXTYES := 1040;
+SET @TEXTNO := 4985;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4525;
+SET @TEXTYES := 1218;
+SET @TEXTNO := 4973;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4526;
+SET @TEXTYES := 1218;
+SET @TEXTNO := 4973;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4527;
+SET @TEXTYES := 1218;
+SET @TEXTNO := 4973;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4546;
+SET @TEXTYES := 1219;
+SET @TEXTNO := 4984;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4547;
+SET @TEXTYES := 1219;
+SET @TEXTNO := 4984;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4548;
+SET @TEXTYES := 1219;
+SET @TEXTNO := 4984;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4568;
+SET @TEXTYES := 4989;
+SET @TEXTNO := 4988;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4569;
+SET @TEXTYES := 1215;
+SET @TEXTNO := 5724;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4570;
+SET @TEXTYES := 1215;
+SET @TEXTNO := 5724;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4578;
+SET @TEXTYES := 1217;
+SET @TEXTNO := 5725;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=4089;
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4579;
+SET @TEXTYES := 1217;
+SET @TEXTNO := 5725;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4581;
+SET @TEXTYES := 1217;
+SET @TEXTNO := 5725;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4645;
+SET @TEXTYES := 1218;
+SET @TEXTNO := 4973;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4649;
+SET @TEXTYES := 1216;
+SET @TEXTNO := 5721;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4650;
+SET @TEXTYES := 1216;
+SET @TEXTNO := 5721;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4653;
+SET @TEXTYES := 1219;
+SET @TEXTNO := 4984;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=2119;
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4683;
+SET @TEXTYES := 1215;
+SET @TEXTNO := 5724;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4684;
+SET @TEXTYES := 1215;
+SET @TEXTNO := 5724;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4696;
+SET @TEXTYES := 1217;
+SET @TEXTNO := 5725;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 4697;
+SET @TEXTYES := 1217;
+SET @TEXTNO := 5725;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Warrior Trainers
+SET @GOSSIP := 7263;
+SET @TEXTYES := 8587;
+SET @TEXTNO := 8588;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1,0,0,0,'','Show gossip text if player is a Warrior'),
+(14,@GOSSIP,@TEXTNO,0,15,1534,0,0,0,'','Show gossip text if player is not a Warrior');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require warrior training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- XXXXXXXXXXXXXXXXXXXXXX
+-- X Druid Trainers X
+-- XXXXXXXXXXXXXXXXXXXXXX
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 1403;
+SET @TEXTYES := 4786;
+SET @TEXTNO := 2037;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 3921;
+SET @TEXTYES := 4774;
+SET @TEXTNO := 4775;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 3924;
+SET @TEXTYES := 4782;
+SET @TEXTNO := 4781;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 3925;
+SET @TEXTYES := 4784;
+SET @TEXTNO := 4783;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=9465;
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 3926;
+SET @TEXTYES := 4786;
+SET @TEXTNO := 4785;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4507;
+SET @TEXTYES := 4784;
+SET @TEXTNO := 4783;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=5506;
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4508;
+SET @TEXTYES := 4784;
+SET @TEXTNO := 4783;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4571;
+SET @TEXTYES := 4782;
+SET @TEXTNO := 4781;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4605;
+SET @TEXTYES := 5716;
+SET @TEXTNO := 5717;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4606;
+SET @TEXTYES := 5716;
+SET @TEXTNO := 5717;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4607;
+SET @TEXTYES := 5716;
+SET @TEXTNO := 5717;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4687;
+SET @TEXTYES := 4784;
+SET @TEXTNO := 4783;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4688;
+SET @TEXTYES := 4784;
+SET @TEXTNO := 4783;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3597;
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 7567;
+SET @TEXTYES := 9195;
+SET @TEXTNO := 9194;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 4646;
+SET @TEXTYES := 5716;
+SET @TEXTNO := 5717;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=8142;
+
+-- Gossip Condition for Druid Trainers
+SET @GOSSIP := 7567;
+SET @TEXTYES := 9195;
+SET @TEXTNO := 9194;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,1024,0,0,0,'','Show gossip text if player is a Druid'),
+(14,@GOSSIP,@TEXTNO,0,15,511,0,0,0,'','Show gossip text if player is not a Druid');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training as a druid.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
diff --git a/sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql b/sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql
new file mode 100644
index 00000000000..9871fbf979e
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_03_01_world_quest_template.sql
@@ -0,0 +1,2 @@
+-- Set quest "Feedin' Da Goolz" available to all races
+UPDATE `quest_template` SET `RequiredRaces`=1791 WHERE `id`=12652;
diff --git a/sql/old/3.3.5a/2012_02_04_00_world_creature.sql b/sql/old/3.3.5a/2012_02_04_00_world_creature.sql
new file mode 100644
index 00000000000..ffc5dfe773b
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_04_00_world_creature.sql
@@ -0,0 +1,5 @@
+-- Adds missing spirit healer in Desolace
+SET @GUID := 40269;
+DELETE FROM `creature` WHERE `guid`=@GUID AND `id`=6491;
+INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES
+(@GUID, 6491, 1, 1, 1, 0, 0, -452.182, 2513.69, 92.8852, 6.1809, 300, 0, 0, 4120, 0, 0, 0, 0, 0);
diff --git a/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql b/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
new file mode 100644
index 00000000000..d824c35da51
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_04_00_world_gameobject_template.sql
@@ -0,0 +1,2 @@
+-- set correct type from sniff
+UPDATE `gameobject_template` SET `type`=33 WHERE `entry`=166872;
diff --git a/sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql b/sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql
new file mode 100644
index 00000000000..9cae36ec0a9
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_04_00_world_gossip_menu.sql
@@ -0,0 +1,7 @@
+UPDATE `creature_template` SET `gossip_menu_id`=4677 WHERE `entry`=1232;
+UPDATE `creature_template` SET `gossip_menu_id`=4678 WHERE `entry`=629;
+
+-- Insert npc_text from sniff
+DELETE FROM `npc_text` WHERE `ID` IN (9195);
+INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`lang0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`prob1`,`text1_0`,`text1_1`,`lang1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`prob2`,`text2_0`,`text2_1`,`lang2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`prob3`,`text3_0`,`text3_1`,`lang3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`prob4`,`text4_0`,`text4_1`,`lang4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`prob5`,`text5_0`,`text5_1`,`lang5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`prob6`,`text6_0`,`text6_1`,`lang6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`prob7`,`text7_0`,`text7_1`,`lang7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES
+(9195,1,'Greetings, my $g brother : sister;. How can I guide you today?','Greetings, my $g brother : sister;. How can I guide you today?',7,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,1);
diff --git a/sql/old/3.3.5a/2012_02_04_01_world_creature.sql b/sql/old/3.3.5a/2012_02_04_01_world_creature.sql
new file mode 100644
index 00000000000..09f135c2715
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_04_01_world_creature.sql
@@ -0,0 +1,12 @@
+-- Spawn Petrov
+SET @GUID :=40268;
+DELETE FROM `creature` WHERE `id`=26932;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID,26932,571,1,1,0,0,4698.392,-4004.781,212.3551,0.5061455,300,0,0,1,0,0,0,0,0);
+
+-- Template updates for creature 26932 (Petrov)
+UPDATE `creature_template` SET `baseattacktime`=1500,`unit_flags`=`unit_flags`|512 WHERE `entry`=26932; -- Petrov
+-- Addon data for creature 26932 (Petrov)
+DELETE FROM `creature_template_addon` WHERE `entry`=26932;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(26932,0,0,257,333, NULL); -- Petrov
diff --git a/sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql b/sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql
new file mode 100644
index 00000000000..31751f9f324
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_00_world_creature_template.sql
@@ -0,0 +1,2 @@
+-- Set correct faction from sniff
+UPDATE `creature_template` SET `faction_A`= 16,`faction_H`=16 WHERE `entry`=26231;
diff --git a/sql/old/3.3.5a/2012_02_05_00_world_misc.sql b/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
new file mode 100644
index 00000000000..c5c4cfc43a6
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_00_world_misc.sql
@@ -0,0 +1,126 @@
+-- Argent Tournament Trainers part
+SET @SPELL_ON_ARGENT_MOUNT := 63034;
+
+SET @NPC_JAERAN_LOCKWOOD := 33973;
+SET @QUEST_MASTERY_OF_MELEE_A := 13828;
+SET @QUEST_MASTERY_OF_MELEE_H := 13829;
+
+SET @GOSSIP_MENU_JERAN_MOUNTED := 10398;
+SET @GOSSIP_MENU_JERAN_EXPLANATION := 10397; -- From Aokromes Sniffs
+
+SET @GOSSIP_TEXT_JERAN_MOUNTED := 14431;
+SET @GOSSIP_TEXT_JERAN_EXPLANATION := 14434;
+SET @SPELL_CREDIT_JERAN := 64113;
+
+SET @NPC_RUGAN_STEELBELLY := 33972;
+SET @QUEST_MASTERY_OF_CHARGE_A := 13837;
+SET @QUEST_MASTERY_OF_CHARGE_H := 13839;
+
+SET @GOSSIP_MENU_RUGAN_MOUNTED := 10400;
+SET @GOSSIP_MENU_RUGAN_EXPLANATION := 10399; -- From Aokromes Sniffs
+
+SET @GOSSIP_TEXT_RUGAN_MOUNTED := 14436;
+SET @GOSSIP_TEXT_RUGAN_EXPLANATION := 14437;
+SET @SPELL_CREDIT_RUGAN := 64114;
+
+SET @NPC_VALIS_WINDCHASER := 33974;
+SET @QUEST_MASTERY_OF_SH_BREAKER_A := 13835;
+SET @QUEST_MASTERY_OF_SH_BREAKER_H := 13838;
+
+SET @GOSSIP_MENU_VALIS_MOUNTED := 10402;
+SET @GOSSIP_MENU_VALIS_EXPLANATION := 10401; -- From Aokromes Sniffs
+
+SET @GOSSIP_TEXT_VALIS_MOUNTED := 14438;
+SET @GOSSIP_TEXT_VALIS_EXPLANATION := 14439;
+SET @SPELL_CREDIT_VALIS := 64115;
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER) AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_JAERAN_LOCKWOOD,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_TEXT_JERAN_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send different gossip when mounted (Requires conditions)'),
+(@NPC_JAERAN_LOCKWOOD,0,1,3,62,0,100,0,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send text when option clicked'),
+(@NPC_JAERAN_LOCKWOOD,0,2,3,62,0,100,0,@GOSSIP_MENU_JERAN_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Send text when option clicked'),
+(@NPC_JAERAN_LOCKWOOD,0,3,4,61,0,100,0,0,0,0,0,11,@SPELL_CREDIT_JERAN,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Give Credit'),
+(@NPC_JAERAN_LOCKWOOD,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Jeran Lockwood - Close Gossip'),
+
+(@NPC_RUGAN_STEELBELLY,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_RUGAN_MOUNTED,@GOSSIP_TEXT_RUGAN_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Send different gossip when mounted (Requires conditions)'),
+(@NPC_RUGAN_STEELBELLY,0,1,3,62,0,100,0,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Send text when option clicked'),
+(@NPC_RUGAN_STEELBELLY,0,2,3,62,0,100,0,@GOSSIP_MENU_RUGAN_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Send text when option clicked'),
+(@NPC_RUGAN_STEELBELLY,0,3,4,61,0,100,0,0,0,0,0,11,@SPELL_CREDIT_RUGAN,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Give Credit'),
+(@NPC_RUGAN_STEELBELLY,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rugan Steelbelly - Close Gossip'),
+
+(@NPC_VALIS_WINDCHASER,0,0,0,64,0,100,0,0,0,0,0,98,@GOSSIP_MENU_VALIS_MOUNTED,@GOSSIP_TEXT_VALIS_MOUNTED,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Send different gossip when mounted (Requires conditions)'),
+(@NPC_VALIS_WINDCHASER,0,1,3,62,0,100,0,@GOSSIP_MENU_VALIS_MOUNTED,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Send text when option clicked'),
+(@NPC_VALIS_WINDCHASER,0,2,3,62,0,100,0,@GOSSIP_TEXT_VALIS_EXPLANATION,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Send text when option clicked'),
+(@NPC_VALIS_WINDCHASER,0,3,4,61,0,100,0,0,0,0,0,11,@SPELL_CREDIT_VALIS,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Give Credit'),
+(@NPC_VALIS_WINDCHASER,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Valis Windchaser - Close Gossip');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_MENU_RUGAN_MOUNTED,@GOSSIP_MENU_VALIS_MOUNTED);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,1,@NPC_JAERAN_LOCKWOOD,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'','SAI - Jeran Lockwood show different menu if player mounted'),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,9,@QUEST_MASTERY_OF_MELEE_A,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,1,9,@QUEST_MASTERY_OF_MELEE_H,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,0,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,0,9,@QUEST_MASTERY_OF_MELEE_A,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,1,9,@QUEST_MASTERY_OF_MELEE_H,0,0,0,'',"Jeran Lockwood - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_JERAN_MOUNTED,1,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Jeran Lockwood - Show gossip if player has aura"),
+
+(22,1,@NPC_RUGAN_STEELBELLY,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'','SAI - Rugan Steelbelly show different menu if player mounted'),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,0,9,@QUEST_MASTERY_OF_CHARGE_A,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,1,9,@QUEST_MASTERY_OF_CHARGE_H,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,0,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,0,9,@QUEST_MASTERY_OF_CHARGE_A,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,1,9,@QUEST_MASTERY_OF_CHARGE_H,0,0,0,'',"Rugan Steelbelly - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_RUGAN_MOUNTED,1,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Rugan Steelbelly - Show gossip if player has aura"),
+
+(22,1,@NPC_VALIS_WINDCHASER,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'','SAI - Valis Windchaser show different menu if player mounted'),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,0,9,@QUEST_MASTERY_OF_SH_BREAKER_A,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,1,9,@QUEST_MASTERY_OF_SH_BREAKER_H,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,0,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,0,9,@QUEST_MASTERY_OF_SH_BREAKER_A,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,0,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,1,9,@QUEST_MASTERY_OF_SH_BREAKER_H,0,0,0,'',"Valis Windchaser - Show gossip if player has quest"),
+(15,@GOSSIP_MENU_VALIS_MOUNTED,1,0,1,1,@SPELL_ON_ARGENT_MOUNT,0,0,0,'',"Valis Windchaser - Show gossip if player has aura");
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (@GOSSIP_MENU_JERAN_EXPLANATION,@GOSSIP_MENU_RUGAN_EXPLANATION,@GOSSIP_MENU_VALIS_EXPLANATION);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(@GOSSIP_MENU_JERAN_EXPLANATION,@GOSSIP_TEXT_JERAN_EXPLANATION),
+(@GOSSIP_MENU_RUGAN_EXPLANATION,@GOSSIP_TEXT_RUGAN_EXPLANATION),
+(@GOSSIP_MENU_VALIS_EXPLANATION,@GOSSIP_TEXT_VALIS_EXPLANATION);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIP_MENU_JERAN_MOUNTED,@GOSSIP_MENU_JERAN_EXPLANATION,@GOSSIP_MENU_RUGAN_MOUNTED,@GOSSIP_MENU_RUGAN_EXPLANATION,@GOSSIP_MENU_VALIS_MOUNTED,@GOSSIP_MENU_VALIS_EXPLANATION);
+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_MENU_JERAN_MOUNTED,0,0,'Show me how to train with a Melee Target.',1,1,0,0,0,0,''),
+(@GOSSIP_MENU_JERAN_MOUNTED,1,0,'Tell me more about Defend and Thrust!',1,1,@GOSSIP_MENU_JERAN_EXPLANATION,0,0,0,''),
+(@GOSSIP_MENU_JERAN_EXPLANATION,0,0,'Show me how to train with a Melee Target.',1,1,0,0,0,0,''),
+
+(@GOSSIP_MENU_RUGAN_MOUNTED,0,0,'Show me how to train with a Charge Target.',1,1,0,0,0,0,''),
+(@GOSSIP_MENU_RUGAN_MOUNTED,1,0,'Tell me more about the Charge!',1,1,@GOSSIP_MENU_RUGAN_EXPLANATION,0,0,0,''),
+(@GOSSIP_MENU_RUGAN_EXPLANATION,0,0,'Show me how to train with a Charge Target.',1,1,0,0,0,0,''),
+
+(@GOSSIP_MENU_VALIS_MOUNTED,0,0,'Show me how to train with a Ranged Target.',1,1,0,0,0,0,''),
+(@GOSSIP_MENU_VALIS_MOUNTED,1,0,'Tell me more about the Shield-Breaker!',1,1,@GOSSIP_MENU_VALIS_EXPLANATION,0,0,0,''),
+(@GOSSIP_MENU_VALIS_EXPLANATION,0,0,'Show me how to train with a Ranged Target.',1,1,0,0,0,0,'');
+
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_JAERAN_LOCKWOOD,@NPC_RUGAN_STEELBELLY,@NPC_VALIS_WINDCHASER);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_JAERAN_LOCKWOOD,0,0,'Put up defend$B|TInterface\\Icons\\ability_warrior_shieldmastery.blp:32|t$BThen use Thrust on a Melee Target$B|TInterface\\Icons\\inv_sword_65.blp:32|t',42,0,0,0,0,0,'Argent Tournament - Melee Tutorial'),
+(@NPC_RUGAN_STEELBELLY,0,0,'Use Shield-Breaker on a Charge Target$B|TInterface\\Icons\\ability_warrior_shieldbreak.blp:32|t$BFollow up with Charge while the target is vulnerable$B|TInterface\\Icons\\ability_mount_charger.blp:32|t',42,0,0,0,0,0,'Argent Tournament - Charge Tutorial'),
+(@NPC_VALIS_WINDCHASER,0,0,'Use Shield-Breaker on a Ranged Target$B|TInterface\\Icons\\ability_warrior_shieldbreak.blp:32|t$BThen use Shield-Breaker while the target is defenseless$B|TInterface\\Icons\\ability_warrior_shieldbreak.blp:32|t',42,0,0,0,0,0,'Argent Tournament - Ranged Tutorial');
+
+-- Training Dummies Part
+UPDATE `creature_template` SET `ScriptName` = 'npc_tournament_training_dummy' WHERE `entry` IN (33272,33229,33243);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=62709;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,62709,0,0,18,1,33845,0,0, '','Counterattack! (Argent Tournament) - Target near aspirant mounts'),
+(13,0,62709,0,0,18,1,33323,0,0, '','Counterattack! (Argent Tournament) - Target near aspirant mounts');
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=62709;
+INSERT INTO `spell_script_names` VALUES (62709, 'spell_gen_tournament_counterattack');
diff --git a/sql/old/3.3.5a/2012_02_05_01_world_game_event.sql b/sql/old/3.3.5a/2012_02_05_01_world_game_event.sql
new file mode 100644
index 00000000000..61c7e7db5ab
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_01_world_game_event.sql
@@ -0,0 +1 @@
+UPDATE `game_event` SET `start_time`= '2012-02-05 00:01:00', `holiday`=423 WHERE `eventEntry`=8; -- Love is in the Air
diff --git a/sql/old/3.3.5a/2012_02_05_02_world_creature.sql b/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
new file mode 100644
index 00000000000..7426b7ef8b0
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_02_world_creature.sql
@@ -0,0 +1,22 @@
+-- add spawn for Saragosa
+SET @GUID := 40270;
+DELETE FROM `creature` WHERE `id`=26231;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID,26231,571,1,1,0,0,3981.03687,7148.006,666.1618,1.037019,120,0,0,1,0,0,0,0,0);
+-- Pathing for Saragosa Entry: 26231
+
+SET @PATH = @GUID*10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2 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`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,3972.692,7139.177,666.609,0,0,0,0,100,0),
+(@PATH,2,3973.208,7140.034,666.609,0,0,0,0,100,0),
+(@PATH,3,3981.671,7149.173,666.2463,0,0,0,0,100,0),
+(@PATH,4,3989.375,7172.479,669.3846,0,0,0,0,100,0),
+(@PATH,5,3998.89,7199.31,674.7188,0,0,0,0,100,0),
+(@PATH,6,4012.167,7242.467,666.8287,0,0,0,0,100,0),
+(@PATH,7,4020.924,7276.525,652.9682,0,0,0,0,100,0),
+(@PATH,8,4026.488,7297.103,640.2736,0,0,0,0,100,0),
+(@PATH,9,4026.488,7297.103,640.2736,0,0,0,0,100,0);
diff --git a/sql/old/3.3.5a/2012_02_05_03_world_game_event.sql b/sql/old/3.3.5a/2012_02_05_03_world_game_event.sql
new file mode 100644
index 00000000000..157a2e9194c
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_03_world_game_event.sql
@@ -0,0 +1 @@
+UPDATE `game_event` SET `length`=20160 WHERE `eventEntry`=8; -- Love is in the Air
diff --git a/sql/old/3.3.5a/2012_02_05_04_world_misc.sql b/sql/old/3.3.5a/2012_02_05_04_world_misc.sql
new file mode 100644
index 00000000000..0d72b08167e
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_04_world_misc.sql
@@ -0,0 +1,11 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=56278;
+
+DELETE FROM `db_script_string` WHERE `entry`=2000000077;
+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
+(2000000077,'%s gestures to the pitcher of water sitting on the edge of the well.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+
+SET @GOSSIP := 4535;
+SET @OLD := 663;
+SET @NEW := 563;
+UPDATE `conditions` SET `SourceEntry`=@NEW WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=@GOSSIP AND `SourceEntry`=@OLD;
+UPDATE `gossip_menu` SET `text_id`=@NEW WHERE `entry`=@GOSSIP AND `text_id`=@OLD;
diff --git a/sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql b/sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql
new file mode 100644
index 00000000000..093ca8aa8bf
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_05_04_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `OfferRewardText`= 'Alright, $n. You want to earn your keep with the Horde? Well there''s plenty to do here, so listen close and do what you''re told.$b$b$gI see that look in your eyes, do not think I will tolerate any insolence. Thrall himself has declared the Hordes females to be on equal footing with you men. Disrespect me in the slightest, and you will know true pain.:I''m happy to have met you. Thrall will be glad to know that more females like you and I are taking the initiative to push forward in the Barrens.;' WHERE `Id`=842;
diff --git a/sql/old/3.3.5a/2012_02_06_00_world_misc.sql b/sql/old/3.3.5a/2012_02_06_00_world_misc.sql
new file mode 100644
index 00000000000..984c618775d
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_06_00_world_misc.sql
@@ -0,0 +1,731 @@
+-- change incorrect Paladin Trainers gossips
+-- 4477 -> 4677
+-- 4478 -> 4678
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4677;
+SET @TEXTYES := 3974;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Paladin Trainers
+SET @GOSSIP := 4678;
+SET @TEXTYES := 3974;
+SET @TEXTNO := 3975;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,2,0,0,0,'','Show gossip text if player is a Paladin'),
+(14,@GOSSIP,@TEXTNO,0,15,1533,0,0,0,'','Show gossip text if player is not a Paladin');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train further in the ways of the Light.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Delete conditions and menu_id for old typo gossips
+DELETE FROM `conditions` WHERE `SourceGroup`=4477 AND `SourceEntry`=3974;
+DELETE FROM `conditions` WHERE `SourceGroup`=4477 AND `SourceEntry`=3975;
+DELETE FROM `conditions` WHERE `SourceGroup`=4478 AND `SourceEntry`=3974;
+DELETE FROM `conditions` WHERE `SourceGroup`=4478 AND `SourceEntry`=3975;
+DELETE FROM `gossip_menu_option` WHERE menu_id=4477;
+DELETE FROM `gossip_menu_option` WHERE menu_id=4478;
+
+-- Gossip Condition for Mage Trainers
+SET @GOSSIP := 4535; -- http://www.wowhead.com/npc=3049 "Thunder Bluff"
+SET @TEXTYES := 562;
+SET @TEXTNO := 563;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,128,0,0,0,'','Show gossip text if player is a mage'),
+(14,@GOSSIP,@TEXTNO,0,15,1407,0,0,0,'','Show gossip text if player is not a mage');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am interested in mage training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=3049;
+
+-- XXXXXXXXXXXXXXXXXXXXX
+-- X Priest Trainers X
+-- XXXXXXXXXXXXXXXXXXXXX
+
+UPDATE `creature_template` SET `gossip_menu_id`=3643 WHERE `entry`=11397; -- 3643
+UPDATE `creature_template` SET `gossip_menu_id`=4533 WHERE `entry`=3044; -- 4533
+UPDATE `creature_template` SET `gossip_menu_id`=4531 WHERE `entry`=3045; -- 4531
+UPDATE `creature_template` SET `gossip_menu_id`=4532 WHERE `entry`=3046; -- 4532
+UPDATE `creature_template` SET `gossip_menu_id`=4544 WHERE `entry`=4606; -- 4544
+UPDATE `creature_template` SET `gossip_menu_id`=7265 WHERE `entry`=16756; -- 7265
+UPDATE `creature_template` SET `gossip_menu_id`=7265 WHERE `entry` IN (17510,17511); -- 7265
+UPDATE `creature_template` SET `gossip_menu_id`=4558 WHERE `entry`=5142; -- 4558
+UPDATE `creature_template` SET `gossip_menu_id`=4559 WHERE `entry`=5141; -- 4559
+UPDATE `creature_template` SET `gossip_menu_id`=4572 WHERE `entry`=4092; -- 4572
+UPDATE `creature_template` SET `gossip_menu_id`=4574 WHERE `entry`=4090; -- 4574
+UPDATE `creature_template` SET `gossip_menu_id`=4692 WHERE `entry`=3595; -- 4692
+UPDATE `creature_template` SET `gossip_menu_id`=7349 WHERE `entry`=16502; -- 7349
+UPDATE `creature_template` SET `gossip_menu_id`=4801 WHERE `entry`=11401; -- 4801
+UPDATE `creature_template` SET `gossip_menu_id`=3642 WHERE `entry`=11406; -- 3642
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 3642;
+SET @TEXTYES := 4436;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 3643;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 3644;
+SET @TEXTYES := 4441;
+SET @TEXTNO := 4440;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 3645;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4439;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4466;
+SET @TEXTYES := 4433;
+SET @TEXTNO := 4434;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4467;
+SET @TEXTYES := 4433;
+SET @TEXTNO := 4434;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4468;
+SET @TEXTYES := 4433;
+SET @TEXTNO := 4434;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4521;
+SET @TEXTYES := 4441;
+SET @TEXTNO := 4440;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4522;
+SET @TEXTYES := 4441;
+SET @TEXTNO := 4440;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4523;
+SET @TEXTYES := 4441;
+SET @TEXTNO := 4440;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4531;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4532;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4533;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4543;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4544;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4545;
+SET @TEXTYES := 4442;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4558;
+SET @TEXTYES := 4436;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4559;
+SET @TEXTYES := 4436;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4572;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4573;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4574;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4665;
+SET @TEXTYES := 4433;
+SET @TEXTNO := 4434;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4666;
+SET @TEXTYES := 4433;
+SET @TEXTNO := 4434;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4679;
+SET @TEXTYES := 4436;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4680;
+SET @TEXTYES := 4436;
+SET @TEXTNO := 4435;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4691;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4692;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 4801;
+SET @TEXTYES := 4438;
+SET @TEXTNO := 4437;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 6649;
+SET @TEXTYES := 9007;
+SET @TEXTNO := 9186;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require priest training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 7265;
+SET @TEXTYES := 8591;
+SET @TEXTNO := 8592;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 7349;
+SET @TEXTYES := 8591;
+SET @TEXTNO := 8768;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Priest Trainers
+SET @GOSSIP := 7438;
+SET @TEXTYES := 9007;
+SET @TEXTNO := 9186;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,16,0,0,0,'','Show gossip text if player is a Priest'),
+(14,@GOSSIP,@TEXTNO,0,15,1519,0,0,0,'','Show gossip text if player is not a Priest');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek more training in the priestly ways.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''); \ No newline at end of file
diff --git a/sql/old/3.3.5a/2012_02_07_00_world_misc.sql b/sql/old/3.3.5a/2012_02_07_00_world_misc.sql
new file mode 100644
index 00000000000..ef34c56ed00
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_07_00_world_misc.sql
@@ -0,0 +1,60 @@
+DELETE FROM `creature` WHERE `id` IN (28538,29056,28563);
+DELETE FROM `creature` WHERE `id`=28320 AND `guid` BETWEEN 40451 AND 40462 OR `guid` IN (40466,40467);
+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
+-- Cultist Saboteur
+(40271,28538,571,1,1,0,0,6197.03,4772.67,221.593,4.62512,120,0,0,1,0,0,0,0,0),
+(40272,28538,571,1,1,0,0,6207.94,4791.03,224.951,0.504098,120,0,0,1,0,0,0,0,0),
+(40273,28538,571,1,1,0,0,6209.31,4766.71,224.144,3.22886,120,0,0,1,0,0,0,0,0),
+(40274,28538,571,1,1,0,0,6177.88,4737.93,224.747,2.24767,120,0,0,1,0,0,0,0,0),
+(40275,28538,571,1,1,0,0,6185.42,4760.61,224.796,1.62316,120,0,0,1,0,0,0,0,0),
+(40276,28538,571,1,1,0,0,6195.94,4761.25,220.873,1.53589,120,0,0,1,0,0,0,0,0),
+(40277,28538,571,1,1,0,0,6231.93,4739.39,224.738,5.95606,120,0,0,1,0,0,0,0,0),
+(40278,28538,571,1,1,0,0,6208.1,4762.39,222.758,2.87979,120,0,0,1,0,0,0,0,0),
+-- Servant of Freya
+(40451,28320,571,1,1,0,0,6177.58,4762.69,225.418,1.78024,120,0,0,1,0,0,0,0,0),
+(40452,28320,571,1,1,0,0,6236,4785.33,224.865,1.90241,120,0,0,1,0,0,0,0,0),
+(40453,28320,571,1,1,0,0,6218.78,4772.22,224.84,5.41052,120,0,0,1,0,0,0,0,0),
+(40454,28320,571,1,1,0,0,6191.46,4728.85,224.807,5.86431,120,0,0,1,0,0,0,0,0),
+(40455,28320,571,1,1,0,0,6206.62,4787.49,224.797,4.64258,120,0,0,1,0,0,0,0,0),
+(40456,28320,571,1,1,0,0,6185.58,4761.77,224.796,4.39823,120,0,0,1,0,0,0,0,0),
+(40457,28320,571,1,1,0,0,6226.41,4738,224.796,5.61996,120,0,0,1,0,0,0,0,0),
+(40458,28320,571,1,1,0,0,6206.94,4750.79,224.796,3.78736,120,0,0,1,0,0,0,0,0),
+(40459,28320,571,1,1,0,0,6238.17,4731.89,224.783,3.92699,120,0,0,1,0,0,0,0,0),
+(40460,28320,571,1,1,0,0,6177.83,4730.03,224.693,0.244346,120,0,0,1,0,0,0,0,0),
+(40461,28320,571,1,1,0,0,6168.2,4749.64,224.577,5.0091,120,0,0,1,0,0,0,0,0),
+(40462,28320,571,1,1,0,0,6242.58,4769.51,224.443,2.98451,120,0,0,1,0,0,0,0,0),
+(40466,28320,571,1,1,0,0,6217.79,4796.46,224.431,1.39626,120,0,0,1,0,0,0,0,0),
+(40467,28320,571,1,1,0,0,6254.19,4757.5,217.856,0.837758,120,0,0,1,0,0,0,0,0),
+-- Glimmering Pillar Credit
+(40468,29056,571,1,1,0,0,6201.76,4764.45,225.84,3.19395,120,0,0,1,0,0,0,0,0),
+-- Freya's Presence
+(40469,28563,571,1,1,0,0,6203.26,4765.47,248.057,1.95477,120,0,0,1,0,0,0,0,0);
+
+-- by Valcorb
+DELETE FROM `gameobject` WHERE `id`=300223;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(227,300223,571,1,1,6204.758301,4766.002930,221.531799,0,0,0,0,0,300,0,1);
+
+UPDATE `creature_template` SET `unit_flags`=0,`MovementType`=1 WHERE `entry`=28320; -- Servant of Freya
+UPDATE `creature_template` SET `MovementType`=1 WHERE `entry`=28538; -- Cultist Saboteur
+UPDATE `creature_template` SET `exp`=0,`InhabitType`=7,`flags_extra`=`flags_extra`|128 WHERE `entry`=28563; -- Freya's Presence
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (28538,29036,28320,28563);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(28538,0,0,1,69, NULL), -- Cultist Saboteur (EMOTE_STATE_USE_STANDING)
+(29036,0,0,1,0, '52948 61750 61751'), -- Servant of Freya (All Wild Growth, visual effects)
+(28320,0,0,1,429, NULL), -- Servant of Freya
+(28563,0,0,1,0, NULL); -- Freya's Presence
+
+DELETE FROM `creature_text` WHERE `entry`=28563;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(28563,0,0, 'The structure above begins to hum with energy.',42,0,0,0,0,0, 'Freya''s Presence - On Call of the Lifewarden cast');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (51318,51395);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,51318,0,0,18,1,28320,0,0, '', 'Freya Dummy - Target Servant of Freya'),
+(13,0,51395,0,0,18,1,28538,0,0, '', 'Lifeforce - Target Cultist Saboteur');
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=51957;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(51957,'spell_q12620_the_lifewarden_wrath');
diff --git a/sql/old/3.3.5a/2012_02_08_00_world_misc.sql b/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
new file mode 100644
index 00000000000..40ce5629214
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_00_world_misc.sql
@@ -0,0 +1,20 @@
+UPDATE `gameobject_template` SET `flags` = `flags` | 32, `AIName` = 'SmartGameObjectAI' WHERE `entry` = 187267;
+
+DELETE FROM `spell_script_names` WHERE `spell_id` = 45102;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(45102, 'spell_love_is_in_the_air_romantic_picnic');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (45119, 45103, 45114);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 0, 45119, 0, 0, 18, 0, 187267, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Near Basket Check - Target Romantic Basket'),
+(13, 0, 45103, 0, 0, 18, 1, 0, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Meal Periodic - Target Players'),
+(13, 0, 45114, 0, 0, 18, 1, 0, 0, 0, '', 'Holiday - Valentine - Romantic Picnic Meal Particle - Target Players');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=187267 AND `source_type`=1;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(187267, 1, 0, 0, 60, 0, 100, 0, 3*60*1000, 3*60*1000, 0, 0, 99, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Picnic Basket - Despawn after 3 minutes');
+
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (1291,5787,4071);
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
+(5787, 6, 4395, 0, ''), -- Lonely? - Dalaran
+(4071, 6, 4395, 0, ''); -- Lonely? - Dalaran
diff --git a/sql/old/3.3.5a/2012_02_08_01_world_misc.sql b/sql/old/3.3.5a/2012_02_08_01_world_misc.sql
new file mode 100644
index 00000000000..f6f6f9a6b94
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_01_world_misc.sql
@@ -0,0 +1 @@
+UPDATE `achievement_criteria_data` SET `value1`=423 WHERE `value1`=335 AND `type`=16;
diff --git a/sql/old/3.3.5a/2012_02_08_02_world_misc.sql b/sql/old/3.3.5a/2012_02_08_02_world_misc.sql
new file mode 100644
index 00000000000..64b6ba82cc9
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_02_world_misc.sql
@@ -0,0 +1,27 @@
+-- Missing Love is in the Air NPCs
+SET @GUID := 40481; -- need 8
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7 AND `id` IN (37887,38039,38040,38066,38325,38293);
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID+0,37887,0,1,1,0,0,-8864.01,635.646,96.0818,1.97249,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.>
+(@GUID+1,38039,1,1,1,0,0,9871.16,2488.28,1315.88,0.547356,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.>
+(@GUID+2,38040,530,1,1,0,0,-4010.12,-11846.9,0.1352,5.42082,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.>
+(@GUID+3,38040,0,1,1,0,0,-4915.43,-979.532,501.448,2.31443,300,0,0,42,0,0,2,0,8), -- Kwee Q. Peddlefeet <Crown Chemical Co.>
+(@GUID+4,38066,0,1,1,0,0,-8867.86,652.647,97.0113,4.84704,300,0,0,42,0,0,2,0,8), -- Inspector Snip Snagglebolt
+(@GUID+5,38325,0,1,1,0,0,-8881.19,669.006,105.834,0.696214,300,0,0,42,0,0,2,0,8), -- Marion Sutton
+(@GUID+6,38293,0,1,1,0,0,-4932.9,-995.348,501.441,0.7201,300,0,0,42,0,0,2,0,8), -- Junior Inspector
+(@GUID+7,38293,1,1,1,0,0,9885.37,2494.31,1315.92,3.01351,300,0,0,42,0,0,2,0,8); -- Junior Inspector
+
+DELETE FROM `game_event_creature` WHERE `eventEntry`=8 AND `guid` BETWEEN @GUID AND @GUID+7;
+INSERT INTO `game_event_creature` (`guid`,`eventEntry`) VALUES
+(@GUID+0,8),
+(@GUID+1,8),
+(@GUID+2,8),
+(@GUID+3,8),
+(@GUID+4,8),
+(@GUID+5,8),
+(@GUID+6,8),
+(@GUID+7,8);
+
+-- Fixing an old SAI, by Aokromes, not related with above code
+ UPDATE `smart_scripts` SET `event_param1`=56033 WHERE `entryorguid`=30146 and `event_param1` = 42837;
diff --git a/sql/old/3.3.5a/2012_02_08_03_world_misc.sql b/sql/old/3.3.5a/2012_02_08_03_world_misc.sql
new file mode 100644
index 00000000000..80d2fd901fc
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_03_world_misc.sql
@@ -0,0 +1,24 @@
+-- Template updates
+UPDATE `creature_template` SET `npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|32768,`speed_run`=1 WHERE `name`='Kwee Q. Peddlefeet' AND `IconName`!=NULL; -- Kwee Q. Peddlefeet
+UPDATE `creature_template` SET `npcflag`=`npcflag`|3,`unit_flags`=`unit_flags`|512 WHERE `entry`=38066; -- Inspector Snip Snagglebolt
+UPDATE `creature_template` SET `npcflag`=`npcflag`|2 WHERE `entry`=38325; -- Marion Sutton
+UPDATE `creature_template` SET `npcflag`=`npcflag`|2 WHERE `entry`=38293; -- Junior Inspector (NS)
+
+-- Model data
+UPDATE `creature_model_info` SET `bounding_radius`=0.29,`combat_reach`=2.5,`gender`=0 WHERE `modelid`=15990; -- Kwee Q. Peddlefeet
+UPDATE `creature_model_info` SET `bounding_radius`=0.306,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=30728; -- Inspector Snip Snagglebolt
+UPDATE `creature_model_info` SET `bounding_radius`=0.208,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=31040; -- Marion Sutton
+
+-- Addon data
+DELETE FROM `creature_template_addon` WHERE `entry` IN (37887,38039,38040,38066,38325);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(37887,0,0,1,0, NULL), -- Kwee Q. Peddlefeet
+(38039,0,0,1,0, NULL), -- Kwee Q. Peddlefeet
+(38040,0,0,1,0, NULL), -- Kwee Q. Peddlefeet
+(38066,0,0,257,0, NULL), -- Inspector Snip Snagglebolt
+(38325,0,1,1,0, NULL); -- Marion Sutton
+
+-- Gossip, unfinished
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=10948 AND `id`=0;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `box_coded`, `box_money`, `box_text`) VALUES
+(10948, 0, 0, 'I''d like a Lovely Charm Collector''s Kit.', 0, 0, '');
diff --git a/sql/old/3.3.5a/2012_02_08_04_world_misc.sql b/sql/old/3.3.5a/2012_02_08_04_world_misc.sql
new file mode 100644
index 00000000000..1de2adc45f3
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_04_world_misc.sql
@@ -0,0 +1,4 @@
+UPDATE `achievement_criteria_data` SET `value1`=423 WHERE `value1` IN (335,355) AND `type`=16;
+
+-- Trigger extra flag for [DND] Holiday - Love - Bank/AH/Barber Bunny
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` IN (38340,38341,38342);
diff --git a/sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql b/sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql
new file mode 100644
index 00000000000..a9388d189a9
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_05_world_gameobject.sql
@@ -0,0 +1,23 @@
+SET @GUID = 5259;
+DELETE FROM `gameobject` WHERE `id` IN (192536,192538);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+-- phasemask 4
+(@GUID+00,192536,571,1,4,7033.894,-1391.528,983.4609,0.05235888,0,0,0.02617645,0.9996573,120,255,1), -- Small Proto-Drake Egg
+(@GUID+01,192536,571,1,4,6985.812,-1278.627,1101.344,1.308995,0,0,0.6087608,0.7933538,120,255,1), -- Small Proto-Drake Egg
+(@GUID+02,192536,571,1,4,7006.557,-1260.263,1099.344,1.588249,0,0,0.7132502,0.7009096,120,255,1), -- Small Proto-Drake Egg
+(@GUID+03,192536,571,1,4,7029.698,-1372.383,983.2609,-2.705255,0,0,-0.9762955,0.2164421,120,255,1), -- Small Proto-Drake Egg
+(@GUID+04,192536,571,1,4,7011.055,-1270.609,1099.002,3.124123,0,0,0.9999619,0.008734641,120,255,1), -- Small Proto-Drake Egg
+(@GUID+05,192536,571,1,4,7013.271,-1395.635,985.5262,-1.326448,0,0,-0.6156607,0.7880114,120,255,1), -- Small Proto-Drake Egg
+-- phasemask 128 and 1
+(@GUID+06,192536,571,1,129,7013.271,-1395.635,985.5262,-1.326448,0,0,-0.6156607,0.7880114,120,255,1), -- Small Proto-Drake Egg
+(@GUID+07,192536,571,1,129,6985.812,-1278.627,1101.344,1.308995,0,0,0.6087608,0.7933538,120,255,1), -- Small Proto-Drake Egg
+(@GUID+08,192536,571,1,129,7006.557,-1260.263,1099.344,1.588249,0,0,0.7132502,0.7009096,120,255,1), -- Small Proto-Drake Egg
+(@GUID+09,192536,571,1,129,7029.698,-1372.383,983.2609,-2.705255,0,0,-0.9762955,0.2164421,120,255,1), -- Small Proto-Drake Egg
+(@GUID+10,192536,571,1,129,7011.055,-1270.609,1099.002,3.124123,0,0,0.9999619,0.008734641,120,255,1), -- Small Proto-Drake Egg
+(@GUID+11,192536,571,1,129,7033.894,-1391.528,983.4609,0.05235888,0,0,0.02617645,0.9996573,120,255,1), -- Small Proto-Drake Egg
+-- phasemask 4
+(@GUID+12,192538,571,1,4,7081.91,-906.408,1065.914,0.95993,0,0,0.4617481,0.8870111,120,255,1), -- Small Proto-Drake Egg
+(@GUID+13,192538,571,1,4,7080.195,-912.1233,1066.743,-0.5410506,0,0,-0.2672377,0.9636307,120,255,1), -- Small Proto-Drake Egg
+(@GUID+14,192538,571,1,4,7085.535,-912.6684,1066.484,1.815142,0,0,0.7880106,0.6156617,120,255,1), -- Small Proto-Drake Egg
+(@GUID+15,192538,571,1,4,7090.95,-908.6667,1065.036,-0.9948372,0,0,-0.4771585,0.8788173,120,255,1), -- Small Proto-Drake Egg
+(@GUID+16,192538,571,1,4,7082.188,-916.6476,1068.389,2.234018,0,0,0.8987932,0.4383728,120,255,1); -- Small Proto-Drake Egg
diff --git a/sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..199c9df86f4
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_06_world_achievement_criteria_data.sql
@@ -0,0 +1,12 @@
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (6343, 6344, 6345, 6346, 6347);
+INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
+(6343,6,4197,0,''), -- Wintergrasp
+(6343,1,16111,0,''), -- target Love Fool
+(6344,6,2177,0,''), -- Battle Ring
+(6344,1,16111,0,''), -- target Love Fool
+(6345,6,3421,0,''), -- Blacksmith
+(6345,1,16111,0,''), -- target Love Fool
+(6346,6,4100,0,''), -- The Culling of Stratholme
+(6346,1,16111,0,''), -- target Love Fool
+(6347,6,3456,0,''), -- Naxxramas
+(6347,1,16111,0,''); -- target Love Fool
diff --git a/sql/old/3.3.5a/2012_02_08_07_world_pool.sql b/sql/old/3.3.5a/2012_02_08_07_world_pool.sql
new file mode 100644
index 00000000000..8f43e1b3b03
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_07_world_pool.sql
@@ -0,0 +1,11 @@
+SET @pool_id := 348;
+
+DELETE FROM `pool_template` WHERE `entry` = @pool_id;
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@pool_id, 1, 'Public Relations Agent <Crown Chemical Co.> - Daily Quests');
+
+DELETE FROM `pool_quest` WHERE `entry` IN (24635, 24636, 24629) AND `pool_entry` = @pool_id;
+INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES
+(24629, @pool_id, 'A Perfect Puff of Perfume'),
+(24635, @pool_id, 'A Cloudlet of Classy Cologne'),
+(24636, @pool_id, 'Bonbon Blitz');
diff --git a/sql/old/3.3.5a/2012_02_08_08_world_pool.sql b/sql/old/3.3.5a/2012_02_08_08_world_pool.sql
new file mode 100644
index 00000000000..96124ec2540
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_08_world_pool.sql
@@ -0,0 +1,16 @@
+-- Pool quests from High Crusader Adelard
+-- Source: http://www.wowwiki.com/High_Crusader_Adelard
+SET @pool_id := 349;
+
+-- create new pool, allowing only 1 out of 4 dailys per day
+DELETE FROM `pool_template` WHERE `entry` = @pool_id;
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@pool_id, 1, 'High Crusader Adelard - Daily Quests');
+
+-- fill pools with the daily quests
+DELETE FROM `pool_quest` WHERE `entry` IN (14101, 14102, 14104, 14105) AND `pool_entry` = @pool_id;
+INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES
+(14101, @pool_id, 'Drottinn Hrothgar'),
+(14102, @pool_id, 'Mistcaller Yngvar'),
+(14104, @pool_id, 'Ornolf The Scarred'),
+(14105, @pool_id, 'Deathspeaker Kharos');
diff --git a/sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql b/sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql
new file mode 100644
index 00000000000..1b53bd34811
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_09_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `RequestItemsText` = 'Jen''shan see a mighty $C before her and da spirits approve.$b$bDa path of da $C is one of our oldest walks of life. Da Horde turned to us when they be just strugglin'' to survive on Azeroth, and they ask us to teach them, to show them the secrets of many tings. They were strong already: strong in shaman ways; strong in warrior ways. But the $C path not be their path... then.' WHERE id = 3082;
diff --git a/sql/old/3.3.5a/2012_02_08_10_world_gossip.sql b/sql/old/3.3.5a/2012_02_08_10_world_gossip.sql
new file mode 100644
index 00000000000..009b56c7018
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_10_world_gossip.sql
@@ -0,0 +1,110 @@
+-- Creature Gossip_menu_option Update from sniff
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9130,9495,9879,9893,9988,10115) AND `id`=0;
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9879 AND `id`=1;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(9130,0,1, 'I want to browse your goods.',3,128,0,0,0,0, ''),
+(9495,0,1, 'Let me browse your goods.',3,128,0,0,0,0, ''),
+(9879,0,3, 'Train me',5,16,0,0,0,0, ''),
+(9879,1,1, 'Let me browse your goods.',3,128,0,0,0,0, ''),
+(9893,0,3, 'Train me',5,16,0,0,0,0, ''),
+(9988,0,3, 'Train me',5,16,0,0,0,0, ''),
+(10115,0,3, 'Train me',5,16,0,0,0,0, '');
+
+-- Gossip Menu insert from sniff
+DELETE FROM `gossip_menu` WHERE `entry`=9130 AND `text_id`=12343;
+DELETE FROM `gossip_menu` WHERE `entry`=9130 AND `text_id`=12344;
+DELETE FROM `gossip_menu` WHERE `entry`=9133 AND `text_id`=12349;
+DELETE FROM `gossip_menu` WHERE `entry`=9133 AND `text_id`=12350;
+DELETE FROM `gossip_menu` WHERE `entry`=9134 AND `text_id`=12354;
+DELETE FROM `gossip_menu` WHERE `entry`=9134 AND `text_id`=12352;
+DELETE FROM `gossip_menu` WHERE `entry`=9137 AND `text_id`=12360;
+DELETE FROM `gossip_menu` WHERE `entry`=9137 AND `text_id`=12361;
+DELETE FROM `gossip_menu` WHERE `entry`=9138 AND `text_id`=12362;
+DELETE FROM `gossip_menu` WHERE `entry`=9138 AND `text_id`=12363;
+DELETE FROM `gossip_menu` WHERE `entry`=9153 AND `text_id`=12384;
+DELETE FROM `gossip_menu` WHERE `entry`=9154 AND `text_id`=12387;
+DELETE FROM `gossip_menu` WHERE `entry`=9158 AND `text_id`=12394;
+DELETE FROM `gossip_menu` WHERE `entry`=9159 AND `text_id`=12395;
+DELETE FROM `gossip_menu` WHERE `entry`=9160 AND `text_id`=12403;
+DELETE FROM `gossip_menu` WHERE `entry`=9170 AND `text_id`=12433;
+DELETE FROM `gossip_menu` WHERE `entry`=9172 AND `text_id`=12440;
+DELETE FROM `gossip_menu` WHERE `entry`=9173 AND `text_id`=12441;
+DELETE FROM `gossip_menu` WHERE `entry`=9210 AND `text_id`=12521;
+DELETE FROM `gossip_menu` WHERE `entry`=9214 AND `text_id`=12525;
+DELETE FROM `gossip_menu` WHERE `entry`=9216 AND `text_id`=12527;
+DELETE FROM `gossip_menu` WHERE `entry`=9219 AND `text_id`=12530;
+DELETE FROM `gossip_menu` WHERE `entry`=9223 AND `text_id`=13481;
+DELETE FROM `gossip_menu` WHERE `entry`=9224 AND `text_id`=12538;
+DELETE FROM `gossip_menu` WHERE `entry`=9247 AND `text_id`=12555;
+DELETE FROM `gossip_menu` WHERE `entry`=9280 AND `text_id`=12585;
+DELETE FROM `gossip_menu` WHERE `entry`=9417 AND `text_id`=12663;
+DELETE FROM `gossip_menu` WHERE `entry`=9495 AND `text_id`=12781;
+DELETE FROM `gossip_menu` WHERE `entry`=9685 AND `text_id`=13134;
+DELETE FROM `gossip_menu` WHERE `entry`=9685 AND `text_id`=13135;
+DELETE FROM `gossip_menu` WHERE `entry`=9893 AND `text_id`=13735;
+DELETE FROM `gossip_menu` WHERE `entry`=9988 AND `text_id`=13842;
+DELETE FROM `gossip_menu` WHERE `entry`=10115 AND `text_id`=14041;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(9130,12343),(9130,12344),
+(9133,12349),(9133,12350),
+(9134,12354),(9134,12352),
+(9137,12360),(9137,12361),
+(9138,12362),(9138,12363),
+(9153,12384),(9154,12387),
+(9158,12394),(9159,12395),
+(9160,12403),(9170,12433),
+(9172,12440),(9173,12441),
+(9210,12521),(9214,12525),
+(9216,12527),(9219,12530),
+(9223,13481),(9224,12538),
+(9247,12555),(9280,12585),
+(9417,12663),(9495,12781),
+(9685,13134),(9685,13135),
+(9893,13735),(9988,13842),
+(10115,14041);
+
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup` IN (9130,9133,9134,9137,9138,9685);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,9130,12344,0,8,11571,0,0,0,'','Ahlurglgr - Show different gossip if player has rewarded quest 11571'),
+(14,9133,12350,0,8,11571,0,0,0,'','Brglmurgl - Show different gossip if player has rewarded quest 11571'),
+(14,9134,12354,0,14,11571,0,0,0,'','Mrmrglmr - Show different gossip if player has not rewarded quest 11571'),
+(14,9137,12361,0,8,11571,0,0,0,'','Lurgglbr - Show different gossip if player has rewarded quest 11571'),
+(14,9138,12363,0,8,11571,0,0,0,'','Winterfin Gatherer - Show different gossip if player has rewarded quest 11571'),
+(14,9685,13135,0,8,11571,0,0,0,'','Glrglrglr - Show different gossip if player has rewarded quest 11571');
+
+-- Insert npc_text from sniff
+DELETE FROM `npc_text` WHERE `ID`=13481;
+INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`lang0`,`prob0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`lang1`,`prob1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`lang2`,`prob2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`lang3`,`prob3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`lang4`,`prob4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`lang5`,`prob5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`lang6`,`prob6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`lang7`,`prob7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES
+(13481,'','I''ll never forget what you did for Thassarian. I will always be in your debt.',0,1,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340);
+
+-- Creature Gossip_menu_id Update from sniff
+UPDATE `creature_template` SET `gossip_menu_id`=9130 WHERE `entry`=25206; -- Ahlurglgr
+UPDATE `creature_template` SET `gossip_menu_id`=9133 WHERE `entry`=25199; -- Brglmurgl
+UPDATE `creature_template` SET `gossip_menu_id`=9134 WHERE `entry`=25205; -- Mrmrglmr
+UPDATE `creature_template` SET `gossip_menu_id`=9137 WHERE `entry`=25208; -- Lurgglbr
+UPDATE `creature_template` SET `gossip_menu_id`=9138 WHERE `entry`=25198; -- Winterfin Gatherer
+UPDATE `creature_template` SET `gossip_menu_id`=9153 WHERE `entry`=25336; -- Grunt Ragefist
+UPDATE `creature_template` SET `gossip_menu_id`=9154 WHERE `entry`=25339; -- Spirit Talker Snarlfang
+UPDATE `creature_template` SET `gossip_menu_id`=9158 WHERE `entry`=25374; -- Ortrosh
+UPDATE `creature_template` SET `gossip_menu_id`=9159 WHERE `entry`=25376; -- Imperean
+UPDATE `creature_template` SET `gossip_menu_id`=9160 WHERE `entry`=25335; -- Longrunner Proudhoof
+UPDATE `creature_template` SET `gossip_menu_id`=9170 WHERE `entry`=25589; -- Bonker Togglevolt
+UPDATE `creature_template` SET `gossip_menu_id`=9172 WHERE `entry`=25602; -- Greatmother Taiga
+UPDATE `creature_template` SET `gossip_menu_id`=9173 WHERE `entry`=25604; -- Sage Highmesa
+UPDATE `creature_template` SET `gossip_menu_id`=9210 WHERE `entry`=26085; -- Wendy Darren
+UPDATE `creature_template` SET `gossip_menu_id`=9214 WHERE `entry`=26084; -- Jeremiah Hawning
+UPDATE `creature_template` SET `gossip_menu_id`=9216 WHERE `entry`=25285; -- Harbinger Vurenn
+UPDATE `creature_template` SET `gossip_menu_id`=9219 WHERE `entry`=25828; -- Guard Mitchells
+UPDATE `creature_template` SET `gossip_menu_id`=9223 WHERE `entry`=25251; -- Leryssa
+UPDATE `creature_template` SET `gossip_menu_id`=9224 WHERE `entry`=26083; -- Gerald Green
+UPDATE `creature_template` SET `gossip_menu_id`=9247 WHERE `entry`=25395; -- Private Brau
+UPDATE `creature_template` SET `gossip_menu_id`=9280 WHERE `entry`=26219; -- Iruk
+UPDATE `creature_template` SET `gossip_menu_id`=9417 WHERE `entry`=26170; -- Thassarian
+UPDATE `creature_template` SET `gossip_menu_id`=9495 WHERE `entry`=26110; -- Librarian Serrah
+UPDATE `creature_template` SET `gossip_menu_id`=9685 WHERE `entry`=28375; -- Glrglrglr
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=27065; -- Breka Wolfsister
+UPDATE `creature_template` SET `gossip_menu_id`=9879 WHERE `entry`=26977; -- Adelene Sunlance
+UPDATE `creature_template` SET `gossip_menu_id`=9893 WHERE `entry`=26982; -- Geba'li
+UPDATE `creature_template` SET `gossip_menu_id`=9988 WHERE `entry`=26972; -- Orn Tenderhoof
+UPDATE `creature_template` SET `gossip_menu_id`=10115 WHERE `entry`=26969; -- Raenah
diff --git a/sql/old/3.3.5a/2012_02_08_11_world_pool.sql b/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
new file mode 100644
index 00000000000..f49f5afec6a
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_11_world_pool.sql
@@ -0,0 +1,24 @@
+-- Toxic Tolerance questchain for a horde specific mount requires doing
+-- daily quests. However currently all of those are acceptable daily, though
+-- only one (random) should be.
+-- Source: http://www.wowhead.com/quest=13917/gorishi-grub#comments:id=829822
+SET @pool1_id := 350; -- Orcs, Bloodelves
+SET @pool2_id := 351; -- Undead, Tauren, Troll
+
+-- create new pools, each allowing only 1 out of 4 dailys per day
+DELETE FROM `pool_template` WHERE `entry` IN (@pool1_id, @pool2_id);
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@pool1_id, 1, 'Toxic Tolerance Daily-Quests'),
+(@pool2_id, 1, 'Toxic Tolerance Daily-Quests');
+
+-- fill pools with the daily quests, starting from Venomhide Hatchling (c34320)
+DELETE FROM `pool_quest` WHERE `entry` IN (13889, 13915, 13903, 13904, 13905, 13917, 13916, 13914) AND `pool_entry` IN (@pool1_id, @pool2_id);
+INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES
+(13889, @pool1_id, 'Hungry, Hungry Hatchling'),
+(13903, @pool1_id, 'Gorishi Grub'),
+(13904, @pool1_id, 'Poached, Scrambled, Or Raw?'),
+(13905, @pool1_id, 'Searing Roc Feathers'),
+(13915, @pool2_id, 'Hungry, Hungry Hatchling'),
+(13917, @pool2_id, 'Gorishi Grub'),
+(13916, @pool2_id, 'Poached, Scrambled, Or Raw?'),
+(13914, @pool2_id, 'Searing Roc Feathers');
diff --git a/sql/old/3.3.5a/2012_02_08_12_world_sai.sql b/sql/old/3.3.5a/2012_02_08_12_world_sai.sql
new file mode 100644
index 00000000000..81ea39c8ecf
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_12_world_sai.sql
@@ -0,0 +1,7 @@
+-- Remove Mistwhisper Refuge Zepik spawn
+DELETE FROM `creature` WHERE `id` = 28216;
+
+-- Add SAI to High-Shaman Rakjak to give horn when accepting A rough ride
+DELETE FROM `smart_scripts` WHERE `entryorguid`=28082 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
+(28082, 0, 0, 0, 19, 0, 100, 0, 12536, 0, 0, 0, 56, 38512, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'High-Shaman Rakjak - On acccept quest A rough ride - give Zepik''s Hunting Horn');
diff --git a/sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql b/sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql
new file mode 100644
index 00000000000..0a43dda67d4
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_13_world_gameobject.sql
@@ -0,0 +1,13 @@
+-- Lunar festival: Rocket Clusters placed near Omen's summon place (Moonglade)
+SET @CLUSTER := 180874;
+SET @LUNARFESTIVAL := 7;
+
+DELETE FROM `gameobject` WHERE `id`=@CLUSTER AND `guid` IN (230,231);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`) VALUES
+(230,@CLUSTER,1,1,1,7531.662,-2851.228,458.9172),
+(231,@CLUSTER,1,1,1,7561.145,-2872.45,461.0998);
+
+DELETE FROM `game_event_gameobject` WHERE `guid` IN (230,231) AND `eventEntry`=@LUNARFESTIVAL;
+INSERT INTO `game_event_gameobject` (`eventEntry`,`guid`) VALUES
+(@LUNARFESTIVAL,230),
+(@LUNARFESTIVAL,231);
diff --git a/sql/old/3.3.5a/2012_02_08_14_world_sai.sql b/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
new file mode 100644
index 00000000000..60e96a52663
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_14_world_sai.sql
@@ -0,0 +1,13 @@
+SET @ENTRY := 38035; -- Chemical Wagon
+SET @SPELL1 := 71599; -- Cosmetic - Explosion (Chemical Wagon)
+SET @SPELL2 := 71597; -- Cosmetic - Low Poly Fire (with Sound)
+
+DELETE FROM `conditions` WHERE `SourceEntry`=@SPELL1 AND `SourceTypeOrReferenceId`=13 AND `ConditionTypeOrReference`=18;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
+(13,@SPELL1,18,1,@ENTRY, 'Chemical Wagon - Cosmetic - Explosion (Chemical Wagon)');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+UPDATE creature_template SET AIName='SmartAI' WHERE entry=@ENTRY;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,8,0,100,0,@SPELL1,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"Chemical Wagon - Spell Hit - Credit"),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,11,@SPELL2,2,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Chemical Wagon - Spell Hit - Cast Cosmetic - Low Poly Fire (with Sound)");
diff --git a/sql/old/3.3.5a/2012_02_08_15_world_misc.sql b/sql/old/3.3.5a/2012_02_08_15_world_misc.sql
new file mode 100644
index 00000000000..f6ea64249cf
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_15_world_misc.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='npc_spring_rabbit' WHERE `entry`=32791;
+UPDATE `achievement_criteria_data` SET `value1`=186 WHERE `criteria_id`=9199 AND `type`=6; -- Dolanaar, not Dalaran
diff --git a/sql/old/3.3.5a/2012_02_08_16_world_sai.sql b/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
new file mode 100644
index 00000000000..06fbb233aeb
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_08_16_world_sai.sql
@@ -0,0 +1,22 @@
+-- Chillmaw
+SET @ENTRY := 33687;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+UPDATE creature_template SET AIName="SmartAI" WHERE entry=@ENTRY LIMIT 1;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,0,10000,11000,20000,23000,11,65248,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - Combat - Cast Frost Breath"),
+(@ENTRY,0,1,0,2,0,100,1,0,35,0,0,11,65260,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @35% health - Cast Wing Buffet"),
+(@ENTRY,0,2,0,2,0,100,1,0,25,0,0,11,60603,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @25% health - Cast Eject Passenger 1"),
+(@ENTRY,0,3,0,2,0,100,1,0,50,0,0,11,62539,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @50% health - Cast Eject Passenger 2"),
+(@ENTRY,0,4,0,2,0,100,1,0,75,0,0,11,52205,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Chillmaw - @75% health - Cast Eject Passenger 3");
+-- Cultist Bombardier SAI
+SET @ENTRY := 33695; -- NPC entry
+SET @SPELL1 := 65128; -- Throw Dynamite
+SET @SPELL2 := 65130; -- Time Bomb
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,0,0,100,0,5000,6000,7000,8000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Cultist Bombardier - Combat - Cast Throw Dynamite'),
+(@ENTRY,0,1,0,0,0,100,0,18000,20000,6000,7000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Cultist Bombardier - Combat - Cast Time Bomb'),
+(@ENTRY,0,2,0,4,0,100,1,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Cultist Bombardier - On Aggro - Set Phase 1'),
+(@ENTRY,0,3,0,1,1,100,1,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Cultist Bombardier - OOC - Despawn (Phase 1)');
diff --git a/sql/old/3.3.5a/2012_02_10_00_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_00_world_conditions.sql
new file mode 100644
index 00000000000..508011609cf
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_10_00_world_conditions.sql
@@ -0,0 +1 @@
+ALTER TABLE `conditions` ADD COLUMN `NegativeCondition` tinyint(3) UNSIGNED NOT NULL default '0' AFTER `ConditionValue3`;
diff --git a/sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql b/sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql
new file mode 100644
index 00000000000..1dbbb850472
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_10_01_world_gameobject.sql
@@ -0,0 +1,3 @@
+-- Picnic Basket
+UPDATE `gameobject_template` SET `flags`=0, `AIName`='' WHERE `entry`=187267;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=187267 AND `source_type`=1;
diff --git a/sql/old/3.3.5a/2012_02_10_02_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_02_world_conditions.sql
new file mode 100644
index 00000000000..66d72e1be3a
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_10_02_world_conditions.sql
@@ -0,0 +1,9 @@
+-- CONDITION_NO_AURA -> CONDITION_AURA + NegativeCondition
+DELETE FROM `conditions` WHERE `NegativeCondition`=1 AND `ConditionTypeOrReference`=1;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) SELECT `SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`, 1 ,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, 1 ,`ErrorTextId`,`ScriptName`,`Comment` FROM `conditions` WHERE `ConditionTypeOrReference`=11;
+DELETE FROM `conditions` WHERE `ConditionTypeOrReference`=11;
+
+-- CONDITION_NOITEM -> CONDITION_ITEM + NegativeCondition
+DELETE FROM `conditions` WHERE `NegativeCondition`=1 AND `ConditionTypeOrReference`=2; -- not a typo
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) SELECT `SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`, 2 ,`ConditionValue1`, 1 ,`ConditionValue2`, 1 ,`ErrorTextId`,`ScriptName`,`Comment` FROM `conditions` WHERE `ConditionTypeOrReference`=26;
+DELETE FROM `conditions` WHERE `ConditionTypeOrReference`=26;
diff --git a/sql/old/3.3.5a/2012_02_10_03_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_03_world_conditions.sql
new file mode 100644
index 00000000000..b46684df7d5
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_10_03_world_conditions.sql
@@ -0,0 +1,2 @@
+-- CONDITION_SPELL with ConditionValue2 = 1 -> CONDITION_SPELL + NegativeCondition
+UPDATE `conditions` SET `NegativeCondition` = 1, `ConditionValue2` = 0 WHERE `ConditionTypeOrReference` = 25 AND `ConditionValue2` = 1;
diff --git a/sql/old/3.3.5a/2012_02_10_04_world_conditions.sql b/sql/old/3.3.5a/2012_02_10_04_world_conditions.sql
new file mode 100644
index 00000000000..4703ec29044
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_10_04_world_conditions.sql
@@ -0,0 +1 @@
+ALTER TABLE `conditions` ADD COLUMN `ConditionTarget` tinyint(3) UNSIGNED NOT NULL default '0' AFTER `ConditionTypeOrReference`;
diff --git a/sql/old/3.3.5a/2012_02_11_00_world_creature.sql b/sql/old/3.3.5a/2012_02_11_00_world_creature.sql
new file mode 100644
index 00000000000..c7d4971cc29
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_00_world_creature.sql
@@ -0,0 +1 @@
+UPDATE `creature` SET `id`=38041 WHERE `guid`=40484;
diff --git a/sql/old/3.3.5a/2012_02_11_01_world_creature.sql b/sql/old/3.3.5a/2012_02_11_01_world_creature.sql
new file mode 100644
index 00000000000..898e746d306
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_01_world_creature.sql
@@ -0,0 +1,14 @@
+-- Spawn Elder Ohanzee in Normal and Heroic modes of Gundrak and relocate near Drakkari Colossus (45.7,62) boss (v3.3.2 change). Coordinates are guessed based on https://www.youtube.com/watch?v=FRXgZthksN8 ( ~12min )
+UPDATE `creature` SET `spawnMask`=3,`position_x`=1697.94,`position_y`=752.121,`position_z`=142.765,`orientation`=3.78933 WHERE `guid`=200841;
+-- Spawn Elder Kilias in Normal and Heroic modes of Drak'Tharon Keep
+UPDATE `creature` SET `spawnMask`=3 WHERE `guid`=200842;
+-- Spawn Elder Nurgen in Normal and Heroic modes of Azjol-Nerub
+UPDATE `creature` SET `spawnMask`=3 WHERE `guid`=200843;
+-- Spawn Elder Yurauk in Normal and Heroic modes of Halls of Stone
+UPDATE `creature` SET `spawnMask`=3 WHERE `guid`=200844;
+-- Spawn Elder Jarten in Normal and Heroic modes of Utgarde Keep
+UPDATE `creature` SET `spawnMask`=3 WHERE `guid`=200845;
+-- Spawn Elder Chogan'gada in Normal and Heroic modes of Utgarde Pinnacle
+UPDATE `creature` SET `spawnMask`=3 WHERE `guid`=200846;
+-- Spawn Elder Igasho in Normal and Heroic modes of The Nexus
+UPDATE `creature` SET `spawnMask`=3 WHERE `guid`=200847;
diff --git a/sql/old/3.3.5a/2012_02_11_02_world_pool.sql b/sql/old/3.3.5a/2012_02_11_02_world_pool.sql
new file mode 100644
index 00000000000..dd2cf949639
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_02_world_pool.sql
@@ -0,0 +1,19 @@
+SET @pool_id := 352;
+
+DELETE FROM `pool_template` WHERE `entry` IN (@pool_id, @pool_id+1);
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@pool_id,1, 'The Rokk <Master of Cooking> - Daily Quests'),
+(@pool_id+1,1, 'Old Man Barlowned - Daily Quests');
+
+DELETE FROM `pool_quest` WHERE `entry` IN (11377,11379,11380,11381) AND `pool_entry` = @pool_id;
+DELETE FROM `pool_quest` WHERE `entry` IN (11665,11666,11667,11668,11669) AND `pool_entry` = @pool_id+1;
+INSERT INTO `pool_quest` (`entry`,`pool_entry`,`description`) VALUES
+(11377,@pool_id, 'Revenge is Tasty'),
+(11379,@pool_id, 'Super Hot Stew'),
+(11380,@pool_id, 'Manalicious'),
+(11381,@pool_id, 'Soup for the Soul'),
+(11665,@pool_id+1, 'Crocolisks in the City'),
+(11666,@pool_id+1, 'Bait Bandits'),
+(11667,@pool_id+1, 'The One That Got Away'),
+(11668,@pool_id+1, 'Shrimpin Aint Easy'),
+(11669,@pool_id+1, 'Felblood Fillet');
diff --git a/sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql b/sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql
new file mode 100644
index 00000000000..80e86d52530
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_03_world_areatrigger.sql
@@ -0,0 +1,13 @@
+-- The Botanica and The Mecanar exit areatriggers
+DELETE FROM `areatrigger_teleport` WHERE `id` IN (4612,4614);
+INSERT INTO `areatrigger_teleport` (`id`,`name`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(4612,'The Botanica',530,3407.110107,1488.479980,182.837753,2.501119),
+(4614,'The Mechanar',530,2869.885742,1552.755249,252.158997,0.733993);
+
+-- Spawn portals
+DELETE FROM `gameobject` WHERE `id` IN (184221,184222) AND `guid` IN (233,236,237,242);
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(233,184222,553,1,1,158.952,391.653,-35.5291,0.0494656,0,0,0.0247303,0.999694,300,0,1),
+(236,184222,554,1,1,71.1997,149.657,25.5811,3.17222,0,0,0.999883,-0.0153126,300,0,1),
+(237,184221,553,1,1,158.952,391.653,-35.5291,0.0494656,0,0,0.0247303,0.999694,300,0,1),
+(242,184221,554,1,1,71.1997,149.657,25.5811,3.17222,0,0,0.999883,-0.0153126,300,0,1);
diff --git a/sql/old/3.3.5a/2012_02_11_04_world_sai.sql b/sql/old/3.3.5a/2012_02_11_04_world_sai.sql
new file mode 100644
index 00000000000..ba2d106f472
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_04_world_sai.sql
@@ -0,0 +1,49 @@
+SET @NPC_DATURA_BLOODROSE := 28532;
+SET @NPC_CAPTURED_DRAKKARI_SCOUT := 28541;
+SET @SPELL_IMMOLATION := 40148;
+
+-- Insert creature_text from sniff
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_DATURA_BLOODROSE,@NPC_CAPTURED_DRAKKARI_SCOUT);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_DATURA_BLOODROSE,0,0,'Indeed. Watch this, $r.',12,0,100,1,0,0,'Bloodrose Datura'),
+(@NPC_DATURA_BLOODROSE,1,0,'Here, troll... a gift!',12,0,100,0,0,0,'Bloodrose Datura'),
+(@NPC_DATURA_BLOODROSE,2,0,'Ugh... disgusting!',12,0,100,0,0,0,'Bloodrose Datura'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT,0,0,'For me? Really, mon?',12,0,100,6,0,0,'Captured Drakkari Scout'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT,1,0,'It....it be beautiful!',12,0,100,5,0,0,'Captured Drakkari Scout');
+
+-- SmartAIs
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@NPC_DATURA_BLOODROSE,@NPC_CAPTURED_DRAKKARI_SCOUT);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_DATURA_BLOODROSE,@NPC_CAPTURED_DRAKKARI_SCOUT) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_DATURA_BLOODROSE*100,@NPC_CAPTURED_DRAKKARI_SCOUT*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
+(@NPC_DATURA_BLOODROSE,0,0,1,62,0,100,0,9714,0,0,0,11,51949,0,0,0,0,0,7,0,0,0,0,0,0,0,'Bloodrose Datura - On gossip select - Spellcast Margarita Kill Credit'),
+(@NPC_DATURA_BLOODROSE,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,'Bloodrose Datura - On gossip select - Close gossip'),
+(@NPC_DATURA_BLOODROSE,0,2,0,61,0,100,0,0,0,0,0,80,@NPC_DATURA_BLOODROSE*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Bloodrose Datura - On gossip select - Run script'),
+(@NPC_DATURA_BLOODROSE*100,9,0,0,0,0,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Bloodrose Datura script - Remove npcflag gossip'),
+(@NPC_DATURA_BLOODROSE*100,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,'Bloodrose Datura script - Say line'),
+(@NPC_DATURA_BLOODROSE*100,9,2,0,0,0,100,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Bloodrose Datura script - Set walk'),
+(@NPC_DATURA_BLOODROSE*100,9,3,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,5202.604,-1317.188,242.642,0,'Bloodrose Datura script - Move to position'),
+(@NPC_DATURA_BLOODROSE*100,9,4,0,0,0,100,0,2400,2400,0,0,11,51925,0,0,0,0,0,1,0,0,0,0,0,0,0,'Bloodrose Datura script - Spellcast Throw'),
+(@NPC_DATURA_BLOODROSE*100,9,5,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Bloodrose Datura script - Say line'),
+(@NPC_DATURA_BLOODROSE*100,9,6,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,11,@NPC_CAPTURED_DRAKKARI_SCOUT,10,0,0,0,0,0,'Bloodrose Datura script - Set data'),
+(@NPC_DATURA_BLOODROSE*100,9,7,0,0,0,100,0,19000,19000,0,0,11,51927,0,0,0,0,0,1,0,0,0,0,0,0,0,'Bloodrose Datura script - Spellcast Death_Decay Visual'),
+(@NPC_DATURA_BLOODROSE*100,9,8,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,'Bloodrose Datura script - Say line'),
+(@NPC_DATURA_BLOODROSE*100,9,9,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,5203.73,-1313.077,242.767,0,'Bloodrose Datura script - Move to position'),
+(@NPC_DATURA_BLOODROSE*100,9,10,0,0,0,100,0,2500,2500,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.419,'Bloodrose Datura script - Set orientation'),
+(@NPC_DATURA_BLOODROSE*100,9,11,0,0,0,100,0,500,500,0,0,82,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Bloodrose Datura script - Add npcflag gossip'),
+
+(@NPC_CAPTURED_DRAKKARI_SCOUT,0,0,0,6,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout - On death - Despawn'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT,0,1,2,11,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout - On reset - Remove unit field bytes'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT,0,2,3,61,0,100,0,0,0,0,0,96,32,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout - On reset - Remove dynamicflags'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT,0,3,0,61,0,100,0,0,0,0,0,28,@SPELL_IMMOLATION,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout - On reset - Remove aura'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT,0,4,0,38,0,100,0,0,1,0,0,80,@NPC_CAPTURED_DRAKKARI_SCOUT*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout - On data set - Run script'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.653,'Captured Drakkari Scout script - Set orientation'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,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,'Captured Drakkari Scout script - Say line'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,2,0,0,0,100,0,3600,3600,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Say line'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,3,0,0,0,100,0,3500,3500,0,0,11,43327,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Spellcast Vomit'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,4,0,0,0,100,0,2500,2500,0,0,11,51929,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Spellcast Bloody Explosion (Green)'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,5,0,0,0,100,0,0,0,0,0,11,51930,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Spellcast Scourge Troll Transform'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,6,0,0,0,100,0,10000,10000,0,0,11,@SPELL_IMMOLATION,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Spellcast'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,7,0,0,0,100,0,500,500,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Set unit field bytes'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,8,0,0,0,100,0,1500,1500,0,0,95,32,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Set dynamicflags'),
+(@NPC_CAPTURED_DRAKKARI_SCOUT*100,9,9,0,0,0,100,0,8000,8000,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Captured Drakkari Scout script - Die');
diff --git a/sql/old/3.3.5a/2012_02_11_05_world_sai.sql b/sql/old/3.3.5a/2012_02_11_05_world_sai.sql
new file mode 100644
index 00000000000..2d773911118
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_05_world_sai.sql
@@ -0,0 +1,65 @@
+SET @NPC_STEFAN := 28518;
+SET @NPC_WITHERED_TROLL := 28519;
+SET @NPC_NASS := 28521;
+SET @NPC_NASS_TARGET_KC_BUNNY := 28523;
+SET @SPELL_PLAYER_SUMMON_NASS := 51864;
+SET @SPELL_SUMMON_NASS := 51865;
+SET @SPELL_KICK_NASS := 51866;
+SET @SPELL_COLLECT_HAIR_SAMPLE := 51870;
+SET @SPELL_HAIR_SAMPLE_COLLECTED := 51872;
+SET @SPELL_QUEST_ACCEPT_SUMMON_NASS := 51889;
+SET @SPELL_KICKIN_NASS_QUEST_COMPLETION := 51910;
+
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@SPELL_KICK_NASS,@SPELL_COLLECT_HAIR_SAMPLE,@SPELL_KICKIN_NASS_QUEST_COMPLETION);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,0,@SPELL_KICK_NASS,0,18,3,@NPC_NASS,0,0,'','Spell Kick Nass only targets Nass'),
+(13,0,@SPELL_COLLECT_HAIR_SAMPLE,0,18,1,@NPC_NASS_TARGET_KC_BUNNY,0,0,'','Spell Collect Hair Sample only targets Nass Target KC Bunny'),
+(13,0,@SPELL_KICKIN_NASS_QUEST_COMPLETION,0,18,3,@NPC_NASS,0,0,'','Spell Kickin'' Nass: Quest Completion only targets Nass');
+
+-- Insert creature_text from sniff
+DELETE FROM `creature_text` WHERE `entry` IN (@NPC_STEFAN,@NPC_NASS);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_STEFAN,0,0,'Not sure how ol'' Nass always finds his way back here. Must be by smell....',12,0,100,0,0,0,'Stefan Vadu'),
+(@NPC_NASS,0,0,'Let''s go to Zul''Drak he says. We can get to the bottom of this mess, he says...',12,0,33,0,0,0,'Nass'),
+(@NPC_NASS,0,1,'One more flock of scourge hair gained, one more shred of dignity lost...',12,0,33,0,0,0,'Nass'),
+(@NPC_NASS,0,2,'Are we finished yet?',12,0,33,0,0,0,'Nass');
+
+-- Spellscripts
+DELETE FROM `spell_scripts` WHERE `id` IN (@SPELL_PLAYER_SUMMON_NASS,@SPELL_QUEST_ACCEPT_SUMMON_NASS,@SPELL_KICKIN_NASS_QUEST_COMPLETION);
+INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+(@SPELL_PLAYER_SUMMON_NASS,0,0,15,@SPELL_SUMMON_NASS,2,0,0,0,0,0), -- On Player Summon Nass cast - Cast Summon Nass
+(@SPELL_QUEST_ACCEPT_SUMMON_NASS,0,0,15,@SPELL_SUMMON_NASS,2,0,0,0,0,0), -- On Quest Accept Summon Nass cast - Cast Summon Nass
+(@SPELL_KICKIN_NASS_QUEST_COMPLETION,0,0,18,0,0,0,0,0,0,0); -- On Kickin' Nass: Quest Completion - Despawn Nass
+
+-- SmartAIs
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|32768|256|8, `AIName`='SmartAI' WHERE `entry`=@NPC_NASS;
+UPDATE `creature_template` SET `AIName`='SmartAI', `flags_extra`=`flags_extra`|128 WHERE `entry`=@NPC_NASS_TARGET_KC_BUNNY;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@NPC_STEFAN,@NPC_WITHERED_TROLL);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_STEFAN,@NPC_WITHERED_TROLL,@NPC_NASS,@NPC_NASS_TARGET_KC_BUNNY) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_NASS*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
+(@NPC_STEFAN,0,0,1,62,0,100,0,9709,0,0,0,11,@SPELL_PLAYER_SUMMON_NASS,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Spellcast'),
+(@NPC_STEFAN,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,'Stefan Vadu - On gossip select - Close gossip'),
+(@NPC_STEFAN,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Say line'),
+(@NPC_STEFAN,0,3,0,19,0,100,0,12630,0,0,0,11,@SPELL_QUEST_ACCEPT_SUMMON_NASS,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On quest accept - Spellcast'),
+
+(@NPC_WITHERED_TROLL,0,0,0,9,0,100,0,0,5,7000,11000,11,54345,0,0,0,0,0,2,0,0,0,0,0,0,0,'Withered Troll - On range - Spellcast Withering Strike'),
+(@NPC_WITHERED_TROLL,0,1,0,6,0,100,0,0,0,0,0,11,51869,3,0,0,0,0,1,0,0,0,0,0,0,0,'Withered Troll - On death - Spellcast Summon Nass Target Bunny'),
+
+(@NPC_NASS,0,0,1,54,0,100,0,0,0,0,0,11,51868,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On summon - Spellcast Nass Periodic Say'),
+(@NPC_NASS,0,1,2,61,0,100,0,0,0,0,0,11,61438,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On summon - Spellcast Nass Heartbeat'),
+(@NPC_NASS,0,2,3,61,0,100,0,0,0,0,0,8,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On summon - React defensive'),
+(@NPC_NASS,0,3,0,61,0,100,0,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Nass - On summon - Follow'),
+(@NPC_NASS,0,4,5,8,0,100,0,@SPELL_KICK_NASS,0,0,0,5,34,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On spellhit - Play emote'),
+(@NPC_NASS,0,5,6,61,0,100,0,0,0,0,0,69,0,0,0,0,0,0,19,@NPC_NASS_TARGET_KC_BUNNY,20,0,0,0,0,0,'Nass - On spellhit - Move to closest Nass Target KC Bunny'),
+(@NPC_NASS,0,6,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On spellhit - Set event phase'),
+(@NPC_NASS,0,7,0,34,1,100,0,0,0,0,0,11,@SPELL_COLLECT_HAIR_SAMPLE,0,0,0,0,0,19,@NPC_NASS_TARGET_KC_BUNNY,5,0,0,0,0,0,'Nass - On movementinform (phase 1) - Spellcast'),
+(@NPC_NASS,0,8,9,8,1,100,0,@SPELL_HAIR_SAMPLE_COLLECTED,0,0,0,11,51871,0,0,0,0,0,23,0,0,0,0,0,0,0,'Nass - On spellhit (phase 1) - Spellcast Nass Kill Credit'),
+(@NPC_NASS,0,9,0,61,1,100,0,0,0,0,0,80,@NPC_NASS*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On spellhit (phase 1) - Run script'),
+(@NPC_NASS,0,10,0,8,0,100,0,51867,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass - On spellhit Nass Say - Say line'),
+(@NPC_NASS*100,9,0,0,0,1,100,0,1000,1000,0,0,29,0,0,0,0,0,0,23,0,0,0,0,0,0,0,'Nass'' script - Follow'),
+(@NPC_NASS*100,9,1,0,0,1,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nass'' script - Set event phase'),
+
+(@NPC_NASS_TARGET_KC_BUNNY,0,0,1,8,0,100,0,@SPELL_COLLECT_HAIR_SAMPLE,0,0,0,11,@SPELL_HAIR_SAMPLE_COLLECTED,0,0,0,0,0,7,0,0,0,0,0,0,0,'Nass Target KC Bunny - On spellhit - Spellcast'),
+(@NPC_NASS_TARGET_KC_BUNNY,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,'Nass Target KC Bunny - On spellhit - Despawn');
diff --git a/sql/old/3.3.5a/2012_02_11_06_world_sai.sql b/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
new file mode 100644
index 00000000000..5a021bdfb3d
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_06_world_sai.sql
@@ -0,0 +1,16 @@
+SET @NPC = 3301;
+-- reduce spawn time to ten sec
+UPDATE `quest_end_scripts` SET `datalong2`=10000 WHERE `id`=231;
+-- Add text for Morgan Ladimore
+DELETE FROM `creature_text` WHERE `entry`=@NPC;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(@NPC, 1, 0, 'My sword Archeus served me well in life, but as at last my spirit may pass from the unhappy existence, I need it no longer.', 12, 0, 100, 0, 0, 0, 'Morgan Ladimore - A Daughter''s Love'),
+(@NPC, 2, 0, 'I shall cling to the love of my daugter and hope that I will find forgiveness under the Light for my sins.', 12, 0, 100, 0, 0, 0, 'Morgan Ladimore - A Daughter''s Love');
+-- Add SAI to Morgan Ladimore for on spawn
+UPDATE `creature_template` SET `AIName`='SmartAI' 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,0,1,0,100,1,0,0,0,0,18,514,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Morgan Ladimore - On summon - make passive non-attackable'),
+(@NPC,0,1,0,1,0,100,1,4000,4000,0,0,84,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Morgan Ladimore - 4 sec - say first'),
+(@NPC,0,2,0,1,0,100,1,7000,7000,0,0,84,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Morgan Ladimore - 7 sec - say second'),
+(@NPC,0,3,4,1,0,100,1,9000,9000,0,0,90,8,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'Morgan Ladimore - 9 sec - Set bytes1 kneel');
diff --git a/sql/old/3.3.5a/2012_02_11_07_world_sai.sql b/sql/old/3.3.5a/2012_02_11_07_world_sai.sql
new file mode 100644
index 00000000000..935422fed67
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_07_world_sai.sql
@@ -0,0 +1,7 @@
+-- Quest 11529 "Sorlof's Booty"
+-- Sorlof SAI
+SET @ENTRY := 24914; -- NPC entry
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' 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,11,45070,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sorlof - On Death - Cast Sorlof''s Booty on self');
diff --git a/sql/old/3.3.5a/2012_02_11_08_world_sai.sql b/sql/old/3.3.5a/2012_02_11_08_world_sai.sql
new file mode 100644
index 00000000000..81a0307f9ad
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_08_world_sai.sql
@@ -0,0 +1 @@
+UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=3301 AND `source_type`=0 AND `id`=3 AND `link`=4;
diff --git a/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql b/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
new file mode 100644
index 00000000000..3c49b752ee2
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_09_world_sai_gossip.sql
@@ -0,0 +1,88 @@
+-- Creature Gossip_menu_option Update from sniff
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9511,9590,9592,9780,10220) AND `id`=0;
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9821,9784,9785) AND `id`=1;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(9511,0,0, 'I am ready to be teleported to Dalaran.',1,1,0,0,0,0, ''),
+(9590,0,0, 'Why would I want to ride a shredder?',1,1,9592,0,0,0, ''),
+(9592,0,0, 'Where can I get a Refurbished Shredder Key?',1,1,9591,0,0,0, ''),
+(9780,0,0, 'I am ready to be teleported to Dalaran.',1,1,0,0,0,0, ''),
+(9821,1,1, 'I''m looking for a lost companion.',3,128,0,0,0,0, ''),
+(9784,1,0, 'I wish to travel to Light''s Breach.',1,1,0,0,0,0, ''),
+(9785,1,0, 'I wish to travel to Light''s Breach.',1,1,0,0,0,0, ''),
+(10220,0,0, 'I am ready to return to the realm of the living.',1,1,0,0,0,0, '');
+
+-- Gossip Menu insert from sniff
+DELETE FROM `gossip_menu` WHERE `entry`=9431 AND `text_id`=12694;
+DELETE FROM `gossip_menu` WHERE `entry`=9590 AND `text_id`=12943;
+DELETE FROM `gossip_menu` WHERE `entry`=9591 AND `text_id`=12945;
+DELETE FROM `gossip_menu` WHERE `entry`=9592 AND `text_id`=12944;
+DELETE FROM `gossip_menu` WHERE `entry`=10220 AND `text_id`=14208;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(9431,12694),
+(9590,12943),
+(9591,12945),
+(9592,12944),
+(10220,14208);
+
+-- Creature Gossip_menu_id Update from sniff
+UPDATE `creature_template` SET `gossip_menu_id`=9431 WHERE `entry`=26814; -- Harrison Jones
+UPDATE `creature_template` SET `gossip_menu_id`=10220, `AIName`='SmartAI' WHERE `entry`=26924; -- Gan'jo
+UPDATE `creature_template` SET `gossip_menu_id`=9590 WHERE `entry`=27565; -- Gurtor
+UPDATE `creature_template` SET `gossip_menu_id`=9780 WHERE `entry` IN (29155,29159,29160,29162); -- Magistrix Kaelana, Magister Varenthas, Magistrix Phaelista, Magister Tyr'ganal
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=29250; -- Tim Street
+
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9511,9513,9780,10220) AND `SourceEntry`=0;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9785,9784) AND `SourceEntry`=1;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,10220,0,0,9,12137,0,0,0,'','Gan''jo - Show gossip option only if player has taken quest 12137'),
+(15,9513,0,0,28,12791,0,0,0,'','Show gossip option only if player has complete quest 12791'),
+(15,9511,0,0,28,12794,0,0,0,'','Show gossip option only if player has complete quest 12794'),
+(15,9780,0,0,28,12791,0,0,0,'','Show gossip option only if player has complete quest 12791'),
+(15,9780,0,1,28,12794,0,0,0,'','Show gossip option only if player has complete quest 12794'),
+(15,9780,0,2,28,12796,0,0,0,'','Show gossip option only if player has complete quest 12796'),
+(15,9784,1,0,28,12770,0,0,0,'','Samuel Clearbook - Show gossip option only if player has complete quest 12770'),
+(15,9785,1,0,28,12763,0,0,0,'','Makki Wintergale - Show gossip option only if player has complete quest 12763');
+
+-- SmartAIs
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (23729,26471,26673,27158,29155,29158,29159,29160,29161,29162,29169);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26853,26876) AND `source_type`=0 AND `id` IN (3,4); -- these npcs already had a SmartAI assigned so deleting the new ids only
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (23729,26471,26673,26924,27158,29155,29158,29159,29160,29161,29162,29169) AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(23729,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Baron Ulrik von Stromhearth - On gossip select - Spellcast'),
+(23729,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,'Baron Ulrik von Stromhearth - On gossip select - Close gossip'),
+(26471,0,0,1,62,0,100,0,9513,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Archmage Aethas Sunreaver - On gossip select - Spellcast'),
+(26471,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,'Image of Archmage Aethas Sunreaver - On gossip select - Close gossip'),
+(26673,0,0,1,62,0,100,0,9511,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Image of Archmage Modera - On gossip select - Spellcast'),
+(26673,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,'Image of Archmage Modera - On gossip select - Close gossip'),
+(26853,0,3,4,62,0,100,0,9785,1,0,0,11,53288,0,0,0,0,0,7,0,0,0,0,0,0,0,'Makki Wintergale - On gossip select - Close gossip'),
+(26853,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Makki Wintergale - On gossip select - Close gossip'),
+(26876,0,3,4,62,0,100,0,9784,1,0,0,11,53311,0,0,0,0,0,7,0,0,0,0,0,0,0,'Samuel Clearbook - On gossip select - Close gossip'),
+(26876,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Samuel Clearbook - On gossip select - Close gossip'),
+(26924,0,0,1,62,0,100,0,10220,0,0,0,11,61613,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gan''jo - On gossip select - Close gossip'),
+(26924,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,'Gan''jo - On gossip select - Close gossip'),
+(27158,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Vas the Unstable - On gossip select - Spellcast'),
+(27158,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,'Vas the Unstable - On gossip select - Close gossip'),
+(29155,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magistrix Kaelana - On gossip select - Spellcast'),
+(29155,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,'Magistrix Kaelana - On gossip select - Close gossip'),
+(29158,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magister Dath''omere - On gossip select - Spellcast'),
+(29158,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,'Magister Dath''omere - On gossip select - Close gossip'),
+(29159,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magister Varenthas - On gossip select - Spellcast'),
+(29159,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,'Magister Varenthas - On gossip select - Close gossip'),
+(29160,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magistrix Phaelista - On gossip select - Spellcast'),
+(29160,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,'Magistrix Phaelista - On gossip select - Close gossip'),
+(29161,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magistrix Haelenai - On gossip select - Spellcast'),
+(29161,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,'Magistrix Haelenai - On gossip select - Close gossip'),
+(29162,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magister Tyr''ganal - On gossip select - Spellcast'),
+(29162,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,'Magister Tyr''ganal - On gossip select - Close gossip'),
+(29169,0,0,1,62,0,100,0,9780,0,0,0,11,30719,0,0,0,0,0,7,0,0,0,0,0,0,0,'Magister Teronus III - On gossip select - Spellcast'),
+(29169,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,'Magister Teronus III - On gossip select - Close gossip');
+
+DELETE FROM `spell_target_position` WHERE `id`=30719;
+INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(30719,571,5807.83,587.96,660.939,1.663); -- Teleport to Dalaran
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (53288,53311);
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(53288,53289,1,'Flight - Onequah to Light''s Breach trigger Flight - Onequah to Light''s Breach'),
+(53311,53310,1,'Flight - Westfall to Light''s Breach trigger Flight - Westfall to Light''s Breach');
diff --git a/sql/old/3.3.5a/2012_02_11_10_world_sai.sql b/sql/old/3.3.5a/2012_02_11_10_world_sai.sql
new file mode 100644
index 00000000000..f2095e320fd
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_11_10_world_sai.sql
@@ -0,0 +1,4 @@
+-- Set the State in the SmartAI upon Death of Ward Keeper in the Instance
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 4625 AND `source_type` = 0 AND `id` = 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
+(4625,0,1,0,6,0,100,2,0,0,0,0,34,1,1,0,0,0,0,0,0,0,0,0,0,0,0,'Ward Keepers - Send Event on Die');
diff --git a/sql/old/3.3.5a/2012_02_12_00_world_gossip.sql b/sql/old/3.3.5a/2012_02_12_00_world_gossip.sql
new file mode 100644
index 00000000000..f0c57e87b01
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_00_world_gossip.sql
@@ -0,0 +1,132 @@
+-- Creature Gossip_menu_option Update from sniff
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9709 AND `id` IN (0,1);
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9731 AND `id` IN (0,1,2,3,4,5);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9714,9717,9732,11091) 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
+(9709,0,0, 'I''ve lost Nass...',1,1,0,0,0,0, ''),
+(9709,1,0, 'I''ve lost my ensorcelled choker!',1,1,9797,0,0,0, ''),
+(9714,0,0, 'Stefan told me you would demonstrate the purpose of this item',1,1,0,0,0,0, ''),
+(9717,0,1, 'What are you hiding under that fold of flesh?',3,128,0,0,0,0, ''),
+(9731,0,0, 'I am ready to accompany you, Drakuru.',1,1,0,0,0,0, ''),
+(9731,1,0, 'Gorebag has shown me the Drakkari Empire. I am eager to help you conquer it!',1,1,10403,0,0,0, ''),
+(9731,2,0, 'I have whipped the Blight Geists into shape!',1,1,10404,0,0,0, ''),
+(9731,3,0, 'I have defeated Darmuk! How else may I serve you?',1,1,10405,0,0,0, ''),
+(9731,4,0, 'The Drakkari Chieftains have been captured! What more would you have me do?',1,1,10406,0,0,0, ''),
+(9731,5,0, 'I have witnessed your magnificent operation, Drakuru. When do we put your plan into effect?',1,1,10407,0,0,0, ''),
+(9732,0,0, 'Uhh, can you send me on the tour of Zul''Drak?',1,1,0,0,0,0, ''),
+(11091,0,0, 'I''m ready.',1,1,0,0,0,0, '');
+
+-- Gossip Menu insert from sniff
+DELETE FROM `gossip_menu` WHERE `entry`=9639 AND `text_id`=13046;
+DELETE FROM `gossip_menu` WHERE `entry`=9655 AND `text_id`=13078;
+DELETE FROM `gossip_menu` WHERE `entry`=9657 AND `text_id`=13080;
+DELETE FROM `gossip_menu` WHERE `entry`=9675 AND `text_id`=13121;
+DELETE FROM `gossip_menu` WHERE `entry`=9709 AND `text_id`=13271;
+DELETE FROM `gossip_menu` WHERE `entry`=9714 AND `text_id`=13290;
+DELETE FROM `gossip_menu` WHERE `entry`=9717 AND `text_id`=13300;
+DELETE FROM `gossip_menu` WHERE `entry`=9731 AND `text_id`=13324;
+DELETE FROM `gossip_menu` WHERE `entry`=9731 AND `text_id`=13325;
+DELETE FROM `gossip_menu` WHERE `entry`=9731 AND `text_id`=13348;
+DELETE FROM `gossip_menu` WHERE `entry`=9731 AND `text_id`=13422;
+DELETE FROM `gossip_menu` WHERE `entry`=9732 AND `text_id`=13326;
+DELETE FROM `gossip_menu` WHERE `entry`=9752 AND `text_id`=13390;
+DELETE FROM `gossip_menu` WHERE `entry`=9752 AND `text_id`=13391;
+DELETE FROM `gossip_menu` WHERE `entry`=9797 AND `text_id`=13501;
+DELETE FROM `gossip_menu` WHERE `entry`=9848 AND `text_id`=13619;
+DELETE FROM `gossip_menu` WHERE `entry`=9852 AND `text_id`=13639;
+DELETE FROM `gossip_menu` WHERE `entry`=9861 AND `text_id`=13658;
+DELETE FROM `gossip_menu` WHERE `entry`=10403 AND `text_id`=14441;
+DELETE FROM `gossip_menu` WHERE `entry`=10404 AND `text_id`=14442;
+DELETE FROM `gossip_menu` WHERE `entry`=10405 AND `text_id`=14443;
+DELETE FROM `gossip_menu` WHERE `entry`=10406 AND `text_id`=14444;
+DELETE FROM `gossip_menu` WHERE `entry`=10407 AND `text_id`=14445;
+DELETE FROM `gossip_menu` WHERE `entry`=11091 AND `text_id`=15432;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(9639,13046),
+(9655,13078),
+(9657,13080),
+(9675,13121),
+(9709,13271),
+(9714,13290),
+(9717,13300),
+(9731,13324),(9731,13325),(9731,13348),(9731,13422),
+(9732,13326),
+(9752,13390),(9752,13391),
+(9797,13501),
+(9848,13619),
+(9852,13639),
+(9861,13658),
+(10403,14441),
+(10404,14442),
+(10405,14443),
+(10406,14444),
+(10407,14445),
+(11091,15432);
+
+-- Creature Gossip_menu_id Update from sniff
+UPDATE `creature_template` SET `gossip_menu_id`=9639 WHERE `entry`=28059; -- Commander Falstaav
+UPDATE `creature_template` SET `gossip_menu_id`=9655 WHERE `entry`=28141; -- Crusader Lamoof
+UPDATE `creature_template` SET `gossip_menu_id`=9657 WHERE `entry`=28143; -- Crusader Josephine
+UPDATE `creature_template` SET `gossip_menu_id`=9675 WHERE `entry`=28309; -- Sub-Lieutenant Jax
+UPDATE `creature_template` SET `gossip_menu_id`=9715 WHERE `entry`=28561; -- Spirit of Rhunok
+UPDATE `creature_template` SET `gossip_menu_id`=9717 WHERE `entry`=28589; -- Gristlegut
+UPDATE `creature_template` SET `gossip_menu_id`=9731 WHERE `entry`=28503; -- Overlord Drakuru
+UPDATE `creature_template` SET `gossip_menu_id`=9732 WHERE `entry`=28666; -- Gorebag
+UPDATE `creature_template` SET `gossip_menu_id`=9752 WHERE `entry`=28888; -- Captured Drakkari Chieftain
+UPDATE `creature_template` SET `gossip_menu_id`=9848 WHERE `entry`=29688; -- Engineer Reed
+UPDATE `creature_template` SET `gossip_menu_id`=9852 WHERE `entry`=29647; -- Gymer
+UPDATE `creature_template` SET `gossip_menu_id`=9861 WHERE `entry`=29689; -- Crusader MacKellar
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=28790; -- Fala Softhoof
+
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9709 AND `SourceEntry`=13271;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9714 AND `SourceEntry`=13290;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9731 AND `SourceEntry` IN (13324,13325,13348,13422);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=9752 AND `SourceEntry`=13391;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9709,9714,9732) AND `SourceEntry`=0;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9709 AND `SourceEntry`=1;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9731 AND `SourceEntry` IN (0,1,2,3,4,5);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,9709,13271,0,0,9,12630,0,0,0,0,'','Stefan Vadu - Show different gossip if player has taken quest 12630'),
+(14,9709,13271,0,0,1,61438,0,0,1,0,'','Stefan Vadu - Show different gossip if player is not affected by aura 61438'),
+(14,9714,13290,0,0,9,12637,0,0,0,0,'','Bloodrose Datura - Show different gossip if player has taken quest 12637'),
+(14,9714,13290,0,1,9,12638,0,0,0,0,'','Bloodrose Datura - Show different gossip if player has taken quest 12638'),
+(14,9731,13324,0,0,8,12238,0,0,0,0,'','Overlord Drakuru - Show different gossip if player has rewarded quest 12238'),
+(14,9731,13325,0,0,8,12661,0,0,0,0,'','Overlord Drakuru - Show different gossip if player has rewarded quest 12663'),
+(14,9731,13348,0,0,8,12238,0,0,1,0,'','Overlord Drakuru - Show different gossip if player has not rewarded quest 12238'),
+(14,9731,13422,0,0,9,12713,0,0,0,0,'','Overlord Drakuru - Show different gossip if player has taken quest 12713'),
+(14,9752,13391,0,0,1,51966,0,0,0,0,'','Captured Drakkari Chieftain - Show different gossip if player is affected by aura 51966'),
+(15,9709,0,0,0,9,12630,0,0,0,0,'','Show gossip option only if player has taken quest 12630'),
+(15,9709,0,0,0,1,61438,0,0,1,0,'','Show gossip option only if player is not affected by aura 61438'),
+(15,9709,1,0,0,9,12648,0,0,0,0,'','Show gossip option only if player has taken quest 12648'),
+(15,9709,1,0,0,2,38699,1,0,1,0,'','Show gossip option only if player has no item 38699'),
+(15,9709,1,0,1,9,12649,0,0,0,0,'','Show gossip option only if player has taken quest 12649'),
+(15,9709,1,0,1,2,38699,1,0,1,0,'','Show gossip option only if player no item 38699'),
+(15,9709,1,0,2,9,12661,0,0,0,0,'','Show gossip option only if player has taken quest 12661'),
+(15,9709,1,0,2,2,38699,1,0,1,0,'','Show gossip option only if player no item 38699'),
+(15,9709,1,0,3,9,12669,0,0,0,0,'','Show gossip option only if player has taken quest 12669'),
+(15,9709,1,0,3,2,38699,1,0,1,0,'','Show gossip option only if player no item 38699'),
+(15,9709,1,0,4,9,12676,0,0,0,0,'','Show gossip option only if player has taken quest 12676'),
+(15,9709,1,0,4,2,38699,1,0,1,0,'','Show gossip option only if player no item 38699'),
+(15,9709,1,0,5,9,12677,0,0,0,0,'','Show gossip option only if player has taken quest 12677'),
+(15,9709,1,0,5,2,38699,1,0,1,0,'','Show gossip option only if player no item 38699'),
+(15,9709,1,0,6,9,12713,0,0,0,0,'','Show gossip option only if player has taken quest 12713'),
+(15,9709,1,0,6,2,38699,1,0,1,0,'','Show gossip option only if player no item 38699'),
+(15,9714,0,0,0,9,12637,0,0,0,0,'','Show gossip option only if player has taken quest 12637'),
+(15,9714,0,0,1,9,12638,0,0,0,0,'','Show gossip option only if player has taken quest 12638'),
+(15,9714,0,0,0,2,38678,1,0,0,0,'','Show gossip option only if player has item 38678'),
+(15,9731,0,0,0,9,12713,0,0,0,0,'','Show gossip option only if player has taken quest 12713'),
+(15,9731,1,0,0,8,12663,0,0,0,0,'','Show gossip option only if player has rewarded quest 12663'),
+(15,9731,1,0,0,8,12661,0,0,1,0,'','Show gossip option only if player has not rewarded quest 12661'),
+(15,9731,1,0,1,8,12664,0,0,0,0,'','Show gossip option only if player has rewarded quest 12664'),
+(15,9731,1,0,1,8,12661,0,0,1,0,'','Show gossip option only if player has not rewarded quest 12661'),
+(15,9731,2,0,0,8,12673,0,0,0,0,'','Show gossip option only if player has rewarded quest 12673'),
+(15,9731,2,0,0,8,12669,0,0,1,0,'','Show gossip option only if player has not rewarded quest 12669'),
+(15,9731,3,0,0,8,12686,0,0,0,0,'','Show gossip option only if player has rewarded quest 12686'),
+(15,9731,3,0,0,8,12677,0,0,1,0,'','Show gossip option only if player has not rewarded quest 12677'),
+(15,9731,4,0,0,8,12690,0,0,0,0,'','Show gossip option only if player has rewarded quest 12690'),
+(15,9731,4,0,0,8,12676,0,0,1,0,'','Show gossip option only if player has not rewarded quest 12676'),
+(15,9731,5,0,0,8,12710,0,0,0,0,'','Show gossip option only if player has rewarded quest 12710'),
+(15,9731,5,0,0,8,12676,0,0,1,0,'','Show gossip option only if player has not rewarded quest 12676'),
+(15,9732,0,0,0,9,12663,0,0,0,0,'','Show gossip option only if player has taken quest 12663'),
+(15,9732,0,0,1,9,12664,0,0,0,0,'','Show gossip option only if player has taken quest 12664');
diff --git a/sql/old/3.3.5a/2012_02_12_01_world_sai.sql b/sql/old/3.3.5a/2012_02_12_01_world_sai.sql
new file mode 100644
index 00000000000..4e96f1da7c9
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_01_world_sai.sql
@@ -0,0 +1,243 @@
+-- Hot On The Trail (A:24849 H:24851)
+
+SET @QUEST_A := 24849;
+SET @QUEST_H := 24851;
+
+SET @BUNNY_BANK := 38340; -- [DND] Holiday - Love - Bank Bunny
+SET @BUNNY_BANK_SW_GUID := 208836;
+SET @BUNNY_BANK_ORG_GUID := 208835;
+SET @BUNNY_AH := 38341; -- [DND] Holiday - Love - AH Bunny
+SET @BUNNY_AH_SW_GUID := 208837;
+SET @BUNNY_AH_ORG_GUID := 208838;
+SET @BUNNY_BARBER := 38342; -- [DND] Holiday - Love - Barber Bunny
+SET @BUNNY_BARBER_SW_GUID := 208839;
+SET @BUNNY_BARBER_ORG_GUID := 208840;
+
+SET @TRIGGER_BANK_SW := 5710;
+SET @TRIGGER_AH_SW := 5711;
+SET @TRIGGER_BARBER_SW := 5712;
+SET @TRIGGER_BANK_ORG := 5715;
+SET @TRIGGER_AH_ORG := 5714;
+SET @TRIGGER_BARBER_ORG := 5716;
+
+SET @SPELL_BANK_SW := 71713; -- Searching the Bank
+SET @SPELL_BANK_ORG := 71759;
+SET @SPELL_AH_SW := 71745; -- Searching the Auction House
+SET @SPELL_AH_ORG := 71760;
+SET @SPELL_BARBER_SW := 71752; -- Searching the Barber Shop
+SET @SPELL_BARBER_ORG := 71758;
+
+-- spells to 'trick' the player
+SET @SPELL_ROCKET := 71715; -- Snivel's Rocket (bank)
+SET @SPELL_BLIND := 71750; -- Blind! (ah)
+SET @SPELL_VANISH := 24222; -- Vanish Visual (barber)
+
+SET @SNIVEL_BANK_SW := 38334; -- Snivel Rustrocket <Venture Co.>
+SET @SNIVEL_BANK_ORG := 38337;
+SET @SNIVEL_AH_SW := 38335;
+SET @SNIVEL_AH_ORG := 38338;
+SET @SNIVEL_BARBER_SW := 38336;
+SET @SNIVEL_BARBER_ORG := 38339;
+
+SET @SPELL_SUM_SW_BANK := 71712; -- Summon Snivel
+SET @SPELL_SUM_ORG_BANK := 71762;
+SET @SPELL_SUM_SW_AH := 71744;
+SET @SPELL_SUM_ORG_AH := 71763;
+SET @SPELL_SUM_SW_BARBER := 71751;
+SET @SPELL_SUM_ORG_BARBER := 71765;
+
+UPDATE `quest_template` SET `SpecialFlags`=`SpecialFlags`|2 WHERE `Id` IN (@QUEST_A,@QUEST_H);
+
+DELETE FROM `areatrigger_involvedrelation` WHERE `id` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG);
+INSERT INTO `areatrigger_involvedrelation` (`id`,`quest`) VALUES
+(@TRIGGER_BANK_SW,@QUEST_A),
+(@TRIGGER_AH_SW,@QUEST_A),
+(@TRIGGER_BARBER_SW,@QUEST_A),
+--
+(@TRIGGER_BANK_ORG,@QUEST_H),
+(@TRIGGER_AH_ORG,@QUEST_H),
+(@TRIGGER_BARBER_ORG,@QUEST_H);
+
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG);
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
+(@TRIGGER_BANK_SW,'SmartTrigger'),
+(@TRIGGER_AH_SW,'SmartTrigger'),
+(@TRIGGER_BARBER_SW,'SmartTrigger'),
+--
+(@TRIGGER_BANK_ORG,'SmartTrigger'),
+(@TRIGGER_AH_ORG,'SmartTrigger'),
+(@TRIGGER_BARBER_ORG,'SmartTrigger');
+
+
+-- area trigger scripts
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG) 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
+(@TRIGGER_BANK_SW,2,0,1,46,0,100,0,@TRIGGER_BANK_SW,0,0,0,86,@SPELL_BANK_SW,0,10,@BUNNY_BANK_SW_GUID,@BUNNY_BANK,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BANK_SW,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BANK_SW_GUID,@BUNNY_BANK,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_AH_SW,2,0,1,46,0,100,0,@TRIGGER_AH_SW,0,0,0,86,@SPELL_AH_SW,0,10,@BUNNY_AH_SW_GUID,@BUNNY_AH,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_AH_SW,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_AH_SW_GUID,@BUNNY_AH,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_BARBER_SW,2,0,1,46,0,100,0,@TRIGGER_BARBER_SW,0,0,0,86,@SPELL_BARBER_SW,0,10,@BUNNY_BARBER_SW_GUID,@BUNNY_BARBER,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BARBER_SW,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BARBER_SW_GUID,@BUNNY_BARBER,0,0,0,0,0,'Link - Kill - Bunny'),
+-- --
+(@TRIGGER_BANK_ORG,2,0,1,46,0,100,0,@TRIGGER_BANK_ORG,0,0,0,86,@SPELL_BANK_ORG,0,10,@BUNNY_BANK_ORG_GUID,@BUNNY_BANK,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BANK_ORG,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BANK_ORG_GUID,@BUNNY_BANK,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_AH_ORG,2,0,1,46,0,100,0,@TRIGGER_AH_ORG,0,0,0,86,@SPELL_AH_ORG,0,10,@BUNNY_AH_ORG_GUID,@BUNNY_AH,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_AH_ORG,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_AH_ORG_GUID,@BUNNY_AH,0,0,0,0,0,'Link - Kill - Bunny'),
+--
+(@TRIGGER_BARBER_ORG,2,0,1,46,0,100,0,@TRIGGER_BARBER_ORG,0,0,0,86,@SPELL_BARBER_ORG,0,10,@BUNNY_BARBER_ORG_GUID,@BUNNY_BARBER,0,7,0,0,0,0,0,0,0,'On Trigger - Crosscast - Invoker'),
+(@TRIGGER_BARBER_ORG,2,1,0,61,0,100,0,0,0,0,0,51,0,0,0,0,0,0,10,@BUNNY_BARBER_ORG_GUID,@BUNNY_BARBER,0,0,0,0,0,'Link - Kill - Bunny');
+
+
+-- Snivel Rustrocket scripts
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SNIVEL_BANK_SW*100,@SNIVEL_AH_SW*100,@SNIVEL_BARBER_SW*100,@SNIVEL_BANK_ORG*100,@SNIVEL_AH_ORG*100,@SNIVEL_BARBER_ORG*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
+(@SNIVEL_BANK_SW,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BANK_SW*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_BANK_SW,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_BANK_SW*100,9,0,0,0,0,100,0,2000,2000,0,0,5,6,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_SW*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_SW*100,9,2,0,0,0,100,0,2000,2000,0,0,5,11,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_SW*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_SW*100,9,4,0,0,0,100,0,1000,1000,0,0,11,@SPELL_ROCKET,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_BANK_SW*100,9,5,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_BANK_SW,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_AH_SW,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_AH_SW*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_AH_SW,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_AH_SW*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_SW*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_SW*100,9,2,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_SW*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_SW*100,9,4,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_SW*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_SW*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_BLIND,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_AH_SW*100,9,7,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_AH_SW,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_BARBER_SW,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BARBER_SW*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+--
+(@SNIVEL_BARBER_SW*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_SW*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,2,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_SW*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,4,0,0,0,100,0,2000,2000,0,0,5,5,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_SW*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_VANISH,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Self'),
+(@SNIVEL_BARBER_SW*100,9,7,0,0,0,100,0,1000,1000,0,0,1,3,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_SW*100,9,8,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Despawn - Self'),
+-- -- --
+(@SNIVEL_BANK_ORG,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BANK_ORG*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_BANK_ORG,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_BANK_ORG*100,9,0,0,0,0,100,0,2000,2000,0,0,5,6,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_ORG*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_ORG*100,9,2,0,0,0,100,0,2000,2000,0,0,5,11,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BANK_ORG*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BANK_ORG*100,9,4,0,0,0,100,0,1000,1000,0,0,11,@SPELL_ROCKET,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_BANK_ORG*100,9,5,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_BANK_ORG,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_AH_ORG,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_AH_ORG*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+(@SNIVEL_AH_ORG,0,1,0,58,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On WP ended - Despawn - Self'),
+--
+(@SNIVEL_AH_ORG*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_ORG*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_ORG*100,9,2,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_ORG*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_ORG*100,9,4,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_AH_ORG*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_AH_ORG*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_BLIND,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Invoker'),
+(@SNIVEL_AH_ORG*100,9,7,0,0,0,100,0,1000,1000,0,0,53,1,@SNIVEL_AH_ORG,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Start WP - Self'),
+-- --
+(@SNIVEL_BARBER_ORG,0,0,0,54,0,100,0,0,0,0,0,80,@SNIVEL_BARBER_ORG*100,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On sumoned - Run script - Self'),
+--
+(@SNIVEL_BARBER_ORG*100,9,0,0,0,0,100,0,2000,2000,0,0,5,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_ORG*100,9,1,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,2,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_ORG*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,4,0,0,0,100,0,2000,2000,0,0,5,5,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Emote - Self'),
+(@SNIVEL_BARBER_ORG*100,9,5,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,6,0,0,0,100,0,1000,1000,0,0,11,@SPELL_VANISH,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Cast - Self'),
+(@SNIVEL_BARBER_ORG*100,9,7,0,0,0,100,0,1000,1000,0,0,1,3,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Talk - Self'),
+(@SNIVEL_BARBER_ORG*100,9,8,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,'On script - Despawn - Self');
+
+
+DELETE FROM `creature_text` WHERE `entry` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@SNIVEL_BANK_SW,0,0,'What are you staring at? Haven''t you ever seen a genius before?',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BANK_SW,1,0,'This''ll teach you to mind your own business!',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_AH_SW,0,0,'That''s right, I''d like to list some of these ''fireworks''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_SW,1,0,'Those''ll net me a nice profit when I return from the South Seas.''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_SW,2,0,'You... Don''t think I don''t see you. Leave me alone!.',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_BARBER_SW,0,0,'Thanks for the great cut and shave, buddy.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_SW,1,0,'Here''s a little somethin'' extra since I''ll be away.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_SW,2,0,'On second thought, keep the whole bag. I have to, uh, get going.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_SW,3,0,'Did you really think you could corner me this easily?',12,0,100,0,0,0,'say text'),
+-- --
+(@SNIVEL_BANK_ORG,0,0,'What are you staring at? Haven''t you ever seen a genius before?',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BANK_ORG,1,0,'This''ll teach you to mind your own business!',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_AH_ORG,0,0,'That''s right, I''d like to list some of these ''fireworks''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_ORG,1,0,'Those''ll net me a nice profit when I return from the South Seas.''.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_AH_ORG,2,0,'You... Don''t think I don''t see you. Leave me alone!.',12,0,100,0,0,0,'say text'),
+--
+(@SNIVEL_BARBER_ORG,0,0,'Thanks for the great cut and shave, buddy.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_ORG,1,0,'Here''s a little somethin'' extra since I''ll be away.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_ORG,2,0,'On second thought, keep the whole bag. I have to, uh, get going.',12,0,100,0,0,0,'say text'),
+(@SNIVEL_BARBER_ORG,3,0,'Did you really think you could corner me this easily?',12,0,100,0,0,0,'say text');
+
+
+DELETE FROM `waypoints` WHERE `entry` IN (@SNIVEL_BANK_SW,@SNIVEL_AH_SW,@SNIVEL_BARBER_SW,@SNIVEL_BANK_ORG,@SNIVEL_AH_ORG,@SNIVEL_BARBER_ORG);
+INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
+-- need proper 3.3.5a WPs
+(@SNIVEL_BANK_SW,1,-8922.295,620.7185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,2,-8910.545,627.2185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,3,-8902.795,631.2185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,4,-8901.045,631.9685,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,5,-8898.795,633.2185,99.9155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,6,-8897.045,633.9685,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,7,-8895.545,634.7185,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,8,-8894.295,635.2185,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,9,-8892.045,636.2185,99.4155,'Snivel Rustrocket'),
+(@SNIVEL_BANK_SW,10,-8890.389,637.309,99.52265,'Snivel Rustrocket'),
+-- need proper 3.3.5a WPs
+(@SNIVEL_AH_SW,1,-8806.079,665.8424,96.2017,'Snivel Rustrocket'),
+(@SNIVEL_AH_SW,2,-8807.825,653.1030,96.1965,'Snivel Rustrocket'),
+(@SNIVEL_AH_SW,3,-8829.964,634.2772,94.3178,'Snivel Rustrocket'),
+(@SNIVEL_AH_SW,4,-8838.774,616.6351,92.8850,'Snivel Rustrocket'),
+-- need proper 3.3.5a WPs
+(@SNIVEL_BANK_ORG,1,1615.59,-4379.849,12.610,'Snivel Rustrocket'),
+(@SNIVEL_BANK_ORG,2,1603.85,-4393.092,9.837,'Snivel Rustrocket'),
+(@SNIVEL_BANK_ORG,3,1576.08,-4410.980,6.569,'Snivel Rustrocket'),
+-- need proper 3.3.5a WPs
+(@SNIVEL_AH_ORG,1,1669.29,-4433.413,19.643,'Snivel Rustrocket'),
+(@SNIVEL_AH_ORG,2,1652.96,-4419.120,16.705,'Snivel Rustrocket'),
+(@SNIVEL_AH_ORG,3,1627.23,-4427.485,13.353,'Snivel Rustrocket');
+
+
+DELETE FROM `spell_target_position` WHERE `id` IN (@SPELL_SUM_SW_BANK,@SPELL_SUM_SW_AH,@SPELL_SUM_SW_BARBER,@SPELL_SUM_ORG_BANK,@SPELL_SUM_ORG_AH,@SPELL_SUM_ORG_BARBER);
+INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(@SPELL_SUM_SW_BANK,0,-8922.7,620.628,100.225,0),
+(@SPELL_SUM_SW_AH,0,-8815.04,662.193,95.4238,0),
+(@SPELL_SUM_SW_BARBER,0,-8745.29,656.266,105.091,0),
+--
+(@SPELL_SUM_ORG_BANK,1,1624.64,-4375.8662,12.0282,0),
+(@SPELL_SUM_ORG_AH,1,1678.29,-4451.2597,19.2568,0),
+(@SPELL_SUM_ORG_BARBER,1,1764.49,-4345.9306,-7.7980,0);
+
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (@TRIGGER_BANK_SW,@TRIGGER_AH_SW,@TRIGGER_BARBER_SW,@TRIGGER_BANK_ORG,@TRIGGER_AH_ORG,@TRIGGER_BARBER_ORG);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,1,@TRIGGER_BANK_SW,2,0,9,0,@QUEST_A,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_AH_SW,2,0,9,0,@QUEST_A,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_BARBER_SW,2,0,9,0,@QUEST_A,0,0,0,0,'','execute sai only if player has quest taken'),
+--
+(22,1,@TRIGGER_BANK_ORG,2,0,9,0,@QUEST_H,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_AH_ORG,2,0,9,0,@QUEST_H,0,0,0,0,'','execute sai only if player has quest taken'),
+(22,1,@TRIGGER_BARBER_ORG,2,0,9,0,@QUEST_H,0,0,0,0,'','execute sai only if player has quest taken');
diff --git a/sql/old/3.3.5a/2012_02_12_02_world_creature.sql b/sql/old/3.3.5a/2012_02_12_02_world_creature.sql
new file mode 100644
index 00000000000..75beec97d67
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_02_world_creature.sql
@@ -0,0 +1,57 @@
+SET @GUID := 40489;
+SET @NPC :=3254;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,1,1,1,0,0, 10.3997021, -2316.43555, 92.1945343, 2.91896486,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,1,1,1,0,0,346.736572 , -2606.38916, 91.7916641, 1.58010352,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,1,1,1,0,0, 83.07206 , -2545.2085 , 98.107666 , 1.86412442,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,1,1,1,0,0,-93.53362 , -2287.0835 , 92.35358 , 0.8518014 ,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,1,1,1,0,0,-618.9995,-2738.234,91.91664,4.303216,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,1,1,1,0,0,-491.2982,-2473.443,93.66666,2.670027,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,1,1,1,0,0,-614.9523,-2721.66 ,93.85735,1.412064,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,1,1,1,0,0,-617.4864,-2710.463,96.7657 ,1.582084,120,0,0,1,0,0,0,0,0);
+
+SET @NPC1=@GUID*10;
+SET @NPC2=(@GUID+1)*10;
+SET @NPC3=(@GUID+2)*10;
+SET @NPC4=(@GUID+3)*10;
+SET @NPC5=(@GUID+6)*10;
+SET @NPC6=(@GUID+7)*10;
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@NPC1,1,6.336712,-2322.309,92.16663,0,0,0,0,100,0),
+-- 2nd
+(@NPC2,1,346.4289,-2573.332,91.79166,0,0,0,0,100,0),
+-- 3rd
+(@NPC3,1,81.53384,-2540.826,97.38716,0,0,0,0,100,0),
+(@NPC3,2,80.28384,-2537.076,96.63716,0,0,0,0,100,0),
+(@NPC3,3,79.03384,-2533.326,95.38716,0,0,0,0,100,0),
+(@NPC3,4,78.28384,-2530.326,94.63716,0,0,0,0,100,0),
+(@NPC3,5,77.03384,-2526.576,93.63716,0,0,0,0,100,0),
+(@NPC3,6,76.49564,-2523.443,93.66665,0,0,0,0,100,0),
+-- 4th
+(@NPC4,1,-88.46167,-2281.137,92.69763,0,0,0,0,100,0),
+(@NPC4,2,-92.46167,-2285.637,91.94763,0,0,0,0,100,0),
+-- 5th
+(@NPC5,1,-614.9318,-2720.435,94.01199,0,0,0,0,100,0),
+-- 6th
+(@NPC6,1,-617.2921,-2722.99,93.41664,0,0,0,0,100,0),
+(@NPC6,2,-617.3077,-2721.99,93.41664,0,0,0,0,100,0),
+(@NPC6,3,-617.3398,-2719.99,94.16664,0,0,0,0,100,0),
+(@NPC6,4,-617.3867,-2716.99,95.04164,0,0,0,0,100,0),
+(@NPC6,5,-617.4336,-2713.99,95.91664,0,0,0,0,100,0),
+(@NPC6,6,-617.4805,-2710.99,96.66664,0,0,0,0,100,0),
+(@NPC6,7,-617.503,-2708.995,97.04164,0,0,0,0,100,0),
+(@NPC6,8,-617.503,-2708.995,97.04164,0,0,0,0,100,0);
+
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@GUID+3,@GUID+6,@GUID+7);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@NPC1,0,0,0,0,''),
+(@GUID+1,@NPC2,0,0,0,0,''),
+(@GUID+2,@NPC3,0,0,0,0,''),
+(@GUID+3,@NPC4,0,0,0,0,''),
+(@GUID+6,@NPC5,0,0,0,0,''),
+(@GUID+7,@NPC6,0,0,0,0,'');
diff --git a/sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql b/sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql
new file mode 100644
index 00000000000..e47572b2074
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_03_world_waypoint_data.sql
@@ -0,0 +1,147 @@
+SET @NPC := 26841;
+SET @GUID := 40497; -- need 9
+
+SET @SPAWN0 := (@GUID )*10;
+SET @SPAWN1 := (@GUID+1)*10;
+SET @SPAWN2 := (@GUID+2)*10;
+SET @SPAWN3 := (@GUID+3)*10;
+SET @SPAWN4 := (@GUID+4)*10;
+SET @SPAWN5 := (@GUID+5)*10;
+SET @SPAWN6 := (@GUID+6)*10;
+SET @SPAWN7 := (@GUID+7)*10;
+SET @SPAWN8 := (@GUID+8)*10;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,571,1,1,0,0,4690.292,859.291,154.1271,2.914072,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,571,1,1,0,0,4362.418,750.5102,123.7846,6.194367,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,571,1,1,0,0,4191.03,645.8215,109.6868,0.4027403,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,571,1,1,0,0,4098.345,657.0866,99.36436,5.185792,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,571,1,1,0,0,4065.753,709.2308,108.47,1.153499,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,571,1,1,0,0,4012.895,495.4877,82.1595,0.8684024,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,571,1,1,0,0,3941.605,552.9745,144.0994,0.06546114,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,571,1,1,0,0,3995.586,447.6094,88.55691,1.320955,120,0,0,1,0,0,0,0,0),
+(@GUID+8,@NPC,571,1,1,0,0,3869.004,707.384,134.3378,4.695541,120,0,0,1,0,0,0,0,0);
+
+DELETE FROM `creature_addon` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@SPAWN0,0,0,0,0,''),
+(@GUID+1,@SPAWN1,0,0,0,0,''),
+(@GUID+2,@SPAWN2,0,0,0,0,''),
+(@GUID+3,@SPAWN3,0,0,0,0,''),
+(@GUID+4,@SPAWN4,0,0,0,0,''),
+(@GUID+5,@SPAWN5,0,0,0,0,''),
+(@GUID+6,@SPAWN6,0,0,0,0,''),
+(@GUID+7,@SPAWN7,0,0,0,0,''),
+(@GUID+8,@SPAWN8,0,0,0,0,'');
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@SPAWN0,@SPAWN1,@SPAWN2,@SPAWN3,@SPAWN4,@SPAWN5,@SPAWN6,@SPAWN7,@SPAWN8);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@SPAWN0,0,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,1,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,2,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+(@SPAWN0,3,4532.678,762.772,130.1951,0,0,0,0,100,0),
+(@SPAWN0,4,4566.182,662.6984,132.7506,0,0,0,0,100,0),
+(@SPAWN0,5,4592.511,595.6938,130.1674,0,0,0,0,100,0),
+(@SPAWN0,6,4732.632,631.5569,164.584,0,0,0,0,100,0),
+(@SPAWN0,7,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,8,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,9,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+-- 2nd
+(@SPAWN1,0,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,1,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,2,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+(@SPAWN1,3,4112.486,636.6321,86.95068,0,0,0,0,100,0),
+(@SPAWN1,4,4141.771,704.1605,67.97847,0,0,0,0,100,0),
+(@SPAWN1,5,4191.388,726.6014,98.11736,0,0,0,0,100,0),
+(@SPAWN1,6,4247.502,724.9836,182.4229,0,0,0,0,100,0),
+(@SPAWN1,7,4295.807,746.8245,210.1174,0,0,0,0,100,0),
+(@SPAWN1,8,4387.15,744.5955,93.08962,0,0,0,0,100,0),
+(@SPAWN1,9,4428.509,680.8868,91.33962,0,0,0,0,100,0),
+(@SPAWN1,10,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,11,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,12,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+-- 3rd
+(@SPAWN2,0,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,1,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,2,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+(@SPAWN2,3,4378.531,451.3199,54.28299,0,0,0,0,100,0),
+(@SPAWN2,4,4277.019,345.219,121.2274,0,0,0,0,100,0),
+(@SPAWN2,5,4185.893,458.5754,118.5608,0,0,0,0,100,0),
+(@SPAWN2,6,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,7,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,8,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+-- 4th
+(@SPAWN3,0,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,1,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,2,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+(@SPAWN3,3,4382.415,794.0613,99.36437,0,0,0,0,100,0),
+(@SPAWN3,4,4312.128,808.5213,99.36437,0,0,0,0,100,0),
+(@SPAWN3,5,4206.404,817.2534,99.36437,0,0,0,0,100,0),
+(@SPAWN3,6,4089.363,771.5425,99.36437,0,0,0,0,100,0),
+(@SPAWN3,7,4114.452,637.4808,99.36437,0,0,0,0,100,0),
+(@SPAWN3,8,4265.095,661.3358,99.36437,0,0,0,0,100,0),
+(@SPAWN3,9,4366.876,678.4272,99.36437,0,0,0,0,100,0),
+(@SPAWN3,10,4433.122,674.1555,99.36437,0,0,0,0,100,0),
+(@SPAWN3,11,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,12,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,13,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+-- 5th
+(@SPAWN4,0,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,1,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,2,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+(@SPAWN4,3,4156.661,638.471,129.439,0,0,0,0,100,0),
+(@SPAWN4,4,4062.89,681.9251,102.9113,0,0,0,0,100,0),
+(@SPAWN4,5,4096.761,758.9566,123.5501,0,0,0,0,100,0),
+(@SPAWN4,6,4134.598,799.989,109.8835,0,0,0,0,100,0),
+(@SPAWN4,7,4189.475,840.5444,114.6335,0,0,0,0,100,0),
+(@SPAWN4,8,4274.875,812.3191,101.3001,0,0,0,0,100,0),
+(@SPAWN4,9,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,10,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,11,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+-- 6th
+(@SPAWN5,0,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,1,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,2,3926.388,447.295,82.1595,0,0,0,0,100,0),
+(@SPAWN5,3,4017.082,501.3171,82.1595,0,0,0,0,100,0),
+(@SPAWN5,4,4015.132,597.8423,82.1595,0,0,0,0,100,0),
+(@SPAWN5,5,3923.788,576.8113,82.1595,0,0,0,0,100,0),
+(@SPAWN5,6,3865.991,561.2335,82.1595,0,0,0,0,100,0),
+(@SPAWN5,7,3795.942,538.189,82.1595,0,0,0,0,100,0),
+(@SPAWN5,8,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,9,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,10,3926.388,447.295,82.1595,0,0,0,0,100,0),
+-- 7th
+(@SPAWN6,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN6,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN6,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN6,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN6,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN6,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,9,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+-- 8th
+(@SPAWN7,0,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,1,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,2,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+(@SPAWN7,3,4056.414,373.3088,88.55692,0,0,0,0,100,0),
+(@SPAWN7,4,3994.193,440.1974,88.55692,0,0,0,0,100,0),
+(@SPAWN7,5,4076.892,564.8895,88.55692,0,0,0,0,100,0),
+(@SPAWN7,6,4178.652,558.3406,88.55692,0,0,0,0,100,0),
+(@SPAWN7,7,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,8,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,9,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+-- 9th
+(@SPAWN8,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN8,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN8,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN8,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN8,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN8,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,9,3883.254,607.1956,134.3378,0,0,0,0,100,0);
diff --git a/sql/old/3.3.5a/2012_02_12_04_world_sai.sql b/sql/old/3.3.5a/2012_02_12_04_world_sai.sql
new file mode 100644
index 00000000000..190e3c3c63e
--- /dev/null
+++ b/sql/old/3.3.5a/2012_02_12_04_world_sai.sql
@@ -0,0 +1,12 @@
+-- By Dasio
+UPDATE `smart_scripts` SET `action_param2`=2, `action_param3`=0 WHERE `entryorguid`=4961 AND `id` IN (1,2) AND `source_type`=0;
+
+-- By tREAK
+SET @NPC_STEFAN :=28518;
+SET @SPELL_PUSH_ENSORCELED_CHOKER :=53810;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=28518 AND `source_type`=0 AND `id` IN (1,2,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
+(@NPC_STEFAN,0,1,2,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Say line'),
+(@NPC_STEFAN,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Close gossip'),
+(@NPC_STEFAN,0,4,2,62,0,100,0,9709,1,0,0,85,@SPELL_PUSH_ENSORCELED_CHOKER,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stefan Vadu - On gossip select - Invoker Spellcast');
diff --git a/sql/updates/auth/2012_02_19_00_auth_account.sql b/sql/updates/auth/2012_02_19_00_auth_account.sql
new file mode 100644
index 00000000000..a5b48ede3b4
--- /dev/null
+++ b/sql/updates/auth/2012_02_19_00_auth_account.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `account`
+ ADD COLUMN `os` VARCHAR(4) DEFAULT '' NOT NULL AFTER `locale`;
diff --git a/sql/updates/characters/2012_02_19_00_characters_warden_action.sql b/sql/updates/characters/2012_02_19_00_characters_warden_action.sql
new file mode 100644
index 00000000000..6e317f5100d
--- /dev/null
+++ b/sql/updates/characters/2012_02_19_00_characters_warden_action.sql
@@ -0,0 +1,7 @@
+DROP TABLE IF EXISTS `warden_action`;
+
+CREATE TABLE `warden_action` (
+ `wardenId` smallint(5) unsigned NOT NULL,
+ `action` tinyint(3) unsigned DEFAULT NULL,
+ PRIMARY KEY (`wardenId`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
diff --git a/sql/updates/world/2012_02_13_00_world_version.sql b/sql/updates/world/2012_02_13_00_world_version.sql
new file mode 100644
index 00000000000..2dd7ab92ddb
--- /dev/null
+++ b/sql/updates/world/2012_02_13_00_world_version.sql
@@ -0,0 +1 @@
+UPDATE `version` SET `db_version`='TDB 335.11.46' LIMIT 1;
diff --git a/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql b/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql
new file mode 100644
index 00000000000..4361f33cf38
--- /dev/null
+++ b/sql/updates/world/2012_02_14_00_world_achievement_criteria_data.sql
@@ -0,0 +1,7 @@
+-- Criteria conditions for Once Bitten, Twice Shy achievement
+DELETE FROM `achievement_criteria_data` WHERE `type`=12 AND `criteria_id` IN (13013, 13012, 13011, 12780);
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`scriptname`) VALUES
+(13013, 12, 1, 0, ""), -- heroic
+(13012, 12, 1, 0, ""), -- heroic
+(13011, 12, 0, 0, ""), -- normal
+(12780, 12, 0, 0, ""); -- normal \ No newline at end of file
diff --git a/sql/updates/world/2012_02_15_00_world_quest_template.sql b/sql/updates/world/2012_02_15_00_world_quest_template.sql
new file mode 100644
index 00000000000..e26f52fd0fe
--- /dev/null
+++ b/sql/updates/world/2012_02_15_00_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `OfferRewardText` = 'Good, $C. You have done well in serving the Dark Lady. Your continued perseverance and ambition will be of great use to the Lady''s subjects. Return to me again in the future. Perhaps I will have other tasks for you that will aid the Dark Lady in her attempts at overtaking the Lich King and completely freeing the Scourge.', `RequestItemsText` = 'There are a hundred other tasks awaiting my attention, $C. Do you have the books?' WHERE `Id` = 14356;
diff --git a/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql b/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql
new file mode 100644
index 00000000000..1c3d45dc490
--- /dev/null
+++ b/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql
@@ -0,0 +1,13 @@
+DELETE FROM `areatrigger_tavern` WHERE `id` IN (98, 4109, 4300, 4378, 4380, 4498, 4608, 5314, 5315, 5316, 5317);
+INSERT INTO `areatrigger_tavern` (`id`, `name`) VALUES
+(98, 'Nesingwary''s Expedition'),
+(4109, 'Tranquillen - Upper level Inn'),
+(4300, 'Cenarion Refugee - Outside Inn'),
+(4378, 'Stonebreaker Hold Inn'),
+(4380, 'Falcon Watch Inn'),
+(4498, 'Old Hillsbrad Foothills Inn'),
+(4608, 'Sanctum Of The Stars - Upper level Inn'),
+(5314, 'Wyrmrest Temple'),
+(5315, 'Wyrmrest Temple'),
+(5316, 'Wyrmrest Temple'),
+(5317, 'Wyrmrest Temple');
diff --git a/sql/updates/world/2012_02_15_02_world_item_template.sql b/sql/updates/world/2012_02_15_02_world_item_template.sql
new file mode 100644
index 00000000000..463d43368cd
--- /dev/null
+++ b/sql/updates/world/2012_02_15_02_world_item_template.sql
@@ -0,0 +1,3 @@
+DELETE FROM `item_template` WHERE `entry`=49867;
+INSERT INTO `item_template` (`entry`, `class`, `subclass`, `unk0`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `Duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `WDBVerified`) VALUES
+(49867, 12, 0, -1, 'Crown Chemical Co. Supplies', 11448, 1, 0, 8192, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 4, 'You can hear the clink of glass... dont drop it!', 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 423, 0, 0, 0, 0, 14545);
diff --git a/sql/updates/world/2012_02_15_03_world_quest_template.sql b/sql/updates/world/2012_02_15_03_world_quest_template.sql
new file mode 100644
index 00000000000..833d36b246c
--- /dev/null
+++ b/sql/updates/world/2012_02_15_03_world_quest_template.sql
@@ -0,0 +1,18 @@
+-- Love is in the Air
+-- Quests Missing Text ... By Albis
+
+UPDATE `quest_template` SET `RequestItemsText` ='The cologne isn''t going to give itself out, you know.$B$BGet spraying!' , `OfferRewardText` ='Nice work, $N! People will be buying Crown colognes by the crate-load now that they''ve had a chance to try them.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24635;
+UPDATE `quest_template` SET `RequestItemsText` ='That perfume''s not going to spray itself, you know.$B$BGet going!' , `OfferRewardText` ='Great work, $N! People will come running to buy Crown perfumes now that they''ve had a chance to sample their wonders.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24629;
+UPDATE `quest_template` SET `RequestItemsText` ='You know, those chocolates aren''t going to fling themselves at people.$B$BYou need to get to work!' , `OfferRewardText` ='Lovely work, $N! People will be tripping over one another to get Crown chocolates now that they''ve had a chance to taste those sweet, romantic treats.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24636;
+UPDATE `quest_template` SET `OfferRewardText` ='Hey. You got some time on your hands? I could use someone like you.' WHERE `Id` IN (24804,24805);
+UPDATE `quest_template` SET `RequestItemsText` ='You analyze that reek yet, kid?' , `OfferRewardText` ='Hey, thanks, kid. Give it over, let''s take a look.$B$B<He takes the device from you and fiddles with it.>$B$BOh, that ain''t good.' WHERE `Id` IN (24655,24536);
+UPDATE `quest_template` SET `RequestItemsText` ='Did they toss ya a crate to deliver?' , `OfferRewardText` ='You got it, huh? Good job, kid. Top notch. Let''s see what we what we got here.$B$B<He cracks open the crate and rummages around inside.' WHERE `Id` IN (24656,24541);
+UPDATE `quest_template` SET `OfferRewardText` ='You... You''re not Snivel. Did he send you? He''s so late, I had started to give up hope...$B$B<Tears start welling up in the woman''s eyes once she realizes that you aren''t there to deliver a message from Snivel.>$B$BThat''s not like my Snivel, but what choice is there?' WHERE `Id` = 24848;
+UPDATE `quest_template` SET `OfferRewardText` ='You''re not Snivel. He was supposed to be here an hour ago! What have you done with him?$B$B<Roka seems to calm down when you tell her that you''re looking for Snivel, too. Then the tears start to well up in her eyes.>$B$BThis isn''t like my Snivel. Do you think something''s happened to him?' WHERE `Id` = 24850;
+UPDATE `quest_template` SET `RequestItemsText` ='Who are you?' , `OfferRewardText` ='All he talked about was leaving town with all his money? Then he really has abandoned me, hasn''t he?$B$BOh, $N. I was such a fool to fall for him, but how could I help myself? He was so irresistible!' WHERE `Id` = 24849;
+UPDATE `quest_template` SET `RequestItemsText` ='Who are you?' , `OfferRewardText` ='All he talked about was leaving town with all his money? Then he really has abandoned me, hasn''t he?$B$BI can''t believe I fell for such a horrible goblin! But he was so irresistible when we first met.' WHERE `Id` = 24851;
+UPDATE `quest_template` SET `RequestItemsText` ='Did you find the guy, or did he crawl under a rock?' , `OfferRewardText` ='You got his ledger? Really? That''s great, $N. There''s probably loads of good information in here.' WHERE `Id` IN (24657,24576);
+UPDATE `quest_template` SET `OfferRewardText` ='Fantastic. Help is exactly what I need.' WHERE `Id` IN (24792,24793);
+UPDATE `quest_template` SET `RequestItemsText` ='I don''t remember ordering a cleaing service... why yes, I am Apothecary Hummel.$B$B...wait, what is the meaning of this? You think these meaningless papers can stop me? Hah!' , `OfferRewardText` ='What we do here is none of your business...' WHERE `Id` = 11488;
+UPDATE `quest_template` SET `RequestItemsText` ='Did you take care of those no-good scheming villains?' , `OfferRewardText` ='What''ve you got there?$B$BOh hey, this is big. Real big. Most of the crazy details in one little package. Thanks - you really helped us reel this all in. Good working with ya.' WHERE `Id` IN (24745,14483);
+UPDATE `quest_template` SET `RequestItemsText` ='Did you teach ''em a lesson?' , `OfferRewardText` ='Good job, kid. You deserve a little somethin''. And hey, come back tomorrow if you get the time; I might have a job for ya.' WHERE `Id` IN (24658,24665,24666,24664,24663,24659,24660,24662,24647,24638,24651,24652,24650,24649,24645,24648);
diff --git a/sql/updates/world/2012_02_15_04_world_quest_template.sql b/sql/updates/world/2012_02_15_04_world_quest_template.sql
new file mode 100644
index 00000000000..8b6ad1d2cf9
--- /dev/null
+++ b/sql/updates/world/2012_02_15_04_world_quest_template.sql
@@ -0,0 +1,17 @@
+-- Horde
+UPDATE `quest_template` SET `PrevQuestId`=24805 WHERE `Id`=24536; -- Uncommon Scents completed before starting Something Stinks
+UPDATE `quest_template` SET `PrevQuestId`=24536 WHERE `Id`=24541; -- Something Stinks completed before starting Pilfering Perfume
+UPDATE `quest_template` SET `PrevQuestId`=24541 WHERE `Id`=24850; -- Pilfering Perfume completed before starting Snivel's Sweetheart
+UPDATE `quest_template` SET `PrevQuestId`=24850 WHERE `Id`=24851; -- Snivel's Sweetheart completed before starting Hot On The Trail
+UPDATE `quest_template` SET `PrevQuestId`=24851 WHERE `Id`=24576; -- Hot On The Trail completed before starting A Friendly Chat...
+
+UPDATE `quest_template` SET `PrevQuestId`=24576 WHERE `Id` IN (24638,24645,24647,24648,24649,24650,24651,24652); -- A Friendly Chat... completed before starting Crushing the Crown
+
+-- Alliance
+UPDATE `quest_template` SET `PrevQuestId`=24804 WHERE `Id`=24655; -- Uncommon Scents completed before starting Something Stinks
+UPDATE `quest_template` SET `PrevQuestId`=24655 WHERE `Id`=24656; -- Something Stinks completed before starting Pilfering Perfume
+UPDATE `quest_template` SET `PrevQuestId`=24656 WHERE `Id`=24848; -- Pilfering Perfume completed before starting Snivel's Sweetheart
+UPDATE `quest_template` SET `PrevQuestId`=24848 WHERE `Id`=24849; -- Snivel's Sweetheart completed before starting Hot On The Trail
+UPDATE `quest_template` SET `PrevQuestId`=24849 WHERE `Id`=24657; -- Hot On The Trail completed before starting A Friendly Chat...
+
+UPDATE `quest_template` SET `PrevQuestId`=24657 WHERE `Id` IN (24658,24659,24660,24662,24663,24664,24665,24666); -- A Friendly Chat... completed before starting Crushing the Crown
diff --git a/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql b/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql
new file mode 100644
index 00000000000..431e23b53b8
--- /dev/null
+++ b/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql
@@ -0,0 +1,3 @@
+DELETE FROM `creature_involvedrelation` WHERE `quest`=24745;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(38066, 24745); -- A - Something is in the Air (and it Ain't Love) - Inspector Snip Snagglebolt
diff --git a/sql/updates/world/2012_02_15_07_00_world_creature.sql b/sql/updates/world/2012_02_15_07_00_world_creature.sql
new file mode 100644
index 00000000000..75beec97d67
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_00_world_creature.sql
@@ -0,0 +1,57 @@
+SET @GUID := 40489;
+SET @NPC :=3254;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,1,1,1,0,0, 10.3997021, -2316.43555, 92.1945343, 2.91896486,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,1,1,1,0,0,346.736572 , -2606.38916, 91.7916641, 1.58010352,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,1,1,1,0,0, 83.07206 , -2545.2085 , 98.107666 , 1.86412442,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,1,1,1,0,0,-93.53362 , -2287.0835 , 92.35358 , 0.8518014 ,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,1,1,1,0,0,-618.9995,-2738.234,91.91664,4.303216,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,1,1,1,0,0,-491.2982,-2473.443,93.66666,2.670027,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,1,1,1,0,0,-614.9523,-2721.66 ,93.85735,1.412064,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,1,1,1,0,0,-617.4864,-2710.463,96.7657 ,1.582084,120,0,0,1,0,0,0,0,0);
+
+SET @NPC1=@GUID*10;
+SET @NPC2=(@GUID+1)*10;
+SET @NPC3=(@GUID+2)*10;
+SET @NPC4=(@GUID+3)*10;
+SET @NPC5=(@GUID+6)*10;
+SET @NPC6=(@GUID+7)*10;
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@NPC1,1,6.336712,-2322.309,92.16663,0,0,0,0,100,0),
+-- 2nd
+(@NPC2,1,346.4289,-2573.332,91.79166,0,0,0,0,100,0),
+-- 3rd
+(@NPC3,1,81.53384,-2540.826,97.38716,0,0,0,0,100,0),
+(@NPC3,2,80.28384,-2537.076,96.63716,0,0,0,0,100,0),
+(@NPC3,3,79.03384,-2533.326,95.38716,0,0,0,0,100,0),
+(@NPC3,4,78.28384,-2530.326,94.63716,0,0,0,0,100,0),
+(@NPC3,5,77.03384,-2526.576,93.63716,0,0,0,0,100,0),
+(@NPC3,6,76.49564,-2523.443,93.66665,0,0,0,0,100,0),
+-- 4th
+(@NPC4,1,-88.46167,-2281.137,92.69763,0,0,0,0,100,0),
+(@NPC4,2,-92.46167,-2285.637,91.94763,0,0,0,0,100,0),
+-- 5th
+(@NPC5,1,-614.9318,-2720.435,94.01199,0,0,0,0,100,0),
+-- 6th
+(@NPC6,1,-617.2921,-2722.99,93.41664,0,0,0,0,100,0),
+(@NPC6,2,-617.3077,-2721.99,93.41664,0,0,0,0,100,0),
+(@NPC6,3,-617.3398,-2719.99,94.16664,0,0,0,0,100,0),
+(@NPC6,4,-617.3867,-2716.99,95.04164,0,0,0,0,100,0),
+(@NPC6,5,-617.4336,-2713.99,95.91664,0,0,0,0,100,0),
+(@NPC6,6,-617.4805,-2710.99,96.66664,0,0,0,0,100,0),
+(@NPC6,7,-617.503,-2708.995,97.04164,0,0,0,0,100,0),
+(@NPC6,8,-617.503,-2708.995,97.04164,0,0,0,0,100,0);
+
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@GUID+3,@GUID+6,@GUID+7);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@NPC1,0,0,0,0,''),
+(@GUID+1,@NPC2,0,0,0,0,''),
+(@GUID+2,@NPC3,0,0,0,0,''),
+(@GUID+3,@NPC4,0,0,0,0,''),
+(@GUID+6,@NPC5,0,0,0,0,''),
+(@GUID+7,@NPC6,0,0,0,0,'');
diff --git a/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql b/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql
new file mode 100644
index 00000000000..e47572b2074
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql
@@ -0,0 +1,147 @@
+SET @NPC := 26841;
+SET @GUID := 40497; -- need 9
+
+SET @SPAWN0 := (@GUID )*10;
+SET @SPAWN1 := (@GUID+1)*10;
+SET @SPAWN2 := (@GUID+2)*10;
+SET @SPAWN3 := (@GUID+3)*10;
+SET @SPAWN4 := (@GUID+4)*10;
+SET @SPAWN5 := (@GUID+5)*10;
+SET @SPAWN6 := (@GUID+6)*10;
+SET @SPAWN7 := (@GUID+7)*10;
+SET @SPAWN8 := (@GUID+8)*10;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,571,1,1,0,0,4690.292,859.291,154.1271,2.914072,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,571,1,1,0,0,4362.418,750.5102,123.7846,6.194367,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,571,1,1,0,0,4191.03,645.8215,109.6868,0.4027403,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,571,1,1,0,0,4098.345,657.0866,99.36436,5.185792,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,571,1,1,0,0,4065.753,709.2308,108.47,1.153499,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,571,1,1,0,0,4012.895,495.4877,82.1595,0.8684024,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,571,1,1,0,0,3941.605,552.9745,144.0994,0.06546114,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,571,1,1,0,0,3995.586,447.6094,88.55691,1.320955,120,0,0,1,0,0,0,0,0),
+(@GUID+8,@NPC,571,1,1,0,0,3869.004,707.384,134.3378,4.695541,120,0,0,1,0,0,0,0,0);
+
+DELETE FROM `creature_addon` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@SPAWN0,0,0,0,0,''),
+(@GUID+1,@SPAWN1,0,0,0,0,''),
+(@GUID+2,@SPAWN2,0,0,0,0,''),
+(@GUID+3,@SPAWN3,0,0,0,0,''),
+(@GUID+4,@SPAWN4,0,0,0,0,''),
+(@GUID+5,@SPAWN5,0,0,0,0,''),
+(@GUID+6,@SPAWN6,0,0,0,0,''),
+(@GUID+7,@SPAWN7,0,0,0,0,''),
+(@GUID+8,@SPAWN8,0,0,0,0,'');
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@SPAWN0,@SPAWN1,@SPAWN2,@SPAWN3,@SPAWN4,@SPAWN5,@SPAWN6,@SPAWN7,@SPAWN8);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@SPAWN0,0,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,1,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,2,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+(@SPAWN0,3,4532.678,762.772,130.1951,0,0,0,0,100,0),
+(@SPAWN0,4,4566.182,662.6984,132.7506,0,0,0,0,100,0),
+(@SPAWN0,5,4592.511,595.6938,130.1674,0,0,0,0,100,0),
+(@SPAWN0,6,4732.632,631.5569,164.584,0,0,0,0,100,0),
+(@SPAWN0,7,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,8,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,9,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+-- 2nd
+(@SPAWN1,0,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,1,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,2,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+(@SPAWN1,3,4112.486,636.6321,86.95068,0,0,0,0,100,0),
+(@SPAWN1,4,4141.771,704.1605,67.97847,0,0,0,0,100,0),
+(@SPAWN1,5,4191.388,726.6014,98.11736,0,0,0,0,100,0),
+(@SPAWN1,6,4247.502,724.9836,182.4229,0,0,0,0,100,0),
+(@SPAWN1,7,4295.807,746.8245,210.1174,0,0,0,0,100,0),
+(@SPAWN1,8,4387.15,744.5955,93.08962,0,0,0,0,100,0),
+(@SPAWN1,9,4428.509,680.8868,91.33962,0,0,0,0,100,0),
+(@SPAWN1,10,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,11,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,12,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+-- 3rd
+(@SPAWN2,0,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,1,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,2,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+(@SPAWN2,3,4378.531,451.3199,54.28299,0,0,0,0,100,0),
+(@SPAWN2,4,4277.019,345.219,121.2274,0,0,0,0,100,0),
+(@SPAWN2,5,4185.893,458.5754,118.5608,0,0,0,0,100,0),
+(@SPAWN2,6,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,7,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,8,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+-- 4th
+(@SPAWN3,0,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,1,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,2,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+(@SPAWN3,3,4382.415,794.0613,99.36437,0,0,0,0,100,0),
+(@SPAWN3,4,4312.128,808.5213,99.36437,0,0,0,0,100,0),
+(@SPAWN3,5,4206.404,817.2534,99.36437,0,0,0,0,100,0),
+(@SPAWN3,6,4089.363,771.5425,99.36437,0,0,0,0,100,0),
+(@SPAWN3,7,4114.452,637.4808,99.36437,0,0,0,0,100,0),
+(@SPAWN3,8,4265.095,661.3358,99.36437,0,0,0,0,100,0),
+(@SPAWN3,9,4366.876,678.4272,99.36437,0,0,0,0,100,0),
+(@SPAWN3,10,4433.122,674.1555,99.36437,0,0,0,0,100,0),
+(@SPAWN3,11,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,12,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,13,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+-- 5th
+(@SPAWN4,0,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,1,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,2,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+(@SPAWN4,3,4156.661,638.471,129.439,0,0,0,0,100,0),
+(@SPAWN4,4,4062.89,681.9251,102.9113,0,0,0,0,100,0),
+(@SPAWN4,5,4096.761,758.9566,123.5501,0,0,0,0,100,0),
+(@SPAWN4,6,4134.598,799.989,109.8835,0,0,0,0,100,0),
+(@SPAWN4,7,4189.475,840.5444,114.6335,0,0,0,0,100,0),
+(@SPAWN4,8,4274.875,812.3191,101.3001,0,0,0,0,100,0),
+(@SPAWN4,9,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,10,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,11,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+-- 6th
+(@SPAWN5,0,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,1,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,2,3926.388,447.295,82.1595,0,0,0,0,100,0),
+(@SPAWN5,3,4017.082,501.3171,82.1595,0,0,0,0,100,0),
+(@SPAWN5,4,4015.132,597.8423,82.1595,0,0,0,0,100,0),
+(@SPAWN5,5,3923.788,576.8113,82.1595,0,0,0,0,100,0),
+(@SPAWN5,6,3865.991,561.2335,82.1595,0,0,0,0,100,0),
+(@SPAWN5,7,3795.942,538.189,82.1595,0,0,0,0,100,0),
+(@SPAWN5,8,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,9,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,10,3926.388,447.295,82.1595,0,0,0,0,100,0),
+-- 7th
+(@SPAWN6,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN6,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN6,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN6,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN6,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN6,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,9,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+-- 8th
+(@SPAWN7,0,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,1,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,2,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+(@SPAWN7,3,4056.414,373.3088,88.55692,0,0,0,0,100,0),
+(@SPAWN7,4,3994.193,440.1974,88.55692,0,0,0,0,100,0),
+(@SPAWN7,5,4076.892,564.8895,88.55692,0,0,0,0,100,0),
+(@SPAWN7,6,4178.652,558.3406,88.55692,0,0,0,0,100,0),
+(@SPAWN7,7,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,8,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,9,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+-- 9th
+(@SPAWN8,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN8,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN8,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN8,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN8,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN8,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,9,3883.254,607.1956,134.3378,0,0,0,0,100,0);
diff --git a/sql/updates/world/2012_02_15_07_02_world_misc.sql b/sql/updates/world/2012_02_15_07_02_world_misc.sql
new file mode 100644
index 00000000000..e7ffe54e922
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_02_world_misc.sql
@@ -0,0 +1,120 @@
+-- Love is in the Air
+SET @OGUID := 24399;
+SET @CGUID := 40506;
+SET @OLDGUID := 40489; -- wrong guids
+SET @EVENT := 8;
+
+-- Quest chain
+DELETE FROM `creature_questrelation` WHERE `quest` IN (24804,24657,24656,24848,24849);
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES
+(38293, 24804), -- A - Uncommon Scents - Junior Inspector
+(38325, 24657), -- A - Friendly Chat... - Marion Sutton
+(38066, 24656), -- A - Pilfering Perfume - Inspector Snip Snagglebolt
+(38066, 24848), -- A - Fireworks At The Gilded Rose - Inspector Snip Snagglebolt
+(38325, 24849); -- A - Hot On The Trail - Marion Sutton
+
+DELETE FROM `creature_involvedrelation` WHERE `quest` IN (24804,24657,24656,24848,24849);
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(38066, 24804), -- A - Uncommon Scents - Inspector Snip Snagglebolt
+(38066, 24657), -- A - Friendly Chat... - Inspector Snip Snagglebolt
+(38066, 24656), -- A - Pilfering Perfume - Inspector Snip Snagglebolt
+(38325, 24848), -- A - Fireworks At The Gilded Rose - Marion Sutton
+(38325, 24849); -- A - Hot On The Trail - Marion Sutton
+
+-- Loot: Crown Chemical Co. Supplies
+DELETE FROM `gameobject_loot_template` WHERE `entry`=27766;
+INSERT INTO `gameobject_loot_template` VALUES
+(27766, 49867, -100, 1, 0, 1, 1); -- Crown Chemical Co. Supplies
+
+-- GO spawns
+DELETE FROM `gameobject` WHERE `id` IN (181086,201752,201778) AND `guid` BETWEEN @OGUID+0 AND @OGUID+42;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+-- Valentine Arch
+(@OGUID+0, 181086, 1, 1, 1, 9869.12, 2493.13, 1315.88, 6.16653, 0, 0, 0.0582931, -0.9983, 300, 0, 1),
+(@OGUID+1, 181086, 530, 1, 1, -4004.66, -11844.5, 0.19541, 4.93701, 0, 0, 0.623403, -0.7819, 300, 0, 1),
+(@OGUID+2, 181086, 0, 1, 1, -4918.78, -983.208, 501.455, 2.30465, 0, 0, 0.913711, 0.406364, 300, 0, 1),
+(@OGUID+3, 181086, 0, 1, 1, -8869.51, 636.686, 95.7873, 0.794388, 0, 0, 0.386832, 0.92215, 300, 0, 1),
+(@OGUID+4, 181086, 1, 1, 1, 1653.44, -4437.37, 18.1863, 1.72627, 0, 0, 0.759883, 0.65006, 300, 0, 1),
+(@OGUID+5, 181086, 1, 1, 1, -1224.34, 68.3642, 129.71, 3.17285, 0, 0, 0.999878, -0.015627, 300, 0, 1),
+(@OGUID+6, 181086, 530, 1, 1, 9612.28, -7184.77, 14.285, 1.82938, 0, 0, 0.792374, 0.610036, 300, 0, 1),
+(@OGUID+7, 181086, 0, 1, 1, 1629.62, 240.116, 63.8516, 0.155664, 0, 0, 0.0777534, 0.996973, 300, 0, 1),
+-- Large Crate
+(@OGUID+8, 201752, 0, 1, 1, -9029.77, 353.325, 92.923, 0.8808, 0, 0, 0.426301, 0.904581, 300, 0, 1),
+(@OGUID+9, 201752, 0, 1, 1, -9029.87, 351.542, 92.9248, 0.489671, 0, 0, 0.242397, 0.970177, 300, 0, 1),
+(@OGUID+10, 201752, 0, 1, 1, -9028.41, 352.69, 92.9163, 0.721364, 0, 0, 0.352912, 0.935656, 300, 0, 1),
+(@OGUID+11, 201752, 0, 1, 1, -9027.7, 351.062, 92.9193, 0.689162, 0, 0, 0.337803, 0.941217, 300, 0, 1),
+(@OGUID+12, 201752, 0, 1, 1, -9029.08, 349.917, 92.932, 0.657746, 0, 0, 0.322977, 0.946407, 300, 0, 1),
+(@OGUID+13, 201752, 0, 1, 1, -9028.77, 352.62, 94.1596, 6.02202, 0, 0, 0.130214, -0.991486, 300, 0, 1),
+(@OGUID+14, 201752, 0, 1, 1, -9028.84, 350.443, 94.1755, 0.771628, 0, 0, 0.376314, 0.926492, 300, 0, 1),
+(@OGUID+15, 201752, 0, 1, 1, -9026.5, 348.864, 93.0359, 2.17356, 0, 0, 0.885134, 0.465337, 300, 0, 1),
+(@OGUID+16, 201752, 0, 1, 1, -9028.21, 348.744, 93.024, 0.889436, 0, 0, 0.430203, 0.902732, 300, 0, 1),
+(@OGUID+17, 201752, 1, 1, 1, 1381.97, -4431.17, 30.6588, 5.49617, 0, 0, 0.383432, -0.923569, 300, 0, 1),
+(@OGUID+18, 201752, 1, 1, 1, 1380.98, -4432.28, 30.6586, 5.55507, 0, 0, 0.356069, -0.93446, 300, 0, 1),
+(@OGUID+19, 201752, 1, 1, 1, 1379.73, -4433.4, 30.6569, 5.69644, 0, 0, 0.28918, -0.957275, 300, 0, 1),
+(@OGUID+20, 201752, 1, 1, 1, 1377.96, -4432.16, 30.6489, 5.58649, 0, 0, 0.341345, -0.939938, 300, 0, 1),
+(@OGUID+21, 201752, 1, 1, 1, 1379.23, -4431.41, 30.6768, 5.559, 0, 0, 0.354231, -0.935158, 300, 0, 1),
+(@OGUID+22, 201752, 1, 1, 1, 1379.85, -4432.91, 31.8999, 5.66896, 0, 0, 0.302309, -0.95321, 300, 0, 1),
+(@OGUID+23, 201752, 1, 1, 1, 1380.81, -4431.58, 31.902, 5.64147, 0, 0, 0.315381, -0.948965, 300, 0, 1),
+(@OGUID+24, 201752, 1, 1, 1, 1377.67, -4434.36, 30.6055, 5.36265, 0, 0, 0.444186, -0.895935, 300, 0, 1),
+-- Crown Chemical Co. Supplies
+(@OGUID+25, 201778, 0, 1, 1, -9031.18, 354.399, 92.9752, 6.12019, 0, 0, 0.0814081, -0.996681, 300, 0, 1),
+(@OGUID+26, 201778, 0, 1, 1, -9028.76, 352.525, 95.4034, 0.503804, 0, 0, 0.249246, 0.96844, 300, 0, 1),
+(@OGUID+27, 201778, 0, 1, 1, -9030.19, 351.409, 94.1683, 0.134668, 0, 0, 0.067283, 0.997734, 300, 0, 1),
+(@OGUID+28, 201778, 0, 1, 1, -9031.52, 349.739, 92.9068, 0.338872, 0, 0, 0.168626, 0.98568, 300, 0, 1),
+(@OGUID+29, 201778, 0, 1, 1, -9030.55, 347.899, 92.9635, 0.751206, 0, 0, 0.366833, 0.930287, 300, 0, 1),
+(@OGUID+30, 201778, 0, 1, 1, -9027.59, 348.911, 94.2683, 1.784, 0, 0, 0.77833, 0.627855, 300, 0, 1),
+(@OGUID+31, 201778, 0, 1, 1, -9028.87, 349.971, 95.4191, 1.82327, 0, 0, 0.790507, 0.612452, 300, 0, 1),
+(@OGUID+32, 201778, 0, 1, 1, -9031.75, 354.82, 92.9939, 6.0605, 0, 0, 0.111113, -0.993808, 300, 0, 1),
+(@OGUID+33, 201778, 0, 1, 1, -9032.22, 352.779, 92.9627, 6.0605, 0, 0, 0.111113, -0.993808, 300, 0, 1),
+(@OGUID+34, 201778, 1, 1, 1, 1375.84, -4432.46, 30.5735, 5.69645, 0, 0, 0.289178, -0.957275, 300, 0, 1),
+(@OGUID+35, 201778, 1, 1, 1, 1377.99, -4431.81, 31.8923, 5.5001, 0, 0, 0.381614, -0.924322, 300, 0, 1),
+(@OGUID+36, 201778, 1, 1, 1, 1379.21, -4430.58, 31.9198, 4.81681, 0, 0, 0.669241, -0.743045, 300, 0, 1),
+(@OGUID+37, 201778, 1, 1, 1, 1379.35, -4432.78, 33.143, 5.61791, 0, 0, 0.326536, -0.945185, 300, 0, 1),
+(@OGUID+38, 201778, 1, 1, 1, 1380.87, -4431.5, 33.1452, 4.66994, 0, 0, 0.721955, -0.69194, 300, 0, 1),
+(@OGUID+39, 201778, 1, 1, 1, 1380.96, -4429.36, 30.6772, 4.6503, 0, 0, 0.728713, -0.68482, 300, 0, 1),
+(@OGUID+40, 201778, 1, 1, 1, 1383.08, -4429.42, 30.651, 4.53642, 0, 0, 0.766505, -0.642238, 300, 0, 1),
+(@OGUID+41, 201778, 1, 1, 1, 1378.64, -4428.42, 30.6846, 5.23543, 0, 0, 0.500243, -0.865885, 300, 0, 1),
+(@OGUID+42, 201778, 1, 1, 1, 1377.05, -4429.39, 30.6467, 5.31397, 0, 0, 0.465863, -0.884857, 300, 0, 1);
+
+DELETE FROM `game_event_gameobject` WHERE `eventEntry`=@EVENT AND `guid` BETWEEN @OGUID AND @OGUID+42;
+INSERT INTO `game_event_gameobject` (`guid`, `eventEntry`) VALUES
+(@OGUID, @EVENT),(@OGUID+1, @EVENT),(@OGUID+2, @EVENT),
+(@OGUID+3, @EVENT),(@OGUID+4, @EVENT),(@OGUID+5, @EVENT),
+(@OGUID+6, @EVENT),(@OGUID+7, @EVENT),(@OGUID+8, @EVENT),
+(@OGUID+9, @EVENT),(@OGUID+10, @EVENT),(@OGUID+11, @EVENT),
+(@OGUID+12, @EVENT),(@OGUID+13, @EVENT),(@OGUID+14, @EVENT),
+(@OGUID+15, @EVENT),(@OGUID+16, @EVENT),(@OGUID+17, @EVENT),
+(@OGUID+18, @EVENT),(@OGUID+19, @EVENT),(@OGUID+20, @EVENT),
+(@OGUID+21, @EVENT),(@OGUID+22, @EVENT),(@OGUID+23, @EVENT),
+(@OGUID+24, @EVENT),(@OGUID+25, @EVENT),(@OGUID+26, @EVENT),
+(@OGUID+27, @EVENT),(@OGUID+28, @EVENT),(@OGUID+29, @EVENT),
+(@OGUID+30, @EVENT),(@OGUID+31, @EVENT),(@OGUID+32, @EVENT),
+(@OGUID+33, @EVENT),(@OGUID+34, @EVENT),(@OGUID+35, @EVENT),
+(@OGUID+36, @EVENT),(@OGUID+37, @EVENT),(@OGUID+38, @EVENT),
+(@OGUID+39, @EVENT),(@OGUID+40, @EVENT),(@OGUID+41, @EVENT),
+(@OGUID+42, @EVENT);
+
+-- [Q]: Pilfering Perfume
+-- Note: this is EndText (misleading field name), NOT ObjectiveText1
+UPDATE `quest_template` SET `EndText` = 'Steal perfume package from Crown Chemical Co. outside Stormind' WHERE `Id` = 24656; -- Alliance
+UPDATE `quest_template` SET `EndText` = 'Steal perfume package from Crown Chemical Co. outside Orgrimmar' WHERE `Id` = 24541; -- Horde
+
+-- Creature templates and spawns
+UPDATE `creature_template` SET `minlevel`=70, `maxlevel`=75 WHERE `entry`=37671; -- Crown Supply Guard
+UPDATE `creature_template` SET `npcflag`=`npcflag`|1, `gossip_menu_id`=10991 WHERE `entry`=38293; -- Junior Inspector (gossip menu not confirmed)
+
+DELETE FROM `creature` WHERE `id` IN (38293,38065,37671) AND `guid` BETWEEN @CGUID+0 AND @CGUID+3;
+DELETE FROM `creature` WHERE `id` IN (38293,38065,37671) AND `guid` BETWEEN @OLDGUID+0 AND @OLDGUID+3;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@CGUID+0, 38293, 530, 1, 1, 0, 0, -4022.81, -11842.7, 0.0062171, 5.89912, 300, 0, 0, 955, 0, 0, 0, 0, 0), -- Junior Inspector
+(@CGUID+1, 38065, 1, 1, 1, 0, 0, 1380.22, -4426.79, 30.6681, 2.03572, 300, 0, 0, 12600, 0, 0, 0, 0, 0), -- Crown Supply Sentry <Crown Chemical Co.>
+(@CGUID+2, 37671, 0, 1, 1, 30912, 0, -9033.01, 356.408, 93.1543, 2.09345, 300, 0, 0, 42, 0, 0, 0, 0, 0), -- Crown Supply Guard
+(@CGUID+3, 37671, 0, 1, 1, 30912, 0, -9028.63, 344.994, 93.2389, 3.37679, 300, 0, 0, 42, 0, 0, 0, 0, 0); -- Crown Supply Guard
+
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+3 AND `eventEntry`=@EVENT;
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @OLDGUID+0 AND @OLDGUID+3 AND `eventEntry`=@EVENT;
+INSERT INTO `game_event_creature` (`guid`, `eventEntry`) VALUES
+(@CGUID+0, @EVENT),
+(@CGUID+1, @EVENT),
+(@CGUID+2, @EVENT),
+(@CGUID+3, @EVENT);
diff --git a/sql/updates/world/2012_02_15_08_world_sai.sql b/sql/updates/world/2012_02_15_08_world_sai.sql
new file mode 100644
index 00000000000..ef49ff484f3
--- /dev/null
+++ b/sql/updates/world/2012_02_15_08_world_sai.sql
@@ -0,0 +1,9 @@
+SET @Pinata := 34632;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Pinata AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@Pinata, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 11, 65788, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ogre Pinata - On death cast Pile of Candy'),
+(@Pinata, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ogre Pinata - On reset set react state passive');
+
+-- same faction of the GO that is spawned by spell 65788 (not sniffed)
+UPDATE `creature_template` SET `faction_A`=7,`faction_H`=7,`exp`=0,`AIName`='SmartAI' WHERE `entry`=@Pinata;
diff --git a/sql/updates/world/2012_02_15_09_world_spell_proc_event.sql b/sql/updates/world/2012_02_15_09_world_spell_proc_event.sql
new file mode 100644
index 00000000000..4811e5d66fe
--- /dev/null
+++ b/sql/updates/world/2012_02_15_09_world_spell_proc_event.sql
@@ -0,0 +1,6 @@
+-- Corrected proc of Misery
+DELETE FROM `spell_proc_event` WHERE `entry` IN (33191, 33192, 33193);
+INSERT INTO `spell_proc_event` VALUES
+(33191, 0x00, 0x06, 0x00008000, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0, 0, 0),
+(33192, 0x00, 0x06, 0x00008000, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0, 0, 0),
+(33193, 0x00, 0x06, 0x00008000, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0, 0, 0);
diff --git a/sql/updates/world/2012_02_16_00_world_conditions.sql b/sql/updates/world/2012_02_16_00_world_conditions.sql
new file mode 100644
index 00000000000..a01792ef838
--- /dev/null
+++ b/sql/updates/world/2012_02_16_00_world_conditions.sql
@@ -0,0 +1,12800 @@
+CREATE TABLE `temp_convert_spells`
+(
+ `id` INT(11),
+ PRIMARY KEY (`id`)
+);
+
+# spells with EffectImplicitTarget In (6,21, 25) + spells having Targets & 1115534
+# those spells are the ones which require explicit unit target to cast
+INSERT INTO `temp_convert_spells` VALUES
+(5),
+(11),
+(12),
+(14),
+(15),
+(17),
+(25),
+(49),
+(50),
+(53),
+(56),
+(58),
+(59),
+(60),
+(61),
+(67),
+(68),
+(72),
+(75),
+(78),
+(89),
+(91),
+(96),
+(100),
+(101),
+(113),
+(116),
+(118),
+(131),
+(132),
+(133),
+(134),
+(139),
+(142),
+(143),
+(145),
+(172),
+(184),
+(205),
+(228),
+(246),
+(260),
+(271),
+(284),
+(285),
+(339),
+(348),
+(355),
+(370),
+(403),
+(408),
+(421),
+(453),
+(457),
+(467),
+(475),
+(512),
+(514),
+(526),
+(527),
+(528),
+(529),
+(530),
+(546),
+(548),
+(550),
+(552),
+(585),
+(589),
+(591),
+(592),
+(594),
+(596),
+(598),
+(600),
+(603),
+(605),
+(606),
+(633),
+(635),
+(639),
+(647),
+(676),
+(686),
+(689),
+(692),
+(694),
+(695),
+(699),
+(700),
+(701),
+(702),
+(703),
+(705),
+(707),
+(709),
+(710),
+(720),
+(731),
+(744),
+(745),
+(746),
+(770),
+(772),
+(774),
+(782),
+(785),
+(812),
+(835),
+(837),
+(845),
+(851),
+(853),
+(879),
+(915),
+(921),
+(930),
+(932),
+(943),
+(970),
+(974),
+(976),
+(980),
+(984),
+(988),
+(992),
+(996),
+(1004),
+(1010),
+(1014),
+(1026),
+(1035),
+(1042),
+(1044),
+(1058),
+(1062),
+(1075),
+(1079),
+(1082),
+(1088),
+(1090),
+(1094),
+(1098),
+(1106),
+(1108),
+(1120),
+(1121),
+(1126),
+(1130),
+(1139),
+(1152),
+(1159),
+(1194),
+(1196),
+(1210),
+(1214),
+(1225),
+(1228),
+(1234),
+(1241),
+(1243),
+(1244),
+(1245),
+(1249),
+(1250),
+(1251),
+(1266),
+(1267),
+(1329),
+(1330),
+(1350),
+(1364),
+(1373),
+(1413),
+(1430),
+(1446),
+(1459),
+(1460),
+(1461),
+(1462),
+(1464),
+(1467),
+(1472),
+(1473),
+(1474),
+(1475),
+(1481),
+(1485),
+(1490),
+(1495),
+(1513),
+(1515),
+(1516),
+(1536),
+(1579),
+(1588),
+(1604),
+(1608),
+(1609),
+(1650),
+(1664),
+(1665),
+(1666),
+(1669),
+(1671),
+(1672),
+(1714),
+(1715),
+(1752),
+(1753),
+(1754),
+(1755),
+(1756),
+(1757),
+(1758),
+(1759),
+(1760),
+(1766),
+(1767),
+(1768),
+(1769),
+(1770),
+(1776),
+(1777),
+(1795),
+(1796),
+(1797),
+(1798),
+(1800),
+(1809),
+(1810),
+(1811),
+(1822),
+(1823),
+(1824),
+(1831),
+(1833),
+(1852),
+(1906),
+(1908),
+(1943),
+(1950),
+(1966),
+(1978),
+(1991),
+(2000),
+(2020),
+(2021),
+(2050),
+(2052),
+(2053),
+(2054),
+(2055),
+(2060),
+(2061),
+(2070),
+(2090),
+(2091),
+(2094),
+(2096),
+(2098),
+(2110),
+(2118),
+(2119),
+(2124),
+(2125),
+(2136),
+(2137),
+(2138),
+(2139),
+(2141),
+(2142),
+(2143),
+(2147),
+(2148),
+(2154),
+(2155),
+(2275),
+(2280),
+(2313),
+(2372),
+(2373),
+(2400),
+(2425),
+(2442),
+(2443),
+(2444),
+(2446),
+(2552),
+(2589),
+(2590),
+(2591),
+(2601),
+(2602),
+(2606),
+(2607),
+(2608),
+(2609),
+(2610),
+(2626),
+(2629),
+(2630),
+(2633),
+(2634),
+(2636),
+(2637),
+(2643),
+(2647),
+(2649),
+(2650),
+(2653),
+(2691),
+(2764),
+(2767),
+(2782),
+(2791),
+(2800),
+(2816),
+(2817),
+(2818),
+(2819),
+(2834),
+(2850),
+(2855),
+(2860),
+(2871),
+(2880),
+(2893),
+(2908),
+(2912),
+(2941),
+(2944),
+(2948),
+(2949),
+(2969),
+(2972),
+(2973),
+(2974),
+(2995),
+(3007),
+(3009),
+(3010),
+(3011),
+(3018),
+(3029),
+(3034),
+(3043),
+(3044),
+(3105),
+(3108),
+(3110),
+(3120),
+(3121),
+(3130),
+(3131),
+(3132),
+(3137),
+(3140),
+(3145),
+(3147),
+(3148),
+(3150),
+(3205),
+(3206),
+(3207),
+(3229),
+(3233),
+(3234),
+(3237),
+(3242),
+(3243),
+(3246),
+(3247),
+(3252),
+(3261),
+(3263),
+(3267),
+(3268),
+(3279),
+(3280),
+(3286),
+(3332),
+(3355),
+(3356),
+(3358),
+(3360),
+(3387),
+(3388),
+(3393),
+(3396),
+(3405),
+(3409),
+(3427),
+(3429),
+(3436),
+(3442),
+(3446),
+(3465),
+(3466),
+(3472),
+(3510),
+(3514),
+(3539),
+(3542),
+(3551),
+(3553),
+(3571),
+(3578),
+(3583),
+(3584),
+(3586),
+(3602),
+(3603),
+(3604),
+(3606),
+(3607),
+(3609),
+(3627),
+(3635),
+(3636),
+(3650),
+(3674),
+(3715),
+(3716),
+(3747),
+(3812),
+(3911),
+(3912),
+(3913),
+(3921),
+(4011),
+(4039),
+(4040),
+(4041),
+(4058),
+(4060),
+(4089),
+(4090),
+(4091),
+(4101),
+(4102),
+(4130),
+(4131),
+(4132),
+(4150),
+(4159),
+(4164),
+(4165),
+(4166),
+(4167),
+(4168),
+(4169),
+(4209),
+(4221),
+(4240),
+(4243),
+(4244),
+(4262),
+(4280),
+(4281),
+(4282),
+(4285),
+(4286),
+(4294),
+(4316),
+(4362),
+(4423),
+(4500),
+(4504),
+(4505),
+(4506),
+(4538),
+(4630),
+(4659),
+(4805),
+(4877),
+(4940),
+(4961),
+(4962),
+(4974),
+(4979),
+(4980),
+(4984),
+(4987),
+(4996),
+(4997),
+(4998),
+(4999),
+(5000),
+(5003),
+(5019),
+(5025),
+(5103),
+(5105),
+(5116),
+(5133),
+(5137),
+(5138),
+(5143),
+(5144),
+(5145),
+(5164),
+(5165),
+(5171),
+(5176),
+(5177),
+(5178),
+(5179),
+(5180),
+(5185),
+(5186),
+(5187),
+(5188),
+(5189),
+(5195),
+(5196),
+(5201),
+(5208),
+(5211),
+(5213),
+(5221),
+(5232),
+(5234),
+(5246),
+(5255),
+(5259),
+(5260),
+(5263),
+(5271),
+(5276),
+(5306),
+(5308),
+(5320),
+(5321),
+(5322),
+(5323),
+(5324),
+(5325),
+(5337),
+(5374),
+(5375),
+(5376),
+(5401),
+(5413),
+(5416),
+(5422),
+(5424),
+(5433),
+(5480),
+(5503),
+(5507),
+(5508),
+(5509),
+(5513),
+(5514),
+(5547),
+(5565),
+(5566),
+(5567),
+(5570),
+(5588),
+(5589),
+(5595),
+(5597),
+(5598),
+(5614),
+(5615),
+(5648),
+(5649),
+(5676),
+(5679),
+(5696),
+(5697),
+(5703),
+(5726),
+(5727),
+(5739),
+(5760),
+(5781),
+(5782),
+(5862),
+(5884),
+(5917),
+(5918),
+(5938),
+(5940),
+(5951),
+(5967),
+(6000),
+(6016),
+(6027),
+(6028),
+(6041),
+(6060),
+(6061),
+(6063),
+(6064),
+(6065),
+(6066),
+(6074),
+(6075),
+(6076),
+(6077),
+(6078),
+(6121),
+(6128),
+(6130),
+(6132),
+(6136),
+(6142),
+(6144),
+(6146),
+(6178),
+(6199),
+(6203),
+(6205),
+(6213),
+(6215),
+(6217),
+(6222),
+(6223),
+(6245),
+(6252),
+(6253),
+(6254),
+(6255),
+(6257),
+(6273),
+(6277),
+(6278),
+(6304),
+(6327),
+(6346),
+(6348),
+(6349),
+(6350),
+(6351),
+(6352),
+(6353),
+(6357),
+(6358),
+(6359),
+(6360),
+(6362),
+(6409),
+(6435),
+(6460),
+(6465),
+(6466),
+(6483),
+(6484),
+(6509),
+(6530),
+(6531),
+(6533),
+(6546),
+(6547),
+(6548),
+(6552),
+(6554),
+(6555),
+(6572),
+(6574),
+(6576),
+(6580),
+(6581),
+(6595),
+(6607),
+(6647),
+(6655),
+(6660),
+(6664),
+(6685),
+(6713),
+(6716),
+(6719),
+(6726),
+(6728),
+(6730),
+(6742),
+(6743),
+(6744),
+(6745),
+(6746),
+(6747),
+(6748),
+(6751),
+(6753),
+(6754),
+(6756),
+(6760),
+(6761),
+(6762),
+(6766),
+(6767),
+(6768),
+(6770),
+(6774),
+(6778),
+(6780),
+(6785),
+(6787),
+(6788),
+(6789),
+(6795),
+(6798),
+(6800),
+(6807),
+(6808),
+(6809),
+(6814),
+(6866),
+(6870),
+(6873),
+(6894),
+(6907),
+(6909),
+(6917),
+(6922),
+(6927),
+(6942),
+(6946),
+(6949),
+(6950),
+(6951),
+(6957),
+(6958),
+(6960),
+(6963),
+(6965),
+(6979),
+(6980),
+(6984),
+(7001),
+(7033),
+(7054),
+(7057),
+(7068),
+(7079),
+(7081),
+(7084),
+(7092),
+(7093),
+(7098),
+(7099),
+(7101),
+(7102),
+(7105),
+(7120),
+(7122),
+(7124),
+(7125),
+(7127),
+(7140),
+(7145),
+(7154),
+(7159),
+(7160),
+(7162),
+(7211),
+(7266),
+(7288),
+(7289),
+(7290),
+(7295),
+(7321),
+(7322),
+(7329),
+(7357),
+(7365),
+(7367),
+(7369),
+(7372),
+(7373),
+(7379),
+(7384),
+(7386),
+(7399),
+(7400),
+(7402),
+(7405),
+(7414),
+(7415),
+(7416),
+(7439),
+(7482),
+(7485),
+(7588),
+(7621),
+(7638),
+(7641),
+(7645),
+(7646),
+(7648),
+(7651),
+(7655),
+(7656),
+(7712),
+(7714),
+(7715),
+(7716),
+(7717),
+(7718),
+(7719),
+(7736),
+(7761),
+(7763),
+(7764),
+(7799),
+(7800),
+(7801),
+(7802),
+(7806),
+(7807),
+(7808),
+(7809),
+(7810),
+(7811),
+(7813),
+(7814),
+(7815),
+(7816),
+(7821),
+(7829),
+(7853),
+(7874),
+(7875),
+(7876),
+(7877),
+(7878),
+(7879),
+(7880),
+(7881),
+(7882),
+(7883),
+(7884),
+(7885),
+(7887),
+(7891),
+(7896),
+(7901),
+(7914),
+(7922),
+(7925),
+(7926),
+(7927),
+(7932),
+(7933),
+(7938),
+(7947),
+(7951),
+(7967),
+(7992),
+(7994),
+(7997),
+(8004),
+(8008),
+(8010),
+(8012),
+(8014),
+(8016),
+(8026),
+(8028),
+(8029),
+(8034),
+(8037),
+(8040),
+(8042),
+(8044),
+(8045),
+(8046),
+(8050),
+(8052),
+(8053),
+(8056),
+(8058),
+(8068),
+(8070),
+(8091),
+(8092),
+(8094),
+(8095),
+(8096),
+(8097),
+(8098),
+(8099),
+(8100),
+(8101),
+(8102),
+(8103),
+(8104),
+(8105),
+(8106),
+(8112),
+(8113),
+(8114),
+(8115),
+(8116),
+(8117),
+(8118),
+(8119),
+(8120),
+(8121),
+(8129),
+(8137),
+(8138),
+(8139),
+(8140),
+(8151),
+(8208),
+(8211),
+(8221),
+(8222),
+(8242),
+(8246),
+(8255),
+(8256),
+(8257),
+(8272),
+(8275),
+(8277),
+(8282),
+(8288),
+(8289),
+(8292),
+(8295),
+(8312),
+(8313),
+(8314),
+(8318),
+(8319),
+(8344),
+(8345),
+(8346),
+(8347),
+(8352),
+(8353),
+(8355),
+(8362),
+(8363),
+(8365),
+(8379),
+(8380),
+(8382),
+(8383),
+(8384),
+(8385),
+(8391),
+(8400),
+(8401),
+(8402),
+(8406),
+(8407),
+(8408),
+(8412),
+(8413),
+(8414),
+(8415),
+(8416),
+(8417),
+(8425),
+(8426),
+(8428),
+(8440),
+(8441),
+(8442),
+(8444),
+(8445),
+(8446),
+(8447),
+(8448),
+(8449),
+(8452),
+(8453),
+(8456),
+(8459),
+(8460),
+(8463),
+(8464),
+(8493),
+(8496),
+(8497),
+(8552),
+(8554),
+(8555),
+(8595),
+(8598),
+(8600),
+(8613),
+(8615),
+(8616),
+(8617),
+(8618),
+(8619),
+(8620),
+(8621),
+(8623),
+(8624),
+(8627),
+(8629),
+(8631),
+(8632),
+(8633),
+(8637),
+(8639),
+(8640),
+(8643),
+(8645),
+(8646),
+(8647),
+(8649),
+(8650),
+(8654),
+(8673),
+(8676),
+(8680),
+(8682),
+(8685),
+(8689),
+(8699),
+(8716),
+(8721),
+(8724),
+(8725),
+(8733),
+(8735),
+(8788),
+(8806),
+(8818),
+(8820),
+(8903),
+(8905),
+(8907),
+(8910),
+(8914),
+(8921),
+(8924),
+(8925),
+(8926),
+(8927),
+(8928),
+(8929),
+(8936),
+(8938),
+(8939),
+(8940),
+(8941),
+(8946),
+(8947),
+(8949),
+(8950),
+(8951),
+(8955),
+(8972),
+(8983),
+(8992),
+(8994),
+(8998),
+(9000),
+(9005),
+(9007),
+(9034),
+(9053),
+(9057),
+(9080),
+(9159),
+(9176),
+(9234),
+(9268),
+(9275),
+(9347),
+(9373),
+(9454),
+(9455),
+(9456),
+(9459),
+(9462),
+(9472),
+(9473),
+(9474),
+(9481),
+(9482),
+(9483),
+(9484),
+(9485),
+(9487),
+(9488),
+(9492),
+(9493),
+(9532),
+(9552),
+(9574),
+(9591),
+(9612),
+(9613),
+(9614),
+(9654),
+(9658),
+(9672),
+(9734),
+(9735),
+(9739),
+(9745),
+(9750),
+(9752),
+(9756),
+(9758),
+(9771),
+(9775),
+(9786),
+(9789),
+(9790),
+(9791),
+(9796),
+(9806),
+(9823),
+(9824),
+(9826),
+(9827),
+(9829),
+(9830),
+(9833),
+(9834),
+(9835),
+(9839),
+(9840),
+(9841),
+(9849),
+(9850),
+(9852),
+(9853),
+(9856),
+(9857),
+(9858),
+(9866),
+(9867),
+(9875),
+(9876),
+(9880),
+(9881),
+(9884),
+(9885),
+(9888),
+(9889),
+(9892),
+(9894),
+(9896),
+(9901),
+(9904),
+(9910),
+(9912),
+(9949),
+(9977),
+(9991),
+(9999),
+(10055),
+(10056),
+(10060),
+(10073),
+(10101),
+(10136),
+(10141),
+(10142),
+(10143),
+(10146),
+(10147),
+(10148),
+(10149),
+(10150),
+(10151),
+(10156),
+(10157),
+(10158),
+(10162),
+(10163),
+(10164),
+(10171),
+(10172),
+(10175),
+(10176),
+(10178),
+(10179),
+(10180),
+(10181),
+(10188),
+(10189),
+(10190),
+(10194),
+(10195),
+(10196),
+(10197),
+(10198),
+(10199),
+(10200),
+(10203),
+(10204),
+(10205),
+(10206),
+(10207),
+(10208),
+(10209),
+(10210),
+(10211),
+(10212),
+(10217),
+(10218),
+(10221),
+(10222),
+(10224),
+(10226),
+(10227),
+(10231),
+(10239),
+(10244),
+(10245),
+(10246),
+(10277),
+(10308),
+(10310),
+(10312),
+(10313),
+(10314),
+(10321),
+(10326),
+(10328),
+(10329),
+(10346),
+(10370),
+(10371),
+(10373),
+(10391),
+(10392),
+(10412),
+(10413),
+(10414),
+(10435),
+(10436),
+(10444),
+(10445),
+(10447),
+(10448),
+(10452),
+(10458),
+(10466),
+(10467),
+(10468),
+(10472),
+(10473),
+(10577),
+(10578),
+(10605),
+(10617),
+(10651),
+(10653),
+(10657),
+(10659),
+(10661),
+(10663),
+(10689),
+(10730),
+(10767),
+(10768),
+(10769),
+(10771),
+(10833),
+(10838),
+(10839),
+(10843),
+(10847),
+(10851),
+(10855),
+(10863),
+(10872),
+(10892),
+(10893),
+(10894),
+(10898),
+(10899),
+(10900),
+(10901),
+(10908),
+(10909),
+(10915),
+(10916),
+(10917),
+(10921),
+(10927),
+(10928),
+(10929),
+(10933),
+(10934),
+(10937),
+(10938),
+(10945),
+(10946),
+(10947),
+(10955),
+(10957),
+(10958),
+(10960),
+(10961),
+(10963),
+(10964),
+(10965),
+(10966),
+(11014),
+(11016),
+(11020),
+(11021),
+(11027),
+(11084),
+(11085),
+(11131),
+(11132),
+(11196),
+(11197),
+(11198),
+(11203),
+(11204),
+(11205),
+(11267),
+(11268),
+(11269),
+(11273),
+(11274),
+(11275),
+(11279),
+(11280),
+(11281),
+(11285),
+(11286),
+(11289),
+(11290),
+(11293),
+(11294),
+(11297),
+(11299),
+(11300),
+(11303),
+(11335),
+(11336),
+(11337),
+(11353),
+(11354),
+(11362),
+(11366),
+(11374),
+(11391),
+(11397),
+(11409),
+(11428),
+(11430),
+(11431),
+(11436),
+(11442),
+(11443),
+(11444),
+(11446),
+(11469),
+(11470),
+(11471),
+(11512),
+(11519),
+(11520),
+(11522),
+(11525),
+(11528),
+(11538),
+(11539),
+(11545),
+(11564),
+(11565),
+(11566),
+(11567),
+(11572),
+(11573),
+(11574),
+(11578),
+(11584),
+(11585),
+(11595),
+(11596),
+(11597),
+(11600),
+(11601),
+(11604),
+(11605),
+(11608),
+(11609),
+(11610),
+(11612),
+(11639),
+(11640),
+(11641),
+(11642),
+(11650),
+(11658),
+(11659),
+(11660),
+(11661),
+(11665),
+(11667),
+(11668),
+(11671),
+(11672),
+(11675),
+(11699),
+(11700),
+(11707),
+(11708),
+(11711),
+(11712),
+(11713),
+(11719),
+(11721),
+(11722),
+(11725),
+(11726),
+(11762),
+(11763),
+(11772),
+(11773),
+(11774),
+(11775),
+(11776),
+(11777),
+(11778),
+(11779),
+(11780),
+(11781),
+(11782),
+(11783),
+(11784),
+(11785),
+(11786),
+(11787),
+(11791),
+(11820),
+(11821),
+(11824),
+(11825),
+(11835),
+(11836),
+(11839),
+(11877),
+(11879),
+(11885),
+(11886),
+(11887),
+(11888),
+(11889),
+(11918),
+(11920),
+(11921),
+(11922),
+(11960),
+(11962),
+(11963),
+(11971),
+(11972),
+(11974),
+(11976),
+(11977),
+(11978),
+(11980),
+(11981),
+(11985),
+(11986),
+(11994),
+(11998),
+(12021),
+(12023),
+(12024),
+(12039),
+(12054),
+(12057),
+(12058),
+(12096),
+(12097),
+(12098),
+(12118),
+(12127),
+(12128),
+(12130),
+(12131),
+(12160),
+(12161),
+(12162),
+(12166),
+(12167),
+(12170),
+(12174),
+(12175),
+(12176),
+(12177),
+(12178),
+(12179),
+(12181),
+(12242),
+(12245),
+(12246),
+(12248),
+(12251),
+(12279),
+(12280),
+(12289),
+(12294),
+(12355),
+(12461),
+(12466),
+(12471),
+(12479),
+(12480),
+(12484),
+(12485),
+(12486),
+(12491),
+(12492),
+(12493),
+(12494),
+(12505),
+(12509),
+(12510),
+(12521),
+(12522),
+(12523),
+(12524),
+(12525),
+(12526),
+(12531),
+(12538),
+(12540),
+(12541),
+(12542),
+(12545),
+(12548),
+(12551),
+(12553),
+(12555),
+(12578),
+(12579),
+(12654),
+(12657),
+(12668),
+(12675),
+(12693),
+(12699),
+(12705),
+(12721),
+(12723),
+(12738),
+(12739),
+(12742),
+(12747),
+(12798),
+(12809),
+(12821),
+(12824),
+(12825),
+(12826),
+(12850),
+(12868),
+(12885),
+(12888),
+(12890),
+(12998),
+(13003),
+(13005),
+(13006),
+(13009),
+(13013),
+(13022),
+(13029),
+(13044),
+(13099),
+(13119),
+(13120),
+(13138),
+(13140),
+(13142),
+(13180),
+(13181),
+(13218),
+(13222),
+(13223),
+(13224),
+(13278),
+(13279),
+(13281),
+(13298),
+(13318),
+(13319),
+(13321),
+(13322),
+(13323),
+(13325),
+(13326),
+(13327),
+(13338),
+(13339),
+(13340),
+(13341),
+(13342),
+(13374),
+(13375),
+(13398),
+(13424),
+(13438),
+(13439),
+(13440),
+(13441),
+(13442),
+(13443),
+(13444),
+(13445),
+(13446),
+(13459),
+(13480),
+(13482),
+(13486),
+(13490),
+(13491),
+(13496),
+(13518),
+(13519),
+(13524),
+(13526),
+(13527),
+(13528),
+(13530),
+(13534),
+(13549),
+(13550),
+(13551),
+(13552),
+(13553),
+(13554),
+(13555),
+(13566),
+(13567),
+(13579),
+(13583),
+(13584),
+(13585),
+(13608),
+(13619),
+(13692),
+(13728),
+(13729),
+(13737),
+(13738),
+(13748),
+(13752),
+(13797),
+(13860),
+(13864),
+(13878),
+(13880),
+(13884),
+(13897),
+(13901),
+(13902),
+(13907),
+(13921),
+(13952),
+(13953),
+(13977),
+(14030),
+(14032),
+(14033),
+(14034),
+(14053),
+(14087),
+(14099),
+(14102),
+(14103),
+(14105),
+(14106),
+(14109),
+(14110),
+(14112),
+(14118),
+(14119),
+(14120),
+(14122),
+(14126),
+(14129),
+(14130),
+(14134),
+(14145),
+(14156),
+(14157),
+(14160),
+(14178),
+(14180),
+(14183),
+(14189),
+(14200),
+(14247),
+(14251),
+(14253),
+(14260),
+(14261),
+(14262),
+(14263),
+(14264),
+(14265),
+(14266),
+(14269),
+(14270),
+(14271),
+(14278),
+(14281),
+(14282),
+(14283),
+(14284),
+(14285),
+(14286),
+(14287),
+(14288),
+(14289),
+(14290),
+(14298),
+(14299),
+(14300),
+(14301),
+(14308),
+(14309),
+(14323),
+(14324),
+(14325),
+(14326),
+(14327),
+(14331),
+(14443),
+(14515),
+(14516),
+(14517),
+(14518),
+(14537),
+(14752),
+(14792),
+(14795),
+(14818),
+(14819),
+(14867),
+(14868),
+(14873),
+(14874),
+(14875),
+(14890),
+(14892),
+(14893),
+(14894),
+(14895),
+(14897),
+(14902),
+(14903),
+(14914),
+(14916),
+(14917),
+(14918),
+(14919),
+(14920),
+(14921),
+(15037),
+(15039),
+(15040),
+(15042),
+(15043),
+(15057),
+(15065),
+(15089),
+(15090),
+(15095),
+(15096),
+(15117),
+(15120),
+(15122),
+(15123),
+(15124),
+(15128),
+(15187),
+(15207),
+(15208),
+(15211),
+(15228),
+(15229),
+(15230),
+(15232),
+(15234),
+(15235),
+(15236),
+(15238),
+(15241),
+(15242),
+(15247),
+(15248),
+(15249),
+(15250),
+(15254),
+(15257),
+(15261),
+(15262),
+(15263),
+(15264),
+(15265),
+(15266),
+(15267),
+(15277),
+(15279),
+(15280),
+(15283),
+(15284),
+(15288),
+(15305),
+(15306),
+(15331),
+(15332),
+(15342),
+(15343),
+(15344),
+(15346),
+(15357),
+(15359),
+(15362),
+(15363),
+(15366),
+(15398),
+(15407),
+(15451),
+(15471),
+(15472),
+(15487),
+(15493),
+(15495),
+(15496),
+(15497),
+(15498),
+(15499),
+(15500),
+(15501),
+(15505),
+(15530),
+(15534),
+(15535),
+(15536),
+(15537),
+(15539),
+(15547),
+(15549),
+(15570),
+(15572),
+(15574),
+(15575),
+(15580),
+(15581),
+(15582),
+(15583),
+(15586),
+(15587),
+(15592),
+(15598),
+(15605),
+(15607),
+(15608),
+(15610),
+(15611),
+(15612),
+(15614),
+(15615),
+(15616),
+(15617),
+(15618),
+(15619),
+(15620),
+(15621),
+(15643),
+(15651),
+(15652),
+(15653),
+(15654),
+(15655),
+(15656),
+(15657),
+(15659),
+(15661),
+(15662),
+(15664),
+(15665),
+(15667),
+(15691),
+(15692),
+(15695),
+(15698),
+(15699),
+(15702),
+(15708),
+(15712),
+(15713),
+(15729),
+(15730),
+(15732),
+(15734),
+(15735),
+(15736),
+(15749),
+(15752),
+(15753),
+(15784),
+(15785),
+(15790),
+(15791),
+(15793),
+(15795),
+(15797),
+(15798),
+(15801),
+(15802),
+(15848),
+(15850),
+(15859),
+(15860),
+(15876),
+(15878),
+(15968),
+(15969),
+(15970),
+(15976),
+(15980),
+(15981),
+(15982),
+(16000),
+(16001),
+(16006),
+(16007),
+(16029),
+(16031),
+(16033),
+(16034),
+(16044),
+(16045),
+(16050),
+(16053),
+(16067),
+(16071),
+(16075),
+(16095),
+(16100),
+(16101),
+(16128),
+(16143),
+(16144),
+(16145),
+(16168),
+(16170),
+(16172),
+(16176),
+(16177),
+(16186),
+(16231),
+(16235),
+(16236),
+(16237),
+(16240),
+(16243),
+(16247),
+(16249),
+(16333),
+(16336),
+(16343),
+(16344),
+(16351),
+(16352),
+(16353),
+(16366),
+(16373),
+(16375),
+(16391),
+(16392),
+(16393),
+(16400),
+(16401),
+(16402),
+(16403),
+(16405),
+(16406),
+(16407),
+(16408),
+(16409),
+(16410),
+(16411),
+(16412),
+(16413),
+(16414),
+(16415),
+(16427),
+(16429),
+(16430),
+(16431),
+(16433),
+(16448),
+(16449),
+(16451),
+(16454),
+(16455),
+(16456),
+(16458),
+(16460),
+(16461),
+(16472),
+(16495),
+(16496),
+(16498),
+(16508),
+(16509),
+(16511),
+(16527),
+(16528),
+(16530),
+(16536),
+(16549),
+(16552),
+(16553),
+(16554),
+(16555),
+(16561),
+(16564),
+(16565),
+(16568),
+(16569),
+(16570),
+(16573),
+(16583),
+(16587),
+(16588),
+(16603),
+(16608),
+(16610),
+(16612),
+(16614),
+(16618),
+(16627),
+(16628),
+(16636),
+(16697),
+(16707),
+(16708),
+(16709),
+(16711),
+(16712),
+(16713),
+(16714),
+(16716),
+(16722),
+(16782),
+(16783),
+(16784),
+(16788),
+(16790),
+(16793),
+(16798),
+(16799),
+(16804),
+(16805),
+(16827),
+(16828),
+(16829),
+(16830),
+(16831),
+(16832),
+(16844),
+(16856),
+(16857),
+(16868),
+(16869),
+(16871),
+(16898),
+(16908),
+(16921),
+(16922),
+(16927),
+(16928),
+(16953),
+(16979),
+(16997),
+(17008),
+(17009),
+(17011),
+(17012),
+(17013),
+(17105),
+(17134),
+(17137),
+(17138),
+(17139),
+(17140),
+(17141),
+(17142),
+(17143),
+(17144),
+(17146),
+(17147),
+(17148),
+(17149),
+(17150),
+(17151),
+(17153),
+(17156),
+(17157),
+(17158),
+(17159),
+(17160),
+(17165),
+(17168),
+(17170),
+(17171),
+(17172),
+(17173),
+(17174),
+(17175),
+(17183),
+(17194),
+(17195),
+(17198),
+(17201),
+(17213),
+(17227),
+(17230),
+(17233),
+(17234),
+(17238),
+(17243),
+(17244),
+(17246),
+(17253),
+(17255),
+(17256),
+(17257),
+(17258),
+(17259),
+(17260),
+(17261),
+(17273),
+(17274),
+(17276),
+(17281),
+(17284),
+(17287),
+(17289),
+(17290),
+(17292),
+(17293),
+(17307),
+(17308),
+(17311),
+(17312),
+(17313),
+(17314),
+(17315),
+(17330),
+(17331),
+(17333),
+(17334),
+(17347),
+(17348),
+(17353),
+(17364),
+(17368),
+(17393),
+(17405),
+(17407),
+(17434),
+(17435),
+(17439),
+(17445),
+(17451),
+(17452),
+(17470),
+(17483),
+(17484),
+(17492),
+(17494),
+(17496),
+(17500),
+(17503),
+(17504),
+(17505),
+(17506),
+(17509),
+(17510),
+(17511),
+(17529),
+(17547),
+(17607),
+(17608),
+(17609),
+(17610),
+(17611),
+(17613),
+(17615),
+(17620),
+(17630),
+(17633),
+(17639),
+(17648),
+(17649),
+(17672),
+(17682),
+(17692),
+(17734),
+(17736),
+(17738),
+(17744),
+(17745),
+(17749),
+(17753),
+(17754),
+(17755),
+(17776),
+(17777),
+(17794),
+(17797),
+(17798),
+(17799),
+(17800),
+(17843),
+(17855),
+(17856),
+(17857),
+(17859),
+(17860),
+(17863),
+(17877),
+(17883),
+(17919),
+(17920),
+(17921),
+(17922),
+(17923),
+(17924),
+(17925),
+(17926),
+(17939),
+(17943),
+(17944),
+(17946),
+(17948),
+(17950),
+(17961),
+(17962),
+(17963),
+(18070),
+(18072),
+(18075),
+(18077),
+(18078),
+(18081),
+(18082),
+(18083),
+(18084),
+(18085),
+(18086),
+(18088),
+(18089),
+(18090),
+(18091),
+(18092),
+(18101),
+(18103),
+(18104),
+(18105),
+(18106),
+(18107),
+(18108),
+(18111),
+(18112),
+(18118),
+(18138),
+(18145),
+(18149),
+(18151),
+(18152),
+(18153),
+(18159),
+(18164),
+(18165),
+(18172),
+(18173),
+(18187),
+(18197),
+(18199),
+(18200),
+(18202),
+(18203),
+(18204),
+(18205),
+(18206),
+(18208),
+(18209),
+(18210),
+(18211),
+(18214),
+(18217),
+(18223),
+(18266),
+(18267),
+(18270),
+(18276),
+(18278),
+(18289),
+(18347),
+(18362),
+(18367),
+(18368),
+(18375),
+(18381),
+(18387),
+(18389),
+(18390),
+(18395),
+(18396),
+(18398),
+(18425),
+(18469),
+(18476),
+(18498),
+(18502),
+(18503),
+(18543),
+(18545),
+(18557),
+(18561),
+(18562),
+(18608),
+(18610),
+(18631),
+(18632),
+(18633),
+(18647),
+(18649),
+(18651),
+(18652),
+(18654),
+(18656),
+(18657),
+(18658),
+(18663),
+(18670),
+(18702),
+(18761),
+(18763),
+(18796),
+(18798),
+(18802),
+(18805),
+(18807),
+(18809),
+(18812),
+(18813),
+(18817),
+(18819),
+(18833),
+(18867),
+(18868),
+(18869),
+(18870),
+(18871),
+(18945),
+(18952),
+(18958),
+(18968),
+(18972),
+(18980),
+(18988),
+(18996),
+(19027),
+(19128),
+(19130),
+(19131),
+(19132),
+(19133),
+(19134),
+(19136),
+(19179),
+(19196),
+(19213),
+(19244),
+(19260),
+(19276),
+(19277),
+(19278),
+(19279),
+(19280),
+(19306),
+(19319),
+(19362),
+(19386),
+(19391),
+(19393),
+(19395),
+(19397),
+(19411),
+(19434),
+(19437),
+(19439),
+(19444),
+(19445),
+(19446),
+(19447),
+(19448),
+(19450),
+(19452),
+(19460),
+(19463),
+(19469),
+(19471),
+(19472),
+(19476),
+(19481),
+(19486),
+(19501),
+(19503),
+(19505),
+(19512),
+(19548),
+(19595),
+(19597),
+(19632),
+(19633),
+(19637),
+(19639),
+(19642),
+(19643),
+(19644),
+(19647),
+(19648),
+(19650),
+(19652),
+(19653),
+(19654),
+(19658),
+(19661),
+(19662),
+(19663),
+(19664),
+(19674),
+(19675),
+(19676),
+(19677),
+(19678),
+(19679),
+(19680),
+(19681),
+(19682),
+(19683),
+(19684),
+(19685),
+(19686),
+(19687),
+(19688),
+(19689),
+(19692),
+(19693),
+(19694),
+(19696),
+(19697),
+(19699),
+(19700),
+(19701),
+(19725),
+(19727),
+(19728),
+(19729),
+(19730),
+(19731),
+(19734),
+(19736),
+(19737),
+(19738),
+(19739),
+(19740),
+(19742),
+(19750),
+(19755),
+(19767),
+(19770),
+(19771),
+(19775),
+(19776),
+(19777),
+(19779),
+(19785),
+(19797),
+(19801),
+(19816),
+(19820),
+(19834),
+(19835),
+(19836),
+(19837),
+(19838),
+(19850),
+(19852),
+(19853),
+(19854),
+(19869),
+(19872),
+(19874),
+(19881),
+(19901),
+(19931),
+(19938),
+(19939),
+(19940),
+(19941),
+(19942),
+(19943),
+(19970),
+(19971),
+(19972),
+(19973),
+(19974),
+(19975),
+(19983),
+(20000),
+(20004),
+(20005),
+(20006),
+(20019),
+(20066),
+(20170),
+(20184),
+(20185),
+(20186),
+(20187),
+(20211),
+(20217),
+(20220),
+(20221),
+(20223),
+(20228),
+(20233),
+(20236),
+(20240),
+(20243),
+(20252),
+(20253),
+(20271),
+(20276),
+(20279),
+(20294),
+(20295),
+(20297),
+(20298),
+(20367),
+(20368),
+(20369),
+(20370),
+(20371),
+(20372),
+(20373),
+(20374),
+(20410),
+(20420),
+(20424),
+(20425),
+(20463),
+(20467),
+(20473),
+(20474),
+(20475),
+(20477),
+(20508),
+(20511),
+(20534),
+(20535),
+(20536),
+(20537),
+(20539),
+(20541),
+(20543),
+(20547),
+(20559),
+(20560),
+(20564),
+(20565),
+(20569),
+(20586),
+(20604),
+(20605),
+(20614),
+(20615),
+(20616),
+(20617),
+(20618),
+(20623),
+(20625),
+(20627),
+(20629),
+(20630),
+(20647),
+(20655),
+(20656),
+(20657),
+(20658),
+(20660),
+(20661),
+(20662),
+(20663),
+(20664),
+(20665),
+(20666),
+(20668),
+(20677),
+(20678),
+(20679),
+(20682),
+(20684),
+(20685),
+(20688),
+(20690),
+(20691),
+(20692),
+(20695),
+(20696),
+(20698),
+(20700),
+(20714),
+(20720),
+(20726),
+(20733),
+(20735),
+(20736),
+(20740),
+(20751),
+(20787),
+(20788),
+(20790),
+(20791),
+(20792),
+(20793),
+(20795),
+(20797),
+(20800),
+(20801),
+(20802),
+(20804),
+(20805),
+(20806),
+(20807),
+(20808),
+(20811),
+(20812),
+(20815),
+(20816),
+(20819),
+(20820),
+(20821),
+(20822),
+(20823),
+(20824),
+(20825),
+(20826),
+(20829),
+(20830),
+(20831),
+(20832),
+(20869),
+(20882),
+(20883),
+(20893),
+(20900),
+(20901),
+(20902),
+(20903),
+(20904),
+(20909),
+(20910),
+(20911),
+(20929),
+(20930),
+(20989),
+(21008),
+(21027),
+(21030),
+(21047),
+(21049),
+(21050),
+(21055),
+(21056),
+(21059),
+(21060),
+(21062),
+(21063),
+(21064),
+(21066),
+(21067),
+(21068),
+(21072),
+(21074),
+(21077),
+(21081),
+(21100),
+(21128),
+(21140),
+(21141),
+(21150),
+(21151),
+(21159),
+(21162),
+(21163),
+(21164),
+(21170),
+(21179),
+(21183),
+(21187),
+(21330),
+(21332),
+(21335),
+(21337),
+(21343),
+(21356),
+(21357),
+(21368),
+(21369),
+(21372),
+(21388),
+(21390),
+(21398),
+(21401),
+(21402),
+(21463),
+(21464),
+(21465),
+(21541),
+(21542),
+(21543),
+(21546),
+(21549),
+(21551),
+(21552),
+(21553),
+(21647),
+(21654),
+(21667),
+(21668),
+(21669),
+(21670),
+(21731),
+(21732),
+(21734),
+(21735),
+(21737),
+(21745),
+(21787),
+(21794),
+(21807),
+(21829),
+(21832),
+(21834),
+(21835),
+(21840),
+(21847),
+(21866),
+(21889),
+(21892),
+(21898),
+(21912),
+(21939),
+(21949),
+(21952),
+(21953),
+(21960),
+(21961),
+(21971),
+(21979),
+(21987),
+(21990),
+(21992),
+(22009),
+(22012),
+(22048),
+(22068),
+(22088),
+(22108),
+(22109),
+(22110),
+(22111),
+(22112),
+(22113),
+(22114),
+(22115),
+(22116),
+(22117),
+(22118),
+(22119),
+(22120),
+(22121),
+(22127),
+(22128),
+(22167),
+(22168),
+(22187),
+(22189),
+(22207),
+(22227),
+(22272),
+(22273),
+(22274),
+(22284),
+(22289),
+(22290),
+(22291),
+(22312),
+(22335),
+(22336),
+(22355),
+(22357),
+(22371),
+(22373),
+(22411),
+(22412),
+(22414),
+(22415),
+(22416),
+(22418),
+(22423),
+(22426),
+(22427),
+(22428),
+(22429),
+(22433),
+(22438),
+(22482),
+(22565),
+(22568),
+(22570),
+(22572),
+(22574),
+(22575),
+(22582),
+(22591),
+(22592),
+(22639),
+(22641),
+(22646),
+(22651),
+(22661),
+(22662),
+(22666),
+(22667),
+(22677),
+(22678),
+(22682),
+(22687),
+(22689),
+(22690),
+(22691),
+(22692),
+(22695),
+(22709),
+(22713),
+(22715),
+(22742),
+(22744),
+(22745),
+(22751),
+(22752),
+(22784),
+(22785),
+(22799),
+(22800),
+(22814),
+(22816),
+(22817),
+(22818),
+(22820),
+(22822),
+(22823),
+(22827),
+(22828),
+(22829),
+(22856),
+(22858),
+(22859),
+(22864),
+(22883),
+(22885),
+(22886),
+(22887),
+(22893),
+(22901),
+(22907),
+(22909),
+(22911),
+(22916),
+(22919),
+(22920),
+(22935),
+(22947),
+(22950),
+(22951),
+(22959),
+(22968),
+(22993),
+(22994),
+(22995),
+(22997),
+(23015),
+(23038),
+(23059),
+(23064),
+(23065),
+(23073),
+(23102),
+(23104),
+(23106),
+(23114),
+(23115),
+(23122),
+(23123),
+(23124),
+(23125),
+(23135),
+(23139),
+(23153),
+(23154),
+(23155),
+(23169),
+(23170),
+(23174),
+(23205),
+(23206),
+(23224),
+(23256),
+(23262),
+(23267),
+(23268),
+(23275),
+(23278),
+(23298),
+(23301),
+(23304),
+(23333),
+(23335),
+(23337),
+(23340),
+(23359),
+(23379),
+(23380),
+(23381),
+(23391),
+(23392),
+(23402),
+(23416),
+(23417),
+(23451),
+(23452),
+(23454),
+(23460),
+(23490),
+(23491),
+(23493),
+(23504),
+(23505),
+(23546),
+(23552),
+(23567),
+(23568),
+(23569),
+(23577),
+(23580),
+(23590),
+(23592),
+(23601),
+(23604),
+(23605),
+(23620),
+(23621),
+(23622),
+(23623),
+(23625),
+(23626),
+(23627),
+(23658),
+(23661),
+(23675),
+(23687),
+(23693),
+(23694),
+(23695),
+(23696),
+(23699),
+(23702),
+(23735),
+(23736),
+(23737),
+(23738),
+(23765),
+(23766),
+(23767),
+(23768),
+(23769),
+(23774),
+(23775),
+(23786),
+(23848),
+(23850),
+(23853),
+(23859),
+(23860),
+(23862),
+(23865),
+(23881),
+(23892),
+(23893),
+(23894),
+(23895),
+(23921),
+(23922),
+(23923),
+(23924),
+(23925),
+(23947),
+(23948),
+(23952),
+(23953),
+(23958),
+(23959),
+(23960),
+(23961),
+(23962),
+(23963),
+(23964),
+(23967),
+(23970),
+(23978),
+(23979),
+(24002),
+(24003),
+(24016),
+(24017),
+(24020),
+(24023),
+(24042),
+(24049),
+(24053),
+(24061),
+(24064),
+(24097),
+(24109),
+(24111),
+(24131),
+(24132),
+(24133),
+(24134),
+(24135),
+(24178),
+(24179),
+(24185),
+(24187),
+(24193),
+(24199),
+(24201),
+(24208),
+(24210),
+(24212),
+(24213),
+(24238),
+(24239),
+(24241),
+(24248),
+(24251),
+(24253),
+(24254),
+(24257),
+(24259),
+(24261),
+(24267),
+(24274),
+(24275),
+(24300),
+(24306),
+(24314),
+(24315),
+(24316),
+(24317),
+(24327),
+(24331),
+(24332),
+(24333),
+(24335),
+(24336),
+(24337),
+(24339),
+(24341),
+(24374),
+(24378),
+(24379),
+(24388),
+(24393),
+(24394),
+(24407),
+(24408),
+(24412),
+(24413),
+(24414),
+(24423),
+(24435),
+(24458),
+(24466),
+(24530),
+(24573),
+(24577),
+(24578),
+(24579),
+(24583),
+(24585),
+(24586),
+(24587),
+(24596),
+(24600),
+(24601),
+(24611),
+(24617),
+(24618),
+(24619),
+(24637),
+(24640),
+(24648),
+(24649),
+(24668),
+(24671),
+(24672),
+(24674),
+(24680),
+(24684),
+(24685),
+(24686),
+(24690),
+(24705),
+(24708),
+(24709),
+(24710),
+(24711),
+(24712),
+(24713),
+(24714),
+(24715),
+(24723),
+(24725),
+(24726),
+(24727),
+(24730),
+(24732),
+(24735),
+(24736),
+(24740),
+(24742),
+(24745),
+(24747),
+(24750),
+(24751),
+(24752),
+(24753),
+(24755),
+(24757),
+(24759),
+(24761),
+(24762),
+(24766),
+(24767),
+(24769),
+(24771),
+(24773),
+(24776),
+(24785),
+(24787),
+(24791),
+(24792),
+(24793),
+(24802),
+(24803),
+(24816),
+(24817),
+(24819),
+(24824),
+(24825),
+(24826),
+(24829),
+(24831),
+(24832),
+(24844),
+(24857),
+(24872),
+(24873),
+(24875),
+(24923),
+(24928),
+(24935),
+(24937),
+(24942),
+(24950),
+(24951),
+(24952),
+(24953),
+(24954),
+(24955),
+(24957),
+(24960),
+(24961),
+(24962),
+(24963),
+(24964),
+(24965),
+(24966),
+(24974),
+(24975),
+(24976),
+(24977),
+(24982),
+(24993),
+(25006),
+(25008),
+(25009),
+(25010),
+(25011),
+(25012),
+(25021),
+(25022),
+(25025),
+(25028),
+(25050),
+(25051),
+(25052),
+(25054),
+(25055),
+(25058),
+(25104),
+(25139),
+(25140),
+(25143),
+(25165),
+(25174),
+(25185),
+(25187),
+(25189),
+(25190),
+(25191),
+(25208),
+(25210),
+(25212),
+(25213),
+(25217),
+(25218),
+(25221),
+(25222),
+(25225),
+(25231),
+(25233),
+(25234),
+(25235),
+(25236),
+(25241),
+(25242),
+(25245),
+(25246),
+(25248),
+(25251),
+(25258),
+(25262),
+(25263),
+(25266),
+(25269),
+(25272),
+(25273),
+(25274),
+(25275),
+(25281),
+(25282),
+(25286),
+(25288),
+(25290),
+(25291),
+(25292),
+(25294),
+(25295),
+(25297),
+(25298),
+(25299),
+(25300),
+(25302),
+(25304),
+(25306),
+(25307),
+(25308),
+(25309),
+(25311),
+(25312),
+(25314),
+(25315),
+(25316),
+(25345),
+(25349),
+(25363),
+(25364),
+(25367),
+(25368),
+(25371),
+(25372),
+(25373),
+(25375),
+(25383),
+(25384),
+(25387),
+(25389),
+(25391),
+(25396),
+(25420),
+(25424),
+(25433),
+(25439),
+(25442),
+(25448),
+(25449),
+(25454),
+(25457),
+(25462),
+(25464),
+(25465),
+(25467),
+(25471),
+(25488),
+(25497),
+(25501),
+(25504),
+(25514),
+(25515),
+(25530),
+(25531),
+(25595),
+(25602),
+(25603),
+(25605),
+(25645),
+(25646),
+(25650),
+(25651),
+(25652),
+(25668),
+(25671),
+(25673),
+(25677),
+(25678),
+(25686),
+(25710),
+(25712),
+(25721),
+(25725),
+(25742),
+(25748),
+(25755),
+(25760),
+(25761),
+(25762),
+(25771),
+(25772),
+(25777),
+(25778),
+(25779),
+(25781),
+(25788),
+(25800),
+(25802),
+(25803),
+(25806),
+(25807),
+(25808),
+(25809),
+(25810),
+(25811),
+(25816),
+(25821),
+(25838),
+(25840),
+(25843),
+(25845),
+(25847),
+(25848),
+(25852),
+(25854),
+(25856),
+(25861),
+(25902),
+(25903),
+(25911),
+(25912),
+(25913),
+(25914),
+(25947),
+(25992),
+(25995),
+(25997),
+(25999),
+(26001),
+(26004),
+(26005),
+(26006),
+(26007),
+(26008),
+(26012),
+(26013),
+(26017),
+(26035),
+(26044),
+(26050),
+(26077),
+(26078),
+(26079),
+(26081),
+(26082),
+(26090),
+(26095),
+(26097),
+(26098),
+(26100),
+(26108),
+(26125),
+(26126),
+(26134),
+(26141),
+(26143),
+(26170),
+(26181),
+(26194),
+(26195),
+(26196),
+(26197),
+(26198),
+(26206),
+(26207),
+(26211),
+(26218),
+(26226),
+(26233),
+(26258),
+(26259),
+(26275),
+(26281),
+(26282),
+(26339),
+(26350),
+(26363),
+(26364),
+(26365),
+(26366),
+(26367),
+(26368),
+(26369),
+(26370),
+(26371),
+(26372),
+(26374),
+(26375),
+(26377),
+(26406),
+(26408),
+(26409),
+(26410),
+(26412),
+(26414),
+(26415),
+(26419),
+(26446),
+(26448),
+(26470),
+(26476),
+(26548),
+(26556),
+(26561),
+(26565),
+(26572),
+(26584),
+(26601),
+(26610),
+(26613),
+(26616),
+(26622),
+(26623),
+(26624),
+(26625),
+(26636),
+(26639),
+(26641),
+(26649),
+(26654),
+(26663),
+(26679),
+(26688),
+(26693),
+(26740),
+(26742),
+(26748),
+(26791),
+(26796),
+(26799),
+(26800),
+(26839),
+(26861),
+(26862),
+(26863),
+(26864),
+(26865),
+(26866),
+(26867),
+(26884),
+(26890),
+(26899),
+(26923),
+(26924),
+(26968),
+(26978),
+(26979),
+(26980),
+(26981),
+(26982),
+(26984),
+(26985),
+(26986),
+(26987),
+(26988),
+(26989),
+(26990),
+(26992),
+(26995),
+(26996),
+(27000),
+(27001),
+(27002),
+(27003),
+(27004),
+(27005),
+(27006),
+(27007),
+(27008),
+(27010),
+(27013),
+(27014),
+(27016),
+(27019),
+(27021),
+(27024),
+(27030),
+(27031),
+(27047),
+(27048),
+(27049),
+(27050),
+(27051),
+(27060),
+(27065),
+(27067),
+(27068),
+(27069),
+(27070),
+(27071),
+(27072),
+(27073),
+(27074),
+(27075),
+(27078),
+(27079),
+(27126),
+(27132),
+(27135),
+(27136),
+(27137),
+(27138),
+(27140),
+(27142),
+(27154),
+(27174),
+(27175),
+(27176),
+(27177),
+(27180),
+(27187),
+(27189),
+(27209),
+(27210),
+(27211),
+(27215),
+(27216),
+(27217),
+(27218),
+(27219),
+(27220),
+(27223),
+(27224),
+(27228),
+(27243),
+(27254),
+(27255),
+(27258),
+(27261),
+(27263),
+(27267),
+(27270),
+(27274),
+(27275),
+(27276),
+(27277),
+(27281),
+(27286),
+(27288),
+(27290),
+(27360),
+(27375),
+(27376),
+(27378),
+(27379),
+(27380),
+(27381),
+(27384),
+(27385),
+(27386),
+(27387),
+(27389),
+(27390),
+(27391),
+(27392),
+(27393),
+(27395),
+(27396),
+(27397),
+(27398),
+(27441),
+(27448),
+(27486),
+(27526),
+(27527),
+(27532),
+(27541),
+(27547),
+(27548),
+(27549),
+(27550),
+(27552),
+(27553),
+(27554),
+(27555),
+(27556),
+(27557),
+(27559),
+(27565),
+(27567),
+(27571),
+(27572),
+(27573),
+(27576),
+(27577),
+(27580),
+(27581),
+(27582),
+(27584),
+(27605),
+(27606),
+(27608),
+(27609),
+(27611),
+(27613),
+(27615),
+(27620),
+(27624),
+(27626),
+(27632),
+(27633),
+(27634),
+(27635),
+(27636),
+(27637),
+(27638),
+(27640),
+(27648),
+(27655),
+(27662),
+(27673),
+(27677),
+(27686),
+(27752),
+(27754),
+(27755),
+(27756),
+(27760),
+(27765),
+(27794),
+(27806),
+(27814),
+(27819),
+(27841),
+(27849),
+(27852),
+(27860),
+(27861),
+(27863),
+(27864),
+(27865),
+(27868),
+(27873),
+(27874),
+(27891),
+(27907),
+(27909),
+(27910),
+(27915),
+(27919),
+(27931),
+(27937),
+(27983),
+(27991),
+(27992),
+(27994),
+(27995),
+(28030),
+(28099),
+(28133),
+(28147),
+(28149),
+(28167),
+(28169),
+(28239),
+(28251),
+(28252),
+(28253),
+(28254),
+(28255),
+(28256),
+(28257),
+(28258),
+(28259),
+(28260),
+(28261),
+(28262),
+(28263),
+(28265),
+(28271),
+(28272),
+(28276),
+(28287),
+(28293),
+(28299),
+(28301),
+(28303),
+(28306),
+(28308),
+(28310),
+(28314),
+(28318),
+(28319),
+(28320),
+(28321),
+(28329),
+(28336),
+(28337),
+(28342),
+(28350),
+(28351),
+(28375),
+(28393),
+(28394),
+(28396),
+(28397),
+(28410),
+(28412),
+(28418),
+(28419),
+(28420),
+(28428),
+(28431),
+(28434),
+(28439),
+(28444),
+(28445),
+(28467),
+(28470),
+(28478),
+(28516),
+(28522),
+(28597),
+(28601),
+(28608),
+(28614),
+(28624),
+(28674),
+(28676),
+(28678),
+(28684),
+(28685),
+(28689),
+(28690),
+(28691),
+(28692),
+(28696),
+(28698),
+(28702),
+(28715),
+(28718),
+(28720),
+(28722),
+(28723),
+(28724),
+(28734),
+(28750),
+(28772),
+(28776),
+(28783),
+(28788),
+(28790),
+(28791),
+(28793),
+(28795),
+(28810),
+(28824),
+(28825),
+(28826),
+(28827),
+(28836),
+(28839),
+(28858),
+(28859),
+(28872),
+(28873),
+(28880),
+(28882),
+(28883),
+(28887),
+(28896),
+(28899),
+(28900),
+(28901),
+(28902),
+(28913),
+(28969),
+(28993),
+(29001),
+(29002),
+(29003),
+(29006),
+(29044),
+(29054),
+(29058),
+(29060),
+(29098),
+(29117),
+(29126),
+(29127),
+(29128),
+(29129),
+(29134),
+(29135),
+(29136),
+(29137),
+(29138),
+(29139),
+(29151),
+(29155),
+(29157),
+(29158),
+(29160),
+(29164),
+(29166),
+(29168),
+(29170),
+(29175),
+(29182),
+(29185),
+(29188),
+(29194),
+(29196),
+(29198),
+(29228),
+(29290),
+(29295),
+(29300),
+(29306),
+(29314),
+(29317),
+(29319),
+(29320),
+(29341),
+(29362),
+(29364),
+(29380),
+(29386),
+(29395),
+(29405),
+(29407),
+(29408),
+(29425),
+(29426),
+(29427),
+(29428),
+(29435),
+(29436),
+(29443),
+(29473),
+(29487),
+(29492),
+(29494),
+(29495),
+(29497),
+(29500),
+(29502),
+(29515),
+(29516),
+(29519),
+(29522),
+(29528),
+(29539),
+(29540),
+(29543),
+(29544),
+(29546),
+(29555),
+(29560),
+(29561),
+(29562),
+(29563),
+(29564),
+(29567),
+(29570),
+(29572),
+(29574),
+(29575),
+(29576),
+(29577),
+(29578),
+(29580),
+(29581),
+(29582),
+(29583),
+(29585),
+(29586),
+(29587),
+(29607),
+(29609),
+(29638),
+(29639),
+(29640),
+(29641),
+(29644),
+(29646),
+(29647),
+(29652),
+(29653),
+(29655),
+(29661),
+(29665),
+(29666),
+(29667),
+(29670),
+(29673),
+(29675),
+(29676),
+(29677),
+(29679),
+(29684),
+(29690),
+(29703),
+(29704),
+(29707),
+(29711),
+(29712),
+(29716),
+(29722),
+(29765),
+(29768),
+(29815),
+(29832),
+(29845),
+(29847),
+(29848),
+(29850),
+(29879),
+(29881),
+(29896),
+(29901),
+(29903),
+(29906),
+(29907),
+(29909),
+(29915),
+(29916),
+(29917),
+(29925),
+(29926),
+(29927),
+(29928),
+(29930),
+(29953),
+(29954),
+(29955),
+(29956),
+(29964),
+(29990),
+(29991),
+(30010),
+(30013),
+(30014),
+(30016),
+(30019),
+(30022),
+(30036),
+(30039),
+(30044),
+(30050),
+(30053),
+(30055),
+(30069),
+(30070),
+(30077),
+(30081),
+(30099),
+(30100),
+(30102),
+(30103),
+(30104),
+(30105),
+(30108),
+(30112),
+(30113),
+(30115),
+(30121),
+(30127),
+(30128),
+(30130),
+(30131),
+(30151),
+(30153),
+(30164),
+(30173),
+(30175),
+(30177),
+(30178),
+(30180),
+(30194),
+(30195),
+(30197),
+(30198),
+(30202),
+(30213),
+(30218),
+(30219),
+(30223),
+(30238),
+(30253),
+(30269),
+(30270),
+(30271),
+(30280),
+(30285),
+(30324),
+(30330),
+(30335),
+(30351),
+(30353),
+(30356),
+(30357),
+(30358),
+(30383),
+(30395),
+(30400),
+(30401),
+(30402),
+(30404),
+(30405),
+(30412),
+(30421),
+(30422),
+(30423),
+(30424),
+(30430),
+(30433),
+(30435),
+(30448),
+(30449),
+(30451),
+(30455),
+(30459),
+(30463),
+(30464),
+(30465),
+(30466),
+(30467),
+(30468),
+(30471),
+(30474),
+(30478),
+(30479),
+(30481),
+(30493),
+(30495),
+(30500),
+(30501),
+(30504),
+(30505),
+(30507),
+(30512),
+(30520),
+(30528),
+(30530),
+(30545),
+(30546),
+(30601),
+(30605),
+(30606),
+(30607),
+(30608),
+(30609),
+(30614),
+(30615),
+(30619),
+(30621),
+(30637),
+(30638),
+(30639),
+(30641),
+(30643),
+(30646),
+(30647),
+(30648),
+(30651),
+(30652),
+(30653),
+(30654),
+(30661),
+(30686),
+(30687),
+(30688),
+(30689),
+(30691),
+(30695),
+(30719),
+(30736),
+(30740),
+(30751),
+(30753),
+(30755),
+(30756),
+(30768),
+(30817),
+(30822),
+(30830),
+(30832),
+(30838),
+(30839),
+(30846),
+(30849),
+(30850),
+(30854),
+(30875),
+(30876),
+(30877),
+(30878),
+(30888),
+(30889),
+(30890),
+(30900),
+(30901),
+(30909),
+(30910),
+(30923),
+(30926),
+(30932),
+(30936),
+(30937),
+(30942),
+(30943),
+(30944),
+(30945),
+(30967),
+(30971),
+(30977),
+(30980),
+(30981),
+(30984),
+(30986),
+(30989),
+(30990),
+(30992),
+(31008),
+(31009),
+(31012),
+(31015),
+(31016),
+(31018),
+(31022),
+(31041),
+(31042),
+(31043),
+(31046),
+(31069),
+(31117),
+(31125),
+(31139),
+(31249),
+(31257),
+(31262),
+(31263),
+(31270),
+(31271),
+(31272),
+(31274),
+(31275),
+(31279),
+(31280),
+(31281),
+(31282),
+(31284),
+(31286),
+(31287),
+(31288),
+(31289),
+(31290),
+(31292),
+(31295),
+(31296),
+(31305),
+(31306),
+(31312),
+(31316),
+(31319),
+(31330),
+(31334),
+(31337),
+(31339),
+(31345),
+(31366),
+(31367),
+(31368),
+(31376),
+(31378),
+(31381),
+(31387),
+(31389),
+(31390),
+(31394),
+(31397),
+(31399),
+(31400),
+(31401),
+(31402),
+(31404),
+(31405),
+(31406),
+(31407),
+(31410),
+(31415),
+(31416),
+(31417),
+(31418),
+(31419),
+(31420),
+(31423),
+(31425),
+(31426),
+(31427),
+(31436),
+(31445),
+(31446),
+(31457),
+(31464),
+(31477),
+(31481),
+(31486),
+(31513),
+(31516),
+(31535),
+(31547),
+(31551),
+(31552),
+(31553),
+(31566),
+(31589),
+(31595),
+(31596),
+(31600),
+(31601),
+(31602),
+(31604),
+(31609),
+(31610),
+(31618),
+(31620),
+(31622),
+(31623),
+(31626),
+(31627),
+(31629),
+(31651),
+(31662),
+(31664),
+(31703),
+(31705),
+(31707),
+(31709),
+(31713),
+(31715),
+(31717),
+(31718),
+(31721),
+(31724),
+(31729),
+(31733),
+(31734),
+(31739),
+(31740),
+(31741),
+(31742),
+(31743),
+(31747),
+(31751),
+(31754),
+(31758),
+(31759),
+(31764),
+(31766),
+(31772),
+(31779),
+(31782),
+(31784),
+(31789),
+(31790),
+(31803),
+(31804),
+(31807),
+(31808),
+(31810),
+(31811),
+(31812),
+(31813),
+(31814),
+(31815),
+(31816),
+(31819),
+(31827),
+(31843),
+(31863),
+(31864),
+(31865),
+(31893),
+(31898),
+(31907),
+(31911),
+(31916),
+(31923),
+(31935),
+(31939),
+(31942),
+(31946),
+(31948),
+(31955),
+(31956),
+(31961),
+(31965),
+(31966),
+(31971),
+(31972),
+(31973),
+(31975),
+(31976),
+(31977),
+(31978),
+(31984),
+(31988),
+(31994),
+(31996),
+(31999),
+(32000),
+(32001),
+(32002),
+(32004),
+(32005),
+(32006),
+(32009),
+(32010),
+(32011),
+(32012),
+(32013),
+(32015),
+(32017),
+(32018),
+(32019),
+(32020),
+(32021),
+(32022),
+(32024),
+(32025),
+(32026),
+(32039),
+(32049),
+(32055),
+(32056),
+(32063),
+(32065),
+(32071),
+(32076),
+(32077),
+(32080),
+(32082),
+(32092),
+(32093),
+(32094),
+(32095),
+(32103),
+(32104),
+(32105),
+(32110),
+(32120),
+(32125),
+(32126),
+(32129),
+(32131),
+(32132),
+(32133),
+(32139),
+(32154),
+(32168),
+(32175),
+(32176),
+(32190),
+(32197),
+(32202),
+(32211),
+(32224),
+(32231),
+(32247),
+(32248),
+(32261),
+(32268),
+(32270),
+(32300),
+(32306),
+(32315),
+(32317),
+(32319),
+(32320),
+(32321),
+(32323),
+(32325),
+(32328),
+(32329),
+(32330),
+(32337),
+(32338),
+(32346),
+(32361),
+(32363),
+(32364),
+(32369),
+(32370),
+(32376),
+(32378),
+(32379),
+(32386),
+(32388),
+(32389),
+(32390),
+(32391),
+(32405),
+(32414),
+(32415),
+(32416),
+(32417),
+(32418),
+(32422),
+(32428),
+(32430),
+(32431),
+(32441),
+(32445),
+(32474),
+(32491),
+(32546),
+(32550),
+(32578),
+(32583),
+(32588),
+(32593),
+(32594),
+(32595),
+(32605),
+(32606),
+(32639),
+(32643),
+(32645),
+(32652),
+(32654),
+(32666),
+(32674),
+(32675),
+(32677),
+(32678),
+(32679),
+(32682),
+(32683),
+(32684),
+(32689),
+(32690),
+(32691),
+(32693),
+(32699),
+(32700),
+(32707),
+(32709),
+(32716),
+(32721),
+(32733),
+(32734),
+(32735),
+(32736),
+(32738),
+(32739),
+(32740),
+(32741),
+(32742),
+(32747),
+(32748),
+(32749),
+(32751),
+(32752),
+(32759),
+(32769),
+(32770),
+(32771),
+(32772),
+(32774),
+(32778),
+(32779),
+(32784),
+(32797),
+(32829),
+(32830),
+(32831),
+(32835),
+(32846),
+(32858),
+(32860),
+(32862),
+(32863),
+(32864),
+(32889),
+(32897),
+(32901),
+(32902),
+(32903),
+(32904),
+(32905),
+(32906),
+(32907),
+(32908),
+(32909),
+(32913),
+(32915),
+(32916),
+(32917),
+(32919),
+(32921),
+(32922),
+(32924),
+(32926),
+(32935),
+(32940),
+(32950),
+(32959),
+(32960),
+(32962),
+(32967),
+(32969),
+(32971),
+(32984),
+(32996),
+(33031),
+(33040),
+(33044),
+(33045),
+(33047),
+(33049),
+(33051),
+(33055),
+(33056),
+(33068),
+(33069),
+(33072),
+(33073),
+(33074),
+(33077),
+(33078),
+(33079),
+(33080),
+(33081),
+(33082),
+(33086),
+(33096),
+(33098),
+(33126),
+(33129),
+(33130),
+(33144),
+(33173),
+(33175),
+(33196),
+(33197),
+(33198),
+(33206),
+(33227),
+(33230),
+(33246),
+(33247),
+(33324),
+(33326),
+(33331),
+(33335),
+(33346),
+(33360),
+(33382),
+(33383),
+(33385),
+(33387),
+(33389),
+(33392),
+(33401),
+(33404),
+(33417),
+(33419),
+(33462),
+(33463),
+(33480),
+(33482),
+(33483),
+(33487),
+(33493),
+(33502),
+(33526),
+(33527),
+(33528),
+(33529),
+(33534),
+(33535),
+(33542),
+(33552),
+(33553),
+(33554),
+(33619),
+(33620),
+(33625),
+(33626),
+(33628),
+(33631),
+(33632),
+(33640),
+(33641),
+(33643),
+(33659),
+(33661),
+(33665),
+(33684),
+(33688),
+(33689),
+(33698),
+(33699),
+(33700),
+(33709),
+(33723),
+(33728),
+(33731),
+(33745),
+(33750),
+(33763),
+(33768),
+(33781),
+(33786),
+(33787),
+(33789),
+(33792),
+(33793),
+(33794),
+(33813),
+(33824),
+(33825),
+(33827),
+(33832),
+(33833),
+(33837),
+(33844),
+(33849),
+(33850),
+(33865),
+(33871),
+(33876),
+(33878),
+(33899),
+(33907),
+(33910),
+(33911),
+(33912),
+(33913),
+(33914),
+(33925),
+(33938),
+(33947),
+(33951),
+(33960),
+(33964),
+(33969),
+(33970),
+(33975),
+(33982),
+(33983),
+(33985),
+(33986),
+(33987),
+(33988),
+(33989),
+(34014),
+(34020),
+(34025),
+(34036),
+(34071),
+(34073),
+(34083),
+(34087),
+(34088),
+(34089),
+(34092),
+(34093),
+(34095),
+(34097),
+(34099),
+(34107),
+(34108),
+(34110),
+(34112),
+(34113),
+(34120),
+(34130),
+(34132),
+(34135),
+(34138),
+(34139),
+(34143),
+(34149),
+(34150),
+(34163),
+(34171),
+(34172),
+(34176),
+(34177),
+(34213),
+(34214),
+(34215),
+(34216),
+(34217),
+(34218),
+(34219),
+(34232),
+(34243),
+(34259),
+(34298),
+(34344),
+(34345),
+(34346),
+(34347),
+(34348),
+(34351),
+(34352),
+(34353),
+(34354),
+(34357),
+(34361),
+(34363),
+(34366),
+(34370),
+(34379),
+(34389),
+(34390),
+(34391),
+(34394),
+(34400),
+(34411),
+(34412),
+(34413),
+(34414),
+(34415),
+(34416),
+(34417),
+(34418),
+(34419),
+(34423),
+(34425),
+(34428),
+(34432),
+(34437),
+(34438),
+(34439),
+(34445),
+(34446),
+(34447),
+(34451),
+(34463),
+(34490),
+(34510),
+(34520),
+(34578),
+(34580),
+(34587),
+(34613),
+(34614),
+(34615),
+(34616),
+(34618),
+(34620),
+(34625),
+(34626),
+(34629),
+(34637),
+(34639),
+(34640),
+(34641),
+(34643),
+(34644),
+(34645),
+(34650),
+(34653),
+(34654),
+(34655),
+(34661),
+(34665),
+(34672),
+(34694),
+(34695),
+(34696),
+(34697),
+(34709),
+(34714),
+(34715),
+(34719),
+(34722),
+(34745),
+(34752),
+(34784),
+(34786),
+(34787),
+(34788),
+(34789),
+(34793),
+(34794),
+(34797),
+(34798),
+(34799),
+(34800),
+(34802),
+(34809),
+(34811),
+(34812),
+(34820),
+(34824),
+(34828),
+(34829),
+(34841),
+(34852),
+(34856),
+(34875),
+(34879),
+(34881),
+(34883),
+(34886),
+(34889),
+(34891),
+(34893),
+(34906),
+(34907),
+(34913),
+(34914),
+(34916),
+(34917),
+(34920),
+(34922),
+(34924),
+(34925),
+(34930),
+(34931),
+(34940),
+(34941),
+(34942),
+(34945),
+(34969),
+(34974),
+(34975),
+(34976),
+(34984),
+(34996),
+(35004),
+(35010),
+(35011),
+(35012),
+(35013),
+(35033),
+(35034),
+(35039),
+(35047),
+(35049),
+(35054),
+(35055),
+(35056),
+(35062),
+(35065),
+(35066),
+(35067),
+(35069),
+(35071),
+(35072),
+(35088),
+(35089),
+(35092),
+(35096),
+(35101),
+(35105),
+(35106),
+(35107),
+(35112),
+(35115),
+(35117),
+(35120),
+(35144),
+(35147),
+(35161),
+(35178),
+(35179),
+(35180),
+(35182),
+(35183),
+(35185),
+(35189),
+(35195),
+(35201),
+(35207),
+(35229),
+(35231),
+(35234),
+(35238),
+(35243),
+(35244),
+(35263),
+(35267),
+(35273),
+(35280),
+(35290),
+(35291),
+(35292),
+(35293),
+(35294),
+(35295),
+(35313),
+(35314),
+(35316),
+(35317),
+(35318),
+(35321),
+(35323),
+(35325),
+(35326),
+(35328),
+(35329),
+(35331),
+(35332),
+(35333),
+(35334),
+(35335),
+(35339),
+(35346),
+(35353),
+(35371),
+(35376),
+(35377),
+(35382),
+(35387),
+(35389),
+(35392),
+(35395),
+(35401),
+(35410),
+(35412),
+(35424),
+(35460),
+(35466),
+(35472),
+(35473),
+(35493),
+(35499),
+(35501),
+(35506),
+(35507),
+(35510),
+(35511),
+(35514),
+(35518),
+(35519),
+(35556),
+(35570),
+(35621),
+(35686),
+(35718),
+(35727),
+(35728),
+(35735),
+(35741),
+(35742),
+(35748),
+(35759),
+(35760),
+(35771),
+(35772),
+(35780),
+(35783),
+(35839),
+(35846),
+(35851),
+(35853),
+(35857),
+(35871),
+(35873),
+(35877),
+(35913),
+(35914),
+(35916),
+(35918),
+(35919),
+(35920),
+(35927),
+(35928),
+(35932),
+(35944),
+(35945),
+(35946),
+(35949),
+(35954),
+(35955),
+(35963),
+(35964),
+(35965),
+(35966),
+(35967),
+(35968),
+(35969),
+(35970),
+(35971),
+(35972),
+(35973),
+(35974),
+(35975),
+(35976),
+(35977),
+(35978),
+(35979),
+(35980),
+(35981),
+(35982),
+(35983),
+(35984),
+(35985),
+(35986),
+(35987),
+(35988),
+(35989),
+(35990),
+(35997),
+(35998),
+(35999),
+(36002),
+(36020),
+(36021),
+(36023),
+(36025),
+(36033),
+(36052),
+(36054),
+(36073),
+(36088),
+(36093),
+(36094),
+(36095),
+(36099),
+(36100),
+(36102),
+(36115),
+(36123),
+(36138),
+(36140),
+(36141),
+(36145),
+(36152),
+(36153),
+(36170),
+(36173),
+(36176),
+(36181),
+(36207),
+(36208),
+(36224),
+(36227),
+(36228),
+(36237),
+(36238),
+(36246),
+(36247),
+(36250),
+(36276),
+(36277),
+(36279),
+(36288),
+(36295),
+(36296),
+(36299),
+(36310),
+(36312),
+(36314),
+(36328),
+(36332),
+(36333),
+(36339),
+(36340),
+(36341),
+(36342),
+(36343),
+(36344),
+(36345),
+(36348),
+(36380),
+(36398),
+(36399),
+(36401),
+(36402),
+(36404),
+(36414),
+(36415),
+(36416),
+(36417),
+(36433),
+(36434),
+(36435),
+(36436),
+(36438),
+(36439),
+(36441),
+(36447),
+(36448),
+(36457),
+(36458),
+(36461),
+(36464),
+(36469),
+(36470),
+(36475),
+(36478),
+(36482),
+(36483),
+(36488),
+(36500),
+(36507),
+(36508),
+(36509),
+(36516),
+(36517),
+(36518),
+(36527),
+(36534),
+(36536),
+(36538),
+(36539),
+(36540),
+(36541),
+(36554),
+(36558),
+(36570),
+(36571),
+(36578),
+(36586),
+(36590),
+(36594),
+(36601),
+(36604),
+(36606),
+(36608),
+(36609),
+(36612),
+(36622),
+(36623),
+(36624),
+(36625),
+(36627),
+(36628),
+(36632),
+(36638),
+(36641),
+(36642),
+(36645),
+(36646),
+(36647),
+(36650),
+(36655),
+(36656),
+(36659),
+(36664),
+(36671),
+(36677),
+(36678),
+(36679),
+(36710),
+(36711),
+(36712),
+(36713),
+(36714),
+(36732),
+(36739),
+(36778),
+(36779),
+(36780),
+(36781),
+(36787),
+(36789),
+(36791),
+(36796),
+(36801),
+(36805),
+(36806),
+(36807),
+(36810),
+(36812),
+(36814),
+(36822),
+(36825),
+(36831),
+(36832),
+(36833),
+(36836),
+(36838),
+(36839),
+(36840),
+(36841),
+(36842),
+(36843),
+(36844),
+(36863),
+(36864),
+(36866),
+(36872),
+(36876),
+(36877),
+(36886),
+(36891),
+(36894),
+(36905),
+(36906),
+(36909),
+(36913),
+(36914),
+(36916),
+(36917),
+(36919),
+(36920),
+(36921),
+(36924),
+(36927),
+(36929),
+(36947),
+(36956),
+(36957),
+(36965),
+(36966),
+(36971),
+(36972),
+(36974),
+(36979),
+(36980),
+(36983),
+(36984),
+(36986),
+(36987),
+(36988),
+(36990),
+(36991),
+(37027),
+(37028),
+(37030),
+(37031),
+(37054),
+(37057),
+(37067),
+(37073),
+(37074),
+(37082),
+(37089),
+(37104),
+(37110),
+(37111),
+(37112),
+(37113),
+(37121),
+(37122),
+(37123),
+(37126),
+(37132),
+(37133),
+(37136),
+(37138),
+(37154),
+(37156),
+(37162),
+(37176),
+(37208),
+(37216),
+(37221),
+(37249),
+(37250),
+(37251),
+(37252),
+(37254),
+(37255),
+(37257),
+(37259),
+(37260),
+(37271),
+(37272),
+(37273),
+(37274),
+(37275),
+(37276),
+(37277),
+(37320),
+(37321),
+(37322),
+(37323),
+(37328),
+(37329),
+(37330),
+(37331),
+(37332),
+(37334),
+(37335),
+(37359),
+(37361),
+(37369),
+(37372),
+(37387),
+(37389),
+(37412),
+(37417),
+(37421),
+(37450),
+(37455),
+(37456),
+(37460),
+(37462),
+(37463),
+(37470),
+(37479),
+(37486),
+(37500),
+(37506),
+(37511),
+(37527),
+(37532),
+(37537),
+(37540),
+(37548),
+(37551),
+(37552),
+(37554),
+(37563),
+(37566),
+(37572),
+(37577),
+(37578),
+(37579),
+(37580),
+(37581),
+(37589),
+(37591),
+(37592),
+(37596),
+(37597),
+(37599),
+(37602),
+(37621),
+(37628),
+(37629),
+(37630),
+(37632),
+(37634),
+(37646),
+(37647),
+(37654),
+(37661),
+(37662),
+(37664),
+(37667),
+(37668),
+(37675),
+(37681),
+(37685),
+(37695),
+(37700),
+(37711),
+(37717),
+(37718),
+(37719),
+(37727),
+(37749),
+(37770),
+(37777),
+(37778),
+(37798),
+(37800),
+(37801),
+(37802),
+(37803),
+(37804),
+(37805),
+(37806),
+(37807),
+(37808),
+(37809),
+(37810),
+(37811),
+(37813),
+(37823),
+(37834),
+(37838),
+(37839),
+(37840),
+(37841),
+(37847),
+(37850),
+(37851),
+(37856),
+(37862),
+(37865),
+(37867),
+(37871),
+(37892),
+(37894),
+(37906),
+(37908),
+(37910),
+(37921),
+(37922),
+(37930),
+(37933),
+(37937),
+(37940),
+(37945),
+(37946),
+(37950),
+(37956),
+(37958),
+(37962),
+(37965),
+(37967),
+(37968),
+(37972),
+(37973),
+(37974),
+(37975),
+(37978),
+(37979),
+(37986),
+(37988),
+(37992),
+(37998),
+(38002),
+(38007),
+(38009),
+(38010),
+(38023),
+(38024),
+(38025),
+(38027),
+(38029),
+(38030),
+(38032),
+(38034),
+(38035),
+(38047),
+(38048),
+(38051),
+(38052),
+(38053),
+(38056),
+(38058),
+(38059),
+(38063),
+(38065),
+(38066),
+(38067),
+(38074),
+(38075),
+(38076),
+(38078),
+(38083),
+(38084),
+(38085),
+(38093),
+(38094),
+(38095),
+(38107),
+(38109),
+(38113),
+(38120),
+(38122),
+(38125),
+(38127),
+(38129),
+(38133),
+(38134),
+(38135),
+(38136),
+(38145),
+(38146),
+(38147),
+(38148),
+(38149),
+(38153),
+(38154),
+(38155),
+(38167),
+(38177),
+(38178),
+(38182),
+(38183),
+(38187),
+(38193),
+(38203),
+(38204),
+(38205),
+(38208),
+(38209),
+(38210),
+(38213),
+(38223),
+(38226),
+(38233),
+(38234),
+(38238),
+(38239),
+(38240),
+(38243),
+(38245),
+(38246),
+(38252),
+(38253),
+(38254),
+(38259),
+(38260),
+(38262),
+(38263),
+(38264),
+(38265),
+(38267),
+(38274),
+(38275),
+(38276),
+(38277),
+(38279),
+(38280),
+(38285),
+(38295),
+(38310),
+(38313),
+(38324),
+(38328),
+(38329),
+(38330),
+(38333),
+(38338),
+(38340),
+(38342),
+(38344),
+(38363),
+(38366),
+(38370),
+(38372),
+(38374),
+(38377),
+(38378),
+(38383),
+(38386),
+(38387),
+(38391),
+(38400),
+(38401),
+(38441),
+(38446),
+(38461),
+(38465),
+(38470),
+(38474),
+(38495),
+(38496),
+(38505),
+(38509),
+(38510),
+(38520),
+(38523),
+(38526),
+(38534),
+(38535),
+(38538),
+(38543),
+(38554),
+(38556),
+(38557),
+(38558),
+(38559),
+(38560),
+(38561),
+(38562),
+(38563),
+(38564),
+(38565),
+(38566),
+(38567),
+(38568),
+(38569),
+(38570),
+(38572),
+(38580),
+(38582),
+(38584),
+(38585),
+(38586),
+(38588),
+(38591),
+(38595),
+(38598),
+(38606),
+(38616),
+(38617),
+(38621),
+(38625),
+(38626),
+(38628),
+(38630),
+(38631),
+(38634),
+(38636),
+(38641),
+(38643),
+(38645),
+(38657),
+(38658),
+(38661),
+(38663),
+(38669),
+(38692),
+(38697),
+(38699),
+(38704),
+(38708),
+(38721),
+(38723),
+(38731),
+(38739),
+(38742),
+(38753),
+(38760),
+(38762),
+(38764),
+(38765),
+(38767),
+(38768),
+(38770),
+(38772),
+(38775),
+(38777),
+(38791),
+(38797),
+(38798),
+(38801),
+(38804),
+(38806),
+(38807),
+(38808),
+(38815),
+(38816),
+(38817),
+(38821),
+(38822),
+(38823),
+(38824),
+(38825),
+(38826),
+(38827),
+(38846),
+(38848),
+(38849),
+(38851),
+(38852),
+(38858),
+(38859),
+(38861),
+(38863),
+(38864),
+(38875),
+(38879),
+(38880),
+(38881),
+(38882),
+(38883),
+(38884),
+(38887),
+(38894),
+(38895),
+(38896),
+(38897),
+(38899),
+(38904),
+(38907),
+(38909),
+(38913),
+(38914),
+(38915),
+(38918),
+(38919),
+(38921),
+(38923),
+(38926),
+(38930),
+(38935),
+(38940),
+(38941),
+(38942),
+(38943),
+(38945),
+(38946),
+(38950),
+(38952),
+(38959),
+(38967),
+(38971),
+(38985),
+(38986),
+(38987),
+(38988),
+(38989),
+(38990),
+(38992),
+(38995),
+(39000),
+(39002),
+(39006),
+(39009),
+(39015),
+(39016),
+(39017),
+(39019),
+(39020),
+(39021),
+(39022),
+(39023),
+(39025),
+(39026),
+(39029),
+(39032),
+(39039),
+(39044),
+(39046),
+(39047),
+(39053),
+(39054),
+(39058),
+(39060),
+(39061),
+(39062),
+(39064),
+(39065),
+(39066),
+(39068),
+(39069),
+(39070),
+(39076),
+(39077),
+(39078),
+(39079),
+(39083),
+(39087),
+(39097),
+(39098),
+(39099),
+(39101),
+(39116),
+(39119),
+(39120),
+(39121),
+(39122),
+(39123),
+(39125),
+(39129),
+(39135),
+(39136),
+(39145),
+(39153),
+(39157),
+(39159),
+(39160),
+(39164),
+(39165),
+(39171),
+(39172),
+(39174),
+(39176),
+(39182),
+(39192),
+(39196),
+(39197),
+(39198),
+(39202),
+(39204),
+(39207),
+(39210),
+(39212),
+(39214),
+(39215),
+(39226),
+(39229),
+(39230),
+(39252),
+(39258),
+(39262),
+(39267),
+(39268),
+(39270),
+(39271),
+(39285),
+(39293),
+(39297),
+(39299),
+(39309),
+(39322),
+(39328),
+(39329),
+(39332),
+(39337),
+(39339),
+(39349),
+(39367),
+(39371),
+(39378),
+(39386),
+(39396),
+(39412),
+(39413),
+(39415),
+(39419),
+(39435),
+(39436),
+(39445),
+(39449),
+(39456),
+(39457),
+(39460),
+(39474),
+(39475),
+(39476),
+(39477),
+(39512),
+(39513),
+(39528),
+(39529),
+(39544),
+(39560),
+(39566),
+(39574),
+(39582),
+(39587),
+(39590),
+(39592),
+(39595),
+(39600),
+(39609),
+(39621),
+(39622),
+(39661),
+(39665),
+(39668),
+(39669),
+(39670),
+(39674),
+(39675),
+(39676),
+(39697),
+(39703),
+(39794),
+(39796),
+(39810),
+(39812),
+(39826),
+(39830),
+(39835),
+(39837),
+(39838),
+(39857),
+(39865),
+(39883),
+(39886),
+(39901),
+(39904),
+(39908),
+(39920),
+(39928),
+(39945),
+(39948),
+(39955),
+(39956),
+(39967),
+(39972),
+(39979),
+(39980),
+(39995),
+(39996),
+(40011),
+(40019),
+(40032),
+(40041),
+(40055),
+(40057),
+(40063),
+(40066),
+(40071),
+(40074),
+(40081),
+(40084),
+(40086),
+(40097),
+(40099),
+(40102),
+(40109),
+(40119),
+(40123),
+(40124),
+(40146),
+(40157),
+(40165),
+(40166),
+(40167),
+(40173),
+(40185),
+(40191),
+(40193),
+(40197),
+(40198),
+(40199),
+(40220),
+(40225),
+(40227),
+(40228),
+(40239),
+(40248),
+(40251),
+(40254),
+(40259),
+(40279),
+(40290),
+(40293),
+(40303),
+(40310),
+(40311),
+(40312),
+(40313),
+(40317),
+(40321),
+(40322),
+(40325),
+(40327),
+(40334),
+(40337),
+(40339),
+(40344),
+(40346),
+(40347),
+(40348),
+(40351),
+(40356),
+(40357),
+(40358),
+(40363),
+(40366),
+(40367),
+(40368),
+(40384),
+(40385),
+(40392),
+(40400),
+(40406),
+(40411),
+(40412),
+(40413),
+(40414),
+(40415),
+(40416),
+(40420),
+(40423),
+(40427),
+(40429),
+(40430),
+(40431),
+(40434),
+(40449),
+(40450),
+(40471),
+(40472),
+(40481),
+(40486),
+(40489),
+(40491),
+(40493),
+(40497),
+(40504),
+(40505),
+(40507),
+(40508),
+(40509),
+(40525),
+(40536),
+(40542),
+(40554),
+(40560),
+(40563),
+(40564),
+(40565),
+(40569),
+(40571),
+(40581),
+(40585),
+(40595),
+(40597),
+(40602),
+(40604),
+(40605),
+(40608),
+(40616),
+(40620),
+(40633),
+(40635),
+(40639),
+(40641),
+(40643),
+(40645),
+(40646),
+(40651),
+(40652),
+(40671),
+(40672),
+(40685),
+(40726),
+(40728),
+(40736),
+(40739),
+(40740),
+(40742),
+(40751),
+(40758),
+(40770),
+(40772),
+(40777),
+(40778),
+(40787),
+(40796),
+(40801),
+(40810),
+(40814),
+(40822),
+(40827),
+(40835),
+(40837),
+(40838),
+(40842),
+(40843),
+(40844),
+(40846),
+(40856),
+(40859),
+(40860),
+(40861),
+(40864),
+(40872),
+(40873),
+(40876),
+(40877),
+(40881),
+(40886),
+(40888),
+(40890),
+(40892),
+(40893),
+(40894),
+(40895),
+(40901),
+(40903),
+(40906),
+(40909),
+(40917),
+(40926),
+(40928),
+(40930),
+(40935),
+(40945),
+(40951),
+(40954),
+(40958),
+(40964),
+(40965),
+(40968),
+(40969),
+(40970),
+(40972),
+(40976),
+(40991),
+(41001),
+(41003),
+(41028),
+(41029),
+(41032),
+(41035),
+(41044),
+(41047),
+(41050),
+(41052),
+(41054),
+(41055),
+(41060),
+(41063),
+(41065),
+(41069),
+(41070),
+(41072),
+(41075),
+(41080),
+(41082),
+(41083),
+(41084),
+(41092),
+(41093),
+(41103),
+(41109),
+(41115),
+(41116),
+(41121),
+(41137),
+(41139),
+(41152),
+(41169),
+(41170),
+(41171),
+(41177),
+(41178),
+(41179),
+(41180),
+(41182),
+(41183),
+(41184),
+(41186),
+(41187),
+(41188),
+(41189),
+(41190),
+(41192),
+(41197),
+(41198),
+(41213),
+(41214),
+(41225),
+(41226),
+(41227),
+(41228),
+(41229),
+(41230),
+(41231),
+(41238),
+(41241),
+(41247),
+(41250),
+(41255),
+(41256),
+(41259),
+(41264),
+(41265),
+(41270),
+(41272),
+(41278),
+(41279),
+(41280),
+(41281),
+(41283),
+(41291),
+(41299),
+(41302),
+(41332),
+(41334),
+(41335),
+(41336),
+(41338),
+(41345),
+(41346),
+(41351),
+(41352),
+(41353),
+(41355),
+(41360),
+(41363),
+(41368),
+(41370),
+(41372),
+(41373),
+(41374),
+(41375),
+(41377),
+(41378),
+(41383),
+(41384),
+(41388),
+(41389),
+(41390),
+(41392),
+(41394),
+(41395),
+(41396),
+(41407),
+(41410),
+(41411),
+(41419),
+(41421),
+(41426),
+(41439),
+(41440),
+(41442),
+(41448),
+(41450),
+(41451),
+(41456),
+(41461),
+(41467),
+(41468),
+(41470),
+(41471),
+(41472),
+(41473),
+(41483),
+(41484),
+(41485),
+(41486),
+(41487),
+(41489),
+(41490),
+(41491),
+(41492),
+(41519),
+(41526),
+(41528),
+(41533),
+(41540),
+(41543),
+(41544),
+(41546),
+(41547),
+(41548),
+(41549),
+(41558),
+(41559),
+(41563),
+(41564),
+(41565),
+(41567),
+(41568),
+(41571),
+(41578),
+(41579),
+(41580),
+(41581),
+(41586),
+(41588),
+(41592),
+(41596),
+(41597),
+(41598),
+(41601),
+(41621),
+(41622),
+(41625),
+(41626),
+(41633),
+(41637),
+(41911),
+(41914),
+(41916),
+(41917),
+(41926),
+(41931),
+(41932),
+(41933),
+(41936),
+(41937),
+(41939),
+(41940),
+(41957),
+(41958),
+(41959),
+(41960),
+(41961),
+(41964),
+(41965),
+(41978),
+(41980),
+(41984),
+(41985),
+(41990),
+(42002),
+(42003),
+(42013),
+(42018),
+(42020),
+(42021),
+(42024),
+(42025),
+(42053),
+(42058),
+(42129),
+(42131),
+(42132),
+(42133),
+(42139),
+(42142),
+(42144),
+(42149),
+(42150),
+(42152),
+(42161),
+(42165),
+(42169),
+(42185),
+(42203),
+(42246),
+(42299),
+(42313),
+(42315),
+(42319),
+(42320),
+(42322),
+(42324),
+(42325),
+(42326),
+(42328),
+(42329),
+(42330),
+(42331),
+(42332),
+(42333),
+(42337),
+(42349),
+(42360),
+(42363),
+(42368),
+(42369),
+(42370),
+(42371),
+(42372),
+(42380),
+(42382),
+(42383),
+(42384),
+(42385),
+(42389),
+(42395),
+(42396),
+(42397),
+(42399),
+(42400),
+(42401),
+(42402),
+(42411),
+(42414),
+(42426),
+(42434),
+(42435),
+(42441),
+(42443),
+(42447),
+(42455),
+(42463),
+(42476),
+(42483),
+(42485),
+(42486),
+(42488),
+(42489),
+(42502),
+(42512),
+(42514),
+(42516),
+(42518),
+(42535),
+(42537),
+(42540),
+(42560),
+(42561),
+(42574),
+(42579),
+(42580),
+(42583),
+(42587),
+(42611),
+(42628),
+(42632),
+(42633),
+(42634),
+(42635),
+(42653),
+(42658),
+(42670),
+(42671),
+(42672),
+(42696),
+(42702),
+(42710),
+(42711),
+(42717),
+(42719),
+(42721),
+(42724),
+(42725),
+(42730),
+(42733),
+(42739),
+(42740),
+(42741),
+(42746),
+(42747),
+(42756),
+(42762),
+(42767),
+(42772),
+(42780),
+(42781),
+(42782),
+(42783),
+(42785),
+(42789),
+(42790),
+(42791),
+(42793),
+(42799),
+(42802),
+(42803),
+(42804),
+(42811),
+(42826),
+(42832),
+(42833),
+(42834),
+(42841),
+(42842),
+(42843),
+(42846),
+(42853),
+(42858),
+(42859),
+(42867),
+(42869),
+(42870),
+(42872),
+(42873),
+(42878),
+(42879),
+(42880),
+(42889),
+(42890),
+(42891),
+(42894),
+(42895),
+(42896),
+(42897),
+(42902),
+(42903),
+(42904),
+(42907),
+(42908),
+(42913),
+(42914),
+(42953),
+(42964),
+(42972),
+(42978),
+(42995),
+(42999),
+(43003),
+(43004),
+(43006),
+(43036),
+(43037),
+(43043),
+(43044),
+(43058),
+(43061),
+(43063),
+(43064),
+(43065),
+(43067),
+(43075),
+(43077),
+(43083),
+(43084),
+(43086),
+(43087),
+(43090),
+(43093),
+(43094),
+(43097),
+(43100),
+(43103),
+(43104),
+(43107),
+(43108),
+(43122),
+(43123),
+(43125),
+(43128),
+(43130),
+(43131),
+(43132),
+(43133),
+(43137),
+(43138),
+(43140),
+(43150),
+(43151),
+(43153),
+(43156),
+(43157),
+(43159),
+(43178),
+(43187),
+(43191),
+(43192),
+(43193),
+(43194),
+(43195),
+(43196),
+(43197),
+(43198),
+(43199),
+(43202),
+(43205),
+(43206),
+(43225),
+(43228),
+(43235),
+(43243),
+(43245),
+(43246),
+(43256),
+(43259),
+(43260),
+(43261),
+(43262),
+(43267),
+(43268),
+(43270),
+(43273),
+(43286),
+(43287),
+(43288),
+(43292),
+(43297),
+(43298),
+(43299),
+(43300),
+(43301),
+(43303),
+(43305),
+(43309),
+(43315),
+(43325),
+(43330),
+(43334),
+(43337),
+(43340),
+(43341),
+(43345),
+(43346),
+(43347),
+(43348),
+(43352),
+(43353),
+(43354),
+(43356),
+(43357),
+(43358),
+(43359),
+(43361),
+(43362),
+(43364),
+(43365),
+(43368),
+(43370),
+(43379),
+(43380),
+(43381),
+(43384),
+(43393),
+(43398),
+(43399),
+(43409),
+(43410),
+(43411),
+(43413),
+(43415),
+(43416),
+(43417),
+(43419),
+(43427),
+(43428),
+(43433),
+(43435),
+(43439),
+(43441),
+(43445),
+(43451),
+(43456),
+(43461),
+(43469),
+(43470),
+(43471),
+(43472),
+(43473),
+(43474),
+(43475),
+(43477),
+(43483),
+(43484),
+(43488),
+(43489),
+(43492),
+(43495),
+(43496),
+(43497),
+(43501),
+(43505),
+(43507),
+(43511),
+(43512),
+(43515),
+(43516),
+(43517),
+(43518),
+(43519),
+(43520),
+(43522),
+(43523),
+(43524),
+(43525),
+(43526),
+(43528),
+(43529),
+(43532),
+(43535),
+(43543),
+(43545),
+(43553),
+(43556),
+(43560),
+(43564),
+(43565),
+(43567),
+(43569),
+(43571),
+(43572),
+(43574),
+(43575),
+(43577),
+(43578),
+(43579),
+(43581),
+(43584),
+(43585),
+(43586),
+(43591),
+(43592),
+(43593),
+(43612),
+(43613),
+(43619),
+(43621),
+(43622),
+(43644),
+(43646),
+(43648),
+(43649),
+(43650),
+(43651),
+(43660),
+(43661),
+(43663),
+(43665),
+(43666),
+(43667),
+(43671),
+(43673),
+(43680),
+(43682),
+(43683),
+(43684),
+(43690),
+(43693),
+(43695),
+(43701),
+(43709),
+(43714),
+(43715),
+(43720),
+(43726),
+(43727),
+(43728),
+(43729),
+(43732),
+(43746),
+(43767),
+(43769),
+(43785),
+(43786),
+(43789),
+(43794),
+(43795),
+(43799),
+(43804),
+(43807),
+(43809),
+(43821),
+(43834),
+(43869),
+(43895),
+(43903),
+(43906),
+(43923),
+(43928),
+(43931),
+(43932),
+(43933),
+(43937),
+(43941),
+(43948),
+(43951),
+(43952),
+(43969),
+(43971),
+(43974),
+(43976),
+(43984),
+(43988),
+(43993),
+(43996),
+(43997),
+(44000),
+(44005),
+(44008),
+(44015),
+(44016),
+(44030),
+(44031),
+(44038),
+(44053),
+(44078),
+(44079),
+(44081),
+(44082),
+(44089),
+(44093),
+(44095),
+(44120),
+(44121),
+(44126),
+(44127),
+(44137),
+(44138),
+(44139),
+(44141),
+(44142),
+(44144),
+(44148),
+(44149),
+(44152),
+(44156),
+(44159),
+(44164),
+(44165),
+(44168),
+(44169),
+(44170),
+(44171),
+(44173),
+(44174),
+(44176),
+(44181),
+(44185),
+(44188),
+(44189),
+(44202),
+(44211),
+(44212),
+(44216),
+(44219),
+(44220),
+(44221),
+(44222),
+(44223),
+(44237),
+(44241),
+(44242),
+(44247),
+(44248),
+(44256),
+(44258),
+(44262),
+(44267),
+(44268),
+(44271),
+(44274),
+(44280),
+(44285),
+(44286),
+(44289),
+(44294),
+(44304),
+(44308),
+(44310),
+(44318),
+(44319),
+(44323),
+(44325),
+(44327),
+(44328),
+(44332),
+(44339),
+(44351),
+(44357),
+(44358),
+(44361),
+(44364),
+(44368),
+(44370),
+(44382),
+(44407),
+(44408),
+(44415),
+(44424),
+(44425),
+(44429),
+(44430),
+(44454),
+(44455),
+(44457),
+(44464),
+(44473),
+(44477),
+(44478),
+(44479),
+(44481),
+(44482),
+(44503),
+(44504),
+(44512),
+(44518),
+(44519),
+(44525),
+(44530),
+(44532),
+(44533),
+(44534),
+(44536),
+(44541),
+(44542),
+(44547),
+(44553),
+(44563),
+(44564),
+(44572),
+(44577),
+(44583),
+(44586),
+(44600),
+(44602),
+(44606),
+(44614),
+(44617),
+(44618),
+(44619),
+(44620),
+(44622),
+(44639),
+(44640),
+(44641),
+(44642),
+(44654),
+(44657),
+(44658),
+(44685),
+(44732),
+(44753),
+(44755),
+(44765),
+(44780),
+(44781),
+(44787),
+(44788),
+(44789),
+(44790),
+(44791),
+(44796),
+(44808),
+(44811),
+(44812),
+(44813),
+(44817),
+(44818),
+(44823),
+(44843),
+(44848),
+(44868),
+(44871),
+(44872),
+(44876),
+(44881),
+(44934),
+(44937),
+(44945),
+(44956),
+(44957),
+(44961),
+(44966),
+(44985),
+(44997),
+(45012),
+(45017),
+(45023),
+(45026),
+(45029),
+(45031),
+(45036),
+(45055),
+(45064),
+(45071),
+(45075),
+(45088),
+(45089),
+(45090),
+(45096),
+(45101),
+(45102),
+(45105),
+(45108),
+(45110),
+(45113),
+(45123),
+(45124),
+(45129),
+(45130),
+(45133),
+(45134),
+(45141),
+(45145),
+(45185),
+(45189),
+(45192),
+(45195),
+(45197),
+(45199),
+(45200),
+(45204),
+(45205),
+(45206),
+(45209),
+(45214),
+(45215),
+(45221),
+(45228),
+(45235),
+(45251),
+(45256),
+(45269),
+(45271),
+(45274),
+(45276),
+(45280),
+(45284),
+(45286),
+(45287),
+(45288),
+(45289),
+(45290),
+(45291),
+(45292),
+(45293),
+(45294),
+(45295),
+(45296),
+(45297),
+(45298),
+(45299),
+(45300),
+(45301),
+(45302),
+(45314),
+(45321),
+(45324),
+(45327),
+(45328),
+(45334),
+(45337),
+(45344),
+(45350),
+(45352),
+(45353),
+(45356),
+(45362),
+(45409),
+(45417),
+(45419),
+(45420),
+(45421),
+(45425),
+(45428),
+(45429),
+(45430),
+(45442),
+(45444),
+(45447),
+(45456),
+(45458),
+(45462),
+(45463),
+(45468),
+(45469),
+(45472),
+(45476),
+(45477),
+(45485),
+(45487),
+(45491),
+(45493),
+(45497),
+(45504),
+(45505),
+(45507),
+(45509),
+(45511),
+(45516),
+(45524),
+(45534),
+(45537),
+(45543),
+(45544),
+(45573),
+(45576),
+(45577),
+(45578),
+(45580),
+(45587),
+(45588),
+(45589),
+(45590),
+(45600),
+(45603),
+(45604),
+(45611),
+(45625),
+(45627),
+(45628),
+(45629),
+(45632),
+(45639),
+(45645),
+(45646),
+(45647),
+(45648),
+(45649),
+(45650),
+(45659),
+(45660),
+(45661),
+(45664),
+(45693),
+(45696),
+(45716),
+(45717),
+(45719),
+(45724),
+(45725),
+(45730),
+(45739),
+(45742),
+(45744),
+(45748),
+(45773),
+(45777),
+(45778),
+(45798),
+(45799),
+(45800),
+(45803),
+(45804),
+(45815),
+(45820),
+(45833),
+(45837),
+(45854),
+(45866),
+(45873),
+(45874),
+(45875),
+(45889),
+(45897),
+(45898),
+(45899),
+(45900),
+(45902),
+(45906),
+(45913),
+(45919),
+(45924),
+(45926),
+(45931),
+(45940),
+(45943),
+(45946),
+(45947),
+(45964),
+(45967),
+(45975),
+(45980),
+(45981),
+(45983),
+(45989),
+(45992),
+(46010),
+(46012),
+(46014),
+(46015),
+(46016),
+(46023),
+(46027),
+(46028),
+(46029),
+(46031),
+(46032),
+(46033),
+(46035),
+(46042),
+(46043),
+(46044),
+(46045),
+(46047),
+(46049),
+(46057),
+(46062),
+(46065),
+(46067),
+(46070),
+(46074),
+(46080),
+(46081),
+(46083),
+(46084),
+(46092),
+(46093),
+(46098),
+(46099),
+(46101),
+(46104),
+(46119),
+(46145),
+(46152),
+(46153),
+(46155),
+(46161),
+(46164),
+(46166),
+(46167),
+(46180),
+(46181),
+(46182),
+(46183),
+(46187),
+(46188),
+(46189),
+(46190),
+(46191),
+(46192),
+(46194),
+(46198),
+(46200),
+(46202),
+(46206),
+(46221),
+(46231),
+(46232),
+(46239),
+(46260),
+(46266),
+(46276),
+(46279),
+(46280),
+(46283),
+(46285),
+(46288),
+(46291),
+(46292),
+(46305),
+(46315),
+(46323),
+(46331),
+(46333),
+(46341),
+(46357),
+(46361),
+(46362),
+(46364),
+(46365),
+(46366),
+(46368),
+(46380),
+(46381),
+(46394),
+(46406),
+(46411),
+(46420),
+(46421),
+(46422),
+(46429),
+(46430),
+(46432),
+(46433),
+(46434),
+(46440),
+(46443),
+(46444),
+(46447),
+(46448),
+(46449),
+(46459),
+(46460),
+(46466),
+(46468),
+(46469),
+(46479),
+(46480),
+(46481),
+(46483),
+(46485),
+(46486),
+(46487),
+(46543),
+(46550),
+(46556),
+(46557),
+(46558),
+(46559),
+(46560),
+(46561),
+(46562),
+(46563),
+(46566),
+(46567),
+(46568),
+(46572),
+(46579),
+(46580),
+(46582),
+(46587),
+(46590),
+(46591),
+(46595),
+(46598),
+(46602),
+(46607),
+(46611),
+(46612),
+(46613),
+(46614),
+(46615),
+(46616),
+(46617),
+(46618),
+(46620),
+(46621),
+(46624),
+(46629),
+(46630),
+(46641),
+(46642),
+(46651),
+(46654),
+(46661),
+(46664),
+(46665),
+(46667),
+(46671),
+(46672),
+(46673),
+(46674),
+(46677),
+(46681),
+(46686),
+(46691),
+(46693),
+(46696),
+(46702),
+(46704),
+(46709),
+(46711),
+(46716),
+(46717),
+(46718),
+(46719),
+(46720),
+(46721),
+(46722),
+(46723),
+(46724),
+(46725),
+(46726),
+(46727),
+(46728),
+(46729),
+(46730),
+(46731),
+(46734),
+(46745),
+(46762),
+(46764),
+(46770),
+(46772),
+(46773),
+(46787),
+(46791),
+(46801),
+(46813),
+(46816),
+(46824),
+(46825),
+(46826),
+(46841),
+(46845),
+(46846),
+(46856),
+(46857),
+(46877),
+(46879),
+(46880),
+(46887),
+(46906),
+(46956),
+(46960),
+(46962),
+(46978),
+(46982),
+(46983),
+(46987),
+(46988),
+(46990),
+(47001),
+(47003),
+(47009),
+(47011),
+(47012),
+(47014),
+(47020),
+(47021),
+(47028),
+(47029),
+(47033),
+(47034),
+(47042),
+(47043),
+(47057),
+(47059),
+(47062),
+(47063),
+(47064),
+(47066),
+(47068),
+(47069),
+(47070),
+(47071),
+(47072),
+(47074),
+(47076),
+(47077),
+(47079),
+(47081),
+(47084),
+(47093),
+(47096),
+(47098),
+(47107),
+(47117),
+(47122),
+(47139),
+(47143),
+(47144),
+(47145),
+(47146),
+(47148),
+(47149),
+(47151),
+(47152),
+(47153),
+(47155),
+(47156),
+(47157),
+(47158),
+(47160),
+(47161),
+(47162),
+(47163),
+(47164),
+(47165),
+(47166),
+(47168),
+(47171),
+(47173),
+(47176),
+(47206),
+(47208),
+(47219),
+(47244),
+(47248),
+(47249),
+(47257),
+(47272),
+(47277),
+(47282),
+(47293),
+(47299),
+(47305),
+(47307),
+(47308),
+(47316),
+(47321),
+(47322),
+(47323),
+(47326),
+(47333),
+(47334),
+(47337),
+(47338),
+(47339),
+(47340),
+(47345),
+(47380),
+(47382),
+(47390),
+(47392),
+(47394),
+(47403),
+(47405),
+(47410),
+(47413),
+(47414),
+(47422),
+(47424),
+(47431),
+(47432),
+(47442),
+(47447),
+(47449),
+(47450),
+(47451),
+(47453),
+(47465),
+(47467),
+(47468),
+(47470),
+(47471),
+(47472),
+(47474),
+(47475),
+(47476),
+(47480),
+(47481),
+(47482),
+(47485),
+(47486),
+(47487),
+(47488),
+(47489),
+(47497),
+(47498),
+(47504),
+(47516),
+(47517),
+(47519),
+(47520),
+(47528),
+(47530),
+(47534),
+(47540),
+(47541),
+(47550),
+(47575),
+(47601),
+(47604),
+(47610),
+(47611),
+(47614),
+(47629),
+(47632),
+(47633),
+(47635),
+(47637),
+(47664),
+(47665),
+(47673),
+(47674),
+(47676),
+(47679),
+(47689),
+(47695),
+(47697),
+(47698),
+(47700),
+(47702),
+(47703),
+(47718),
+(47721),
+(47722),
+(47723),
+(47724),
+(47729),
+(47739),
+(47740),
+(47741),
+(47744),
+(47749),
+(47751),
+(47753),
+(47757),
+(47758),
+(47761),
+(47767),
+(47768),
+(47777),
+(47778),
+(47780),
+(47781),
+(47782),
+(47783),
+(47785),
+(47788),
+(47808),
+(47809),
+(47810),
+(47811),
+(47812),
+(47813),
+(47814),
+(47815),
+(47824),
+(47825),
+(47826),
+(47827),
+(47835),
+(47836),
+(47837),
+(47838),
+(47841),
+(47843),
+(47848),
+(47850),
+(47851),
+(47852),
+(47853),
+(47855),
+(47857),
+(47859),
+(47860),
+(47863),
+(47864),
+(47865),
+(47867),
+(47902),
+(47914),
+(47917),
+(47920),
+(47926),
+(47928),
+(47930),
+(47938),
+(47948),
+(47960),
+(47961),
+(47962),
+(47964),
+(47968),
+(47976),
+(47984),
+(47991),
+(47992),
+(47993),
+(47994),
+(47995),
+(47996),
+(48011),
+(48013),
+(48039),
+(48045),
+(48046),
+(48047),
+(48048),
+(48053),
+(48060),
+(48062),
+(48063),
+(48065),
+(48066),
+(48067),
+(48068),
+(48070),
+(48071),
+(48072),
+(48073),
+(48084),
+(48085),
+(48098),
+(48099),
+(48100),
+(48101),
+(48102),
+(48103),
+(48104),
+(48105),
+(48119),
+(48120),
+(48122),
+(48123),
+(48124),
+(48125),
+(48126),
+(48127),
+(48130),
+(48132),
+(48133),
+(48134),
+(48135),
+(48137),
+(48140),
+(48147),
+(48155),
+(48156),
+(48157),
+(48158),
+(48159),
+(48160),
+(48161),
+(48163),
+(48164),
+(48165),
+(48169),
+(48181),
+(48184),
+(48187),
+(48192),
+(48208),
+(48210),
+(48232),
+(48245),
+(48249),
+(48250),
+(48261),
+(48262),
+(48264),
+(48267),
+(48268),
+(48282),
+(48283),
+(48285),
+(48286),
+(48287),
+(48288),
+(48290),
+(48291),
+(48292),
+(48296),
+(48298),
+(48299),
+(48300),
+(48301),
+(48307),
+(48309),
+(48310),
+(48316),
+(48330),
+(48334),
+(48360),
+(48365),
+(48374),
+(48376),
+(48377),
+(48378),
+(48400),
+(48417),
+(48423),
+(48424),
+(48440),
+(48441),
+(48442),
+(48443),
+(48450),
+(48451),
+(48459),
+(48461),
+(48462),
+(48463),
+(48464),
+(48465),
+(48468),
+(48469),
+(48479),
+(48480),
+(48489),
+(48490),
+(48491),
+(48504),
+(48532),
+(48533),
+(48540),
+(48541),
+(48542),
+(48543),
+(48548),
+(48549),
+(48563),
+(48564),
+(48565),
+(48566),
+(48567),
+(48568),
+(48569),
+(48570),
+(48571),
+(48572),
+(48573),
+(48574),
+(48575),
+(48576),
+(48577),
+(48578),
+(48579),
+(48583),
+(48585),
+(48598),
+(48599),
+(48601),
+(48603),
+(48606),
+(48617),
+(48622),
+(48628),
+(48637),
+(48638),
+(48639),
+(48640),
+(48648),
+(48652),
+(48656),
+(48657),
+(48658),
+(48659),
+(48660),
+(48661),
+(48662),
+(48663),
+(48664),
+(48665),
+(48666),
+(48667),
+(48668),
+(48669),
+(48671),
+(48672),
+(48673),
+(48674),
+(48675),
+(48676),
+(48678),
+(48679),
+(48680),
+(48689),
+(48690),
+(48691),
+(48693),
+(48696),
+(48697),
+(48698),
+(48699),
+(48700),
+(48712),
+(48714),
+(48737),
+(48738),
+(48746),
+(48747),
+(48749),
+(48750),
+(48752),
+(48753),
+(48754),
+(48755),
+(48756),
+(48759),
+(48760),
+(48765),
+(48770),
+(48772),
+(48774),
+(48775),
+(48781),
+(48782),
+(48784),
+(48785),
+(48788),
+(48800),
+(48801),
+(48802),
+(48805),
+(48806),
+(48812),
+(48813),
+(48815),
+(48820),
+(48821),
+(48822),
+(48823),
+(48824),
+(48825),
+(48826),
+(48827),
+(48828),
+(48829),
+(48830),
+(48831),
+(48832),
+(48845),
+(48850),
+(48851),
+(48852),
+(48854),
+(48862),
+(48871),
+(48872),
+(48873),
+(48876),
+(48877),
+(48878),
+(48880),
+(48881),
+(48883),
+(48895),
+(48917),
+(48920),
+(48931),
+(48932),
+(48935),
+(48936),
+(48953),
+(48960),
+(48974),
+(48981),
+(48984),
+(48995),
+(48996),
+(48998),
+(48999),
+(49000),
+(49001),
+(49005),
+(49009),
+(49010),
+(49011),
+(49012),
+(49020),
+(49021),
+(49026),
+(49028),
+(49029),
+(49037),
+(49044),
+(49045),
+(49047),
+(49048),
+(49049),
+(49050),
+(49051),
+(49052),
+(49053),
+(49054),
+(49078),
+(49084),
+(49089),
+(49090),
+(49091),
+(49092),
+(49093),
+(49099),
+(49106),
+(49110),
+(49111),
+(49113),
+(49119),
+(49124),
+(49125),
+(49127),
+(49138),
+(49143),
+(49158),
+(49161),
+(49165),
+(49177),
+(49184),
+(49204),
+(49206),
+(49213),
+(49215),
+(49230),
+(49231),
+(49232),
+(49233),
+(49235),
+(49236),
+(49237),
+(49238),
+(49239),
+(49240),
+(49242),
+(49243),
+(49256),
+(49257),
+(49266),
+(49267),
+(49268),
+(49269),
+(49270),
+(49271),
+(49272),
+(49273),
+(49275),
+(49276),
+(49278),
+(49279),
+(49282),
+(49283),
+(49284),
+(49288),
+(49294),
+(49296),
+(49298),
+(49305),
+(49309),
+(49312),
+(49317),
+(49323),
+(49324),
+(49348),
+(49349),
+(49353),
+(49354),
+(49362),
+(49363),
+(49364),
+(49372),
+(49376),
+(49381),
+(49383),
+(49387),
+(49404),
+(49406),
+(49418),
+(49427),
+(49429),
+(49433),
+(49439),
+(49446),
+(49453),
+(49454),
+(49459),
+(49463),
+(49466),
+(49481),
+(49482),
+(49485),
+(49500),
+(49501),
+(49511),
+(49512),
+(49527),
+(49537),
+(49544),
+(49546),
+(49547),
+(49549),
+(49560),
+(49576),
+(49584),
+(49587),
+(49592),
+(49613),
+(49616),
+(49617),
+(49624),
+(49637),
+(49639),
+(49641),
+(49644),
+(49675),
+(49678),
+(49680),
+(49681),
+(49686),
+(49690),
+(49696),
+(49704),
+(49705),
+(49706),
+(49708),
+(49710),
+(49711),
+(49712),
+(49715),
+(49718),
+(49719),
+(49720),
+(49723),
+(49729),
+(49734),
+(49742),
+(49747),
+(49749),
+(49753),
+(49755),
+(49758),
+(49759),
+(49771),
+(49776),
+(49797),
+(49799),
+(49800),
+(49802),
+(49803),
+(49804),
+(49805),
+(49806),
+(49830),
+(49836),
+(49840),
+(49841),
+(49843),
+(49846),
+(49848),
+(49859),
+(49861),
+(49863),
+(49865),
+(49891),
+(49892),
+(49893),
+(49894),
+(49895),
+(49896),
+(49897),
+(49903),
+(49904),
+(49906),
+(49909),
+(49913),
+(49914),
+(49915),
+(49916),
+(49917),
+(49918),
+(49919),
+(49920),
+(49921),
+(49922),
+(49923),
+(49924),
+(49926),
+(49927),
+(49928),
+(49929),
+(49930),
+(49935),
+(49942),
+(49945),
+(49956),
+(49961),
+(49965),
+(49966),
+(49967),
+(49968),
+(49969),
+(49970),
+(49971),
+(49972),
+(49973),
+(49974),
+(49975),
+(49978),
+(49980),
+(49981),
+(49985),
+(49986),
+(49987),
+(49989),
+(49991),
+(49993),
+(49994),
+(49995),
+(49996),
+(49997),
+(49998),
+(49999),
+(50004),
+(50006),
+(50015),
+(50021),
+(50027),
+(50028),
+(50035),
+(50038),
+(50046),
+(50047),
+(50050),
+(50052),
+(50064),
+(50066),
+(50073),
+(50075),
+(50084),
+(50086),
+(50089),
+(50090),
+(50091),
+(50092),
+(50094),
+(50100),
+(50101),
+(50102),
+(50104),
+(50135),
+(50144),
+(50145),
+(50146),
+(50156),
+(50165),
+(50169),
+(50183),
+(50184),
+(50185),
+(50188),
+(50196),
+(50198),
+(50205),
+(50206),
+(50207),
+(50217),
+(50231),
+(50232),
+(50234),
+(50245),
+(50251),
+(50252),
+(50255),
+(50256),
+(50257),
+(50259),
+(50265),
+(50271),
+(50273),
+(50276),
+(50282),
+(50287),
+(50288),
+(50289),
+(50290),
+(50291),
+(50293),
+(50295),
+(50299),
+(50301),
+(50303),
+(50305),
+(50306),
+(50307),
+(50319),
+(50323),
+(50328),
+(50335),
+(50341),
+(50343),
+(50344),
+(50347),
+(50349),
+(50356),
+(50361),
+(50370),
+(50375),
+(50377),
+(50378),
+(50379),
+(50380),
+(50400),
+(50401),
+(50402),
+(50403),
+(50405),
+(50406),
+(50410),
+(50411),
+(50412),
+(50424),
+(50431),
+(50432),
+(50434),
+(50435),
+(50436),
+(50437),
+(50439),
+(50445),
+(50454),
+(50455),
+(50456),
+(50459),
+(50462),
+(50463),
+(50464),
+(50477),
+(50478),
+(50479),
+(50484),
+(50498),
+(50499),
+(50500),
+(50504),
+(50508),
+(50509),
+(50510),
+(50511),
+(50512),
+(50517),
+(50518),
+(50519),
+(50521),
+(50523),
+(50533),
+(50534),
+(50536),
+(50537),
+(50538),
+(50541),
+(50545),
+(50550),
+(50559),
+(50566),
+(50572),
+(50573),
+(50578),
+(50581),
+(50582),
+(50588),
+(50597),
+(50629),
+(50631),
+(50633),
+(50634),
+(50635),
+(50638),
+(50655),
+(50658),
+(50659),
+(50660),
+(50661),
+(50662),
+(50663),
+(50666),
+(50668),
+(50673),
+(50675),
+(50679),
+(50688),
+(50691),
+(50693),
+(50701),
+(50704),
+(50705),
+(50706),
+(50721),
+(50725),
+(50729),
+(50731),
+(50732),
+(50733),
+(50737),
+(50739),
+(50740),
+(50744),
+(50761),
+(50770),
+(50773),
+(50782),
+(50783),
+(50796),
+(50797),
+(50799),
+(50804),
+(50818),
+(50820),
+(50821),
+(50830),
+(50832),
+(50834),
+(50842),
+(50843),
+(50844),
+(50845),
+(50846),
+(50853),
+(50854),
+(50859),
+(50861),
+(50874),
+(50876),
+(50894),
+(50895),
+(50900),
+(50905),
+(50907),
+(50914),
+(50918),
+(50919),
+(50923),
+(50924),
+(50926),
+(50927),
+(50978),
+(50979),
+(50992),
+(50997),
+(51011),
+(51015),
+(51016),
+(51018),
+(51020),
+(51026),
+(51035),
+(51037),
+(51046),
+(51054),
+(51055),
+(51057),
+(51059),
+(51062),
+(51064),
+(51067),
+(51069),
+(51072),
+(51077),
+(51079),
+(51081),
+(51083),
+(51085),
+(51087),
+(51089),
+(51091),
+(51093),
+(51095),
+(51097),
+(51100),
+(51102),
+(51105),
+(51107),
+(51111),
+(51120),
+(51121),
+(51131),
+(51134),
+(51135),
+(51137),
+(51154),
+(51156),
+(51157),
+(51165),
+(51187),
+(51196),
+(51197),
+(51198),
+(51199),
+(51200),
+(51203),
+(51216),
+(51220),
+(51221),
+(51226),
+(51227),
+(51228),
+(51229),
+(51232),
+(51233),
+(51235),
+(51236),
+(51240),
+(51243),
+(51258),
+(51259),
+(51270),
+(51272),
+(51275),
+(51279),
+(51285),
+(51287),
+(51290),
+(51292),
+(51298),
+(51305),
+(51308),
+(51310),
+(51315),
+(51316),
+(51325),
+(51326),
+(51327),
+(51328),
+(51330),
+(51334),
+(51339),
+(51340),
+(51354),
+(51356),
+(51363),
+(51365),
+(51372),
+(51382),
+(51399),
+(51409),
+(51410),
+(51411),
+(51413),
+(51416),
+(51417),
+(51418),
+(51419),
+(51423),
+(51424),
+(51425),
+(51426),
+(51427),
+(51428),
+(51429),
+(51430),
+(51431),
+(51432),
+(51440),
+(51442),
+(51446),
+(51447),
+(51454),
+(51460),
+(51467),
+(51484),
+(51489),
+(51491),
+(51492),
+(51495),
+(51496),
+(51500),
+(51502),
+(51503),
+(51504),
+(51505),
+(51506),
+(51509),
+(51514),
+(51515),
+(51573),
+(51580),
+(51584),
+(51585),
+(51586),
+(51587),
+(51588),
+(51591),
+(51592),
+(51593),
+(51596),
+(51598),
+(51601),
+(51608),
+(51609),
+(51610),
+(51613),
+(51614),
+(51618),
+(51656),
+(51657),
+(51658),
+(51659),
+(51662),
+(51675),
+(51676),
+(51677),
+(51680),
+(51693),
+(51695),
+(51699),
+(51714),
+(51718),
+(51722),
+(51724),
+(51726),
+(51728),
+(51732),
+(51734),
+(51735),
+(51736),
+(51740),
+(51751),
+(51756),
+(51757),
+(51772),
+(51775),
+(51776),
+(51778),
+(51779),
+(51786),
+(51787),
+(51797),
+(51798),
+(51799),
+(51803),
+(51804),
+(51808),
+(51809),
+(51811),
+(51818),
+(51827),
+(51830),
+(51842),
+(51844),
+(51853),
+(51854),
+(51855),
+(51856),
+(51857),
+(51863),
+(51864),
+(51872),
+(51875),
+(51876),
+(51877),
+(51878),
+(51879),
+(51886),
+(51888),
+(51889),
+(51893),
+(51894),
+(51895),
+(51897),
+(51898),
+(51899),
+(51901),
+(51909),
+(51912),
+(51917),
+(51918),
+(51919),
+(51920),
+(51926),
+(51934),
+(51935),
+(51936),
+(51937),
+(51940),
+(51945),
+(51949),
+(51951),
+(51961),
+(51962),
+(51963),
+(51968),
+(51973),
+(51976),
+(51979),
+(51981),
+(51989),
+(51990),
+(51997),
+(51998),
+(51999),
+(52000),
+(52004),
+(52005),
+(52007),
+(52008),
+(52014),
+(52025),
+(52026),
+(52030),
+(52032),
+(52042),
+(52043),
+(52045),
+(52053),
+(52069),
+(52078),
+(52082),
+(52083),
+(52086),
+(52088),
+(52090),
+(52108),
+(52125),
+(52139),
+(52149),
+(52157),
+(52160),
+(52163),
+(52167),
+(52169),
+(52171),
+(52187),
+(52194),
+(52196),
+(52198),
+(52199),
+(52206),
+(52207),
+(52209),
+(52210),
+(52212),
+(52217),
+(52219),
+(52221),
+(52223),
+(52224),
+(52228),
+(52229),
+(52230),
+(52251),
+(52252),
+(52253),
+(52256),
+(52261),
+(52263),
+(52265),
+(52267),
+(52270),
+(52280),
+(52282),
+(52292),
+(52307),
+(52312),
+(52318),
+(52327),
+(52328),
+(52334),
+(52345),
+(52346),
+(52352),
+(52353),
+(52355),
+(52356),
+(52359),
+(52360),
+(52361),
+(52364),
+(52372),
+(52373),
+(52374),
+(52375),
+(52383),
+(52389),
+(52391),
+(52401),
+(52402),
+(52415),
+(52425),
+(52428),
+(52430),
+(52431),
+(52433),
+(52444),
+(52445),
+(52447),
+(52460),
+(52463),
+(52465),
+(52466),
+(52468),
+(52469),
+(52471),
+(52472),
+(52473),
+(52474),
+(52475),
+(52476),
+(52486),
+(52487),
+(52496),
+(52498),
+(52499),
+(52501),
+(52502),
+(52504),
+(52506),
+(52511),
+(52515),
+(52519),
+(52521),
+(52522),
+(52527),
+(52532),
+(52534),
+(52536),
+(52537),
+(52538),
+(52540),
+(52542),
+(52544),
+(52545),
+(52546),
+(52547),
+(52548),
+(52549),
+(52554),
+(52566),
+(52577),
+(52581),
+(52583),
+(52586),
+(52587),
+(52591),
+(52594),
+(52595),
+(52596),
+(52600),
+(52601),
+(52604),
+(52608),
+(52609),
+(52610),
+(52613),
+(52620),
+(52631),
+(52633),
+(52643),
+(52644),
+(52655),
+(52657),
+(52658),
+(52660),
+(52672),
+(52675),
+(52680),
+(52684),
+(52695),
+(52696),
+(52699),
+(52700),
+(52702),
+(52705),
+(52708),
+(52709),
+(52711),
+(52713),
+(52715),
+(52718),
+(52719),
+(52721),
+(52722),
+(52737),
+(52740),
+(52741),
+(52743),
+(52751),
+(52752),
+(52754),
+(52755),
+(52758),
+(52761),
+(52762),
+(52764),
+(52771),
+(52772),
+(52773),
+(52778),
+(52781),
+(52782),
+(52784),
+(52789),
+(52794),
+(52806),
+(52807),
+(52813),
+(52814),
+(52818),
+(52825),
+(52835),
+(52839),
+(52851),
+(52856),
+(52859),
+(52862),
+(52863),
+(52864),
+(52871),
+(52872),
+(52873),
+(52883),
+(52885),
+(52889),
+(52890),
+(52904),
+(52905),
+(52909),
+(52921),
+(52926),
+(52931),
+(52932),
+(52939),
+(52943),
+(52986),
+(52987),
+(52988),
+(52992),
+(52994),
+(52996),
+(53001),
+(53002),
+(53003),
+(53005),
+(53006),
+(53007),
+(53019),
+(53023),
+(53027),
+(53031),
+(53033),
+(53043),
+(53044),
+(53045),
+(53051),
+(53058),
+(53059),
+(53060),
+(53062),
+(53068),
+(53069),
+(53070),
+(53072),
+(53073),
+(53085),
+(53086),
+(53087),
+(53088),
+(53089),
+(53094),
+(53098),
+(53099),
+(53100),
+(53101),
+(53102),
+(53108),
+(53109),
+(53111),
+(53116),
+(53141),
+(53145),
+(53148),
+(53150),
+(53153),
+(53158),
+(53174),
+(53191),
+(53193),
+(53194),
+(53195),
+(53208),
+(53209),
+(53214),
+(53254),
+(53271),
+(53288),
+(53289),
+(53301),
+(53307),
+(53308),
+(53310),
+(53311),
+(53313),
+(53314),
+(53317),
+(53318),
+(53322),
+(53326),
+(53327),
+(53329),
+(53330),
+(53332),
+(53333),
+(53335),
+(53338),
+(53339),
+(53340),
+(53346),
+(53351),
+(53352),
+(53353),
+(53357),
+(53359),
+(53364),
+(53366),
+(53372),
+(53388),
+(53394),
+(53395),
+(53396),
+(53402),
+(53404),
+(53407),
+(53408),
+(53418),
+(53422),
+(53424),
+(53425),
+(53431),
+(53435),
+(53437),
+(53438),
+(53442),
+(53449),
+(53460),
+(53477),
+(53480),
+(53492),
+(53493),
+(53498),
+(53499),
+(53508),
+(53509),
+(53526),
+(53528),
+(53529),
+(53532),
+(53533),
+(53534),
+(53536),
+(53537),
+(53538),
+(53540),
+(53542),
+(53543),
+(53544),
+(53545),
+(53546),
+(53547),
+(53548),
+(53549),
+(53550),
+(53558),
+(53559),
+(53560),
+(53561),
+(53562),
+(53564),
+(53565),
+(53566),
+(53567),
+(53568),
+(53571),
+(53572),
+(53573),
+(53574),
+(53575),
+(53578),
+(53579),
+(53580),
+(53581),
+(53582),
+(53584),
+(53586),
+(53587),
+(53588),
+(53589),
+(53595),
+(53600),
+(53601),
+(53617),
+(53618),
+(53625),
+(53629),
+(53631),
+(53633),
+(53638),
+(53639),
+(53652),
+(53653),
+(53654),
+(53659),
+(53669),
+(53697),
+(53704),
+(53719),
+(53726),
+(53733),
+(53739),
+(53742),
+(53769),
+(53772),
+(53786),
+(53788),
+(53799),
+(53807),
+(53809),
+(53810),
+(53815),
+(53821),
+(53824),
+(54016),
+(54028),
+(54029),
+(54035),
+(54039),
+(54042),
+(54049),
+(54050),
+(54051),
+(54052),
+(54053),
+(54060),
+(54063),
+(54068),
+(54070),
+(54071),
+(54074),
+(54075),
+(54076),
+(54077),
+(54078),
+(54079),
+(54080),
+(54092),
+(54094),
+(54095),
+(54096),
+(54113),
+(54121),
+(54126),
+(54129),
+(54132),
+(54135),
+(54158),
+(54169),
+(54172),
+(54175),
+(54183),
+(54185),
+(54188),
+(54190),
+(54191),
+(54195),
+(54196),
+(54198),
+(54203),
+(54216),
+(54226),
+(54235),
+(54237),
+(54238),
+(54249),
+(54260),
+(54261),
+(54273),
+(54283),
+(54284),
+(54290),
+(54299),
+(54303),
+(54309),
+(54311),
+(54315),
+(54316),
+(54319),
+(54321),
+(54324),
+(54331),
+(54334),
+(54335),
+(54337),
+(54338),
+(54339),
+(54340),
+(54345),
+(54350),
+(54361),
+(54376),
+(54378),
+(54380),
+(54387),
+(54393),
+(54394),
+(54395),
+(54396),
+(54399),
+(54416),
+(54417),
+(54429),
+(54431),
+(54433),
+(54451),
+(54453),
+(54458),
+(54459),
+(54460),
+(54468),
+(54470),
+(54479),
+(54485),
+(54487),
+(54491),
+(54495),
+(54498),
+(54499),
+(54502),
+(54504),
+(54507),
+(54511),
+(54514),
+(54518),
+(54521),
+(54525),
+(54526),
+(54527),
+(54531),
+(54532),
+(54540),
+(54549),
+(54565),
+(54573),
+(54576),
+(54577),
+(54578),
+(54587),
+(54588),
+(54593),
+(54594),
+(54602),
+(54604),
+(54609),
+(54610),
+(54611),
+(54612),
+(54613),
+(54615),
+(54616),
+(54617),
+(54618),
+(54619),
+(54620),
+(54622),
+(54624),
+(54630),
+(54631),
+(54632),
+(54634),
+(54640),
+(54644),
+(54646),
+(54648),
+(54651),
+(54660),
+(54662),
+(54663),
+(54667),
+(54668),
+(54673),
+(54675),
+(54677),
+(54679),
+(54680),
+(54688),
+(54689),
+(54694),
+(54702),
+(54703),
+(54704),
+(54706),
+(54708),
+(54709),
+(54716),
+(54719),
+(54723),
+(54755),
+(54757),
+(54761),
+(54770),
+(54772),
+(54781),
+(54785),
+(54788),
+(54790),
+(54791),
+(54794),
+(54799),
+(54801),
+(54804),
+(54805),
+(54820),
+(54822),
+(54823),
+(54843),
+(54846),
+(54880),
+(54881),
+(54882),
+(54883),
+(54884),
+(54885),
+(54886),
+(54887),
+(54900),
+(54906),
+(54908),
+(54919),
+(54920),
+(54932),
+(54933),
+(54951),
+(54956),
+(54957),
+(54958),
+(54965),
+(54970),
+(54971),
+(54973),
+(54974),
+(54975),
+(54976),
+(54977),
+(54982),
+(54983),
+(54986),
+(54987),
+(54992),
+(54997),
+(55006),
+(55007),
+(55008),
+(55009),
+(55021),
+(55029),
+(55039),
+(55041),
+(55046),
+(55050),
+(55051),
+(55054),
+(55065),
+(55066),
+(55069),
+(55070),
+(55071),
+(55074),
+(55075),
+(55078),
+(55079),
+(55090),
+(55093),
+(55095),
+(55102),
+(55104),
+(55144),
+(55160),
+(55168),
+(55196),
+(55209),
+(55210),
+(55216),
+(55217),
+(55218),
+(55219),
+(55220),
+(55224),
+(55225),
+(55226),
+(55240),
+(55241),
+(55253),
+(55255),
+(55258),
+(55259),
+(55260),
+(55261),
+(55262),
+(55263),
+(55264),
+(55265),
+(55268),
+(55269),
+(55270),
+(55271),
+(55274),
+(55276),
+(55277),
+(55281),
+(55284),
+(55313),
+(55314),
+(55317),
+(55318),
+(55319),
+(55320),
+(55321),
+(55322),
+(55324),
+(55331),
+(55334),
+(55346),
+(55348),
+(55359),
+(55360),
+(55363),
+(55364),
+(55411),
+(55412),
+(55416),
+(55424),
+(55425),
+(55430),
+(55469),
+(55470),
+(55482),
+(55483),
+(55484),
+(55485),
+(55487),
+(55488),
+(55489),
+(55490),
+(55491),
+(55492),
+(55495),
+(55496),
+(55497),
+(55498),
+(55499),
+(55504),
+(55505),
+(55506),
+(55507),
+(55508),
+(55509),
+(55511),
+(55520),
+(55521),
+(55530),
+(55536),
+(55549),
+(55550),
+(55555),
+(55556),
+(55557),
+(55567),
+(55568),
+(55569),
+(55579),
+(55581),
+(55582),
+(55597),
+(55598),
+(55599),
+(55602),
+(55604),
+(55605),
+(55613),
+(55622),
+(55624),
+(55625),
+(55643),
+(55645),
+(55646),
+(55648),
+(55652),
+(55659),
+(55700),
+(55703),
+(55704),
+(55716),
+(55719),
+(55728),
+(55736),
+(55748),
+(55749),
+(55750),
+(55751),
+(55752),
+(55753),
+(55754),
+(55756),
+(55770),
+(55771),
+(55772),
+(55778),
+(55779),
+(55780),
+(55781),
+(55790),
+(55797),
+(55802),
+(55804),
+(55809),
+(55813),
+(55815),
+(55818),
+(55823),
+(55824),
+(55838),
+(55840),
+(55841),
+(55864),
+(55874),
+(55877),
+(55880),
+(55890),
+(55894),
+(55929),
+(55931),
+(55932),
+(55933),
+(55935),
+(55936),
+(55937),
+(55939),
+(55951),
+(55958),
+(55959),
+(55960),
+(55962),
+(55963),
+(55968),
+(55973),
+(55978),
+(55981),
+(55982),
+(55983),
+(55984),
+(56033),
+(56036),
+(56038),
+(56046),
+(56061),
+(56071),
+(56072),
+(56090),
+(56091),
+(56092),
+(56098),
+(56104),
+(56106),
+(56107),
+(56112),
+(56113),
+(56115),
+(56122),
+(56123),
+(56125),
+(56127),
+(56130),
+(56131),
+(56132),
+(56138),
+(56139),
+(56141),
+(56143),
+(56144),
+(56147),
+(56149),
+(56160),
+(56161),
+(56185),
+(56190),
+(56191),
+(56198),
+(56200),
+(56211),
+(56222),
+(56223),
+(56230),
+(56236),
+(56239),
+(56252),
+(56254),
+(56260),
+(56277),
+(56287),
+(56305),
+(56320),
+(56326),
+(56329),
+(56331),
+(56332),
+(56346),
+(56351),
+(56352),
+(56361),
+(56362),
+(56379),
+(56404),
+(56405),
+(56411),
+(56425),
+(56426),
+(56430),
+(56433),
+(56434),
+(56440),
+(56442),
+(56444),
+(56447),
+(56448),
+(56485),
+(56491),
+(56506),
+(56513),
+(56515),
+(56517),
+(56520),
+(56521),
+(56525),
+(56536),
+(56537),
+(56539),
+(56545),
+(56557),
+(56559),
+(56562),
+(56564),
+(56565),
+(56581),
+(56582),
+(56584),
+(56586),
+(56603),
+(56605),
+(56606),
+(56607),
+(56609),
+(56624),
+(56626),
+(56627),
+(56628),
+(56629),
+(56630),
+(56631),
+(56640),
+(56641),
+(56645),
+(56659),
+(56662),
+(56664),
+(56666),
+(56668),
+(56670),
+(56671),
+(56672),
+(56678),
+(56685),
+(56687),
+(56698),
+(56699),
+(56701),
+(56707),
+(56715),
+(56718),
+(56719),
+(56720),
+(56721),
+(56727),
+(56728),
+(56729),
+(56730),
+(56731),
+(56734),
+(56753),
+(56754),
+(56755),
+(56760),
+(56761),
+(56770),
+(56771),
+(56772),
+(56773),
+(56774),
+(56775),
+(56776),
+(56777),
+(56780),
+(56781),
+(56785),
+(56790),
+(56791),
+(56795),
+(56796),
+(56797),
+(56815),
+(56854),
+(56860),
+(56861),
+(56862),
+(56891),
+(56893),
+(56896),
+(56898),
+(56902),
+(56903),
+(56905),
+(56906),
+(56907),
+(56909),
+(56917),
+(56918),
+(56919),
+(56920),
+(56921),
+(56922),
+(56923),
+(56925),
+(56933),
+(56937),
+(56938),
+(56939),
+(56940),
+(56966),
+(56969),
+(57049),
+(57050),
+(57052),
+(57053),
+(57058),
+(57062),
+(57063),
+(57089),
+(57090),
+(57094),
+(57095),
+(57108),
+(57118),
+(57143),
+(57292),
+(57305),
+(57323),
+(57337),
+(57346),
+(57347),
+(57369),
+(57374),
+(57376),
+(57380),
+(57384),
+(57386),
+(57388),
+(57389),
+(57390),
+(57391),
+(57392),
+(57393),
+(57395),
+(57397),
+(57402),
+(57407),
+(57411),
+(57413),
+(57420),
+(57454),
+(57456),
+(57461),
+(57464),
+(57465),
+(57466),
+(57473),
+(57480),
+(57486),
+(57487),
+(57488),
+(57490),
+(57506),
+(57507),
+(57528),
+(57530),
+(57536),
+(57537),
+(57547),
+(57548),
+(57553),
+(57554),
+(57556),
+(57573),
+(57580),
+(57582),
+(57587),
+(57589),
+(57590),
+(57593),
+(57594),
+(57596),
+(57599),
+(57601),
+(57602),
+(57603),
+(57615),
+(57616),
+(57617),
+(57620),
+(57628),
+(57635),
+(57640),
+(57641),
+(57644),
+(57645),
+(57647),
+(57648),
+(57651),
+(57657),
+(57661),
+(57665),
+(57670),
+(57671),
+(57677),
+(57679),
+(57723),
+(57724),
+(57725),
+(57745),
+(57755),
+(57759),
+(57765),
+(57766),
+(57767),
+(57770),
+(57774),
+(57775),
+(57777),
+(57778),
+(57779),
+(57780),
+(57781),
+(57783),
+(57785),
+(57787),
+(57789),
+(57790),
+(57795),
+(57799),
+(57802),
+(57807),
+(57808),
+(57823),
+(57825),
+(57833),
+(57834),
+(57838),
+(57841),
+(57842),
+(57845),
+(57846),
+(57860),
+(57863),
+(57864),
+(57871),
+(57874),
+(57888),
+(57896),
+(57897),
+(57906),
+(57908),
+(57914),
+(57921),
+(57922),
+(57941),
+(57949),
+(57951),
+(57964),
+(57965),
+(57969),
+(57970),
+(57974),
+(57975),
+(57981),
+(57984),
+(57992),
+(57993),
+(57994),
+(58012),
+(58021),
+(58025),
+(58044),
+(58054),
+(58061),
+(58062),
+(58071),
+(58106),
+(58117),
+(58118),
+(58119),
+(58151),
+(58154),
+(58179),
+(58180),
+(58181),
+(58183),
+(58184),
+(58187),
+(58194),
+(58203),
+(58204),
+(58205),
+(58207),
+(58208),
+(58209),
+(58210),
+(58211),
+(58212),
+(58213),
+(58214),
+(58215),
+(58216),
+(58217),
+(58218),
+(58219),
+(58220),
+(58221),
+(58222),
+(58223),
+(58224),
+(58230),
+(58270),
+(58282),
+(58283),
+(58349),
+(58351),
+(58352),
+(58371),
+(58373),
+(58412),
+(58418),
+(58419),
+(58420),
+(58421),
+(58438),
+(58448),
+(58449),
+(58450),
+(58451),
+(58452),
+(58453),
+(58456),
+(58457),
+(58459),
+(58460),
+(58461),
+(58462),
+(58464),
+(58466),
+(58471),
+(58475),
+(58494),
+(58504),
+(58505),
+(58508),
+(58509),
+(58510),
+(58511),
+(58513),
+(58514),
+(58516),
+(58517),
+(58518),
+(58519),
+(58520),
+(58526),
+(58529),
+(58531),
+(58534),
+(58535),
+(58537),
+(58544),
+(58548),
+(58561),
+(58563),
+(58564),
+(58566),
+(58567),
+(58597),
+(58604),
+(58605),
+(58607),
+(58608),
+(58609),
+(58610),
+(58611),
+(58612),
+(58617),
+(58619),
+(58621),
+(58622),
+(58624),
+(58628),
+(58632),
+(58633),
+(58642),
+(58644),
+(58660),
+(58663),
+(58664),
+(58665),
+(58666),
+(58667),
+(58678),
+(58681),
+(58683),
+(58684),
+(58691),
+(58700),
+(58701),
+(58702),
+(58743),
+(58747),
+(58758),
+(58769),
+(58770),
+(58772),
+(58781),
+(58782),
+(58786),
+(58787),
+(58788),
+(58797),
+(58798),
+(58799),
+(58810),
+(58811),
+(58814),
+(58815),
+(58816),
+(58817),
+(58822),
+(58823),
+(58827),
+(58829),
+(58830),
+(58839),
+(58840),
+(58843),
+(58844),
+(58845),
+(58847),
+(58849),
+(58850),
+(58855),
+(58859),
+(58861),
+(58867),
+(58879),
+(58890),
+(58896),
+(58898),
+(58902),
+(58905),
+(58912),
+(58913),
+(58915),
+(58919),
+(58921),
+(58922),
+(58935),
+(58940),
+(58941),
+(58953),
+(58955),
+(58959),
+(58961),
+(58966),
+(58967),
+(58969),
+(58971),
+(58972),
+(58973),
+(58976),
+(58978),
+(58980),
+(58981),
+(58987),
+(58988),
+(58989),
+(58991),
+(58996),
+(59001),
+(59006),
+(59007),
+(59011),
+(59013),
+(59016),
+(59017),
+(59019),
+(59020),
+(59021),
+(59023),
+(59024),
+(59025),
+(59034),
+(59035),
+(59039),
+(59040),
+(59044),
+(59047),
+(59050),
+(59051),
+(59060),
+(59064),
+(59065),
+(59069),
+(59079),
+(59080),
+(59081),
+(59082),
+(59083),
+(59085),
+(59100),
+(59102),
+(59104),
+(59105),
+(59106),
+(59109),
+(59110),
+(59111),
+(59114),
+(59119),
+(59121),
+(59124),
+(59130),
+(59131),
+(59132),
+(59133),
+(59134),
+(59138),
+(59142),
+(59144),
+(59146),
+(59147),
+(59148),
+(59150),
+(59151),
+(59153),
+(59155),
+(59160),
+(59161),
+(59163),
+(59164),
+(59165),
+(59166),
+(59167),
+(59168),
+(59169),
+(59170),
+(59171),
+(59172),
+(59178),
+(59179),
+(59180),
+(59182),
+(59185),
+(59186),
+(59187),
+(59191),
+(59192),
+(59199),
+(59209),
+(59210),
+(59211),
+(59215),
+(59220),
+(59223),
+(59225),
+(59226),
+(59228),
+(59233),
+(59235),
+(59237),
+(59239),
+(59241),
+(59242),
+(59243),
+(59244),
+(59246),
+(59247),
+(59248),
+(59249),
+(59251),
+(59252),
+(59254),
+(59256),
+(59257),
+(59259),
+(59260),
+(59261),
+(59262),
+(59263),
+(59264),
+(59265),
+(59268),
+(59269),
+(59270),
+(59271),
+(59273),
+(59280),
+(59288),
+(59290),
+(59300),
+(59304),
+(59318),
+(59319),
+(59324),
+(59325),
+(59329),
+(59330),
+(59331),
+(59342),
+(59343),
+(59344),
+(59346),
+(59347),
+(59348),
+(59350),
+(59351),
+(59352),
+(59355),
+(59357),
+(59359),
+(59361),
+(59362),
+(59364),
+(59367),
+(59371),
+(59373),
+(59374),
+(59376),
+(59381),
+(59389),
+(59391),
+(59392),
+(59395),
+(59397),
+(59398),
+(59399),
+(59400),
+(59401),
+(59402),
+(59408),
+(59409),
+(59412),
+(59413),
+(59423),
+(59432),
+(59434),
+(59439),
+(59444),
+(59448),
+(59455),
+(59460),
+(59467),
+(59468),
+(59471),
+(59482),
+(59485),
+(59513),
+(59515),
+(59517),
+(59519),
+(59520),
+(59525),
+(59530),
+(59542),
+(59543),
+(59544),
+(59545),
+(59547),
+(59548),
+(59557),
+(59558),
+(59563),
+(59575),
+(59577),
+(59590),
+(59593),
+(59594),
+(59599),
+(59603),
+(59604),
+(59605),
+(59606),
+(59607),
+(59608),
+(59610),
+(59611),
+(59616),
+(59617),
+(59633),
+(59634),
+(59637),
+(59638),
+(59651),
+(59653),
+(59656),
+(59661),
+(59663),
+(59679),
+(59682),
+(59683),
+(59684),
+(59685),
+(59691),
+(59695),
+(59696),
+(59700),
+(59703),
+(59710),
+(59712),
+(59713),
+(59715),
+(59716),
+(59717),
+(59718),
+(59723),
+(59727),
+(59735),
+(59736),
+(59742),
+(59743),
+(59746),
+(59750),
+(59760),
+(59762),
+(59763),
+(59765),
+(59766),
+(59767),
+(59769),
+(59779),
+(59795),
+(59805),
+(59812),
+(59813),
+(59814),
+(59815),
+(59817),
+(59823),
+(59826),
+(59827),
+(59832),
+(59839),
+(59840),
+(59841),
+(59844),
+(59846),
+(59851),
+(59852),
+(59855),
+(59856),
+(59863),
+(59864),
+(59877),
+(59879),
+(59881),
+(59882),
+(59883),
+(59884),
+(59885),
+(59886),
+(59894),
+(59901),
+(59921),
+(59963),
+(59965),
+(59972),
+(59974),
+(59978),
+(59982),
+(59984),
+(59985),
+(59986),
+(59987),
+(59988),
+(59989),
+(59991),
+(59992),
+(59993),
+(59994),
+(59997),
+(59999),
+(60003),
+(60004),
+(60005),
+(60006),
+(60008),
+(60009),
+(60011),
+(60012),
+(60013),
+(60015),
+(60016),
+(60017),
+(60018),
+(60032),
+(60035),
+(60039),
+(60041),
+(60043),
+(60051),
+(60052),
+(60053),
+(60067),
+(60073),
+(60076),
+(60078),
+(60079),
+(60080),
+(60085),
+(60089),
+(60100),
+(60103),
+(60106),
+(60107),
+(60111),
+(60112),
+(60115),
+(60117),
+(60122),
+(60123),
+(60127),
+(60129),
+(60181),
+(60183),
+(60186),
+(60194),
+(60195),
+(60197),
+(60203),
+(60204),
+(60210),
+(60211),
+(60212),
+(60229),
+(60233),
+(60234),
+(60235),
+(60236),
+(60239),
+(60241),
+(60300),
+(60307),
+(60309),
+(60339),
+(60351),
+(60352),
+(60428),
+(60431),
+(60432),
+(60433),
+(60440),
+(60443),
+(60446),
+(60447),
+(60450),
+(60452),
+(60453),
+(60472),
+(60474),
+(60483),
+(60488),
+(60500),
+(60504),
+(60505),
+(60506),
+(60518),
+(60526),
+(60530),
+(60540),
+(60541),
+(60542),
+(60578),
+(60580),
+(60585),
+(60588),
+(60590),
+(60626),
+(60642),
+(60644),
+(60646),
+(60654),
+(60672),
+(60678),
+(60682),
+(60683),
+(60699),
+(60708),
+(60742),
+(60753),
+(60781),
+(60782),
+(60784),
+(60785),
+(60786),
+(60790),
+(60802),
+(60803),
+(60805),
+(60809),
+(60814),
+(60817),
+(60842),
+(60844),
+(60850),
+(60856),
+(60857),
+(60859),
+(60868),
+(60869),
+(60870),
+(60871),
+(60872),
+(60873),
+(60876),
+(60880),
+(60882),
+(60890),
+(60896),
+(60897),
+(60898),
+(60899),
+(60900),
+(60901),
+(60905),
+(60906),
+(60917),
+(60918),
+(60924),
+(60926),
+(60927),
+(60930),
+(60932),
+(60935),
+(60940),
+(60941),
+(60944),
+(60945),
+(60946),
+(60947),
+(60949),
+(60950),
+(60951),
+(60952),
+(60954),
+(60959),
+(60961),
+(60962),
+(60963),
+(60965),
+(60968),
+(60972),
+(60973),
+(60979),
+(60980),
+(60981),
+(60982),
+(60983),
+(60988),
+(60991),
+(60995),
+(61001),
+(61005),
+(61006),
+(61016),
+(61018),
+(61024),
+(61025),
+(61029),
+(61034),
+(61036),
+(61039),
+(61041),
+(61042),
+(61046),
+(61048),
+(61051),
+(61064),
+(61070),
+(61077),
+(61080),
+(61083),
+(61087),
+(61091),
+(61094),
+(61100),
+(61101),
+(61103),
+(61109),
+(61110),
+(61111),
+(61115),
+(61123),
+(61124),
+(61127),
+(61129),
+(61133),
+(61140),
+(61143),
+(61159),
+(61160),
+(61162),
+(61164),
+(61166),
+(61168),
+(61171),
+(61172),
+(61173),
+(61176),
+(61178),
+(61182),
+(61186),
+(61187),
+(61191),
+(61193),
+(61194),
+(61195),
+(61196),
+(61197),
+(61198),
+(61209),
+(61211),
+(61213),
+(61215),
+(61218),
+(61223),
+(61226),
+(61242),
+(61243),
+(61244),
+(61253),
+(61259),
+(61260),
+(61263),
+(61269),
+(61272),
+(61281),
+(61282),
+(61286),
+(61287),
+(61291),
+(61295),
+(61296),
+(61299),
+(61300),
+(61301),
+(61302),
+(61305),
+(61314),
+(61319),
+(61320),
+(61326),
+(61327),
+(61343),
+(61344),
+(61347),
+(61352),
+(61358),
+(61372),
+(61373),
+(61374),
+(61375),
+(61380),
+(61381),
+(61382),
+(61385),
+(61395),
+(61398),
+(61399),
+(61409),
+(61411),
+(61415),
+(61419),
+(61420),
+(61421),
+(61423),
+(61424),
+(61443),
+(61445),
+(61448),
+(61454),
+(61457),
+(61461),
+(61466),
+(61474),
+(61479),
+(61480),
+(61486),
+(61490),
+(61491),
+(61493),
+(61507),
+(61511),
+(61512),
+(61515),
+(61528),
+(61545),
+(61549),
+(61550),
+(61552),
+(61554),
+(61556),
+(61558),
+(61561),
+(61562),
+(61563),
+(61565),
+(61567),
+(61569),
+(61572),
+(61579),
+(61584),
+(61590),
+(61592),
+(61593),
+(61596),
+(61597),
+(61599),
+(61600),
+(61601),
+(61604),
+(61606),
+(61607),
+(61613),
+(61621),
+(61623),
+(61624),
+(61626),
+(61627),
+(61628),
+(61634),
+(61635),
+(61662),
+(61663),
+(61666),
+(61667),
+(61668),
+(61676),
+(61685),
+(61696),
+(61705),
+(61712),
+(61716),
+(61721),
+(61728),
+(61729),
+(61730),
+(61733),
+(61747),
+(61767),
+(61780),
+(61781),
+(61789),
+(61791),
+(61793),
+(61794),
+(61795),
+(61796),
+(61797),
+(61798),
+(61799),
+(61800),
+(61801),
+(61802),
+(61804),
+(61805),
+(61806),
+(61807),
+(61808),
+(61815),
+(61817),
+(61819),
+(61821),
+(61822),
+(61823),
+(61824),
+(61825),
+(61832),
+(61833),
+(61834),
+(61835),
+(61836),
+(61837),
+(61838),
+(61839),
+(61840),
+(61841),
+(61842),
+(61843),
+(61844),
+(61845),
+(61849),
+(61857),
+(61859),
+(61862),
+(61866),
+(61868),
+(61870),
+(61873),
+(61879),
+(61880),
+(61881),
+(61888),
+(61893),
+(61895),
+(61896),
+(61897),
+(61903),
+(61909),
+(61911),
+(61912),
+(61923),
+(61924),
+(61925),
+(61926),
+(61927),
+(61928),
+(61929),
+(61965),
+(61967),
+(61973),
+(61998),
+(62014),
+(62026),
+(62030),
+(62036),
+(62053),
+(62063),
+(62078),
+(62089),
+(62103),
+(62105),
+(62117),
+(62118),
+(62119),
+(62120),
+(62121),
+(62122),
+(62124),
+(62128),
+(62129),
+(62130),
+(62131),
+(62138),
+(62167),
+(62169),
+(62195),
+(62198),
+(62204),
+(62225),
+(62226),
+(62249),
+(62250),
+(62261),
+(62264),
+(62265),
+(62280),
+(62292),
+(62298),
+(62305),
+(62309),
+(62310),
+(62312),
+(62315),
+(62316),
+(62317),
+(62318),
+(62322),
+(62326),
+(62327),
+(62328),
+(62331),
+(62332),
+(62333),
+(62334),
+(62335),
+(62342),
+(62347),
+(62354),
+(62356),
+(62368),
+(62372),
+(62373),
+(62382),
+(62395),
+(62401),
+(62402),
+(62415),
+(62417),
+(62418),
+(62420),
+(62441),
+(62442),
+(62443),
+(62444),
+(62445),
+(62446),
+(62455),
+(62456),
+(62466),
+(62479),
+(62482),
+(62503),
+(62507),
+(62526),
+(62531),
+(62536),
+(62540),
+(62544),
+(62554),
+(62563),
+(62575),
+(62581),
+(62583),
+(62589),
+(62601),
+(62607),
+(62608),
+(62611),
+(62613),
+(62614),
+(62626),
+(62638),
+(62648),
+(62649),
+(62653),
+(62658),
+(62672),
+(62673),
+(62707),
+(62708),
+(62711),
+(62717),
+(62722),
+(62726),
+(62732),
+(62767),
+(62768),
+(62769),
+(62793),
+(62796),
+(62806),
+(62832),
+(62836),
+(62844),
+(62845),
+(62846),
+(62854),
+(62855),
+(62863),
+(62867),
+(62874),
+(62875),
+(62881),
+(62900),
+(62901),
+(62902),
+(62903),
+(62904),
+(62928),
+(62935),
+(62938),
+(62939),
+(62960),
+(62961),
+(62989),
+(62997),
+(62998),
+(63003),
+(63010),
+(63012),
+(63028),
+(63034),
+(63035),
+(63036),
+(63047),
+(63082),
+(63094),
+(63103),
+(63104),
+(63105),
+(63111),
+(63112),
+(63120),
+(63124),
+(63125),
+(63126),
+(63127),
+(63134),
+(63136),
+(63138),
+(63147),
+(63151),
+(63169),
+(63171),
+(63172),
+(63174),
+(63175),
+(63177),
+(63178),
+(63179),
+(63180),
+(63183),
+(63184),
+(63185),
+(63216),
+(63221),
+(63226),
+(63228),
+(63233),
+(63240),
+(63242),
+(63259),
+(63276),
+(63278),
+(63301),
+(63311),
+(63313),
+(63314),
+(63315),
+(63316),
+(63336),
+(63337),
+(63338),
+(63344),
+(63345),
+(63356),
+(63359),
+(63361),
+(63362),
+(63363),
+(63380),
+(63382),
+(63413),
+(63416),
+(63418),
+(63459),
+(63462),
+(63463),
+(63464),
+(63465),
+(63466),
+(63468),
+(63477),
+(63479),
+(63487),
+(63493),
+(63494),
+(63495),
+(63511),
+(63518),
+(63519),
+(63529),
+(63535),
+(63536),
+(63544),
+(63549),
+(63550),
+(63551),
+(63553),
+(63556),
+(63559),
+(63562),
+(63564),
+(63569),
+(63571),
+(63573),
+(63575),
+(63599),
+(63605),
+(63612),
+(63615),
+(63619),
+(63652),
+(63653),
+(63654),
+(63655),
+(63661),
+(63668),
+(63669),
+(63670),
+(63671),
+(63672),
+(63673),
+(63675),
+(63678),
+(63685),
+(63689),
+(63691),
+(63699),
+(63700),
+(63716),
+(63728),
+(63736),
+(63738),
+(63754),
+(63755),
+(63759),
+(63760),
+(63789),
+(63803),
+(63804),
+(63809),
+(63815),
+(63823),
+(63825),
+(63827),
+(63845),
+(63846),
+(63852),
+(63861),
+(63913),
+(63914),
+(63915),
+(63916),
+(63917),
+(63918),
+(63919),
+(63920),
+(63921),
+(63922),
+(63923),
+(63931),
+(63980),
+(63989),
+(63993),
+(63995),
+(63997),
+(63998),
+(64003),
+(64005),
+(64006),
+(64014),
+(64024),
+(64025),
+(64026),
+(64027),
+(64028),
+(64029),
+(64030),
+(64031),
+(64032),
+(64034),
+(64036),
+(64039),
+(64044),
+(64058),
+(64065),
+(64085),
+(64090),
+(64097),
+(64102),
+(64104),
+(64107),
+(64113),
+(64114),
+(64115),
+(64119),
+(64123),
+(64128),
+(64134),
+(64136),
+(64138),
+(64142),
+(64151),
+(64152),
+(64153),
+(64156),
+(64157),
+(64159),
+(64160),
+(64186),
+(64204),
+(64211),
+(64212),
+(64213),
+(64215),
+(64230),
+(64269),
+(64324),
+(64328),
+(64330),
+(64331),
+(64332),
+(64333),
+(64334),
+(64335),
+(64336),
+(64337),
+(64338),
+(64339),
+(64342),
+(64346),
+(64363),
+(64365),
+(64367),
+(64374),
+(64375),
+(64376),
+(64377),
+(64380),
+(64382),
+(64387),
+(64388),
+(64390),
+(64391),
+(64395),
+(64396),
+(64412),
+(64413),
+(64429),
+(64430),
+(64442),
+(64467),
+(64478),
+(64496),
+(64499),
+(64501),
+(64507),
+(64528),
+(64529),
+(64535),
+(64542),
+(64552),
+(64580),
+(64583),
+(64588),
+(64590),
+(64591),
+(64592),
+(64595),
+(64627),
+(64637),
+(64638),
+(64640),
+(64646),
+(64647),
+(64648),
+(64649),
+(64654),
+(64665),
+(64666),
+(64667),
+(64668),
+(64669),
+(64674),
+(64682),
+(64686),
+(64692),
+(64696),
+(64698),
+(64699),
+(64705),
+(64719),
+(64740),
+(64757),
+(64758),
+(64759),
+(64766),
+(64768),
+(64771),
+(64773),
+(64776),
+(64780),
+(64787),
+(64795),
+(64798),
+(64801),
+(64806),
+(64807),
+(64821),
+(64841),
+(64870),
+(64874),
+(64876),
+(64888),
+(64891),
+(64903),
+(64909),
+(64918),
+(64930),
+(64953),
+(64967),
+(64970),
+(64971),
+(64974),
+(64978),
+(64991),
+(65030),
+(65031),
+(65033),
+(65035),
+(65036),
+(65038),
+(65039),
+(65040),
+(65042),
+(65054),
+(65055),
+(65056),
+(65057),
+(65058),
+(65059),
+(65061),
+(65062),
+(65071),
+(65080),
+(65081),
+(65104),
+(65111),
+(65113),
+(65122),
+(65123),
+(65131),
+(65133),
+(65147),
+(65162),
+(65201),
+(65210),
+(65240),
+(65266),
+(65280),
+(65343),
+(65351),
+(65359),
+(65360),
+(65374),
+(65378),
+(65379),
+(65386),
+(65391),
+(65392),
+(65403),
+(65431),
+(65488),
+(65490),
+(65492),
+(65502),
+(65503),
+(65512),
+(65513),
+(65516),
+(65531),
+(65532),
+(65541),
+(65542),
+(65545),
+(65546),
+(65564),
+(65565),
+(65575),
+(65576),
+(65577),
+(65634),
+(65635),
+(65636),
+(65647),
+(65648),
+(65693),
+(65694),
+(65703),
+(65720),
+(65722),
+(65723),
+(65728),
+(65729),
+(65744),
+(65754),
+(65775),
+(65778),
+(65782),
+(65790),
+(65791),
+(65799),
+(65801),
+(65807),
+(65809),
+(65810),
+(65812),
+(65813),
+(65814),
+(65815),
+(65819),
+(65820),
+(65821),
+(65825),
+(65826),
+(65854),
+(65855),
+(65856),
+(65857),
+(65859),
+(65862),
+(65863),
+(65866),
+(65867),
+(65868),
+(65877),
+(65878),
+(65881),
+(65883),
+(65918),
+(65924),
+(65926),
+(65927),
+(65929),
+(65930),
+(65931),
+(65934),
+(65935),
+(65936),
+(65940),
+(65941),
+(65954),
+(65957),
+(65960),
+(65962),
+(65970),
+(65971),
+(65972),
+(65973),
+(65974),
+(65978),
+(65987),
+(65998),
+(66003),
+(66005),
+(66007),
+(66008),
+(66009),
+(66012),
+(66017),
+(66018),
+(66019),
+(66020),
+(66021),
+(66042),
+(66043),
+(66045),
+(66047),
+(66053),
+(66054),
+(66055),
+(66056),
+(66057),
+(66063),
+(66065),
+(66066),
+(66067),
+(66068),
+(66069),
+(66070),
+(66072),
+(66075),
+(66079),
+(66081),
+(66093),
+(66095),
+(66097),
+(66099),
+(66100),
+(66104),
+(66109),
+(66112),
+(66113),
+(66114),
+(66115),
+(66116),
+(66125),
+(66126),
+(66134),
+(66154),
+(66177),
+(66188),
+(66196),
+(66197),
+(66198),
+(66206),
+(66207),
+(66209),
+(66213),
+(66215),
+(66216),
+(66217),
+(66236),
+(66237),
+(66240),
+(66243),
+(66244),
+(66245),
+(66250),
+(66259),
+(66260),
+(66261),
+(66262),
+(66265),
+(66283),
+(66285),
+(66290),
+(66291),
+(66292),
+(66293),
+(66294),
+(66295),
+(66313),
+(66326),
+(66331),
+(66334),
+(66342),
+(66359),
+(66377),
+(66378),
+(66407),
+(66408),
+(66409),
+(66410),
+(66417),
+(66420),
+(66423),
+(66425),
+(66457),
+(66460),
+(66461),
+(66474),
+(66477),
+(66479),
+(66480),
+(66481),
+(66489),
+(66493),
+(66516),
+(66528),
+(66532),
+(66533),
+(66536),
+(66537),
+(66538),
+(66548),
+(66549),
+(66588),
+(66592),
+(66593),
+(66594),
+(66595),
+(66596),
+(66613),
+(66619),
+(66620),
+(66629),
+(66638),
+(66666),
+(66668),
+(66669),
+(66686),
+(66687),
+(66688),
+(66689),
+(66716),
+(66717),
+(66719),
+(66733),
+(66735),
+(66736),
+(66742),
+(66744),
+(66765),
+(66770),
+(66773),
+(66777),
+(66784),
+(66796),
+(66797),
+(66809),
+(66813),
+(66823),
+(66824),
+(66863),
+(66867),
+(66869),
+(66879),
+(66880),
+(66887),
+(66888),
+(66890),
+(66891),
+(66892),
+(66899),
+(66903),
+(66904),
+(66922),
+(66940),
+(66941),
+(66950),
+(66951),
+(66952),
+(66953),
+(66954),
+(66955),
+(66957),
+(66958),
+(66959),
+(66960),
+(66961),
+(66962),
+(66963),
+(66964),
+(66965),
+(66972),
+(66973),
+(66974),
+(66975),
+(66976),
+(66977),
+(66978),
+(66979),
+(66988),
+(66989),
+(66990),
+(66991),
+(66992),
+(66994),
+(67029),
+(67030),
+(67031),
+(67033),
+(67035),
+(67049),
+(67050),
+(67051),
+(67073),
+(67074),
+(67075),
+(67088),
+(67089),
+(67090),
+(67097),
+(67098),
+(67099),
+(67114),
+(67148),
+(67229),
+(67235),
+(67237),
+(67247),
+(67252),
+(67253),
+(67280),
+(67289),
+(67290),
+(67309),
+(67310),
+(67311),
+(67312),
+(67313),
+(67314),
+(67324),
+(67325),
+(67330),
+(67331),
+(67333),
+(67366),
+(67372),
+(67373),
+(67387),
+(67390),
+(67477),
+(67478),
+(67479),
+(67480),
+(67481),
+(67485),
+(67518),
+(67519),
+(67528),
+(67529),
+(67530),
+(67531),
+(67532),
+(67533),
+(67534),
+(67540),
+(67542),
+(67550),
+(67554),
+(67560),
+(67573),
+(67574),
+(67577),
+(67606),
+(67607),
+(67608),
+(67612),
+(67613),
+(67614),
+(67618),
+(67619),
+(67620),
+(67624),
+(67625),
+(67626),
+(67632),
+(67633),
+(67634),
+(67650),
+(67651),
+(67652),
+(67654),
+(67655),
+(67656),
+(67674),
+(67675),
+(67676),
+(67678),
+(67679),
+(67680),
+(67686),
+(67703),
+(67708),
+(67709),
+(67710),
+(67714),
+(67718),
+(67719),
+(67721),
+(67722),
+(67724),
+(67725),
+(67730),
+(67745),
+(67749),
+(67760),
+(67767),
+(67772),
+(67773),
+(67774),
+(67793),
+(67799),
+(67810),
+(67811),
+(67817),
+(67818),
+(67819),
+(67821),
+(67823),
+(67830),
+(67834),
+(67835),
+(67836),
+(67837),
+(67838),
+(67846),
+(67847),
+(67861),
+(67862),
+(67863),
+(67878),
+(67879),
+(67880),
+(67881),
+(67882),
+(67883),
+(67884),
+(67885),
+(67891),
+(67892),
+(67905),
+(67906),
+(67907),
+(67929),
+(67930),
+(67931),
+(67932),
+(67933),
+(67934),
+(67935),
+(67936),
+(67937),
+(67938),
+(67939),
+(67940),
+(67941),
+(67942),
+(67943),
+(67944),
+(67945),
+(67946),
+(67947),
+(67948),
+(67949),
+(67951),
+(67952),
+(67953),
+(67957),
+(67958),
+(67959),
+(67965),
+(67966),
+(67967),
+(67968),
+(67969),
+(67970),
+(67971),
+(67972),
+(67973),
+(67977),
+(67978),
+(67979),
+(67980),
+(67981),
+(67982),
+(67983),
+(67984),
+(67985),
+(67988),
+(67989),
+(67990),
+(67991),
+(67992),
+(67993),
+(67994),
+(67995),
+(67996),
+(67997),
+(67998),
+(67999),
+(68003),
+(68004),
+(68005),
+(68008),
+(68009),
+(68010),
+(68011),
+(68012),
+(68013),
+(68014),
+(68015),
+(68016),
+(68017),
+(68018),
+(68019),
+(68023),
+(68024),
+(68025),
+(68026),
+(68027),
+(68028),
+(68032),
+(68033),
+(68034),
+(68035),
+(68036),
+(68037),
+(68038),
+(68039),
+(68040),
+(68042),
+(68043),
+(68044),
+(68055),
+(68073),
+(68077),
+(68078),
+(68081),
+(68088),
+(68089),
+(68090),
+(68091),
+(68092),
+(68093),
+(68094),
+(68095),
+(68096),
+(68100),
+(68101),
+(68102),
+(68106),
+(68107),
+(68108),
+(68109),
+(68110),
+(68111),
+(68112),
+(68113),
+(68114),
+(68115),
+(68116),
+(68117),
+(68118),
+(68119),
+(68120),
+(68123),
+(68124),
+(68125),
+(68130),
+(68133),
+(68134),
+(68135),
+(68136),
+(68137),
+(68138),
+(68139),
+(68140),
+(68141),
+(68148),
+(68149),
+(68150),
+(68151),
+(68152),
+(68153),
+(68154),
+(68155),
+(68156),
+(68157),
+(68158),
+(68159),
+(68272),
+(68282),
+(68284),
+(68301),
+(68306),
+(68307),
+(68310),
+(68311),
+(68313),
+(68315),
+(68317),
+(68318),
+(68319),
+(68321),
+(68328),
+(68333),
+(68334),
+(68340),
+(68341),
+(68350),
+(68357),
+(68362),
+(68363),
+(68364),
+(68365),
+(68372),
+(68391),
+(68415),
+(68458),
+(68472),
+(68478),
+(68479),
+(68498),
+(68501),
+(68502),
+(68503),
+(68504),
+(68505),
+(68550),
+(68551),
+(68586),
+(68587),
+(68588),
+(68607),
+(68621),
+(68622),
+(68623),
+(68624),
+(68625),
+(68626),
+(68627),
+(68628),
+(68629),
+(68727),
+(68753),
+(68754),
+(68755),
+(68756),
+(68757),
+(68758),
+(68762),
+(68763),
+(68764),
+(68778),
+(68781),
+(68782),
+(68783),
+(68784),
+(68788),
+(68799),
+(68812),
+(68834),
+(68839),
+(68841),
+(68843),
+(68868),
+(68879),
+(68884),
+(68900),
+(68915),
+(68927),
+(68934),
+(68948),
+(68966),
+(68971),
+(68980),
+(68982),
+(68984),
+(68985),
+(68991),
+(69000),
+(69003),
+(69021),
+(69023),
+(69028),
+(69034),
+(69038),
+(69051),
+(69058),
+(69063),
+(69065),
+(69066),
+(69067),
+(69068),
+(69088),
+(69091),
+(69124),
+(69128),
+(69130),
+(69131),
+(69133),
+(69137),
+(69138),
+(69153),
+(69155),
+(69156),
+(69158),
+(69160),
+(69172),
+(69180),
+(69181),
+(69189),
+(69190),
+(69198),
+(69200),
+(69209),
+(69210),
+(69211),
+(69212),
+(69218),
+(69222),
+(69232),
+(69243),
+(69246),
+(69274),
+(69275),
+(69276),
+(69285),
+(69308),
+(69342),
+(69352),
+(69387),
+(69389),
+(69391),
+(69397),
+(69398),
+(69403),
+(69404),
+(69405),
+(69406),
+(69409),
+(69410),
+(69416),
+(69420),
+(69427),
+(69438),
+(69445),
+(69455),
+(69483),
+(69489),
+(69492),
+(69496),
+(69497),
+(69498),
+(69499),
+(69500),
+(69501),
+(69503),
+(69504),
+(69520),
+(69528),
+(69542),
+(69543),
+(69544),
+(69548),
+(69563),
+(69564),
+(69566),
+(69567),
+(69569),
+(69570),
+(69572),
+(69573),
+(69574),
+(69576),
+(69577),
+(69578),
+(69579),
+(69581),
+(69583),
+(69603),
+(69617),
+(69623),
+(69627),
+(69633),
+(69644),
+(69651),
+(69668),
+(69672),
+(69673),
+(69675),
+(69681),
+(69692),
+(69693),
+(69696),
+(69699),
+(69710),
+(69722),
+(69724),
+(69726),
+(69729),
+(69730),
+(69731),
+(69733),
+(69734),
+(69771),
+(69772),
+(69779),
+(69828),
+(69837),
+(69856),
+(69861),
+(69866),
+(69869),
+(69871),
+(69882),
+(69889),
+(69891),
+(69892),
+(69893),
+(69896),
+(69898),
+(69899),
+(69902),
+(69903),
+(69906),
+(69910),
+(69911),
+(69912),
+(69916),
+(69917),
+(69920),
+(69923),
+(69926),
+(69927),
+(69933),
+(69956),
+(69958),
+(69961),
+(69963),
+(69967),
+(69968),
+(69969),
+(69970),
+(69972),
+(69973),
+(69974),
+(69975),
+(69984),
+(69989),
+(70002),
+(70043),
+(70070),
+(70074),
+(70080),
+(70110),
+(70119),
+(70122),
+(70126),
+(70141),
+(70144),
+(70153),
+(70161),
+(70162),
+(70182),
+(70183),
+(70191),
+(70192),
+(70196),
+(70205),
+(70208),
+(70211),
+(70213),
+(70227),
+(70269),
+(70270),
+(70271),
+(70273),
+(70275),
+(70276),
+(70277),
+(70278),
+(70279),
+(70280),
+(70281),
+(70282),
+(70285),
+(70289),
+(70292),
+(70296),
+(70302),
+(70304),
+(70308),
+(70309),
+(70320),
+(70322),
+(70327),
+(70333),
+(70337),
+(70355),
+(70361),
+(70381),
+(70386),
+(70387),
+(70388),
+(70391),
+(70393),
+(70396),
+(70400),
+(70408),
+(70409),
+(70410),
+(70423),
+(70428),
+(70429),
+(70432),
+(70435),
+(70437),
+(70445),
+(70449),
+(70451),
+(70453),
+(70495),
+(70510),
+(70516),
+(70525),
+(70538),
+(70539),
+(70540),
+(70542),
+(70583),
+(70594),
+(70599),
+(70616),
+(70639),
+(70640),
+(70645),
+(70646),
+(70648),
+(70653),
+(70656),
+(70659),
+(70698),
+(70746),
+(70751),
+(70754),
+(70772),
+(70781),
+(70802),
+(70809),
+(70821),
+(70838),
+(70856),
+(70857),
+(70858),
+(70859),
+(70860),
+(70861),
+(70864),
+(70867),
+(70886),
+(70890),
+(70895),
+(70896),
+(70897),
+(70906),
+(70917),
+(70923),
+(70928),
+(70929),
+(70942),
+(70946),
+(70964),
+(70965),
+(70971),
+(70972),
+(70973),
+(70974),
+(70980),
+(71003),
+(71004),
+(71005),
+(71006),
+(71020),
+(71021),
+(71023),
+(71038),
+(71040),
+(71041),
+(71087),
+(71089),
+(71090),
+(71103),
+(71107),
+(71108),
+(71112),
+(71116),
+(71117),
+(71119),
+(71120),
+(71121),
+(71124),
+(71126),
+(71127),
+(71129),
+(71130),
+(71131),
+(71133),
+(71135),
+(71136),
+(71138),
+(71140),
+(71141),
+(71142),
+(71143),
+(71144),
+(71145),
+(71146),
+(71148),
+(71153),
+(71154),
+(71155),
+(71157),
+(71163),
+(71164),
+(71169),
+(71203),
+(71204),
+(71237),
+(71248),
+(71253),
+(71254),
+(71257),
+(71264),
+(71289),
+(71291),
+(71296),
+(71297),
+(71298),
+(71316),
+(71317),
+(71318),
+(71319),
+(71326),
+(71327),
+(71328),
+(71330),
+(71331),
+(71335),
+(71339),
+(71340),
+(71350),
+(71361),
+(71362),
+(71363),
+(71392),
+(71405),
+(71410),
+(71420),
+(71433),
+(71434),
+(71443),
+(71446),
+(71450),
+(71459),
+(71462),
+(71466),
+(71473),
+(71475),
+(71476),
+(71477),
+(71478),
+(71479),
+(71480),
+(71488),
+(71489),
+(71490),
+(71500),
+(71501),
+(71504),
+(71510),
+(71512),
+(71522),
+(71532),
+(71533),
+(71539),
+(71544),
+(71546),
+(71547),
+(71548),
+(71549),
+(71551),
+(71552),
+(71553),
+(71554),
+(71590),
+(71591),
+(71594),
+(71595),
+(71607),
+(71623),
+(71624),
+(71625),
+(71626),
+(71646),
+(71647),
+(71686),
+(71687),
+(71688),
+(71713),
+(71715),
+(71726),
+(71727),
+(71728),
+(71729),
+(71738),
+(71745),
+(71748),
+(71750),
+(71752),
+(71757),
+(71758),
+(71759),
+(71760),
+(71778),
+(71779),
+(71780),
+(71781),
+(71782),
+(71783),
+(71784),
+(71785),
+(71786),
+(71788),
+(71789),
+(71801),
+(71806),
+(71807),
+(71815),
+(71818),
+(71819),
+(71820),
+(71821),
+(71822),
+(71823),
+(71824),
+(71825),
+(71834),
+(71838),
+(71839),
+(71841),
+(71842),
+(71847),
+(71864),
+(71866),
+(71874),
+(71879),
+(71909),
+(71923),
+(71924),
+(71925),
+(71926),
+(71927),
+(71928),
+(71930),
+(71931),
+(71932),
+(71933),
+(71934),
+(71936),
+(71937),
+(71938),
+(71951),
+(71954),
+(71955),
+(71972),
+(71988),
+(72004),
+(72005),
+(72007),
+(72008),
+(72010),
+(72021),
+(72022),
+(72023),
+(72024),
+(72057),
+(72065),
+(72066),
+(72098),
+(72106),
+(72120),
+(72121),
+(72123),
+(72124),
+(72133),
+(72163),
+(72164),
+(72166),
+(72167),
+(72171),
+(72194),
+(72196),
+(72198),
+(72208),
+(72211),
+(72218),
+(72219),
+(72222),
+(72231),
+(72258),
+(72264),
+(72265),
+(72266),
+(72267),
+(72268),
+(72269),
+(72293),
+(72301),
+(72302),
+(72303),
+(72304),
+(72313),
+(72318),
+(72319),
+(72321),
+(72322),
+(72324),
+(72326),
+(72327),
+(72329),
+(72330),
+(72333),
+(72334),
+(72335),
+(72336),
+(72360),
+(72366),
+(72367),
+(72368),
+(72369),
+(72373),
+(72400),
+(72409),
+(72410),
+(72421),
+(72422),
+(72423),
+(72424),
+(72426),
+(72427),
+(72434),
+(72437),
+(72447),
+(72448),
+(72449),
+(72451),
+(72453),
+(72457),
+(72463),
+(72465),
+(72484),
+(72485),
+(72486),
+(72487),
+(72488),
+(72489),
+(72490),
+(72491),
+(72492),
+(72501),
+(72502),
+(72503),
+(72504),
+(72531),
+(72539),
+(72540),
+(72541),
+(72551),
+(72552),
+(72553),
+(72556),
+(72558),
+(72566),
+(72567),
+(72568),
+(72569),
+(72570),
+(72571),
+(72586),
+(72588),
+(72590),
+(72597),
+(72613),
+(72617),
+(72645),
+(72671),
+(72672),
+(72688),
+(72728),
+(72756),
+(72796),
+(72797),
+(72798),
+(72804),
+(72805),
+(72806),
+(72809),
+(72810),
+(72811),
+(72847),
+(72848),
+(72865),
+(72875),
+(72876),
+(72879),
+(72883),
+(72898),
+(72901),
+(72930),
+(72960),
+(72961),
+(72963),
+(72964),
+(72965),
+(72966),
+(72967),
+(72985),
+(72995),
+(73003),
+(73040),
+(73075),
+(73076),
+(73079),
+(73395),
+(73412),
+(73488),
+(73489),
+(73491),
+(73492),
+(73499),
+(73536),
+(73574),
+(73712),
+(73771),
+(73772),
+(73782),
+(73783),
+(73784),
+(73788),
+(73789),
+(73790),
+(73797),
+(73798),
+(73799),
+(73830),
+(73832),
+(73833),
+(73879),
+(73896),
+(73906),
+(73912),
+(73913),
+(73914),
+(73943),
+(73952),
+(73985),
+(74035),
+(74046),
+(74062),
+(74080),
+(74111),
+(74162),
+(74163),
+(74164),
+(74166),
+(74184),
+(74185),
+(74222),
+(74307),
+(74325),
+(74326),
+(74327),
+(74347),
+(74367),
+(74394),
+(74395),
+(74403),
+(74404),
+(74413),
+(74414),
+(74417),
+(74421),
+(74422),
+(74424),
+(74438),
+(74445),
+(74451),
+(74453),
+(74454),
+(74470),
+(74485),
+(74502),
+(74506),
+(74507),
+(74524),
+(74562),
+(74710),
+(74749),
+(74762),
+(74768),
+(74772),
+(74774),
+(74792),
+(74797),
+(74807),
+(74812),
+(74904),
+(74905),
+(74913),
+(74978),
+(74982),
+(75055),
+(75058),
+(75082),
+(75086),
+(75088),
+(75102),
+(75159),
+(75160),
+(75161),
+(75163),
+(75168),
+(75182),
+(75185),
+(75186),
+(75188),
+(75209),
+(75213),
+(75234),
+(75314),
+(75327),
+(75329),
+(75330),
+(75331),
+(75332),
+(75362),
+(75366),
+(75367),
+(75382),
+(75383),
+(75384),
+(75412),
+(75419),
+(75421),
+(75422),
+(75423),
+(75434),
+(75459),
+(75493),
+(75494),
+(75648),
+(75731),
+(75760),
+(75780),
+(75888),
+(75889),
+(75953),
+(76096),
+(76221),
+(79187),
+(79397);
+CREATE TABLE `temp_cond_vals`
+(
+ `spellId` INT(11),
+ `elseGroup` INT(11) AUTO_INCREMENT,
+ `entry` INT(11),
+ `dead` INT(11),
+ `errorTextId` INT(11),
+ `comment` VARCHAR(255),
+ PRIMARY KEY (`spellId`, `elseGroup`)
+) ENGINE=MYISAM;
+
+CREATE TABLE `temp_item_spell`
+(
+ `itemId` INT(11),
+ `spellId` INT(11),
+ PRIMARY KEY (`itemId`, `spellId`)
+);
+
+CREATE TABLE `temp_item`
+(
+ `itemId` INT(11),
+ PRIMARY KEY (`itemId`)
+);
+
+INSERT INTO `temp_item` SELECT DISTINCT `SourceEntry` FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18;
+INSERT IGNORE INTO `temp_item_spell` SELECT `entry`, `spellid_1` FROM `item_template` WHERE `entry` IN (SELECT * FROM `temp_item`) AND `spellid_1` IN (SELECT * FROM `temp_convert_spells`);
+INSERT IGNORE INTO `temp_item_spell` SELECT `entry`, `spellid_2` FROM `item_template` WHERE `entry` IN (SELECT * FROM `temp_item`) AND `spellid_2` IN (SELECT * FROM `temp_convert_spells`);
+INSERT IGNORE INTO `temp_item_spell` SELECT `entry`, `spellid_3` FROM `item_template` WHERE `entry` IN (SELECT * FROM `temp_item`) AND `spellid_3` IN (SELECT * FROM `temp_convert_spells`);
+INSERT IGNORE INTO `temp_item_spell` SELECT `entry`, `spellid_4` FROM `item_template` WHERE `entry` IN (SELECT * FROM `temp_item`) AND `spellid_4` IN (SELECT * FROM `temp_convert_spells`);
+INSERT IGNORE INTO `temp_item_spell` SELECT `entry`, `spellid_5` FROM `item_template` WHERE `entry` IN (SELECT * FROM `temp_item`) AND `spellid_5` IN (SELECT * FROM `temp_convert_spells`);
+
+INSERT INTO `temp_cond_vals` (`spellId`, `entry`, `dead`, `errorTextId`, `comment`) SELECT DISTINCT (SELECT `spellId` FROM `temp_item_spell` WHERE `itemId` = `SourceEntry`), `ConditionValue2`, (`ConditionValue1` - 1), `ErrorTextId`, `Comment` FROM `conditions`
+WHERE `SourceTypeOrReferenceId` = 18;
+
+#use CONDITION_OBJECT_ENTRY instead of CONDITION_ITEM_TARGET
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `Comment`)
+SELECT DISTINCT 17, 0, `spellId`, 0, `elseGroup` - 1, 31, 1, 3, `entry`, 0, 0, `errorTextId`, `comment` FROM `temp_cond_vals`;
+#for CONDITION_ITEM_TARGET with ConditionValue1 = DEAD we're adding !CONDITION_ALIVE as a second requirement
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `Comment`)
+SELECT DISTINCT 17, 0, `spellId`, 0, `elseGroup` - 1, 36, 1, 0, 0, 0, 1, `errorTextId`, `comment` FROM `temp_cond_vals` WHERE `dead`;
+#remove entries which could be converted by this sql
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18 AND `SourceEntry` IN (SELECT `itemId` FROM `temp_item_spell`);
+DROP TABLE `temp_convert_spells`;
+DROP TABLE `temp_cond_vals`;
+DROP TABLE `temp_item_spell`;
+DROP TABLE `temp_item`;
+
+ALTER TABLE conditions DROP PRIMARY KEY;
+ALTER TABLE conditions ADD PRIMARY KEY (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`);
diff --git a/sql/updates/world/2012_02_16_01_world_conditions.sql b/sql/updates/world/2012_02_16_01_world_conditions.sql
new file mode 100644
index 00000000000..4bcf997b8e4
--- /dev/null
+++ b/sql/updates/world/2012_02_16_01_world_conditions.sql
@@ -0,0 +1,3 @@
+UPDATE `conditions` SET ConditionValue3 = 0, ConditionTarget = 1 WHERE ConditionTypeOrReference = 1 AND ConditionValue3 = 1;
+UPDATE `conditions` SET ConditionTypeOrReference = 31, ConditionValue2 = ConditionValue1, ConditionValue1 = 3, ConditionTarget = 1 WHERE ConditionTypeOrReference = 19;
+UPDATE `conditions` SET ConditionTypeOrReference = 38, ConditionValue2 = 4, ConditionTarget = 1 WHERE ConditionTypeOrReference = 20;
diff --git a/sql/updates/world/2012_02_17_00_world_waypoints.sql b/sql/updates/world/2012_02_17_00_world_waypoints.sql
new file mode 100644
index 00000000000..1cff86f5d51
--- /dev/null
+++ b/sql/updates/world/2012_02_17_00_world_waypoints.sql
@@ -0,0 +1,77 @@
+-- Pathing for Eye of Thrallmar
+SET @NPC :=57585;
+SET @PATH :=@NPC*10;
+UPDATE `creature` SET `position_x`=203.191,`position_y`=2850.286,`position_z`=160.4257,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,197.9876,2842.495,160.4257,0,0,0,100,0),
+(@PATH,2,212.5493,2807.971,174.2035,0,0,0,100,0),
+(@PATH,3,244.0748,2812.302,156.8424,0,0,0,100,0),
+(@PATH,4,262.963,2839.935,173.5923,0,0,0,100,0),
+(@PATH,5,249.0294,2865.575,155.9257,0,0,0,100,0),
+(@PATH,6,223.3671,2870.441,169.5924,0,0,0,100,0),
+(@PATH,7,203.191,2850.286,160.4257,0,0,0,100,0);
+
+-- Pathing for Eye of Thrallmar
+SET @NPC :=57586;
+SET @PATH :=@NPC*10;
+UPDATE `creature` SET `position_x`=210.6249,`position_y`=2809.285,`position_z`=208.7277,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,213.0469,2809.036,207.1722,0,0,0,100,0),
+(@PATH,2,223.5349,2797.282,213.4777,0,0,0,100,0),
+(@PATH,3,238.895,2805.732,213.4777,0,0,0,100,0),
+(@PATH,4,252.788,2818.183,213.4777,0,0,0,100,0),
+(@PATH,5,255.2734,2839.056,213.4777,0,0,0,100,0),
+(@PATH,6,245.0219,2851.84,213.4777,0,0,0,100,0),
+(@PATH,7,229.2117,2860.19,213.4777,0,0,0,100,0),
+(@PATH,8,213.6996,2851.376,206.5887,0,0,0,100,0),
+(@PATH,9,204.457,2828.248,199.6443,0,0,0,100,0),
+(@PATH,10,212.4397,2807.455,199.6443,0,0,0,100,0),
+(@PATH,11,241.3802,2813.464,199.6443,0,0,0,100,0),
+(@PATH,12,249.7797,2829.964,199.6443,0,0,0,100,0),
+(@PATH,13,244.951,2854.129,199.6443,0,0,0,100,0),
+(@PATH,14,221.8344,2856.781,199.6443,0,0,0,100,0),
+(@PATH,15,210.7503,2837.578,199.6443,0,0,0,100,0),
+(@PATH,16,210.6249,2809.285,208.7277,0,0,0,100,0);
+
+-- Pathing for Eye of Thrallmar
+SET @NPC :=57587;
+SET @PATH :=@NPC*10;
+UPDATE `creature` SET `position_x`=236.1859,`position_y`=2813.747,`position_z`=200.9708,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,241.7692,2815.284,200.8042,0,0,0,100,0),
+(@PATH,2,255.8273,2833.317,201.443,0,0,0,100,0),
+(@PATH,3,247.4309,2853.592,205.1653,0,0,0,100,0),
+(@PATH,4,223.9901,2858.107,208.5819,0,0,0,100,0),
+(@PATH,5,208.0596,2843.793,192.3596,0,0,0,100,0),
+(@PATH,6,213.9734,2816.793,188.4153,0,0,0,100,0),
+(@PATH,7,236.1859,2813.747,200.9708,0,0,0,100,0);
+
+-- Pathing for Eye of Thrallmar
+SET @NPC :=57588;
+SET @PATH :=@NPC*10;
+UPDATE `creature` SET `position_x`=245.9259,`position_y`=2829.09,`position_z`=177.804,`spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`) VALUES (@NPC,@PATH,1);
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,251.6207,2841.322,177.804,0,0,0,100,0),
+(@PATH,2,241.4914,2859.113,169.6652,0,0,0,100,0),
+(@PATH,3,214.9913,2858.249,176.3595,0,0,0,100,0),
+(@PATH,4,210.2245,2836.028,169.7762,0,0,0,100,0),
+(@PATH,5,225.7556,2822.145,169.9707,0,0,0,100,0),
+(@PATH,6,237.9712,2823.874,170.1096,0,0,0,100,0),
+(@PATH,7,245.9259,2829.09,177.804,0,0,0,100,0);
+
+DELETE FROM `creature` WHERE `guid`=57589;
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=16598;
+
+
diff --git a/sql/updates/world/2012_02_18_00_world_spell_script_names.sql b/sql/updates/world/2012_02_18_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..993fe3a2f38
--- /dev/null
+++ b/sql/updates/world/2012_02_18_00_world_spell_script_names.sql
@@ -0,0 +1,69 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` in (-100,-12162,13567,17251,23019,23448,23453,25860,28089,29200,29858,30458,30507,31225,35745,37674,39090,39093,39096,42784,43723,44875,47170,49357,50243,51582,51961,52759,52845,53808,54171,54577,55004,64385,-1464,-5308,12809,23881,-1454,-50286,8171,52041,52046,52047,52048,52049,52050,52059,52060,52061,52031,52033,52034,52035,52036,58778,58779,58780,60103,-49998,-66188,-47541,52375,59134,-62900,49560,62324,31890);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(-100,'spell_warr_charge'),
+(-12162,'spell_warr_deep_wounds'),
+(13567,'spell_gen_dummy_trigger'),
+(17251,'spell_gen_spirit_healer_res'),
+(23019,'spell_item_crystal_prison_dummy_dnd'),
+(23448,'spell_gen_gadgetzan_transporter_backfire'),
+(23453,'spell_gen_gnomish_transporter'),
+(25860,'spell_item_reindeer_transformation'),
+(28089,'spell_thaddius_polarity_shift'),
+(29200,'spell_item_purify_helboar_meat'),
+(29858,'spell_warl_soulshatter'),
+(30458,'spell_item_nigh_invulnerability'),
+(30507,'spell_item_poultryizer'),
+(31225,'spell_item_shimmering_vessel'),
+(35745,'spell_item_socrethars_stone'),
+(37674,'spell_gen_chaos_blast'),
+(39090,'spell_capacitus_polarity_charge'),
+(39093,'spell_capacitus_polarity_charge'),
+(39096,'spell_capacitus_polarity_shift'),
+(42784,'spell_astromancer_wrath_of_the_astromancer'),
+(43723,'spell_item_demon_broiled_surprise'),
+(44875,'spell_item_complete_raptor_capture'),
+(47170,'spell_item_impale_leviroth'),
+(49357,'spell_item_brewfest_mount_transformation'),
+(50243,'spell_item_teach_language'),
+(51582,'spell_item_rocket_boots'),
+(51961,'spell_item_chicken_cover'),
+(52759,'spell_sha_ancestral_awakening_proc'),
+(52845,'spell_item_brewfest_mount_transformation'),
+(53808,'spell_item_pygmy_oil'),
+(54577,'spell_item_uded'),
+(54171,'spell_pal_divine_storm_dummy'),
+(55004,'spell_item_nitro_boots'),
+(64385,'spell_item_unusual_compass'),
+(-1464,'spell_warr_slam'),
+(-5308,'spell_warr_execute'),
+(12809,'spell_warr_concussion_blow'),
+(23881,'spell_warr_bloodthirst'),
+(-1454,'spell_warl_life_tap'),
+(-50286,'spell_dru_starfall_dummy'),
+(8171,'spell_sha_cleansing_totem_pulse'),
+(52041,'spell_sha_healing_stream_totem'),
+(52046,'spell_sha_healing_stream_totem'),
+(52047,'spell_sha_healing_stream_totem'),
+(52048,'spell_sha_healing_stream_totem'),
+(52049,'spell_sha_healing_stream_totem'),
+(52050,'spell_sha_healing_stream_totem'),
+(52059,'spell_sha_healing_stream_totem'),
+(52060,'spell_sha_healing_stream_totem'),
+(52061,'spell_sha_healing_stream_totem'),
+(52031,'spell_sha_mana_spring_totem'),
+(52033,'spell_sha_mana_spring_totem'),
+(52034,'spell_sha_mana_spring_totem'),
+(52035,'spell_sha_mana_spring_totem'),
+(52036,'spell_sha_mana_spring_totem'),
+(58778,'spell_sha_mana_spring_totem'),
+(58779,'spell_sha_mana_spring_totem'),
+(58780,'spell_sha_mana_spring_totem'),
+(60103,'spell_sha_lava_lash'),
+(-49998,'spell_dk_death_strike'),
+(-66188,'spell_dk_death_strike'),
+(-47541,'spell_dk_death_coil'),
+(52375,'spell_dk_death_coil'),
+(59134,'spell_dk_death_coil'),
+(-62900,'spell_dk_death_coil'),
+(49560,'spell_dk_death_grip'),
+(62324,'spell_vehicle_throw_passenger');
diff --git a/sql/updates/world/2012_02_18_01_world_spell_dbc.sql b/sql/updates/world/2012_02_18_01_world_spell_dbc.sql
new file mode 100644
index 00000000000..b343399d7f2
--- /dev/null
+++ b/sql/updates/world/2012_02_18_01_world_spell_dbc.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_dbc` WHERE `id`=31980;
+INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
+(31980,0,0,328064,1024,4,268894208,0,0,0,0,0,0,0,1,0,0,101,0,0,14,14,0,13,0,-1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,15,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,4,0,0,0,0,1,0,0,0,1,"Righteous Defense Trigger Spell");
diff --git a/sql/updates/world/2012_02_18_02_world_gossip.sql b/sql/updates/world/2012_02_18_02_world_gossip.sql
new file mode 100644
index 00000000000..c72532e3f21
--- /dev/null
+++ b/sql/updates/world/2012_02_18_02_world_gossip.sql
@@ -0,0 +1,52 @@
+-- Gossip for Lore Keeper of Norgannon "Uldaman" for quest 2278 "The Platinum Discs"
+UPDATE `creature_template` SET `gossip_menu_id`=562 WHERE `entry`=7172;
+
+-- SAI for Lore Keeper of Norgannon
+SET @ENTRY := 7172;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,1,62,0,100,0,576,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Lore Keeper of Norgannon - On gossip option select - close gossip'),
+(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,26,2278,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Lore Keeper of Norgannon - On gossip option select - give quest credit');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=562 AND `SourceEntry`=0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,562,0,0,9,2278,0,0,0,'','Show gossip option if player has quest 2278 but not complete');
+
+DELETE FROM `gossip_menu` WHERE `entry` BETWEEN 561 AND 576;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(561,1080),
+(562,1079),
+(563,1081),
+(564,1082),
+(565,1083),
+(566,1084),
+(567,1085),
+(568,1086),
+(569,1087),
+(570,1088),
+(571,1089),
+(572,1090),
+(573,1091),
+(574,1092),
+(575,1093),
+(576,1094);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 561 AND 576;
+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
+(561,0,0,'What is a "subterranean being matrix"?',1,1,563,0,0,0,''),
+(562,0,0,'Who are the Earthen?',1,1,561,0,0,0,''),
+(563,0,0,'What are the anomalies you speak of?',1,1,564,0,0,0,''),
+(564,0,0,'What is a "resilient foundation of construction"?',1,1,565,0,0,0,''),
+(565,0,0,'So... the Earthen were made out of stone?',1,1,566,0,0,0,''),
+(566,0,0,'Anything else I should know about the Earthen?',1,1,567,0,0,0,''),
+(567,0,0,'I think I understand the Creators'' design intent for the Earthen now. What are the Earthen''s anomalies that you spoke of earlier?',1,1,568,0,0,0,''),
+(568,0,0,'What high-stress environments would cause the Earthen to destabilize?',1,1,569,0,0,0,''),
+(569,0,0,'What happens when the Earthen destabilize?',1,1,570,0,0,0,''),
+(570,0,0,'Troggs?! Are the troggs you mention the same as the ones in the world today?',1,1,571,0,0,0,''),
+(571,0,0,'You mentioned two results when the Earthen destabilize. What is the second?',1,1,572,0,0,0,''),
+(572,0,0,'Dwarves!!! Now you''re telling me that dwarves originally came from the Earthen?!',1,1,573,0,0,0,''),
+(573,0,0,'These dwarves are the same ones today, yes? Do dwarves maintain any other links to the Earthen?',1,1,574,0,0,0,''),
+(574,0,0,'Who are the Creators?',1,1,575,0,0,0,''),
+(575,0,0,'This is a lot to think about.',1,1,576,0,0,0,''),
+(576,0,0,'I will access the discs now.',1,1,0,0,0,0,''); \ No newline at end of file
diff --git a/sql/updates/world/2012_02_18_03_world_gossip.sql b/sql/updates/world/2012_02_18_03_world_gossip.sql
new file mode 100644
index 00000000000..990006f5098
--- /dev/null
+++ b/sql/updates/world/2012_02_18_03_world_gossip.sql
@@ -0,0 +1,1068 @@
+-- XXXXXXXXXXXXXXXXXXXX
+-- X Rogue Trainers X
+-- XXXXXXXXXXXXXXXXXXXX
+
+UPDATE `creature_template` SET `gossip_menu_id`=410 WHERE `entry`=1234;
+UPDATE `creature_template` SET `gossip_menu_id`=85 WHERE `entry`=2122;
+UPDATE `creature_template` SET `gossip_menu_id`=3984 WHERE `entry`=6707;
+UPDATE `creature_template` SET `gossip_menu_id`=4512 WHERE `entry`=3328;
+UPDATE `creature_template` SET `gossip_menu_id`=4575 WHERE `entry`=4215;
+UPDATE `creature_template` SET `gossip_menu_id`=4577 WHERE `entry`=4214;
+UPDATE `creature_template` SET `gossip_menu_id`=4658 WHERE `entry`=1411;
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 85;
+SET @TEXTYES := 581;
+SET @TEXTNO := 4796;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 141;
+SET @TEXTYES := 638;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 381;
+SET @TEXTYES := 878;
+SET @TEXTNO := 4799;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am in need of training, Keryn.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 410;
+SET @TEXTYES := 4795;
+SET @TEXTNO := 4797;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 411;
+SET @TEXTYES := 908;
+SET @TEXTNO := 4798;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Good day, Hulfdan, I am looking for training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 436;
+SET @TEXTYES := 934;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Hello! I am a Rogue in need of training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 3984;
+SET @TEXTYES := 4838;
+SET @TEXTNO := 4839;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Yes, I have. Teach me.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4502;
+SET @TEXTYES := 4835;
+SET @TEXTNO := 4837;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Can you train me how to use rogue skills?",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4512;
+SET @TEXTYES := 638;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4513;
+SET @TEXTYES := 638;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4540;
+SET @TEXTYES := 581;
+SET @TEXTNO := 4796;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4541;
+SET @TEXTYES := 581;
+SET @TEXTNO := 4796;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4542;
+SET @TEXTYES := 581;
+SET @TEXTNO := 4796;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I would like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4561;
+SET @TEXTYES := 5695;
+SET @TEXTNO := 4833;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I'm lookin' for rogue trainin'.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4562;
+SET @TEXTYES := 4834;
+SET @TEXTNO := 4833;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I'm lookin' for rogue trainin'.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4575;
+SET @TEXTYES := 4795;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4576;
+SET @TEXTYES := 4795;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4577;
+SET @TEXTYES := 4795;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4658;
+SET @TEXTYES := 6165;
+SET @TEXTNO := 6164;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Can you train me how to use rogue skills?",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4659;
+SET @TEXTYES := 4835;
+SET @TEXTNO := 4837;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Can you train me how to use rogue skills?",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4676;
+SET @TEXTYES := 4835;
+SET @TEXTNO := 4833;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Can you train me how to use rogue skills?",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 4690;
+SET @TEXTYES := 4795;
+SET @TEXTNO := 4793;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 5061;
+SET @TEXTYES := 4835;
+SET @TEXTNO := 4837;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Can you train me how to use rogue skills?",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- Gossip Condition for Rogue Trainers
+SET @GOSSIP := 6650;
+SET @TEXTYES := 9188;
+SET @TEXTNO := 9187;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,8,0,0,0,'','Show gossip text if player is a Rogue'),
+(14,@GOSSIP,@TEXTNO,0,15,1527,0,0,0,'','Show gossip text if player is not a Rogue');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I require rogue training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,''),
+(@GOSSIP,4,0,"<Take the letter>",1,1,0,0,0,0,'');
+
+-- XXXXXXXXXXXXXXXXXXXXX
+-- X Hunter Trainers X
+-- XXXXXXXXXXXXXXXXXXXXX
+
+UPDATE `creature_template` SET `gossip_menu_id`=4657 WHERE `entry`=1404;
+UPDATE `creature_template` SET `gossip_menu_id`=4695 WHERE `entry`=3596;
+UPDATE `creature_template` SET `gossip_menu_id`=4009 WHERE `entry`=3601;
+UPDATE `creature_template` SET `gossip_menu_id`=6652 WHERE `entry`=16672;
+UPDATE `creature_template` SET `gossip_menu_id`=4101 WHERE `entry`=987;
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4008;
+SET @TEXTYES := 4863;
+SET @TEXTNO := 4993;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I'd like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4009;
+SET @TEXTYES := 4316;
+SET @TEXTNO := 4993;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am in need of training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4010;
+SET @TEXTYES := 4866;
+SET @TEXTNO := 5003;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I have come for training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4011;
+SET @TEXTYES := 4867;
+SET @TEXTNO := 4998;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am in need of training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4012;
+SET @TEXTYES := 4868;
+SET @TEXTNO := 4998;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am a hunter and wish to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4017;
+SET @TEXTYES := 4888;
+SET @TEXTNO := 4888;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"Please train me.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4023;
+SET @TEXTYES := 4889;
+SET @TEXTNO := 4996;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I wish to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4101;
+SET @TEXTYES := 5001;
+SET @TEXTNO := 5002;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4472;
+SET @TEXTYES := 4893;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4473;
+SET @TEXTYES := 4893;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4474;
+SET @TEXTYES := 4893;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4506;
+SET @TEXTYES := 4987;
+SET @TEXTNO := 5004;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I wish to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4524;
+SET @TEXTYES := 4997;
+SET @TEXTNO := 4998;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4549;
+SET @TEXTYES := 4999;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4550;
+SET @TEXTYES := 4890;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am here for training.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4551;
+SET @TEXTYES := 4999;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4647;
+SET @TEXTYES := 4997;
+SET @TEXTNO := 4998;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4648;
+SET @TEXTYES := 4987;
+SET @TEXTNO := 5004;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I wish to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4657;
+SET @TEXTYES := 5001;
+SET @TEXTNO := 5002;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4675;
+SET @TEXTYES := 4999;
+SET @TEXTNO := 5000;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4693;
+SET @TEXTYES := 6160;
+SET @TEXTNO := 4993;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I'd like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 4695;
+SET @TEXTYES := 4863;
+SET @TEXTNO := 4993;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I'd like to train.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 6652;
+SET @TEXTYES := 9190;
+SET @TEXTNO := 9189;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 7262;
+SET @TEXTYES := 8585;
+SET @TEXTNO := 8586;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I seek training in the ways of the Hunter.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Gossip Condition for Hunter Trainers
+SET @GOSSIP := 7368;
+SET @TEXTYES := 8804;
+SET @TEXTNO := 8823;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,@GOSSIP,@TEXTYES,0,15,4,0,0,0,'','Show gossip text if player is a Hunter'),
+(14,@GOSSIP,@TEXTNO,0,15,1531,0,0,0,'','Show gossip text if player is not a Hunter');
+-- Add Any Missing Gossip Menu item
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTYES;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTYES);
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id`=@TEXTNO;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (@GOSSIP,@TEXTNO);
+-- Add Any Missing 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`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(@GOSSIP,0,3,"I am a hunter in need of training, Acteon.",5,16,0,0,0,0,''),
+(@GOSSIP,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,''),
+(@GOSSIP,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'');
+
+-- Add some missing gossip from sniff for Zabra'jin in Zangermarsh
+UPDATE `creature_template` SET `gossip_menu_id`=7601 WHERE `entry`=18013;
+UPDATE `creature_template` SET `gossip_menu_id`=7602 WHERE `entry`=18014;
+UPDATE `creature_template` SET `gossip_menu_id`=7608 WHERE `entry`=18015;
+UPDATE `creature_template` SET `gossip_menu_id`=7603 WHERE `entry`=18017;
+UPDATE `creature_template` SET `gossip_menu_id`=7609 WHERE `entry`=18018;
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=18244;
+UPDATE `creature_template` SET `gossip_menu_id`=7722 WHERE `entry`=18564;
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (7601,7602,7603,7608,7609,7722,7946,9821);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(7601,9248),(7602,9249),(7603,9250),(7608,9259),
+(7609,9260),(7722,9431),(7946,9752),(9821,13584);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7603,7608,7609) AND `id` IN (0);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7609,7722,9821) AND `id` IN (1);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(7603,0,1,'I would like to buy from you.',3,128,0,0,0,0,''),
+(7608,0,1,'I wish to purchase tradeskill supplies.',3,128,0,0,0,0,''),
+(7609,0,1,'I wish to purchase fishing supplies.',3,128,0,0,0,0,''),
+(7609,1,3,'Give me some pointers on my fishing technique.',5,16,0,0,0,0,''),
+(7722,1,1,'I have marks to redeem!',3,128,0,0,0,0,''),
+(9821,1,1,'I''m looking for a lost companion.',14,4194304,0,0,0,0,'');
+
+-- Add some missing gossip from sniff for Thunderlord Stronghold in Blade's Edge Mountains
+UPDATE `creature_template` SET `gossip_menu_id`=9856 WHERE `entry`=19471;
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=19476;
+UPDATE `creature_template` SET `gossip_menu_id`=5856 WHERE `entry`=19478;
+UPDATE `creature_template` SET `gossip_menu_id`=8283 WHERE `entry`=21311;
+UPDATE `creature_template` SET `gossip_menu_id`=8406 WHERE `entry`=21950;
+UPDATE `creature_template` SET `gossip_menu_id`=8244 WHERE `entry`=21147;
+UPDATE `creature_template` SET `gossip_menu_id`=8525 WHERE `entry`=21984;
+UPDATE `creature_template` SET `gossip_menu_id`=8239 WHERE `entry`=21117;
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (8283,8406,8244,8525,8239);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(8283,10322),(8406,10508),(8244,10259),(8525,10661),(8239,10251);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9856) AND `id` IN (0);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(9856,0,1,'Show me what you have for sale.',3,128,0,0,0,0,'');
+
diff --git a/sql/updates/world/2012_02_18_04_world_spell_script_names.sql b/sql/updates/world/2012_02_18_04_world_spell_script_names.sql
new file mode 100644
index 00000000000..8fa5bc55197
--- /dev/null
+++ b/sql/updates/world/2012_02_18_04_world_spell_script_names.sql
@@ -0,0 +1,6 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (52059,52060,52061);
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (58759,58760,58761);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(58759,'spell_sha_healing_stream_totem'),
+(58760,'spell_sha_healing_stream_totem'),
+(58761,'spell_sha_healing_stream_totem');
diff --git a/sql/updates/world/2012_02_18_05_world_creatures.sql b/sql/updates/world/2012_02_18_05_world_creatures.sql
new file mode 100644
index 00000000000..3fdac99c854
--- /dev/null
+++ b/sql/updates/world/2012_02_18_05_world_creatures.sql
@@ -0,0 +1,3 @@
+UPDATE `creature` SET `MovementType`=1 WHERE `spawndist`!=0 AND `MovementType`=2 AND `guid` IN (49123,49124,49125,49127,49128,49129,49143,49144,49145,49146,49150,49151,49154,49156,49157,49158,49167,49186,49187,49188,49318,49319,49664,49665,49751,49762,51398,51402,51422,51423,123148,127753,137490,137491,202314);
+UPDATE `creature` SET `MovementType`=0 WHERE `spawndist`=0 AND `MovementType`=2 AND `guid` IN (49123,49124,49125,49127,49128,49129,49143,49144,49145,49146,49150,49151,49154,49156,49157,49158,49167,49186,49187,49188,49318,49319,49664,49665,49751,49762,51398,51402,51422,51423,123148,127753,137490,137491,202314);
+UPDATE `creature_template` SET `MovementType`=0 WHERE `MovementType`=2 AND `entry` NOT IN (21657,30007);
diff --git a/sql/updates/world/2012_02_18_06_world_gossip.sql b/sql/updates/world/2012_02_18_06_world_gossip.sql
new file mode 100644
index 00000000000..e3385ceb5b0
--- /dev/null
+++ b/sql/updates/world/2012_02_18_06_world_gossip.sql
@@ -0,0 +1,166 @@
+-- Add some missing gossip to Nagrand From UDB
+UPDATE `creature_template` SET `gossip_menu_id`=7675 WHERE `entry`=18261;
+UPDATE `creature_template` SET `gossip_menu_id`=7723 WHERE `entry`=18333;
+UPDATE `creature_template` SET `gossip_menu_id`=7719 WHERE `entry`=18417;
+UPDATE `creature_template` SET `gossip_menu_id`=7724 WHERE `entry`=18581;
+UPDATE `creature_template` SET `gossip_menu_id`=7625 WHERE `entry`=18265;
+UPDATE `creature_template` SET `gossip_menu_id`=7626 WHERE `entry`=18276;
+UPDATE `creature_template` SET `gossip_menu_id`=7631 WHERE `entry`=18335;
+UPDATE `creature_template` SET `gossip_menu_id`=7699 WHERE `entry`=18471;
+UPDATE `creature_template` SET `gossip_menu_id`=7563 WHERE `entry`=18074;
+UPDATE `creature_template` SET `gossip_menu_id`=7592 WHERE `entry`=18200;
+UPDATE `creature_template` SET `gossip_menu_id`=7579 WHERE `entry`=18180;
+UPDATE `creature_template` SET `gossip_menu_id`=7607 WHERE `entry`=18218;
+UPDATE `creature_template` SET `gossip_menu_id`=7704 WHERE `entry`=18482;
+UPDATE `creature_template` SET `gossip_menu_id`=8493, `npcflag`=`npcflag`|1 WHERE `entry`=22113;
+
+DELETE FROM `gossip_menu` WHERE `entry`=7563 AND `text_id`=9181;
+DELETE FROM `gossip_menu` WHERE `entry`=7578 AND `text_id`=9220;
+DELETE FROM `gossip_menu` WHERE `entry`=7579 AND `text_id` IN (9219,9221,9256,9257);
+DELETE FROM `gossip_menu` WHERE `entry`=7592 AND `text_id` IN (9240,9283,9284);
+DELETE FROM `gossip_menu` WHERE `entry`=7607 AND `text_id` IN (9258,9286);
+DELETE FROM `gossip_menu` WHERE `entry`=7625 AND `text_id`=9287;
+DELETE FROM `gossip_menu` WHERE `entry`=7626 AND `text_id`=9288;
+DELETE FROM `gossip_menu` WHERE `entry`=7631 AND `text_id`=9312;
+DELETE FROM `gossip_menu` WHERE `entry`=7675 AND `text_id` IN (9361,9369);
+DELETE FROM `gossip_menu` WHERE `entry`=7676 AND `text_id`=9368;
+DELETE FROM `gossip_menu` WHERE `entry`=7677 AND `text_id`=9367;
+DELETE FROM `gossip_menu` WHERE `entry`=7678 AND `text_id`=9366;
+DELETE FROM `gossip_menu` WHERE `entry`=7679 AND `text_id`=9365;
+DELETE FROM `gossip_menu` WHERE `entry`=7680 AND `text_id`=9364;
+DELETE FROM `gossip_menu` WHERE `entry`=7681 AND `text_id`=9363;
+DELETE FROM `gossip_menu` WHERE `entry`=7682 AND `text_id`=9362;
+DELETE FROM `gossip_menu` WHERE `entry`=7699 AND `text_id`=9394;
+DELETE FROM `gossip_menu` WHERE `entry`=7704 AND `text_id`=9405;
+DELETE FROM `gossip_menu` WHERE `entry`=7705 AND `text_id`=9406;
+DELETE FROM `gossip_menu` WHERE `entry`=7714 AND `text_id`=9424;
+DELETE FROM `gossip_menu` WHERE `entry`=7715 AND `text_id`=9423;
+DELETE FROM `gossip_menu` WHERE `entry`=7716 AND `text_id`=9422;
+DELETE FROM `gossip_menu` WHERE `entry`=7717 AND `text_id`=9421;
+DELETE FROM `gossip_menu` WHERE `entry`=7718 AND `text_id`=9420;
+DELETE FROM `gossip_menu` WHERE `entry`=7719 AND `text_id` IN (9419,9427);
+DELETE FROM `gossip_menu` WHERE `entry`=7723 AND `text_id`=9429;
+DELETE FROM `gossip_menu` WHERE `entry`=7724 AND `text_id`=9433;
+DELETE FROM `gossip_menu` WHERE `entry`=8393 AND `text_id`=10493;
+DELETE FROM `gossip_menu` WHERE `entry`=8394 AND `text_id`=10492;
+DELETE FROM `gossip_menu` WHERE `entry`=8394 AND `text_id`=10614; -- was incorrect in the db
+DELETE FROM `gossip_menu` WHERE `entry`=8395 AND `text_id`=10494;
+DELETE FROM `gossip_menu` WHERE `entry`=8395 AND `text_id`=10615; -- was incorrect in the db
+DELETE FROM `gossip_menu` WHERE `entry`=8396 AND `text_id`=10495;
+DELETE FROM `gossip_menu` WHERE `entry`=8396 AND `text_id`=10616; -- was incorrect in the db
+DELETE FROM `gossip_menu` WHERE `entry`=8398 AND `text_id`=10497;
+DELETE FROM `gossip_menu` WHERE `entry`=8493 AND `text_id` IN (10606,10655,10854);
+DELETE FROM `gossip_menu` WHERE `entry`=8497 AND `text_id`=10616;
+DELETE FROM `gossip_menu` WHERE `entry`=8498 AND `text_id`=10615;
+DELETE FROM `gossip_menu` WHERE `entry`=8499 AND `text_id`=10614;
+DELETE FROM `gossip_menu` WHERE `entry` BETWEEN 21296 AND 21303; -- the old menus assigned to Lantresor which were not sniffed
+DELETE FROM `gossip_menu` WHERE `entry` BETWEEN 21304 AND 21309; -- the old menus assigned to Altruis which were not sniffed
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(7563,9181),
+(7578,9220),
+(7579,9219),(7579,9221),(7579,9256),(7579,9257),
+(7592,9240),(7592,9283),(7592,9284),
+(7625,9287),
+(7626,9288),
+(7631,9312),
+(7699,9394),
+(7607,9258),(7607,9286),
+(7675,9361),(7675,9369),
+(7676,9368),
+(7677,9367),
+(7678,9366),
+(7679,9365),
+(7680,9364),
+(7681,9363),
+(7682,9362),
+(7704,9405),
+(7705,9406),
+(7714,9424),
+(7715,9423),
+(7716,9422),
+(7717,9421),
+(7718,9420),
+(7719,9419),(7719,9427),
+(7723,9429),
+(7724,9433),
+(8394,10492),
+(8393,10493),
+(8395,10494),
+(8396,10495),
+(8398,10497),
+(8493,10606),(8493,10655),(8493,10854),
+(8497,10616),
+(8498,10615),
+(8499,10614);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7579,7704,7715,7716,7717,7718,7719,8393,8394,8395,8396,8398,8497,8498,8499) AND `id`=0;
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7719,7724) AND `id`=1;
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 7675 AND 7682 AND `id`=0;
+UPDATE `gossip_menu_option` SET `action_menu_id`=8499 WHERE `menu_id`=8397; -- was incorrect
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 21296 AND 21303; -- the old options assigned to Lantresor which were not sniffed
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 21304 AND 21309; -- the old options assigned to Altruis which was not sniffed
+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
+(7579,0,0,'Hemet Nesingwary, what are you doing here in the Outland?',1,1,7578,0,0,0,''),
+(7704,0,0,'Empoor, you''re going to tell me what I want to know, or else!',1,1,0,0,0,0,''),
+(7715,0,0,'Forge camps?',1,1,7714,0,0,0,''),
+(7716,0,0,'How do you see them now?',1,1,7715,0,0,0,''),
+(7717,0,0,'And now?',1,1,7716,0,0,0,''),
+(7718,0,0,'Legion?',1,1,7717,0,0,0,''),
+(7719,0,0,'I see twisted steel and smell sundered earth.',1,1,7718,0,0,0,''),
+(7719,1,0,'Tell me about the demon hunter training grounds at the Ruins of Karabor.',1,1,8394,0,0,0,''),
+(7724,1,1,'I have marks to redeem!',3,128,0,0,0,0,''),
+(7675,0,0,'I have killed many of your ogres, Lantresor. I have no fear.',1,1,7682,0,0,0,''),
+(7682,0,0,'Should I know? You look like an orc to me.',1,1,7681,0,0,0,''),
+(7681,0,0,'And the other half?',1,1,7680,0,0,0,''),
+(7680,0,0,'I have heard of your kind, but I never thought to see the day when I would meet a half-breed.',1,1,7679,0,0,0,''),
+(7679,0,0,'My apologies. I did not mean to offend. I am here on behalf of my people.',1,1,7678,0,0,0,''),
+(7678,0,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,7677,0,0,0,''),
+(7677,0,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,7676,0,0,0,''),
+(7676,0,0,'What do I need to do?',1,1,0,0,0,0,''),
+(8394,0,0,'I''m listening.',1,1,8393,0,0,0,''),
+(8393,0,0,'Go on, please.',1,1,8395,0,0,0,''),
+(8395,0,0,'Interesting.',1,1,8396,0,0,0,''),
+(8396,0,0,'That''s quite a story.',1,1,8398,0,0,0,''),
+(8398,0,0,'There was something else I wanted to ask you, Altruis.',1,1,7719,0,0,0,''),
+(8499,0,0,'But you are dragons! How could orcs do this to you?',1,1,8498,0,0,0,''),
+(8498,0,0,'Your mate?',1,1,8497,0,0,0,''),
+(8497,0,0,'I have battled many beasts, dragon. I will help you.',1,1,0,0,0,0,'');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7579 AND `SourceEntry` IN (9221,9256,9257);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7592 AND `SourceEntry` IN (9283,9284);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7607 AND `SourceEntry`=9286;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7675 AND `SourceEntry`=9369;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7719 AND `SourceEntry`=9427;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=8493 AND `SourceEntry` IN (10655,10854);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7675 AND `SourceEntry`=0;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (7704,7719) AND `SourceEntry`=0;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (7719) AND `SourceEntry`=1;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21304; -- condition for Altruis' gossip that wasn't sniffed
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=21295; -- condition for Lantresor's gossip that wasn't sniffed
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,7579,9221,0,0,8,208,0,0,0,0,'','Show different gossip if player has rewarded quest 208'),
+(14,7579,9256,0,0,8,9851,0,0,0,0,'','Show different gossip if player has rewarded quest 9851'),
+(14,7579,9257,0,0,8,9852,0,0,0,0,'','Show different gossip if player has rewarded quest 9852'),
+(14,7592,9283,0,0,8,9854,0,0,0,0,'','Show different gossip if player has rewarded quest 9854'),
+(14,7592,9284,0,0,8,9856,0,0,0,0,'','Show different gossip if player has rewarded quest 9856'),
+(14,7607,9286,0,0,8,9859,0,0,0,0,'','Show different gossip if player has rewarded quest 9859'),
+(14,7675,9369,0,0,8,10107,0,0,0,0,'','Show different gossip if player has rewarded quest 10107'),
+(14,7675,9369,0,1,8,10108,0,0,0,0,'','Show different gossip if player has rewarded quest 10108'),
+(14,7719,9427,0,0,8,9991,0,0,0,0,'','Show different gossip if player has rewarded quest 9991'),
+(14,8493,10655,0,0,8,10870,0,0,0,0,'','Show different gossip if player has rewarded quest 10870'),
+(14,8493,10854,0,0,8,11012,0,0,0,0,'','Show different gossip if player has rewarded quest 11012'),
+(15,7675,0,0,0,9,10107,0,0,0,0,'','Show gossip option if player has quest 10107 but not complete'),
+(15,7675,0,0,1,9,10108,0,0,0,0,'','Show gossip option if player has quest 10108 but not complete'),
+(15,7704,0,0,0,9,9978,0,0,0,0,'','Show gossip option if player has quest 9978 but not complete'),
+(15,7719,0,0,0,8,9991,0,0,1,0,'','Show gossip option if player has not rewarded quest 9991'),
+(15,7719,1,0,0,9,10646,0,0,0,0,'','Show gossip option if player has quest 10646 but not complete');
+
+UPDATE `smart_scripts` SET `event_param1`=7715 WHERE `entryorguid`=18417 AND `id` IN (0,1); -- correct Altruis' script
+UPDATE `smart_scripts` SET `event_param1`=8396 WHERE `entryorguid`=18417 AND `id`=2;
+
+UPDATE `smart_scripts` SET `event_param1`=8497 WHERE `entryorguid`=21657 AND `id`=0; -- correct Neltharaku's script
+
+UPDATE `smart_scripts` SET `link`=3, `event_param1`=7676 WHERE `entryorguid`=18261 AND `id` IN (1,2); -- correct Lantresor's script
+DELETE FROM `smart_scripts` WHERE `entryorguid`=18261 AND `id`=3;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(18261,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lantresor - On gossip select - Close gossip');
diff --git a/sql/updates/world/2012_02_18_07_world_gossip.sql b/sql/updates/world/2012_02_18_07_world_gossip.sql
new file mode 100644
index 00000000000..6246f12cefc
--- /dev/null
+++ b/sql/updates/world/2012_02_18_07_world_gossip.sql
@@ -0,0 +1,44 @@
+-- Fallen Hero of the Horde http://old.wowhead.com/npc=7572
+DELETE FROM `gossip_menu` WHERE `entry`=840 AND `text_id`=1451;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (840,1451);
+DELETE FROM `gossip_menu` WHERE `entry`=880 AND `text_id`=1452;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (880,1452);
+DELETE FROM `gossip_menu` WHERE `entry`=881 AND `text_id`=1456;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (881,1456);
+DELETE FROM `gossip_menu` WHERE `entry`=882 AND `text_id`=1455;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (882,1455);
+DELETE FROM `gossip_menu` WHERE `entry`=883 AND `text_id`=1454;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (883,1454);
+DELETE FROM `gossip_menu` WHERE `entry`=884 AND `text_id`=1453;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (884,1453);
+-- Text Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=840 AND `SourceEntry` IN (1391);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,840,1391,0,8,2784,0,0,0,'','Show gossip text if player has quest 2801 or 2784 completed'), -- It's hard to imagine that so much death and despair could be confined to such a small area; yet beyond the swamp is a land plagued by chaos and destruction.$B$BWatch your step, adventurer. The Blasted Lands are the final resting place to far greater beings than you.
+(14,840,1391,1,8,2801,0,0,0,'','Show gossip text if player has quest 2801 or 2784 completed'); -- It's hard to imagine that so much death and despair could be confined to such a small area; yet beyond the swamp is a land plagued by chaos and destruction.$B$BWatch your step, adventurer. The Blasted Lands are the final resting place to far greater beings than you.
+-- Gossip option conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=840;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,840,0,0,9,2784,0,0,0,'','Show gossip option if player has quest 2784 but not complete'),
+(15,840,1,0,9,2801,0,0,0,'','Show gossip option if player has quest 2801 but not complete'),
+(15,840,2,0,9,2702,0,0,0,'','Show gossip option if player has quest 2702 but not complete');
+-- Add Any Missing Gossip Option
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=840 AND `id` IN (0,1);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (880,881,882,883,884) AND `id` IN (0);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(840,0,0,"Please continue, Hero...",1,1,880,0,0,0,''),
+(840,1,0,"Please continue, Hero...",1,1,880,0,0,0,''),
+(880,0,0,"What could be worse than death?",1,1,884,0,0,0,''),
+(881,0,0,"I shall.",1,1,0,0,0,0,''),
+(882,0,0,"You can count on me, Hero.",1,1,881,0,0,0,''),
+(883,0,0,"What are the stones of binding?",1,1,882,0,0,0,''),
+(884,0,0,"Subordinates?",1,1,883,0,0,0,'');
+-- Fallen Hero of the Horde SAI
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=7572;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=7572 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
+(7572,0,0,1,62,0,100,0,881,0,0,0,26,2784,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fallen Hero of the Horde - On Gossip option select - complete quest 2784'),
+(7572,0,1,2,61,0,100,0,0,0,0,0,26,2801,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fallen Hero of the Horde - On Gossip option select - complete quest 2801'),
+(7572,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fallen Hero of the Horde - On Gossip option select - Close Gossip'),
+(7572,0,3,4,62,0,100,0,840,2,0,0,12,7750,1,180000,0,0,0,8,0,0,0,-10630.3,-2987.05,28.96,4.54,'Fallen Hero of the Horde - On Gossip option select - Spawn Corporal Thund Splithoof'),
+(7572,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fallen Hero of the Horde - On Gossip option select - Close Gossip');
diff --git a/sql/updates/world/2012_02_18_08_world_gossip.sql b/sql/updates/world/2012_02_18_08_world_gossip.sql
new file mode 100644
index 00000000000..a9fef9bcd76
--- /dev/null
+++ b/sql/updates/world/2012_02_18_08_world_gossip.sql
@@ -0,0 +1,5 @@
+-- Fix mistake in Fallen Hero of the Horde gossip update
+UPDATE `conditions` SET `ConditionValue1`=2784,`Comment`='Show gossip text if player has quest 2801 or 2784 completed' WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=840 AND `ConditionValue1`=2704;
+UPDATE `conditions` SET `Comment`='Show gossip text if player has quest 2801 or 2784 completed' WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=840 AND `ConditionValue1`=2801;
+UPDATE `conditions` SET `ConditionValue1`=2784,`Comment`='Show gossip option if player has quest 2784 but not complete' WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=840 AND `ConditionValue1`=2704;
+UPDATE `smart_scripts` SET `action_param1`=2784 WHERE `entryorguid`=7572 AND `id`=0;
diff --git a/sql/updates/world/2012_02_19_00_world_quest_template.sql b/sql/updates/world/2012_02_19_00_world_quest_template.sql
new file mode 100644
index 00000000000..76ab51f803b
--- /dev/null
+++ b/sql/updates/world/2012_02_19_00_world_quest_template.sql
@@ -0,0 +1,14 @@
+-- Shadowmourne quest chain fix by nelegalno
+
+-- Limit quests to Warrior, Paladin and Death Knight classes
+UPDATE `quest_template` SET `RequiredClasses` = 35 WHERE `Id` IN (24545, 24743, 24547, 24749, 24756, 24757, 24548, 24748);
+
+-- Quest relations
+UPDATE `quest_template` SET `NextQuestId` = 24743 WHERE `Id` = 24545; -- The Sacred and the Corrupt
+UPDATE `quest_template` SET `NextQuestId` = 24547 WHERE `Id` = 24743; -- Shadow's Edge
+UPDATE `quest_template` SET `NextQuestId` = 24749 WHERE `Id` = 24547; -- A Feast of Souls
+UPDATE `quest_template` SET `NextQuestId` = 24756 WHERE `Id` = 24749; -- Unholy Infusion
+UPDATE `quest_template` SET `NextQuestId` = 24757 WHERE `Id` = 24756; -- Blood Infusion
+UPDATE `quest_template` SET `NextQuestId` = 24548 WHERE `Id` = 24757; -- Frost Infusion
+UPDATE `quest_template` SET `NextQuestId` = 24549 WHERE `Id` = 24548; -- The Splintered Throne
+UPDATE `quest_template` SET `NextQuestId` = 24748 WHERE `Id` = 24549; -- Shadowmourne... to The Lich King's Last Stand
diff --git a/sql/updates/world/2012_02_19_01_world_quest_template.sql b/sql/updates/world/2012_02_19_01_world_quest_template.sql
new file mode 100644
index 00000000000..2f888f08cdd
--- /dev/null
+++ b/sql/updates/world/2012_02_19_01_world_quest_template.sql
@@ -0,0 +1,11 @@
+-- Dire Maul Book Quests
+
+UPDATE `quest_template` SET `RequiredClasses` = 1 WHERE `Id` = 7499; -- Codex of Defense (18357/7499)
+UPDATE `quest_template` SET `RequiredClasses` = 2 WHERE `Id` = 7501; -- The Light and How to Swing It (18359/7501)
+UPDATE `quest_template` SET `RequiredClasses` = 4 WHERE `Id` = 7503; -- The Greatest Race of Hunters (18361/7503)
+UPDATE `quest_template` SET `RequiredClasses` = 8 WHERE `Id` = 7498; -- Garona: A Study on Stealth and Treachery (18356/7498)
+UPDATE `quest_template` SET `RequiredClasses` = 16 WHERE `Id` = 7504; -- Holy Bologna: What the Light Won't Tell You (18362/7504)
+UPDATE `quest_template` SET `RequiredClasses` = 64 WHERE `Id` = 7505; -- Frost Shock and You (18363/7505) Closes #4727
+UPDATE `quest_template` SET `RequiredClasses` = 128 WHERE `Id` = 7500; -- The Arcanist's Cookbook (18358/7500)
+UPDATE `quest_template` SET `RequiredClasses` = 256 WHERE `Id` = 7502; -- Harnessing Shadows (18360/7502)
+UPDATE `quest_template` SET `RequiredClasses` = 1024 WHERE `Id` = 7506; -- The Emerald Dream... (18364/7506)
diff --git a/sql/updates/world/2012_02_19_02_world_gameobject.sql b/sql/updates/world/2012_02_19_02_world_gameobject.sql
new file mode 100644
index 00000000000..88a1f2e3a4c
--- /dev/null
+++ b/sql/updates/world/2012_02_19_02_world_gameobject.sql
@@ -0,0 +1,4 @@
+-- meeting stone for UK
+DELETE FROM `gameobject` WHERE `id`=188488;
+INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
+(245, 188488, 571, 1, 1, 1237.301, -4948.268, 36.02063, 2.495818, 0, 0, 0.9483232, 0.3173059, 300, 0, 1);
diff --git a/sql/updates/world/2012_02_19_03_world_warden_checks.sql b/sql/updates/world/2012_02_19_03_world_warden_checks.sql
new file mode 100644
index 00000000000..3698c461358
--- /dev/null
+++ b/sql/updates/world/2012_02_19_03_world_warden_checks.sql
@@ -0,0 +1,802 @@
+DROP TABLE IF EXISTS `warden_checks`;
+
+CREATE TABLE `warden_checks` (
+ `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
+ `type` tinyint(3) unsigned DEFAULT NULL,
+ `data` varchar(48) DEFAULT NULL,
+ `str` varchar(20) DEFAULT NULL,
+ `address` int(10) unsigned DEFAULT NULL,
+ `length` tinyint(3) unsigned DEFAULT NULL,
+ `result` varchar(24) DEFAULT NULL,
+ `comment` varchar(50) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+INSERT INTO `warden_checks`(`id`,`type`,`data`,`str`,`address`,`length`,`result`,`comment`) VALUES
+(1,178,'07F223143C69271AA2A851FECF6DC883A9D3A7DBA6FE26CC','',710730,23,'',NULL),
+(2,191,'C7D18F99DBC446A4B36E78B9130B6FA2E365B3D2D4199DF5','',28940,17,'',NULL),
+(3,191,'AA1A8559776F873F26954F15E49E6041EDC2C3766AD87A59','',21826,11,'',NULL),
+(4,178,'5F342A4D0EA9DB35F93FAE6E32670D810F017309817AA7C0','',676970,23,'',NULL),
+(5,178,'C57BD89DD447131EA2083784AB4DA8BD58CF3E182F1D8AF6','',690106,23,'',NULL),
+(6,191,'69AA85EFE8A1A990DA5ECFED4FAFD5B14F1D52EF2548FD15','',12905,36,'',NULL),
+(7,191,'083ECAD073DE2D61E3564B4BF767C9D1F8F15AA0495F5A76','',41096,24,'',NULL),
+(8,178,'C774D64EF60AD5A141FC56F3D02AE78AC147770FAE25D8FE','',3037164,22,'',NULL),
+(9,191,'502C59CAFEA11E9584C13BFE75F85EB79936AEEE31B44165','',12194860,37,'',NULL),
+(10,178,'4FBE8978A662428C616AABD71DA5562E4AC21F54BEB8ADBF','',3037164,22,'',NULL),
+(11,178,'83D3F7FD7DCA144AD8219A6A4E20F0CFC6E7EA208C4144FF','',3033068,22,'',NULL),
+(12,243,'','',4623652,7,'578B7D08578BF1','Pointer to realmlist address'),
+(13,178,'00523153EE2298A8D80D7B26B7067CA7B26AC06FF374FE7B','',673210,23,'',NULL),
+(14,191,'91BC368FA14A3FE3E13D0B1056F485F846925E613D8E8903','',12194860,37,'',NULL),
+(15,243,'','',10010636,12,'8166443FFF1FFFD9565CD95E',NULL),
+(16,178,'8FEFDBC58301AB0E0D0F6EBC5FBDA5ED9A7126873A9AB337','',682394,23,'',NULL),
+(17,191,'B40FF92D4F092599EA9014C88B474DE4352C3F1635109882','',448492,48,'',NULL),
+(18,191,'42B596FF923054531E4918DC39E08F8564FED16D559B494A','',29852,20,'',NULL),
+(19,178,'24291D6733A7CEFA3D54C3BCCAE95D56D8365BAB42AEE1CE','',3037164,22,'',NULL),
+(20,178,'6C4E321E2D5A153F2BB664EB6EEDF8D67FDE7ECC8076D087','',3990720,23,'',NULL),
+(21,178,'FB649706C8F1AFF5990B5F3118DFE54FF6F9609C6991C161','',3045776,31,'',NULL),
+(22,191,'D1B451C906B81261B048FD4025217245950C11660815367F','',28920,23,'',NULL),
+(23,191,'40079A1083A6B57E3B713992BD395FB6650B631E4C4B8D4E','',29852,20,'',NULL),
+(24,178,'3F8FEFE08CB358D6613656AFDB498AB8C599BA18B5574FB6','',682378,23,'',NULL),
+(25,191,'EECA71B5536EE1992FD7825A5CCC4B7F9F3B413C0DA498B6','',29884,20,'',NULL),
+(26,191,'B8786BFF2421ED1F1FB30F3F0BAF671FC1DAD5B3B33124C8','',28956,17,'',NULL),
+(27,191,'BF0C842D635D9D8B3F6FF84EF6DF7C963C485EBAF02D17B0','',28920,23,'',NULL),
+(28,191,'9672ED2A27C4972E04DF4471C95492C721024E241995170C','',36924,24,'',NULL),
+(29,191,'63532B056020A261251BD24AB026BBC5D4468AF863136044','',17906,11,'',NULL),
+(30,178,'7D38C80FEAB10B857A4A7BEF15D27A58FB43FD875E29C73C','',3990720,23,'',NULL),
+(31,178,'B158752316672A90BF29846E7AD64BA4FD1699C638BFD3B6','',2299116,33,'',NULL),
+(32,178,'4549AE7CA28700562D996CBC78FA7341DC05F644C01474E4','',3000288,31,'',NULL),
+(33,178,'EE77806A4F5723FD9C6FC6F43308C8AB448E0A139CB43700','',690106,23,'',NULL),
+(34,191,'046D6EA3E99E275F51CAA591BD8C478B6F964A3072018F43','',21660,15,'',NULL),
+(35,178,'B1682CE919907AD7D8990F3D8272CFF24A996162565D52B4','',676970,23,'',NULL),
+(36,178,'22E057649A8BF1D9672841EF47A4DA175AAC082FFEF059DA','',710730,23,'',NULL),
+(37,178,'7BA62D5F5CFEB545D1AE646962F4EB9A91B93EF8FFD5D1B0','',710554,23,'',NULL),
+(38,178,'702802D919D9E5C3FD42CA9188936C73E47F87CFA419025A','',3033068,22,'',NULL),
+(39,178,'FDA6D997BFB8A991B57755633D1AB3C7E567A74C1EC09937','',3070052,22,'',NULL),
+(40,191,'84F6BDD28490937867774E7BF8D5B78F68BF9EB43DE90F10','',477912,60,'',NULL),
+(41,191,'5A5B4BA32BD937FF253016AE836DD44B794F8D05982860A6','',447736,48,'',NULL),
+(42,178,'A243986665C7FCA1E60A9F209DE9431C3098D082DF1C4528','',682378,23,'',NULL),
+(43,178,'7CC89374CE3A9C07DCD685006690B828931D60085EE5FEE8','',710554,23,'',NULL),
+(44,191,'01F10590E6DFED79523D26C043D5424174BEF1011F3F4974','',477928,60,'',NULL),
+(45,178,'C9728BDC4B77BAA7B3515AFD3628EDB0986DFA20B46917B4','',672746,23,'',NULL),
+(46,191,'179B80E5E054521E44BA8F5978D5FC489CC9E514B350A3FF','',28956,17,'',NULL),
+(47,243,'','',5417948,5,'7734FF2485','FrameXML Signature Check'),
+(48,191,'7769A67D6E2460450873133B0CFF99B67A58CE6C404A17F8','',17282,15,'',NULL),
+(49,178,'CF3896074EEBC0F93B539FD44E4D825227D4C1556B8F2279','',3990720,23,'',NULL),
+(50,178,'88F2833B5267A71A0CA72509C40819B99283A6E556FD9038','',198,10,'',NULL),
+(51,243,'','',8491566,5,'8B4D10890D','Lua DoString'),
+(52,178,'F7229DF2D879A9E8D5BCEDCDC7046D75BAEE1C9D4DA41E55','',3638348,23,'',NULL),
+(53,191,'AE78585CD862134059B13669FC416B8124752EC6471DDCE6','',28940,17,'',NULL),
+(54,191,'B408E9F9B475E4B6A81F9B7F2E060824F618FFDABBFFE805','',13634,11,'',NULL),
+(55,178,'A9DA016B83961F95097E08F2DEBE69517C7573FFF06D8C4B','',668874,23,'',NULL),
+(56,191,'0E74160C242EF826D09BCE4ED535E9A9D251B1CD20E31891','',24812,14,'',NULL),
+(57,178,'A58E4D44D952C1F9DB7B5E423167EE4C28AD02668C5B86AF','',710730,23,'',NULL),
+(58,191,'35A9FC42ACBF3A147B0C8CF67BA04EC979C6534B20249B45','',28956,12,'',NULL),
+(59,243,'','',5345746,7,'746583F9177760','Lua Protection Patch'),
+(60,191,'1430DC4A627EA5FA2CFF9C010CE16022F259F81DB6047879','',13634,11,'',NULL),
+(61,191,'85A005398AF851382267C01BB6FB04AEF2093213C20EC200','',360508,13,'',NULL),
+(62,191,'96916CD89649027A9A8BBFBD28AE190CD5D590E24BBAD451','',13033,36,'',NULL),
+(63,191,'056D57A5C1A46883400E1F69405750B23DE18C3032C3D91C','',27270,13,'',NULL),
+(64,191,'87C641E1EDBD96D9F170C7BE0FA13F45611DCDF41AC02526','',41127,24,'',NULL),
+(65,191,'1F378DF1E7BD99164DDC7401A98CA5E9551BD50B4A35D5AA','',34176,25,'',NULL),
+(66,178,'B5ED443D6CA2F6095BAC8DAFDC8F3413F7B473916357C17E','',209352,75,'',NULL),
+(67,191,'A2BC3FF01787A38CB88B3EF45C1CD97DA113157FC395D38C','',30012,16,'',NULL),
+(68,191,'190862E5018F1428E5B12BFDAD08283ECD057B34AD722846','',41228,24,'',NULL),
+(69,191,'6E0E55BE8690F64442E275559E6C9F8A3FDCAA00937D1C13','',49347,24,'',NULL),
+(70,191,'B6FC4C07BB2CBE7C5C854CD99DAFEC0D1AE4101FC51460F9','',477912,60,'',NULL),
+(71,178,'3B5955C3B498489869990F08A4CAE566A7D689C23990518B','',156,8,'',NULL),
+(72,243,'','',7246064,6,'8950108B450C','Movement State related'),
+(73,178,'F24317DAA28AA477996EEBB9538A89569ABF9B185A3EA4E4','',718842,23,'',NULL),
+(74,178,'DA25A4134671325719833878E2556455EC4321A2207B6728','',198,10,'',NULL),
+(75,191,'DC9490A7BEB43C64585E013B5260BE843D126EB3BCEBAC11','',50040,26,'',NULL),
+(76,178,'4BB92BBD5CA8C192C9D0E1EDB6C21FF3F4A61ED1B151365F','',673210,23,'',NULL),
+(77,178,'13E8DD1C9F5501A270A59CC4B61311F6D5D18DC3F2AA351A','',3037164,22,'',NULL),
+(78,191,'346CFA39FF98198BDE1C23673FBF51A50CFF5ADED784F077','',17522,15,'',NULL),
+(79,113,'0590FC57AB448975FA46C314A8AB75AF96DF0FD0A3D9FB23','Afd32uu',0,0,'',NULL),
+(80,178,'E37D413DC96A92D3CEAB8A482B8F5397587A0E654C9A0166','',672954,23,'',NULL),
+(81,178,'E7D5551799C2C7F0072BC3149A22F37D09EA1EB83F64C655','',3045912,31,'',NULL),
+(82,191,'7CC5260578671130CA5B3392BA5CFD0F3DE0BE1085E556B6','',9977,32,'',NULL),
+(83,191,'F44A40945F24385D089E040A733553EEFF92EFAAB0636323','',134968,32,'',NULL),
+(84,178,'D3122CF30EE55310CF4A710E61B190D2B108227B746B41AD','',679578,23,'',NULL),
+(85,191,'7E3CC1BC53477D84F05F623BBC94B9DE8D01A2607CA935DB','',41188,24,'',NULL),
+(86,191,'DC06565CC1512B5A91A848E08BC4FBC6DA705F6503667852','',41127,24,'',NULL),
+(87,191,'03DC47CDFBB14C5CF0D0010FA5424556F951585588A2180A','',29916,16,'',NULL),
+(88,191,'29EC91C4D87891FECDED381CE65A86A259F00DD788833E4D','',174688,37,'',NULL),
+(89,191,'31F024003681765368F6EFB667E83CE1D12799723AA99BF9','',685304,44,'',NULL),
+(90,191,'6A82AC1D0BFEF5DA7385510CBC57189FACD42E45E0D2A65E','',30012,16,'',NULL),
+(91,191,'3901FBD52655E12ADA4EEDED3B365B1DDFAAA925A140097F','',448492,48,'',NULL),
+(92,191,'6E9991A25EC347BEA5813EDE0A842D746779C97606565B5A','',17906,11,'',NULL),
+(93,191,'0AC9F2B104AC5AA9131FB14E669B98D30D056936625B0245','',27270,13,'',NULL),
+(94,178,'A338B3DA78A6683CBEE08A63C5EEFBE1AF33BF54983D583D','',684876,29,'',NULL),
+(95,178,'38759C29F2ACF42DA9D16EF35837A470DC7C42C3284B2A3C','',3049492,22,'',NULL),
+(96,191,'F35817564FC39F4DB7994021352FEEB86E2FEE86C11B8DBB','',360508,13,'',NULL),
+(97,191,'09FAC087283873DAEE0AD074ABF7DDB1B395F5CF6BC2141E','',28956,17,'',NULL),
+(98,178,'87FE57916743AF3C97CC3B583B29E89B6E503D31D1747B64','',676970,23,'',NULL),
+(99,178,'97D854645011BAD1F6625679511D78D1B7367A51EB0FCC6E','',668874,23,'',NULL),
+(100,178,'12369F6F1B875FB5CC5E67445ADEAE2B295D196596679317','',0,9,'',NULL),
+(101,191,'5034278808E93A3DFC9BEFFD8E180FEFA24DFC5056ED3BE1','',433168,48,'',NULL),
+(102,178,'55EF16220A7EF3F74A9D895821610DFBD2A757FB05C792D5','',209352,75,'',NULL),
+(103,191,'67445533AA0BB737D2F74C9258148C6C667794F0E3D07498','',45324,24,'',NULL),
+(104,178,'AA8649100B17A9C5BE227F47F867FADE51AD242BAAD39821','',3045632,31,'',NULL),
+(105,191,'85545FE9242B2474574EEBABBF452FBD11497073CB1E46A5','',41080,24,'',NULL),
+(106,191,'9DACD6981681F53650B681EAE68065D26F4803682058709D','',448456,48,'',NULL),
+(107,191,'96B74F1436A05E658E3282164BC3CBDF4DBBB2CF6A5B866F','',9977,32,'',NULL),
+(108,191,'033BD6861DF7878DC9470EC2F699772BB2F3D5000490866F','',90202,13,'',NULL),
+(109,113,'B797D0AF3164EE83167D5C054A511A5B209A70C6655C408B','IPSect',0,0,'',NULL),
+(110,178,'D91A2764435C5091D3F9471AB8B5F397E609330294694488','',710730,23,'',NULL),
+(111,191,'94EED02DCDB71789E50917DA401A03F4B91BDBEA050D8BCA','',3766400,37,'',NULL),
+(112,178,'2DF33CBB544E2D5238FB591F2547AC507B4D8A652D789F2B','',2303444,33,'',NULL),
+(113,243,'','',7860712,5,'742DF6407C',NULL),
+(114,178,'81A74F35F0F887144D59F93647C18C70C5FEEF542A7F3782','',709322,22,'',NULL),
+(115,178,'2E1F8A68FDDF084A950B786A1EE7E0CE43E62449A56F92A3','',3045632,31,'',NULL),
+(116,191,'B1F8988B6664A90E79503FA5D843C3CB97BFDC23EB8C7690','',433168,48,'',NULL),
+(117,178,'0277E26DE31814DFD675A59E526669E39080E033BAE88859','',0,9,'',NULL),
+(118,243,'','',10714892,8,'BB8D243FD4D0313E','Wall Climb'),
+(119,178,'09BBFC19FCADC69D6B5BF655A5BB6350B4A8120C3EB557D2','',3990720,23,'',NULL),
+(120,178,'BF4ABDEB726B0060E74701C03180C3CB02170ADCB7DCB61C','',3049872,31,'',NULL),
+(121,243,'','',9990741,9,'8B878000000089463C','No Fall Damage Patch'),
+(122,178,'D259A46A6D1855C436BFC96FB9376BDCDF5E9FFAE8B4147C','',3045616,31,'',NULL),
+(123,178,'F425A62A44097742D72A05669B6BE93AD9CEFE9E40D71E48','',3045976,31,'',NULL),
+(124,191,'B134291F515D136B6576FFBC0133C7859755974611170D07','',20512,16,'',NULL),
+(125,191,'125BE691985D8DB37068DC14D74EA2DA1260E4A63D3F74BF','',45324,24,'',NULL),
+(126,178,'E06E3C5B356B34BA92F6765108556AD53ABB74B986D5810E','',3070052,22,'',NULL),
+(127,178,'8CC87DFF61F2EC82DE033865C9879010D94E1614369FE286','',710554,23,'',NULL),
+(128,191,'E1F5233450FEFFB6F0E8F2B17683047A485828FEDD3E5B80','',448456,48,'',NULL),
+(129,191,'31BA6EA4DF2362676AB71F4CB60B0D40FA51A3AABD25D5CB','',36924,24,'',NULL),
+(130,191,'C14630E1D519EB85C254C536FE81DC490977E869BD5CD884','',12985,36,'',NULL),
+(131,191,'B337F892EEDD52A5B978C116A19D927134273626EFC4DAA3','',17890,11,'',NULL),
+(132,191,'D97560108AA21A487EC9278759F7615BFA304A933776A201','',18680,35,'',NULL),
+(133,178,'DA59505BA61459508532CBEAD246DCD2C8E7BF5C6D3CE676','',3037164,22,'',NULL),
+(134,191,'5803CA69E5B7F1DF08D95219894D75F52EDB1AD429E562D9','',174688,37,'',NULL),
+(135,178,'8A1099E19139D91573286DBB3DED2CC093A99FD178F7FEC8','',3033068,22,'',NULL),
+(136,178,'0331B438B085F55C06F7F697160845BE953D9CE789AA62A4','',3000288,31,'',NULL),
+(137,191,'E844078A5671FF7DB0621E7F1C7EDDF9C92F5A9FA0477FCB','',41023,24,'',NULL),
+(138,178,'AAD7F47B231861913F353341FD26E5AA89AFB586FB6A5366','',672746,23,'',NULL),
+(139,178,'136DFB3FE66D2830DF46EE155FCAEADC9624FFE1410088DA','',3041472,31,'',NULL),
+(140,191,'C6015A0D5C9109768BA4233639A51F163CC7ED58749E5026','',25724,20,'',NULL),
+(141,178,'9C668CE4D328EEA9B6AB7AD5FF54169289B35B230275A43C','',3049872,31,'',NULL),
+(142,178,'FC3C95E71F968C46BD5DB5C9EF9B0A5BDCC5619B805046F5','',2299060,33,'',NULL),
+(143,178,'FBE3808C0E36BFBC1D1F5A0E508CA89E81E550CD2FDEEC48','',149,5,'',NULL),
+(144,178,'35A8252DBC65514E858256C497141153812EE61C724BF5A9','',710730,23,'',NULL),
+(145,178,'CC79AA9AE29A52A998181D183D38974221B8BAC0AB534E7D','',0,9,'',NULL),
+(146,178,'B89F25A249D295580E649F5ABE0C65EC24401F4889A4FB16','',668874,23,'',NULL),
+(147,178,'742A0A9997B9E857C355AA75797466506BAE73D44D26399D','',3037164,22,'',NULL),
+(148,178,'E7975701601B2FDF8262098521B7BB4FF5CCC484F8E919E7','',3045776,31,'',NULL),
+(149,178,'43E81BE830F169F4EDD23B84ABFA9D15EF12C978FE134346','',60648,56,'',NULL),
+(150,178,'66CA9E464A2122E301A72FAEF13A4853D8CB1A45C177E854','',178504,96,'',NULL),
+(151,113,'0A3C294B0799FD2C9EC17C1CCBCD174A51B6A2ECC62FEF17','IPSect',0,0,'',NULL),
+(152,178,'6E9CE81BFCAF0C250705FCC599981D2D9E4D474A7E857B37','',2299108,33,'',NULL),
+(153,178,'8734D6E081D5C993DCE8161CFDFC6197F39A487E4083A3E1','',149,5,'',NULL),
+(154,178,'A33355AF7B5FF3CECB3A6059F6621F30AEE695D69421EA2B','',3049492,22,'',NULL),
+(155,191,'BF8CEA63013511BDE0B551DAAC492DFBB9608645140B88F7','',29916,16,'',NULL),
+(156,178,'8D5D5E99EAB2ED21A104913B05D6BD7A8E63ADA56B66CDED','',3022016,31,'',NULL),
+(157,191,'778256BFEF82EA60C4E0F25083655FB2BB75B83FD60A9C06','',18680,35,'',NULL),
+(158,178,'43FB8007D7DD7B01FFBEEA3EF9D0242778565544281EC761','',0,9,'',NULL),
+(159,191,'94DCF5D21FE2106F5303216C14AD55EEDC1B19FDC91D5F76','',28704,16,'',NULL),
+(160,191,'7EBBF90F7D8462D1453479DF9AC5943AF483FE2828C74FDD','',477928,60,'',NULL),
+(161,191,'A171148491E099B12CCD1708B784D8C3B09737772C7780C0','',401992,14,'',NULL),
+(162,191,'5350ACB75F9FA498FE0D2A371649C9FD9716BDDE2C32F5FB','',13634,11,'',NULL),
+(163,191,'85E53280630956C58D4CA7FD8DC5FE73C9A2A03314DFF294','',45223,24,'',NULL),
+(164,191,'391BC8A81D4EB6D526BAF0DC3468CAA36C9207B82E194B7A','',130380,14,'',NULL),
+(165,191,'0F88FA5CD9B9950F850C18FE76C948FF43CDDE3E75638FF1','',17938,11,'',NULL),
+(166,178,'EB63FC60164AFF92726DA658882BF1CE47CF0BF6C80B1B97','',690106,23,'',NULL),
+(167,178,'E30B2494142B416BBE95DA3DAE4A82CBDF3A020715F10E8B','',4011280,23,'',NULL),
+(168,191,'6CA1C19D0E9191CBC9CA3D5BC3CF1D19764D8F17C6B54AE4','',59620,13,'',NULL),
+(169,178,'4730B7A7EC70544A688211A5C754C357A090116092D3EC4D','',682378,23,'',NULL),
+(170,243,'','',10000022,6,'894644894E54',NULL),
+(171,191,'713A7B79619AEF3C47E44102F86EDCE0D6AFBC5ABE87F861','',13538,11,'',NULL),
+(172,191,'575F1C6AF7C71085C7D9CB2291844D9F2DA3B71391C0B941','',36907,24,'',NULL),
+(173,178,'296F233E4FAC4CF419D5FBF2701AC4D5AA0866CB4D0DAEC6','',3045976,31,'',NULL),
+(174,178,'933C1A228C99E35DF309838B25B7D5EA3A8E961E81D81D32','',673194,23,'',NULL),
+(175,191,'9EC125252C3738478CA942DCB59030097194B284A9162B32','',59620,13,'',NULL),
+(176,178,'6665F3FB8DC6BE71C152C3674B5783D6E57FE8BF796D190C','',3634252,23,'',NULL),
+(177,191,'E120DD63042FEFF9E7FCEC0CA44D2544F03C5D4CDBA1C008','',12985,36,'',NULL),
+(178,113,'09BDABA6CB17BE561B4104124A3D0266C858D194A8765198','drvsys_mon',0,0,'',NULL),
+(179,178,'3AAE69E7088E4060EA32EF95E9B6D9532460F5B84EE4EC80','',684876,29,'',NULL),
+(180,191,'990D4E1C2D63C8E447F034642686D57B727064E3EDE13B00','',448500,48,'',NULL),
+(181,191,'E88F31BDC5513216CF3701CAF8BE954CCC7EAE0E7AC7D942','',594348,26,'',NULL),
+(182,178,'81229C1E56FA72E01B52E8CBB8BB5F55ED48A11B72E7729B','',710554,23,'',NULL),
+(183,191,'B4D0CDE7D53493A1549328F711013F07DBD3A9BE88DB2EF9','',685304,44,'',NULL),
+(184,178,'D6CA6F94FF248F722F97037C1AE7C8DE0191D5F4D1E3A5B8','',156,8,'',NULL),
+(185,178,'9C9DF1E868BB33D43676F21096C4F75759C0807096EEB886','',60648,56,'',NULL),
+(186,178,'1C79B3B5A74A4F09A1FAE19BB15CDCF26B5F917861071F1C','',198,10,'',NULL),
+(187,178,'AC1AD3E831A4C758858350A8A197A24FE82583F4B0E39A85','',3049888,31,'',NULL),
+(188,178,'56E4980485E3129E94F370E7066E80B07141C4A669B9FC0F','',672746,23,'',NULL),
+(189,178,'C21574305E0377A3D2B72D1E1546B9D62DCFA8B1A4405F16','',3638348,23,'',NULL),
+(190,178,'AA74121AF835978BC1C1BB402A8B7388CB7C075C1227C253','',3049888,31,'',NULL),
+(191,178,'D6457A86DFADF9825D6093090AED2A807FE7DA6ECF5922AF','',3065956,22,'',NULL),
+(192,191,'1BAB7E6B5ACBEED8F54B667EDF13A385B9E146C0C50D9FB7','',448456,48,'',NULL),
+(193,243,'','',7517484,7,'7518683B010000','Follow Unit Check'),
+(194,178,'01000FEAC61ED76FE04ED1169C40289D96C71A1564E38FCB','',690106,23,'',NULL),
+(195,191,'F095338ED87C658C916CC604A427F4ED95309C4A07B7898C','',34176,25,'',NULL),
+(196,191,'800E120187DF74A231722FB887B3944AD16A703FB8CB9D39','',28920,23,'',NULL),
+(197,191,'2CFCE981C322A54724E1418B6A6D1896B95D584630EEEA43','',38300,21,'',NULL),
+(198,243,'','',5081862,8,'6840AAB600C60200',NULL),
+(199,178,'481751066D6C97AD5EE90173E8ED107BB1C9FD873B0CE55A','',3037164,22,'',NULL),
+(200,178,'7FC57D49535798CDA7E4DC5DCEA2E085AAB9A68BF7F9469D','',149,5,'',NULL),
+(201,191,'33357C112DE0195F013FAAC4D57AB1BE77417934CE03A2B9','',3766400,37,'',NULL),
+(202,191,'BF8AC678DC3CD354BADBFE46C9173D34CC84D13302190EBB','',21826,11,'',NULL),
+(203,178,'4E2F9721D52A7552AE2728B9695F1523DD62DC0569237C3F','',2299108,33,'',NULL),
+(204,191,'9F015E7D8A11F30AA1954D9FEA7142D0247E3C09FF2BFF72','',12194860,37,'',NULL),
+(205,178,'1EB5AD39B94DB5CDC3294DF49FA589DFBE2C674D07E4B211','',710730,23,'',NULL),
+(206,178,'E9D67F07E035A64B89C9E91614DC1930FEF61DC3A5C1BBA6','',690106,23,'',NULL),
+(207,191,'36411C2FF2C3AC51B7F6A6B8DF61DBD4E5895C27438847BE','',59620,13,'',NULL),
+(208,178,'A77F30CBB8057E0DB37782367C8462FA98D4DB21DE936ECD','',3049492,22,'',NULL),
+(209,243,'','',7452688,10,'8B81CC07000025000000','WoWEmuHacker Injection'),
+(210,178,'A8C806E1FB7CA3625E6BB6F5E4D9E2BF0EBDBE70BA7226F7','',3049872,31,'',NULL),
+(211,191,'B3DD04807DEA2679045F4F197BDDAED5C7CCEEFE19622B43','',360508,13,'',NULL),
+(212,178,'B075C8B4D8C5D83FE703677319491DC816EA5103901B44A8','',682394,23,'',NULL),
+(213,191,'53DB506C0341B50BEA3897E2E3C0DD74C2CA2D8F5F34A2E4','',59620,13,'',NULL),
+(214,191,'E112F38956124FE0F48BF569F5E81B40E293DC6E16B544D6','',17282,15,'',NULL),
+(215,191,'0363EF2B1AAE09E6C2B1FA555E706F4EE094BE678DA27598','',3766400,37,'',NULL),
+(216,191,'EA256F01B6340C99E27611B39C5ED28CF2FA202436F0972F','',49564,24,'',NULL),
+(217,178,'A86C95C4E58495A10F5F1C9B5B62D3365132E8DC62863E8B','',198,12,'',NULL),
+(218,191,'56DD8D99991F83AFA2E169315B395BD388B248340E9C64D3','',30044,16,'',NULL),
+(219,191,'684B23E010C3D6B88CC12BD9F0B6B0CE00D692C71BFB84A8','',28940,17,'',NULL),
+(220,178,'83AEEFCDF4C2E80B18DDF93D99120A89F916C19206D257AB','',668874,23,'',NULL),
+(221,178,'D68651921F5CD387C7E860FB7C3B143409735748E3B2FB7F','',682394,23,'',NULL),
+(222,113,'A4D501A9DB9D84BD8695A8BF61FC853BF434D2D4B352C7A0','HideEx',0,0,'',NULL),
+(223,191,'5E77F12C032D4FEF559F9B837B85BDB9D95ADB10C9F56649','',448504,48,'',NULL),
+(224,178,'F08406AEDFA8F19B6FB7C9ADDE0BFEE82CB0D2E275593150','',2303444,33,'',NULL),
+(225,178,'AC0EC72522ADA5B2BFFAFAC92D6D0A0225E1D5C727CDFFA7','',672602,23,'',NULL),
+(226,178,'4D1A7D1C88AB04438510E3255184E51EAE2036BB09DB553A','',700714,23,'',NULL),
+(227,178,'68BBC36F75DC763B573DACAB1D6D8F70E667638AA894BEE9','',717898,23,'',NULL),
+(228,178,'2AC3C23FBDE2C1EC46C9ECFF71BD7F603F17C9DFC1328D1C','',3638348,23,'',NULL),
+(229,191,'C365E9FE00580EBB14EE863A5CE3C8139B1A59A610520AE7','',3766400,37,'',NULL),
+(230,178,'DB2A0451B9753100085C9D149B61CE47A195D77C8B709143','',178504,96,'',NULL),
+(231,178,'0871F69205FA62C74C2DDE200A3911FC3E41A4FB8BAB9817','',682378,23,'',NULL),
+(232,191,'0017307F2FF889462B0FA06018D99EB1F847F189B6CC9B99','',21826,11,'',NULL),
+(233,178,'0FEFCD6B0BF8C2816A9259AB5FD7B89231AEB8D92DE53D26','',3045356,22,'',NULL),
+(234,178,'87EAD79656133B3183C2E452886D8F00C5EC6C9D741673A2','',3037164,22,'',NULL),
+(235,178,'C2B6C5E19FA98D121B2CDE51789BD2883A324015E7D131E0','',710554,23,'',NULL),
+(236,178,'B6F3A7D557A3E3BC4833C3D9B6B0B0609255591CC8AB3B65','',3022016,31,'',NULL),
+(237,243,'','',5283280,12,'558BECB8084E0000E8731DF0','AddChatMessage'),
+(238,191,'AEA87B23CD9463E9693B6C053C1D9030F8E229DA308DBF29','',90202,13,'',NULL),
+(239,178,'8C16C7E8EEAD49AE67E4E91E229FFBCE2F6590A48348914E','',3049888,31,'',NULL),
+(240,178,'7B2DCA97CD348E45490C288EADE9303CE270CF57F28EB1E4','',690106,23,'',NULL),
+(241,191,'BC10B10BE398F2397FA6962C4E59C8CF11FDD7158EC222A5','',29916,16,'',NULL),
+(242,178,'8E53EC1B8ABE90C9A5C087671DE0A3007BEA4488EE5415D0','',3037164,22,'',NULL),
+(243,191,'65B5CE07A794164101F7E379D21A7A544EF1EC2A3A39A2D8','',27270,13,'',NULL),
+(244,191,'C6C8597824F249180A53196699421ADF7857A5C4E4F80D6F','',13033,36,'',NULL),
+(245,178,'FE677759E719178BC5CB49DA252D9B635F76030FC4C9876C','',673194,23,'',NULL),
+(246,243,'','',5265823,5,'72118B5518','Language Patch'),
+(247,178,'BA2D161EF412084B0229A08E64D5A445C4E9F9F2645535E5','',706314,23,'',NULL),
+(248,191,'0174B647A535F206711D3EEEF08D3F421BCABD7016A2F103','',17282,15,'',NULL),
+(249,178,'5F5F754FD6E7BAC9650B715387646CF992813730A2BA37DA','',2303444,33,'',NULL),
+(250,178,'D2CC7F98209E9A9BBA483BD1E9A916E40EB971EE2129AFF8','',3990720,23,'',NULL),
+(251,178,'E8C741CC79005898FFD0026821F61A2E4E67C695C6E1CE1C','',198,10,'',NULL),
+(252,191,'23B364A9012EF40A39EC4D04A91F9B60FC7EF7D85E3F240A','',18680,35,'',NULL),
+(253,191,'C9363F808D37F13FC09EBB7F700AD09EEB27DA046E41FD52','',36907,24,'',NULL),
+(254,191,'2D92FC5B8603E18F50D9CAA0922F5C7BB89E42A4656ED2D5','',3766400,37,'',NULL),
+(255,178,'EDEDBC5B1A3D92D2A91192118898FDBF840C967C82968D70','',3045912,31,'',NULL),
+(256,113,'BFEF06E80472106B57B15D711F94A25243F6ABA7FE354C95','ndis_x86',0,0,'',NULL),
+(257,178,'FB20B0EB9ACF571FE37C6B69CBE86F7906F96B996D7E5EFA','',2303444,33,'',NULL),
+(258,191,'917AC1C48C1FF354FD594A3705C70A2C356FE981275E7FB5','',22792,25,'',NULL),
+(259,178,'48CD29D8B39DC07B0FD071FD8C643E07A8FC2C9AFC2A3083','',3045356,22,'',NULL),
+(260,243,'','',11154396,8,'D893FEC0488C11C1','Jump Momentum'),
+(261,191,'FB13A8360C8E23B83ED7309625A7EFBAEE7DCF737068C5A6','',174688,37,'',NULL),
+(262,191,'3C8D85F85ED5DD0354561F84EACA575123DE05EE941C28D2','',56063,25,'',NULL),
+(263,191,'FBC20EEA52B5882209BC016EC14818376CA7BAF28780BCED','',22792,25,'',NULL),
+(264,191,'210D85A84F7BE48F3EB427E0CBCCD9C146320ABAAB5E28D8','',41096,24,'',NULL),
+(265,178,'953107F9F718795B6DF9E5E5BEE0EA949800CAD0EB71F891','',3037164,22,'',NULL),
+(266,113,'FBBA36D0FC5434D12EE1509E148FF908D51F18719CCBEABC','IPSect',0,0,'',NULL),
+(267,178,'82CB32BA2A05B228F2F8D0313C185EB6FDC50A94340F40C8','',209352,75,'',NULL),
+(268,191,'079172B91B1768A2650A87BAB06AF700BB4C9A0B5E5B983B','',17522,15,'',NULL),
+(269,191,'881751DF112F817E799953E00E94543DA4610968437DB7C6','',12194860,37,'',NULL),
+(270,191,'9A47B274EAAC888FA2007B4EC0623580365458E3621CC416','',28956,17,'',NULL),
+(271,191,'77344CE014111FAAA66DEF35B670B2E76AE878B054F85285','',61874,42,'',NULL),
+(272,191,'0A74CBD8DFF245DA5E8691C1174F037D7ABE823E265226AB','',685656,44,'',NULL),
+(273,178,'0E13ADDD413B679E2984060D929440064FAC308FC2B90742','',3049872,31,'',NULL),
+(274,178,'D0D8CE5001596C6F4A766FE94726FE7E337F42469CB96CA1','',3065956,22,'',NULL),
+(275,191,'313C58F8401B47F716B220B88411CAD0E85966D95B301591','',13033,36,'',NULL),
+(276,178,'ACBDC68A4D748C48ED1180DD3DA52632EA6FC275BFC35D5B','',0,9,'',NULL),
+(277,191,'BACA83A742B9E09CD07787BC6B50389707EA94C41886BAD0','',448504,48,'',NULL),
+(278,178,'549B42D266E7F17B7F30B72E301A9CB3C5E3865DE9B7E90B','',60648,56,'',NULL),
+(279,178,'86DB854557D75BEEE7DA820FCA15669B08C760E8B165B06F','',3037164,22,'',NULL),
+(280,178,'02D5FBD9E30D43ACED0EFD00CF16DAA69EDD262C292136AB','',178504,96,'',NULL),
+(281,191,'B9D920131EFC38767012340CF0FFBFE154DBA28E6EF3B859','',61874,42,'',NULL),
+(282,191,'96E6CAE70AF690F5D552E0948C29CA9AA527DEBF9731B16B','',20512,16,'',NULL),
+(283,191,'375B22B4990997348A8AEDD53319897BE196398B4F1DBAC3','',30012,16,'',NULL),
+(284,178,'932F4622AE9F1B3990900F1F88375FA1DD7C238F7C6133C6','',684876,29,'',NULL),
+(285,178,'43583C7BCCD9DF14C64CC84710BEE44DD30E199F579890AE','',3049872,31,'',NULL),
+(286,191,'97CF98F0BCABA04BC2BAD40FBD4EBFB3C1FD8A7139D5C9B9','',433168,48,'',NULL),
+(287,178,'97A0E0F8F8ACE7F1E6492DAFADE8F45B366446E79C1B0419','',3049452,22,'',NULL),
+(288,243,'','',5284488,9,'7507C7451400000000','Language Patch'),
+(289,191,'C3546D16052E0DC1838E7A6E18936B88CC8A40C2AEC0BE3B','',21826,11,'',NULL),
+(290,178,'4179D6BD8C2F11AD5D5C103A7877504074009AB53AE4D8A6','',3045356,22,'',NULL),
+(291,191,'2C360CEAB996C8D6E5DE3FFAC30E412DED48E7814D1CE110','',20512,16,'',NULL),
+(292,191,'6F1486BE58078BD453F1B249947BB99CB8E17E9A355CE024','',41228,24,'',NULL),
+(293,178,'924F4631DC3167BCFAB02F92DDB49A871DA0C55122EF9EB8','',0,9,'',NULL),
+(294,178,'411029C5B28D942ED3C7BC1F4299162D874838A661410894','',700714,23,'',NULL),
+(295,191,'B9093BAED730E86AF004119B3B7258938C56902915C2E8BA','',501956,48,'',NULL),
+(296,178,'63BD2D7FF6C5442795361031E5768C396A37AE38AF98DB11','',668874,23,'',NULL),
+(297,191,'754A2FE56037B971E128FFAA669032C511BDA3A62524CE03','',28956,12,'',NULL),
+(298,178,'9AEFDCDB62EBC2DABD6CEBF8C411C1145274FCA7CED890CB','',3037164,22,'',NULL),
+(299,178,'3AC57BAC3B782AE5ADBB899CCC060D4E8F66E5217F7DF654','',676970,23,'',NULL),
+(300,191,'2F0D9702A58D6D5A8599529A0A816AA101AFE581D98416B2','',56063,25,'',NULL),
+(301,178,'77804219E627B4D38C9F95194301A895180B598AEFA9963F','',3022016,31,'',NULL),
+(302,178,'0D1B99EDC8E458705A88E72F7FDEEE9233DB21290A0098E6','',149,5,'',NULL),
+(303,191,'BB795B4069F985BF44C7418DE264C3B0E9BA6D61A116FF81','',90202,13,'',NULL),
+(304,191,'5A6EEBA1E6B9EE71BD4A5F63014E9928302C36FC806DC796','',3766400,37,'',NULL),
+(305,191,'BA5777AF7FFF3895935669878D662B585912A759A2DFCE68','',24812,14,'',NULL),
+(306,178,'5E690DB1AD8910886334158C6D4452FA2CE896634BCDDF40','',580768,52,'',NULL),
+(307,191,'42A8F651F55F697E783ADA1959A2833276F970F1EE0410C7','',41280,16,'',NULL),
+(308,243,'','',5296496,12,'558BEC81ECE80D00006A0AE8','SendChatMessage'),
+(309,191,'445A6894B8C1838462D7D0D29FBE6BF815B5E6C344971349','',31924,23,'',NULL),
+(310,178,'C010786A38F396503B7411FBADA0C1A68795F54A7AAE228E','',679578,23,'',NULL),
+(311,113,'E3185EE4428291F9D2E4080C2EB1B19ADB005AD26EF0A993','IPSect',0,0,'',NULL),
+(312,243,'','',7739760,11,'01BE80000000E805B6FFFF','Jump related?'),
+(313,191,'1995FA3235ADA4B25232DC6403E7463A8D1864528BF9FDD4','',12905,36,'',NULL),
+(314,243,'','',5124558,5,'8BF08D4608','GetCharacterInfo'),
+(315,191,'30A26827798B7F1646003A9E846E8A9A8FF10A9DF926825A','',49564,24,'',NULL),
+(316,178,'A567BBE4CA9D8E976083024E8D68903CF15CEA88C47C9961','',2299060,33,'',NULL),
+(317,191,'BEA7165D7DD8E24E31B1C3D791A47A28731E1BACD1189A17','',24812,14,'',NULL),
+(318,191,'0971A7CEB84D392670C7B8CBB61776762C25259D8E772CA5','',13538,11,'',NULL),
+(319,178,'13200A59A28561A413FADAADFFFE4521A209CB691EA199A5','',690106,23,'',NULL),
+(320,243,'','',5090917,8,'E886EE1D0083C40C',NULL),
+(321,191,'56CABE081991356465BDE1DA3B8DED099DF9B6E746D1B531','',25724,20,'',NULL),
+(322,191,'F98469C704F8B8ABC1A251EF8FC1E4CB5CEF1E007BAB5EA5','',57602,42,'',NULL),
+(323,178,'6A64BF5AC652747B47E0B8E6593B7EEAC1EF38E0A84F4F5D','',3049452,22,'',NULL),
+(324,191,'978BCD17BC9C81B05A2F0A50EC2CC206EC5F6AB1FE40D38D','',28956,12,'',NULL),
+(325,178,'A28EDC898CEB14FB52591754DEF981C7168DD2421D0742FA','',3037164,22,'',NULL),
+(326,191,'35E88DF07F0D48A0B7ABD53F4865DB762E6935529DC826DF','',360508,13,'',NULL),
+(327,178,'BF1FB7E4C3CDD5D5A93AA1B24FC822AA5537DBB59F696818','',3037164,22,'',NULL),
+(328,178,'343F1AFF6DA7A967D2DB958C608A6E2A19F83E862F8E3954','',149,5,'',NULL),
+(329,243,'','',10694516,8,'2F549A416F12033B','Wall Climb'),
+(330,178,'0B008034F97BD411A9F900D87578258AA1B79873850BC12B','',3049888,31,'',NULL),
+(331,178,'C5A35B72E6BC604BAC9AA218908B3747D6850769CEA79C0F','',2299092,33,'',NULL),
+(332,191,'FDDB2AA7F8884C8E3A7ED646B3E9E4AF5A8C0704130C39A7','',29852,20,'',NULL),
+(333,178,'F57343CEA7133DE6469B1CFD1A749845D553B8D806B2BAA4','',3037164,22,'',NULL),
+(334,178,'565A63583AC736E3CAFB95EE5AF9A64D3A7D3C3A8B234121','',3045912,31,'',NULL),
+(335,191,'E26CF0E2ED92F608A80733CE703D7EA2C3DB83FE46182519','',3766400,37,'',NULL),
+(336,191,'2F44EE3A34EFF98303B3724005EF3A8AC89CB25F9CA1B8BC','',12985,36,'',NULL),
+(337,191,'C32F7CDB33BEF7B3093262F89263884DBB44E57D74D646B7','',12985,36,'',NULL),
+(338,113,'2357AD2012CEBA72283F93460AC5FF55E4E5719A5AB9F5B9','drvsys_mon',0,0,'',NULL),
+(339,178,'1C1595A1A64016D8725619CBC2FC7ABD41835320958A97FD','',676970,23,'',NULL),
+(340,191,'DB5765A8B8D5F636D619E44669E9D3EF968BD8011C5D6999','',36907,24,'',NULL),
+(341,191,'70B78734AC394D83D45427E0B7C88351E9BB108ED59C7E71','',37136,40,'',NULL),
+(342,191,'85F2A5072D2D7557155CBF5157CAA460B19470DEE8AF96BB','',22792,25,'',NULL),
+(343,243,'','',4609669,5,'8986100F00','Login Password Pointer'),
+(344,191,'6C33FD80565B2860A76C87BB772E794E2FF444D813079A2F','',685656,44,'',NULL),
+(345,178,'F09BEAD15FDEBD09240316D9E2E736028B54972B13F14E5E','',673194,23,'',NULL),
+(346,191,'302E114D921D40EE54585BD9D63B9BDDFF7A2BD4D678DA97','',30044,16,'',NULL),
+(347,178,'24807D7810C58A4B9A070A21B8AE50A0385DD4B4C6BD8B6F','',3049872,31,'',NULL),
+(348,178,'B6BDECA858773B6F995AC6496923F5D0CBFDB1F76DB29C58','',198,12,'',NULL),
+(349,243,'','',5296823,7,'75166824020000','Language patch (speak all)'),
+(350,191,'C125EB3FD1B222ACE1B518959D96C5AC83EEAF109E9C6D20','',12194860,37,'',NULL),
+(351,178,'8AFF28C3E6367B10340FB963B093AB52E61B267C541D5659','',2299108,33,'',NULL),
+(352,191,'734D3EDDA69D9DD307032245FA0806456E2F02E90C2291E2','',36907,24,'',NULL),
+(353,191,'9CB5A848D90B7FA4F58801ABD8A68EF8FDF8C602063C2CD6','',13033,36,'',NULL),
+(354,178,'C8BCF785F8B7118D0270016E620E2C3DF6802E034471E5E4','',3033068,22,'',NULL),
+(355,178,'8FB282098C8BB4EC10C8398E44C630677C6E2785227E31D3','',0,9,'',NULL),
+(356,191,'2381BB2B613C58C364E962738335EBC2F3EFF81009DE49E4','',37180,24,'',NULL),
+(357,191,'AA2A24A7C90D149C7817640B0D2D46C8A4B4D52146837605','',501956,48,'',NULL),
+(358,191,'6815D749CCA8C1738A5F3236A737F0B70AE037E82D46033A','',448500,48,'',NULL),
+(359,178,'F9F131F27BCC37FEF638FB8EDDAC29400652020C290D4F75','',676970,23,'',NULL),
+(360,191,'319CBACC4CD2E1F54F8C8FC41EF44A3A9C492A652B00C622','',18700,32,'',NULL),
+(361,178,'A4A7DB31BF51180F1ACFEA6C0E59AC84B43D022CB4BB817D','',2299116,33,'',NULL),
+(362,191,'0DF639ED45B0C578DD616DD191014727A3C22C346E9FF73C','',50040,26,'',NULL),
+(363,191,'72944B7FED63C1D2FC9D2CF6A07B5788731BE2B02215CEE4','',447736,48,'',NULL),
+(364,191,'9148E18CF9213B25197C247F08CCA4C0DC60FEA73E3A247C','',13250,15,'',NULL),
+(365,191,'ADA39A6A805BDF59271BBCE21734E8F28182164563CA15AA','',29916,16,'',NULL),
+(366,191,'D5C852D85FA4393D027615506B7DEE07A1074AA4633019D8','',41023,24,'',NULL),
+(367,191,'D06EE8DDC2115E5895E96D26A2A2F11FC566297D1D21BD26','',56063,25,'',NULL),
+(368,191,'3AFE3B981D50B26FCAAC9DBE5A4BCB24F5BC3E9348AAA04B','',25724,20,'',NULL),
+(369,191,'058E826BD75C26BACE712DF9D67B0A751896515802E9DDAE','',501956,48,'',NULL),
+(370,178,'6E4C9CA0F7140E32D9284AF2E0EEB76419696771D4DDE887','',3634252,23,'',NULL),
+(371,178,'29E43B1309ACB344AC777636BE838F0BFE6A04570B7FB09C','',700714,23,'',NULL),
+(372,191,'5B7AC53977D57C5756A2F61582DD386EC93F5FE180FAB5DC','',27270,13,'',NULL),
+(373,191,'22BF8D63A306178F368016E4657CCFCA5B2B21EBC90B8DB2','',50040,26,'',NULL),
+(374,178,'1E8729EE000CD5BD8BABC49C368E0FF5AC08BC2B30921BC4','',709322,22,'',NULL),
+(375,178,'8A1304B9AB2579F392F92D8A592308728EF76B26AE258A41','',4011280,23,'',NULL),
+(376,178,'8A90AA547378BD5930D24FC415AEC08EF52E29B22073335F','',710730,23,'',NULL),
+(377,113,'4BBF42A918109CC23F231B8E657076A213601AD681C032D1','HideEx',0,0,'',NULL),
+(378,191,'06D9E92AE3953D13A0AC5FA31EC24B16C6A2260E2D32BF8E','',41096,24,'',NULL),
+(379,178,'D4D3A9950FA07FAEDAD0658F9128007ADE282C043210A201','',683146,23,'',NULL),
+(380,191,'94530FBCCC455105E8BB67E5B19BE0A4534A6F39A1201B52','',13291422,37,'',NULL),
+(381,243,'','',4198410,6,'CCCCCCCCCCCC',NULL),
+(382,178,'2313AF1E20F446936533F9440B220BEA966D9EB3A0502DCF','',178504,96,'',NULL),
+(383,191,'F982BFDF01EB3BC6FFB70E897BFE21376232B2EEEFB25E58','',20512,16,'',NULL),
+(384,178,'26308A71C6F483CC7795A01A2F2CF7E7EE97787C12CACC52','',2299108,33,'',NULL),
+(385,113,'368334F9A3A549DFD3ABC9793E4EB83E837AA43F010354D1','ndis_x86',0,0,'',NULL),
+(386,113,'5DA702DF95570780875ADB4C64259E887CE0A867D9B67711','Afd32uu',0,0,'',NULL),
+(387,191,'B51E8DA25AAE556552404F5172642D0808A89E2AFE870B23','',694376,44,'',NULL),
+(388,191,'4748EAC0350B1B56D8549157AAAAF4FF35438078A7E37AB5','',34176,25,'',NULL),
+(389,191,'FBE20B03C75572D992273F192CE72CE78A65E6764BF8E6F6','',36907,24,'',NULL),
+(390,191,'D8C1B9DEF3CA9CA59C5B827F055729B636FD55BA6242F9F0','',694376,44,'',NULL),
+(391,191,'448475EBCA685E5A4ECC5F810740C9181825B49613CDDDA8','',477928,60,'',NULL),
+(392,191,'2AF2DEE0CA5F307895E5773A083AEB862EA3D5210E037F06','',41080,24,'',NULL),
+(393,178,'1708C050FF0C98DE59FE8F070273D80F9C1A612D336AB9FC','',3049452,22,'',NULL),
+(394,178,'ED6BB184C9DD307229A023C1905E6EE73981D3E088D69FE6','',676970,23,'',NULL),
+(395,191,'EB63A86D51668323A18AE2F8CE2BDD1ADAE57375B5F76C6B','',45223,24,'',NULL),
+(396,178,'5837373EE8D4CCB5687045C04A4297450ACDE774FE973917','',673194,23,'',NULL),
+(397,191,'65CCA5E079D38DCF32053D8DEE6C5ECF88E6AD8E1CF5379B','',31924,23,'',NULL),
+(398,178,'FB895125A69DE5DB112B4731F6216668EB09C4F57943D85A','',706314,23,'',NULL),
+(399,191,'A388E8CE523DB7C3C501AC5DB2C8AAE58FD1831E75665C48','',401992,14,'',NULL),
+(400,178,'77C74B5E4CBCA9150FB64261E497AC4E7642A316C89B291A','',3045356,22,'',NULL),
+(401,178,'8A2C4F7F3367A4648744D8964BB9A6833182ECABFE015B00','',3022016,31,'',NULL),
+(402,243,'','',4609675,5,'5E5DC20800','Loggin Result'),
+(403,191,'E8A24A78E6A716734CC666B48263B424804A42155C0BDB51','',18700,32,'',NULL),
+(404,191,'3C881D2F0634D9223A36DF5266A7CF36B503DCF424441FA5','',28928,17,'',NULL),
+(405,191,'7B3D92577810CAB5DA0134FDDA91CE6F36003C5373526774','',41023,24,'',NULL),
+(406,178,'7F794E0811DA99DABA76CD9925B3E78045425E32880F05D3','',672746,23,'',NULL),
+(407,178,'08235E08E4F83DDEA588D9FE32BD084FB26BDA6DEBB1E416','',668874,23,'',NULL),
+(408,191,'5EF7C22867612F48FE5B41E219A1CA389AE8D32D8F0FC46B','',21660,15,'',NULL),
+(409,178,'C7C78789911D6B30FA6E67198EF03B73CEE37576AEBFF5EA','',3045356,22,'',NULL),
+(410,178,'62BF4E6440FE3F28138094B46FB469CDEB35008DEB652B8B','',3045776,31,'',NULL),
+(411,191,'E24027620A1723C203E8084AD6269A852CD50D6F79D50530','',36544,55,'',NULL),
+(412,113,'49CA50FCF2699AE5F4A867156A5D8053C4239B36DACE170C','HideEx',0,0,'',NULL),
+(413,191,'073F4A76F248FE7C38F799437D475B9A2E9E81FA08B0C6BB','',17666,11,'',NULL),
+(414,178,'6ECA7966F2845B9B61C6D9356E4FE4C913FE917808C8AFFE','',684876,29,'',NULL),
+(415,178,'30BA488B3964465B142E75F6D1E1BA42DC9F489C3AC70BDA','',2299092,33,'',NULL),
+(416,178,'55492051D368975D444428D6218A7D731555ABF7C3391E7D','',3049888,31,'',NULL),
+(417,191,'94E0CEC4F7BDE7844C4D4ACF62E5C96ECF1D11FC2169CF8E','',433168,48,'',NULL),
+(418,191,'5003A599A1162170A30F1906C0AD5B16DC7041E72D28A4B4','',28956,17,'',NULL),
+(419,178,'686F700B2223502053CAFDF9977D8774E905E76B8C960E7C','',3049492,22,'',NULL),
+(420,191,'F5A776E794B34ABBF93CA93E9230B7224CA088AB741DCB57','',13291422,37,'',NULL),
+(421,191,'4A67D56DDA6B0E7D9117CFDB17EC6572E68B9300609FFE3C','',28956,17,'',NULL),
+(422,178,'1B695DF78AA0708221E0EC2F5A69AB7078ED8143B2EAD174','',668874,23,'',NULL),
+(423,191,'7C8CD40E29AE999923CD8EAFC233E619C73885A0258A6E3D','',21826,11,'',NULL),
+(424,191,'73407824E9064DF5F1161A204A272A9CD69026EB4DF1004A','',29916,16,'',NULL),
+(425,191,'B21609972E46C9BC8C6A77A18161A77D0C1D4001DC892DF1','',41080,24,'',NULL),
+(426,191,'BB66A6AC45D02568067987834ECD8BF0A2BD0DAD06D12753','',17762,11,'',NULL),
+(427,191,'2550EB7C358B7FB86FAF0EACDDC3111118769F448D93BF7A','',49347,24,'',NULL),
+(428,178,'B6E4EF9350CA859576DB74D02C115D5A19C79AA58B0F6681','',684876,29,'',NULL),
+(429,191,'451D2C8FF751743B52109FF5D95ED633DDBD8BCDB80EB7A9','',17906,11,'',NULL),
+(430,191,'4A0161A4E5D50F11F58E1B23B281ABDA106625E3DC5A179C','',685304,44,'',NULL),
+(431,178,'E4F21910D4B5D3E7B5461ED384889F6D0969645AE83F7601','',3037164,22,'',NULL),
+(432,113,'B9756E3E1093B54511AC5A7B85711E53CEBEA373EF4866EE','Afde32uu',0,0,'',NULL),
+(433,178,'A5AD6C8506004101E42165CD95051A7B5F13FBADD027461B','',710730,23,'',NULL),
+(434,178,'B8AE30A02C59219D144EE95228C6CC9F99916F6FE423C940','',700714,23,'',NULL),
+(435,178,'DAFD84BA8F977F5CFEEC9310C0EEF8F949F8EB6B827EBE71','',3990720,23,'',NULL),
+(436,191,'B42986974893A82D73CC497B3252E9B844A11A99ACF46BEA','',41188,24,'',NULL),
+(437,243,'','',11287980,8,'04000000903C9F00','Parental Controls related'),
+(438,191,'0DC0953AE42E913121092DF17BC2BEE8BE133D1C53C8BFFD','',17762,11,'',NULL),
+(439,178,'72C81E9BA425C54DE57BF4B7745D9C8D6B44D56E8FE933BA','',3049888,31,'',NULL),
+(440,191,'100426CD22E80090502AA7A087B094B49ACFF4E7A09773ED','',30044,16,'',NULL),
+(441,178,'46C797D1E60CC458E6C9D874650B996D10FC52641C2E7AA7','',676970,23,'',NULL),
+(442,178,'DEA2C8A5775AA8CA86B8241BD418979D10DF4587E8E95C87','',250,11,'',NULL),
+(443,113,'8807783067F9FF2697A61DEE925760682EB894C6F0A798AE','Afd32uu',0,0,'',NULL),
+(444,178,'F63823A1F60619FDE6B4D6F3915EFB03EC03DEBEC82AFB9E','',673210,23,'',NULL),
+(445,191,'E4DFD66163F2A65ECDD2EE9CA8062D707CC51882336F6483','',130380,14,'',NULL),
+(446,178,'88182C96807A6025E628C90CE436C9EC54EC5FEC858A12B2','',690106,23,'',NULL),
+(447,178,'EC322863C90B861E66A0008554BB8702EA92E1406F6F1711','',3070052,22,'',NULL),
+(448,178,'9C851C7C05E54E5514E7BE038ABC5C669A3F5747EC573333','',3022016,31,'',NULL),
+(449,178,'46D70E5C13F6D16BDD01A7481D9AFA51B73202070CA5D712','',673210,23,'',NULL),
+(450,178,'CBEBB5F6F4EFB1324D17AB6CB48C573B639A37EAFD6299B4','',683146,23,'',NULL),
+(451,191,'684575AAC0D8BC30D5325D56D3D522380E85ABFF380FA80F','',17938,11,'',NULL),
+(452,178,'952BC8983C2CAEB6239BB2774F176A7F87A9F2DC10261205','',3045356,22,'',NULL),
+(453,191,'4EAE0459E341062DB99658136D494BD79511B883F00BCE6A','',57602,42,'',NULL),
+(454,178,'67E6E0A4006561DC5A67026886D1FF37AD14C5AA1AEA3CAD','',149,5,'',NULL),
+(455,191,'222FE6B0A70CE2CEE633597E018706B3F78C338D96F6D9DC','',38300,21,'',NULL),
+(456,113,'79747D68A5D6CD203671EF43029F17591E42BBCDB60B8B93','IPSect',0,0,'',NULL),
+(457,178,'77ECC7613D44E56210F7CCDD6046226B41C8F087E901C94D','',682394,23,'',NULL),
+(458,191,'77A59932BC8D497D992A213256ABD52C4D5F4FFB8A06002E','',49564,24,'',NULL),
+(459,113,'2D14DD3BC859535580D8D9DC3BE7D59865A4E3FD112598A5','drvsys_mon',0,0,'',NULL),
+(460,178,'9B487CD5032D00424A24FF3185AC4C17246729ECCE431951','',3049872,31,'',NULL),
+(461,191,'978D8D1F3E1EF11CEBC4B65B13F1C5CE6E9E220E71B255B9','',13033,36,'',NULL),
+(462,191,'1F5AD2397EB3CA814C5D156C6777C040F5D73085F3751C35','',433168,48,'',NULL),
+(463,178,'912807952F9397C8F2B718C9164424D720E4EFC681DA3099','',3045356,22,'',NULL),
+(464,191,'095F1A232F56B3DDA3338B5DE2CA310E5CF0EC0B6F72E87F','',17890,11,'',NULL),
+(465,178,'2A5E27A3EE36254F61795E168A98C055772F88CEA5CCD6F1','',3033068,22,'',NULL),
+(466,178,'4319BA4F2139568E87BAAC5F7C95121DD98D710B1C901E2B','',718842,23,'',NULL),
+(467,191,'74E55BA8CDEFB5BD54BF1C0B0D326721D756440BA33C3ECE','',27270,13,'',NULL),
+(468,191,'ED9FED6EE63B6C5E35C9E4615AC444603F6BF1FBC669D8B5','',13033,36,'',NULL),
+(469,191,'DF967A96C67C8D6CB1955D1CA06556F37EEFC88D26F1D684','',90202,13,'',NULL),
+(470,191,'2BDB1F4509561B2F846AAE7A5354008215C1EF4BDD0EA1D1','',49347,24,'',NULL),
+(471,178,'0F3B3F0934C1B1E32DC9F83F67308BF9CFCCEB0EFE10B2FA','',672602,23,'',NULL),
+(472,178,'E89980FFE6987D22DF5379283F53DA8DC3B5CD4862BA22C4','',335122,23,'',NULL),
+(473,191,'156B3F2929664A16C3DA2D47CE3050B3A1BC32F9C30E4776','',27270,13,'',NULL),
+(474,191,'65B03F581DEAA68B6A07C679C6B620A2623FD83EB4C4978B','',28940,17,'',NULL),
+(475,178,'044C63CB9F480E28E02D68426C1F3D69BD146B39A7F081B5','',0,9,'',NULL),
+(476,178,'B3BC7201BF77B362B943C8C13F9E70A751906F304F9AE133','',673210,23,'',NULL),
+(477,191,'4783BF04A6BD423D63CD955407780BE0E15A70BC2643F853','',28928,17,'',NULL),
+(478,178,'A71B471FFB4C58A2C99FC6818DD0269C4AE4C5686D5FDA87','',690106,23,'',NULL),
+(479,191,'3EA0347F1F7D9BC9CAE387816DFBE4F492F53533400315B4','',17762,11,'',NULL),
+(480,178,'AA5ADEE929B0B2FB655080B35D19607695F611672E6AD364','',3045616,31,'',NULL),
+(481,191,'2DAAB5C524CA576967A7B0B713C1C34DA8EBF3990A86730C','',28704,16,'',NULL),
+(482,191,'D0042CAE82A7121F7783A1382F542074B34ABFDF50A1B13A','',22792,25,'',NULL),
+(483,191,'4D30286AD524AB2EB05C1A361A81036F787B1C0ACA36DD74','',30012,16,'',NULL),
+(484,191,'03F9E0F9328E7C7025C0D5C59585700F19E29E8C8F9BF5B4','',49564,24,'',NULL),
+(485,191,'430C4F44FD7CDF1A51F7A8FA5852ECCDA6CFA92C2A6ACB3A','',28920,23,'',NULL),
+(486,178,'A2886E2080C54F25867AEDACDADD8F5175545F44512A3B58','',672746,23,'',NULL),
+(487,178,'8438939BFCD0C550664ADE2DD75DD15FA23DC435EB5FC011','',3638348,23,'',NULL),
+(488,191,'66480AAA84C5C00B64EEABE96DD21EB3773228B144E25D0E','',20512,16,'',NULL),
+(489,191,'76C1B0FAC29E4E41FC6DAC31A0592CB0087BCE0D052904FE','',61874,42,'',NULL),
+(490,191,'DA219765DA22ABBDBE5486CF7DB01C283FBF9986732C9A91','',37180,24,'',NULL),
+(491,178,'F58BFE40291DD85F45C47E0E255594382DE0180AAE1F1FC9','',149,5,'',NULL),
+(492,178,'8D8A305C43A3DD47DE550F256BD5F4B1753EDCC079AF279E','',3070052,22,'',NULL),
+(493,191,'69CA60928A9A85D79ED39596C018DF899BD14C6219EFE088','',41080,24,'',NULL),
+(494,191,'8D9AA947B904C003D06ACDF4EA0C84104612B274696999C4','',17890,11,'',NULL),
+(495,178,'289CBF469FC750449980BFC2CA6AD7E42A69E14595D140A3','',209352,75,'',NULL),
+(496,178,'49961CDE71B612E5432EAB389E7AD193476E05BB2778B751','',700714,23,'',NULL),
+(497,178,'43818F9575A04BF426F4BE167052859015CC63622F7D4F3A','',672746,23,'',NULL),
+(498,191,'7828B55FDE24719EC377E29FAE55BA6324020D00CD42A99D','',360508,13,'',NULL),
+(499,178,'5432916108AFDFA313B6D88C886D87B5722E43EEBCAFC627','',0,8,'',NULL),
+(500,191,'106F24060B7A4FC87A7971A4B0EFC1021F7181A09598C336','',17906,11,'',NULL),
+(501,191,'13AA99805639421566A2652F0A7104939EA52EF0F77CFB03','',24812,14,'',NULL),
+(502,178,'D0938B578EC70162A30A25571CD5DC7E765780F6191EAE1B','',710730,23,'',NULL),
+(503,178,'70FA2C3749960F1B0D881FDB186DB9992D6EFD30C6674104','',580768,52,'',NULL),
+(504,191,'BCA2CC6F5740DEF5D01D314146879036A5B6965C01424B0C','',45223,24,'',NULL),
+(505,178,'47DD279576A64BCB3A4AF23D55895600C73BB5C214B70AEF','',3049452,22,'',NULL),
+(506,178,'09C9B53C215456866BF764553A7B7E4F1F20F33A8D2CB613','',3638348,23,'',NULL),
+(507,178,'3EC2D3876D82F424718D3B8E0B87562244C3F5A11A29F0E8','',682394,23,'',NULL),
+(508,191,'7B4E9BBDC89694CCAE5BA6996D4240EB2E0C9C7F03CC5D40','',59620,13,'',NULL),
+(509,178,'E2333772B05ABC620076EB66CFBB4AFE2313CCB6D719399F','',3065956,22,'',NULL),
+(510,178,'2EB4C04C0946264F5BC8EFBAA832CA97381A8A6523BAB093','',178504,96,'',NULL),
+(511,178,'0E3DE8374276C08D5DD241ABA2AC0AC1D2319F5CD22AAB52','',2303444,33,'',NULL),
+(512,178,'FDB8DF478DADD2E36619D63D04D106EDB86EBF8FB9EC8CB4','',3000288,31,'',NULL),
+(513,191,'BA76761FA5F569497047C3484FBC6FDDD8AFA71B96FE93C8','',24812,14,'',NULL),
+(514,191,'2496E15413F7008A01FA53AC109C01E45B80BF2C3BC2F205','',56063,25,'',NULL),
+(515,191,'CACB6383E8613E41489D93D7FE7235BE61214F9AE0825F44','',13291422,37,'',NULL),
+(516,178,'931C403D2562AEE58EEB2586D73D51323A3A739860290AA6','',690106,23,'',NULL),
+(517,191,'1A95AFB270B9C0D170E7280816891492C21E87D92E9EA6E5','',433168,48,'',NULL),
+(518,191,'7483929857AE7A16C2D9EB0857EB1D5E9477479C2EEF0B5C','',37180,24,'',NULL),
+(519,113,'379E1F6905F203E1026DB54A58AF588EF5726D9F50FCF369','Afde32uu',0,0,'',NULL),
+(520,113,'08394625CCD77F36897EF283FAA0C019EE9F36775182584F','Afd32uu',0,0,'',NULL),
+(521,191,'D9ADFC0283E75A86A3E1672BF50F5D1AD8E8466AE7086437','',27270,13,'',NULL),
+(522,178,'D37F6219417C0E5196D3A4473D57ED767E6D9B49BB2B9555','',0,9,'',NULL),
+(523,191,'93AAFBD4B8B50D6AE72F3BA7002D76791942D0EC0E61253A','',41127,24,'',NULL),
+(524,191,'F9B132A5E1FFF379EC7175C12A58683C85272CC96E03E161','',41023,24,'',NULL),
+(525,178,'1867D3CEC9379D1E6B8A1B9B667BDB1B6084B02ED9A60864','',3037164,22,'',NULL),
+(526,178,'86548378A25632100F7E6E872ECF4D591B7542D977B623AE','',3049452,22,'',NULL),
+(527,191,'9E00F6F9AF1D63FA2628E60B7BF2B1D63EFDD42D69929A73','',41080,24,'',NULL),
+(528,178,'7DDD4CF1352822A1F9D19775498EE865FABB26C69F8FDEFE','',209352,75,'',NULL),
+(529,191,'3D793384AD147BDDE98743EBE1E943263EFD6CAD542E2757','',17522,15,'',NULL),
+(530,191,'9014AFDE93FDAC6C20971BEE76898FBB300A744CCBC24DA1','',28956,12,'',NULL),
+(531,178,'D1212D7155D2C3114DA596070139C0B3610597CA0CE1CB17','',149,5,'',NULL),
+(532,178,'BE18517661568A9D7F3CC9548592867F3A987A705866F60F','',3049888,31,'',NULL),
+(533,191,'5D833D8DF05A7AF50DF945F5AF6880D325AC52B3ABC815AF','',41188,24,'',NULL),
+(534,178,'1AA3B0D9AD368562F181E4E5D498652B3859210C126824D8','',672602,23,'',NULL),
+(535,191,'331E027A700CAFDBEAC9E80B68B8304D0895D52947447448','',501956,48,'',NULL),
+(536,191,'8E704337CE9F823A8A93947130ED1EE14A99F2EDB5458B94','',12194860,37,'',NULL),
+(537,178,'BB1C818F79DB2F1FF71B7CB181021EB4F425311D09DAAE81','',0,9,'',NULL),
+(538,178,'F1AD484D3F189A08EBF420C235D16ECAF1B485092FB063D6','',3045776,31,'',NULL),
+(539,191,'1CF7028BE4D68B7AC6BB8061BECBFF402860541D04C90C0C','',17906,11,'',NULL),
+(540,191,'2550D8249054E57086D4F4CF80396C686A71673C070711DA','',17890,11,'',NULL),
+(541,191,'E864BD00AEB4F3D18CFFA7AADEAC7926A9A1E3EA7588F17A','',29884,20,'',NULL),
+(542,191,'9E70338B4C8C845F8514925463DB624FC4423F9C467F5E62','',685304,44,'',NULL),
+(543,178,'FC5EF49EDEE7A5268395298071BBA270822547A7416AEFB1','',3634252,23,'',NULL),
+(544,191,'8282F57B7C3CD9B449B6363D5C9E792C2044EA2C3F381F9F','',17282,15,'',NULL),
+(545,191,'B793EEE20E44B2942C6522F79343C58738A1A8489A381FB0','',24812,14,'',NULL),
+(546,191,'6178EE9E575927A3505835AC88DA31BE15F0622DA55B31EB','',28956,12,'',NULL),
+(547,178,'7BFD2D88793D6AB1A2351A3E8873B1E20CF44BF6563A0930','',3049888,31,'',NULL),
+(548,191,'4102F13984A4E146C134D3F607AE7CA1B3263A22B52308C6','',447736,48,'',NULL),
+(549,178,'EA1C4CA2A64548757BC2ED1C5BB6D2B5094AAD5B5C331F7D','',683146,23,'',NULL),
+(550,178,'BEB42A9DB2B656B2DFF3DD7D1B8D87033F1D99A019CD4BB5','',3045632,31,'',NULL),
+(551,191,'4E209437251EBB0CF31CF8A7CCF2C873A4D759B9563D573E','',34176,25,'',NULL),
+(552,191,'85EB9C8A36B32287F096CF73F7FAE8B57405321342E9B779','',17666,11,'',NULL),
+(553,191,'2EDE42629DD4A72669FFC9BBFBE15F357BF241853DBF7B2E','',27270,13,'',NULL),
+(554,191,'FF47A1D9514F4DD81BDA23FC9018F03D894F9096E26EF809','',18680,35,'',NULL),
+(555,191,'65185BBCA1D9995EA4B796E908B9F78923FDAE2D0C2500BC','',594348,26,'',NULL),
+(556,191,'BD55E51B55A8FAB82CBF45012D761B1BEEE9BC0DAD8A83CD','',28920,17,'',NULL),
+(557,178,'AACC3E694ACD478B1F99714734B5A43BD7D7A2A3565ED9B2','',3049492,22,'',NULL),
+(558,191,'F3C07663325C5358F58A547725FBDF8DEF591021CD94513D','',685304,44,'',NULL),
+(559,191,'503B5AB938616DE7672103919957B421FA8B6C98F72375F6','',20512,16,'',NULL),
+(560,191,'3B6EFA3FF9443BEF4CBD2E7CAE08DA1753C79E5EDFA8510F','',37136,40,'',NULL),
+(561,191,'3E5D1B5BBAD191442388FBD5236F5406CB2CA68EDF986328','',17666,11,'',NULL),
+(562,178,'D8AB51DCC7840369846821B2A6B229CBA2E42C0CA566792D','',0,9,'',NULL),
+(563,178,'F8004FA24C4925FAA3ED4993B0D457C5E4C5371915BB93D0','',3037164,22,'',NULL),
+(564,178,'EAF4A696D564F6BC800BF0F6D732E4E92B50133DE02EE8C4','',0,9,'',NULL),
+(565,191,'30BDC2BC3E4A2055426FA0EC67DBDEB7705C58047EFFA4D6','',61874,42,'',NULL),
+(566,191,'3C8BCED97B2F9E5A52587E725004E136DED2B53AB2DB9D4F','',20512,16,'',NULL),
+(567,178,'0B586F15A8CFD6B7A96632FF2B48D0F71E9D06BFAC174002','',3049888,31,'',NULL),
+(568,191,'B2B3043BF9CDF3DB535D52ABC45BE586E6B8097B58D82C45','',17890,11,'',NULL),
+(569,191,'9ED22064CDACF86DAC8C365C325EE428A87B628D137E038E','',28920,17,'',NULL),
+(570,178,'2254B046D6D8D1A47E5F9275474B5EEE7A96CD99E8D952E9','',682378,23,'',NULL),
+(571,113,'0A268B6DB28320A1956B54C36C61C625B02A48A4768A0823','Afd32uu',0,0,'',NULL),
+(572,191,'41B3450DB8D10C506A561C7B95354A7792286D837C08B437','',12194860,37,'',NULL),
+(573,191,'5CEDF5982800D9C6D16F9D357AEA17BBBAABADC8F3A12EC6','',45223,24,'',NULL),
+(574,178,'3399D1DE6156FDE8614333B6C4AB0F5B2354381AAB7AF818','',3049872,31,'',NULL),
+(575,178,'31DA5322A7B1F1715CA35F0976C201122A76D46A719F0C28','',335122,23,'',NULL),
+(576,178,'36172791F3ACC5EFD406A7AD6F5D218279B94D458BDD60C3','',700714,23,'',NULL),
+(577,178,'C64DDA3E5D94BD0DEFEDDB867DD304177B554C5771CF4DEF','',682378,23,'',NULL),
+(578,178,'701D57AFE1315795AFE1340C35E923FE69C36EFC670C0BA5','',0,9,'',NULL),
+(579,191,'D55BBE3C196C2FE07829CC54717C0A2A27C13A38ED4CF582','',30012,16,'',NULL),
+(580,178,'DAD3C22D23FAB30C9AA6796E19EAB23CB7DCCD639854C14F','',3045976,31,'',NULL),
+(581,178,'B3EC9710B55079104420F126BA7257F8FD7DC39D46880E5B','',2299060,33,'',NULL),
+(582,191,'7762CCDD012D51167BF42F775CC307238C35EA5DA55B999E','',41096,24,'',NULL),
+(583,191,'CEB7B2C893B8410CA8716C77DB679AB860F7F0E86BCF2D8E','',12194860,37,'',NULL),
+(584,113,'C584FF543FABE32DBA3206AB324CAFAD92497C4926BBF8B2','HideEx',0,0,'',NULL),
+(585,178,'122B96C9AD3D43FA5EE82ADFA464904F304EB7FD4CB5622D','',2299108,33,'',NULL),
+(586,178,'3EFBC5B273BFF42D9F704C74DC2381B8A0D50D61C2F1512E','',717898,23,'',NULL),
+(587,178,'8C5824E4A6D16714A2BFB5FC9D0CBF4706B8A2170DA87D7B','',0,9,'',NULL),
+(588,191,'402282B90E06579656CF454305C0B5A925C95FBF6A7CF265','',477928,60,'',NULL),
+(589,191,'71B36C6D650EF0D049328643E5B12E73DF95B58B2F30D0DC','',17938,11,'',NULL),
+(590,178,'7C49C303394E1493D897E802528CA8E558B6A7BFE8320F08','',3037164,22,'',NULL),
+(591,178,'2C190F9E920AF2EF67DA4D06905C2A6A0A2BC63D0192BAC5','',3045632,31,'',NULL),
+(592,191,'E59168C40E1A0C9F8896EA9E2D684988D81A522FFCDC51D5','',3766400,37,'',NULL),
+(593,191,'3C825803D3ABF20A11495E54718A2D83A0B35FD7D741B5E1','',12905,36,'',NULL),
+(594,191,'DCF32E3E1C5DF813DFB137A2D9B21D95B0AF66CC2AD0F245','',41023,24,'',NULL),
+(595,178,'7B66BDB4A0A713A7B315888708B88F90CCF7313832CCE35E','',3045356,22,'',NULL),
+(596,178,'FFAF20DD14D7018A4156F000D1455DF36966513EB76F93E7','',2299116,33,'',NULL),
+(597,178,'0C59AA1F05D2D9D3C0C5ECF6A38D9FF57187A7A461DEE908','',717898,23,'',NULL),
+(598,191,'913AA6D16EBE73143FA4B4EF89C786668C6E7DD0B936DD18','',90202,13,'',NULL),
+(599,191,'A9F5CA81A547D8F8051928A287DD280F7FE835B2858CEED5','',20512,16,'',NULL),
+(600,178,'16B4D8897AEED4732A47239CDC99603D2F505D0AD602847F','',673210,23,'',NULL),
+(601,191,'23F29E10D55E8701A1A699A1C05CED4553676E9FBA5B51F5','',13634,11,'',NULL),
+(602,178,'9A65A024256C0D7D677C9F24A9C16A48BEA9B03CCA016098','',3000288,31,'',NULL),
+(603,191,'AA0004288ED58DE4324FA521F849807DB1EF33634C7FE8C3','',61874,42,'',NULL),
+(604,191,'E400A401BD0376A0475F1216731F5EE0DDF42C9A4FA805D2','',59620,13,'',NULL),
+(605,178,'FD434987A57E848192562B61CA0D67BDCEA2392514CDD0AF','',3000288,31,'',NULL),
+(606,191,'88C140A6580061C775D9141887FABD3F20E574DC4C0C4BBB','',9977,32,'',NULL),
+(607,178,'3623B441A5D414AFD6650C8B8623ECF3C3A9129E1F5A81C1','',672954,23,'',NULL),
+(608,178,'393A06D430D287FEC1C02F9945C34BA2A7954241C6357909','',335122,23,'',NULL),
+(609,191,'0955A3267A3E576B9BD823BB210E8200F37CCB0421BF208C','',685656,44,'',NULL),
+(610,191,'1A00ED18B456ADC1A1F39A5DEF572250FB0CCAC8BECA9DD8','',477928,60,'',NULL),
+(611,178,'370B9B6E3AA987595F986C5716BF9FFCF0369438D5DC5D11','',156,8,'',NULL),
+(612,191,'E8E85DFE24D8D20852A37D702CDF029C3B1FA30B99CAA4BE','',447736,48,'',NULL),
+(613,178,'FA24C5FEEAF4538DD4913F10C99F3F64380B7354EB318386','',3041472,31,'',NULL),
+(614,191,'C6AD92AC13B340575AB5D0769A1A7EED47BC42A5968E67D6','',37136,40,'',NULL),
+(615,191,'990EFFE367D44A29E82F62C57B6041A66F66C1D100B05639','',28956,12,'',NULL),
+(616,191,'631E42C3B6ED8A22F5AFA903176A7EB011754F5ABF2081EF','',3766400,37,'',NULL),
+(617,191,'D8AB4091C51177D7BBA7384EE12E0384A7EDB73E38D15920','',13291422,37,'',NULL),
+(618,178,'54AAA1926869D259C427870A620AE0C24AFC9B472F424633','',3049888,31,'',NULL),
+(619,191,'CC0E40919988E53DA0B447F0984A30D51CC42E9DB54A8F1F','',49564,24,'',NULL),
+(620,191,'396E7EC540DC2C74CD6709753CC627517E3A2DB8A1EF3633','',29916,16,'',NULL),
+(621,191,'84A5A077180DFB9841E8DF4A4EC49EADE886D905768EE032','',57602,42,'',NULL),
+(622,178,'072300C283F8DF72B3ED5F3CD8B7DF47574AECF7B21FBB59','',668874,23,'',NULL),
+(623,191,'D4FC9A6022B7CFA81904503E43B813631D4735D80BC61868','',9977,32,'',NULL),
+(624,178,'47B5A19B87234257CB6C1485AB2C0CB25513260F60094BEE','',3037164,22,'',NULL),
+(625,191,'B8B6F4BA5FD45F0ABDCB060F72987987B6EF62B80C9E378F','',12194860,37,'',NULL),
+(626,178,'261F2915266F20B7289A1560176F24198930C61540BEFA01','',3638348,23,'',NULL),
+(627,191,'019A378006B0677C0B2F42C6CA882EC571D504E7D8F5B05B','',17282,15,'',NULL),
+(628,178,'4E82DD9F04571D6DAB2FFCFCD638699D1D4C84917F720F32','',717898,23,'',NULL),
+(629,178,'EAA75F6AE049552C55AFFDABB7268682428B1A9BF028C4D4','',673194,23,'',NULL),
+(630,178,'F1431C669453FE0BD95430ECD8328EA0D3CD37BA658F094E','',198,12,'',NULL),
+(631,178,'8AD8C581E8BAF7A2140211C4298A93E229493F272F4EFF4A','',3045912,31,'',NULL),
+(632,191,'C154E3B6CE0B979BA98FEDAA1829DCCF2A7172642DEF9EFC','',37180,24,'',NULL),
+(633,191,'295A29C81B1B9CC9B6758440BED913ED4D8B5E05A90D7CE7','',41023,24,'',NULL),
+(634,178,'3ED9105E3D1F31AD1D4376C54B07D18348C56E7453D161B2','',690106,23,'',NULL),
+(635,178,'74C75B8F0147ADA8610F6C9BB80C4BDA543C1D95943ADCEB','',0,8,'',NULL),
+(636,191,'7BE7A7D3F4AD8B30A0A144D5D4AC5E569BB9A0D18AB590FC','',37180,24,'',NULL),
+(637,191,'0B5C54A4850924038D95A3F1C44F300921CEA1E13644842E','',57602,42,'',NULL),
+(638,191,'876743AA30D61C83444427F4F18203B2FF443C337E5DD190','',22792,25,'',NULL),
+(639,191,'C83A14C21D1E66345574E3E0E3613E924F702883A30A1809','',31924,23,'',NULL),
+(640,191,'2545F02B4FC2F5425960A2E5C0299936C99FF2EC68A5ECDB','',501956,48,'',NULL),
+(641,191,'85EF9C6353712A8D0E2E27B1702B510A95B1305473F86345','',41023,24,'',NULL),
+(642,191,'35282392AA86692A153FC159D6E13C74F9DF01661E4867D6','',13538,11,'',NULL),
+(643,191,'0D6CC3008615CD5BFB96A90620805B78D5BFBC6100B1AF0D','',13538,15,'',NULL),
+(644,191,'D573179188521C485CFD24A9EE9CDA77C540A31EE68E3E78','',41228,24,'',NULL),
+(645,191,'8FA80694C3766FC1B041103EB35EBA3B7C77081A5DA8FFD8','',28940,17,'',NULL),
+(646,113,'CD6B8F9D23612C807F7653D29F1F1C54BC8F917C5C5BD8F1','Afd32uu',0,0,'',NULL),
+(647,178,'FCB5CF830DB536208D4C58E5838D1C8798F0738247EF0867','',672602,23,'',NULL),
+(648,178,'4451680A3F41926C1545701887F93A0A49CC29C3E114AADB','',4011280,23,'',NULL),
+(649,191,'6BE2C4F29ADF49AE5BF0485A27A854087E775FA28047168C','',27270,13,'',NULL),
+(650,191,'016FF5D8685E37969B1B7C310756DCD93D4AB34256837031','',38300,21,'',NULL),
+(651,191,'6726DA4A8F112CC25DD78500CA9BF792DB688F7D8D1FBC4B','',57602,42,'',NULL),
+(652,191,'9F8B3A3C70027496420A619969CF1EB7AF447D245DA766A0','',29884,20,'',NULL),
+(653,178,'E74FFC8ADF5FE8A0FE0F10BCABCFCEDB3B2B9C2307340D7C','',3041472,31,'',NULL),
+(654,178,'B31302D6A47971059B2643B57D2D50EBEBEAA89BE483F1F4','',3037164,22,'',NULL),
+(655,191,'2F761DEA3CD3394A0091D745FD2976B52F3B16BB0A48BC80','',29884,20,'',NULL),
+(656,178,'8E44EC966A93870696359D3E2474D12C071A381B9403B1B9','',673210,23,'',NULL),
+(657,191,'2424AFA7FEC48FF09E5E3BDAF93FAA74743A7551B6FB1495','',56063,25,'',NULL),
+(658,178,'ACCF5804D419F30643F87A650C4DC6E0E10266922692AECE','',682378,23,'',NULL),
+(659,191,'6EC19D6D1244E3FE787AE448EC905C509DBA3C01FBE34F24','',41280,16,'',NULL),
+(660,178,'5B2D2EE40383C33D381998995210918AC6B1AD67C5880F6D','',710554,23,'',NULL),
+(661,178,'83FFE0F8F224D5E56C38D731EFE8AD5AD1285B1AD4FA019B','',683146,23,'',NULL),
+(662,191,'9D67A809FD8FDA1E1504F0C038E21E1D5FC4C6D11F426228','',28940,17,'',NULL),
+(663,191,'2965EC092EC0A4B3D4A3C781F0A0A542824C77B7300BF50C','',45324,24,'',NULL),
+(664,191,'FE31901F5558E6555DA6BC5B1BC3415E82CB97DECBB486BB','',41096,24,'',NULL),
+(665,191,'B35406A77D6501A50F41981C7C137AD5272EB612F4A74109','',29884,20,'',NULL),
+(666,178,'7275397E511B45264BCFA30E3A3F8101894AA3923D91BE6E','',3037164,22,'',NULL),
+(667,178,'CA7D8D0E1F20385DCF6FC209799750CE9D0160B0C67196E7','',700714,23,'',NULL),
+(668,191,'F5CCDA244D826B3180E7C49193B3B0B5DBF651EC67DCB47A','',594348,26,'',NULL),
+(669,191,'7977F1E72B30179072EE1784396AB0406D06162051CA1EDB','',37136,40,'',NULL),
+(670,178,'603F8A015D8436CCBCD68B26FF6006E7A81BA9A8D9524B1F','',3045356,22,'',NULL),
+(671,178,'9631E9EBC78E0333010E522045852C7BEA44655080D418F3','',3049888,31,'',NULL),
+(672,191,'43BE7C00605D9FECAEFAE38D8FFEAED78B8382563A245F10','',9977,32,'',NULL),
+(673,191,'E493F1BAED1DBE7A0D429BF1A5D665636D29069060310BF0','',13291422,37,'',NULL),
+(674,191,'6C53203FA95EBE4DBB0A7F3E85994058DECA069A5244C29E','',130380,14,'',NULL),
+(675,178,'5A07E5A0525DBD5005CBDE16F7393EC8B795ADB2327C2F96','',3045356,22,'',NULL),
+(676,178,'D7665366F333BD580C5F8E2FF8971294F69E99EC7E3623F3','',717898,23,'',NULL),
+(677,191,'FB87EB8F178C69D9F7576AC7FF75D0479467057A2B6C956D','',9977,32,'',NULL),
+(678,178,'292911AC98E7ED34DF021B562D5DEBE8DAA15570B552978B','',3000288,31,'',NULL),
+(679,178,'6618F45C49D47C4105070C085FD5C384254A62E4AB614DB9','',3634252,23,'',NULL),
+(680,191,'316E531545999AFC533814888434999501FEA8ABFBAF8655','',134968,32,'',NULL),
+(681,191,'9945ED64886F68664A4BDF50731F4B4DC680273AB2E0DBCB','',20512,16,'',NULL),
+(682,191,'1D4D6EC7B6B26553FC914D28BF9B62FD81D0B865DE606D97','',29884,20,'',NULL),
+(683,178,'63B2D2ACF6E912CDC68282B080A2D610BE6AFE8EBB95FD31','',3070052,22,'',NULL),
+(684,191,'B0955BAC042D5441496103E7C45E38609A9AE3799D534BD9','',18680,35,'',NULL),
+(685,178,'6488E44D4E965581650F73F6E68DD8F863795162D99104F8','',682378,23,'',NULL),
+(686,191,'CC0D3F7D8FCF928A55F92F6414F4AEF7AD75DED5819BF870','',13538,15,'',NULL),
+(687,191,'CD3835965AF27EC338F828666CD06089B847B04A2DD56AE0','',17938,11,'',NULL),
+(688,178,'D04E9CF6A03D4767AFF1E4EE0EFBC333AEBA5B0552F15957','',0,9,'',NULL),
+(689,178,'120904F033D78A13DB0971F095C809852B7EB876D1A8AA01','',3045632,31,'',NULL),
+(690,191,'7DDD19DCF77E27DF0A31BC21C7F716FF85076AF065F102DC','',36924,24,'',NULL),
+(691,178,'5486E2CDD98AC3F25C223FD515CE7EF3FB09AC12ED338C86','',198,10,'',NULL),
+(692,178,'F8D6423F01E5369D16F6F70180083B936F0DDE3737B23308','',2299092,33,'',NULL),
+(693,191,'EC10CC349A8E654240B27B03EE1232B9CCED28F7104CCB71','',49347,24,'',NULL),
+(694,178,'29E064ACC509206873A1D548F4816DB60D29D6EE9FF63A56','',682378,23,'',NULL),
+(695,178,'E1A8A2A81920A7BA9F419A6D19CAC3DD9E292EF39F963234','',676970,23,'',NULL),
+(696,191,'32393EB09F7C829F58612E5E47018F7203C43218C3506C79','',20512,16,'',NULL),
+(697,178,'AFC4D19CACEDE8E9A2FDE3CC3D29CF8556AF4980872DFE1A','',3033068,22,'',NULL),
+(698,178,'09A2B97FD351B1D339030233AC51C741E0ECDC21AA7A152B','',3049452,22,'',NULL),
+(699,191,'2B2AF2171B8A9FC0D44EFE0ECDCB9DE1A55ACC8D83661E16','',41023,24,'',NULL),
+(700,178,'D111B236DC42EB338870E72FF6EE3141714D0437864B02AE','',3045356,22,'',NULL),
+(701,178,'E6DC6898929D1DA9F5768A9BFCBE848F8C1F31E8B6910FB8','',335122,23,'',NULL),
+(702,113,'85A32F8B5F8430A086D27E62EB17D878E49CE815F6AC91CA','IPSect',0,0,'',NULL),
+(703,191,'B6CB7B905A6BDD64BC032BE71927C1FE31153D14D6CF87E1','',447736,48,'',NULL),
+(704,178,'40EE7F4EEE1D707ECB770CDBBB54730CB863CC8E268D4208','',3634252,23,'',NULL),
+(705,178,'D74E308262D8C52ACE81B66F1D90C160AC86B2E0508176C1','',0,8,'',NULL),
+(706,178,'E15287D29EE155299619F8E93E66B55B564FD921FA41CF50','',3049452,22,'',NULL),
+(707,191,'58DFAEE44A52F0D5A58B0C94F0E5E63C1C7F76206D7FA7CA','',22792,25,'',NULL),
+(708,191,'83705EAE8AAD9709494E52EB05AC0481C998C15730E61099','',30012,16,'',NULL),
+(709,178,'0271F4D624304A48CB7CDFA016E3A735DCA3170FAD557468','',3070052,22,'',NULL),
+(710,178,'217DFFE3C12F984992E1E0AE7B5864061572BA301B21D869','',178504,96,'',NULL),
+(711,178,'C5C7AC33D1E4CF33E661033006BFEDE08523B643CCF51261','',3045356,22,'',NULL),
+(712,243,'','',4618113,10,'FF1554F79D003B470C89','WS2_32.Send'),
+(713,191,'D45144FC835266270E67CFB1F2900FD227B63204698A3EA7','',50040,26,'',NULL),
+(714,191,'B5BB832AEEC591196864E08A392592C5789D76D3DDDD4DBF','',27270,13,'',NULL),
+(715,191,'93582814E00150E2DD750ACAD7BD1719C4EBCD4C06F482AB','',28940,17,'',NULL),
+(716,191,'FD6B6AC7FA5F2E7828CB1B429A9442383BD93E762A5D7D00','',31924,23,'',NULL),
+(717,191,'51DF4EDECBBE42CC7C5D6723318F98E43E14A45F41CBD124','',41080,24,'',NULL),
+(718,191,'F2B2260FDD23E5F268FAAE4D1A48E74C452F2AC5D114765D','',57602,42,'',NULL),
+(719,191,'69FBDB69EC2E113EF691E47EDD46E40F03D1EBE226A1F7CE','',29884,20,'',NULL),
+(720,178,'E3E431D8F8FB38F0F2586D0F50D809BCCEB13651C5EF2619','',682394,23,'',NULL),
+(721,178,'2294015927F07D884FE2923FA17B3A8BCABC0A378930CF84','',679578,23,'',NULL),
+(722,191,'0A022AB25C52F94404A01F96687B2D6E6BE774237254BD05','',20512,16,'',NULL),
+(723,191,'65EEE243504EDC3319C3528B1A1E8061A3E75F4C25B61F95','',41228,24,'',NULL),
+(724,178,'877C654036A29FC108FE8D69D416361732D7A0270E51189D','',3022016,31,'',NULL),
+(725,178,'1A223564DF9E7BADD3CF858FB8250FE59F892232AC3B412D','',4011280,23,'',NULL),
+(726,191,'4FEDF58FB4DE45289C97ACCF16EB2DEA6FBC85C74A52D3C9','',37180,24,'',NULL),
+(727,191,'D4BE47EA1D68B92E2AD8307D139877705BE2B6A98B6A916E','',13033,36,'',NULL),
+(728,191,'9658AC7EF426A52C327BBC1ED71C6FA6DC5940E35DCC18C7','',18680,35,'',NULL),
+(729,113,'1B17998CD8E0CDA4D84B0A0F9DB05E536DACE0348A883D24','ndis_x86',0,0,'',NULL),
+(730,178,'BB9B86ED12359A465B02387A1D727F11F78D35C8B7FCC2FC','',2299092,33,'',NULL),
+(731,191,'842BC1A8C53902D26018B1C5E05ADCD70D973A968E298331','',50040,26,'',NULL),
+(732,178,'3E894F9682573CC0AD54C7E9873C9026AC050929392D0B93','',3049452,22,'',NULL),
+(733,191,'4A31E3D24FD6D576D84EF1BFB813D0F066870DEB38C32E47','',21826,11,'',NULL),
+(734,191,'EEA122B4C066EC0B196F67511E633EBACB37C4EA6AE4BFF7','',41096,24,'',NULL),
+(735,191,'66211671BEF80FB973B1C9595A70B462AD79EC83530DFE89','',12905,36,'',NULL),
+(736,178,'3760BBD6FE99A0BBEE0AB61A8BD52A6ABCAC48FF3CB265B8','',3070052,22,'',NULL),
+(737,191,'70F425426612D0D8495386C2375F7A4183548C0D4E7DFA46','',594348,26,'',NULL),
+(738,178,'BB310E9DDE9259027123500E65F9FA1E8D9D0F5FE8381CD2','',3638348,23,'',NULL),
+(739,191,'6FFB5E4982D306680E0C59087DA961CD4F6B068E323C3BB4','',401992,14,'',NULL),
+(740,191,'6DDCA79B7460A1F3671532A28FDCEB331DE6CA550E3178D0','',3766400,37,'',NULL),
+(741,191,'A8F7B2FB37CF3BEF43D6CE5C0BF85E85077E681490BA1C4C','',37136,40,'',NULL),
+(742,191,'052F425E7528B3A7155C45EEE530F915DBB154E5C8876E25','',50040,26,'',NULL),
+(743,178,'D6DE200B631AF71BFBC76202D82649942FD6ED9BC4A9EF75','',198,12,'',NULL),
+(744,178,'61077261C66B2CF9B199F115A3A656EA6A00068F151E3656','',706314,23,'',NULL),
+(745,191,'513FC0F0673A9DF86FA1FA05371040C14634CE08311ED619','',401992,14,'',NULL),
+(746,191,'5E0970A6EB246A79DDF427CB76D0D921F971E13921DD5D2C','',134968,32,'',NULL),
+(747,178,'53CAC3EF654610AC7E043C6AAD62709EF0B5400DBDE755EB','',149,5,'',NULL),
+(748,178,'566637D06BAEA9190B7CE510C697F72CD20FE3D958A95A25','',3049888,31,'',NULL),
+(749,113,'3C9B0CC7FE020EEBD43E6B1D88EDDF0EC46AC35974765068','drvsys_mon',0,0,'',NULL),
+(750,191,'BDFEE5DCDD37FC5B2A1B3E42FBE5F7997CFED35E86062EB6','',28920,23,'',NULL),
+(751,191,'7794AE60131E4D07860DB48047206784B885B30457EAB83E','',12194860,37,'',NULL),
+(752,178,'653A308BB00D914AE1ECD773BA4B0BA7724874BC62647D10','',3037164,22,'',NULL),
+(753,178,'06B696C35F905E75B451A02E121BDA0330CD44E0D9B872BF','',60648,56,'',NULL),
+(754,191,'35E8CD9E8CBD879B1E53278926C634AA8B72B8D9A20009F9','',17522,15,'',NULL),
+(755,191,'9B13F2E744904ADAAA062F9113A576D11C2C450D1CD6A4AB','',13033,36,'',NULL),
+(756,191,'60851B4A6F7338632A84795FBBB20320E49AD2CC2034BA80','',28940,17,'',NULL),
+(757,191,'3BC0BE02AE0B6975974D3B13B811EC6BDACBF9EE122BE633','',90202,13,'',NULL),
+(758,191,'E47F7DD8D5B5C29B70AFFD4F25AA286167D411937F9BD247','',36907,24,'',NULL),
+(759,178,'35D1CDEE86A410DF087DE6D5F5AC6289C4888B9753293E73','',3037164,22,'',NULL),
+(760,191,'2ED2EEB29EE0D48477779E5CA875F1F5F15CCE74CA85BDAA','',28956,17,'',NULL),
+(761,191,'A373FDB6A789CC46072A4CC51A429C817C40862DC6C0190F','',30012,16,'',NULL),
+(762,178,'3D02551F548DFB58832626FE90A7AAA12824D93A54A0DC14','',709322,22,'',NULL),
+(763,191,'09D04CF8ABC51D06D874784442987E5F2631041550607255','',36544,55,'',NULL),
+(764,191,'F3CD473F8C85977895CA5BA9DC22185BCCBBF6B977205193','',448492,48,'',NULL),
+(765,191,'30E2F23DB1038D16D2DEEAB1D0F1790D961E468368DC5108','',30012,16,'',NULL),
+(766,191,'540D465F760320A63981289D30CD40CCC770EE126523C71D','',477912,60,'',NULL),
+(767,191,'C461E1BE054FE29A1FD58B33D33890BC4A1279DE4F572B47','',37180,24,'',NULL),
+(768,191,'1AC3D903CFCA11321E76A257BDA0608E5060030BE745CCF3','',130380,14,'',NULL),
+(769,178,'96281A2887E61232007D7015E4A35DA118794841A8EC84BC','',3037164,22,'',NULL),
+(770,178,'8A1AC926B46A9E3D60D3BD87A59FF77D7B80A1510BC327A7','',710730,23,'',NULL),
+(771,191,'3620B6BDF3993B87FD35E906FE8376A04FF34684E2023D8E','',41280,16,'',NULL),
+(772,191,'025C373F05EC6E809EF5A86A903570FDA14D219286BCED5E','',448492,48,'',NULL),
+(773,178,'5C0E4EE98C4E34CBE44F6BD595C13DD675555164A8D491DA','',710554,23,'',NULL),
+(774,191,'BECE667BF9443EF6515E8E154F74FC2C5817455C8636DB72','',501956,48,'',NULL),
+(775,191,'94F1DA3E0D955761826D6BC932E26F44D321B4838C7567D8','',13538,15,'',NULL),
+(776,191,'EA3A3AD71FD14B038C98F256E80C1EFA1F45562A3DF92E7D','',22792,25,'',NULL),
+(777,191,'AD5A8CBF55EC436DA968EE0B9744C93F65D9E0D6E3C1B136','',174688,37,'',NULL),
+(778,191,'9B6B3B311BA9007C06CF0D146BB979B11CF295C58768DD4F','',31924,23,'',NULL),
+(779,217,'','RPE.DLL',0,0,'','rEdoX Packet Editor - injected dll'),
+(780,243,'','',5345728,2,'558B','Lua Protection Remover'),
+(781,243,'','',7726137,2,'7414','Walk on Water Patch'),
+(782,243,'','',8016620,2,'7417','Collision M2 Special'),
+(783,243,'','',8016079,6,'0F8462010000','Collision M2 Regular'),
+(784,243,'','',8054762,2,'7506','Collision WMD'),
+(785,243,'','',9995315,2,'7544','Multi-Jump Patch'),
+(786,217,'','WPESPY.DLL',0,0,'','WPE PRO - injected dll');
diff --git a/sql/updates/world/2012_02_19_04_world_misc_db_updates.sql b/sql/updates/world/2012_02_19_04_world_misc_db_updates.sql
new file mode 100644
index 00000000000..32fada1e895
--- /dev/null
+++ b/sql/updates/world/2012_02_19_04_world_misc_db_updates.sql
@@ -0,0 +1,21 @@
+-- Horde Orphan should not have weapons
+UPDATE `creature_template` SET `equipment_id`=0 WHERE `entry`=14499;
+-- Tog'thar Gossip
+UPDATE `creature_template` SET `gossip_menu_id`=264 WHERE `entry`=2238;
+DELETE FROM `gossip_menu` WHERE `entry`=264 AND `text_id`=761;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (264,761);
+-- Cosmetic Silkwing should have InhabitType 4
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=21840;
+-- Leoroxx
+UPDATE `creature_template` SET `gossip_menu_id`=8511 WHERE `entry`=22004;
+DELETE FROM `gossip_menu` WHERE `entry`=8511 AND `text_id`=10645;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8511,10645);
+-- Spiritcaller Dohgar
+UPDATE `creature_template` SET `gossip_menu_id`=8513 WHERE `entry`=22312;
+DELETE FROM `gossip_menu` WHERE `entry`=8513 AND `text_id`=10647;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8513,10647);
+-- Ogrin <Stable Master>
+UPDATE `creature_template` SET `gossip_menu_id`=9821 WHERE `entry`=22468;
+-- Wanted Poster "Blade's Edge Mountains"
+DELETE FROM `gossip_menu` WHERE `entry`=8242 AND `text_id`=10257;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8242,10257);
diff --git a/sql/updates/world/2012_02_19_05_world_say_text.sql b/sql/updates/world/2012_02_19_05_world_say_text.sql
new file mode 100644
index 00000000000..b70385660a1
--- /dev/null
+++ b/sql/updates/world/2012_02_19_05_world_say_text.sql
@@ -0,0 +1,7 @@
+-- NPC talk text from sniff
+DELETE FROM `creature_text` WHERE `entry`=7604;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(7604,0,0, 'What? How dare you say that to me?!?',12,0,100,6,0,0, 'Sergeant Bly'),
+(7604,1,0, 'After all we''ve been through? Well, I didn''t like you anyway!!',12,0,100,5,0,0, 'Sergeant Bly');
+-- Remove old text
+DELETE FROM `script_texts` WHERE `entry` IN (-1209002,-1209003);
diff --git a/sql/updates/world/2012_02_19_06_world_say_text.sql b/sql/updates/world/2012_02_19_06_world_say_text.sql
new file mode 100644
index 00000000000..f69c4cb86a9
--- /dev/null
+++ b/sql/updates/world/2012_02_19_06_world_say_text.sql
@@ -0,0 +1,20 @@
+-- SAI for Erich Lohan
+SET @ENTRY=3627;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' 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,1,0,100,0,10000,15000,10000,15000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Erich Lohan - OOC - Say random text');
+-- Talk text from sniff
+DELETE FROM `creature_text` WHERE `entry`=3627;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(3627,0,0, 'Magical studies stressing your brain? Relax at the Blue Recluse!',12,7,100,0,0,0, 'Erich Lohan'),
+(3627,0,1, 'Best drinks in Stormwind!',12,7,100,0,0,0, 'Erich Lohan'),
+(3627,0,2, 'Come for the beer, stay for the atmosphere!',12,7,100,0,0,0, 'Erich Lohan'),
+(3627,0,3, 'The only place in Stormwind where magic and spirits mix, come to the Blue Recluse!',12,7,100,0,0,0, 'Erich Lohan'),
+(3627,0,4, 'Free drinks at the Blue Recluse!',12,7,100,0,0,0, 'Erich Lohan'),
+(3627,0,5, 'Feeling blue? Come on down to the Blue Recluse for a good time!',12,7,100,0,0,0, 'Erich Lohan'),
+(3627,0,6, 'Head on over to the Blue Recluse. Where everybody knows your name!',12,7,100,0,0,0, 'Erich Lohan');
+-- Remove old waypoint text
+UPDATE `waypoint_data` SET `action`=0 WHERE `id`=904450;
+DELETE FROM `waypoint_scripts` WHERE `id` BETWEEN 432 AND 446;
+DELETE FROM `db_script_string` WHERE `entry` BETWEEN 2000005185 AND 2000005199;
diff --git a/sql/updates/world/2012_02_20_00_world_sai.sql b/sql/updates/world/2012_02_20_00_world_sai.sql
new file mode 100644
index 00000000000..44f8ab68d70
--- /dev/null
+++ b/sql/updates/world/2012_02_20_00_world_sai.sql
@@ -0,0 +1,4 @@
+UPDATE `smart_scripts` SET `event_param3`=2*60*60*1000, `event_param4`=2*60*60*1000 WHERE `entryorguid`=18481 AND `source_type`=0 AND `id`=0;
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`|1 WHERE `entryorguid` IN (-85175,-85176) AND `source_type`=0 AND `id`=5 AND `link`=6;
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`|1 WHERE `entryorguid`=30146 AND `source_type`=0 AND `id`=0;
+UPDATE `smart_scripts` SET `event_flags`=`event_flags`|0x20 WHERE `entryorguid` IN (-85175,-85176) AND `source_type`=0 AND `id`=2 AND `link`=3;
diff --git a/sql/updates/world/2012_02_20_01_world_misc_db.sql b/sql/updates/world/2012_02_20_01_world_misc_db.sql
new file mode 100644
index 00000000000..f3943ded29a
--- /dev/null
+++ b/sql/updates/world/2012_02_20_01_world_misc_db.sql
@@ -0,0 +1,8 @@
+-- Fix error in Scourge Deathspeaker SAI
+UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=27615 AND `id`=14;
+-- Fix up Keeper Remulos SAI
+UPDATE `smart_scripts` SET `id`=3 WHERE `entryorguid`=11832 AND `id`=4;
+-- Spiritcaller Dohgar
+UPDATE `creature_template` SET `gossip_menu_id`=8513 WHERE `entry`=22312;
+DELETE FROM `gossip_menu` WHERE `entry`=8513 AND `text_id`=10647;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8513,10647);
diff --git a/sql/updates/world/2012_02_20_02_world_conditons.sql b/sql/updates/world/2012_02_20_02_world_conditons.sql
new file mode 100644
index 00000000000..832d8dbdae5
--- /dev/null
+++ b/sql/updates/world/2012_02_20_02_world_conditons.sql
@@ -0,0 +1,275 @@
+# Update a typo in original data entry
+UPDATE `npc_spellclick_spells` SET `quest_end`=11999 WHERE `npc_entry`=26477 AND `spell_id`=61832 AND `quest_start`=11999;
+# Delete redundant data with invalid condition type
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18;
+
+# Static Data
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,
+`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`Comment`) VALUES
+(18,24752,44363,0,8,0,11460,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,24752,44363,0,9,0,11460,0,0,0,'Required quest active for spellclick'),
+(18,25596,45875,0,8,0,11690,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,25596,45875,0,9,0,11690,0,0,0,'Required quest active for spellclick'),
+(18,25841,46166,0,8,0,11795,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,25841,46166,0,9,0,11795,0,0,0,'Required quest active for spellclick'),
+(18,26200,39996,0,8,0,11960,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26200,39996,0,9,0,11960,0,0,0,'Required quest active for spellclick'),
+(18,26200,61286,0,8,0,11960,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26200,61286,0,9,0,11960,0,0,0,'Required quest active for spellclick'),
+(18,26421,47575,0,8,0,12092,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26421,47575,0,8,0,12096,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26421,47575,0,9,0,12092,0,0,0,'Required quest active for spellclick'),
+(18,26421,47575,0,9,0,12096,0,0,0,'Required quest active for spellclick'),
+(18,26477,47096,0,8,0,11999,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26477,47096,0,8,0,12000,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26477,47096,0,9,0,11999,0,0,0,'Required quest active for spellclick'),
+(18,26477,47096,0,9,0,12000,0,0,0,'Required quest active for spellclick'),
+(18,26477,61286,0,8,0,11999,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26477,61286,0,8,0,12000,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26477,61286,0,9,0,11999,0,0,0,'Required quest active for spellclick'),
+(18,26477,61286,0,9,0,12000,0,0,0,'Required quest active for spellclick'),
+(18,26477,61832,0,8,0,11999,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26477,61832,0,8,0,12000,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,26477,61832,0,9,0,11999,0,0,0,'Required quest active for spellclick'),
+(18,26477,61832,0,9,0,12000,0,0,0,'Required quest active for spellclick'),
+(18,27061,47920,0,8,0,12050,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,27061,47920,0,9,0,12050,0,0,0,'Required quest active for spellclick'),
+(18,27354,60944,18,8,0,12244,0,0,0,'Required quest rewarded for spellclick'),
+(18,27354,60944,18,9,0,12244,0,0,0,'Required quest active for spellclick'),
+(18,28161,39996,0,8,0,12532,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,39996,0,8,0,12702,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,39996,0,9,0,12532,0,0,0,'Required quest active for spellclick'),
+(18,28161,39996,0,9,0,12702,0,0,0,'Required quest active for spellclick'),
+(18,28161,51037,0,8,0,12532,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,51037,0,8,0,12702,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,51037,0,9,0,12532,0,0,0,'Required quest active for spellclick'),
+(18,28161,51037,0,9,0,12702,0,0,0,'Required quest active for spellclick'),
+(18,28161,51961,0,8,0,12532,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,51961,0,8,0,12702,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28161,51961,0,9,0,12532,0,0,0,'Required quest active for spellclick'),
+(18,28161,51961,0,9,0,12702,0,0,0,'Required quest active for spellclick'),
+(18,28162,39996,0,8,0,12519,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28162,39996,0,9,0,12519,0,0,0,'Required quest active for spellclick'),
+(18,28162,50737,0,8,0,12519,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28162,50737,0,9,0,12519,0,0,0,'Required quest active for spellclick'),
+(18,28162,51026,0,8,0,12519,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28162,51026,0,9,0,12519,0,0,0,'Required quest active for spellclick'),
+(18,28162,61286,0,8,0,12519,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28162,61286,0,9,0,12519,0,0,0,'Required quest active for spellclick'),
+(18,28202,50926,0,8,0,12527,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28202,50926,0,9,0,12527,0,0,0,'Required quest active for spellclick'),
+(18,28202,50927,0,8,0,12527,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28202,50927,0,9,0,12527,0,0,0,'Required quest active for spellclick'),
+(18,28203,50918,0,8,0,12527,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28203,50918,0,9,0,12527,0,0,0,'Required quest active for spellclick'),
+(18,28203,50919,0,8,0,12527,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28203,50919,0,9,0,12527,0,0,0,'Required quest active for spellclick'),
+(18,28222,52082,0,8,0,12546,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28222,52082,0,9,0,12546,0,0,0,'Required quest active for spellclick'),
+(18,28379,51658,0,8,0,12607,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28379,51658,0,9,0,12607,0,0,0,'Required quest active for spellclick'),
+(18,28389,51592,0,8,0,12605,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28389,51592,0,9,0,12605,0,0,0,'Required quest active for spellclick'),
+(18,28389,51593,0,8,0,12605,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28389,51593,0,9,0,12605,0,0,0,'Required quest active for spellclick'),
+(18,28782,52280,0,8,0,12687,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,28782,52280,0,9,0,12687,0,0,0,'Required quest active for spellclick'),
+(18,29488,54568,15,8,0,12670,0,0,0,'Required quest rewarded for spellclick'),
+(18,29488,54568,15,9,0,12670,0,0,0,'Required quest active for spellclick'),
+(18,29563,56795,0,8,0,1,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,29598,54768,0,8,0,12856,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,29708,55028,0,8,0,12856,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,29708,55028,0,9,0,12856,0,0,0,'Required quest active for spellclick'),
+(18,29856,55363,0,8,0,12629,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,29856,55363,0,8,0,12643,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,29856,55363,0,9,0,12629,0,0,0,'Required quest active for spellclick'),
+(18,29856,55363,0,9,0,12643,0,0,0,'Required quest active for spellclick'),
+(18,29857,55457,0,8,0,12910,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,29857,55457,0,9,0,12910,0,0,0,'Required quest active for spellclick'),
+(18,30066,43977,0,8,0,12953,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,30337,43671,0,8,0,13069,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,30337,43671,0,9,0,13069,0,0,0,'Required quest active for spellclick'),
+(18,30500,56679,0,8,0,13045,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,30500,56679,0,9,0,13045,0,0,0,'Required quest active for spellclick'),
+(18,30560,57347,0,1,0,57348,0,0,1,'Forbidden aura for spellclick'),
+(18,31736,59592,0,8,0,13280,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,31736,59592,0,9,0,13280,0,0,0,'Required quest active for spellclick'),
+(18,31785,59656,0,8,0,13283,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,31785,59656,0,9,0,13283,0,0,0,'Required quest active for spellclick'),
+(18,31883,60123,0,1,0,48085,0,0,1,'Forbidden aura for spellclick'),
+(18,31893,60123,0,1,0,48084,0,0,1,'Forbidden aura for spellclick'),
+(18,31894,60123,0,1,0,28276,0,0,1,'Forbidden aura for spellclick'),
+(18,31895,60123,0,1,0,27874,0,0,1,'Forbidden aura for spellclick'),
+(18,31896,60123,0,1,0,27873,0,0,1,'Forbidden aura for spellclick'),
+(18,31897,60123,0,1,0,7001,0,0,1,'Forbidden aura for spellclick'),
+(18,32788,57539,17,8,0,13075,0,0,0,'Required quest rewarded for spellclick'),
+(18,32788,57539,17,9,0,13075,0,0,0,'Required quest active for spellclick'),
+(18,32790,57654,16,8,0,13073,0,0,0,'Required quest rewarded for spellclick'),
+(18,32790,57654,16,9,0,13073,0,0,0,'Required quest active for spellclick'),
+(18,33498,63126,0,8,0,13654,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,33498,63126,0,9,0,13654,0,0,0,'Required quest active for spellclick'),
+(18,33790,62781,0,8,0,13690,0,0,0,'Required quest rewarded for spellclick'),
+(18,33790,62781,0,8,0,13705,0,0,0,'Required quest rewarded for spellclick'),
+(18,33791,62786,0,8,0,13696,0,0,0,'Required quest rewarded for spellclick'),
+(18,33791,62786,0,8,0,13711,0,0,0,'Required quest rewarded for spellclick'),
+(18,33792,62785,0,8,0,13694,0,0,0,'Required quest rewarded for spellclick'),
+(18,33792,62785,0,8,0,13709,0,0,0,'Required quest rewarded for spellclick'),
+(18,33793,62780,0,8,0,13688,0,0,0,'Required quest rewarded for spellclick'),
+(18,33793,62780,0,8,0,13704,0,0,0,'Required quest rewarded for spellclick'),
+(18,33794,62782,0,8,0,13689,0,0,0,'Required quest rewarded for spellclick'),
+(18,33794,62782,0,8,0,13706,0,0,0,'Required quest rewarded for spellclick'),
+(18,33795,62779,0,8,0,13685,0,0,0,'Required quest rewarded for spellclick'),
+(18,33795,62779,0,8,0,13703,0,0,0,'Required quest rewarded for spellclick'),
+(18,33796,62784,0,8,0,13693,0,0,0,'Required quest rewarded for spellclick'),
+(18,33796,62784,0,8,0,13708,0,0,0,'Required quest rewarded for spellclick'),
+(18,33798,62787,0,8,0,13695,0,0,0,'Required quest rewarded for spellclick'),
+(18,33798,62787,0,8,0,13710,0,0,0,'Required quest rewarded for spellclick'),
+(18,33799,62783,0,8,0,13691,0,0,0,'Required quest rewarded for spellclick'),
+(18,33799,62783,0,8,0,13707,0,0,0,'Required quest rewarded for spellclick'),
+(18,33800,62774,0,8,0,13593,0,0,0,'Required quest rewarded for spellclick'),
+(18,33800,62774,0,8,0,13684,0,0,0,'Required quest rewarded for spellclick'),
+(18,33842,63791,0,8,0,13668,0,0,0,'Required quest rewarded for spellclick'),
+(18,33842,63791,0,8,0,13687,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,33843,63792,0,8,0,13667,0,0,0,'Required quest rewarded for spellclick'),
+(18,33843,63792,0,8,0,13686,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,33870,63663,0,8,0,1,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13847,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13851,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13852,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13854,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13855,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13856,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13857,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13858,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13859,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13860,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13861,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13862,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13863,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,8,0,13864,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,34125,63215,0,9,0,13847,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13851,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13852,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13854,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13855,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13856,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13857,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13858,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13859,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13860,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13861,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13862,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13863,0,0,0,'Required quest active for spellclick'),
+(18,34125,63215,0,9,0,13864,0,0,0,'Required quest active for spellclick'),
+(18,38248,71462,0,1,0,71443,0,0,1,'Forbidden aura for spellclick'),
+(18,40176,74904,0,8,0,25444,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,40176,74904,0,9,0,25444,0,0,0,'Required quest active for spellclick'),
+(18,40176,74905,0,8,0,25444,0,0,1,'Forbidden rewarded quest for spellclick'),
+(18,40176,74905,0,9,0,25444,0,0,0,'Required quest active for spellclick');
+
+# Below is a procedure to dynamically convert custom content to conditions table.
+# However this procedure only works for MySQL server versions >= 5.6 due to
+# a bug / missing feature in older MySQL versions.
+/*
+
+DROP PROCEDURE IF EXISTS ConvertSpellClickConditions;
+DELIMITER //
+CREATE PROCEDURE ConvertSpellClickConditions()
+BEGIN
+ DECLARE counter INT DEFAULT 0;
+ DECLARE recordCount INT DEFAULT 0;
+ DECLARE counterPlusOne INT DEFAULT 0;
+ DECLARE npcEntry INT DEFAULT 0;
+ DECLARE spellId INT DEFAULT 0;
+ DECLARE aura INT DEFAULT 0;
+ DECLARE quest INT DEFAULT 0;
+ DECLARE quest2 INT DEFAULT 0;
+ DECLARE questStartCanActive INT DEFAULT 0;
+ DECLARE maxElseGroupId INT DEFAULT 14; # Change this for custom content
+ SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `aura_required` !=0;
+ WHILE counter < recordCount DO
+ SELECT `npc_entry`, `spell_id`, `aura_required`
+ INTO npcEntry, spellId, aura
+ FROM `npc_spellclick_spells` WHERE `aura_required` !=0
+ LIMIT counter,1;
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,1,0,aura,0,0,'Required aura for spellclick');
+ SET counter = counter+1;
+ END WHILE;
+
+ SET counter = 0;
+ SET recordCount = 0;
+ SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `aura_forbidden` !=0;
+ WHILE counter < recordCount DO
+ SELECT `npc_entry`, `spell_id`, `aura_forbidden`
+ INTO npcEntry, spellId, aura
+ FROM `npc_spellclick_spells` WHERE `aura_forbidden` !=0
+ LIMIT counter,1;
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,1,0,aura,0,1,'Forbidden aura for spellclick');
+ SET counter = counter+1;
+ END WHILE;
+
+ SET counter = 0;
+ SET recordCount = 0;
+ SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `quest_start` !=0;
+ WHILE counter < recordCount DO
+ SELECT `npc_entry`, `spell_id`, `quest_start`, `quest_start_active`, `quest_end`
+ INTO npcEntry, spellId, quest, questStartCanActive, quest2
+ FROM `npc_spellclick_spells` WHERE `quest_start` !=0
+ LIMIT counter,1;
+ IF questStartCanActive = 1 AND quest2 = 0 THEN
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`, `ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,maxElseGroupId+1,9,0,quest,0,0,'Required quest active for spellclick');
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`, `ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,maxElseGroupId+1,8,0,quest,0,0,'Required quest rewarded for spellclick');
+ SET maxElseGroupId = maxElseGroupId+1;
+ # ELSE IF quest2 != 0 is handled in next loop (forbidden rewarded quest)
+ ELSEIF questStartCanActive = 1 && quest2 = quest THEN
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,9,0,quest,0,0,'Required quest active for spellclick');
+ # ^Adds the required active quest condition. Prohibit quest reward is done in next loop
+ ELSEIF questStartCanActive = 0 THEN
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,8,0,quest,0,0,'Required quest rewarded for spellclick');
+ END IF;
+
+ SET counter = counter+1;
+ END WHILE;
+
+ SET counter = 0;
+ SET recordCount = 0;
+ SELECT COUNT(*) INTO recordCount FROM `npc_spellclick_spells` WHERE `quest_end` !=0;
+ WHILE counter < recordCount DO
+ SELECT `npc_entry`, `spell_id`, `quest_end`
+ INTO npcEntry, spellId, quest
+ FROM `npc_spellclick_spells` WHERE `quest_end` !=0
+ LIMIT counter,1;
+ INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,
+ `ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`)
+ VALUES (18,npcEntry,spellId,8,0,quest,0,1,'Forbidden rewarded quest for spellclick');
+ SET counter = counter+1;
+ END WHILE;
+
+END//
+
+DELIMITER ;
+
+CALL ConvertSpellClickConditions();
+DROP PROCEDURE ConvertSpellClickConditions;
+
+*/
+
+ALTER TABLE `npc_spellclick_spells`
+ DROP COLUMN `quest_start`,
+ DROP COLUMN `quest_start_active`,
+ DROP COLUMN `quest_end`,
+ DROP COLUMN `aura_required`,
+ DROP COLUMN `aura_forbidden`
+;
diff --git a/sql/updates/world/2012_02_21_00_world_creature_loot_template.sql b/sql/updates/world/2012_02_21_00_world_creature_loot_template.sql
new file mode 100644
index 00000000000..1d05c031868
--- /dev/null
+++ b/sql/updates/world/2012_02_21_00_world_creature_loot_template.sql
@@ -0,0 +1,78 @@
+-- Loot for Hellfire 5-man dungeons Trash (heroic and normal) --
+-- -------------------------------------------------------------
+
+-- Hellfire Citadel: Ramparts
+SET @Lootid := 17259;
+-- set all lootids to same entry (normal and heroic)
+UPDATE `creature_template` SET `lootid`=@Lootid WHERE `entry` IN
+(17259,17264,17269,17270,17271,17280,17281,17309,17455,17478,17517,18048,18049,18050,18051,18052,18053,18054,18055,18057,18058,18059);
+-- populate trashloot table
+DELETE FROM `creature_loot_template` WHERE `entry` IN
+(17259,17264,17269,17270,17271,17280,17281,17309,17455,17478,17517,18048,18049,18050,18051,18052,18053,18054,18055,18057,18058,18059);
+DELETE FROM `creature_loot_template` WHERE `entry`=@Lootid;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- rough indication based on wowhead data of ALL mobs in the dungeon
+(@Lootid,14047,40,1,0,1,4), -- Runecloth
+(@Lootid,21877,20,1,0,1,4), -- Netherweave Cloth
+(@Lootid, 8952,10,1,0,1,4), -- Roasted Quail
+(@Lootid, 8766, 5,1,0,1,3), -- Morning Glory Dew
+-- references for worldgreys
+(@Lootid,1,5,1,0,-24000,1), -- Outland Grey Item Reference1
+(@Lootid,2,5,1,0,-24002,1), -- Outland Grey Item Reference2
+(@Lootid,3,5,1,0,-24003,1), -- Outland Grey Item Reference3
+(@Lootid,4,5,1,0,-24011,1), -- Outland Grey Item Reference4
+(@Lootid,5,5,1,0,-24022,1), -- Outland Grey Item Reference5
+(@Lootid,6,5,1,0,-24023,1), -- Outland Grey Item Reference6
+-- specifics
+(@Lootid,5759,0.25,1,0,1,1), -- Thorium Lockbox
+(@Lootid,5760,0.30,1,0,1,1), -- Eternium Lockbox
+-- Scrolls
+(@Lootid,7,5,1,0,-24724,1); -- Scroll of <stat> IV
+
+-- -----------------------------------------
+-- -- Hellfire Citadel: The Blood Furnace --
+-- -----------------------------------------
+SET @Lootid := 17370;
+UPDATE `creature_template` SET `lootid`=@Lootid WHERE `entry` IN (17256,17370,17371,17395,17397,17398,17399,17414,17429,17477,17491,17624,17626,17653,18894,19016,18608,18619,18617,18615,18612,18614,18618,18603,18606,18610,18611,18609,18620,21645,21646);
+
+DELETE FROM `creature_loot_template` WHERE `entry` IN (17370,17371,17395,17397,17398,17414,17429,17491,17624,17626,18894);
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@Lootid,23894,-100,1,0,1,1), -- Fel Orc Blood (quest)
+-- most common items
+(@Lootid,14047,40,1,0,1,4), -- Runecloth
+(@Lootid,21877,20,1,0,1,4), -- Netherweave Cloth
+(@Lootid, 8952,10,1,0,1,4), -- Roasted Quail
+(@Lootid, 8766, 5,1,0,1,3), -- Morning Glory Dew
+-- references for worldgreys
+(@Lootid,1,5,1,0,-24000,1), -- Outland Grey Item Reference1
+(@Lootid,2,5,1,0,-24002,1), -- Outland Grey Item Reference2
+(@Lootid,3,5,1,0,-24003,1), -- Outland Grey Item Reference3
+(@Lootid,4,5,1,0,-24011,1), -- Outland Grey Item Reference4
+(@Lootid,5,5,1,0,-24022,1), -- Outland Grey Item Reference5
+(@Lootid,6,5,1,0,-24023,1), -- Outland Grey Item Reference6
+-- specifics
+(@Lootid,5759,0.25,1,0,1,1), -- Thorium Lockbox
+(@Lootid,5760,0.30,1,0,1,1), -- Eternium Lockbox
+-- Scrolls
+(@Lootid,7,5,1,0,-24724,1); -- Scroll of <stat> IV
+
+-- -------------------------------------------
+-- -- Hellfire Citadel: The Shattered Halls --
+-- -------------------------------------------
+SET @Lootid := 16507;
+UPDATE `creature_template` SET `lootid`=@Lootid WHERE `entry` IN (17669,16507,17622,17462,17427,17420,17083,16699,16704,17695,17670,16700,16593,16594,17464,17694,17465,17461,17671,20593,20582,20576,20590,20589,20594,20567,20587,20579,20581,20595,20586,20583,20578,20574,20588,20584,20577,20580);
+
+DELETE FROM `creature_loot_template` WHERE `entry` IN (16507,16593,16594,16699,16700,16704,17083,17420,17427,17461,17462,17464,17465,17669,17670,17671,17694,17695,17669,16594,17694,17427,17695,17461,16593,17465,17671,17464,17420,17670,16700,16699,16507,16704,17462);
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@Lootid,21877,40,1,0,2,3), -- Netherweave Cloth
+(@Lootid,27854,20,1,0,1,1), -- Smoked Talbuk Venison
+(@Lootid,27860,20,1,0,1,1), -- Purified Draenic Water
+(@Lootid,31952,2.5,1,0,1,1), -- Khorium Lockbox
+-- references
+(@Lootid,1,5,1,1,-24002,1), -- Outland Grey Item Reference1
+(@Lootid,2,2,1,1,-24009,1), -- Outland Green Reference1
+(@Lootid,3,5,1,1,-24011,1), -- Outland Grey Item Reference2
+(@Lootid,4,1,1,1,-24012,1), -- Outland Blue Reference1
+(@Lootid,5,5,1,1,-24093,1), -- Outland Plans & patterns
+-- Scrolls
+(@Lootid,6,5,1,0,-24724,1); -- Scroll of <stat> IV
diff --git a/sql/updates/world/2012_02_21_01_world_conditions.sql b/sql/updates/world/2012_02_21_01_world_conditions.sql
new file mode 100644
index 00000000000..54685868186
--- /dev/null
+++ b/sql/updates/world/2012_02_21_01_world_conditions.sql
@@ -0,0 +1,3592 @@
+CREATE TABLE `temp_convert_spells`
+(
+ `id` INT(11),
+ `effMask` INT(11),
+ `onlyPlayers` TINYINT(3),
+ PRIMARY KEY (`id`)
+);
+
+INSERT INTO `temp_convert_spells` VALUES
+(46174,1,0),
+(78002,1,1),
+(78001,1,1),
+(78000,1,1),
+(77999,1,1),
+(77984,1,1),
+(76379,1,0),
+(76098,1,0),
+(76092,1,0),
+(75920,1,1),
+(75767,1,1),
+(75765,1,1),
+(75396,1,0),
+(75389,1,1),
+(75364,1,0),
+(75319,1,0),
+(75313,1,0),
+(75244,1,0),
+(75197,1,0),
+(75195,1,0),
+(75181,1,0),
+(75107,1,0),
+(75100,1,0),
+(75078,1,0),
+(75053,1,0),
+(75018,1,0),
+(74977,1,0),
+(74903,1,0),
+(74801,1,1),
+(74758,1,0),
+(74735,1,0),
+(74549,1,0),
+(74548,1,0),
+(74486,1,0),
+(74455,1,0),
+(74444,1,0),
+(74313,1,0),
+(74285,1,0),
+(74219,1,0),
+(74182,1,0),
+(74148,1,0),
+(74098,1,0),
+(74090,1,1),
+(74086,1,1),
+(74074,1,0),
+(74033,1,0),
+(73980,1,0),
+(73955,1,0),
+(73953,1,0),
+(73886,1,0),
+(73846,1,1),
+(73845,1,1),
+(73844,1,1),
+(73843,1,1),
+(73837,1,0),
+(73836,1,0),
+(73835,1,0),
+(73787,1,0),
+(73786,1,0),
+(73785,1,0),
+(73725,1,0),
+(73659,1,0),
+(73650,1,1),
+(73582,1,0),
+(73556,1,0),
+(73555,1,0),
+(73548,1,0),
+(73331,1,1),
+(73288,1,0),
+(73165,1,0),
+(73164,1,1),
+(73159,1,1),
+(73129,1,0),
+(73128,1,0),
+(73082,1,0),
+(73071,1,0),
+(73035,1,0),
+(72959,1,1),
+(72934,1,1),
+(72928,1,1),
+(72900,1,1),
+(72830,1,1),
+(72748,1,0),
+(72747,1,0),
+(72746,1,0),
+(72745,1,0),
+(72728,1,0),
+(72706,1,1),
+(72618,1,0),
+(72595,1,1),
+(72527,1,0),
+(72479,1,1),
+(72431,1,1),
+(72429,1,1),
+(72401,1,0),
+(72347,1,0),
+(72346,1,1),
+(72280,1,0),
+(72279,1,0),
+(72278,1,0),
+(72262,1,0),
+(72260,1,0),
+(72257,1,1),
+(72209,1,0),
+(72202,1,0),
+(72099,1,0),
+(72033,1,0),
+(72032,1,0),
+(72031,1,0),
+(71952,1,0),
+(71949,1,1),
+(71948,1,0),
+(71946,1,0),
+(71848,1,0),
+(71811,1,0),
+(71809,1,0),
+(71753,1,1),
+(71693,1,0),
+(71620,1,0),
+(71617,1,0),
+(71599,1,0),
+(71538,1,1),
+(71536,1,1),
+(71520,1,0),
+(71440,1,0),
+(71415,1,0),
+(71412,1,0),
+(71365,1,0),
+(71352,1,1),
+(71322,1,0),
+(71310,1,0),
+(71308,1,0),
+(71306,1,0),
+(71281,1,0),
+(71272,1,0),
+(71189,1,0),
+(71082,1,0),
+(71081,1,0),
+(71080,1,0),
+(71079,1,0),
+(71078,1,0),
+(71075,1,0),
+(71070,1,0),
+(71032,1,0),
+(71024,1,0),
+(70995,1,0),
+(70983,1,0),
+(70966,1,1),
+(70939,1,0),
+(70936,1,0),
+(70933,1,0),
+(70931,1,0),
+(70921,1,0),
+(70881,1,0),
+(70861,1,0),
+(70860,1,0),
+(70859,1,0),
+(70858,1,0),
+(70857,1,0),
+(70856,1,0),
+(70792,1,0),
+(70790,1,0),
+(70784,1,0),
+(70781,1,0),
+(70743,1,0),
+(70713,1,1),
+(70643,1,0),
+(70639,1,0),
+(70638,1,1),
+(70636,1,1),
+(70635,1,0),
+(70623,1,1),
+(70614,1,0),
+(70611,1,0),
+(70602,1,0),
+(70595,1,0),
+(70588,1,0),
+(70586,1,0),
+(70572,1,0),
+(70569,1,0),
+(70527,1,1),
+(70525,1,0),
+(70488,1,0),
+(70485,1,0),
+(70471,1,0),
+(70466,1,0),
+(70464,1,0),
+(70444,1,0),
+(70443,1,1),
+(70403,1,0),
+(70397,1,0),
+(70383,1,0),
+(70374,1,0),
+(70366,1,0),
+(70360,1,0),
+(70338,1,0),
+(70331,1,1),
+(70299,1,0),
+(70293,1,0),
+(70290,1,0),
+(70267,1,0),
+(70266,1,0),
+(70265,1,0),
+(70246,1,0),
+(70225,1,0),
+(70224,1,0),
+(70143,1,0),
+(70130,1,0),
+(70104,1,0),
+(70100,1,0),
+(70098,1,0),
+(70079,1,0),
+(70078,1,0),
+(70053,1,0),
+(70041,1,0),
+(70040,1,0),
+(70021,1,0),
+(69960,1,0),
+(69959,1,0),
+(69922,1,0),
+(69907,1,0),
+(69886,1,0),
+(69857,1,0),
+(69843,1,0),
+(69801,1,0),
+(69798,1,0),
+(69796,1,0),
+(69784,1,0),
+(69782,1,0),
+(69768,1,0),
+(69753,1,0),
+(69705,1,0),
+(69682,1,0),
+(69614,1,0),
+(69610,1,0),
+(69601,1,0),
+(69600,1,0),
+(69593,1,0),
+(69553,1,0),
+(69538,1,0),
+(69508,1,0),
+(69431,1,0),
+(69372,1,0),
+(69347,1,0),
+(69298,1,1),
+(69171,1,0),
+(69125,1,0),
+(69101,1,0),
+(69098,1,0),
+(69097,1,0),
+(69048,1,1),
+(69039,1,0),
+(69016,1,0),
+(68957,1,0),
+(68922,1,0),
+(68919,1,0),
+(68901,1,0),
+(68881,1,0),
+(68880,1,0),
+(68861,1,0),
+(68847,1,0),
+(68842,1,0),
+(68798,1,0),
+(68663,1,0),
+(68644,1,0),
+(68617,1,0),
+(68616,1,0),
+(68614,1,0),
+(68515,1,1),
+(68471,1,1),
+(68470,1,1),
+(68401,1,0),
+(68400,1,0),
+(68360,1,0),
+(68359,1,0),
+(68358,1,0),
+(68206,1,1),
+(68198,1,1),
+(68197,1,1),
+(68193,1,1),
+(68186,1,1),
+(67888,1,0),
+(67864,1,0),
+(67857,1,0),
+(67856,1,0),
+(67855,1,0),
+(67804,1,0),
+(67757,1,0),
+(67756,1,0),
+(67755,1,0),
+(67748,1,0),
+(67732,1,0),
+(67715,1,0),
+(67705,1,0),
+(67551,1,1),
+(67547,1,0),
+(67482,1,0),
+(67400,1,0),
+(67397,1,0),
+(67369,1,0),
+(67335,1,0),
+(67328,1,0),
+(67163,1,0),
+(67162,1,0),
+(67161,1,0),
+(67160,1,0),
+(67159,1,0),
+(67158,1,0),
+(66986,1,1),
+(66810,1,1),
+(66798,1,0),
+(66785,1,0),
+(66774,1,0),
+(66718,1,1),
+(66665,1,0),
+(66637,1,0),
+(66636,1,0),
+(66630,1,0),
+(66551,1,0),
+(66550,1,0),
+(66513,1,0),
+(66512,1,0),
+(66508,1,0),
+(66401,1,0),
+(66391,1,0),
+(66390,1,0),
+(66387,1,0),
+(66386,1,0),
+(66385,1,0),
+(66384,1,0),
+(66383,1,0),
+(66382,1,0),
+(66379,1,0),
+(66357,1,0),
+(66356,1,0),
+(66355,1,0),
+(66354,1,0),
+(66353,1,0),
+(66352,1,0),
+(66350,1,0),
+(66349,1,0),
+(66348,1,0),
+(66345,1,0),
+(66339,1,0),
+(66332,1,0),
+(66314,1,1),
+(66312,1,1),
+(66287,1,0),
+(66256,1,0),
+(66193,1,0),
+(66181,1,0),
+(66153,1,0),
+(66152,1,0),
+(66141,1,0),
+(66140,1,0),
+(66135,1,1),
+(66133,1,0),
+(66132,1,0),
+(65872,1,0),
+(65861,1,0),
+(65719,1,0),
+(65718,1,0),
+(65699,1,0),
+(65685,1,0),
+(65652,1,0),
+(65614,1,0),
+(65613,1,0),
+(65611,1,0),
+(65594,1,1),
+(65589,1,0),
+(65588,1,0),
+(65587,1,0),
+(65509,1,0),
+(65357,1,0),
+(65354,1,0),
+(65350,1,0),
+(65349,1,0),
+(65346,1,1),
+(65312,1,1),
+(65311,1,1),
+(65265,1,0),
+(65258,1,0),
+(65238,1,0),
+(65224,1,0),
+(65206,1,0),
+(65200,1,0),
+(65192,1,0),
+(65184,1,1),
+(65140,1,0),
+(65109,1,0),
+(65061,1,0),
+(65042,1,0),
+(65040,1,1),
+(65034,1,0),
+(65016,1,0),
+(65015,1,0),
+(64996,1,0),
+(64995,1,0),
+(64898,1,0),
+(64887,1,0),
+(64886,1,0),
+(64880,1,0),
+(64828,1,0),
+(64799,1,0),
+(64767,1,0),
+(64623,1,0),
+(64620,1,0),
+(64619,1,0),
+(64618,1,0),
+(64597,1,0),
+(64543,1,0),
+(64539,1,0),
+(64503,1,0),
+(64499,1,0),
+(64480,1,0),
+(64475,1,0),
+(64474,1,0),
+(64466,1,0),
+(64465,1,0),
+(64463,1,0),
+(64449,1,0),
+(64444,1,0),
+(64425,1,0),
+(64414,1,0),
+(64402,1,0),
+(64397,1,0),
+(64320,1,0),
+(64229,1,0),
+(64225,1,0),
+(64224,1,0),
+(64201,1,0),
+(64185,1,0),
+(64184,1,0),
+(64183,1,0),
+(64173,1,0),
+(64172,1,0),
+(64098,1,0),
+(64069,1,0),
+(64063,1,0),
+(64061,1,0),
+(64059,1,1),
+(64032,1,0),
+(64031,1,0),
+(64030,1,0),
+(64029,1,0),
+(64028,1,0),
+(64027,1,0),
+(64026,1,0),
+(64025,1,0),
+(64024,1,0),
+(64014,1,0),
+(63984,1,0),
+(63979,1,0),
+(63947,1,0),
+(63886,1,0),
+(63882,1,0),
+(63820,1,0),
+(63813,1,0),
+(63812,1,0),
+(63764,1,0),
+(63763,1,0),
+(63762,1,0),
+(63761,1,0),
+(63749,1,0),
+(63747,1,1),
+(63745,1,1),
+(63744,1,0),
+(63702,1,0),
+(63676,1,0),
+(63659,1,0),
+(63658,1,0),
+(63657,1,0),
+(63629,1,0),
+(63628,1,0),
+(63576,1,0),
+(63524,1,0),
+(63499,1,0),
+(63446,1,0),
+(63445,1,0),
+(63444,1,0),
+(63443,1,0),
+(63442,1,0),
+(63441,1,0),
+(63440,1,0),
+(63439,1,0),
+(63438,1,0),
+(63352,1,0),
+(63348,1,0),
+(63322,1,1),
+(63274,1,0),
+(63255,1,0),
+(63238,1,0),
+(63109,1,0),
+(63037,1,0),
+(63013,1,0),
+(63001,1,0),
+(62990,1,0),
+(62978,1,0),
+(62976,1,0),
+(62943,1,0),
+(62911,1,0),
+(62909,1,0),
+(62906,1,0),
+(62888,1,0),
+(62883,1,0),
+(62882,1,0),
+(62834,1,0),
+(62809,1,0),
+(62797,1,1),
+(62778,1,0),
+(62731,1,0),
+(62727,1,0),
+(62711,1,0),
+(62708,1,0),
+(62706,1,0),
+(62701,1,0),
+(62669,1,0),
+(62646,1,0),
+(62603,1,0),
+(62584,1,0),
+(62577,1,0),
+(62567,1,0),
+(62533,1,0),
+(62525,1,0),
+(62524,1,0),
+(62521,1,0),
+(62509,1,0),
+(62505,1,0),
+(62496,1,0),
+(62488,1,0),
+(62485,1,0),
+(62484,1,0),
+(62483,1,0),
+(62480,1,0),
+(62464,1,0),
+(62378,1,0),
+(124,1,0),
+(2222,1,0),
+(3730,1,0),
+(4020,1,0),
+(4338,1,0),
+(5249,1,0),
+(5251,1,0),
+(5432,1,0),
+(5555,1,0),
+(6636,1,0),
+(6672,1,0),
+(6755,1,0),
+(6955,1,0),
+(6967,1,0),
+(7022,1,0),
+(7035,1,0),
+(7036,1,0),
+(7277,1,0),
+(7393,1,0),
+(7670,1,0),
+(7769,1,0),
+(8283,1,0),
+(8593,1,0),
+(8596,1,0),
+(9002,1,0),
+(9003,1,0),
+(9004,1,0),
+(9012,1,0),
+(9082,1,0),
+(9095,1,0),
+(9455,1,0),
+(9457,1,0),
+(9712,1,0),
+(9976,1,0),
+(10113,1,0),
+(10137,1,0),
+(10252,1,0),
+(10258,1,0),
+(10259,1,0),
+(10260,1,0),
+(10345,1,0),
+(10604,1,0),
+(10727,1,0),
+(10747,1,0),
+(11195,1,0),
+(11402,1,0),
+(11440,1,0),
+(11513,1,0),
+(11637,1,0),
+(11757,1,0),
+(11893,1,0),
+(12134,1,0),
+(12158,1,0),
+(12159,1,0),
+(12347,1,0),
+(12512,1,0),
+(12564,1,0),
+(12613,1,0),
+(12623,1,0),
+(12699,1,0),
+(12709,1,0),
+(12774,1,0),
+(12938,1,0),
+(13461,1,0),
+(13727,1,0),
+(13821,1,0),
+(13951,1,0),
+(13982,1,0),
+(14250,1,0),
+(14292,1,0),
+(14806,1,0),
+(14813,1,0),
+(14928,1,0),
+(15252,1,0),
+(15281,1,0),
+(15591,1,0),
+(15658,1,0),
+(15746,1,0),
+(15958,1,0),
+(16007,1,0),
+(16032,1,0),
+(16037,1,0),
+(16053,1,0),
+(16068,1,0),
+(16069,1,0),
+(16070,1,0),
+(16074,1,0),
+(16378,1,0),
+(16381,1,0),
+(16404,1,0),
+(16556,1,0),
+(16558,1,0),
+(16637,1,0),
+(16786,1,0),
+(16807,1,0),
+(17048,1,0),
+(17166,1,0),
+(17190,1,0),
+(17202,1,0),
+(17272,1,0),
+(17278,1,0),
+(17279,1,0),
+(17471,1,0),
+(17536,1,0),
+(17616,1,0),
+(17618,1,0),
+(17652,1,0),
+(17671,1,0),
+(17675,1,0),
+(17676,1,0),
+(17677,1,0),
+(17678,1,0),
+(17698,1,0),
+(17748,1,0),
+(18110,1,0),
+(18655,1,0),
+(18666,1,0),
+(18811,1,0),
+(18969,1,0),
+(19032,1,0),
+(19096,1,0),
+(19571,1,0),
+(19593,1,0),
+(19721,1,0),
+(19749,1,0),
+(19770,1,0),
+(19773,1,0),
+(19952,1,0),
+(20358,1,0),
+(20465,1,0),
+(20619,1,0),
+(21052,1,0),
+(21075,1,0),
+(21076,1,0),
+(21391,1,0),
+(21556,1,0),
+(21566,1,0),
+(21885,1,0),
+(21950,1,0),
+(22096,1,0),
+(22203,1,0),
+(22205,1,0),
+(22393,1,0),
+(22458,1,0),
+(22860,1,0),
+(22906,1,0),
+(22966,1,0),
+(23014,1,0),
+(23016,1,0),
+(23018,1,0),
+(23019,1,0),
+(23168,1,0),
+(23328,1,0),
+(23360,1,0),
+(23389,1,0),
+(23394,1,0),
+(23415,1,0),
+(23642,1,0),
+(23951,1,0),
+(23974,1,0),
+(24062,1,0),
+(24083,1,0),
+(24172,1,0),
+(24207,1,0),
+(24217,1,0),
+(24311,1,0),
+(24322,1,0),
+(24323,1,0),
+(24391,1,0),
+(24734,1,0),
+(24744,1,0),
+(24756,1,0),
+(24758,1,0),
+(24760,1,0),
+(24763,1,0),
+(24765,1,0),
+(24768,1,0),
+(24770,1,0),
+(24772,1,0),
+(24784,1,0),
+(24786,1,0),
+(24788,1,0),
+(24789,1,0),
+(24790,1,0),
+(24804,1,0),
+(24933,1,0),
+(25030,1,0),
+(25031,1,0),
+(25032,1,0),
+(25099,1,0),
+(25145,1,0),
+(25149,1,0),
+(25150,1,0),
+(25158,1,0),
+(25201,1,0),
+(25715,1,0),
+(25727,1,0),
+(25745,1,0),
+(25822,1,0),
+(25823,1,0),
+(25896,1,0),
+(26235,1,0),
+(26344,1,0),
+(26345,1,0),
+(26346,1,0),
+(26347,1,0),
+(26348,1,0),
+(26349,1,0),
+(26351,1,0),
+(26352,1,0),
+(26353,1,0),
+(26354,1,0),
+(26355,1,0),
+(26356,1,0),
+(26462,1,0),
+(26522,1,1),
+(26608,1,0),
+(26687,1,1),
+(26879,1,0),
+(27583,1,0),
+(27651,1,0),
+(27663,1,0),
+(27745,1,0),
+(27885,1,0),
+(27886,1,0),
+(27892,1,0),
+(27893,1,0),
+(27894,1,0),
+(27928,1,0),
+(27929,1,0),
+(27935,1,0),
+(27936,1,0),
+(28018,1,0),
+(28032,1,0),
+(28056,1,0),
+(28078,1,0),
+(28087,1,0),
+(28096,1,0),
+(28111,1,0),
+(28159,1,0),
+(28278,1,0),
+(28281,1,0),
+(28309,1,0),
+(28326,1,0),
+(28338,1,0),
+(28339,1,0),
+(28365,1,0),
+(28366,1,0),
+(28367,1,0),
+(28374,1,0),
+(28392,1,0),
+(28404,1,0),
+(28441,1,0),
+(28605,1,0),
+(28697,1,0),
+(28731,1,0),
+(28732,1,0),
+(28861,1,0),
+(29070,1,0),
+(29072,1,0),
+(29120,1,0),
+(29121,1,0),
+(29122,1,0),
+(29172,1,0),
+(29173,1,0),
+(29176,1,0),
+(29328,1,1),
+(29339,1,0),
+(29340,1,0),
+(29428,1,0),
+(29437,1,0),
+(29456,1,0),
+(29457,1,0),
+(29458,1,0),
+(29459,1,0),
+(29461,1,0),
+(29531,1,0),
+(29534,1,0),
+(29612,1,0),
+(29705,1,0),
+(29726,1,0),
+(29727,1,0),
+(29769,1,0),
+(29770,1,0),
+(29846,1,1),
+(29962,1,0),
+(29966,1,0),
+(29967,1,0),
+(29969,1,0),
+(29970,1,0),
+(29972,1,0),
+(29989,1,0),
+(30012,1,0),
+(30065,1,0),
+(30107,1,0),
+(30166,1,0),
+(30207,1,0),
+(30221,1,0),
+(30232,1,0),
+(30273,1,0),
+(30410,1,0),
+(30417,1,0),
+(30418,1,0),
+(30425,1,0),
+(30427,1,0),
+(30460,1,0),
+(30462,1,0),
+(30469,1,0),
+(30477,1,0),
+(30541,1,0),
+(30544,1,0),
+(30571,1,1),
+(30572,1,0),
+(30625,1,0),
+(30631,1,1),
+(30656,1,0),
+(30662,1,0),
+(30676,1,0),
+(30690,1,0),
+(30735,1,0),
+(30738,1,0),
+(30745,1,0),
+(30751,1,0),
+(30762,1,0),
+(30763,1,0),
+(30764,1,0),
+(30765,1,0),
+(30766,1,0),
+(30834,1,0),
+(30835,1,0),
+(30875,1,0),
+(30876,1,0),
+(30951,1,0),
+(30952,1,0),
+(30964,1,0),
+(30968,1,0),
+(30970,1,0),
+(30974,1,0),
+(30985,1,0),
+(30988,1,0),
+(31115,1,0),
+(31225,1,0),
+(31315,1,0),
+(31324,1,0),
+(31326,1,0),
+(31329,1,0),
+(31336,1,0),
+(31346,1,0),
+(31411,1,0),
+(31412,1,0),
+(31413,1,0),
+(31414,1,0),
+(31474,1,0),
+(31515,1,0),
+(31532,1,0),
+(31537,1,0),
+(31550,1,0),
+(31611,1,0),
+(31628,1,0),
+(31630,1,0),
+(31631,1,0),
+(31702,1,0),
+(31727,1,0),
+(31736,1,0),
+(31749,1,0),
+(31781,1,0),
+(31793,1,0),
+(31799,1,0),
+(31806,1,0),
+(31889,1,0),
+(31902,1,0),
+(31936,1,0),
+(31979,1,0),
+(31993,1,0),
+(32040,1,0),
+(32042,1,0),
+(32045,1,0),
+(32051,1,0),
+(32052,1,0),
+(32087,1,0),
+(32111,1,0),
+(32127,1,0),
+(32146,1,0),
+(32163,1,0),
+(32164,1,0),
+(32227,1,0),
+(32228,1,0),
+(32251,1,0),
+(32260,1,0),
+(32286,1,0),
+(32301,1,0),
+(32303,1,0),
+(32312,1,0),
+(32373,1,0),
+(32396,1,0),
+(32560,1,0),
+(32573,1,0),
+(32589,1,0),
+(32622,1,0),
+(32623,1,0),
+(32638,1,0),
+(32668,1,0),
+(32708,1,1),
+(32760,1,0),
+(32838,1,0),
+(32890,1,0),
+(32928,1,0),
+(32929,1,0),
+(32930,1,0),
+(32953,1,0),
+(32958,1,0),
+(32974,1,0),
+(32976,1,0),
+(32979,1,0),
+(33067,1,0),
+(33270,1,1),
+(33329,1,0),
+(33332,1,0),
+(33336,1,0),
+(33337,1,0),
+(33423,1,0),
+(33424,1,0),
+(33425,1,0),
+(33531,1,0),
+(33532,1,0),
+(33618,1,0),
+(33644,1,0),
+(33655,1,0),
+(33669,1,0),
+(33710,1,0),
+(33716,1,1),
+(33742,1,0),
+(33744,1,0),
+(33796,1,0),
+(33805,1,0),
+(33806,1,0),
+(33809,1,0),
+(33822,1,0),
+(33831,1,0),
+(33838,1,0),
+(33861,1,0),
+(33862,1,0),
+(33918,1,0),
+(33924,1,0),
+(33937,1,0),
+(33981,1,0),
+(34011,1,0),
+(34013,1,0),
+(34016,1,0),
+(34019,1,0),
+(34023,1,0),
+(34024,1,0),
+(34062,1,0),
+(34063,1,0),
+(34076,1,0),
+(34119,1,0),
+(34154,1,0),
+(34156,1,0),
+(34209,1,0),
+(34211,1,0),
+(34212,1,0),
+(34221,1,0),
+(34239,1,0),
+(34254,1,0),
+(34330,1,0),
+(34332,1,0),
+(34367,1,0),
+(34378,1,0),
+(34393,1,0),
+(34397,1,0),
+(34430,1,0),
+(34516,1,0),
+(34526,1,0),
+(34536,1,0),
+(34581,1,0),
+(34583,1,0),
+(34613,1,0),
+(34627,1,0),
+(34646,1,0),
+(34662,1,0),
+(34742,1,0),
+(34806,1,0),
+(34874,1,0),
+(34893,1,0),
+(34946,1,0),
+(35016,1,0),
+(35040,1,0),
+(35063,1,0),
+(35097,1,0),
+(35113,1,0),
+(35137,1,0),
+(35140,1,0),
+(35141,1,0),
+(35155,1,0),
+(35160,1,0),
+(35162,1,0),
+(35170,1,0),
+(35176,1,0),
+(35190,1,0),
+(35245,1,0),
+(35262,1,0),
+(35282,1,0),
+(35301,1,0),
+(35372,1,0),
+(35413,1,0),
+(35427,1,0),
+(35515,1,0),
+(35516,1,0),
+(35598,1,0),
+(35600,1,0),
+(35673,1,0),
+(35682,1,0),
+(35724,1,0),
+(35746,1,0),
+(35756,1,0),
+(35770,1,0),
+(35771,1,0),
+(35772,1,0),
+(35782,1,0),
+(35930,1,0),
+(35941,1,1),
+(35956,1,1),
+(35960,1,0),
+(35961,1,0),
+(35962,1,0),
+(36000,1,0),
+(36035,1,0),
+(36089,1,0),
+(36090,1,0),
+(36103,1,0),
+(36167,1,0),
+(36174,1,0),
+(36196,1,0),
+(36197,1,0),
+(36198,1,0),
+(36201,1,0),
+(36220,1,0),
+(36239,1,0),
+(36241,1,0),
+(36243,1,0),
+(36290,1,0),
+(36291,1,0),
+(36293,1,0),
+(36327,1,0),
+(36330,1,0),
+(36378,1,0),
+(36384,1,0),
+(36431,1,0),
+(36452,1,0),
+(36455,1,1),
+(36456,1,0),
+(36514,1,0),
+(36544,1,0),
+(36639,1,0),
+(36651,1,0),
+(36652,1,0),
+(36692,1,0),
+(36709,1,0),
+(36717,1,1),
+(36779,1,0),
+(36795,1,0),
+(36802,1,0),
+(36803,1,0),
+(36804,1,0),
+(36823,1,0),
+(36852,1,0),
+(36854,1,0),
+(36856,1,0),
+(36857,1,0),
+(36858,1,0),
+(36859,1,0),
+(36871,1,0),
+(36878,1,0),
+(36884,1,0),
+(36896,1,0),
+(36951,1,0),
+(36953,1,0),
+(36969,1,0),
+(36995,1,0),
+(37013,1,0),
+(37017,1,0),
+(37032,1,0),
+(37033,1,0),
+(37034,1,0),
+(37035,1,0),
+(37051,1,0),
+(37052,1,0),
+(37053,1,0),
+(37055,1,0),
+(37056,1,0),
+(37071,1,0),
+(37072,1,0),
+(37103,1,0),
+(37142,1,0),
+(37143,1,0),
+(37144,1,0),
+(37146,1,0),
+(37147,1,0),
+(37148,1,0),
+(37149,1,0),
+(37150,1,0),
+(37151,1,0),
+(37152,1,0),
+(37153,1,0),
+(37199,1,0),
+(37220,1,0),
+(37226,1,0),
+(37229,1,0),
+(37235,1,0),
+(37281,1,0),
+(37285,1,0),
+(37337,1,0),
+(37339,1,0),
+(37345,1,0),
+(37348,1,0),
+(37388,1,0),
+(37406,1,0),
+(37408,1,1),
+(37413,1,0),
+(37422,1,0),
+(37427,1,0),
+(37428,1,0),
+(37448,1,1),
+(37449,1,1),
+(37453,1,0),
+(37454,1,0),
+(37459,1,0),
+(37461,1,0),
+(37465,1,0),
+(37469,1,0),
+(37471,1,0),
+(37472,1,0),
+(37474,1,0),
+(37476,1,0),
+(37498,1,0),
+(37502,1,0),
+(37573,1,0),
+(37626,1,0),
+(37645,1,0),
+(37689,1,0),
+(37697,1,0),
+(37712,1,0),
+(37720,1,0),
+(37748,1,0),
+(37755,1,0),
+(37775,1,0),
+(37784,1,0),
+(37824,1,0),
+(37842,1,0),
+(37843,1,0),
+(37848,1,0),
+(37849,1,1),
+(37853,1,0),
+(37868,1,0),
+(37893,1,0),
+(37895,1,0),
+(37918,1,0),
+(37934,1,0),
+(37936,1,0),
+(37964,1,0),
+(37984,1,0),
+(38003,1,0),
+(38014,1,0),
+(38015,1,0),
+(38017,1,0),
+(38020,1,0),
+(38053,1,0),
+(38054,1,0),
+(38072,1,0),
+(38073,1,0),
+(38112,1,0),
+(38121,1,0),
+(38123,1,0),
+(38126,1,0),
+(38128,1,0),
+(38130,1,0),
+(38202,1,0),
+(38250,1,0),
+(38269,1,0),
+(38360,1,0),
+(38444,1,0),
+(38451,1,0),
+(38452,1,0),
+(38455,1,0),
+(38469,1,0),
+(38482,1,0),
+(38508,1,0),
+(38530,1,0),
+(38629,1,0),
+(38632,1,0),
+(38691,1,0),
+(38711,1,0),
+(38722,1,0),
+(38736,1,0),
+(38738,1,0),
+(38762,1,0),
+(38802,1,0),
+(38829,1,1),
+(38966,1,0),
+(38968,1,0),
+(39010,1,0),
+(39011,1,0),
+(39043,1,0),
+(39073,1,0),
+(39094,1,0),
+(39124,1,0),
+(39126,1,0),
+(39140,1,0),
+(39141,1,0),
+(39184,1,0),
+(39185,1,0),
+(39189,1,0),
+(39190,1,0),
+(39206,1,0),
+(39211,1,0),
+(39216,1,0),
+(39219,1,0),
+(39221,1,0),
+(39248,1,0),
+(39334,1,0),
+(39335,1,0),
+(39338,1,0),
+(39341,1,0),
+(39342,1,0),
+(39344,1,0),
+(39350,1,0),
+(39352,1,0),
+(39353,1,0),
+(39354,1,0),
+(39355,1,0),
+(39356,1,0),
+(39357,1,0),
+(39358,1,0),
+(39359,1,0),
+(39360,1,0),
+(39361,1,0),
+(39362,1,0),
+(39395,1,0),
+(39495,1,0),
+(39497,1,1),
+(39552,1,0),
+(39559,1,0),
+(39583,1,0),
+(39601,1,0),
+(39635,1,0),
+(39678,1,0),
+(39687,1,0),
+(39690,1,0),
+(39691,1,0),
+(39692,1,0),
+(39696,1,0),
+(39758,1,0),
+(39834,1,1),
+(39849,1,0),
+(39851,1,1),
+(39852,1,1),
+(39853,1,1),
+(39854,1,1),
+(39873,1,0),
+(39899,1,0),
+(39914,1,0),
+(39915,1,0),
+(39919,1,0),
+(39921,1,0),
+(39923,1,1),
+(39930,1,0),
+(39938,1,0),
+(39939,1,0),
+(39940,1,0),
+(39974,1,0),
+(39977,1,0),
+(39978,1,0),
+(39985,1,0),
+(39989,1,0),
+(39993,1,0),
+(39999,1,0),
+(40085,1,0),
+(40094,1,0),
+(40106,1,0),
+(40110,1,0),
+(40112,1,1),
+(40136,1,0),
+(40147,1,0),
+(40153,1,0),
+(40156,1,0),
+(40160,1,0),
+(40187,1,0),
+(40189,1,0),
+(40190,1,0),
+(40224,1,0),
+(40281,1,0),
+(40287,1,0),
+(40288,1,0),
+(40289,1,0),
+(40309,1,0),
+(40350,1,0),
+(40359,1,0),
+(40382,1,0),
+(40383,1,0),
+(40397,1,0),
+(40437,1,0),
+(40439,1,0),
+(40454,1,0),
+(40490,1,0),
+(40494,1,0),
+(40498,1,0),
+(40499,1,0),
+(40512,1,0),
+(40520,1,0),
+(40521,1,0),
+(40523,1,0),
+(40532,1,0),
+(40547,1,0),
+(40607,1,0),
+(40638,1,0),
+(40693,1,0),
+(40704,1,0),
+(40707,1,0),
+(40708,1,0),
+(40709,1,0),
+(40710,1,0),
+(40711,1,0),
+(40712,1,0),
+(40713,1,0),
+(40715,1,0),
+(40730,1,1),
+(40738,1,0),
+(40750,1,0),
+(40761,1,0),
+(40788,1,0),
+(40821,1,0),
+(40824,1,0),
+(40825,1,0),
+(40828,1,0),
+(40830,1,0),
+(40848,1,1),
+(40874,1,0),
+(40887,1,0),
+(40978,1,0),
+(40985,1,1),
+(40989,1,0),
+(40993,1,1),
+(41007,1,1),
+(41015,1,1),
+(41022,1,1),
+(41073,1,0),
+(41077,1,0),
+(41122,1,0),
+(41124,1,0),
+(41125,1,0),
+(41128,1,0),
+(41129,1,0),
+(41154,1,0),
+(41257,1,0),
+(41268,1,0),
+(41269,1,0),
+(41271,1,0),
+(41285,1,1),
+(41295,1,0),
+(41333,1,0),
+(41342,1,0),
+(41343,1,0),
+(41344,1,0),
+(41362,1,0),
+(41455,1,0),
+(41457,1,0),
+(41477,1,0),
+(41499,1,0),
+(41522,1,0),
+(41525,1,0),
+(41537,1,0),
+(41557,1,0),
+(41560,1,0),
+(41575,1,0),
+(41602,1,0),
+(41614,1,0),
+(41624,1,1),
+(41975,1,0),
+(41976,1,0),
+(41993,1,0),
+(42008,1,0),
+(42014,1,0),
+(42138,1,1),
+(42143,1,0),
+(42151,1,0),
+(42166,1,0),
+(42167,1,0),
+(42168,1,0),
+(42178,1,0),
+(42219,1,0),
+(42222,1,0),
+(42247,1,0),
+(42269,1,0),
+(42271,1,0),
+(42272,1,0),
+(42289,1,0),
+(42317,1,0),
+(42318,1,0),
+(42321,1,0),
+(42339,1,0),
+(42341,1,0),
+(42352,1,0),
+(42356,1,0),
+(42391,1,0),
+(42393,1,0),
+(42405,1,0),
+(42410,1,0),
+(42415,1,0),
+(42428,1,0),
+(42442,1,0),
+(42447,1,0),
+(42454,1,0),
+(42471,1,0),
+(42473,1,0),
+(42482,1,0),
+(42484,1,0),
+(42515,1,0),
+(42517,1,0),
+(42530,1,0),
+(42534,1,0),
+(42536,1,0),
+(42542,1,0),
+(42550,1,0),
+(42564,1,0),
+(42567,1,0),
+(42570,1,0),
+(42577,1,0),
+(42585,1,0),
+(42604,1,0),
+(42605,1,0),
+(42616,1,0),
+(42631,1,0),
+(42638,1,1),
+(42647,1,0),
+(42654,1,0),
+(42655,1,0),
+(42659,1,0),
+(42661,1,0),
+(42664,1,0),
+(42674,1,1),
+(42685,1,0),
+(42695,1,0),
+(42697,1,0),
+(42703,1,0),
+(42707,1,0),
+(42713,1,0),
+(42720,1,0),
+(42734,1,0),
+(42757,1,1),
+(42768,1,0),
+(42793,1,0),
+(42797,1,0),
+(42808,1,0),
+(42809,1,0),
+(42813,1,0),
+(42815,1,0),
+(42816,1,0),
+(42818,1,0),
+(42821,1,0),
+(42839,1,0),
+(42857,1,0),
+(42881,1,0),
+(42882,1,0),
+(42883,1,0),
+(42884,1,0),
+(42888,1,0),
+(42905,1,0),
+(42968,1,0),
+(42982,1,0),
+(43033,1,0),
+(43035,1,0),
+(43057,1,0),
+(43066,1,0),
+(43068,1,0),
+(43069,1,0),
+(43072,1,0),
+(43076,1,0),
+(43078,1,0),
+(43079,1,0),
+(43092,1,0),
+(43101,1,0),
+(43106,1,0),
+(43109,1,0),
+(43144,1,0),
+(43171,1,0),
+(43209,1,0),
+(43210,1,0),
+(43234,1,0),
+(43239,1,0),
+(43244,1,0),
+(43255,1,0),
+(43291,1,0),
+(43306,1,0),
+(43307,1,0),
+(43333,1,0),
+(43371,1,0),
+(43385,1,0),
+(43386,1,0),
+(43403,1,0),
+(43404,1,0),
+(43407,1,0),
+(43450,1,0),
+(43458,1,0),
+(43468,1,0),
+(43486,1,0),
+(43487,1,0),
+(43515,1,0),
+(43520,1,0),
+(43525,1,0),
+(43546,1,0),
+(43559,1,0),
+(43563,1,0),
+(43568,1,0),
+(43615,1,0),
+(43647,1,0),
+(43662,1,0),
+(43685,1,0),
+(43691,1,0),
+(43711,1,0),
+(43734,1,0),
+(43754,1,0),
+(43770,1,0),
+(43791,1,0),
+(43805,1,0),
+(43863,1,0),
+(43865,1,0),
+(43867,1,0),
+(43871,1,0),
+(43872,1,0),
+(43878,1,0),
+(43882,1,0),
+(43892,1,0),
+(43942,1,0),
+(43943,1,0),
+(43949,1,0),
+(43962,1,0),
+(43990,1,0),
+(43994,1,0),
+(44014,1,0),
+(44022,1,0),
+(44023,1,0),
+(44024,1,0),
+(44026,1,0),
+(44027,1,0),
+(44028,1,0),
+(44037,1,0),
+(44145,1,0),
+(44161,1,0),
+(44193,1,0),
+(44214,1,0),
+(44224,1,1),
+(44229,1,0),
+(44232,1,1),
+(44250,1,0),
+(44255,1,0),
+(44260,1,0),
+(44266,1,0),
+(44270,1,0),
+(44283,1,0),
+(44284,1,0),
+(44309,1,0),
+(44313,1,0),
+(44329,1,0),
+(44330,1,0),
+(44355,1,0),
+(44362,1,0),
+(44365,1,0),
+(44367,1,0),
+(44374,1,0),
+(44392,1,0),
+(44411,1,0),
+(44420,1,0),
+(44422,1,0),
+(44458,1,0),
+(44550,1,0),
+(44562,1,0),
+(44574,1,0),
+(44609,1,0),
+(44610,1,0),
+(44653,1,0),
+(44681,1,0),
+(44682,1,1),
+(44749,1,0),
+(44804,1,0),
+(44807,1,0),
+(44826,1,0),
+(44837,1,0),
+(44838,1,0),
+(44839,1,0),
+(44840,1,0),
+(44841,1,0),
+(44842,1,0),
+(44845,1,0),
+(44846,1,0),
+(44849,1,1),
+(44864,1,0),
+(44865,1,0),
+(44872,1,0),
+(44877,1,0),
+(44883,1,0),
+(44886,1,0),
+(44938,1,0),
+(44939,1,0),
+(44941,1,0),
+(44946,1,0),
+(44948,1,0),
+(44963,1,0),
+(44965,1,0),
+(44981,1,0),
+(45005,1,0),
+(45008,1,0),
+(45012,1,0),
+(45013,1,0),
+(45076,1,0),
+(45086,1,0),
+(45103,1,0),
+(45109,1,0),
+(45114,1,0),
+(45115,1,0),
+(45119,1,0),
+(45172,1,0),
+(45188,1,0),
+(45191,1,0),
+(45219,1,0),
+(45223,1,0),
+(45224,1,0),
+(45229,1,0),
+(45233,1,0),
+(45259,1,0),
+(45260,1,1),
+(45264,1,0),
+(45267,1,0),
+(45277,1,0),
+(45279,1,0),
+(45307,1,0),
+(45323,1,0),
+(45339,1,0),
+(45340,1,0),
+(45351,1,0),
+(45368,1,0),
+(45371,1,0),
+(45388,1,0),
+(45389,1,0),
+(45405,1,0),
+(45407,1,0),
+(45414,1,0),
+(45437,1,0),
+(45446,1,0),
+(45448,1,0),
+(45449,1,0),
+(45465,1,0),
+(45474,1,0),
+(45536,1,0),
+(45581,1,0),
+(45583,1,0),
+(45586,1,0),
+(45594,1,0),
+(45595,1,0),
+(45596,1,0),
+(45597,1,0),
+(45602,1,0),
+(45605,1,0),
+(45606,1,0),
+(45607,1,0),
+(45608,1,0),
+(45609,1,0),
+(45622,1,0),
+(45623,1,0),
+(45630,1,0),
+(45634,1,0),
+(45644,1,1),
+(45651,1,0),
+(45655,1,0),
+(45656,1,0),
+(45666,1,0),
+(45667,1,0),
+(45671,1,1),
+(45680,1,1),
+(45692,1,0),
+(45700,1,0),
+(45714,1,0),
+(45732,1,0),
+(45735,1,0),
+(45761,1,0),
+(45774,1,0),
+(45780,1,0),
+(45788,1,0),
+(45805,1,0),
+(45808,1,0),
+(45834,1,0),
+(45835,1,0),
+(45841,1,0),
+(45853,1,0),
+(45859,1,0),
+(45863,1,0),
+(45864,1,0),
+(45867,1,0),
+(45872,1,0),
+(45888,1,0),
+(45907,1,0),
+(45911,1,0),
+(45912,1,0),
+(45914,1,0),
+(45918,1,1),
+(45923,1,0),
+(45929,1,0),
+(45930,1,0),
+(45941,1,0),
+(45949,1,0),
+(45961,1,0),
+(45968,1,0),
+(45969,1,0),
+(45970,1,0),
+(45976,1,0),
+(45979,1,0),
+(45990,1,0),
+(45993,1,0),
+(46013,1,0),
+(46018,1,1),
+(46022,1,0),
+(46034,1,0),
+(46054,1,0),
+(46058,1,0),
+(46063,1,0),
+(46066,1,0),
+(46068,1,0),
+(46085,1,0),
+(46143,1,0),
+(46171,1,0),
+(46173,1,0),
+(62377,1,0),
+(46175,1,0),
+(46176,1,0),
+(46177,1,0),
+(46178,1,0),
+(46201,1,0),
+(46208,1,0),
+(46219,1,0),
+(46222,1,0),
+(46236,1,0),
+(46237,1,0),
+(46245,1,0),
+(46246,1,0),
+(46281,1,0),
+(46307,1,1),
+(46318,1,0),
+(46319,1,0),
+(46320,1,1),
+(46330,1,0),
+(46363,1,0),
+(46372,1,1),
+(46374,1,0),
+(46376,1,0),
+(46382,1,0),
+(46385,1,0),
+(46396,1,1),
+(46398,1,0),
+(46399,1,0),
+(46400,1,0),
+(46474,1,0),
+(46475,1,0),
+(46477,1,0),
+(46482,1,0),
+(46488,1,0),
+(46521,1,0),
+(46588,1,1),
+(46592,1,0),
+(46593,1,0),
+(46603,1,0),
+(46609,1,0),
+(46610,1,0),
+(46623,1,0),
+(46631,1,0),
+(46637,1,0),
+(46650,1,0),
+(46652,1,0),
+(46656,1,0),
+(46685,1,0),
+(46692,1,0),
+(46694,1,0),
+(46704,1,0),
+(46707,1,0),
+(46732,1,1),
+(46733,1,0),
+(46735,1,0),
+(46747,1,0),
+(46793,1,0),
+(46797,1,0),
+(46809,1,0),
+(46815,1,0),
+(46818,1,0),
+(46820,1,0),
+(46843,1,0),
+(46886,1,0),
+(46895,1,0),
+(46900,1,0),
+(46902,1,0),
+(46903,1,0),
+(46904,1,0),
+(46936,1,0),
+(46937,1,0),
+(46963,1,0),
+(46964,1,0),
+(46965,1,1),
+(46974,1,0),
+(47016,1,0),
+(47026,1,0),
+(47035,1,0),
+(47060,1,0),
+(47065,1,0),
+(47104,1,0),
+(47110,1,0),
+(47137,1,0),
+(47170,1,0),
+(47176,1,0),
+(47184,1,0),
+(47214,1,0),
+(47253,1,0),
+(47254,1,0),
+(47336,1,0),
+(47344,1,0),
+(47370,1,1),
+(47374,1,0),
+(47378,1,0),
+(47421,1,0),
+(47452,1,0),
+(47460,1,0),
+(47463,1,0),
+(47469,1,0),
+(47542,1,0),
+(47547,1,0),
+(47563,1,0),
+(47574,1,0),
+(47593,1,0),
+(47594,1,0),
+(47596,1,0),
+(47597,1,0),
+(47598,1,0),
+(47599,1,0),
+(47616,1,0),
+(47617,1,0),
+(47618,1,0),
+(47619,1,0),
+(47634,1,0),
+(47669,1,0),
+(47670,1,0),
+(47681,1,0),
+(47682,1,0),
+(47683,1,0),
+(47684,1,0),
+(47685,1,0),
+(47691,1,1),
+(47711,1,0),
+(47712,1,0),
+(47713,1,0),
+(47747,1,0),
+(47771,1,0),
+(47787,1,0),
+(47799,1,0),
+(47911,1,0),
+(47913,1,0),
+(47916,1,0),
+(47933,1,0),
+(47935,1,0),
+(47939,1,0),
+(47959,1,0),
+(48009,1,0),
+(48021,1,0),
+(48028,1,1),
+(48035,1,0),
+(48115,1,0),
+(48117,1,0),
+(48183,1,0),
+(48185,1,0),
+(48188,1,0),
+(48194,1,1),
+(48199,1,0),
+(48201,1,0),
+(48202,1,0),
+(48213,1,0),
+(48218,1,0),
+(48222,1,0),
+(48223,1,0),
+(48227,1,0),
+(48246,1,1),
+(48252,1,0),
+(48293,1,0),
+(48306,1,0),
+(48315,1,0),
+(48329,1,0),
+(48344,1,0),
+(48345,1,0),
+(48362,1,0),
+(48363,1,0),
+(48375,1,0),
+(48385,1,0),
+(48398,1,0),
+(48399,1,0),
+(48425,1,0),
+(48426,1,0),
+(48455,1,0),
+(48490,1,0),
+(48497,1,0),
+(48508,1,0),
+(48530,1,0),
+(48551,1,0),
+(48597,1,0),
+(48600,1,0),
+(48605,1,0),
+(48620,1,0),
+(48623,1,0),
+(48627,1,0),
+(48641,1,0),
+(48642,1,0),
+(48646,1,0),
+(48649,1,0),
+(48685,1,0),
+(48724,1,0),
+(48726,1,0),
+(48728,1,0),
+(48730,1,0),
+(48732,1,0),
+(48748,1,0),
+(48764,1,0),
+(48771,1,0),
+(48773,1,0),
+(48790,1,0),
+(48793,1,0),
+(48799,1,0),
+(48808,1,0),
+(48811,1,0),
+(48896,1,0),
+(48901,1,0),
+(48904,1,0),
+(48929,1,0),
+(48974,1,0),
+(48975,1,0),
+(49022,1,0),
+(49030,1,0),
+(49058,1,0),
+(49062,1,0),
+(49075,1,0),
+(49080,1,0),
+(49083,1,0),
+(49118,1,0),
+(49125,1,0),
+(49128,1,0),
+(49129,1,0),
+(49131,1,0),
+(49134,1,0),
+(49135,1,0),
+(49159,1,0),
+(49166,1,0),
+(49210,1,0),
+(49211,1,0),
+(49262,1,0),
+(49291,1,0),
+(49292,1,0),
+(49313,1,0),
+(49319,1,0),
+(49325,1,0),
+(49330,1,0),
+(49332,1,0),
+(49333,1,0),
+(49334,1,0),
+(49367,1,0),
+(49370,1,0),
+(49404,1,0),
+(49405,1,0),
+(49428,1,0),
+(49434,1,0),
+(49515,1,0),
+(49517,1,0),
+(49519,1,0),
+(49524,1,0),
+(49525,1,0),
+(49552,1,0),
+(49554,1,0),
+(49555,1,0),
+(49557,1,0),
+(49590,1,0),
+(49625,1,0),
+(49634,1,0),
+(49679,1,0),
+(49682,1,0),
+(49683,1,0),
+(49684,1,0),
+(49731,1,0),
+(49751,1,0),
+(49762,1,0),
+(49825,1,0),
+(49826,1,0),
+(49829,1,0),
+(49858,1,0),
+(49862,1,0),
+(49870,1,0),
+(49899,1,0),
+(49947,1,0),
+(50036,1,0),
+(50087,1,0),
+(50133,1,0),
+(50173,1,0),
+(50174,1,0),
+(50176,1,0),
+(50177,1,0),
+(50178,1,0),
+(50179,1,0),
+(50312,1,0),
+(50315,1,1),
+(50331,1,0),
+(50350,1,0),
+(50382,1,0),
+(50383,1,0),
+(50398,1,1),
+(50430,1,0),
+(50440,1,0),
+(50492,1,0),
+(50515,1,0),
+(50524,1,0),
+(50546,1,0),
+(50547,1,0),
+(50548,1,0),
+(50554,1,0),
+(50556,1,0),
+(50562,1,0),
+(50563,1,0),
+(50568,1,0),
+(50569,1,0),
+(50592,1,0),
+(50628,1,0),
+(50669,1,0),
+(50674,1,0),
+(50682,1,1),
+(50742,1,0),
+(50775,1,0),
+(50793,1,0),
+(50794,1,0),
+(50817,1,0),
+(50835,1,0),
+(50878,1,0),
+(50883,1,1),
+(50892,1,0),
+(51001,1,0),
+(51022,1,0),
+(51023,1,0),
+(51024,1,0),
+(51025,1,0),
+(51039,1,0),
+(51049,1,0),
+(51122,1,0),
+(51136,1,0),
+(51139,1,0),
+(51152,1,0),
+(51171,1,0),
+(51172,1,0),
+(51202,1,0),
+(51213,1,0),
+(51215,1,0),
+(51234,1,0),
+(51239,1,0),
+(51247,1,0),
+(51256,1,0),
+(51276,1,0),
+(51288,1,0),
+(51318,1,0),
+(51331,1,0),
+(51332,1,0),
+(51333,1,0),
+(51343,1,0),
+(51366,1,0),
+(51368,1,0),
+(51381,1,0),
+(51384,1,0),
+(51393,1,0),
+(51396,1,0),
+(51403,1,0),
+(51420,1,0),
+(51448,1,1),
+(51516,1,0),
+(51518,1,0),
+(51577,1,0),
+(51579,1,0),
+(51590,1,0),
+(51603,1,0),
+(51606,1,0),
+(51607,1,0),
+(51616,1,0),
+(51639,1,0),
+(51641,1,0),
+(51642,1,0),
+(51643,1,0),
+(51644,1,0),
+(51645,1,0),
+(51649,1,0),
+(51650,1,0),
+(51651,1,0),
+(51652,1,0),
+(51670,1,0),
+(51694,1,0),
+(51697,1,0),
+(51727,1,0),
+(51737,1,0),
+(51739,1,0),
+(51743,1,0),
+(51754,1,0),
+(51767,1,0),
+(51769,1,0),
+(51773,1,0),
+(51774,1,0),
+(51791,1,0),
+(51794,1,0),
+(51825,1,0),
+(51840,1,0),
+(51843,1,0),
+(51858,1,0),
+(51859,1,0),
+(51861,1,0),
+(51866,1,0),
+(51870,1,0),
+(51902,1,0),
+(51904,1,0),
+(51907,1,0),
+(51910,1,0),
+(51925,1,0),
+(51927,1,0),
+(51931,1,0),
+(51932,1,0),
+(51933,1,0),
+(51942,1,0),
+(51959,1,0),
+(51964,1,0),
+(51965,1,0),
+(52011,1,0),
+(52037,1,0),
+(52059,1,0),
+(52064,1,0),
+(52089,1,0),
+(52106,1,0),
+(52122,1,0),
+(52124,1,0),
+(52140,1,0),
+(52151,1,0),
+(52164,1,0),
+(52170,1,0),
+(52173,1,0),
+(52185,1,0),
+(52227,1,0),
+(52229,1,0),
+(52238,1,0),
+(52239,1,0),
+(52242,1,0),
+(52247,1,0),
+(52254,1,0),
+(52257,1,0),
+(52259,1,0),
+(52264,1,0),
+(52294,1,0),
+(52313,1,0),
+(52322,1,0),
+(52335,1,0),
+(52336,1,0),
+(52337,1,1),
+(52340,1,0),
+(52343,1,0),
+(52349,1,0),
+(52365,1,1),
+(52369,1,0),
+(52371,1,0),
+(52381,1,0),
+(52387,1,0),
+(52388,1,0),
+(52407,1,0),
+(52412,1,0),
+(52414,1,0),
+(52427,1,0),
+(52438,1,0),
+(52446,1,0),
+(52449,1,0),
+(52452,1,0),
+(52453,1,0),
+(52454,1,0),
+(52457,1,0),
+(52458,1,0),
+(52512,1,0),
+(52514,1,0),
+(52528,1,0),
+(52576,1,0),
+(52577,1,0),
+(52585,1,0),
+(52607,1,0),
+(52632,1,0),
+(52638,1,0),
+(52654,1,0),
+(52661,1,0),
+(52676,1,0),
+(52681,1,0),
+(52686,1,0),
+(52687,1,0),
+(52688,1,0),
+(52725,1,0),
+(52726,1,0),
+(52727,1,0),
+(52728,1,0),
+(52729,1,0),
+(52730,1,0),
+(52731,1,0),
+(52732,1,0),
+(52774,1,0),
+(52791,1,0),
+(52793,1,0),
+(52805,1,0),
+(52811,1,0),
+(52816,1,0),
+(52833,1,0),
+(52834,1,0),
+(52837,1,0),
+(52838,1,0),
+(52844,1,0),
+(52850,1,0),
+(52884,1,0),
+(52908,1,0),
+(52920,1,0),
+(52930,1,0),
+(52934,1,0),
+(52935,1,0),
+(52936,1,0),
+(52937,1,0),
+(52953,1,0),
+(52955,1,0),
+(52956,1,0),
+(52981,1,0),
+(52989,1,0),
+(52990,1,0),
+(53010,1,0),
+(53020,1,0),
+(53024,1,0),
+(53029,1,0),
+(53038,1,0),
+(53083,1,0),
+(53093,1,0),
+(53096,1,0),
+(53106,1,0),
+(53110,1,0),
+(53163,1,0),
+(53170,1,0),
+(53177,1,0),
+(53185,1,0),
+(53206,1,0),
+(53210,1,0),
+(53242,1,1),
+(53272,1,0),
+(53441,1,0),
+(53464,1,0),
+(53465,1,0),
+(53466,1,0),
+(53570,1,0),
+(53609,1,0),
+(53613,1,0),
+(53626,1,0),
+(53644,1,0),
+(53680,1,0),
+(53683,1,0),
+(53684,1,0),
+(53685,1,0),
+(53701,1,0),
+(53714,1,1),
+(53717,1,0),
+(53730,1,0),
+(53745,1,0),
+(53757,1,1),
+(53778,1,0),
+(53798,1,0),
+(53826,1,0),
+(53827,1,0),
+(53828,1,0),
+(53829,1,0),
+(54040,1,0),
+(54047,1,0),
+(54089,1,0),
+(54090,1,0),
+(54097,1,0),
+(54108,1,0),
+(54112,1,0),
+(54128,1,0),
+(54142,1,0),
+(54209,1,0),
+(54236,1,0),
+(54245,1,0),
+(54250,1,0),
+(54258,1,0),
+(54264,1,0),
+(54265,1,0),
+(54266,1,0),
+(54267,1,0),
+(54269,1,0),
+(54323,1,0),
+(54325,1,0),
+(54327,1,0),
+(54328,1,0),
+(54377,1,0),
+(54423,1,0),
+(54426,1,0),
+(54430,1,0),
+(54464,1,0),
+(54510,1,0),
+(54522,1,0),
+(54539,1,0),
+(54548,1,0),
+(54643,1,0),
+(54656,1,0),
+(54664,1,0),
+(54685,1,0),
+(54699,1,1),
+(54725,1,1),
+(54728,1,0),
+(54744,1,1),
+(54746,1,1),
+(54773,1,0),
+(54796,1,0),
+(54798,1,0),
+(54806,1,0),
+(54878,1,0),
+(54899,1,0),
+(54984,1,0),
+(54985,1,0),
+(54988,1,0),
+(54991,1,0),
+(55063,1,0),
+(55089,1,0),
+(55127,1,0),
+(55134,1,0),
+(55137,1,0),
+(55138,1,0),
+(55141,1,0),
+(55145,1,0),
+(55161,1,0),
+(55223,1,0),
+(55227,1,0),
+(55229,1,0),
+(55231,1,0),
+(55244,1,0),
+(55257,1,0),
+(55287,1,0),
+(55288,1,0),
+(55290,1,0),
+(55406,1,0),
+(55418,1,0),
+(55419,1,0),
+(55423,1,1),
+(55432,1,0),
+(55465,1,0),
+(55468,1,0),
+(55510,1,0),
+(55516,1,0),
+(55519,1,0),
+(55524,1,0),
+(55526,1,0),
+(55527,1,0),
+(55571,1,0),
+(55578,1,0),
+(55616,1,1),
+(55647,1,0),
+(55660,1,0),
+(55661,1,0),
+(55662,1,0),
+(55693,1,0),
+(55720,1,0),
+(55721,1,0),
+(55722,1,0),
+(55723,1,0),
+(55724,1,0),
+(55725,1,0),
+(55726,1,0),
+(55727,1,0),
+(55785,1,0),
+(55796,1,0),
+(55801,1,0),
+(55803,1,0),
+(55805,1,0),
+(55811,1,0),
+(55844,1,0),
+(55853,1,0),
+(55868,1,0),
+(55872,1,0),
+(55875,1,0),
+(55878,1,1),
+(55881,1,1),
+(55882,1,0),
+(55885,1,1),
+(55886,1,0),
+(55887,1,1),
+(55888,1,0),
+(55954,1,0),
+(56047,1,0),
+(56066,1,0),
+(56099,1,0),
+(56103,1,0),
+(56114,1,0),
+(56117,1,0),
+(56150,1,0),
+(56152,1,0),
+(56189,1,0),
+(56227,1,0),
+(56253,1,0),
+(56263,1,0),
+(56264,1,0),
+(56265,1,0),
+(56266,1,0),
+(56275,1,0),
+(56312,1,0),
+(56387,1,0),
+(56388,1,0),
+(56393,1,0),
+(56429,1,0),
+(56458,1,0),
+(56505,1,0),
+(56523,1,0),
+(56560,1,0),
+(56563,1,0),
+(56567,1,0),
+(56575,1,0),
+(56621,1,0),
+(56622,1,0),
+(56652,1,0),
+(56661,1,0),
+(56663,1,0),
+(56665,1,0),
+(56667,1,0),
+(56669,1,0),
+(56673,1,0),
+(56677,1,0),
+(56680,1,0),
+(56683,1,0),
+(56688,1,0),
+(56691,1,0),
+(56693,1,0),
+(56695,1,0),
+(56696,1,0),
+(56711,1,0),
+(56713,1,0),
+(56722,1,0),
+(56723,1,0),
+(56724,1,0),
+(56725,1,0),
+(56738,1,0),
+(56763,1,0),
+(56764,1,0),
+(56865,1,0),
+(56905,1,0),
+(56917,1,0),
+(56941,1,1),
+(57042,1,0),
+(57068,1,0),
+(57071,1,0),
+(57072,1,0),
+(57410,1,0),
+(57417,1,0),
+(57420,1,0),
+(57422,1,0),
+(57469,1,0),
+(57471,1,0),
+(57495,1,0),
+(57523,1,0),
+(57534,1,0),
+(57632,1,0),
+(57637,1,0),
+(57638,1,0),
+(57639,1,0),
+(57642,1,0),
+(57650,1,0),
+(57659,1,0),
+(57666,1,0),
+(57667,1,0),
+(57682,1,0),
+(57732,1,0),
+(57734,1,0),
+(57735,1,0),
+(57736,1,0),
+(57737,1,0),
+(57738,1,0),
+(57797,1,0),
+(57806,1,0),
+(57809,1,0),
+(57828,1,0),
+(57852,1,0),
+(57853,1,0),
+(57885,1,0),
+(57891,1,0),
+(57912,1,0),
+(57930,1,0),
+(57962,1,0),
+(57963,1,0),
+(57980,1,0),
+(57983,1,0),
+(58036,1,0),
+(58040,1,0),
+(58064,1,0),
+(58084,1,0),
+(58103,1,0),
+(58108,1,0),
+(58109,1,0),
+(58112,1,0),
+(58114,1,0),
+(58121,1,0),
+(58123,1,0),
+(58124,1,0),
+(58131,1,0),
+(58152,1,0),
+(58178,1,0),
+(58195,1,1),
+(58196,1,1),
+(58197,1,1),
+(58198,1,1),
+(58225,1,0),
+(58350,1,0),
+(58416,1,0),
+(58493,1,1),
+(58515,1,0),
+(58533,1,0),
+(58542,1,0),
+(58552,1,0),
+(58593,1,0),
+(58641,1,0),
+(58658,1,0),
+(58672,1,0),
+(58685,1,0),
+(58793,1,0),
+(58836,1,0),
+(58838,1,0),
+(58846,1,1),
+(58858,1,0),
+(58873,1,0),
+(58916,1,0),
+(58917,1,0),
+(58945,1,0),
+(58949,1,0),
+(59078,1,0),
+(59091,1,0),
+(59098,1,0),
+(59115,1,0),
+(59125,1,0),
+(59189,1,0),
+(59190,1,0),
+(59284,1,0),
+(59335,1,0),
+(59363,1,0),
+(59375,1,0),
+(59383,1,0),
+(59386,1,0),
+(59396,1,0),
+(59449,1,0),
+(59456,1,0),
+(59461,1,1),
+(59528,1,0),
+(59534,1,0),
+(59552,1,0),
+(59554,1,0),
+(59556,1,1),
+(59579,1,0),
+(59595,1,0),
+(59643,1,0),
+(59655,1,0),
+(59668,1,0),
+(59677,1,0),
+(59678,1,0),
+(59704,1,0),
+(59729,1,0),
+(59730,1,0),
+(59764,1,0),
+(59780,1,0),
+(59781,1,0),
+(59807,1,0),
+(59847,1,0),
+(59867,1,0),
+(59871,1,0),
+(59897,1,0),
+(59925,1,0),
+(59930,1,0),
+(59951,1,0),
+(59952,1,0),
+(59977,1,0),
+(60038,1,0),
+(60045,1,0),
+(60046,1,0),
+(60088,1,0),
+(60104,1,0),
+(60178,1,1),
+(60207,1,0),
+(60208,1,0),
+(60224,1,0),
+(60243,1,0),
+(60256,1,0),
+(60285,1,0),
+(60288,1,0),
+(60291,1,1),
+(60292,1,1),
+(60293,1,1),
+(60294,1,1),
+(60295,1,1),
+(60296,1,1),
+(60297,1,1),
+(60298,1,0),
+(60310,1,0),
+(60315,1,0),
+(60316,1,0),
+(60342,1,0),
+(60422,1,0),
+(60456,1,0),
+(60476,1,1),
+(60496,1,0),
+(60499,1,1),
+(60507,1,1),
+(60508,1,1),
+(60511,1,0),
+(60516,1,0),
+(60522,1,1),
+(60528,1,0),
+(60535,1,0),
+(60536,1,0),
+(60561,1,0),
+(60612,1,0),
+(60614,1,0),
+(60713,1,0),
+(60810,1,0),
+(60829,1,0),
+(60831,1,0),
+(60834,1,0),
+(60836,1,0),
+(60863,1,0),
+(60909,1,0),
+(60912,1,1),
+(60967,1,0),
+(61007,1,0),
+(61026,1,0),
+(61028,1,0),
+(61071,1,0),
+(61072,1,0),
+(61073,1,0),
+(61074,1,0),
+(61075,1,0),
+(61114,1,0),
+(61121,1,0),
+(61151,1,0),
+(61152,1,0),
+(61180,1,0),
+(61210,1,0),
+(61219,1,0),
+(61245,1,0),
+(61254,1,0),
+(61353,1,0),
+(61355,1,0),
+(61397,1,0),
+(61408,1,0),
+(61416,1,0),
+(61487,1,0),
+(61488,1,0),
+(61492,1,0),
+(61524,1,0),
+(61537,1,0),
+(61588,1,0),
+(61602,1,0),
+(61647,1,0),
+(61652,1,0),
+(61665,1,0),
+(61710,1,0),
+(61738,1,0),
+(61764,1,0),
+(61765,1,0),
+(61766,1,0),
+(61771,1,0),
+(61816,1,1),
+(61863,1,1),
+(61901,1,0),
+(61934,1,0),
+(61942,1,0),
+(61964,1,0),
+(61975,1,0),
+(62002,1,0),
+(62016,1,0),
+(62034,1,0),
+(62037,1,1),
+(62072,1,0),
+(62082,1,0),
+(62083,1,0),
+(62084,1,0),
+(62091,1,0),
+(62102,1,0),
+(62195,1,0),
+(62223,1,0),
+(62266,1,0),
+(62272,1,0),
+(62278,1,0),
+(62284,1,0),
+(62304,1,0),
+(62323,1,0),
+(62343,1,0),
+(47129,2,0),
+(34395,2,0),
+(34387,2,0),
+(32440,2,0),
+(32439,2,0),
+(32205,2,0),
+(31538,2,0),
+(30740,2,0),
+(29831,2,0),
+(28806,2,0),
+(28353,2,0),
+(27517,2,0),
+(27203,2,0),
+(27202,2,0),
+(27201,2,0),
+(27191,2,0),
+(27190,2,0),
+(27184,2,0),
+(26560,2,0),
+(26063,2,0),
+(25005,2,0),
+(24934,2,0),
+(24871,2,0),
+(24721,2,0),
+(24390,2,0),
+(23208,2,0),
+(21127,2,0),
+(18431,2,0),
+(17731,2,0),
+(17016,2,0),
+(16613,2,0),
+(16447,2,0),
+(13489,2,0),
+(12139,2,0),
+(11792,2,0),
+(9224,2,0),
+(9223,2,0),
+(9222,2,0),
+(9221,2,0),
+(8674,2,0),
+(7729,2,0),
+(7728,2,0),
+(3921,2,0),
+(35683,2,0),
+(36066,2,0),
+(36546,2,0),
+(36851,2,0),
+(37754,2,0),
+(38439,2,0),
+(38782,2,0),
+(39050,2,0),
+(40055,2,0),
+(40165,2,0),
+(40166,2,0),
+(40167,2,0),
+(40328,2,0),
+(40447,2,0),
+(40468,2,0),
+(40632,2,0),
+(40640,2,0),
+(40642,2,0),
+(40644,2,0),
+(40675,2,0),
+(40774,2,0),
+(40785,2,0),
+(40964,2,0),
+(40965,2,0),
+(40968,2,0),
+(40970,2,0),
+(41004,2,0),
+(41145,2,0),
+(41146,2,0),
+(42020,2,0),
+(42022,2,0),
+(42323,2,0),
+(42788,2,0),
+(43418,2,0),
+(43552,2,0),
+(43723,2,0),
+(43753,2,0),
+(43768,2,0),
+(43950,2,0),
+(44307,2,0),
+(44498,2,0),
+(44499,2,0),
+(44611,2,0),
+(44686,2,0),
+(44874,2,0),
+(44885,2,0),
+(45149,2,0),
+(45222,2,0),
+(45226,2,0),
+(45795,2,0),
+(45877,2,0),
+(45971,2,0),
+(46072,2,0),
+(46350,2,0),
+(46360,2,1),
+(46584,2,0),
+(76006,2,0),
+(74179,2,0),
+(72869,2,0),
+(72868,2,0),
+(72608,2,0),
+(72456,2,0),
+(72405,2,0),
+(72340,2,1),
+(71284,2,1),
+(70598,2,1),
+(70446,2,1),
+(70346,2,0),
+(70227,2,0),
+(70199,2,0),
+(70175,2,0),
+(70173,2,0),
+(69402,2,0),
+(69400,2,0),
+(69294,2,0),
+(69157,2,0),
+(67815,2,0),
+(67814,2,0),
+(67813,2,0),
+(67812,2,0),
+(67798,2,0),
+(67459,2,0),
+(67458,2,0),
+(67448,2,0),
+(67439,2,0),
+(67436,2,0),
+(66676,2,0),
+(66672,2,0),
+(66655,2,0),
+(66531,2,0),
+(66289,2,0),
+(65209,2,0),
+(64871,2,0),
+(64570,2,0),
+(64436,2,0),
+(63618,2,0),
+(63381,2,0),
+(62776,2,0),
+(62714,2,0),
+(62635,2,0),
+(62397,2,0),
+(62363,2,0),
+(62357,2,0),
+(62355,2,0),
+(62307,2,0),
+(62086,2,0),
+(61999,2,1),
+(60289,2,0),
+(60101,2,0),
+(59790,2,0),
+(59732,2,0),
+(59576,2,0),
+(58596,2,0),
+(58231,2,0),
+(57945,2,0),
+(57619,2,0),
+(57610,2,0),
+(57607,2,0),
+(57583,2,0),
+(57575,2,0),
+(57544,2,0),
+(57517,2,0),
+(57415,2,0),
+(56790,2,0),
+(56570,2,0),
+(56385,2,0),
+(56350,2,0),
+(55934,2,0),
+(55820,2,0),
+(55367,2,0),
+(55197,2,0),
+(54712,2,0),
+(54666,2,0),
+(54530,2,0),
+(52510,2,0),
+(52408,2,0),
+(52339,2,0),
+(52277,2,0),
+(52274,2,0),
+(52115,2,0),
+(51383,2,0),
+(51328,2,0),
+(51327,2,0),
+(51326,2,0),
+(51325,2,0),
+(51241,2,0),
+(50999,2,0),
+(50319,2,0),
+(50026,2,0),
+(50003,2,0),
+(49867,2,0),
+(49860,2,0),
+(49765,2,0),
+(49728,2,0),
+(49693,2,0),
+(49689,2,0),
+(49158,2,0),
+(49123,2,0),
+(49109,2,0),
+(48794,2,0),
+(48738,2,0),
+(48347,2,0),
+(47978,2,0),
+(35246,2,0),
+(42576,3,0),
+(42492,3,0),
+(42475,3,0),
+(42433,3,0),
+(42350,3,0),
+(42348,3,0),
+(42242,3,1),
+(42228,3,0),
+(42220,3,0),
+(42114,3,0),
+(41221,3,0),
+(40961,3,0),
+(40960,3,0),
+(40959,3,0),
+(40957,3,0),
+(40885,3,0),
+(40603,3,0),
+(40495,3,0),
+(40401,3,0),
+(40380,3,0),
+(40341,3,0),
+(40307,3,0),
+(40286,3,0),
+(40285,3,0),
+(40284,3,0),
+(40283,3,0),
+(40268,3,0),
+(40247,3,0),
+(40246,3,0),
+(40245,3,0),
+(40244,3,0),
+(40240,3,0),
+(40222,3,0),
+(40179,3,0),
+(40178,3,0),
+(40177,3,0),
+(40176,3,0),
+(40105,3,0),
+(40076,3,0),
+(39932,3,0),
+(39887,3,0),
+(39844,3,0),
+(39832,3,1),
+(39831,3,0),
+(39558,3,0),
+(39401,3,0),
+(39399,3,0),
+(39398,3,0),
+(39393,3,0),
+(39384,3,0),
+(39364,3,0),
+(38866,3,0),
+(38680,3,0),
+(38173,3,0),
+(38046,3,0),
+(38044,3,0),
+(37970,3,0),
+(37954,3,0),
+(37942,3,0),
+(37919,3,0),
+(37913,3,0),
+(37793,3,1),
+(37789,3,0),
+(37750,3,1),
+(37504,3,0),
+(37489,3,0),
+(37473,3,1),
+(37366,3,0),
+(37134,3,0),
+(36821,3,0),
+(36811,3,0),
+(36450,3,0),
+(36449,3,1),
+(36325,3,0),
+(35958,3,0),
+(35776,3,0),
+(35734,3,0),
+(35599,3,0),
+(35596,3,0),
+(34303,3,0),
+(34200,3,0),
+(34186,3,0),
+(42578,3,0),
+(33814,3,0),
+(33783,3,0),
+(33670,3,0),
+(33664,3,0),
+(33365,3,0),
+(33240,3,0),
+(33111,3,0),
+(32785,3,0),
+(32314,3,0),
+(32307,3,0),
+(32241,3,0),
+(32148,3,0),
+(32067,3,0),
+(31927,3,0),
+(31543,3,0),
+(31364,3,0),
+(31363,3,0),
+(31333,3,0),
+(30758,3,0),
+(30741,3,0),
+(30284,3,0),
+(29945,3,0),
+(29866,3,0),
+(29820,3,1),
+(29460,3,0),
+(28373,3,0),
+(28250,3,0),
+(28054,3,0),
+(26521,3,0),
+(26519,3,0),
+(26518,3,0),
+(26517,3,0),
+(26516,3,0),
+(26490,3,0),
+(26488,3,0),
+(26393,3,1),
+(26373,3,0),
+(26338,3,0),
+(26337,3,0),
+(26336,3,0),
+(26335,3,0),
+(26334,3,0),
+(26333,3,0),
+(26329,3,0),
+(26328,3,0),
+(26327,3,0),
+(26326,3,0),
+(26325,3,0),
+(26304,3,0),
+(26295,3,0),
+(26294,3,0),
+(26293,3,0),
+(26292,3,0),
+(26291,3,0),
+(26286,3,0),
+(25687,3,0),
+(25183,3,0),
+(25181,3,0),
+(25180,3,0),
+(25178,3,0),
+(25177,3,0),
+(24973,3,0),
+(24731,3,0),
+(23024,3,0),
+(21086,3,0),
+(21014,3,0),
+(20038,3,0),
+(20037,3,0),
+(19873,3,0),
+(17179,3,0),
+(16629,3,0),
+(16452,3,0),
+(16337,3,0),
+(15998,3,0),
+(13488,3,0),
+(12151,3,0),
+(10860,3,0),
+(10836,3,0),
+(10835,3,0),
+(10834,3,0),
+(10805,3,0),
+(9257,3,0),
+(9232,3,0),
+(42868,3,0),
+(43233,3,0),
+(43539,3,0),
+(43664,3,0),
+(43898,3,0),
+(43954,3,0),
+(43963,3,0),
+(43986,3,0),
+(44013,3,0),
+(44132,3,0),
+(44213,3,0),
+(44249,3,0),
+(44320,3,0),
+(44321,3,0),
+(44375,3,0),
+(44465,3,0),
+(44554,3,0),
+(44565,3,0),
+(44603,3,0),
+(44678,3,0),
+(44844,3,0),
+(44884,3,0),
+(45030,3,0),
+(45050,3,1),
+(45201,3,0),
+(45203,3,0),
+(45404,3,0),
+(45502,3,0),
+(45585,3,0),
+(45633,3,0),
+(45635,3,0),
+(45653,3,0),
+(45839,3,0),
+(45885,3,1),
+(46417,3,0),
+(46574,3,0),
+(46638,3,1),
+(46852,3,0),
+(46896,3,0),
+(47030,3,1),
+(47328,3,0),
+(47510,3,0),
+(47628,3,0),
+(47745,3,0),
+(47775,3,1),
+(47800,3,0),
+(48198,3,0),
+(48212,3,0),
+(48331,3,0),
+(48431,3,0),
+(48882,3,0),
+(48972,3,0),
+(49197,3,0),
+(49300,3,0),
+(49308,3,0),
+(49453,3,0),
+(49735,3,0),
+(50313,3,1),
+(50348,3,0),
+(50443,3,0),
+(50501,3,0),
+(50626,3,0),
+(50639,3,0),
+(50640,3,0),
+(50716,3,0),
+(50790,3,0),
+(50791,3,0),
+(50802,3,0),
+(50803,3,0),
+(50825,3,0),
+(50826,3,0),
+(51212,3,0),
+(51246,3,0),
+(51395,3,0),
+(51511,3,0),
+(51742,3,0),
+(51748,3,0),
+(51805,3,0),
+(51846,3,0),
+(52067,3,1),
+(52271,3,0),
+(52305,3,0),
+(52479,3,0),
+(52480,3,0),
+(52497,3,0),
+(52603,3,0),
+(52683,3,0),
+(52685,3,0),
+(52812,3,0),
+(53677,3,0),
+(53679,3,0),
+(53694,3,0),
+(53705,3,0),
+(53706,3,0),
+(54272,3,0),
+(54517,3,0),
+(54914,3,0),
+(54961,3,0),
+(54990,3,0),
+(55037,3,0),
+(55083,3,0),
+(55365,3,0),
+(55479,3,0),
+(55715,3,0),
+(55800,3,0),
+(55889,3,1),
+(56095,3,0),
+(56140,3,0),
+(56386,3,0),
+(56389,3,0),
+(56578,3,0),
+(56747,3,0),
+(56765,3,0),
+(57586,3,0),
+(57800,3,0),
+(57824,3,0),
+(57835,3,0),
+(58766,3,0),
+(58825,3,0),
+(59008,3,0),
+(59462,3,0),
+(59464,3,0),
+(59564,3,0),
+(59629,3,0),
+(59694,3,0),
+(60639,3,0),
+(61126,3,0),
+(61224,3,0),
+(61699,3,0),
+(62000,3,0),
+(62056,3,0),
+(62385,3,0),
+(62387,3,0),
+(62399,3,0),
+(62565,3,0),
+(62709,3,0),
+(62973,3,0),
+(62991,3,0),
+(63019,3,0),
+(63122,3,1),
+(63292,3,0),
+(63294,3,0),
+(63295,3,0),
+(63317,3,0),
+(63414,3,0),
+(63528,3,0),
+(63766,3,0),
+(63983,3,0),
+(63985,3,0),
+(64021,3,0),
+(65044,3,0),
+(65045,3,0),
+(65101,3,0),
+(65585,3,0),
+(65586,3,0),
+(65690,3,0),
+(66129,3,0),
+(66170,3,0),
+(66598,3,0),
+(67398,3,0),
+(68378,3,0),
+(68902,3,0),
+(69007,3,0),
+(69095,3,0),
+(69096,3,0),
+(69708,3,0),
+(69783,3,0),
+(69797,3,0),
+(69799,3,0),
+(69802,3,0),
+(69985,3,0),
+(70028,3,0),
+(70037,3,0),
+(70194,3,0),
+(70521,3,0),
+(70564,3,0),
+(70590,3,0),
+(70997,3,0),
+(70998,3,0),
+(70999,3,0),
+(71278,3,1),
+(71621,3,0),
+(71704,3,0),
+(72155,3,1),
+(72162,3,1),
+(72274,3,1),
+(72297,3,1),
+(72460,3,1),
+(72548,3,1),
+(72549,3,1),
+(72550,3,1),
+(72619,3,1),
+(72620,3,1),
+(72679,3,0),
+(72771,3,0),
+(72850,3,0),
+(72851,3,0),
+(72852,3,0),
+(74318,3,0),
+(74319,3,0),
+(74320,3,0),
+(74472,3,0),
+(75509,3,0),
+(75553,3,1),
+(75766,3,1),
+(34012,3,0),
+(74271,4,0),
+(74270,4,0),
+(72096,4,1),
+(72034,4,1),
+(71615,4,0),
+(70827,4,0),
+(69425,4,0),
+(69164,4,0),
+(69162,4,0),
+(68981,4,0),
+(68788,4,1),
+(67816,4,0),
+(67796,4,0),
+(65370,4,0),
+(65333,4,0),
+(64626,4,0),
+(62826,4,0),
+(62489,4,0),
+(62466,4,0),
+(62457,4,0),
+(62345,4,0),
+(62308,4,0),
+(60206,4,0),
+(58185,4,0),
+(55896,4,0),
+(55349,4,0),
+(54109,4,0),
+(54107,4,0),
+(51678,4,0),
+(50652,4,0),
+(49556,4,0),
+(48610,4,0),
+(48277,4,0),
+(48224,4,0),
+(47674,4,0),
+(47109,4,0),
+(45922,4,0),
+(44969,4,0),
+(44737,4,0),
+(44687,4,0),
+(44626,4,0),
+(44233,4,0),
+(40647,4,0),
+(40259,4,0),
+(39246,4,0),
+(36904,4,0),
+(36460,4,0),
+(36374,4,0),
+(30532,4,0),
+(28995,4,0),
+(10451,4,0),
+(9735,4,0),
+(8900,4,0),
+(8899,4,0),
+(8898,4,0),
+(8202,4,0),
+(74272,4,0),
+(69767,5,0),
+(65590,5,0),
+(62386,5,0),
+(55588,5,0),
+(54713,5,0),
+(49464,5,0),
+(49460,5,0),
+(49346,5,0),
+(47310,5,1),
+(45676,5,0),
+(44217,5,0),
+(43977,5,0),
+(41962,5,0),
+(40789,5,0),
+(40503,5,0),
+(38729,5,0),
+(38312,5,0),
+(38106,5,0),
+(38105,5,0),
+(38104,5,0),
+(38103,5,0),
+(38102,5,0),
+(38101,5,0),
+(38100,5,0),
+(38099,5,0),
+(37206,5,0),
+(37205,5,0),
+(37204,5,0),
+(36817,5,0),
+(34630,5,0),
+(21866,5,0),
+(21794,5,0),
+(19832,5,0),
+(19250,5,0),
+(8913,5,0),
+(67308,6,0),
+(67307,6,0),
+(67306,6,0),
+(67305,6,0),
+(67304,6,0),
+(67303,6,0),
+(65876,6,0),
+(65875,6,0),
+(63041,6,0),
+(62560,6,0),
+(59099,6,1),
+(44608,6,0),
+(43702,6,0),
+(43080,6,0),
+(43056,6,0),
+(40902,6,0),
+(40657,6,0),
+(28803,6,1),
+(16054,6,0),
+(8712,6,0),
+(75863,7,1),
+(75448,7,1),
+(74412,7,1),
+(74323,7,0),
+(74322,7,0),
+(74321,7,0),
+(73028,7,0),
+(72622,7,1),
+(72621,7,1),
+(72459,7,1),
+(72273,7,0),
+(72272,7,0),
+(71618,7,0),
+(71614,7,0),
+(71279,7,1),
+(70982,7,0),
+(70981,7,0),
+(70952,7,0),
+(69540,7,0),
+(67751,7,0),
+(66905,7,0),
+(66667,7,0),
+(65126,7,0),
+(64218,7,0),
+(63059,7,0),
+(62942,7,0),
+(62705,7,0),
+(61920,7,0),
+(61715,7,0),
+(61714,7,0),
+(61632,7,0),
+(60532,7,0),
+(60430,7,0),
+(59474,7,0),
+(59465,7,0),
+(57409,7,0),
+(57405,7,0),
+(57056,7,1),
+(56694,7,0),
+(56454,7,0),
+(54160,7,0),
+(53605,7,0),
+(52319,7,0),
+(51719,7,0),
+(50747,7,0),
+(50646,7,0),
+(50645,7,0),
+(50627,7,0),
+(50218,7,0),
+(49889,7,0),
+(48742,7,0),
+(48552,7,0),
+(46158,7,0),
+(42287,7,0),
+(42265,7,1),
+(42079,7,0),
+(42004,7,1),
+(41284,7,0),
+(41113,7,0),
+(41112,7,0),
+(41111,7,0),
+(41110,7,0),
+(41071,7,0),
+(41064,7,1),
+(40931,7,0),
+(40929,7,0),
+(40905,7,0),
+(40900,7,0),
+(40851,7,0),
+(40370,7,0),
+(40172,7,0),
+(40171,7,0),
+(40170,7,0),
+(40169,7,0),
+(40075,7,1),
+(39698,7,0),
+(39686,7,0),
+(39218,7,0),
+(38920,7,0),
+(38774,7,0),
+(38484,7,0),
+(38449,7,0),
+(38371,7,0),
+(37076,7,0),
+(35957,7,1),
+(35754,7,0),
+(35289,7,0),
+(34350,7,0),
+(34187,7,0),
+(31625,7,0),
+(31624,7,0),
+(31617,7,0),
+(30939,7,1),
+(30659,7,0),
+(30657,7,0),
+(30531,7,0),
+(30098,7,0),
+(28681,7,1),
+(25790,7,0),
+(25029,7,0),
+(23015,7,0),
+(22710,7,0),
+(20553,7,0),
+(10732,7,0),
+(10348,7,0),
+(7082,7,0),
+(5628,7,0),
+(804,7,0),
+(802,7,0),
+(54069,1,0),
+(56251,1,0),
+(58630,1,0);
+
+-- remove redundant entries
+DELETE FROM `conditions` WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 1 AND `ConditionValue2` = 0 AND `SourceEntry` IN (SELECT `id` FROM `temp_convert_spells` WHERE onlyPlayers);
+
+-- set source group if available in db
+UPDATE `conditions` SET `SourceGroup` = `ConditionValue3`, `ConditionValue3` = 0 WHERE `ConditionTypeOrReference` = 18;
+
+-- set source group in case of old default (not set) source group
+UPDATE `conditions` SET `SourceGroup` = (SELECT `effMask` FROM `temp_convert_spells` WHERE `id` = `SourceEntry`) WHERE `SourceGroup` = 0 AND `ConditionTypeOrReference` = 18;
+
+CREATE TABLE `temp_cond_vals`
+(
+ `sourceGroup` INT(11),
+ `sourceEntry` INT(11),
+ `conditionValue1` INT(11),
+ `conditionValue2` INT(11),
+ `elseGroup` INT(11) AUTO_INCREMENT,
+ PRIMARY KEY (`sourceGroup`, `sourceEntry`, `elseGroup`)
+) ENGINE=MYISAM;
+
+INSERT INTO `temp_cond_vals` (`sourceGroup`, `sourceEntry`, `conditionValue1`, `conditionValue2`) SELECT `SourceGroup`, `SourceEntry`, `ConditionValue1`, `ConditionValue2` FROM `conditions` WHERE `ConditionTypeOrReference` = 18;
+
+-- set correct else group
+UPDATE `conditions` SET `ElseGroup` = (SELECT `elseGroup` FROM `temp_cond_vals` WHERE `sourceGroup` = `conditions`.`SourceGroup` AND `sourceEntry` = `conditions`.`SourceEntry` AND `conditionValue1` = `conditions`.`ConditionValue1` AND `conditionValue2` = `conditions`.`ConditionValue2`)-1 WHERE `ConditionTypeOrReference` = 18;
+
+-- old condition type 3 (caster's minion)
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`)
+SELECT `SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, 33, 0, 1, 3 FROM `conditions` WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 3;
+
+UPDATE `conditions` SET `ConditionTypeOrReference` = 31 WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 3;
+
+-- old condition type 2 (dead creature)
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `NegativeCondition`)
+SELECT `SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, 36, 0, 0, 0, 1 FROM `conditions` WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 2;
+
+UPDATE `conditions` SET `ConditionTypeOrReference` = 31, `ConditionValue1` = 3 WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 2;
+
+-- old condition type 1 (creature)
+UPDATE `conditions` SET `ConditionTypeOrReference` = 31, `ConditionValue1` = 3 WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 1 AND `ConditionValue2`;
+
+-- old condition type 1 (player)
+UPDATE `conditions` SET `ConditionTypeOrReference` = 32, `ConditionValue1` = 0x90 WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 1 AND NOT `ConditionValue2`;
+
+-- old condition type 0 (gameobject)
+UPDATE `conditions` SET `ConditionTypeOrReference` = 31, `ConditionValue1` = 5 WHERE `ConditionTypeOrReference` = 18 AND `ConditionValue1` = 0;
+
+DROP TABLE `temp_convert_spells`;
+DROP TABLE `temp_cond_vals`; \ No newline at end of file
diff --git a/sql/updates/world/2012_02_21_02_world_creature_loot_template.sql b/sql/updates/world/2012_02_21_02_world_creature_loot_template.sql
new file mode 100644
index 00000000000..6c6af7ed2a3
--- /dev/null
+++ b/sql/updates/world/2012_02_21_02_world_creature_loot_template.sql
@@ -0,0 +1,11 @@
+UPDATE `creature_template` SET `lootid`=`entry` WHERE `entry` IN (38032,37917,38016,38023,37214,38030,38006,37984);
+DELETE FROM `creature_loot_template` WHERE `entry`IN (38032,37917,38016,38023,37214,38030,38006,37984);
+INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(38032,1,100,1,0,-45009,1), -- Crown Sprayer
+(37917,1,100,1,0,-45009,1), -- Crown Thug
+(38016,1,100,1,0,-45009,1), -- Crown Agent
+(38023,1,100,1,0,-45009,1), -- Crown Sprinkler
+(37214,1,100,1,0,-45009,1), -- Crown Lackey
+(38030,1,100,1,0,-45009,1), -- Crown Underling
+(38006,1,100,1,0,-45009,1), -- Crown Hoodlum (level 1??)
+(37984,1,100,1,0,-45009,1); -- Crown Duster (level 1??)
diff --git a/sql/updates/world/2012_02_21_03_world_creature_loot_template.sql b/sql/updates/world/2012_02_21_03_world_creature_loot_template.sql
new file mode 100644
index 00000000000..d7d043cbda9
--- /dev/null
+++ b/sql/updates/world/2012_02_21_03_world_creature_loot_template.sql
@@ -0,0 +1,26 @@
+-- Razormane Hunter Warrior's Boots 32% to 3.2%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=3.2996 WHERE `entry`=3265 AND `item`=2967;
+-- Razormane Hunter Hunting Cloak 11% to 1.1%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=1.1855 WHERE `entry`=3265 AND `item`=4689;
+-- Razormane Defender Pioneer Buckler 87% to 0.8%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.8789 WHERE `entry`=3266 AND `item`=7109;
+-- Razormane Defender Spellbinder Belt 77% to 0.7%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.7717 WHERE `entry`=3266 AND `item`=4684;
+-- Razormane Geomancer Simple Shoes 77% to 0.7%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.7791 WHERE `entry`=3269 AND `item`=9743;
+-- Razormane Geomancer Veteran Bracers 73% to 0.7%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.7364 WHERE `entry`=3269 AND `item`=3213;
+-- Venture Co. Supervisor Burnt Leather Belt 85% to 0.8%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.8511 WHERE `entry`=2979 AND `item`=4666;
+-- Venture Co. Supervisor Warrior's Gloves 74% to 0.7%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.7433 WHERE `entry`=2979 AND `item`=2968;
+-- Venture Co. Supervisor Pioneer Bracers 55% to 0.5%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.5593 WHERE `entry`=2979 AND `item`=6519;
+-- Venture Co. Supervisor Journeyman's Gloves 43% to 0.4%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.4348 WHERE `entry`=2979 AND `item`=2960;
+-- Venture Co. Worker Warrior's Bracers 72% to 0.7%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.7226 WHERE `entry`=2978 AND `item`=3214;
+-- Venture Co. Worker Fine Scimitar 64% to 0.6%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.6492 WHERE `entry`=2978 AND `item`=4560;
+-- Venture Co. Worker Warrior's Girdle 24% to 0.2%
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=0.2458 WHERE `entry`=2978 AND `item`=4659;
diff --git a/sql/updates/world/2012_02_21_04_world_creature_loot_template.sql b/sql/updates/world/2012_02_21_04_world_creature_loot_template.sql
new file mode 100644
index 00000000000..3deedbf0b0d
--- /dev/null
+++ b/sql/updates/world/2012_02_21_04_world_creature_loot_template.sql
@@ -0,0 +1,16 @@
+SET @ENTRY := 30409; -- Apprentice Osterkilgr
+DELETE FROM `creature_loot_template` WHERE entry=@ENTRY;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Quest related Items
+(@ENTRY,43089,-100,1,0,1,1), -- Vrykul Bones
+(@ENTRY,42772,-100,1,0,1,1), -- Dr Terrible's "Building a Better Flesh Giant"
+(@ENTRY,42422,-50,1,0,1,1), -- Jotunheim Cage Key
+-- Other random stuff
+(@ENTRY,33470,20,1,0,1,4), -- Frostweave Cloth
+(@ENTRY,43851,20,1,0,1,1), -- Fur Clothing Scraps
+(@ENTRY,43852,20,1,0,1,1), -- Thick Fur Clothing Scraps
+-- References for world drops
+(@ENTRY,1,10,1,0,-35063,1), -- Northrend Grey Items
+(@ENTRY,2,5,1,0,-35066,1), -- Northrend Green Items
+-- hatebook
+(@ENTRY,45912,0.1,1,0,1,1); -- Book Glyph of Mastery (honestly screw that thing)
diff --git a/sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql b/sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql
new file mode 100644
index 00000000000..1bdccae5c39
--- /dev/null
+++ b/sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql
@@ -0,0 +1,39 @@
+-- SAI for Lothos Riftwaker
+SET @ENTRY=14387;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' 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,1,62,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lothos Riftwaker - On Gossip Option select - close gossip'),
+(@ENTRY,0,1,0,61,0,100,0,5750,0,0,0,62,409,0,0,0,0,0,7,0,0,0,1096,-467,-104.6,3.64,'Lothos Riftwaker - On Gossip Option select - teleport player');
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (5750);
+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
+(5750,0,0,'Teleport me to the Molten Core, Lothos.',1,1,0,0,0,0,'');
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (5750);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,5750,0,0,0,8,7848,0,0,0,0,'','Show gossip option if player has quest 7848 completed');
+
+-- SAI for Zamael Lunthistle
+SET @ENTRY=8436;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' 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,1,62,0,100,0,1285,0,0,0,26,3377,0,0,0,0,0,7,0,0,0,0,0,0,0,'Zamael Lunthistle - On Gossip Option select - quest credit'),
+(@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,'Zamael Lunthistle - On Gossip Option select - close gossip');
+
+DELETE FROM `gossip_menu` WHERE `entry`=1285 AND `text_id`=1920;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1285,1920);
+DELETE FROM `gossip_menu` WHERE `entry`=1286 AND `text_id`=1922;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1286,1922);
+DELETE FROM `gossip_menu` WHERE `entry`=1287 AND `text_id`=1921;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1287,1921);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1285,1286,1287);
+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
+(1285,0,0,'I wish to hear your tale.',1,1,1287,0,0,0,''),
+(1286,0,0,'Let me think about it, Zamael.',1,1,1285,0,0,0,''),
+(1287,0,0,'Please continue, Zamael.',1,1,1286,0,0,0,'');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (1285);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,1285,0,0,0,9,3377,0,0,0,0,'','Show gossip option if player has quest 3377 but not complete');
diff --git a/sql/updates/world/2012_02_21_06_world_Gossip.sql b/sql/updates/world/2012_02_21_06_world_Gossip.sql
new file mode 100644
index 00000000000..a59d330c6a3
--- /dev/null
+++ b/sql/updates/world/2012_02_21_06_world_Gossip.sql
@@ -0,0 +1,184 @@
+-- Gossip Update from Pitcrawler
+-- Creature Gossip_menu_id Update from sniff
+UPDATE `creature_template` SET `gossip_menu_id`=7692 WHERE `entry`=18424;
+UPDATE `creature_template` SET `gossip_menu_id`=9033 WHERE `entry`=24838;
+UPDATE `creature_template` SET `gossip_menu_id`=9038 WHERE `entry`=24833;
+UPDATE `creature_template` SET `gossip_menu_id`=9066 WHERE `entry`=25011;
+UPDATE `creature_template` SET `gossip_menu_id`=9067 WHERE `entry`=25015;
+UPDATE `creature_template` SET `gossip_menu_id`=9068 WHERE `entry`=25009;
+UPDATE `creature_template` SET `gossip_menu_id`=9069 WHERE `entry`=25017;
+UPDATE `creature_template` SET `gossip_menu_id`=9070 WHERE `entry`=25018;
+UPDATE `creature_template` SET `gossip_menu_id`=9071 WHERE `entry`=25016;
+UPDATE `creature_template` SET `gossip_menu_id`=9072 WHERE `entry` IN (25013,25014);
+UPDATE `creature_template` SET `gossip_menu_id`=9091 WHERE `entry`=25076;
+UPDATE `creature_template` SET `gossip_menu_id`=9107 WHERE `entry`=24929;
+UPDATE `creature_template` SET `gossip_menu_id`=9109 WHERE `entry`=24927;
+UPDATE `creature_template` SET `gossip_menu_id`=9110 WHERE `entry`=24924;
+UPDATE `creature_template` SET `gossip_menu_id`=9116 WHERE `entry`=25105;
+UPDATE `creature_template` SET `gossip_menu_id`=9117 WHERE `entry`=25100;
+UPDATE `creature_template` SET `gossip_menu_id`=9118 WHERE `entry`=25104;
+UPDATE `creature_template` SET `gossip_menu_id`=9120 WHERE `entry`=25107;
+UPDATE `creature_template` SET `gossip_menu_id`=9121 WHERE `entry` IN (25101,25102,25103);
+UPDATE `creature_template` SET `gossip_menu_id`=9122 WHERE `entry`=25106;
+UPDATE `creature_template` SET `gossip_menu_id`=9349 WHERE `entry`=26539;
+UPDATE `creature_template` SET `gossip_menu_id`=10120 WHERE `entry` IN (31704,31705,31706,31720,31723,31724);
+UPDATE `creature_template` SET `gossip_menu_id`=10259 WHERE `entry`=31716;
+
+-- Gossip Menu insert from sniff
+DELETE FROM `gossip_menu` WHERE `entry`=7692 AND `text_id`=9383;
+DELETE FROM `gossip_menu` WHERE `entry`=7696 AND `text_id`=9444;
+DELETE FROM `gossip_menu` WHERE `entry`=7704 AND `text_id`=9425;
+DELETE FROM `gossip_menu` WHERE `entry`=7726 AND `text_id`=9437;
+DELETE FROM `gossip_menu` WHERE `entry`=7727 AND `text_id`=9438;
+DELETE FROM `gossip_menu` WHERE `entry`=7728 AND `text_id`=9439;
+DELETE FROM `gossip_menu` WHERE `entry`=9033 AND `text_id`=12211;
+DELETE FROM `gossip_menu` WHERE `entry`=9038 AND `text_id`=12216;
+DELETE FROM `gossip_menu` WHERE `entry`=9040 AND `text_id`=12217;
+DELETE FROM `gossip_menu` WHERE `entry`=9041 AND `text_id`=12218;
+DELETE FROM `gossip_menu` WHERE `entry`=9042 AND `text_id`=12219;
+DELETE FROM `gossip_menu` WHERE `entry`=9043 AND `text_id`=12220;
+DELETE FROM `gossip_menu` WHERE `entry`=9066 AND `text_id`=12262;
+DELETE FROM `gossip_menu` WHERE `entry`=9067 AND `text_id`=12263;
+DELETE FROM `gossip_menu` WHERE `entry`=9068 AND `text_id`=12264;
+DELETE FROM `gossip_menu` WHERE `entry`=9069 AND `text_id`=12266;
+DELETE FROM `gossip_menu` WHERE `entry`=9070 AND `text_id`=12267;
+DELETE FROM `gossip_menu` WHERE `entry`=9091 AND `text_id`=12292;
+DELETE FROM `gossip_menu` WHERE `entry`=9109 AND `text_id`=12317;
+DELETE FROM `gossip_menu` WHERE `entry`=9110 AND `text_id`=12318;
+DELETE FROM `gossip_menu` WHERE `entry`=9116 AND `text_id`=12327;
+DELETE FROM `gossip_menu` WHERE `entry`=9117 AND `text_id`=12328;
+DELETE FROM `gossip_menu` WHERE `entry`=9118 AND `text_id`=12329;
+DELETE FROM `gossip_menu` WHERE `entry`=9120 AND `text_id`=12331;
+DELETE FROM `gossip_menu` WHERE `entry`=9121 AND `text_id`=12332;
+DELETE FROM `gossip_menu` WHERE `entry`=9122 AND `text_id`=12333;
+DELETE FROM `gossip_menu` WHERE `entry`=9349 AND `text_id`=12649;
+DELETE FROM `gossip_menu` WHERE `entry`=10120 AND `text_id`=14047;
+DELETE FROM `gossip_menu` WHERE `entry`=10259 AND `text_id`=14248;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(7692,9383),
+(7696,9444),
+(7704,9425),
+(7726,9437),
+(7727,9438),
+(7728,9439),
+(9033,12211),
+(9038,12216),
+(9040,12217),
+(9041,12218),
+(9042,12219),
+(9043,12220),
+(9066,12262),
+(9067,12263),
+(9068,12264),
+(9069,12266),
+(9070,12267),
+(9091,12292),
+(9109,12317),
+(9110,12318),
+(9116,12327),
+(9117,12328),
+(9118,12329),
+(9120,12331),
+(9121,12332),
+(9122,12333),
+(9349,12649),
+(10120,14047),
+(10259,14248);
+
+-- Insert npc_text from sniff
+DELETE FROM `npc_text` WHERE `ID` IN (9437,9438,9439,12211,12266);
+INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`lang0`,`prob0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`lang1`,`prob1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`lang2`,`prob2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`lang3`,`prob3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`lang4`,`prob4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`lang5`,`prob5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`lang6`,`prob6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`lang7`,`prob7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES
+(9437,'<Warden Treelos looks at you funny and then pauses a moment, clearly struggling.>$B$BZangarmarsh... too close to truth.$B$B<His face goes crazy again.>$B$BIs he still watching!?','',0,1,1000,1,1000,6,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340),
+(9438,'What''s that? Zangarmarsh? Why would I want to go there?$B$B<Treelos looks thoughtful.>$B$BYes, Zangarmarsh... we... the druids there are getting close to figuring out why the water level is dropping. It''s destroying everything!$B$B<You can see the insanity creep back in behind the warden''s eyes.>$B$BDestroyed us all! Bright light! BOOM!!','',0,1,0,6,1000,1,1000,5,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340),
+(9439,'The Firewing blood elves... for some reason they want to stop us.$B$B<Warden Treelos visibly struggles to keep his wits about him for a few more seconds.>$B$BThey... they sent one of the Broken as ... as an emissary.... But he had a bomb!$B$BThey died, they all died! They tried to run away! The lucky ones didn''t even know.$B$BI must have been at the edge of the blast. It was horr...IT''S WATCHING US AGAIN!$B$B<Treelos becomes despondent and looks straight through you as if you''re not there.>','',0,1,0,18,1000,18,1000,5,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340),
+(12211,'Fine day fer sailin'', innit?','',7,1,0,1,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340),
+(12266,'','I''m almost jealous of our Mr. Wavesinger. Why, he may well be prettier than me!',7,1,0,1,3,11,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,12340);
+
+-- Creature Gossip_menu_option insert from sniff
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7692,7726,7727) AND `id`=0;
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9038,9040,9041,9042,9043) AND `id` IN (0,1,2);
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=9038 AND `id`=3;
+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
+(7692,0,0,'Treelos, I know that the truth is somewhere inside you. Tell me what it is.',1,1,7726,0,0,0,''),
+(7726,0,0,'Keep it together man! What about Zangarmarsh?',1,1,7727,0,0,0,''),
+(7727,0,0,'I don''t have time for this! Warden, what happened?!',1,1,7728,0,0,0,''),
+(9038,0,0,'The Lady Mehley',1,1,9040,0,0,0,''),
+(9038,1,0,'Food & Drink',1,1,9041,0,0,0,''),
+(9038,2,0,'Goods & Gear',1,1,9042,0,0,0,''),
+(9038,3,0,'"Stash?"',1,1,9043,0,0,0,''),
+(9040,0,0,'Food & Drink',1,1,9041,0,0,0,''),
+(9040,1,0,'Goods & Gear',1,1,9042,0,0,0,''),
+(9040,2,0,'"Stash?',1,1,9043,0,0,0,''),
+(9041,0,0,'The Lady Mehley',1,1,9040,0,0,0,''),
+(9041,1,0,'Goods & Gear',1,1,9042,0,0,0,''),
+(9041,2,0,'"Stash?',1,1,9043,0,0,0,''),
+(9042,0,0,'The Lady Mehley',1,1,9040,0,0,0,''),
+(9042,1,0,'Food & Drink',1,1,9041,0,0,0,''),
+(9042,2,0,'"Stash?',1,1,9043,0,0,0,''),
+(9043,0,0,'The Lady Mehley',1,1,9040,0,0,0,''),
+(9043,1,0,'Food & Drink',1,1,9041,0,0,0,''),
+(9043,2,0,'Goods & Gear',1,1,9042,0,0,0,'');
+
+-- Conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7704 AND `SourceEntry`=9425;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7696 AND `SourceEntry`=9444;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (7704,7692);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(14,7696,9444,0,0,8,10005,0,0,0,0,'','Show different gossip if player has rewarded quest 10005'),
+(14,7696,9444,0,1,8,10006,0,0,0,0,'','Show different gossip if player has rewarded quest 10006'),
+(14,7704,9425,0,0,8,9978,0,0,0,0,'','Show different gossip if player has rewarded quest 9978'),
+(15,7704,0,0,0,9,9978,0,0,0,0,'','Show gossip option if player has quest 9978 but not complete'),
+(15,7692,0,0,0,8,10006,0,0,0,0,'','Show gossip option if player has rewarded quest 10006'),
+(15,7692,0,0,1,8,10005,0,0,0,0,'','Show gossip option if player has rewarded quest 10005');
+
+-- Gossip Update from Malcrom
+DELETE FROM `gossip_menu` WHERE `entry` IN (1042,1043,1044,1045,1046,1047,1048,1049,1050,1052,1053);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(1042,1635),(1043,1640),(1044,1644),(1045,1643),(1045,1753),
+(1046,1648),(1047,1754),(1048,1650),(1049,1755),
+(1050,1651),(1050,1756),(1052,1652),(1053,1653);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1045,1047,1049,1050);
+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
+(1045,0,0,'Acquire Higher Level Access Card',1,1,0,0,0,0,''),
+(1047,0,0,'Acquire Higher Level Access Card',1,1,0,0,0,0,''),
+(1049,0,0,'Acquire Higher Level Access Card',1,1,0,0,0,0,''),
+(1050,0,0,'Acquire high level data card.',1,1,0,0,0,0,'');
+
+DELETE FROM `gossip_menu` WHERE `entry`=1080 AND `text_id`=1693;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1080,1693);
+DELETE FROM `gossip_menu` WHERE `entry`=1100 AND `text_id`=1713;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1100,1713);
+DELETE FROM `gossip_menu` WHERE `entry`=1143 AND `text_id`=1759;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1143,1759);
+DELETE FROM `gossip_menu` WHERE `entry`=1161 AND `text_id`=1793;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1161,1793);
+DELETE FROM `gossip_menu` WHERE `entry`=1162 AND `text_id`=1794;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1162,1794);
+DELETE FROM `gossip_menu` WHERE `entry`=1201 AND `text_id`=1833;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1201,1833);
+DELETE FROM `gossip_menu` WHERE `entry`=1281 AND `text_id`=1916;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1281,1916);
+DELETE FROM `gossip_menu` WHERE `entry`=1282 AND `text_id`=1918;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1282,1918);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1282);
+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
+(1282,0,0,'Touch the Suntara stone and call forth Lathoric the Black and his guardian, Obsidion.',1,1,0,0,0,0,'');
+
+DELETE FROM `gossip_menu` WHERE `entry`=1301 AND `text_id`=1933;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1301,1933);
+DELETE FROM `gossip_menu` WHERE `entry`=1301 AND `text_id`=1934;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1301,1934);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1301);
+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
+(1301,0,0,'I wish to browse your wares.',3,128,0,0,0,0,'');
+
+DELETE FROM `gossip_menu` WHERE `entry`=1302 AND `text_id`=1935;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1302,1935);
+DELETE FROM `gossip_menu` WHERE `entry`=1321 AND `text_id`=1955;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1321,1955);
+DELETE FROM `gossip_menu` WHERE `entry`=1322 AND `text_id`=1954;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1322,1954);
+DELETE FROM `gossip_menu` WHERE `entry`=1362 AND `text_id`=1994;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1362,1994);
diff --git a/sql/updates/world/2012_02_22_00_world_SAI.sql b/sql/updates/world/2012_02_22_00_world_SAI.sql
new file mode 100644
index 00000000000..2e392f3a45f
--- /dev/null
+++ b/sql/updates/world/2012_02_22_00_world_SAI.sql
@@ -0,0 +1,39 @@
+-- SAI for Kalaran Windblade
+SET @ENTRY=8479;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=@ENTRY AND `source_type`=0);
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=@ENTRY*100 AND `source_type`=9);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- AI
+(@ENTRY,0,0,1,62,0,100,0,1321,0,0,0,26,3441,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kalaran Windblade - On Gossip Option select - quest credit'),
+(@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,'Kalaran Windblade - On Gossip Option select - close gossip'),
+(@ENTRY,0,2,3,62,0,100,0,1323,2,0,0,11,19797,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kalaran Windblade - On Gossip Option select - cast 19797'),
+(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kalaran Windblade - On Gossip Option select - close gossip'),
+(@ENTRY,0,4,0,62,0,100,0,1323,3,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kalaran Windblade - On Gossip Option select - run script'),
+-- Script
+(@ENTRY*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,'Kalaran Windblade - script - close gossip'),
+(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kalaran Windblade - script - remove npc flags'),
+(@ENTRY*100,9,2,0,0,0,100,0,1000,1000,1000,1000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kalaran Windblade - script - say 0'),
+(@ENTRY*100,9,3,0,0,0,100,0,1000,1000,1000,1000,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kalaran Windblade - script - emotestate usestanding'),
+(@ENTRY*100,9,4,0,0,0,100,0,60000,60000,60000,60000,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kalaran Windblade - script - emotestate none'),
+(@ENTRY*100,9,5,0,0,0,100,0,1000,1000,1000,1000,26,3453,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kalaran Windblade - script - give quest credit'),
+(@ENTRY*100,9,6,0,0,0,100,0,1000,1000,1000,1000,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kalaran Windblade - script - add npc flags');
+-- npc 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,'Please be patient, $N',12,0,100,0,0,0,'Kalaran Windblade');
+-- Gossip options
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1321,1322,1323);
+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
+(1321,0,0,'Let me confer with my colleagues.',1,1,0,0,0,0,''),
+(1322,0,0,'Continue please.',1,1,1321,0,0,0,''),
+(1323,0,0,'Tell me what drives this vengeance?',1,1,1322,0,0,0,''),
+(1323,2,0,'Kalaran, I have misplaced my torch. I require another.',1,1,0,0,0,0,''),
+(1323,3,0,'Kalaran, please enchant the torch.',1,1,0,0,0,0,'');
+-- Gossip option conditions
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (1323);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,1323,0,0,0,9,3441,0,0,0,0,'','Show gossip option if player has quest 3441 but not complete'),
+(15,1323,2,0,0,8,3454,0,0,0,0,'','Show gossip option if player has quest 3441 complete'),
+(15,1323,2,0,0,2,10515,0,1,0,0,'','Show gossip option if player does not have item 10515'),
+(15,1323,3,0,0,9,3453,0,0,0,0,'','Show gossip option if player has quest 3453 but not complete');
diff --git a/sql/updates/world/2012_02_22_01_world_say_text.sql b/sql/updates/world/2012_02_22_01_world_say_text.sql
new file mode 100644
index 00000000000..035962e11c3
--- /dev/null
+++ b/sql/updates/world/2012_02_22_01_world_say_text.sql
@@ -0,0 +1,34 @@
+-- Invisible Stalker text for Wintergrasp from sniff
+DELETE FROM `creature_text` WHERE `entry`=15214;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(15214,0,0, 'Let the battle begin!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,1,0, 'The Broken Temple siege workshop has been attacked by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,2,0, 'The Broken Temple siege workshop has been captured by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,3,0, 'The Broken Temple siege workshop has been attacked by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,4,0, 'The Broken Temple siege workshop has been captured by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,5,0, 'The Sunken Ring siege workshop has been attacked by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,6,0, 'The Sunken Ring siege workshop has been captured by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,7,0, 'The Sunken Ring siege workshop has been attacked by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,8,0, 'The Sunken Ring siege workshop has been captured by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,9,0, 'The Eastspark siege workshop has been attacked by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,10,0, 'The Eastspark siege workshop has been captured by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,11,0, 'The Eastspark siege workshop has been attacked by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,12,0, 'The Eastspark siege workshop has been captured by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,13,0, 'The Westspark siege workshop has been attacked by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,14,0, 'The Westspark siege workshop has been captured by the Horde!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,15,0, 'The Westspark siege workshop has been attacked by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,16,0, 'The Westspark siege workshop has been captured by the Alliance!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,17,0, 'The north-western keep tower has been damaged!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,18,0, 'The north-western keep tower has been destroyed!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,19,0, 'The south-eastern keep tower has been damaged!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,20,0, 'The south-eastern keep tower has been destroyed!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,21,0, 'The western tower has been damaged!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,22,0, 'The western tower has been destroyed!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,23,0, 'The southern tower has been damaged!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,24,0, 'The southern tower has been destroyed!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,25,0, 'The eastern tower has been damaged!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,26,0, 'The eastern tower has been destroyed!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,27,0, 'The Horde has defended Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,28,0, 'The Horde has captured Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,29,0, 'The Alliance has defended Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'),
+(15214,30,0, 'The Alliance has captured Wintergrasp Fortress!',41,0,100,0,0,0, 'Invisible Stalker'); \ No newline at end of file
diff --git a/sql/updates/world/2012_02_22_02_world_misc.sql b/sql/updates/world/2012_02_22_02_world_misc.sql
new file mode 100644
index 00000000000..33bec2a9b78
--- /dev/null
+++ b/sql/updates/world/2012_02_22_02_world_misc.sql
@@ -0,0 +1,57 @@
+-- Mounting Hodir's Helm (12987)
+
+-- cleanup after Discovered
+-- clean all related to npc Hodir's Helm KC Bunny
+DELETE FROM `smart_scripts` WHERE `entryorguid`=30210 AND `source_type`=0;
+DELETE FROM `creature` WHERE `id`=30210;
+DELETE FROM `creature_text` WHERE `entry`=30210;
+
+SET @HELM := 192080; -- Hodir's Helm
+SET @TEMP := 300230; -- TEMP Northern Ice Spike
+SET @BUNNY_TARGET := 30215; -- Ice Spike Target Bunny
+SET @GUID_GO := 270; -- set by TDB
+SET @GUID_NPC := 40514; -- set by TDB
+SET @SPELL_READ_PRONOUNCEMENT := 56278;
+SET @QUEST := 12987;
+SET @AREA := 4438; -- Dun Niffelem
+SET @SPELL_AREA := 56305; -- See Quest Invisibility 1 (Ice Spike Bunny)
+SET @QUEST := 13006; -- Polishing the Helm
+
+UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432|256,`InhabitType`=7,`flags_extra`=`flags_extra`|128 WHERE `entry`=@BUNNY_TARGET;
+
+UPDATE `gameobject_template` SET `flags`=`flags`|32 WHERE `entry`=@HELM;
+UPDATE `gameobject` SET `phaseMask`=4 WHERE `id`=@TEMP;
+
+DELETE FROM `gameobject` WHERE `guid`=@GUID_GO;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@GUID_GO,@HELM,571,1,4,7390.143,-2725.382,874.2561,-3.089183,0,0,-0.9996567,0.02620165,600,255,1);
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID_NPC+0 AND @GUID_NPC+1;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID_NPC+0,@BUNNY_TARGET,571,1,4,0,0,7386.51,-2726.489,872.5089,5.88176,300,0,0,4979,0,0,0,0,0),
+(@GUID_NPC+1,@BUNNY_TARGET,571,1,4,0,0,7388.424,-2724.909,869.8643,0.5934119,300,0,0,4979,0,0,0,0,0);
+
+DELETE FROM `creature_template_addon` WHERE `entry`=@BUNNY_TARGET;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@BUNNY_TARGET,0,0,65536,1,0, '61333 56304 61334'); -- Gigantic Helm Sparkle / Hodir's Helm Bunny: Invisibility / Extra Large Helm Sparkle
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=@SPELL_READ_PRONOUNCEMENT;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(@SPELL_READ_PRONOUNCEMENT, 'spell_q12987_read_pronouncement');
+
+DELETE FROM `spell_area` WHERE `spell`=@SPELL_AREA;
+INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES
+(@SPELL_AREA,@AREA,@QUEST,1,@QUEST,0,0,2,1);
+
+-- relation for the daily quest that should be available after finishing Mounting Hodir's Helm
+
+-- removing flag 4 or else player can't interract with Q giver
+UPDATE `gameobject_template` SET `flags`=`flags`&~4 WHERE `entry`=@HELM;
+
+DELETE FROM `gameobject_questrelation` WHERE `id`=@HELM;
+INSERT INTO `gameobject_questrelation` (`id`,`quest`) VALUES
+(@HELM,@QUEST);
+
+DELETE FROM `gameobject_involvedrelation` WHERE `id`=@HELM;
+INSERT INTO `gameobject_involvedrelation` (`id`,`quest`) VALUES
+(@HELM,@QUEST);
diff --git a/sql/updates/world/2012_02_22_03_world_conditions.sql b/sql/updates/world/2012_02_22_03_world_conditions.sql
new file mode 100644
index 00000000000..9c4d0cdec95
--- /dev/null
+++ b/sql/updates/world/2012_02_22_03_world_conditions.sql
@@ -0,0 +1,3 @@
+UPDATE `conditions` SET `SourceTypeOrReferenceId`=13 WHERE `SourceTypeOrReferenceId`=17 AND `SourceGroup`=1;
+UPDATE `conditions` SET `ConditionValue2`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1323 AND `SourceEntry`=2 AND `ConditionTypeOrReference`=2;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup`=17465 AND `SourceEntry`=22554 AND `ConditionTypeOrReference`=7;
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index e6da5eeb996..2698c3e30e1 100755
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -16,6 +16,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <algorithm>
#include <openssl/md5.h>
#include "Common.h"
@@ -342,6 +343,13 @@ bool AuthSocket::_HandleLogonChallenge()
_login = (const char*)ch->I;
_build = ch->build;
+ _os = (const char*)ch->os;
+
+ if (_os.size() > 4)
+ return false;
+
+ // Restore string order as its byte order is reversed
+ std::reverse(_os.begin(), _os.end());
pkt << uint8(AUTH_LOGON_CHALLENGE);
pkt << uint8(0x00);
@@ -596,7 +604,8 @@ bool AuthSocket::_HandleLogonProof()
stmt->setString(0, K_hex);
stmt->setString(1, socket().getRemoteAddress().c_str());
stmt->setUInt32(2, GetLocaleByName(_localizationName));
- stmt->setString(3, _login);
+ stmt->setString(3, _os);
+ stmt->setString(4, _login);
LoginDatabase.Execute(stmt);
OPENSSL_free((void*)K_hex);
@@ -722,6 +731,13 @@ bool AuthSocket::_HandleReconnectChallenge()
// Reinitialize build, expansion and the account securitylevel
_build = ch->build;
+ _os = (const char*)ch->os;
+
+ if (_os.size() > 4)
+ return false;
+
+ // Restore string order as its byte order is reversed
+ std::reverse(_os.begin(), _os.end());
Field* fields = result->Fetch();
uint8 secLevel = fields[2].GetUInt8();
diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h
index 116412e2315..0b04c8d015d 100755
--- a/src/server/authserver/Server/AuthSocket.h
+++ b/src/server/authserver/Server/AuthSocket.h
@@ -81,6 +81,7 @@ private:
// Since GetLocaleByName() is _NOT_ bijective, we have to store the locale as a string. Otherwise we can't differ
// between enUS and enGB, which is important for the patch system
std::string _localizationName;
+ std::string _os;
uint16 _build;
AccountTypes _accountSecurityLevel;
};
diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp
index 72c36fc6646..e839457d1c9 100755
--- a/src/server/authserver/Server/RealmSocket.cpp
+++ b/src/server/authserver/Server/RealmSocket.cpp
@@ -95,7 +95,7 @@ const std::string& RealmSocket::getRemoteAddress(void) const
return _remoteAddress;
}
-const uint16 RealmSocket::getRemotePort(void) const
+uint16 RealmSocket::getRemotePort(void) const
{
return _remotePort;
}
diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h
index 9682b5e4559..c03a0e3ad1e 100755
--- a/src/server/authserver/Server/RealmSocket.h
+++ b/src/server/authserver/Server/RealmSocket.h
@@ -24,6 +24,7 @@
#include <ace/SOCK_Stream.h>
#include <ace/Message_Block.h>
#include <ace/Basic_Types.h>
+#include "Common.h"
class RealmSocket : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
{
@@ -54,7 +55,7 @@ public:
const std::string& getRemoteAddress(void) const;
- const uint16 getRemotePort(void) const;
+ uint16 getRemotePort(void) const;
virtual int open(void *);
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h
index b0c35237a9d..ea70fc3e322 100755
--- a/src/server/collision/BoundingIntervalHierarchy.h
+++ b/src/server/collision/BoundingIntervalHierarchy.h
@@ -81,13 +81,25 @@ struct AABound
class BIH
{
+ private:
+ void init_empty()
+ {
+ tree.clear();
+ objects.clear();
+ // create space for the first node
+ tree.push_back(3 << 30); // dummy leaf
+ tree.insert(tree.end(), 2, 0);
+ }
public:
- BIH() {};
- template< class T, class BoundsFunc >
- void build(const std::vector<T> &primitives, BoundsFunc &getBounds, uint32 leafSize = 3, bool printStats=false)
+ BIH() { init_empty(); }
+ template< class BoundsFunc, class PrimArray >
+ void build(const PrimArray &primitives, BoundsFunc &getBounds, uint32 leafSize = 3, bool printStats=false)
{
- if (primitives.empty())
+ if (primitives.size() == 0)
+ {
+ init_empty();
return;
+ }
buildData dat;
dat.maxPrims = leafSize;
@@ -397,4 +409,4 @@ class BIH
void subdivide(int left, int right, std::vector<uint32> &tempTree, buildData &dat, AABound &gridBox, AABound &nodeBox, int nodeIndex, int depth, BuildStats &stats);
};
-#endif // _BIH_H
+#endif // _BIH_H \ No newline at end of file
diff --git a/src/server/collision/BoundingIntervalHierarchyWrapper.h b/src/server/collision/BoundingIntervalHierarchyWrapper.h
new file mode 100644
index 00000000000..e2252ca60c8
--- /dev/null
+++ b/src/server/collision/BoundingIntervalHierarchyWrapper.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _BIH_WRAP
+#define _BIH_WRAP
+
+#include "G3D/Table.h"
+#include "G3D/Array.h"
+#include "G3D/Set.h"
+#include "BoundingIntervalHierarchy.h"
+
+
+template<class T, class BoundsFunc = BoundsTrait<T> >
+class BIHWrap
+{
+ template<class RayCallback>
+ struct MDLCallback
+ {
+ const T* const* objects;
+ RayCallback& _callback;
+
+ MDLCallback(RayCallback& callback, const T* const* objects_array ) : objects(objects_array), _callback(callback) {}
+
+ bool operator() (const Ray& ray, uint32 Idx, float& MaxDist, bool /*stopAtFirst*/)
+ {
+ if (const T* obj = objects[Idx])
+ return _callback(ray, *obj, MaxDist/*, stopAtFirst*/);
+ return false;
+ }
+
+ void operator() (const Vector3& p, uint32 Idx)
+ {
+ if (const T* obj = objects[Idx])
+ _callback(p, *obj);
+ }
+ };
+
+ typedef G3D::Array<const T*> ObjArray;
+
+ BIH m_tree;
+ ObjArray m_objects;
+ G3D::Table<const T*, uint32> m_obj2Idx;
+ G3D::Set<const T*> m_objects_to_push;
+ int unbalanced_times;
+
+public:
+ BIHWrap() : unbalanced_times(0) {}
+
+ void insert(const T& obj)
+ {
+ ++unbalanced_times;
+ m_objects_to_push.insert(&obj);
+ }
+
+ void remove(const T& obj)
+ {
+ ++unbalanced_times;
+ uint32 Idx = 0;
+ const T * temp;
+ if (m_obj2Idx.getRemove(&obj, temp, Idx))
+ m_objects[Idx] = NULL;
+ else
+ m_objects_to_push.remove(&obj);
+ }
+
+ void balance()
+ {
+ if (unbalanced_times == 0)
+ return;
+
+ unbalanced_times = 0;
+ m_objects.fastClear();
+ m_obj2Idx.getKeys(m_objects);
+ m_objects_to_push.getMembers(m_objects);
+
+ m_tree.build(m_objects, BoundsFunc::getBounds2);
+ }
+
+ template<typename RayCallback>
+ void intersectRay(const Ray& ray, RayCallback& intersectCallback, float& maxDist) const
+ {
+ MDLCallback<RayCallback> temp_cb(intersectCallback, m_objects.getCArray());
+ m_tree.intersectRay(ray, temp_cb, maxDist, true);
+ }
+
+ template<typename IsectCallback>
+ void intersectPoint(const Vector3& point, IsectCallback& intersectCallback) const
+ {
+ MDLCallback<IsectCallback> callback(intersectCallback, m_objects.getCArray());
+ m_tree.intersectPoint(point, callback);
+ }
+};
+
+#endif // _BIH_WRAP
diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt
index e2e182626c7..9fc696ab19a 100644
--- a/src/server/collision/CMakeLists.txt
+++ b/src/server/collision/CMakeLists.txt
@@ -39,9 +39,36 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/shared/Database
${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference
${CMAKE_SOURCE_DIR}/src/server/shared/Logging
${CMAKE_SOURCE_DIR}/src/server/shared/Threading
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
+ ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/game/Addons
${CMAKE_SOURCE_DIR}/src/server/game/Conditions
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/GameObject
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Creature
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object/Updates
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Unit
+ ${CMAKE_SOURCE_DIR}/src/server/game/Combat
+ ${CMAKE_SOURCE_DIR}/src/server/game/Loot
+ ${CMAKE_SOURCE_DIR}/src/server/game/Miscellaneous
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Cells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/game/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Spline
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
+ ${CMAKE_SOURCE_DIR}/src/server/game/World
+ ${CMAKE_SOURCE_DIR}/src/server/game/Spells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/Management
${CMAKE_CURRENT_SOURCE_DIR}/Maps
diff --git a/src/server/collision/DynamicTree.cpp b/src/server/collision/DynamicTree.cpp
new file mode 100644
index 00000000000..ebb46614a20
--- /dev/null
+++ b/src/server/collision/DynamicTree.cpp
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "DynamicTree.h"
+//#include "QuadTree.h"
+//#include "RegularGrid.h"
+#include "BoundingIntervalHierarchyWrapper.h"
+
+#include "Log.h"
+#include "RegularGrid.h"
+#include "Timer.h"
+#include "GameObjectModel.h"
+#include "ModelInstance.h"
+
+using VMAP::ModelInstance;
+using G3D::Ray;
+
+template<> struct HashTrait< GameObjectModel>{
+ static size_t hashCode(const GameObjectModel& g) { return (size_t)(void*)&g; }
+};
+
+template<> struct PositionTrait< GameObjectModel> {
+ static void getPosition(const GameObjectModel& g, Vector3& p) { p = g.getPosition(); }
+};
+
+template<> struct BoundsTrait< GameObjectModel> {
+ static void getBounds(const GameObjectModel& g, G3D::AABox& out) { out = g.getBounds();}
+ static void getBounds2(const GameObjectModel* g, G3D::AABox& out) { out = g->getBounds();}
+};
+
+/*
+static bool operator == (const GameObjectModel& mdl, const GameObjectModel& mdl2){
+ return &mdl == &mdl2;
+}
+*/
+
+int valuesPerNode = 5, numMeanSplits = 3;
+
+int UNBALANCED_TIMES_LIMIT = 5;
+int CHECK_TREE_PERIOD = 200;
+
+typedef RegularGrid2D<GameObjectModel, BIHWrap<GameObjectModel> > ParentTree;
+
+struct DynTreeImpl : public ParentTree/*, public Intersectable*/
+{
+ typedef GameObjectModel Model;
+ typedef ParentTree base;
+
+ DynTreeImpl() :
+ rebalance_timer(CHECK_TREE_PERIOD),
+ unbalanced_times(0)
+ {
+ }
+
+ void insert(const Model& mdl)
+ {
+ base::insert(mdl);
+ ++unbalanced_times;
+ }
+
+ void remove(const Model& mdl)
+ {
+ base::remove(mdl);
+ ++unbalanced_times;
+ }
+
+ void balance()
+ {
+ base::balance();
+ unbalanced_times = 0;
+ }
+
+ void update(uint32 difftime)
+ {
+ if (!size())
+ return;
+
+ rebalance_timer.Update(difftime);
+ if (rebalance_timer.Passed())
+ {
+ rebalance_timer.Reset(CHECK_TREE_PERIOD);
+ if (unbalanced_times > 0)
+ balance();
+ }
+ }
+
+ TimeTrackerSmall rebalance_timer;
+ int unbalanced_times;
+};
+
+DynamicMapTree::DynamicMapTree() : impl(*new DynTreeImpl())
+{
+}
+
+DynamicMapTree::~DynamicMapTree()
+{
+ delete &impl;
+}
+
+void DynamicMapTree::insert(const GameObjectModel& mdl)
+{
+ impl.insert(mdl);
+}
+
+void DynamicMapTree::remove(const GameObjectModel& mdl)
+{
+ impl.remove(mdl);
+}
+
+bool DynamicMapTree::contains(const GameObjectModel& mdl) const
+{
+ return impl.contains(mdl);
+}
+
+void DynamicMapTree::balance()
+{
+ impl.balance();
+}
+
+int DynamicMapTree::size() const
+{
+ return impl.size();
+}
+
+void DynamicMapTree::update(uint32 t_diff)
+{
+ impl.update(t_diff);
+}
+
+struct DynamicTreeIntersectionCallback
+{
+ bool did_hit;
+ uint32 phase_mask;
+ DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) {}
+ bool operator()(const Ray& r, const GameObjectModel& obj, float& distance)
+ {
+ did_hit = obj.intersectRay(r, distance, true, phase_mask);
+ return did_hit;
+ }
+ bool didHit() const { return did_hit;}
+};
+
+struct DynamicTreeIntersectionCallback_WithLogger
+{
+ bool did_hit;
+ uint32 phase_mask;
+ DynamicTreeIntersectionCallback_WithLogger(uint32 phasemask) : did_hit(false), phase_mask(phasemask)
+ {
+ sLog->outDebug(LOG_FILTER_MAPS, "Dynamic Intersection log");
+ }
+ bool operator()(const Ray& r, const GameObjectModel& obj, float& distance)
+ {
+ sLog->outDebug(LOG_FILTER_MAPS, "testing intersection with %s", obj.name.c_str());
+ bool hit = obj.intersectRay(r, distance, true, phase_mask);
+ if (hit)
+ {
+ did_hit = true;
+ sLog->outDebug(LOG_FILTER_MAPS, "result: intersects");
+ }
+ return hit;
+ }
+ bool didHit() const { return did_hit;}
+};
+
+bool DynamicMapTree::getIntersectionTime(const uint32 phasemask, const G3D::Ray& ray, const Vector3& endPos, float& maxDist) const
+{
+ float distance = maxDist;
+ DynamicTreeIntersectionCallback callback(phasemask);
+ impl.intersectRay(ray, callback, distance, endPos);
+ if (callback.didHit())
+ maxDist = distance;
+ return callback.didHit();
+}
+
+bool DynamicMapTree::getObjectHitPos(const uint32 phasemask, const Vector3& startPos, const Vector3& endPos, Vector3& resultHit, float modifyDist) const
+{
+ bool result = false;
+ float maxDist = (endPos - startPos).magnitude();
+ // valid map coords should *never ever* produce float overflow, but this would produce NaNs too
+ ASSERT(maxDist < std::numeric_limits<float>::max());
+ // prevent NaN values which can cause BIH intersection to enter infinite loop
+ if (maxDist < 1e-10f)
+ {
+ resultHit = endPos;
+ return false;
+ }
+ Vector3 dir = (endPos - startPos)/maxDist; // direction with length of 1
+ G3D::Ray ray(startPos, dir);
+ float dist = maxDist;
+ if (getIntersectionTime(phasemask, ray, endPos, dist))
+ {
+ resultHit = startPos + dir * dist;
+ if (modifyDist < 0)
+ {
+ if ((resultHit - startPos).magnitude() > -modifyDist)
+ resultHit = resultHit + dir*modifyDist;
+ else
+ resultHit = startPos;
+ }
+ else
+ resultHit = resultHit + dir*modifyDist;
+
+ result = true;
+ }
+ else
+ {
+ resultHit = endPos;
+ result = false;
+ }
+ return result;
+}
+
+bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const
+{
+ Vector3 v1(x1,y1,z1), v2(x2,y2,z2);
+
+ float maxDist = (v2 - v1).magnitude();
+
+ if (!G3D::fuzzyGt(maxDist, 0) )
+ return true;
+
+ Ray r(v1, (v2-v1) / maxDist);
+ DynamicTreeIntersectionCallback callback(phasemask);
+ impl.intersectRay(r, callback, maxDist, v2);
+
+ return !callback.did_hit;
+}
+
+float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const
+{
+ Vector3 v(x,y,z);
+ Ray r(v, Vector3(0,0,-1));
+ DynamicTreeIntersectionCallback callback(phasemask);
+ impl.intersectZAllignedRay(r, callback, maxSearchDist);
+
+ if (callback.didHit())
+ return v.z - maxSearchDist;
+ else
+ return -G3D::inf();
+}
diff --git a/src/server/collision/DynamicTree.h b/src/server/collision/DynamicTree.h
new file mode 100644
index 00000000000..079c0adbf5e
--- /dev/null
+++ b/src/server/collision/DynamicTree.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _DYNTREE_H
+#define _DYNTREE_H
+
+#include <G3D/Matrix3.h>
+#include <G3D/Vector3.h>
+#include <G3D/AABox.h>
+#include <G3D/Ray.h>
+
+//#include "ModelInstance.h"
+#include "Define.h"
+//#include "GameObjectModel.h"
+
+namespace G3D
+{
+ class Vector3;
+}
+
+using G3D::Vector3;
+class GameObjectModel;
+
+class DynamicMapTree
+{
+ struct DynTreeImpl& impl;
+public:
+
+ DynamicMapTree();
+ ~DynamicMapTree();
+
+ bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const;
+ bool getIntersectionTime(uint32 phasemask, const G3D::Ray& ray, const Vector3& endPos, float& maxDist) const;
+ bool getObjectHitPos(uint32 phasemask, const Vector3& pPos1, const Vector3& pPos2, Vector3& pResultHitPos, float pModifyDist) const;
+ float getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const;
+
+ void insert(const GameObjectModel&);
+ void remove(const GameObjectModel&);
+ bool contains(const GameObjectModel&) const;
+ int size() const;
+
+ void balance();
+ void update(uint32 diff);
+};
+
+#endif // _DYNTREE_H
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 62abc31831a..81b97f5f352 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -245,7 +245,7 @@ namespace VMAP
return false;
}
- WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename)
+ WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags/* Only used when creating the model */)
{
//! Critical section, thread safe access to iLoadedModelFiles
TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
@@ -261,6 +261,7 @@ namespace VMAP
return NULL;
}
sLog->outDebug(LOG_FILTER_MAPS, "VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str());
+ worldmodel->Flags = flags;
model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first;
model->second.setModel(worldmodel);
}
diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h
index 1fba108388a..4b66a2e9fc7 100755
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
@@ -103,7 +103,7 @@ namespace VMAP
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const;
- WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
+ WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags = 0);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index fda0535e8a7..f94f9bbf52b 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -127,7 +127,7 @@ namespace VMAP
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
iMapID(mapID), iTreeValues(0), iBasePath(basePath)
{
- if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' || iBasePath[iBasePath.length()-1] != '\\'))
+ if (iBasePath.length() > 0 && iBasePath[iBasePath.length()-1] != '/' && iBasePath[iBasePath.length()-1] != '\\')
{
iBasePath.push_back('/');
}
@@ -241,7 +241,7 @@ namespace VMAP
bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
{
std::string basePath = vmapPath;
- if (basePath.length() > 0 && (basePath[basePath.length()-1] != '/' || basePath[basePath.length()-1] != '\\'))
+ if (basePath.length() > 0 && basePath[basePath.length()-1] != '/' && basePath[basePath.length()-1] != '\\')
basePath.push_back('/');
std::string fullname = basePath + VMapManager2::getMapFileName(mapID);
bool success = true;
@@ -309,7 +309,7 @@ namespace VMAP
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
- WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
+ WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str());
if (model)
{
@@ -380,7 +380,7 @@ namespace VMAP
if (result)
{
// acquire model instance
- WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
+ WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
if (!model)
sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp
index 355ef6b1944..68ea3ec80cd 100644
--- a/src/server/collision/Maps/TileAssembler.cpp
+++ b/src/server/collision/Maps/TileAssembler.cpp
@@ -16,7 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "WorldModel.h"
#include "TileAssembler.h"
#include "MapTree.h"
#include "BoundingIntervalHierarchy.h"
@@ -71,7 +70,6 @@ namespace VMAP
bool TileAssembler::convertWorld2()
{
- std::set<std::string> spawnedModelFiles;
bool success = readMapSpawns();
if (!success)
return false;
@@ -178,6 +176,8 @@ namespace VMAP
// break; //test, extract only first map; TODO: remvoe this line
}
+ // add an object models, listed in temp_gameobject_models file
+ exportGameobjectModels();
// export objects
std::cout << "\nConverting Model Files" << std::endl;
for (std::set<std::string>::iterator mfile = spawnedModelFiles.begin(); mfile != spawnedModelFiles.end(); ++mfile)
@@ -251,99 +251,40 @@ namespace VMAP
modelPosition.iScale = spawn.iScale;
modelPosition.init();
- FILE* rf = fopen(modelFilename.c_str(), "rb");
- if (!rf)
- {
- printf("ERROR: Can't open model file: %s\n", modelFilename.c_str());
+ WorldModel_Raw raw_model;
+ if (!raw_model.Read(modelFilename.c_str()))
return false;
- }
+
+ uint32 groups = raw_model.groupsArray.size();
+ if (groups != 1)
+ printf("Warning: '%s' does not seem to be a M2 model!\n", modelFilename.c_str());
AABox modelBound;
bool boundEmpty=true;
- char ident[8];
-
- int readOperation = 1;
-
- // temporary use defines to simplify read/check code (close file and return at fail)
- #define READ_OR_RETURN(V, S) if (fread((V), (S), 1, rf) != 1) { \
- fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); }readOperation++;
- // only use this for array deletes
- #define READ_OR_RETURN_WITH_DELETE(V, S) if (fread((V), (S), 1, rf) != 1) { \
- fclose(rf); printf("readfail, op = %i\n", readOperation); delete[] V; return(false); }readOperation++;
-
- #define CMP_OR_RETURN(V, S) if (strcmp((V), (S)) != 0) { \
- fclose(rf); printf("cmpfail, %s!=%s\n", V, S);return(false); }
-
- READ_OR_RETURN(&ident, 8);
- CMP_OR_RETURN(ident, "VMAP003");
-
- // we have to read one int. This is needed during the export and we have to skip it here
- uint32 tempNVectors;
- READ_OR_RETURN(&tempNVectors, sizeof(tempNVectors));
-
- uint32 groups, wmoRootId;
- char blockId[5];
- blockId[4] = 0;
- int blocksize;
- float *vectorarray = 0;
-
- READ_OR_RETURN(&groups, sizeof(uint32));
- READ_OR_RETURN(&wmoRootId, sizeof(uint32));
- if (groups != 1) printf("Warning: '%s' does not seem to be a M2 model!\n", modelFilename.c_str());
for (uint32 g=0; g<groups; ++g) // should be only one for M2 files...
{
- fseek(rf, 3*sizeof(uint32) + 6*sizeof(float), SEEK_CUR);
-
- READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "GRP ");
- READ_OR_RETURN(&blocksize, sizeof(int));
- fseek(rf, blocksize, SEEK_CUR);
-
- // ---- indexes
- READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "INDX");
- READ_OR_RETURN(&blocksize, sizeof(int));
- fseek(rf, blocksize, SEEK_CUR);
-
- // ---- vectors
- READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "VERT");
- READ_OR_RETURN(&blocksize, sizeof(int));
- uint32 nvectors;
- READ_OR_RETURN(&nvectors, sizeof(uint32));
+ std::vector<Vector3>& vertices = raw_model.groupsArray[g].vertexArray;
- if (nvectors >0)
- {
- vectorarray = new float[nvectors*3];
- READ_OR_RETURN_WITH_DELETE(vectorarray, nvectors*sizeof(float)*3);
- }
- else
+ if (vertices.empty())
{
std::cout << "error: model '" << spawn.name << "' has no geometry!" << std::endl;
- fclose(rf);
- return false;
+ continue;
}
- for (uint32 i=0, indexNo=0; indexNo<nvectors; indexNo++, i+=3)
+ uint32 nvectors = vertices.size();
+ for (uint32 i = 0; i < nvectors; ++i)
{
- Vector3 v = Vector3(vectorarray[i+0], vectorarray[i+1], vectorarray[i+2]);
- v = modelPosition.transform(v);
+ Vector3 v = modelPosition.transform(vertices[i]);
if (boundEmpty)
modelBound = AABox(v, v), boundEmpty=false;
else
modelBound.merge(v);
}
- delete[] vectorarray;
- // drop of temporary use defines
- #undef READ_OR_RETURN
- #undef READ_OR_RETURN_WITH_DELETE
- #undef CMP_OR_RETURN
}
spawn.iBound = modelBound + spawn.iPos;
spawn.flags |= MOD_HAS_BOUND;
- fclose(rf);
return true;
}
@@ -363,150 +304,220 @@ namespace VMAP
if (filename.length() >0)
filename.push_back('/');
filename.append(pModelFilename);
- FILE* rf = fopen(filename.c_str(), "rb");
- if (!rf)
- {
- printf("ERROR: Can't open model file in form: %s", pModelFilename.c_str());
- printf("... or form: %s", filename.c_str() );
+ WorldModel_Raw raw_model;
+ if (!raw_model.Read(filename.c_str()))
return false;
+
+ // write WorldModel
+ WorldModel model;
+ model.setRootWmoID(raw_model.RootWMOID);
+ if (raw_model.groupsArray.size())
+ {
+ std::vector<GroupModel> groupsArray;
+
+ uint32 groups = raw_model.groupsArray.size();
+ for (uint32 g = 0; g < groups; ++g)
+ {
+ GroupModel_Raw& raw_group = raw_model.groupsArray[g];
+ groupsArray.push_back(GroupModel(raw_group.mogpflags, raw_group.GroupWMOID, raw_group.bounds ));
+ groupsArray.back().setMeshData(raw_group.vertexArray, raw_group.triangles);
+ groupsArray.back().setLiquidData(raw_group.liquid);
+ }
+
+ model.setGroupModels(groupsArray);
}
- char ident[8];
+ success = model.writeFile(iDestDir + "/" + pModelFilename + ".vmo");
+ //std::cout << "readRawFile2: '" << pModelFilename << "' tris: " << nElements << " nodes: " << nNodes << std::endl;
+ return success;
+ }
+
+ void TileAssembler::exportGameobjectModels()
+ {
+ FILE* model_list = fopen((iSrcDir + "/" + GAMEOBJECT_MODELS).c_str(), "rb");
+ FILE* model_list_copy = fopen((iDestDir + "/" + GAMEOBJECT_MODELS).c_str(), "wb");
+ if (!model_list || !model_list_copy)
+ return;
+
+ uint32 name_length, displayId;
+ char buff[500];
+ while (!feof(model_list))
+ {
+ if (fread(&displayId, sizeof(uint32), 1, model_list) != 1
+ || fread(&name_length, sizeof(uint32), 1, model_list) != 1
+ || name_length >= sizeof(buff)
+ || fread(&buff, sizeof(char), name_length, model_list) != name_length)
+ {
+ std::cout << "\nFile 'temp_gameobject_models' seems to be corrupted" << std::endl;
+ break;
+ }
+
+ std::string model_name(buff, name_length);
- int readOperation = 1;
+ WorldModel_Raw raw_model;
+ if ( !raw_model.Read((iSrcDir + "/" + model_name).c_str()) )
+ continue;
+
+ spawnedModelFiles.insert(model_name);
+ AABox bounds;
+ bool boundEmpty = true;
+ for (uint32 g = 0; g < raw_model.groupsArray.size(); ++g)
+ {
+ std::vector<Vector3>& vertices = raw_model.groupsArray[g].vertexArray;
+
+ uint32 nvectors = vertices.size();
+ for (uint32 i = 0; i < nvectors; ++i)
+ {
+ Vector3& v = vertices[i];
+ if (boundEmpty)
+ bounds = AABox(v, v), boundEmpty = false;
+ else
+ bounds.merge(v);
+ }
+ }
+
+ fwrite(&displayId,sizeof(uint32),1,model_list_copy);
+ fwrite(&name_length,sizeof(uint32),1,model_list_copy);
+ fwrite(&buff,sizeof(char),name_length,model_list_copy);
+ fwrite(&bounds.low(),sizeof(Vector3),1,model_list_copy);
+ fwrite(&bounds.high(),sizeof(Vector3),1,model_list_copy);
+ }
+ fclose(model_list);
+ fclose(model_list_copy);
+ }
// temporary use defines to simplify read/check code (close file and return at fail)
#define READ_OR_RETURN(V, S) if (fread((V), (S), 1, rf) != 1) { \
- fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); }readOperation++;
+ fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); }
#define READ_OR_RETURN_WITH_DELETE(V, S) if (fread((V), (S), 1, rf) != 1) { \
- fclose(rf); printf("readfail, op = %i\n", readOperation); delete[] V; return(false); }readOperation++;
+ fclose(rf); printf("readfail, op = %i\n", readOperation); delete[] V; return(false); };
#define CMP_OR_RETURN(V, S) if (strcmp((V), (S)) != 0) { \
fclose(rf); printf("cmpfail, %s!=%s\n", V, S);return(false); }
- READ_OR_RETURN(&ident, 8);
- CMP_OR_RETURN(ident, "VMAP003");
-
- // we have to read one int. This is needed during the export and we have to skip it here
- uint32 tempNVectors;
- READ_OR_RETURN(&tempNVectors, sizeof(tempNVectors));
-
- uint32 groups;
- uint32 RootWMOID;
+ bool GroupModel_Raw::Read(FILE* rf)
+ {
char blockId[5];
blockId[4] = 0;
int blocksize;
+ int readOperation = 0;
- READ_OR_RETURN(&groups, sizeof(uint32));
- READ_OR_RETURN(&RootWMOID, sizeof(uint32));
+ READ_OR_RETURN(&mogpflags, sizeof(uint32));
+ READ_OR_RETURN(&GroupWMOID, sizeof(uint32));
- std::vector<GroupModel> groupsArray;
- for (uint32 g=0; g<groups; ++g)
- {
- std::vector<MeshTriangle> triangles;
- std::vector<Vector3> vertexArray;
+ Vector3 vec1, vec2;
+ READ_OR_RETURN(&vec1, sizeof(Vector3));
- uint32 mogpflags, GroupWMOID;
- READ_OR_RETURN(&mogpflags, sizeof(uint32));
- READ_OR_RETURN(&GroupWMOID, sizeof(uint32));
+ READ_OR_RETURN(&vec2, sizeof(Vector3));
+ bounds.set(vec1, vec2);
- float bbox1[3], bbox2[3];
- READ_OR_RETURN(bbox1, sizeof(float)*3);
- READ_OR_RETURN(bbox2, sizeof(float)*3);
+ READ_OR_RETURN(&liquidflags, sizeof(uint32));
- uint32 liquidflags;
- READ_OR_RETURN(&liquidflags, sizeof(uint32));
+ // will this ever be used? what is it good for anyway??
+ uint32 branches;
+ READ_OR_RETURN(&blockId, 4);
+ CMP_OR_RETURN(blockId, "GRP ");
+ READ_OR_RETURN(&blocksize, sizeof(int));
+ READ_OR_RETURN(&branches, sizeof(uint32));
+ for (uint32 b=0; b<branches; ++b)
+ {
+ uint32 indexes;
+ // indexes for each branch (not used jet)
+ READ_OR_RETURN(&indexes, sizeof(uint32));
+ }
- // will this ever be used? what is it good for anyway??
- uint32 branches;
- READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "GRP ");
- READ_OR_RETURN(&blocksize, sizeof(int));
- READ_OR_RETURN(&branches, sizeof(uint32));
- for (uint32 b=0; b<branches; ++b)
- {
- uint32 indexes;
- // indexes for each branch (not used jet)
- READ_OR_RETURN(&indexes, sizeof(uint32));
- }
+ // ---- indexes
+ READ_OR_RETURN(&blockId, 4);
+ CMP_OR_RETURN(blockId, "INDX");
+ READ_OR_RETURN(&blocksize, sizeof(int));
+ uint32 nindexes;
+ READ_OR_RETURN(&nindexes, sizeof(uint32));
+ if (nindexes >0)
+ {
+ uint16 *indexarray = new uint16[nindexes];
+ READ_OR_RETURN_WITH_DELETE(indexarray, nindexes*sizeof(uint16));
+ triangles.reserve(nindexes / 3);
+ for (uint32 i=0; i<nindexes; i+=3)
+ triangles.push_back(MeshTriangle(indexarray[i], indexarray[i+1], indexarray[i+2]));
- // ---- indexes
- READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "INDX");
- READ_OR_RETURN(&blocksize, sizeof(int));
- uint32 nindexes;
- READ_OR_RETURN(&nindexes, sizeof(uint32));
- if (nindexes >0)
- {
- uint16 *indexarray = new uint16[nindexes];
- READ_OR_RETURN_WITH_DELETE(indexarray, nindexes*sizeof(uint16));
- for (uint32 i=0; i<nindexes; i+=3)
- {
- triangles.push_back(MeshTriangle(indexarray[i], indexarray[i+1], indexarray[i+2]));
- }
- delete[] indexarray;
- }
+ delete[] indexarray;
+ }
- // ---- vectors
+ // ---- vectors
+ READ_OR_RETURN(&blockId, 4);
+ CMP_OR_RETURN(blockId, "VERT");
+ READ_OR_RETURN(&blocksize, sizeof(int));
+ uint32 nvectors;
+ READ_OR_RETURN(&nvectors, sizeof(uint32));
+
+ if (nvectors >0)
+ {
+ float *vectorarray = new float[nvectors*3];
+ READ_OR_RETURN_WITH_DELETE(vectorarray, nvectors*sizeof(float)*3);
+ for (uint32 i=0; i<nvectors; ++i)
+ vertexArray.push_back( Vector3(vectorarray + 3*i) );
+
+ delete[] vectorarray;
+ }
+ // ----- liquid
+ liquid = 0;
+ if (liquidflags& 1)
+ {
+ WMOLiquidHeader hlq;
READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "VERT");
+ CMP_OR_RETURN(blockId, "LIQU");
READ_OR_RETURN(&blocksize, sizeof(int));
- uint32 nvectors;
- READ_OR_RETURN(&nvectors, sizeof(uint32));
+ READ_OR_RETURN(&hlq, sizeof(WMOLiquidHeader));
+ liquid = new WmoLiquid(hlq.xtiles, hlq.ytiles, Vector3(hlq.pos_x, hlq.pos_y, hlq.pos_z), hlq.type);
+ uint32 size = hlq.xverts*hlq.yverts;
+ READ_OR_RETURN(liquid->GetHeightStorage(), size*sizeof(float));
+ size = hlq.xtiles*hlq.ytiles;
+ READ_OR_RETURN(liquid->GetFlagsStorage(), size);
+ }
- if (nvectors >0)
- {
- float *vectorarray = new float[nvectors*3];
- READ_OR_RETURN_WITH_DELETE(vectorarray, nvectors*sizeof(float)*3);
- for (uint32 i=0; i<nvectors; ++i)
- {
- vertexArray.push_back( Vector3(vectorarray + 3*i) );
- }
- delete[] vectorarray;
- }
- // ----- liquid
- WmoLiquid* liquid = 0;
- if (liquidflags& 1)
- {
- WMOLiquidHeader hlq;
- READ_OR_RETURN(&blockId, 4);
- CMP_OR_RETURN(blockId, "LIQU");
- READ_OR_RETURN(&blocksize, sizeof(int));
- READ_OR_RETURN(&hlq, sizeof(WMOLiquidHeader));
- liquid = new WmoLiquid(hlq.xtiles, hlq.ytiles, Vector3(hlq.pos_x, hlq.pos_y, hlq.pos_z), hlq.type);
- uint32 size = hlq.xverts*hlq.yverts;
- READ_OR_RETURN(liquid->GetHeightStorage(), size*sizeof(float));
- size = hlq.xtiles*hlq.ytiles;
- READ_OR_RETURN(liquid->GetFlagsStorage(), size);
- }
+ return true;
+ }
- groupsArray.push_back(GroupModel(mogpflags, GroupWMOID, AABox(Vector3(bbox1), Vector3(bbox2))));
- groupsArray.back().setMeshData(vertexArray, triangles);
- groupsArray.back().setLiquidData(liquid);
- // drop of temporary use defines
- #undef READ_OR_RETURN
- #undef READ_OR_RETURN_WITH_DELETE
- #undef CMP_OR_RETURN
+ GroupModel_Raw::~GroupModel_Raw()
+ {
+ delete liquid;
+ }
+ bool WorldModel_Raw::Read(const char * path)
+ {
+ FILE* rf = fopen(path, "rb");
+ if (!rf)
+ {
+ printf("ERROR: Can't open raw model file: %s\n", path);
+ return false;
}
- fclose(rf);
- // write WorldModel
- WorldModel model;
- model.setRootWmoID(RootWMOID);
- if (!groupsArray.empty())
- {
- model.setGroupModels(groupsArray);
+ char ident[8];
+ int readOperation = 0;
- std::string worldModelFileName(iDestDir);
- worldModelFileName.push_back('/');
- worldModelFileName.append(pModelFilename).append(".vmo");
- success = model.writeFile(worldModelFileName);
- }
+ READ_OR_RETURN(&ident, 8);
+ CMP_OR_RETURN(ident, RAW_VMAP_MAGIC);
- //std::cout << "readRawFile2: '" << pModelFilename << "' tris: " << nElements << " nodes: " << nNodes << std::endl;
- return success;
+ // we have to read one int. This is needed during the export and we have to skip it here
+ uint32 tempNVectors;
+ READ_OR_RETURN(&tempNVectors, sizeof(tempNVectors));
+
+ uint32 groups;
+ READ_OR_RETURN(&groups, sizeof(uint32));
+ READ_OR_RETURN(&RootWMOID, sizeof(uint32));
+
+ groupsArray.resize(groups);
+ bool succeed = true;
+ for (uint32 g = 0; g < groups && succeed; ++g)
+ succeed = groupsArray[g].Read(rf);
+
+ fclose(rf);
+ return succeed;
}
+
+ // drop of temporary use defines
+ #undef READ_OR_RETURN
+ #undef CMP_OR_RETURN
}
diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h
index 6128a0d2a53..554940a4663 100755
--- a/src/server/collision/Maps/TileAssembler.h
+++ b/src/server/collision/Maps/TileAssembler.h
@@ -22,8 +22,10 @@
#include <G3D/Vector3.h>
#include <G3D/Matrix3.h>
#include <map>
+#include <set>
#include "ModelInstance.h"
+#include "WorldModel.h"
namespace VMAP
{
@@ -61,6 +63,31 @@ namespace VMAP
typedef std::map<uint32, MapSpawns*> MapData;
//===============================================
+ struct GroupModel_Raw
+ {
+ uint32 mogpflags;
+ uint32 GroupWMOID;
+
+ G3D::AABox bounds;
+ uint32 liquidflags;
+ std::vector<MeshTriangle> triangles;
+ std::vector<G3D::Vector3> vertexArray;
+ class WmoLiquid *liquid;
+
+ GroupModel_Raw() : liquid(0) {}
+ ~GroupModel_Raw();
+
+ bool Read(FILE * f);
+ };
+
+ struct WorldModel_Raw
+ {
+ uint32 RootWMOID;
+ std::vector<GroupModel_Raw> groupsArray;
+
+ bool Read(const char * path);
+ };
+
class TileAssembler
{
private:
@@ -70,6 +97,7 @@ namespace VMAP
G3D::Table<std::string, unsigned int > iUniqueNameIds;
unsigned int iCurrentUniqueNameId;
MapData mapData;
+ std::set<std::string> spawnedModelFiles;
public:
TileAssembler(const std::string& pSrcDirName, const std::string& pDestDirName);
@@ -78,6 +106,7 @@ namespace VMAP
bool convertWorld2();
bool readMapSpawns();
bool calculateTransformedBound(ModelSpawn &spawn);
+ void exportGameobjectModels();
bool convertRawFile(const std::string& pModelFilename);
void setModelNameFilterMethod(bool (*pFilterMethod)(char *pName)) { iFilterMethod = pFilterMethod; }
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp
new file mode 100644
index 00000000000..1abbc59a5b0
--- /dev/null
+++ b/src/server/collision/Models/GameObjectModel.cpp
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "VMapFactory.h"
+#include "VMapManager2.h"
+#include "VMapDefinitions.h"
+#include "WorldModel.h"
+
+#include "GameObjectModel.h"
+#include "Log.h"
+#include "GameObject.h"
+#include "Creature.h"
+#include "TemporarySummon.h"
+#include "Object.h"
+#include "DBCStores.h"
+
+using G3D::Vector3;
+using G3D::Ray;
+using G3D::AABox;
+
+struct GameobjectModelData
+{
+ GameobjectModelData(const std::string& name_, const AABox& box) :
+ bound(box), name(name_) {}
+
+ AABox bound;
+ std::string name;
+};
+
+typedef UNORDERED_MAP<uint32, GameobjectModelData> ModelList;
+ModelList model_list;
+
+void LoadGameObjectModelList()
+{
+ FILE* model_list_file = fopen((sWorld->GetDataPath() + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb");
+ if (!model_list_file)
+ return;
+
+ uint32 name_length, displayId;
+ char buff[500];
+ while (!feof(model_list_file))
+ {
+ Vector3 v1, v2;
+ if (fread(&displayId, sizeof(uint32), 1, model_list_file) != 1
+ || fread(&name_length, sizeof(uint32), 1, model_list_file) != 1
+ || name_length >= sizeof(buff)
+ || fread(&buff, sizeof(char), name_length, model_list_file) != name_length
+ || fread(&v1, sizeof(Vector3), 1, model_list_file) != 1
+ || fread(&v2, sizeof(Vector3), 1, model_list_file) != 1)
+ {
+ printf("\nFile '%s' seems to be corrupted", VMAP::GAMEOBJECT_MODELS);
+ break;
+ }
+
+ model_list.insert
+ (
+ ModelList::value_type( displayId, GameobjectModelData(std::string(buff,name_length),AABox(v1,v2)) )
+ );
+ }
+ fclose(model_list_file);
+}
+
+GameObjectModel::~GameObjectModel()
+{
+ if (iModel)
+ ((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->releaseModelInstance(name);
+}
+
+bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info)
+{
+ ModelList::const_iterator it = model_list.find(info.Displayid);
+ if (it == model_list.end())
+ return false;
+
+ G3D::AABox mdl_box(it->second.bound);
+ // ignore models with no bounds
+ if (mdl_box == G3D::AABox::zero())
+ {
+ std::cout << "Model " << it->second.name << " has zero bounds, loading skipped" << std::endl;
+ return false;
+ }
+
+ iModel = ((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->acquireModelInstance(sWorld->GetDataPath() + "vmaps/", it->second.name);
+
+ if (!iModel)
+ return false;
+
+ name = it->second.name;
+ //flags = VMAP::MOD_M2;
+ //adtId = 0;
+ //ID = 0;
+ iPos = Vector3(go.GetPositionX(), go.GetPositionY(), go.GetPositionZ());
+ phasemask = go.GetPhaseMask();
+ iScale = go.GetFloatValue(OBJECT_FIELD_SCALE_X);
+ iInvScale = 1.f / iScale;
+
+ G3D::Matrix3 iRotation = G3D::Matrix3::fromEulerAnglesZYX(go.GetOrientation(), 0, 0);
+ iInvRot = iRotation.inverse();
+ // transform bounding box:
+ mdl_box = AABox(mdl_box.low() * iScale, mdl_box.high() * iScale);
+ AABox rotated_bounds;
+ for (int i = 0; i < 8; ++i)
+ rotated_bounds.merge(iRotation * mdl_box.corner(i));
+
+ this->iBound = rotated_bounds + iPos;
+#ifdef SPAWN_CORNERS
+ // test:
+ for (int i = 0; i < 8; ++i)
+ {
+ Vector3 pos(iBound.corner(i));
+ if (Creature* c = const_cast<GameObject&>(go).SummonCreature(24440, pos.x, pos.y, pos.z, 0, TEMPSUMMON_MANUAL_DESPAWN))
+ {
+ c->setFaction(35);
+ c->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.1f);
+ }
+ }
+#endif
+
+ return true;
+}
+
+GameObjectModel* GameObjectModel::Create(const GameObject& go)
+{
+ const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetGOInfo()->displayId);
+ if (!info)
+ return NULL;
+
+ GameObjectModel* mdl = new GameObjectModel();
+ if (!mdl->initialize(go, *info))
+ {
+ delete mdl;
+ return NULL;
+ }
+
+ return mdl;
+}
+
+bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const
+{
+ if (!(phasemask & ph_mask))
+ return false;
+
+ float time = ray.intersectionTime(iBound);
+ if (time == G3D::inf())
+ return false;
+
+ // child bounds are defined in object space:
+ Vector3 p = iInvRot * (ray.origin() - iPos) * iInvScale;
+ Ray modRay(p, iInvRot * ray.direction());
+ float distance = MaxDist * iInvScale;
+ bool hit = iModel->IntersectRay(modRay, distance, StopAtFirstHit);
+ if(hit)
+ {
+ distance *= iScale;
+ MaxDist = distance;
+ }
+ return hit;
+}
diff --git a/src/server/collision/Models/GameObjectModel.h b/src/server/collision/Models/GameObjectModel.h
new file mode 100644
index 00000000000..0bb6c0f47bc
--- /dev/null
+++ b/src/server/collision/Models/GameObjectModel.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _GAMEOBJECT_MODEL_H
+#define _GAMEOBJECT_MODEL_H
+
+#include <G3D/Matrix3.h>
+#include <G3D/Vector3.h>
+#include <G3D/AABox.h>
+#include <G3D/Ray.h>
+
+#include "Define.h"
+
+namespace VMAP
+{
+ class WorldModel;
+}
+
+class GameObject;
+struct GameObjectDisplayInfoEntry;
+
+class GameObjectModel /*, public Intersectable*/
+{
+ uint32 phasemask;
+ G3D::AABox iBound;
+ G3D::Matrix3 iInvRot;
+ G3D::Vector3 iPos;
+ //G3D::Vector3 iRot;
+ float iInvScale;
+ float iScale;
+ VMAP::WorldModel* iModel;
+
+ GameObjectModel() : phasemask(0), iModel(NULL) {}
+ bool initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info);
+
+public:
+ std::string name;
+
+ const G3D::AABox& getBounds() const { return iBound; }
+
+ ~GameObjectModel();
+
+ const G3D::Vector3& getPosition() const { return iPos;}
+
+ /** Enables\disables collision. */
+ void disable() { phasemask = 0;}
+ void enable(uint32 ph_mask) { phasemask = ph_mask;}
+
+ bool intersectRay(const G3D::Ray& Ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const;
+
+ static GameObjectModel* Create(const GameObject& go);
+};
+
+#endif // _GAMEOBJECT_MODEL_H \ No newline at end of file
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index a7de37d41e6..cda34510058 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -17,6 +17,7 @@
*/
#include "WorldModel.h"
+#include "ModelInstance.h"
#include "VMapDefinitions.h"
#include "MapTree.h"
@@ -420,6 +421,9 @@ namespace VMAP
bool WorldModel::IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const
{
+ // M2 models are not taken into account for LoS calculation
+ if (Flags & MOD_M2)
+ return false;
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.size() == 1)
diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h
index 52ecf498700..dbaccb58573 100755
--- a/src/server/collision/Models/WorldModel.h
+++ b/src/server/collision/Models/WorldModel.h
@@ -80,7 +80,7 @@ namespace VMAP
//! pass mesh data to object and create BIH. Passed vectors get get swapped with old geometry!
void setMeshData(std::vector<Vector3> &vert, std::vector<MeshTriangle> &tri);
- void setLiquidData(WmoLiquid* liquid) { iLiquid = liquid; }
+ void setLiquidData(WmoLiquid*& liquid) { iLiquid = liquid; liquid = NULL; }
bool IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const;
bool IsInsideObject(const Vector3 &pos, const Vector3 &down, float &z_dist) const;
bool GetLiquidLevel(const Vector3 &pos, float &liqHeight) const;
@@ -113,6 +113,7 @@ namespace VMAP
bool GetLocationInfo(const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, LocationInfo &info) const;
bool writeFile(const std::string &filename);
bool readFile(const std::string &filename);
+ uint32 Flags;
protected:
uint32 RootWMOID;
std::vector<GroupModel> groupModels;
diff --git a/src/server/collision/RegularGrid.h b/src/server/collision/RegularGrid.h
new file mode 100644
index 00000000000..2867b29cfc1
--- /dev/null
+++ b/src/server/collision/RegularGrid.h
@@ -0,0 +1,218 @@
+#ifndef _REGULAR_GRID_H
+#define _REGULAR_GRID_H
+
+
+#include <G3D/Ray.h>
+#include <G3D/AABox.h>
+#include <G3D/Table.h>
+#include <G3D/BoundsTrait.h>
+#include <G3D/PositionTrait.h>
+
+#include "Errors.h"
+
+using G3D::Vector2;
+using G3D::Vector3;
+using G3D::AABox;
+using G3D::Ray;
+
+template<class Node>
+struct NodeCreator{
+ static Node * makeNode(int /*x*/, int /*y*/) { return new Node();}
+};
+
+template<class T,
+class Node,
+class NodeCreatorFunc = NodeCreator<Node>,
+ /*class BoundsFunc = BoundsTrait<T>,*/
+class PositionFunc = PositionTrait<T>
+>
+class RegularGrid2D
+{
+public:
+
+ enum{
+ CELL_NUMBER = 64,
+ };
+
+ #define HGRID_MAP_SIZE (533.33333f * 64.f) // shouldn't be changed
+ #define CELL_SIZE float(HGRID_MAP_SIZE/(float)CELL_NUMBER)
+
+ typedef G3D::Table<const T*, Node*> MemberTable;
+
+ MemberTable memberTable;
+ Node* nodes[CELL_NUMBER][CELL_NUMBER];
+
+ RegularGrid2D(){
+ memset(nodes, 0, sizeof(nodes));
+ }
+
+ ~RegularGrid2D(){
+ for (int x = 0; x < CELL_NUMBER; ++x)
+ for (int y = 0; y < CELL_NUMBER; ++y)
+ delete nodes[x][y];
+ }
+
+ void insert(const T& value)
+ {
+ Vector3 pos;
+ PositionFunc::getPosition(value, pos);
+ Node& node = getGridFor(pos.x, pos.y);
+ node.insert(value);
+ memberTable.set(&value, &node);
+ }
+
+ void remove(const T& value)
+ {
+ memberTable[&value]->remove(value);
+ // Remove the member
+ memberTable.remove(&value);
+ }
+
+ void balance()
+ {
+ for (int x = 0; x < CELL_NUMBER; ++x)
+ for (int y = 0; y < CELL_NUMBER; ++y)
+ if (Node* n = nodes[x][y])
+ n->balance();
+ }
+
+ bool contains(const T& value) const { return memberTable.containsKey(&value); }
+ int size() const { return memberTable.size(); }
+
+ struct Cell
+ {
+ int x, y;
+ bool operator == (const Cell& c2) const { return x == c2.x && y == c2.y;}
+
+ static Cell ComputeCell(float fx, float fy)
+ {
+ Cell c = {fx * (1.f/CELL_SIZE) + (CELL_NUMBER/2), fy * (1.f/CELL_SIZE) + (CELL_NUMBER/2)};
+ return c;
+ }
+
+ bool isValid() const { return x >= 0 && x < CELL_NUMBER && y >= 0 && y < CELL_NUMBER;}
+ };
+
+
+ Node& getGridFor(float fx, float fy)
+ {
+ Cell c = Cell::ComputeCell(fx, fy);
+ return getGrid(c.x, c.y);
+ }
+
+ Node& getGrid(int x, int y)
+ {
+ ASSERT(x < CELL_NUMBER && y < CELL_NUMBER);
+ if (!nodes[x][y])
+ nodes[x][y] = NodeCreatorFunc::makeNode(x,y);
+ return *nodes[x][y];
+ }
+
+ template<typename RayCallback>
+ void intersectRay(const Ray& ray, RayCallback& intersectCallback, float max_dist)
+ {
+ intersectRay(ray, intersectCallback, max_dist, ray.origin() + ray.direction() * max_dist);
+ }
+
+ template<typename RayCallback>
+ void intersectRay(const Ray& ray, RayCallback& intersectCallback, float& max_dist, const Vector3& end)
+ {
+ Cell cell = Cell::ComputeCell(ray.origin().x, ray.origin().y);
+ if (!cell.isValid())
+ return;
+
+ Cell last_cell = Cell::ComputeCell(end.x, end.y);
+
+ if (cell == last_cell)
+ {
+ if (Node* node = nodes[cell.x][cell.y])
+ node->intersectRay(ray, intersectCallback, max_dist);
+ return;
+ }
+
+ float voxel = (float)CELL_SIZE;
+ float kx_inv = ray.invDirection().x, bx = ray.origin().x;
+ float ky_inv = ray.invDirection().y, by = ray.origin().y;
+
+ int stepX, stepY;
+ float tMaxX, tMaxY;
+ if (kx_inv >= 0)
+ {
+ stepX = 1;
+ float x_border = (cell.x+1) * voxel;
+ tMaxX = (x_border - bx) * kx_inv;
+ }
+ else
+ {
+ stepX = -1;
+ float x_border = (cell.x-1) * voxel;
+ tMaxX = (x_border - bx) * kx_inv;
+ }
+
+ if (ky_inv >= 0)
+ {
+ stepY = 1;
+ float y_border = (cell.y+1) * voxel;
+ tMaxY = (y_border - by) * ky_inv;
+ }
+ else
+ {
+ stepY = -1;
+ float y_border = (cell.y-1) * voxel;
+ tMaxY = (y_border - by) * ky_inv;
+ }
+
+ //int Cycles = std::max((int)ceilf(max_dist/tMaxX),(int)ceilf(max_dist/tMaxY));
+ //int i = 0;
+
+ float tDeltaX = voxel * fabs(kx_inv);
+ float tDeltaY = voxel * fabs(ky_inv);
+ do
+ {
+ if (Node* node = nodes[cell.x][cell.y])
+ {
+ //float enterdist = max_dist;
+ node->intersectRay(ray, intersectCallback, max_dist);
+ }
+ if (cell == last_cell)
+ break;
+ if(tMaxX < tMaxY)
+ {
+ tMaxX += tDeltaX;
+ cell.x += stepX;
+ }
+ else
+ {
+ tMaxY += tDeltaY;
+ cell.y += stepY;
+ }
+ //++i;
+ } while (cell.isValid());
+ }
+
+ template<typename IsectCallback>
+ void intersectPoint(const Vector3& point, IsectCallback& intersectCallback)
+ {
+ Cell cell = Cell::ComputeCell(point.x, point.y);
+ if (!cell.isValid())
+ return;
+ if (Node* node = nodes[cell.x][cell.y])
+ node->intersectPoint(point, intersectCallback);
+ }
+
+ // Optimized verson of intersectRay function for rays with vertical directions
+ template<typename RayCallback>
+ void intersectZAllignedRay(const Ray& ray, RayCallback& intersectCallback, float& max_dist)
+ {
+ Cell cell = Cell::ComputeCell(ray.origin().x, ray.origin().y);
+ if (!cell.isValid())
+ return;
+ if (Node* node = nodes[cell.x][cell.y])
+ node->intersectRay(ray, intersectCallback, max_dist);
+ }
+};
+
+#undef CELL_SIZE
+#undef HGRID_MAP_SIZE
+
+#endif
diff --git a/src/server/collision/VMapDefinitions.h b/src/server/collision/VMapDefinitions.h
index f7d6f0ddaa1..72a62807b4c 100644
--- a/src/server/collision/VMapDefinitions.h
+++ b/src/server/collision/VMapDefinitions.h
@@ -24,7 +24,9 @@
namespace VMAP
{
- const char VMAP_MAGIC[] = "VMAP_3.0";
+ const char VMAP_MAGIC[] = "VMAP_4.0";
+ const char RAW_VMAP_MAGIC[] = "VMAP004"; // used in extracted vmap files with raw data
+ const char GAMEOBJECT_MODELS[] = "temp_gameobject_models";
// defined in TileAssembler.cpp currently...
bool readChunk(FILE* rf, char *dest, const char *compare, uint32 len);
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index e178efc7eee..86f2c6a28b7 100755
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -158,6 +158,12 @@ void CasterAI::UpdateAI(const uint32 diff)
events.Update(diff);
+ if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me))
+ {
+ me->InterruptNonMeleeSpells(false);
+ return;
+ }
+
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
@@ -320,7 +326,7 @@ void VehicleAI::CheckConditions(const uint32 diff)
{
if (Player* player = passenger->ToPlayer())
{
- if (!sConditionMgr->IsPlayerMeetToConditions(player, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(player, me, conditions))
{
player->ExitVehicle();
return;//check other pessanger in next tick
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 83a89a966c5..30ebd06745f 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -42,7 +42,6 @@ PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK)
{
m_AllySet.clear();
UpdateAllies();
- targetHasCC = false;
}
void PetAI::EnterEvadeMode()
@@ -55,9 +54,6 @@ bool PetAI::_needToStop()
if (me->isCharmed() && me->getVictim() == me->GetCharmer())
return true;
- if (_CheckTargetCC(me->getVictim()) && !targetHasCC)
- return true;
-
return !me->IsValidAttackTarget(me->getVictim());
}
@@ -95,13 +91,19 @@ void PetAI::UpdateAI(const uint32 diff)
// me->getVictim() can't be used for check in case stop fighting, me->getVictim() clear at Unit death etc.
if (me->getVictim())
{
+ // is only necessary to stop casting, the pet must not exit combat
+ if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me))
+ {
+ me->InterruptNonMeleeSpells(false);
+ return;
+ }
+
if (_needToStop())
{
sLog->outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
_stopAttack();
return;
}
- targetHasCC = _CheckTargetCC(me->getVictim());
DoMeleeAttackIfReady();
}
@@ -293,8 +295,6 @@ void PetAI::AttackStart(Unit* target)
if (!CanAttack(target))
return;
- targetHasCC = _CheckTargetCC(target);
-
if (Unit* owner = me->GetOwner())
owner->SetInCombatWith(target);
@@ -310,22 +310,21 @@ Unit* PetAI::SelectNextTarget()
return NULL;
Unit* target = me->getAttackerForHelper();
- targetHasCC = false;
// Check pet's attackers first to prevent dragging mobs back to owner
- if (target && !_CheckTargetCC(target))
+ if (target && !target->HasBreakableByDamageCrowdControlAura())
return target;
if (me->GetCharmerOrOwner())
{
// Check owner's attackers if pet didn't have any
target = me->GetCharmerOrOwner()->getAttackerForHelper();
- if (target && !_CheckTargetCC(target))
+ if (target && !target->HasBreakableByDamageCrowdControlAura())
return target;
// 3.0.2 - Pets now start attacking their owners target in defensive mode as soon as the hunter does
target = me->GetCharmerOrOwner()->getVictim();
- if (target && !_CheckTargetCC(target))
+ if (target && !target->HasBreakableByDamageCrowdControlAura())
return target;
}
@@ -467,11 +466,3 @@ bool PetAI::CanAttack(Unit* target)
// default, though we shouldn't ever get here
return false;
}
-
-bool PetAI::_CheckTargetCC(Unit* target)
-{
- if (me->GetCharmerOrOwnerGUID() && target->HasNegativeAuraWithAttribute(SPELL_ATTR0_BREAKABLE_BY_DAMAGE, me->GetCharmerOrOwnerGUID()))
- return true;
-
- return false;
-}
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index 847b4140285..730ab12a3ca 100755
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -50,7 +50,6 @@ class PetAI : public CreatureAI
TimeTracker i_tracker;
bool inCombat;
- bool targetHasCC;
std::set<uint64> m_AllySet;
uint32 m_updateAlliesTimer;
@@ -58,7 +57,6 @@ class PetAI : public CreatureAI
void HandleReturnMovement();
void DoAttack(Unit* target, bool chase);
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 ce46d51f579..bc1903257b7 100755
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -1334,11 +1334,12 @@ void CreatureEventAI::ReceiveEmote(Player* player, uint32 textEmote)
return;
Condition cond;
- cond.mConditionType = ConditionType((*itr).Event.receive_emote.condition);
- cond.mConditionValue1 = (*itr).Event.receive_emote.conditionValue1;
- cond.mConditionValue2 = (*itr).Event.receive_emote.conditionValue2;
+ cond.ConditionType = ConditionTypes((*itr).Event.receive_emote.condition);
+ cond.ConditionValue1 = (*itr).Event.receive_emote.conditionValue1;
+ cond.ConditionValue2 = (*itr).Event.receive_emote.conditionValue2;
- if (cond.Meets(player))
+ ConditionSourceInfo srcInfo = ConditionSourceInfo(player);
+ if (cond.Meets(srcInfo))
{
sLog->outDebug(LOG_FILTER_DATABASE_AI, "CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing");
ProcessEvent(*itr, player);
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index 8f2cf6b471f..add7b4db174 100755
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
@@ -359,9 +359,9 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
if (temp.receive_emote.condition)
{
Condition cond;
- cond.mConditionType = ConditionType(temp.receive_emote.condition);
- cond.mConditionValue1 = temp.receive_emote.conditionValue1;
- cond.mConditionValue2 = temp.receive_emote.conditionValue2;
+ cond.ConditionType = ConditionTypes(temp.receive_emote.condition);
+ cond.ConditionValue1 = temp.receive_emote.conditionValue1;
+ cond.ConditionValue2 = temp.receive_emote.conditionValue2;
if (!sConditionMgr->isConditionTypeValid(&cond))
{
sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition);
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index d4b2a9746be..7838e6891fe 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -68,6 +68,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
mFollowCredit = 0;
mFollowArrivedEntry = 0;
mFollowCreditType = 0;
+ mInvinceabilityHpLevel = 0;
}
void SmartAI::UpdateDespawn(const uint32 diff)
@@ -449,7 +450,7 @@ void SmartAI::EnterEvadeMode()
return;
RemoveAuras();
-
+
me->DeleteThreatList();
me->CombatStop(true);
me->LoadCreaturesAddon();
@@ -479,15 +480,15 @@ void SmartAI::MoveInLineOfSight(Unit* who)
{
if (!who)
return;
-
+
GetScript()->OnMoveInLineOfSight(who);
-
+
if (me->HasReactState(REACT_PASSIVE) || AssistPlayerInCombat(who))
return;
if (!CanAIAttack(who))
return;
-
+
if (!me->canStartAttack(who, false))
return;
@@ -637,6 +638,8 @@ void SmartAI::SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
void SmartAI::DamageTaken(Unit* doneBy, uint32& damage)
{
GetScript()->ProcessEventsFor(SMART_EVENT_DAMAGED, doneBy, damage);
+ if ((me->GetHealth() - damage) <= mInvinceabilityHpLevel)
+ damage -= mInvinceabilityHpLevel;
}
void SmartAI::HealReceived(Unit* doneBy, uint32& addhealth)
@@ -824,7 +827,7 @@ void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker)
GetScript()->mLastInvoker = invoker->GetGUID();
GetScript()->SetScript9(e, entry);
}
-
+
void SmartAI::sOnGameEvent(bool start, uint16 eventId)
{
GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, NULL, eventId);
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 0576612a155..e82b35ec87a 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -175,6 +175,8 @@ class SmartAI : public CreatureAI
void SetSwim(bool swim = true);
+ void SetInvinceabilityHpLevel(uint32 level) { mInvinceabilityHpLevel = level; }
+
void sGossipHello(Player* player);
void sGossipSelect(Player* player, uint32 sender, uint32 action);
void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code);
@@ -193,7 +195,7 @@ class SmartAI : public CreatureAI
mDespawnState = t ? 1 : 0;
}
void StartDespawn() { mDespawnState = 2; }
-
+
void RemoveAuras();
private:
@@ -222,6 +224,7 @@ class SmartAI : public CreatureAI
bool mCanAutoAttack;
bool mCanCombatMove;
bool mForcedPaused;
+ uint32 mInvinceabilityHpLevel;
bool AssistPlayerInCombat(Unit* who);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 04b1fa2b2e7..67d26ea06dd 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -39,7 +39,6 @@ SmartScript::SmartScript()
go = NULL;
me = NULL;
mEventPhase = 0;
- mInvinceabilityHpLevel = 0;
mPathId = 0;
mTargetStorage = new ObjectListMap();
mStoredEvents.clear();
@@ -86,15 +85,10 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
if (eventType == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/)
{
bool meets = true;
- if (unit)
- {
- if (Player* player = unit->ToPlayer())
- {
- ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type);
- meets = sConditionMgr->IsPlayerMeetToConditions(player, conds);
- }
- }
-
+ ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type);
+ ConditionSourceInfo info = ConditionSourceInfo(unit, GetBaseObject());
+ meets = sConditionMgr->IsObjectMeetToConditions(info, conds);
+
if (meets)
ProcessEvent(*i, unit, var0, var1, bvar, spell, gob);
}
@@ -485,7 +479,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)
me->InterruptNonMeleeSpells(false);
- me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
+ if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
+ me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
+ else
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u",
me->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
}
@@ -511,7 +508,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)
tempLastInvoker->InterruptNonMeleeSpells(false);
- tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
+ if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
+ tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
+ else
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
+
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
}
@@ -992,10 +993,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!me)
break;
+ SmartAI* ai = CAST_AI(SmartAI, me->AI());
+
+ if (!ai)
+ break;
+
if (e.action.invincHP.percent)
- mInvinceabilityHpLevel = me->CountPctFromMaxHealth(e.action.invincHP.percent);
+ ai->SetInvinceabilityHpLevel(me->CountPctFromMaxHealth(e.action.invincHP.percent));
else
- mInvinceabilityHpLevel = e.action.invincHP.minHP;
+ ai->SetInvinceabilityHpLevel(e.action.invincHP.minHP);
break;
}
case SMART_ACTION_SET_DATA:
@@ -1564,8 +1570,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
(*itr)->ToUnit()->InterruptNonMeleeSpells(false);
for (ObjectList::const_iterator it = targets->begin(); it != targets->end(); ++it)
+ {
if (IsUnit(*it))
- (*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
+ {
+ if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*it)->ToUnit()->HasAura(e.action.cast.spell))
+ (*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
+ else
+ sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId()));
+ }
+ }
}
}
@@ -2779,6 +2792,19 @@ void SmartScript::InstallEvents()
}
}
+bool SmartScript::ConditionValid(Unit* u, int32 c, int32 v1, int32 v2, int32 v3)
+{
+ if (c == 0) return true;
+ if (!u || !u->ToPlayer()) return false;
+ Condition cond;
+ cond.ConditionType = ConditionTypes(uint32(c));
+ cond.ConditionValue1 = uint32(v1);
+ cond.ConditionValue1 = uint32(v2);
+ cond.ConditionValue1 = uint32(v3);
+ ConditionSourceInfo srcInfo = ConditionSourceInfo(u->ToPlayer());
+ return cond.Meets(srcInfo);
+}
+
void SmartScript::OnUpdate(uint32 const diff)
{
if ((mScriptType == SMART_SCRIPT_TYPE_CREATURE || mScriptType == SMART_SCRIPT_TYPE_GAMEOBJECT) && !GetBaseObject())
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index f55d91ed52f..f7524582ab7 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -84,17 +84,7 @@ class SmartScript
return obj && obj->GetTypeId() == TYPEID_GAMEOBJECT;
}
- bool ConditionValid(Unit* u, int32 c, int32 v1, int32 v2, int32 v3)
- {
- if (c == 0) return true;
- if (!u || !u->ToPlayer()) return false;
- Condition cond;
- cond.mConditionType = ConditionType(uint32(c));
- cond.mConditionValue1 = uint32(v1);
- cond.mConditionValue1 = uint32(v2);
- cond.mConditionValue1 = uint32(v3);
- return cond.Meets(u->ToPlayer());
- }
+ bool ConditionValid(Unit* u, int32 c, int32 v1, int32 v2, int32 v3);
void OnUpdate(const uint32 diff);
void OnMoveInLineOfSight(Unit* who);
@@ -236,7 +226,6 @@ class SmartScript
SmartScriptType mScriptType;
uint32 mEventPhase;
- uint32 mInvinceabilityHpLevel;
UNORDERED_MAP<int32, int32> mStoredDecimals;
uint32 mPathId;
SmartAIEventList mStoredEvents;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 9a23d9e1390..f99e317454c 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -260,7 +260,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
}
case SMART_TARGET_GAMEOBJECT_GUID:
{
- if (e.target.goGUID.entry && !IsGameObjectValid(e, e.target.goGUID.entry))
+ if (e.target.goGUID.entry && !IsGameObjectValid(e, e.target.goGUID.entry))
return false;
break;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 123275ccc55..7869a2e665f 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -155,7 +155,7 @@ enum SMART_EVENT
SMART_EVENT_IS_BEHIND_TARGET = 67, //1 // cooldownMin, CooldownMax
SMART_EVENT_GAME_EVENT_START = 68, //1 // game_event.Entry
SMART_EVENT_GAME_EVENT_END = 69, //1 // game_event.Entry
- SMART_EVENT_GO_STATE_CHANGED = 70, // go state
+ SMART_EVENT_GO_STATE_CHANGED = 70, // go state
SMART_EVENT_END = 71,
};
@@ -342,16 +342,16 @@ struct SmartEvent
uint32 cooldownMax;
} behindTarget;
- struct
+ struct
{
uint32 gameEventId;
} gameEvent;
-
+
struct
{
uint32 state;
} goStateChanged;
-
+
struct
{
uint32 param1;
@@ -873,7 +873,7 @@ struct SmartAction
{
uint32 goRespawnTime;
} RespawnTarget;
-
+
struct
{
uint32 gossipMenuId;
@@ -884,12 +884,12 @@ struct SmartAction
{
uint32 state;
} setGoLootState;
-
+
struct
{
uint32 id;
} sendTargetToTarget;
-
+
struct
{
uint32 param1;
@@ -1181,7 +1181,7 @@ enum SmartCastFlags
//CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
//CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
//CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
- //CAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
+ SMARTCAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
};
// one line in DB is one event
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 79366f90395..d07a19c486a 100755
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -1080,10 +1080,9 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
// speedup for non-login case
if (miscValue1 && achievementCriteria->own_item.itemID != miscValue1)
continue;
- SetCriteriaProgress(achievementCriteria, GetPlayer()->GetItemCount(achievementCriteria->own_item.itemID, true));
+ SetCriteriaProgress(achievementCriteria, miscValue2, PROGRESS_ACCUMULATE);
break;
case ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA:
- // miscvalue1 contains the personal rating
if (!miscValue1) // no update at login
continue;
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 4a725fada58..4f95413c49a 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -650,35 +650,35 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
{
- Item* pItem = sAuctionMgr->GetAItem(item_guidlow);
- if (!pItem)
+ Item* item = sAuctionMgr->GetAItem(item_guidlow);
+ if (!item)
{
- sLog->outError("auction to item, that doesn't exist !!!!");
+ sLog->outError("AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow);
return false;
}
data << uint32(Id);
- data << uint32(pItem->GetEntry());
+ data << uint32(item->GetEntry());
for (uint8 i = 0; i < PROP_ENCHANTMENT_SLOT_2; ++i) // PROP_ENCHANTMENT_SLOT_2 = 9
{
- data << uint32(pItem->GetEnchantmentId(EnchantmentSlot(i)));
- data << uint32(pItem->GetEnchantmentDuration(EnchantmentSlot(i)));
- data << uint32(pItem->GetEnchantmentCharges(EnchantmentSlot(i)));
+ data << uint32(item->GetEnchantmentId(EnchantmentSlot(i)));
+ data << uint32(item->GetEnchantmentDuration(EnchantmentSlot(i)));
+ data << uint32(item->GetEnchantmentCharges(EnchantmentSlot(i)));
}
- data << int32(pItem->GetItemRandomPropertyId()); // random item property id
- data << uint32(pItem->GetItemSuffixFactor()); // SuffixFactor
- data << uint32(pItem->GetCount()); // item->count
- data << uint32(pItem->GetSpellCharges()); // item->charge FFFFFFF
- data << uint32(0); // Unknown
- data << uint64(owner); // Auction->owner
- data << uint64(startbid); // Auction->startbid (not sure if useful)
+ data << int32(pItem->GetItemRandomPropertyId()); // random item property id
+ data << uint32(pItem->GetItemSuffixFactor()); // SuffixFactor
+ data << uint32(pItem->GetCount()); // item->count
+ data << uint32(pItem->GetSpellCharges()); // item->charge FFFFFFF
+ data << uint32(0); // Unknown
+ data << uint64(owner); // Auction->owner
+ data << uint64(startbid); // Auction->startbid (not sure if useful)
data << uint64(bid ? GetAuctionOutBid() : 0);
//minimal outbid
- data << uint64(buyout); // auction->buyout
- data << uint32((expire_time-time(NULL))*IN_MILLISECONDS); // time left
- data << uint64(bidder); // auction->bidder current
- data << uint64(bid); // current bid
+ data << uint64(buyout); // auction->buyout
+ data << uint32((expire_time - time(NULL)) * IN_MILLISECONDS); // time left
+ data << uint64(bidder); // auction->bidder current
+ data << uint64(bid); // current bid
return true;
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index f81393be761..190fbcc5107 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -30,6 +30,7 @@ class Player;
class WorldPacket;
#define MIN_AUCTION_TIME (12*HOUR)
+#define MAX_AUCTION_ITEMS 160
enum AuctionError
{
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 8e30743f107..02707261d13 100755
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -455,7 +455,7 @@ void ArenaTeam::Inspect(WorldSession* session, uint64 guid)
session->SendPacket(&data);
}
-void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slot)
+void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 type)
{
if (int32(PersonalRating) + mod < 0)
PersonalRating = 0;
@@ -464,8 +464,8 @@ void ArenaTeamMember::ModifyPersonalRating(Player* player, int32 mod, uint32 slo
if (player)
{
- player->SetArenaTeamInfoField(slot, ARENA_TEAM_PERSONAL_RATING, PersonalRating);
- player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, slot);
+ player->SetArenaTeamInfoField(ArenaTeam::GetSlotByType(type), ARENA_TEAM_PERSONAL_RATING, PersonalRating);
+ player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, PersonalRating, type);
}
}
@@ -725,7 +725,7 @@ void ArenaTeam::MemberLost(Player* player, uint32 againstMatchmakerRating, int32
{
// Update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
- itr->ModifyPersonalRating(player, mod, GetSlot());
+ itr->ModifyPersonalRating(player, mod, GetType());
// Update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
@@ -751,7 +751,7 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstMatchmakerRating, i
{
// update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, false);
- itr->ModifyPersonalRating(NULL, mod, GetSlot());
+ itr->ModifyPersonalRating(NULL, mod, GetType());
// update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
@@ -773,7 +773,7 @@ void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32
{
// update personal rating
int32 mod = GetRatingMod(itr->PersonalRating, againstMatchmakerRating, true);
- itr->ModifyPersonalRating(player, mod, GetSlot());
+ itr->ModifyPersonalRating(player, mod, GetType());
// update matchmaker rating
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
index 03ddea1dd3a..d8ad2c09e59 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* player, int32 mod, uint32 slot);
+ void ModifyPersonalRating(Player* player, int32 mod, uint32 type);
void ModifyMatchmakerRating(int32 mod, uint32 slot);
};
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 159a986367c..191d2eaaeb6 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -194,26 +194,26 @@ Battleground::Battleground()
m_HonorMode = BG_NORMAL;
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_2M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_2M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set to some default existing values
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
}
Battleground::~Battleground()
{
// remove objects and creatures
// (this is done automatically in mapmanager update, when the instance is reset after the reset time)
- uint32 size = uint32(m_BgCreatures.size());
+ uint32 size = uint32(BgCreatures.size());
for (uint32 i = 0; i < size; ++i)
DelCreature(i);
- size = uint32(m_BgObjects.size());
+ size = uint32(BgObjects.size());
for (uint32 i = 0; i < size; ++i)
DelObject(i);
@@ -229,7 +229,7 @@ Battleground::~Battleground()
// remove from bg free slot queue
RemoveFromBGFreeSlotQueue();
- for (BattlegroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
+ for (BattlegroundScoreMap::const_iterator itr = PlayerScores.begin(); itr != PlayerScores.end(); ++itr)
delete itr->second;
}
@@ -452,21 +452,21 @@ inline void Battleground::_ProcessJoin(uint32 diff)
}
StartingEventCloseDoors();
- SetStartDelayTime(m_StartDelayTimes[BG_STARTING_EVENT_FIRST]);
+ SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FIRST]);
// First start warning - 2 or 1 minute
- SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
+ SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// After 1 minute or 30 seconds, warning is signalled
- else if (GetStartDelayTime() <= m_StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2))
+ else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2))
{
m_Events |= BG_STARTING_EVENT_2;
- SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL);
+ SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// After 30 or 15 seconds, warning is signalled
- else if (GetStartDelayTime() <= m_StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3))
+ else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3))
{
m_Events |= BG_STARTING_EVENT_3;
- SendMessageToAll(m_StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL);
+ SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// Delay expired (atfer 2 or 1 minute)
else if (GetStartDelayTime() <= 0 && !(m_Events & BG_STARTING_EVENT_4))
@@ -475,9 +475,9 @@ inline void Battleground::_ProcessJoin(uint32 diff)
StartingEventOpenDoors();
- SendWarningToAll(m_StartMessageIds[BG_STARTING_EVENT_FOURTH]);
+ SendWarningToAll(StartMessageIds[BG_STARTING_EVENT_FOURTH]);
SetStatus(STATUS_IN_PROGRESS);
- SetStartDelayTime(m_StartDelayTimes[BG_STARTING_EVENT_FOURTH]);
+ SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FOURTH]);
// Remove preparation
if (isArena())
@@ -824,7 +824,7 @@ void Battleground::EndBattleground(uint32 winner)
// update achievement BEFORE personal rating update
ArenaTeamMember* member = winner_arena_team->GetMember(player->GetGUID());
if (member)
- player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, member->PersonalRating);
+ player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, 1);
winner_arena_team->MemberWon(player, loser_matchmaker_rating, winner_matchmaker_change);
}
@@ -922,11 +922,11 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
participant = true;
}
- BattlegroundScoreMap::iterator itr2 = m_PlayerScores.find(guid);
- if (itr2 != m_PlayerScores.end())
+ BattlegroundScoreMap::iterator itr2 = PlayerScores.find(guid);
+ if (itr2 != PlayerScores.end())
{
delete itr2->second; // delete player's score
- m_PlayerScores.erase(itr2);
+ PlayerScores.erase(itr2);
}
RemovePlayerFromResurrectQueue(guid);
@@ -1060,9 +1060,9 @@ void Battleground::Reset()
m_Players.clear();
- for (BattlegroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
+ for (BattlegroundScoreMap::const_iterator itr = PlayerScores.begin(); itr != PlayerScores.end(); ++itr)
delete itr->second;
- m_PlayerScores.clear();
+ PlayerScores.clear();
ResetBGSubclass();
}
@@ -1334,8 +1334,8 @@ bool Battleground::HasFreeSlots() const
void Battleground::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
//this procedure is called from virtual function implemented in bg subclass
- BattlegroundScoreMap::const_iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ BattlegroundScoreMap::const_iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found...
return;
switch (type)
@@ -1404,8 +1404,8 @@ void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid)
bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 /*respawnTime*/)
{
- // If the assert is called, means that m_BgObjects must be resized!
- ASSERT(type < m_BgObjects.size());
+ // If the assert is called, means that BgObjects must be resized!
+ ASSERT(type < BgObjects.size());
Map* map = FindBgMap();
if (!map)
@@ -1452,7 +1452,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
delete go;
return false;
}
- m_BgObjects[type] = go->GetGUID();
+ BgObjects[type] = go->GetGUID();
return true;
}
@@ -1460,7 +1460,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
// It would be nice to correctly implement GO_ACTIVATED state and open/close doors in gameobject code
void Battleground::DoorClose(uint32 type)
{
- if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
+ if (GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]))
{
// If doors are open, close it
if (obj->getLootState() == GO_ACTIVATED && obj->GetGoState() != GO_STATE_READY)
@@ -1472,12 +1472,12 @@ void Battleground::DoorClose(uint32 type)
}
else
sLog->outError("Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(m_BgObjects[type]), m_MapId, m_InstanceID);
+ type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
}
void Battleground::DoorOpen(uint32 type)
{
- if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
+ if (GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]))
{
// Change state to be sure they will be opened
obj->SetLootState(GO_READY);
@@ -1485,31 +1485,31 @@ void Battleground::DoorOpen(uint32 type)
}
else
sLog->outError("Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(m_BgObjects[type]), m_MapId, m_InstanceID);
+ type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
}
GameObject* Battleground::GetBGObject(uint32 type)
{
- GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]);
+ GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]);
if (!obj)
sLog->outError("Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(m_BgObjects[type]), m_MapId, m_InstanceID);
+ type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
return obj;
}
Creature* Battleground::GetBGCreature(uint32 type)
{
- Creature* creature = GetBgMap()->GetCreature(m_BgCreatures[type]);
+ Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]);
if (!creature)
sLog->outError("Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(m_BgCreatures[type]), m_MapId, m_InstanceID);
+ type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
return creature;
}
void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
{
if (Map* map = FindBgMap())
- if (GameObject* obj = map->GetGameObject(m_BgObjects[type]))
+ if (GameObject* obj = map->GetGameObject(BgObjects[type]))
{
if (respawntime)
obj->SetLootState(GO_JUST_DEACTIVATED);
@@ -1524,8 +1524,8 @@ void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime)
{
- // If the assert is called, means that m_BgCreatures must be resized!
- ASSERT(type < m_BgCreatures.size());
+ // If the assert is called, means that BgCreatures must be resized!
+ ASSERT(type < BgCreatures.size());
Map* map = FindBgMap();
if (!map)
@@ -1560,7 +1560,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
return NULL;
}
- m_BgCreatures[type] = creature->GetGUID();
+ BgCreatures[type] = creature->GetGUID();
if (respawntime)
creature->SetRespawnDelay(respawntime);
@@ -1570,37 +1570,37 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
bool Battleground::DelCreature(uint32 type)
{
- if (!m_BgCreatures[type])
+ if (!BgCreatures[type])
return true;
- if (Creature* creature = GetBgMap()->GetCreature(m_BgCreatures[type]))
+ if (Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]))
{
creature->AddObjectToRemoveList();
- m_BgCreatures[type] = 0;
+ BgCreatures[type] = 0;
return true;
}
sLog->outError("Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(m_BgCreatures[type]), m_MapId, m_InstanceID);
- m_BgCreatures[type] = 0;
+ type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
+ BgCreatures[type] = 0;
return false;
}
bool Battleground::DelObject(uint32 type)
{
- if (!m_BgObjects[type])
+ if (!BgObjects[type])
return true;
- if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]))
+ if (GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]))
{
obj->SetRespawnTime(0); // not save respawn time
obj->Delete();
- m_BgObjects[type] = 0;
+ BgObjects[type] = 0;
return true;
}
sLog->outError("Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(m_BgObjects[type]), m_MapId, m_InstanceID);
- m_BgObjects[type] = 0;
+ type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
+ BgObjects[type] = 0;
return false;
}
@@ -1718,8 +1718,8 @@ void Battleground::HandleTriggerBuff(uint64 go_guid)
return;
// Change buff type, when buff is used:
- int32 index = m_BgObjects.size() - 1;
- while (index >= 0 && m_BgObjects[index] != go_guid)
+ int32 index = BgObjects.size() - 1;
+ while (index >= 0 && BgObjects[index] != go_guid)
index--;
if (index < 0)
{
@@ -1840,8 +1840,8 @@ void Battleground::SetHoliday(bool is_holiday)
int32 Battleground::GetObjectType(uint64 guid)
{
- for (uint32 i = 0; i < m_BgObjects.size(); ++i)
- if (m_BgObjects[i] == guid)
+ for (uint32 i = 0; i < BgObjects.size(); ++i)
+ if (BgObjects[i] == guid)
return i;
sLog->outError("Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
GUID_LOPART(guid), m_MapId, m_InstanceID);
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 6eb64a2caba..32f6ebc92de 100755
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -411,9 +411,9 @@ class Battleground
uint32 GetPlayersSize() const { return m_Players.size(); }
typedef std::map<uint64, BattlegroundScore*> BattlegroundScoreMap;
- BattlegroundScoreMap::const_iterator GetPlayerScoresBegin() const { return m_PlayerScores.begin(); }
- BattlegroundScoreMap::const_iterator GetPlayerScoresEnd() const { return m_PlayerScores.end(); }
- uint32 GetPlayerScoresSize() const { return m_PlayerScores.size(); }
+ BattlegroundScoreMap::const_iterator GetPlayerScoresBegin() const { return PlayerScores.begin(); }
+ BattlegroundScoreMap::const_iterator GetPlayerScoresEnd() const { return PlayerScores.end(); }
+ uint32 GetPlayerScoresSize() const { return PlayerScores.size(); }
uint32 GetReviveQueueSize() const { return m_ReviveQueue.size(); }
@@ -539,8 +539,8 @@ class Battleground
// TODO: make this protected:
typedef std::vector<uint64> BGObjects;
typedef std::vector<uint64> BGCreatures;
- BGObjects m_BgObjects;
- BGCreatures m_BgCreatures;
+ BGObjects BgObjects;
+ BGCreatures BgCreatures;
void SpawnBGObject(uint32 type, uint32 respawntime);
bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
Creature* AddCreature(uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime = 0);
@@ -589,7 +589,7 @@ class Battleground
void _ProcessJoin(uint32 diff);
// Scorekeeping
- BattlegroundScoreMap m_PlayerScores; // Player scores
+ BattlegroundScoreMap PlayerScores; // Player scores
// must be implemented in BG subclass
virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) {}
@@ -600,9 +600,9 @@ class Battleground
// these are important variables used for starting messages
uint8 m_Events;
- BattlegroundStartTimeIntervals m_StartDelayTimes[BG_STARTING_EVENT_COUNT];
+ BattlegroundStartTimeIntervals StartDelayTimes[BG_STARTING_EVENT_COUNT];
// this must be filled in constructors!
- uint32 m_StartMessageIds[BG_STARTING_EVENT_COUNT];
+ uint32 StartMessageIds[BG_STARTING_EVENT_COUNT];
bool m_BuffChange;
bool m_IsRandom;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp
index 61180ae88ea..e4c1b484d4d 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp
@@ -23,15 +23,15 @@
BattlegroundAA::BattlegroundAA()
{
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set messageIds
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattlegroundAA::~BattlegroundAA()
@@ -53,7 +53,7 @@ void BattlegroundAA::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundAAScore* sc = new BattlegroundAAScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundAA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 5e529768c04..71f0ce29aec 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -28,27 +28,16 @@
#include "Player.h"
#include "Util.h"
-// these variables aren't used outside of this file, so declare them only here
-uint32 BG_AB_HonorScoreTicks[BG_HONOR_MODE_NUM] = {
- 330, // normal honor
- 200 // holiday
-};
-
-uint32 BG_AB_ReputationScoreTicks[BG_HONOR_MODE_NUM] = {
- 200, // normal honor
- 150 // holiday
-};
-
BattlegroundAB::BattlegroundAB()
{
m_BuffChange = true;
- m_BgObjects.resize(BG_AB_OBJECT_MAX);
- m_BgCreatures.resize(BG_AB_ALL_NODES_COUNT + 5);//+5 for aura triggers
+ BgObjects.resize(BG_AB_OBJECT_MAX);
+ BgCreatures.resize(BG_AB_ALL_NODES_COUNT + 5);//+5 for aura triggers
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AB_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AB_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AB_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AB_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AB_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AB_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN;
}
BattlegroundAB::~BattlegroundAB()
@@ -213,7 +202,7 @@ void BattlegroundAB::AddPlayer(Player* player)
//create score and add it to map, default values are set in the constructor
BattlegroundABScore* sc = new BattlegroundABScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundAB::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
@@ -406,7 +395,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node)
DelCreature(node+7);//NULL checks are in DelCreature! 0-6 spirit guides
// Those who are waiting to resurrect at this node are taken to the closest own node's graveyard
- std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]];
+ std::vector<uint64> ghost_list = m_ReviveQueue[BgCreatures[node]];
if (!ghost_list.empty())
{
WorldSafeLocsEntry const* ClosestGrave = NULL;
@@ -424,7 +413,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node)
}
}
- if (m_BgCreatures[node])
+ if (BgCreatures[node])
DelCreature(node);
// buff object isn't despawned
@@ -437,11 +426,11 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
return;
uint8 node = BG_AB_NODE_STABLES;
- GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[node*8+7]);
+ GameObject* obj = GetBgMap()->GetGameObject(BgObjects[node*8+7]);
while ((node < BG_AB_DYNAMIC_NODES_COUNT) && ((!obj) || (!source->IsWithinDistInMap(obj, 10))))
{
++node;
- obj = GetBgMap()->GetGameObject(m_BgObjects[node*8+BG_AB_OBJECT_AURA_CONTESTED]);
+ obj = GetBgMap()->GetGameObject(BgObjects[node*8+BG_AB_OBJECT_AURA_CONTESTED]);
}
if (node == BG_AB_DYNAMIC_NODES_COUNT)
@@ -625,7 +614,7 @@ void BattlegroundAB::Reset()
}
for (uint8 i = 0; i < BG_AB_ALL_NODES_COUNT + 5; ++i)//+5 for aura triggers
- if (m_BgCreatures[i])
+ if (BgCreatures[i])
DelCreature(i);
}
@@ -684,8 +673,8 @@ WorldSafeLocsEntry const* BattlegroundAB::GetClosestGraveYard(Player* player)
void BattlegroundAB::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ BattlegroundScoreMap::iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found...
return;
switch (type)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
index c86076f0250..50020a580b1 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h
@@ -176,10 +176,10 @@ enum BG_AB_Objectives
AB_OBJECTIVE_DEFEND_BASE = 123
};
-#define BG_AB_NotABBGWeekendHonorTicks 330
-#define BG_AB_ABBGWeekendHonorTicks 200
-#define BG_AB_NotABBGWeekendReputationTicks 200
-#define BG_AB_ABBGWeekendReputationTicks 150
+#define BG_AB_NotABBGWeekendHonorTicks 260
+#define BG_AB_ABBGWeekendHonorTicks 160
+#define BG_AB_NotABBGWeekendReputationTicks 160
+#define BG_AB_ABBGWeekendReputationTicks 120
#define AB_EVENT_START_BATTLE 9158 // Achievement: Let's Get This Done
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index f2e8c2bf0af..801b522feab 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -29,13 +29,13 @@
BattlegroundAV::BattlegroundAV()
{
- m_BgObjects.resize(BG_AV_OBJECT_MAX);
- m_BgCreatures.resize(AV_CPLACE_MAX+AV_STATICCPLACE_MAX);
+ BgObjects.resize(BG_AV_OBJECT_MAX);
+ BgCreatures.resize(AV_CPLACE_MAX+AV_STATICCPLACE_MAX);
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AV_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AV_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AV_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AV_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AV_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AV_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AV_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AV_HAS_BEGUN;
}
BattlegroundAV::~BattlegroundAV()
@@ -430,7 +430,7 @@ void BattlegroundAV::AddPlayer(Player* player)
Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
BattlegroundAVScore* sc = new BattlegroundAVScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
if (m_MaxLevel == 0)
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..
@@ -532,8 +532,8 @@ void BattlegroundAV::HandleAreaTrigger(Player* Source, uint32 Trigger)
void BattlegroundAV::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ BattlegroundScoreMap::iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found...
return;
switch (type)
@@ -585,7 +585,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
uint8 tmp = node-BG_AV_NODES_DUNBALDAR_SOUTH;
//despawn marshal
- if (m_BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
+ if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp);
else
sLog->outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
@@ -649,10 +649,10 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_av depopulating mine %i (0=north, 1=south)", mine);
if (mine == AV_SOUTH_MINE)
for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
- if (m_BgCreatures[i])
+ if (BgCreatures[i])
DelCreature(i); //TODO just set the respawntime to 999999
for (uint16 i=((mine == AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MIN:AV_CPLACE_MINE_S_1_MIN); i <= ((mine == AV_NORTH_MINE)?AV_CPLACE_MINE_N_3:AV_CPLACE_MINE_S_3); i++)
- if (m_BgCreatures[i])
+ if (BgCreatures[i])
DelCreature(i); //TODO here also
}
SendMineWorldStates(mine);
@@ -750,7 +750,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
else
creatureid = (owner == ALLIANCE)? AV_NPC_A_GRAVEDEFENSE3 : AV_NPC_H_GRAVEDEFENSE3;
//spiritguide
- if (m_BgCreatures[node])
+ if (BgCreatures[node])
DelCreature(node);
if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], owner))
sLog->outError("AV: couldn't spawn spiritguide at node %i", node);
@@ -783,10 +783,10 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node)
{
uint32 c_place = AV_CPLACE_DEFENSE_STORM_AID + (4 * node);
for (uint8 i=0; i<4; i++)
- if (m_BgCreatures[c_place+i])
+ if (BgCreatures[c_place+i])
DelCreature(c_place+i);
//spiritguide
- if (!IsTower(node) && m_BgCreatures[node])
+ if (!IsTower(node) && BgCreatures[node])
DelCreature(node);
//remove bonus honor aura trigger creature when node is lost
@@ -1029,7 +1029,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
SpawnBGObject(BG_AV_OBJECT_AURA_N_FIRSTAID_STATION+3*node, RESPAWN_IMMEDIATELY); //neutral aura spawn
SpawnBGObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+GetTeamIndexByTeamId(owner)+3*node, RESPAWN_ONE_DAY); //teeamaura despawn
// Those who are waiting to resurrect at this object are taken to the closest own object's graveyard
- std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]];
+ std::vector<uint64> ghost_list = m_ReviveQueue[BgCreatures[node]];
if (!ghost_list.empty())
{
Player* player;
@@ -1044,7 +1044,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
else
player->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, player->GetOrientation());
}
- m_ReviveQueue[m_BgCreatures[node]].clear();
+ m_ReviveQueue[BgCreatures[node]].clear();
}
}
DePopulateNode(node);
@@ -1490,7 +1490,7 @@ void BattlegroundAV::ResetBGSubclass()
m_Mine_Timer=AV_MINE_TICK_TIMER;
for (uint16 i = 0; i < AV_CPLACE_MAX+AV_STATICCPLACE_MAX; i++)
- if (m_BgCreatures[i])
+ if (BgCreatures[i])
DelCreature(i);
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
index 0e79296b6f4..c7eddbb67a9 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
@@ -26,17 +26,17 @@
BattlegroundBE::BattlegroundBE()
{
- m_BgObjects.resize(BG_BE_OBJECT_MAX);
+ BgObjects.resize(BG_BE_OBJECT_MAX);
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set messageIds
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattlegroundBE::~BattlegroundBE()
@@ -68,7 +68,7 @@ void BattlegroundBE::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundBEScore* sc = new BattlegroundBEScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
@@ -116,10 +116,10 @@ void BattlegroundBE::HandleAreaTrigger(Player* Source, uint32 Trigger)
switch (Trigger)
{
case 4538: // buff trigger?
- //buff_guid = m_BgObjects[BG_BE_OBJECT_BUFF_1];
+ //buff_guid = BgObjects[BG_BE_OBJECT_BUFF_1];
break;
case 4539: // buff trigger?
- //buff_guid = m_BgObjects[BG_BE_OBJECT_BUFF_2];
+ //buff_guid = BgObjects[BG_BE_OBJECT_BUFF_2];
break;
default:
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
@@ -164,8 +164,8 @@ bool BattlegroundBE::SetupBattleground()
void BattlegroundBE::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ BattlegroundScoreMap::iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found...
return;
//there is nothing special in this score
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 87f4ca48378..d24058cdd8a 100755..100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -26,17 +26,17 @@
BattlegroundDS::BattlegroundDS()
{
- m_BgObjects.resize(BG_DS_OBJECT_MAX);
+ BgObjects.resize(BG_DS_OBJECT_MAX);
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set messageIds
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattlegroundDS::~BattlegroundDS()
@@ -46,21 +46,34 @@ BattlegroundDS::~BattlegroundDS()
void BattlegroundDS::PostUpdateImpl(uint32 diff)
{
+ if (GetStatus() != STATUS_IN_PROGRESS)
+ return;
+
if (getWaterFallTimer() < diff)
{
- if (isWaterFallActive())
+ if (getWaterFallStatus() == BG_DS_WATERFALL_STATUS_OFF) // Add the water
{
- setWaterFallTimer(urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
- for (uint32 i = BG_DS_OBJECT_WATER_1; i <= BG_DS_OBJECT_WATER_2; ++i)
- SpawnBGObject(i, getWaterFallTimer());
- setWaterFallActive(false);
+ DoorClose(BG_DS_OBJECT_WATER_2);
+ setWaterFallTimer(BG_DS_WATERFALL_WARNING_DURATION);
+ setWaterFallStatus(BG_DS_WATERFALL_STATUS_WARNING);
}
- else
+ else if (getWaterFallStatus() == BG_DS_WATERFALL_STATUS_WARNING) // Active collision
{
+ if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[BG_DS_OBJECT_WATER_1]))
+ gob->SetGoState(GO_STATE_READY);
+
setWaterFallTimer(BG_DS_WATERFALL_DURATION);
- for (uint32 i = BG_DS_OBJECT_WATER_1; i <= BG_DS_OBJECT_WATER_2; ++i)
- SpawnBGObject(i, RESPAWN_IMMEDIATELY);
- setWaterFallActive(true);
+ setWaterFallStatus(BG_DS_WATERFALL_STATUS_ON);
+ }
+ else //if (getWaterFallStatus() == BG_DS_WATERFALL_STATUS_ON) // Remove collision and water
+ {
+ // turn off collision
+ if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[BG_DS_OBJECT_WATER_1]))
+ gob->SetGoState(GO_STATE_ACTIVE);
+
+ DoorOpen(BG_DS_OBJECT_WATER_2);
+ setWaterFallTimer(urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
+ setWaterFallStatus(BG_DS_WATERFALL_STATUS_OFF);
}
}
else
@@ -82,19 +95,23 @@ void BattlegroundDS::StartingEventOpenDoors()
SpawnBGObject(i, 60);
setWaterFallTimer(urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
- setWaterFallActive(false);
+ setWaterFallStatus(BG_DS_WATERFALL_STATUS_OFF);
+
+ SpawnBGObject(BG_DS_OBJECT_WATER_2, RESPAWN_IMMEDIATELY);
+ DoorOpen(BG_DS_OBJECT_WATER_2);
- for (uint32 i = BG_DS_OBJECT_WATER_1; i <= BG_DS_OBJECT_WATER_2; ++i)
- SpawnBGObject(i, getWaterFallTimer());
+ // Turn off collision
+ if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[BG_DS_OBJECT_WATER_1]))
+ gob->SetGoState(GO_STATE_ACTIVE);
}
void BattlegroundDS::AddPlayer(Player* player)
{
Battleground::AddPlayer(player);
//create score and add it to map, default values are set in constructor
- BattlegroundDSScore* sc = new BattlegroundDSScore;
+ BattlegroundDSScore* score = new BattlegroundDSScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = score;
UpdateArenaWorldState();
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
index f2ba2cea1e7..7efc6e1caa7 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
@@ -25,7 +25,7 @@ enum BattlegroundDSObjectTypes
{
BG_DS_OBJECT_DOOR_1 = 0,
BG_DS_OBJECT_DOOR_2 = 1,
- BG_DS_OBJECT_WATER_1 = 2,
+ BG_DS_OBJECT_WATER_1 = 2, // Collision
BG_DS_OBJECT_WATER_2 = 3,
BG_DS_OBJECT_BUFF_1 = 4,
BG_DS_OBJECT_BUFF_2 = 5,
@@ -36,7 +36,7 @@ enum BattlegroundDSObjects
{
BG_DS_OBJECT_TYPE_DOOR_1 = 192642,
BG_DS_OBJECT_TYPE_DOOR_2 = 192643,
- BG_DS_OBJECT_TYPE_WATER_1 = 194395,
+ BG_DS_OBJECT_TYPE_WATER_1 = 194395, // Collision
BG_DS_OBJECT_TYPE_WATER_2 = 191877,
BG_DS_OBJECT_TYPE_BUFF_1 = 184663,
BG_DS_OBJECT_TYPE_BUFF_2 = 184664
@@ -46,7 +46,12 @@ enum BattlegroundDSData
{ // These values are NOT blizzlike... need the correct data!
BG_DS_WATERFALL_TIMER_MIN = 30000,
BG_DS_WATERFALL_TIMER_MAX = 60000,
+ BG_DS_WATERFALL_WARNING_DURATION = 7000,
BG_DS_WATERFALL_DURATION = 10000,
+
+ BG_DS_WATERFALL_STATUS_WARNING = 1, // Water starting to fall, but no LoS Blocking nor movement blocking
+ BG_DS_WATERFALL_STATUS_ON = 2, // LoS and Movement blocking active
+ BG_DS_WATERFALL_STATUS_OFF = 3,
};
class BattlegroundDSScore : public BattlegroundScore
@@ -76,14 +81,14 @@ class BattlegroundDS : public Battleground
void HandleKillPlayer(Player* player, Player* killer);
bool HandlePlayerUnderMap(Player* player);
private:
- uint32 m_waterTimer;
- bool m_waterfallActive;
+ uint32 _waterfallTimer;
+ uint8 _waterfallStatus;
virtual void PostUpdateImpl(uint32 diff);
protected:
- bool isWaterFallActive() { return m_waterfallActive; };
- void setWaterFallActive(bool active) { m_waterfallActive = active; };
- void setWaterFallTimer(uint32 timer) { m_waterTimer = timer; };
- uint32 getWaterFallTimer() { return m_waterTimer; };
+ uint32 getWaterFallStatus() { return _waterfallStatus; };
+ void setWaterFallStatus(uint32 status) { _waterfallStatus = status; };
+ void setWaterFallTimer(uint32 timer) { _waterfallTimer = timer; };
+ uint32 getWaterFallTimer() { return _waterfallTimer; };
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index cbc3ec85055..344dc79fe79 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -30,24 +30,24 @@
// these variables aren't used outside of this file, so declare them only here
uint32 BG_EY_HonorScoreTicks[BG_HONOR_MODE_NUM] = {
- 330, // normal honor
- 200 // holiday
+ 260, // normal honor
+ 160 // holiday
};
BattlegroundEY::BattlegroundEY()
{
m_BuffChange = true;
- m_BgObjects.resize(BG_EY_OBJECT_MAX);
- m_BgCreatures.resize(BG_EY_CREATURES_MAX);
+ BgObjects.resize(BG_EY_OBJECT_MAX);
+ BgCreatures.resize(BG_EY_CREATURES_MAX);
m_Points_Trigger[FEL_REAVER] = TR_FEL_REAVER_BUFF;
m_Points_Trigger[BLOOD_ELF] = TR_BLOOD_ELF_BUFF;
m_Points_Trigger[DRAENEI_RUINS] = TR_DRAENEI_RUINS_BUFF;
m_Points_Trigger[MAGE_TOWER] = TR_MAGE_TOWER_BUFF;
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_EY_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_EY_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN;
}
BattlegroundEY::~BattlegroundEY()
@@ -143,7 +143,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
GameObject* obj = NULL;
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
- obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]);
+ obj = HashMapHolder<GameObject>::Find(BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]);
if (obj)
{
uint8 j = 0;
@@ -183,7 +183,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
GameObject* obj = NULL;
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
- obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]);
+ obj = HashMapHolder<GameObject>::Find(BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]);
if (obj)
{
uint8 j = 0;
@@ -340,7 +340,7 @@ void BattlegroundEY::AddPlayer(Player* player)
m_PlayersNearPoint[EY_POINTS_MAX].push_back(player->GetGUID());
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundEY::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
@@ -735,7 +735,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* Source, uint32 Point)
else
SendMessageToAll(m_CapturingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, Source);
- if (m_BgCreatures[Point])
+ if (BgCreatures[Point])
DelCreature(Point);
WorldSafeLocsEntry const* sg = NULL;
@@ -807,8 +807,8 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType
void BattlegroundEY::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found
+ BattlegroundScoreMap::iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found
return;
switch (type)
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index baa9ca30cff..026fbccc320 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -217,8 +217,8 @@ enum EYBattlegroundObjectTypes
BG_EY_OBJECT_MAX = 59
};
-#define BG_EY_NotEYWeekendHonorTicks 330
-#define BG_EY_EYWeekendHonorTicks 200
+#define BG_EY_NotEYWeekendHonorTicks 260
+#define BG_EY_EYWeekendHonorTicks 160
#define EY_EVENT_START_BATTLE 13180 // Achievement: Flurry
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 90d5d7b9939..c72fcfdb3a7 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -28,13 +28,13 @@
BattlegroundIC::BattlegroundIC()
{
- m_BgObjects.resize(MAX_NORMAL_GAMEOBJECTS_SPAWNS + MAX_AIRSHIPS_SPAWNS + MAX_HANGAR_TELEPORTERS_SPAWNS + MAX_FORTRESS_TELEPORTERS_SPAWNS);
- m_BgCreatures.resize(MAX_NORMAL_NPCS_SPAWNS + MAX_WORKSHOP_SPAWNS + MAX_DOCKS_SPAWNS + MAX_SPIRIT_GUIDES_SPAWNS);
+ BgObjects.resize(MAX_NORMAL_GAMEOBJECTS_SPAWNS + MAX_AIRSHIPS_SPAWNS + MAX_HANGAR_TELEPORTERS_SPAWNS + MAX_FORTRESS_TELEPORTERS_SPAWNS);
+ BgCreatures.resize(MAX_NORMAL_NPCS_SPAWNS + MAX_WORKSHOP_SPAWNS + MAX_DOCKS_SPAWNS + MAX_SPIRIT_GUIDES_SPAWNS);
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_IC_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_IC_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_IC_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_IC_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_IC_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_IC_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_IC_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_IC_HAS_BEGUN;
for (uint8 i = 0; i < 2; i++)
factionReinforcements[i] = MAX_REINFORCEMENTS;
@@ -175,9 +175,9 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
{
if (siege->isAlive())
{
- if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_OOC_NOT_ATTACKABLE))
+ if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC))
// following sniffs the vehicle always has UNIT_FLAG_UNK_14
- siege->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ siege->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC);
else
siege->SetHealth(siege->GetMaxHealth());
}
@@ -298,7 +298,7 @@ void BattlegroundIC::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundICScore* sc = new BattlegroundICScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
if (nodePoint[NODE_TYPE_QUARRY].nodeState == (player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H))
player->CastSpell(player, SPELL_QUARRY, true);
@@ -327,9 +327,9 @@ void BattlegroundIC::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
void BattlegroundIC::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- std::map<uint64, BattlegroundScore*>::iterator itr = m_PlayerScores.find(Source->GetGUID());
+ std::map<uint64, BattlegroundScore*>::iterator itr = PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ if (itr == PlayerScores.end()) // player not found...
return;
switch (type)
@@ -476,7 +476,7 @@ void BattlegroundIC::EndBattleground(uint32 winner)
void BattlegroundIC::RealocatePlayers(ICNodePointType nodeType)
{
// Those who are waiting to resurrect at this node are taken to the closest own node's graveyard
- std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[BG_IC_NPC_SPIRIT_GUIDE_1+nodeType-2]];
+ std::vector<uint64> ghost_list = m_ReviveQueue[BgCreatures[BG_IC_NPC_SPIRIT_GUIDE_1+nodeType-2]];
if (!ghost_list.empty())
{
WorldSafeLocsEntry const* ClosestGrave = NULL;
@@ -528,7 +528,7 @@ void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target
// if we are here means that the point has been lost, or it is the first capture
if (nodePoint[i].nodeType != NODE_TYPE_REFINERY && nodePoint[i].nodeType != NODE_TYPE_QUARRY)
- if (m_BgCreatures[BG_IC_NPC_SPIRIT_GUIDE_1+(nodePoint[i].nodeType)-2])
+ if (BgCreatures[BG_IC_NPC_SPIRIT_GUIDE_1+(nodePoint[i].nodeType)-2])
DelCreature(BG_IC_NPC_SPIRIT_GUIDE_1+(nodePoint[i].nodeType)-2);
UpdatePlayerScore(player, SCORE_BASES_ASSAULTED, 1);
@@ -793,7 +793,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (Creature* siegeEngine = GetBGCreature(siegeType))
{
- siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC);
siegeEngine->setFaction(BG_IC_Factions[(nodePoint->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
index cee8cb2b4da..0974c96a991 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
@@ -26,17 +26,17 @@
BattlegroundNA::BattlegroundNA()
{
- m_BgObjects.resize(BG_NA_OBJECT_MAX);
+ BgObjects.resize(BG_NA_OBJECT_MAX);
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set messageIds
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattlegroundNA::~BattlegroundNA()
@@ -65,7 +65,7 @@ void BattlegroundNA::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundNAScore* sc = new BattlegroundNAScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp
index c304c194a71..98985b41b5a 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp
@@ -24,10 +24,10 @@
BattlegroundRB::BattlegroundRB()
{
//TODO FIX ME!
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = 0;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = 0;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
}
BattlegroundRB::~BattlegroundRB()
@@ -49,7 +49,7 @@ void BattlegroundRB::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundRBScore* sc = new BattlegroundRBScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundRB::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
@@ -65,9 +65,9 @@ void BattlegroundRB::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
void BattlegroundRB::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- std::map<uint64, BattlegroundScore*>::iterator itr = m_PlayerScores.find(Source->GetGUID());
+ std::map<uint64, BattlegroundScore*>::iterator itr = PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ if (itr == PlayerScores.end()) // player not found...
return;
Battleground::UpdatePlayerScore(Source, type, value, doAddHonor);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
index f1602507cc1..6a626217a4e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
@@ -26,17 +26,17 @@
BattlegroundRL::BattlegroundRL()
{
- m_BgObjects.resize(BG_RL_OBJECT_MAX);
+ BgObjects.resize(BG_RL_OBJECT_MAX);
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set messageIds
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattlegroundRL::~BattlegroundRL()
@@ -65,7 +65,7 @@ void BattlegroundRL::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundRLScore* sc = new BattlegroundRLScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
UpdateArenaWorldState();
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 539419d6c50..98bb704661e 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -26,17 +26,17 @@
BattlegroundRV::BattlegroundRV()
{
- m_BgObjects.resize(BG_RV_OBJECT_MAX);
+ BgObjects.resize(BG_RV_OBJECT_MAX);
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- m_StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
- m_StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
- m_StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
+ StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
+ StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_30S;
+ StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
+ StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set messageIds
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
}
BattlegroundRV::~BattlegroundRV()
@@ -63,6 +63,7 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff)
case BG_RV_STATE_OPEN_PILARS:
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
+ TogglePillarCollision(false);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_OPEN_FIRE);
break;
@@ -76,6 +77,7 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff)
case BG_RV_STATE_CLOSE_PILARS:
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
+ TogglePillarCollision(true);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
break;
@@ -100,6 +102,8 @@ void BattlegroundRV::StartingEventOpenDoors()
setState(BG_RV_STATE_OPEN_FENCES);
setTimer(BG_RV_FIRST_TIMER);
+
+ TogglePillarCollision(true);
}
void BattlegroundRV::AddPlayer(Player* player)
@@ -108,7 +112,7 @@ void BattlegroundRV::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundRVScore* sc = new BattlegroundRVScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
UpdateWorldState(BG_RV_WORLD_STATE_A, GetAlivePlayersCountByTeam(ALLIANCE));
UpdateWorldState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
@@ -207,13 +211,13 @@ bool BattlegroundRV::SetupBattleground()
|| !AddObject(BG_RV_OBJECT_PILAR_2, BG_RV_OBJECT_TYPE_PILAR_2, 723.644287f, -284.493256f, 24.648525f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
|| !AddObject(BG_RV_OBJECT_PILAR_3, BG_RV_OBJECT_TYPE_PILAR_3, 763.611145f, -261.856750f, 25.909504f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
|| !AddObject(BG_RV_OBJECT_PILAR_4, BG_RV_OBJECT_TYPE_PILAR_4, 802.211609f, -284.493256f, 24.648525f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
-/*
- // Pilars Collision - Fixme: Use the collision pilars - should make u break LoS
+
+ // Pilars Collision
|| !AddObject(BG_RV_OBJECT_PILAR_COLLISION_1, BG_RV_OBJECT_TYPE_PILAR_COLLISION_1, 763.632385f, -306.162384f, 30.639660f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
|| !AddObject(BG_RV_OBJECT_PILAR_COLLISION_2, BG_RV_OBJECT_TYPE_PILAR_COLLISION_2, 723.644287f, -284.493256f, 32.382710f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
|| !AddObject(BG_RV_OBJECT_PILAR_COLLISION_3, BG_RV_OBJECT_TYPE_PILAR_COLLISION_3, 763.611145f, -261.856750f, 30.639660f, 0.000000f, 0, 0, 0, RESPAWN_IMMEDIATELY)
|| !AddObject(BG_RV_OBJECT_PILAR_COLLISION_4, BG_RV_OBJECT_TYPE_PILAR_COLLISION_4, 802.211609f, -284.493256f, 32.382710f, 3.141593f, 0, 0, 0, RESPAWN_IMMEDIATELY)
-*/
+
)
{
sLog->outErrorDb("BatteGroundRV: Failed to spawn some object!");
@@ -221,3 +225,28 @@ bool BattlegroundRV::SetupBattleground()
}
return true;
}
+
+
+void BattlegroundRV::TogglePillarCollision(bool apply)
+{
+ for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PILAR_COLLISION_4; ++i)
+ {
+ if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[i]))
+ {
+ if (i >= BG_RV_OBJECT_PILAR_COLLISION_1)
+ {
+ uint32 _state = GO_STATE_READY;
+ if (gob->GetGOInfo()->door.startOpen)
+ _state = GO_STATE_ACTIVE;
+ gob->SetGoState(apply ? (GOState)_state : (GOState)(!_state));
+
+ if (gob->GetGOInfo()->door.startOpen)
+ gob->EnableCollision(!apply); // Forced collision toggle
+ }
+
+ for (BattlegroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ if (Player* player = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
+ gob->SendUpdateToPlayer(player);
+ }
+ }
+} \ No newline at end of file
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
index 4f99af268db..1dfd4825c8f 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h
@@ -38,12 +38,12 @@ enum BattlegroundRVObjectTypes
BG_RV_OBJECT_PILAR_4,
BG_RV_OBJECT_PULLEY_1,
BG_RV_OBJECT_PULLEY_2,
-/*
+
BG_RV_OBJECT_PILAR_COLLISION_1,
BG_RV_OBJECT_PILAR_COLLISION_2,
BG_RV_OBJECT_PILAR_COLLISION_3,
BG_RV_OBJECT_PILAR_COLLISION_4,
-*/
+
BG_RV_OBJECT_ELEVATOR_1,
BG_RV_OBJECT_ELEVATOR_2,
BG_RV_OBJECT_MAX,
@@ -64,12 +64,12 @@ enum BattlegroundRVObjects
BG_RV_OBJECT_TYPE_GEAR_2 = 192394,
BG_RV_OBJECT_TYPE_ELEVATOR_1 = 194582,
BG_RV_OBJECT_TYPE_ELEVATOR_2 = 194586,
-/*
+
BG_RV_OBJECT_TYPE_PILAR_COLLISION_1 = 194580, // axe
BG_RV_OBJECT_TYPE_PILAR_COLLISION_2 = 194579, // arena
BG_RV_OBJECT_TYPE_PILAR_COLLISION_3 = 194581, // lightning
BG_RV_OBJECT_TYPE_PILAR_COLLISION_4 = 194578, // ivory
-*/
+
BG_RV_OBJECT_TYPE_PILAR_1 = 194583, // axe
BG_RV_OBJECT_TYPE_PILAR_2 = 194584, // arena
BG_RV_OBJECT_TYPE_PILAR_3 = 194585, // lightning
@@ -129,5 +129,6 @@ class BattlegroundRV : public Battleground
uint32 getState() { return State; };
void setState(uint32 state) { State = state; };
+ void TogglePillarCollision(bool apply);
};
#endif
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index ed51d843b46..b7792e10ae3 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -26,12 +26,12 @@
BattlegroundSA::BattlegroundSA()
{
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_SA_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_SA_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_SA_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_SA_HAS_BEGUN;
- m_BgObjects.resize(BG_SA_MAXOBJ);
- m_BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY);
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_SA_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_SA_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_SA_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_SA_HAS_BEGUN;
+ BgObjects.resize(BG_SA_MAXOBJ);
+ BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY);
TimerEnabled = false;
UpdateWaitTimer = 0;
SignaledRoundTwo = false;
@@ -460,7 +460,7 @@ void BattlegroundSA::AddPlayer(Player* player)
player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
}
SendTransportInit(player);
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundSA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
@@ -476,8 +476,8 @@ void BattlegroundSA::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
void BattlegroundSA::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found...
+ BattlegroundScoreMap::iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found...
return;
if (type == SCORE_DESTROYED_DEMOLISHER)
@@ -563,7 +563,7 @@ void BattlegroundSA::HandleKillUnit(Creature* unit, Player* killer)
*/
void BattlegroundSA::OverrideGunFaction()
{
- if (!m_BgCreatures[0])
+ if (!BgCreatures[0])
return;
for (uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10;i++)
@@ -581,7 +581,7 @@ void BattlegroundSA::OverrideGunFaction()
void BattlegroundSA::DemolisherStartState(bool start)
{
- if (!m_BgCreatures[0])
+ if (!BgCreatures[0])
return;
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
@@ -863,7 +863,7 @@ void BattlegroundSA::UpdateDemolisherSpawns()
{
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
{
- if (m_BgCreatures[i])
+ if (BgCreatures[i])
{
if (Creature* Demolisher = GetBGCreature(i))
{
@@ -898,12 +898,13 @@ void BattlegroundSA::UpdateDemolisherSpawns()
void BattlegroundSA::SendTransportInit(Player* player)
{
- if (m_BgObjects[BG_SA_BOAT_ONE] || m_BgObjects[BG_SA_BOAT_TWO])
+ if (BgObjects[BG_SA_BOAT_ONE] || BgObjects[BG_SA_BOAT_TWO])
{
UpdateData transData(player->GetMapId());
- if (m_BgObjects[BG_SA_BOAT_ONE])
+ if (BgObjects[BG_SA_BOAT_ONE])
+
GetBGObject(BG_SA_BOAT_ONE)->BuildCreateUpdateBlockForPlayer(&transData, player);
- if (m_BgObjects[BG_SA_BOAT_TWO])
+ if (BgObjects[BG_SA_BOAT_TWO])
GetBGObject(BG_SA_BOAT_TWO)->BuildCreateUpdateBlockForPlayer(&transData, player);
WorldPacket packet;
transData.BuildPacket(&packet);
@@ -913,12 +914,12 @@ void BattlegroundSA::SendTransportInit(Player* player)
void BattlegroundSA::SendTransportsRemove(Player* player)
{
- if (m_BgObjects[BG_SA_BOAT_ONE] || m_BgObjects[BG_SA_BOAT_TWO])
+ if (BgObjects[BG_SA_BOAT_ONE] || BgObjects[BG_SA_BOAT_TWO])
{
UpdateData transData(player->GetMapId());
- if (m_BgObjects[BG_SA_BOAT_ONE])
+ if (BgObjects[BG_SA_BOAT_ONE])
GetBGObject(BG_SA_BOAT_ONE)->BuildOutOfRangeUpdateBlock(&transData);
- if (m_BgObjects[BG_SA_BOAT_TWO])
+ if (BgObjects[BG_SA_BOAT_TWO])
GetBGObject(BG_SA_BOAT_TWO)->BuildOutOfRangeUpdateBlock(&transData);
WorldPacket packet;
transData.BuildPacket(&packet);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 226bf172a09..9650cf11a8c 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -42,20 +42,15 @@ uint32 BG_WSG_Honor[BG_HONOR_MODE_NUM][BG_WSG_REWARD_NUM] = {
{60, 40, 80} // holiday
};
-uint32 BG_WSG_Reputation[BG_HONOR_MODE_NUM][BG_WSG_REWARD_NUM] = {
- {0, 35, 0}, // normal honor
- {0, 45, 0} // holiday
-};
-
BattlegroundWS::BattlegroundWS()
{
- m_BgObjects.resize(BG_WS_OBJECT_MAX);
- m_BgCreatures.resize(BG_CREATURES_MAX_WS);
+ BgObjects.resize(BG_WS_OBJECT_MAX);
+ BgCreatures.resize(BG_CREATURES_MAX_WS);
- m_StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES;
- m_StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
- m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
+ StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES;
+ StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
+ StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
}
BattlegroundWS::~BattlegroundWS()
@@ -75,96 +70,93 @@ void BattlegroundWS::PostUpdateImpl(uint32 diff)
else // Horde has more points and thus wins
EndBattleground(HORDE);
}
-
else if (GetTeamScore(HORDE) == 0)
EndBattleground(ALLIANCE); // Alliance has > 0, Horde has 0, alliance wins
-
else if (GetTeamScore(HORDE) == GetTeamScore(ALLIANCE)) // Team score equal, winner is team that scored the last flag
- EndBattleground(m_LastFlagCaptureTeam);
-
+ EndBattleground(_lastFlagCaptureTeam);
else if (GetTeamScore(HORDE) > GetTeamScore(ALLIANCE)) // Last but not least, check who has the higher score
EndBattleground(HORDE);
else
EndBattleground(ALLIANCE);
}
- else if (GetStartTime() > uint32(m_minutesElapsed * MINUTE * IN_MILLISECONDS))
+ else if (GetStartTime() > uint32(_minutesElapsed * MINUTE * IN_MILLISECONDS))
{
- ++m_minutesElapsed;
- UpdateWorldState(BG_WS_STATE_TIMER, 25 - m_minutesElapsed);
+ ++_minutesElapsed;
+ UpdateWorldState(BG_WS_STATE_TIMER, 25 - _minutesElapsed);
}
- if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_WAIT_RESPAWN)
+ if (_flagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_WAIT_RESPAWN)
{
- m_FlagsTimer[BG_TEAM_ALLIANCE] -= diff;
+ _flagsTimer[BG_TEAM_ALLIANCE] -= diff;
- if (m_FlagsTimer[BG_TEAM_ALLIANCE] < 0)
+ if (_flagsTimer[BG_TEAM_ALLIANCE] < 0)
{
- m_FlagsTimer[BG_TEAM_ALLIANCE] = 0;
+ _flagsTimer[BG_TEAM_ALLIANCE] = 0;
RespawnFlag(ALLIANCE, true);
}
}
- if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
+ if (_flagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
{
- m_FlagsDropTimer[BG_TEAM_ALLIANCE] -= diff;
+ _flagsDropTimer[BG_TEAM_ALLIANCE] -= diff;
- if (m_FlagsDropTimer[BG_TEAM_ALLIANCE] < 0)
+ if (_flagsDropTimer[BG_TEAM_ALLIANCE] < 0)
{
- m_FlagsDropTimer[BG_TEAM_ALLIANCE] = 0;
+ _flagsDropTimer[BG_TEAM_ALLIANCE] = 0;
RespawnFlagAfterDrop(ALLIANCE);
- m_BothFlagsKept = false;
+ _bothFlagsKept = false;
}
}
- if (m_FlagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_WAIT_RESPAWN)
+ if (_flagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_WAIT_RESPAWN)
{
- m_FlagsTimer[BG_TEAM_HORDE] -= diff;
+ _flagsTimer[BG_TEAM_HORDE] -= diff;
- if (m_FlagsTimer[BG_TEAM_HORDE] < 0)
+ if (_flagsTimer[BG_TEAM_HORDE] < 0)
{
- m_FlagsTimer[BG_TEAM_HORDE] = 0;
+ _flagsTimer[BG_TEAM_HORDE] = 0;
RespawnFlag(HORDE, true);
}
}
- if (m_FlagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
+ if (_flagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
{
- m_FlagsDropTimer[BG_TEAM_HORDE] -= diff;
+ _flagsDropTimer[BG_TEAM_HORDE] -= diff;
- if (m_FlagsDropTimer[BG_TEAM_HORDE] < 0)
+ if (_flagsDropTimer[BG_TEAM_HORDE] < 0)
{
- m_FlagsDropTimer[BG_TEAM_HORDE] = 0;
+ _flagsDropTimer[BG_TEAM_HORDE] = 0;
RespawnFlagAfterDrop(HORDE);
- m_BothFlagsKept = false;
+ _bothFlagsKept = false;
}
}
- if (m_BothFlagsKept)
+ if (_bothFlagsKept)
{
- m_FlagSpellForceTimer += diff;
- if (m_FlagDebuffState == 0 && m_FlagSpellForceTimer >= 600000) //10 minutes
- {
- 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* player = ObjectAccessor::FindPlayer(m_FlagKeepers[0]))
+ _flagSpellForceTimer += diff;
+ if (_flagDebuffState == 0 && _flagSpellForceTimer >= 10*MINUTE*IN_MILLISECONDS) //10 minutes
{
- player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- player->CastSpell(player, WS_SPELL_BRUTAL_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);
+ _flagDebuffState = 1;
}
- if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[1]))
+ else if (_flagDebuffState == 1 && _flagSpellForceTimer >= 900000) //15 minutes
{
- player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- player->CastSpell(player, WS_SPELL_BRUTAL_ASSAULT, true);
+ if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[0]))
+ {
+ player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
+ player->CastSpell(player, WS_SPELL_BRUTAL_ASSAULT, true);
+ }
+ if (Player* player = ObjectAccessor::FindPlayer(m_FlagKeepers[1]))
+ {
+ player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
+ player->CastSpell(player, WS_SPELL_BRUTAL_ASSAULT, true);
+ }
+ _flagDebuffState = 2;
}
- m_FlagDebuffState = 2;
- }
}
else
{
- m_FlagSpellForceTimer = 0; //reset timer.
- m_FlagDebuffState = 0;
+ _flagSpellForceTimer = 0; //reset timer.
+ _flagDebuffState = 0;
}
}
}
@@ -208,7 +200,7 @@ void BattlegroundWS::AddPlayer(Player* player)
//create score and add it to map, default values are set in constructor
BattlegroundWGScore* sc = new BattlegroundWGScore;
- m_PlayerScores[player->GetGUID()] = sc;
+ PlayerScores[player->GetGUID()] = sc;
}
void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
@@ -216,12 +208,12 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
if (Team == ALLIANCE)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Respawn Alliance flag");
- m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
+ _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
}
else
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Respawn Horde flag");
- m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
+ _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
}
if (captured)
@@ -232,7 +224,7 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
SendMessageToAll(LANG_BG_WS_F_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); // flag respawned sound...
}
- m_BothFlagsKept = false;
+ _bothFlagsKept = false;
}
void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
@@ -260,7 +252,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
sLog->outError("unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team)));
SetDroppedFlagGUID(0, team);
- m_BothFlagsKept = false;
+ _bothFlagsKept = false;
}
void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
@@ -277,12 +269,12 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
return;
SetHordeFlagPicker(0); // must be before aura remove to prevent 2 events (drop+capture) at the same time
// horde flag in base (but not respawned yet)
- m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
+ _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
// Drop Horde Flag from Player
Source->RemoveAurasDueToSpell(BG_WS_SPELL_WARSONG_FLAG);
- if (m_FlagDebuffState == 1)
+ if (_flagDebuffState == 1)
Source->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- if (m_FlagDebuffState == 2)
+ if (_flagDebuffState == 2)
Source->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);
if (GetTeamScore(ALLIANCE) < BG_WS_MAX_TEAM_SCORE)
AddPoint(ALLIANCE, 1);
@@ -295,12 +287,12 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
return;
SetAllianceFlagPicker(0); // must be before aura remove to prevent 2 events (drop+capture) at the same time
// alliance flag in base (but not respawned yet)
- m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
+ _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
// Drop Alliance Flag from Player
Source->RemoveAurasDueToSpell(BG_WS_SPELL_SILVERWING_FLAG);
- if (m_FlagDebuffState == 1)
+ if (_flagDebuffState == 1)
Source->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- if (m_FlagDebuffState == 2)
+ if (_flagDebuffState == 2)
Source->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);
if (GetTeamScore(HORDE) < BG_WS_MAX_TEAM_SCORE)
AddPoint(HORDE, 1);
@@ -345,7 +337,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
}
else
{
- m_FlagsTimer[GetTeamIndexByTeamId(Source->GetTeam()) ? 0 : 1] = BG_WS_FLAG_RESPAWN_TIME;
+ _flagsTimer[GetTeamIndexByTeamId(Source->GetTeam()) ? 0 : 1] = BG_WS_FLAG_RESPAWN_TIME;
}
}
@@ -388,11 +380,11 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)
{
SetHordeFlagPicker(0);
Source->RemoveAurasDueToSpell(BG_WS_SPELL_WARSONG_FLAG);
- if (m_FlagDebuffState == 1)
+ if (_flagDebuffState == 1)
Source->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- if (m_FlagDebuffState == 2)
+ if (_flagDebuffState == 2)
Source->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);
- m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_GROUND;
+ _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_GROUND;
Source->CastSpell(Source, BG_WS_SPELL_WARSONG_FLAG_DROPPED, true);
set = true;
}
@@ -405,11 +397,11 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)
{
SetAllianceFlagPicker(0);
Source->RemoveAurasDueToSpell(BG_WS_SPELL_SILVERWING_FLAG);
- if (m_FlagDebuffState == 1)
+ if (_flagDebuffState == 1)
Source->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
- if (m_FlagDebuffState == 2)
+ if (_flagDebuffState == 2)
Source->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);
- m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_GROUND;
+ _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_GROUND;
Source->CastSpell(Source, BG_WS_SPELL_SILVERWING_FLAG_DROPPED, true);
set = true;
}
@@ -431,7 +423,7 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)
UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, uint32(-1));
}
- m_FlagsDropTimer[GetTeamIndexByTeamId(Source->GetTeam()) ? 0 : 1] = BG_WS_FLAG_DROP_TIME;
+ _flagsDropTimer[GetTeamIndexByTeamId(Source->GetTeam()) ? 0 : 1] = BG_WS_FLAG_DROP_TIME;
}
}
@@ -445,40 +437,40 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target
//alliance flag picked up from base
if (Source->GetTeam() == HORDE && this->GetFlagState(ALLIANCE) == BG_WS_FLAG_STATE_ON_BASE
- && this->m_BgObjects[BG_WS_OBJECT_A_FLAG] == target_obj->GetGUID())
+ && this->BgObjects[BG_WS_OBJECT_A_FLAG] == target_obj->GetGUID())
{
message_id = LANG_BG_WS_PICKEDUP_AF;
type = CHAT_MSG_BG_SYSTEM_HORDE;
PlaySoundToAll(BG_WS_SOUND_ALLIANCE_FLAG_PICKED_UP);
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_ONE_DAY);
SetAllianceFlagPicker(Source->GetGUID());
- m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_PLAYER;
+ _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_PLAYER;
//update world state to show correct flag carrier
UpdateFlagState(HORDE, BG_WS_FLAG_STATE_ON_PLAYER);
UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, 1);
Source->CastSpell(Source, BG_WS_SPELL_SILVERWING_FLAG, true);
Source->GetAchievementMgr().StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, BG_WS_SPELL_SILVERWING_FLAG_PICKED);
- if (m_FlagState[1] == BG_WS_FLAG_STATE_ON_PLAYER)
- m_BothFlagsKept = true;
+ if (_flagState[1] == BG_WS_FLAG_STATE_ON_PLAYER)
+ _bothFlagsKept = true;
}
//horde flag picked up from base
if (Source->GetTeam() == ALLIANCE && this->GetFlagState(HORDE) == BG_WS_FLAG_STATE_ON_BASE
- && this->m_BgObjects[BG_WS_OBJECT_H_FLAG] == target_obj->GetGUID())
+ && this->BgObjects[BG_WS_OBJECT_H_FLAG] == target_obj->GetGUID())
{
message_id = LANG_BG_WS_PICKEDUP_HF;
type = CHAT_MSG_BG_SYSTEM_ALLIANCE;
PlaySoundToAll(BG_WS_SOUND_HORDE_FLAG_PICKED_UP);
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_ONE_DAY);
SetHordeFlagPicker(Source->GetGUID());
- m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_PLAYER;
+ _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_PLAYER;
//update world state to show correct flag carrier
UpdateFlagState(ALLIANCE, BG_WS_FLAG_STATE_ON_PLAYER);
UpdateWorldState(BG_WS_FLAG_UNK_HORDE, 1);
Source->CastSpell(Source, BG_WS_SPELL_WARSONG_FLAG, true);
Source->GetAchievementMgr().StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, BG_WS_SPELL_WARSONG_FLAG_PICKED);
- if (m_FlagState[0] == BG_WS_FLAG_STATE_ON_PLAYER)
- m_BothFlagsKept = true;
+ if (_flagState[0] == BG_WS_FLAG_STATE_ON_PLAYER)
+ _bothFlagsKept = true;
}
//Alliance flag on ground(not in base) (returned or picked up again from ground!)
@@ -493,7 +485,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY);
PlaySoundToAll(BG_WS_SOUND_FLAG_RETURNED);
UpdatePlayerScore(Source, SCORE_FLAG_RETURNS, 1);
- m_BothFlagsKept = false;
+ _bothFlagsKept = false;
}
else
{
@@ -503,11 +495,11 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_ONE_DAY);
SetAllianceFlagPicker(Source->GetGUID());
Source->CastSpell(Source, BG_WS_SPELL_SILVERWING_FLAG, true);
- m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_PLAYER;
+ _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_PLAYER;
UpdateFlagState(HORDE, BG_WS_FLAG_STATE_ON_PLAYER);
- if (m_FlagDebuffState == 1)
+ if (_flagDebuffState == 1)
Source->CastSpell(Source, WS_SPELL_FOCUSED_ASSAULT, true);
- if (m_FlagDebuffState == 2)
+ if (_flagDebuffState == 2)
Source->CastSpell(Source, WS_SPELL_BRUTAL_ASSAULT, true);
UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, 1);
}
@@ -527,7 +519,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY);
PlaySoundToAll(BG_WS_SOUND_FLAG_RETURNED);
UpdatePlayerScore(Source, SCORE_FLAG_RETURNS, 1);
- m_BothFlagsKept = false;
+ _bothFlagsKept = false;
}
else
{
@@ -537,11 +529,11 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_ONE_DAY);
SetHordeFlagPicker(Source->GetGUID());
Source->CastSpell(Source, BG_WS_SPELL_WARSONG_FLAG, true);
- m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_PLAYER;
+ _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_PLAYER;
UpdateFlagState(ALLIANCE, BG_WS_FLAG_STATE_ON_PLAYER);
- if (m_FlagDebuffState == 1)
+ if (_flagDebuffState == 1)
Source->CastSpell(Source, WS_SPELL_FOCUSED_ASSAULT, true);
- if (m_FlagDebuffState == 2)
+ if (_flagDebuffState == 2)
Source->CastSpell(Source, WS_SPELL_BRUTAL_ASSAULT, true);
UpdateWorldState(BG_WS_FLAG_UNK_HORDE, 1);
}
@@ -610,30 +602,30 @@ void BattlegroundWS::HandleAreaTrigger(Player* Source, uint32 Trigger)
switch (Trigger)
{
case 3686: // Alliance elixir of speed spawn. Trigger not working, because located inside other areatrigger, can be replaced by IsWithinDist(object, dist) in Battleground::Update().
- //buff_guid = m_BgObjects[BG_WS_OBJECT_SPEEDBUFF_1];
+ //buff_guid = BgObjects[BG_WS_OBJECT_SPEEDBUFF_1];
break;
case 3687: // Horde elixir of speed spawn. Trigger not working, because located inside other areatrigger, can be replaced by IsWithinDist(object, dist) in Battleground::Update().
- //buff_guid = m_BgObjects[BG_WS_OBJECT_SPEEDBUFF_2];
+ //buff_guid = BgObjects[BG_WS_OBJECT_SPEEDBUFF_2];
break;
case 3706: // Alliance elixir of regeneration spawn
- //buff_guid = m_BgObjects[BG_WS_OBJECT_REGENBUFF_1];
+ //buff_guid = BgObjects[BG_WS_OBJECT_REGENBUFF_1];
break;
case 3708: // Horde elixir of regeneration spawn
- //buff_guid = m_BgObjects[BG_WS_OBJECT_REGENBUFF_2];
+ //buff_guid = BgObjects[BG_WS_OBJECT_REGENBUFF_2];
break;
case 3707: // Alliance elixir of berserk spawn
- //buff_guid = m_BgObjects[BG_WS_OBJECT_BERSERKBUFF_1];
+ //buff_guid = BgObjects[BG_WS_OBJECT_BERSERKBUFF_1];
break;
case 3709: // Horde elixir of berserk spawn
- //buff_guid = m_BgObjects[BG_WS_OBJECT_BERSERKBUFF_2];
+ //buff_guid = BgObjects[BG_WS_OBJECT_BERSERKBUFF_2];
break;
case 3646: // Alliance Flag spawn
- if (m_FlagState[BG_TEAM_HORDE] && !m_FlagState[BG_TEAM_ALLIANCE])
+ if (_flagState[BG_TEAM_HORDE] && !_flagState[BG_TEAM_ALLIANCE])
if (GetFlagPickerGUID(BG_TEAM_HORDE) == Source->GetGUID())
EventPlayerCapturedFlag(Source);
break;
case 3647: // Horde Flag spawn
- if (m_FlagState[BG_TEAM_ALLIANCE] && !m_FlagState[BG_TEAM_HORDE])
+ if (_flagState[BG_TEAM_ALLIANCE] && !_flagState[BG_TEAM_HORDE])
if (GetFlagPickerGUID(BG_TEAM_ALLIANCE) == Source->GetGUID())
EventPlayerCapturedFlag(Source);
break;
@@ -710,8 +702,8 @@ void BattlegroundWS::Reset()
m_FlagKeepers[BG_TEAM_HORDE] = 0;
m_DroppedFlagGUID[BG_TEAM_ALLIANCE] = 0;
m_DroppedFlagGUID[BG_TEAM_HORDE] = 0;
- m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
- m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
+ _flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
+ _flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
m_TeamScores[BG_TEAM_ALLIANCE] = 0;
m_TeamScores[BG_TEAM_HORDE] = 0;
bool isBGWeekend = sBattlegroundMgr->IsBGWeekend(GetTypeID());
@@ -719,13 +711,13 @@ void BattlegroundWS::Reset()
m_HonorWinKills = (isBGWeekend) ? 3 : 1;
m_HonorEndKills = (isBGWeekend) ? 4 : 2;
// For WorldState
- m_minutesElapsed = 0;
- m_LastFlagCaptureTeam = 0;
+ _minutesElapsed = 0;
+ _lastFlagCaptureTeam = 0;
/* Spirit nodes is static at this BG and then not required deleting at BG reset.
- if (m_BgCreatures[WS_SPIRIT_MAIN_ALLIANCE])
+ if (BgCreatures[WS_SPIRIT_MAIN_ALLIANCE])
DelCreature(WS_SPIRIT_MAIN_ALLIANCE);
- if (m_BgCreatures[WS_SPIRIT_MAIN_HORDE])
+ if (BgCreatures[WS_SPIRIT_MAIN_HORDE])
DelCreature(WS_SPIRIT_MAIN_HORDE);
*/
}
@@ -757,8 +749,8 @@ void BattlegroundWS::HandleKillPlayer(Player* player, Player* killer)
void BattlegroundWS::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor)
{
- BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID());
- if (itr == m_PlayerScores.end()) // player not found
+ BattlegroundScoreMap::iterator itr = PlayerScores.find(Source->GetGUID());
+ if (itr == PlayerScores.end()) // player not found
return;
switch (type)
@@ -805,16 +797,16 @@ void BattlegroundWS::FillInitialWorldStates(WorldPacket& data)
data << uint32(BG_WS_FLAG_CAPTURES_ALLIANCE) << uint32(GetTeamScore(ALLIANCE));
data << uint32(BG_WS_FLAG_CAPTURES_HORDE) << uint32(GetTeamScore(HORDE));
- if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
+ if (_flagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
data << uint32(BG_WS_FLAG_UNK_ALLIANCE) << uint32(-1);
- else if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
+ else if (_flagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
data << uint32(BG_WS_FLAG_UNK_ALLIANCE) << uint32(1);
else
data << uint32(BG_WS_FLAG_UNK_ALLIANCE) << uint32(0);
- if (m_FlagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
+ if (_flagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
data << uint32(BG_WS_FLAG_UNK_HORDE) << uint32(-1);
- else if (m_FlagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
+ else if (_flagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
data << uint32(BG_WS_FLAG_UNK_HORDE) << uint32(1);
else
data << uint32(BG_WS_FLAG_UNK_HORDE) << uint32(0);
@@ -824,17 +816,17 @@ void BattlegroundWS::FillInitialWorldStates(WorldPacket& data)
if (GetStatus() == STATUS_IN_PROGRESS)
{
data << uint32(BG_WS_STATE_TIMER_ACTIVE) << uint32(1);
- data << uint32(BG_WS_STATE_TIMER) << uint32(25-m_minutesElapsed);
+ data << uint32(BG_WS_STATE_TIMER) << uint32(25-_minutesElapsed);
}
else
data << uint32(BG_WS_STATE_TIMER_ACTIVE) << uint32(0);
- if (m_FlagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
+ if (_flagState[BG_TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
data << uint32(BG_WS_FLAG_STATE_ALLIANCE) << uint32(2);
else
data << uint32(BG_WS_FLAG_STATE_ALLIANCE) << uint32(1);
- if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
+ if (_flagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
data << uint32(BG_WS_FLAG_STATE_HORDE) << uint32(2);
else
data << uint32(BG_WS_FLAG_STATE_HORDE) << uint32(1);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
index 063d04253a5..a014840f273 100755
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h
@@ -180,7 +180,7 @@ class BattlegroundWS : public Battleground
bool IsHordeFlagPickedup() const { return m_FlagKeepers[BG_TEAM_HORDE] != 0; }
void RespawnFlag(uint32 Team, bool captured);
void RespawnFlagAfterDrop(uint32 Team);
- uint8 GetFlagState(uint32 team) { return m_FlagState[GetTeamIndexByTeamId(team)]; }
+ uint8 GetFlagState(uint32 team) { return _flagState[GetTeamIndexByTeamId(team)]; }
/* Battleground Events */
virtual void EventPlayerDroppedFlag(Player* Source);
@@ -196,7 +196,7 @@ class BattlegroundWS : public Battleground
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
void UpdateFlagState(uint32 team, uint32 value);
- void SetLastFlagCapture(uint32 team) { m_LastFlagCaptureTeam = team; }
+ void SetLastFlagCapture(uint32 team) { _lastFlagCaptureTeam = team; }
void UpdateTeamScore(uint32 team);
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
void SetDroppedFlagGUID(uint64 guid, uint32 TeamID) { m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)] = guid;}
@@ -211,18 +211,18 @@ class BattlegroundWS : public Battleground
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
uint64 m_DroppedFlagGUID[2];
- uint8 m_FlagState[2]; // for checking flag state
- int32 m_FlagsTimer[2];
- int32 m_FlagsDropTimer[2];
- uint32 m_LastFlagCaptureTeam; // Winner is based on this if score is equal
+ uint8 _flagState[2]; // for checking flag state
+ int32 _flagsTimer[2];
+ int32 _flagsDropTimer[2];
+ uint32 _lastFlagCaptureTeam; // Winner is based on this if score is equal
uint32 m_ReputationCapture;
uint32 m_HonorWinKills;
uint32 m_HonorEndKills;
- int32 m_FlagSpellForceTimer;
- bool m_BothFlagsKept;
- uint8 m_FlagDebuffState; // 0 - no debuffs, 1 - focused assault, 2 - brutal assault
- uint8 m_minutesElapsed;
+ int32 _flagSpellForceTimer;
+ bool _bothFlagsKept;
+ uint8 _flagDebuffState; // 0 - no debuffs, 1 - focused assault, 2 - brutal assault
+ uint8 _minutesElapsed;
virtual void PostUpdateImpl(uint32 diff);
};
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt
index 745e5962eb6..1f680f6e9b0 100644
--- a/src/server/game/CMakeLists.txt
+++ b/src/server/game/CMakeLists.txt
@@ -30,7 +30,7 @@ file(GLOB_RECURSE sources_Globals Globals/*.cpp Globals/*.h)
file(GLOB_RECURSE sources_Grids Grids/*.cpp Grids/*.h)
file(GLOB_RECURSE sources_Groups Groups/*.cpp Groups/*.h)
file(GLOB_RECURSE sources_Guilds Guilds/*.cpp Guilds/*.h)
-file(GLOB_RECURSE sources_Handlers Handlers/*.cpp Server/*.h)
+file(GLOB_RECURSE sources_Handlers Handlers/*.cpp Handlers/*.h)
file(GLOB_RECURSE sources_Instances Instances/*.cpp Instances/*.h)
file(GLOB_RECURSE sources_Loot Loot/*.cpp Loot/*.h)
file(GLOB_RECURSE sources_Mails Mails/*.cpp Mails/*.h)
@@ -48,6 +48,7 @@ file(GLOB_RECURSE sources_Spells Spells/*.cpp Spells/*.h)
file(GLOB_RECURSE sources_Texts Texts/*.cpp Texts/*.h)
file(GLOB_RECURSE sources_Tools Tools/*.cpp Tools/*.h)
file(GLOB_RECURSE sources_Tickets Tickets/*.cpp Tickets/*.h)
+file(GLOB_RECURSE sources_Warden Warden/*.cpp Warden/*.h)
file(GLOB_RECURSE sources_Weather Weather/*.cpp Weather/*.h)
file(GLOB_RECURSE sources_World World/*.cpp World/*.h)
@@ -98,6 +99,7 @@ set(game_STAT_SRCS
${sources_Texts}
${sources_Tools}
${sources_Tickets}
+ ${sources_Warden}
${sources_Weather}
${sources_World}
)
@@ -110,6 +112,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/dep/zlib
${CMAKE_SOURCE_DIR}/src/server/collision
${CMAKE_SOURCE_DIR}/src/server/collision/Management
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Maps
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
@@ -189,6 +193,8 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/Texts
${CMAKE_CURRENT_SOURCE_DIR}/Tools
${CMAKE_CURRENT_SOURCE_DIR}/Tickets
+ ${CMAKE_CURRENT_SOURCE_DIR}/Warden
+ ${CMAKE_CURRENT_SOURCE_DIR}/Warden/Modules
${CMAKE_CURRENT_SOURCE_DIR}/Weather
${CMAKE_CURRENT_SOURCE_DIR}/World
${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index 5c51d2b1bb5..2a57dce77a4 100755
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -558,8 +558,8 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
bool limitReached = false;
- GameTeleMap const & teleMap = sObjectMgr->GetGameTeleMap();
- for (GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
+ GameTeleContainer const & teleMap = sObjectMgr->GetGameTeleMap();
+ for (GameTeleContainer::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
{
GameTele const* tele = &itr->second;
diff --git a/src/server/game/Chat/Commands/TicketCommands.cpp b/src/server/game/Chat/Commands/TicketCommands.cpp
index 138466f9623..177899efbf0 100755
--- a/src/server/game/Chat/Commands/TicketCommands.cpp
+++ b/src/server/game/Chat/Commands/TicketCommands.cpp
@@ -257,7 +257,7 @@ bool ChatHandler::HandleGMTicketUnAssignCommand(const char* args)
ticket->SaveToDB(trans);
sTicketMgr->UpdateLastChange();
- std::string msg = ticket->FormatMessageString(*this, NULL, ticket->GetAssignedToName().c_str(),
+ std::string msg = ticket->FormatMessageString(*this, NULL, ticket->GetAssignedToName().c_str(),
m_session ? m_session->GetPlayer()->GetName() : "Console", NULL);
SendGlobalGMSysMessage(msg.c_str());
return true;
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index a745c5a2f13..7d21f94f372 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -26,209 +26,426 @@
#include "ConditionMgr.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "Spell.h"
-// Checks if player meets the condition
+// Checks if object meets the condition
// Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI)
-bool Condition::Meets(Player* player, Unit* invoker)
+bool Condition::Meets(ConditionSourceInfo& sourceInfo)
{
- if (!player)
+ ASSERT(ConditionTarget < MAX_CONDITION_TARGETS);
+ WorldObject* object = sourceInfo.mConditionTargets[ConditionTarget];
+ // object not present, return false
+ if (!object)
{
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "Condition player not found");
- return false; // player not present, return false
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "Condition object not found for condition (Entry: %u Type: %u Group: %u)", SourceEntry, SourceType, SourceGroup);
+ return false;
}
- uint32 refId = mConditionValue3;//value 3 can be a 'quick' reference
bool condMeets = false;
- bool sendErrorMsg = false;
- switch (mConditionType)
+ switch (ConditionType)
{
case CONDITION_NONE:
condMeets = true; // empty condition, always met
break;
case CONDITION_AURA:
- refId = 0;
- if (!mConditionValue3)
- condMeets = player->HasAuraEffect(mConditionValue1, mConditionValue2);
- else if (Unit* target = player->GetSelectedUnit())
- condMeets = target->HasAuraEffect(mConditionValue1, mConditionValue2);
+ {
+ if (Unit* unit = object->ToUnit())
+ condMeets = unit->HasAuraEffect(ConditionValue1, ConditionValue2);
break;
+ }
case CONDITION_ITEM:
- condMeets = (mConditionValue2 && player->HasItemCount(mConditionValue1, mConditionValue2)) || (!mConditionValue2 && !player->HasItemCount(mConditionValue1, mConditionValue2));//HasItemCount returns false if 0 count is used
+ {
+ if (Player* player = object->ToPlayer())
+ {
+ // don't allow 0 items (it's checked during table load)
+ ASSERT(ConditionValue2);
+ bool checkBank = ConditionValue3 ? true : false;
+ condMeets = player->HasItemCount(ConditionValue1, ConditionValue2, checkBank);
+ }
break;
+ }
case CONDITION_ITEM_EQUIPPED:
- condMeets = player->HasItemOrGemWithIdEquipped(mConditionValue1, 1);
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = player->HasItemOrGemWithIdEquipped(ConditionValue1, 1);
break;
+ }
case CONDITION_ZONEID:
- condMeets = player->GetZoneId() == mConditionValue1;
+ condMeets = object->GetZoneId() == ConditionValue1;
break;
case CONDITION_REPUTATION_RANK:
{
- if (FactionEntry const* faction = sFactionStore.LookupEntry(mConditionValue1))
- condMeets = (mConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction)));
+ if (Player* player = object->ToPlayer())
+ {
+ if (FactionEntry const* faction = sFactionStore.LookupEntry(ConditionValue1))
+ condMeets = (ConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction)));
+ }
break;
}
case CONDITION_ACHIEVEMENT:
- condMeets = player->GetAchievementMgr().HasAchieved(mConditionValue1);
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = player->GetAchievementMgr().HasAchieved(ConditionValue1);
break;
+ }
case CONDITION_TEAM:
- condMeets = player->GetTeam() == mConditionValue1;
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = player->GetTeam() == ConditionValue1;
break;
+ }
case CONDITION_CLASS:
- condMeets = player->getClassMask() & mConditionValue1;
+ {
+ if (Unit* unit = object->ToUnit())
+ condMeets = unit->getClassMask() & ConditionValue1;
break;
+ }
case CONDITION_RACE:
- condMeets = player->getRaceMask() & mConditionValue1;
+ {
+ if (Unit* unit = object->ToUnit())
+ condMeets = unit->getRaceMask() & ConditionValue1;
break;
+ }
case CONDITION_SKILL:
- condMeets = player->HasSkill(mConditionValue1) && player->GetBaseSkillValue(mConditionValue1) >= mConditionValue2;
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = player->HasSkill(ConditionValue1) && player->GetBaseSkillValue(ConditionValue1) >= ConditionValue2;
break;
+ }
case CONDITION_QUESTREWARDED:
- condMeets = (player->GetQuestRewardStatus(mConditionValue1) == !mConditionValue2);
+ {
+ if (Player* player = object->ToPlayer())
+ condMeets = (player->GetQuestRewardStatus(ConditionValue1) == !ConditionValue2);
break;
+ }
case CONDITION_QUESTTAKEN:
{
- QuestStatus status = player->GetQuestStatus(mConditionValue1);
- condMeets = ((status == QUEST_STATUS_INCOMPLETE) == !mConditionValue2);
+ if (Player* player = object->ToPlayer())
+ {
+ QuestStatus status = player->GetQuestStatus(ConditionValue1);
+ condMeets = ((status == QUEST_STATUS_INCOMPLETE) == !ConditionValue2);
+ }
break;
}
case CONDITION_QUEST_COMPLETE:
{
- QuestStatus status = player->GetQuestStatus(mConditionValue1);
- condMeets = ((status == QUEST_STATUS_COMPLETE && !player->GetQuestRewardStatus(mConditionValue1)) == !mConditionValue2);
+ if (Player* player = object->ToPlayer())
+ {
+ QuestStatus status = player->GetQuestStatus(ConditionValue1);
+ condMeets = ((status == QUEST_STATUS_COMPLETE && !player->GetQuestRewardStatus(ConditionValue1)) == !ConditionValue2);
+ }
break;
}
case CONDITION_QUEST_NONE:
{
- QuestStatus status = player->GetQuestStatus(mConditionValue1);
- condMeets = ((status == QUEST_STATUS_NONE) == !mConditionValue2);
+ if (Player* player = object->ToPlayer())
+ {
+ QuestStatus status = player->GetQuestStatus(ConditionValue1);
+ condMeets = ((status == QUEST_STATUS_NONE) == !ConditionValue2);
+ }
break;
}
- case CONDITION_NO_AURA:
- condMeets = !player->HasAuraEffect(mConditionValue1, mConditionValue2);
- break;
case CONDITION_ACTIVE_EVENT:
- condMeets = sGameEventMgr->IsActiveEvent(mConditionValue1);
+ condMeets = sGameEventMgr->IsActiveEvent(ConditionValue1);
break;
case CONDITION_INSTANCE_DATA:
{
- Map* map = player->GetMap();
+ Map* map = object->GetMap();
if (map && map->IsDungeon() && ((InstanceMap*)map)->GetInstanceScript())
- condMeets = ((InstanceMap*)map)->GetInstanceScript()->GetData(mConditionValue1) == mConditionValue2;
+ condMeets = ((InstanceMap*)map)->GetInstanceScript()->GetData(ConditionValue1) == ConditionValue2;
break;
}
- case CONDITION_SPELL_SCRIPT_TARGET:
- condMeets = true;//spell target condition is handled in spellsystem, here it is always true
- refId = 0;//cant have references! use CONDITION_SOURCE_TYPE_SPELL for it
+ case CONDITION_MAPID:
+ condMeets = object->GetMapId() == ConditionValue1;
break;
- case CONDITION_CREATURE_TARGET:
+ case CONDITION_AREAID:
+ condMeets = object->GetAreaId() == ConditionValue1;
+ break;
+ case CONDITION_SPELL:
{
- Unit* target = player->GetSelectedUnit();
- if (target)
- if (Creature* cTarget = target->ToCreature())
- if (cTarget->GetEntry() == mConditionValue1)
- condMeets = true;
+ if (Player* player = object->ToPlayer())
+ condMeets = player->HasSpell(ConditionValue1);
break;
}
- case CONDITION_TARGET_HEALTH_BELOW_PCT:
+ case CONDITION_LEVEL:
{
- Unit* target = player->GetSelectedUnit();
- if (target)
- condMeets = !target->HealthAbovePct(mConditionValue1);
+ if (Unit* unit = object->ToUnit())
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), static_cast<uint32>(unit->getLevel()), ConditionValue1);
break;
}
- case CONDITION_TARGET_RANGE:
+ case CONDITION_DRUNKENSTATE:
{
- if (Unit* target = player->GetSelectedUnit())
- if (player->GetDistance(target) >= mConditionValue1 && (!mConditionValue2 || player->GetDistance(target) <= mConditionValue2))
- condMeets = true;
+ if (Player* player = object->ToPlayer())
+ condMeets = (uint32)Player::GetDrunkenstateByValue(player->GetDrunkValue()) >= ConditionValue1;
break;
}
- case CONDITION_MAPID:
- condMeets = player->GetMapId() == mConditionValue1;
+ case CONDITION_NEAR_CREATURE:
+ {
+ condMeets = GetClosestCreatureWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false;
break;
- case CONDITION_AREAID:
- condMeets = player->GetAreaId() == mConditionValue1;
+ }
+ case CONDITION_NEAR_GAMEOBJECT:
+ {
+ condMeets = GetClosestGameObjectWithEntry(object, ConditionValue1, (float)ConditionValue2) ? true : false;
break;
- case CONDITION_ITEM_TARGET:
+ }
+ case CONDITION_OBJECT_ENTRY:
{
- condMeets = true;//handled in Item::IsTargetValidForItemUse
- refId = 0;//cant have references for now
+ if (object->GetTypeId() == ConditionValue1)
+ condMeets = (!ConditionValue2) || (object->GetEntry() == ConditionValue2);
break;
}
- case CONDITION_SPELL:
- if (mConditionValue2 == 1)
- condMeets = player->HasSpell(mConditionValue1);
- else
- condMeets = !player->HasSpell(mConditionValue1);
+ case CONDITION_TYPE_MASK:
+ {
+ condMeets = object->isType(ConditionValue1);
break;
- case CONDITION_NOITEM:
- condMeets = !player->HasItemCount(mConditionValue1, 1, mConditionValue2 ? true : false);
+ }
+ case CONDITION_RELATION_TO:
+ {
+ if (WorldObject* toObject = sourceInfo.mConditionTargets[ConditionValue1])
+ {
+ Unit* toUnit = toObject->ToUnit();
+ Unit* unit = object->ToUnit();
+ if (toUnit && unit)
+ {
+ switch (ConditionValue2)
+ {
+ case RELATION_SELF:
+ condMeets = unit == toUnit;
+ break;
+ case RELATION_IN_PARTY:
+ condMeets = unit->IsInPartyWith(toUnit);
+ break;
+ case RELATION_IN_RAID_OR_PARTY:
+ condMeets = unit->IsInRaidWith(toUnit);
+ break;
+ case RELATION_OWNED_BY:
+ condMeets = unit->GetOwnerGUID() == toUnit->GetGUID();
+ break;
+ case RELATION_PASSENGER_OF:
+ condMeets = unit->IsOnVehicle(toUnit);
+ break;
+ }
+ }
+ }
break;
- case CONDITION_LEVEL:
+ }
+ case CONDITION_REACTION_TO:
{
- switch (mConditionValue2)
+ if (WorldObject* toObject = sourceInfo.mConditionTargets[ConditionValue1])
{
- case LVL_COND_EQ:
- condMeets = player->getLevel() == mConditionValue1;
- break;
- case LVL_COND_HIGH:
- condMeets = player->getLevel() > mConditionValue1;
- break;
- case LVL_COND_LOW:
- condMeets = player->getLevel() < mConditionValue1;
- break;
- case LVL_COND_HIGH_EQ:
- condMeets = player->getLevel() >= mConditionValue1;
- break;
- case LVL_COND_LOW_EQ:
- condMeets = player->getLevel() <= mConditionValue1;
- break;
+ Unit* toUnit = toObject->ToUnit();
+ Unit* unit = object->ToUnit();
+ if (toUnit && unit)
+ condMeets = (1 << unit->GetReactionTo(toUnit)) & ConditionValue2;
}
break;
}
- case CONDITION_DRUNKENSTATE:
+ case CONDITION_DISTANCE_TO:
{
- condMeets = (uint32)Player::GetDrunkenstateByValue(player->GetDrunkValue()) >= mConditionValue1;
+ if (WorldObject* toObject = sourceInfo.mConditionTargets[ConditionValue1])
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue3), object->GetDistance(toObject), static_cast<float>(ConditionValue2));
break;
}
- case CONDITION_NEAR_CREATURE:
+ case CONDITION_ALIVE:
{
- condMeets = GetClosestCreatureWithEntry(player, mConditionValue1, (float)mConditionValue2) ? true : false;
+ if (Unit* unit = object->ToUnit())
+ condMeets = unit->isAlive();
break;
}
- case CONDITION_NEAR_GAMEOBJECT:
+ case CONDITION_HP_VAL:
+ {
+ if (Unit* unit = object->ToUnit())
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), unit->GetHealth(), static_cast<uint32>(ConditionValue1));
+ break;
+ }
+ case CONDITION_HP_PCT:
{
- condMeets = GetClosestGameObjectWithEntry(player, mConditionValue1, (float)mConditionValue2) ? true : false;
+ if (Unit* unit = object->ToUnit())
+ condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), unit->GetHealthPct(), static_cast<float>(ConditionValue1));
+ break;
+ }
+ case CONDITION_WORLD_STATE:
+ {
+ condMeets = ConditionValue2 == sWorld->getWorldState(ConditionValue1);
+ break;
+ }
+ case CONDITION_PHASEMASK:
+ {
+ condMeets = object->GetPhaseMask() & ConditionValue1;
break;
}
default:
condMeets = false;
- refId = 0;
break;
}
- switch (mSourceType)
+
+ if (NegativeCondition)
+ condMeets = !condMeets;
+
+ if (!condMeets)
+ sourceInfo.mLastFailedCondition = this;
+
+ bool script = sScriptMgr->OnConditionCheck(this, sourceInfo); // Returns true by default.
+ return condMeets && script;
+}
+
+uint32 Condition::GetSearcherTypeMaskForCondition()
+{
+ // build mask of types for which condition can return true
+ // this is used for speeding up gridsearches
+ if (NegativeCondition)
+ return (GRID_MAP_TYPE_MASK_ALL);
+ uint32 mask = 0;
+ switch (ConditionType)
{
- case CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET:
- case CONDITION_SOURCE_TYPE_SPELL:
- sendErrorMsg = true;
+ case CONDITION_NONE:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_AURA:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_ITEM:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_ITEM_EQUIPPED:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_ZONEID:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_REPUTATION_RANK:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_ACHIEVEMENT:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_TEAM:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_CLASS:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_RACE:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_SKILL:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_QUESTREWARDED:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_QUESTTAKEN:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_QUEST_COMPLETE:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_QUEST_NONE:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_ACTIVE_EVENT:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_INSTANCE_DATA:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_MAPID:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_AREAID:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_SPELL:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_LEVEL:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_DRUNKENSTATE:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_NEAR_CREATURE:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_NEAR_GAMEOBJECT:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_OBJECT_ENTRY:
+ switch (ConditionValue1)
+ {
+ case TYPEID_UNIT:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE;
+ break;
+ case TYPEID_PLAYER:
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case TYPEID_GAMEOBJECT:
+ mask |= GRID_MAP_TYPE_MASK_GAMEOBJECT;
+ break;
+ case TYPEID_CORPSE:
+ mask |= GRID_MAP_TYPE_MASK_CORPSE;
+ break;
+ default:
+ break;
+ }
+ case CONDITION_TYPE_MASK:
+ if (ConditionValue1 & TYPEMASK_UNIT)
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ if (ConditionValue1 & TYPEMASK_PLAYER)
+ mask |= GRID_MAP_TYPE_MASK_PLAYER;
+ if (ConditionValue1 & TYPEMASK_GAMEOBJECT)
+ mask |= GRID_MAP_TYPE_MASK_GAMEOBJECT;
+ if (ConditionValue1 & TYPEMASK_CORPSE)
+ mask |= GRID_MAP_TYPE_MASK_CORPSE;
+ break;
+ case CONDITION_RELATION_TO:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_REACTION_TO:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_DISTANCE_TO:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_ALIVE:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_HP_VAL:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_HP_PCT:
+ mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER;
+ break;
+ case CONDITION_WORLD_STATE:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
+ break;
+ case CONDITION_PHASEMASK:
+ mask |= GRID_MAP_TYPE_MASK_ALL;
break;
default:
+ ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!");
break;
}
+ return mask;
+}
- bool refMeets = false;
- if (condMeets && refId)//only have to check references if 'this' is met
+uint32 Condition::GetMaxAvailableConditionTargets()
+{
+ // returns number of targets which are available for given source type
+ switch(SourceType)
{
- ConditionList ref = sConditionMgr->GetConditionReferences(refId);
- refMeets = sConditionMgr->IsPlayerMeetToConditions(player, ref);
+ case CONDITION_SOURCE_TYPE_SPELL:
+ case CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
+ case CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE:
+ case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
+ case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT:
+ case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
+ case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
+ case CONDITION_SOURCE_TYPE_SMART_EVENT:
+ return 2;
+ default:
+ return 1;
}
- else
- refMeets = true;
-
- if (sendErrorMsg && ErrorTextd && (!condMeets || !refMeets))//send special error from DB
- player->m_ConditionErrorMsgId = ErrorTextd;
-
- bool script = sScriptMgr->OnConditionCheck(this, player, invoker); // Returns true by default.
- return condMeets && refMeets && script;
}
ConditionMgr::ConditionMgr()
@@ -249,39 +466,80 @@ ConditionList ConditionMgr::GetConditionReferences(uint32 refId)
return conditions;
}
-bool ConditionMgr::IsPlayerMeetToConditionList(Player* player, ConditionList const& conditions, Unit* invoker /*= NULL*/)
+uint32 ConditionMgr::GetSearcherTypeMaskForConditionList(ConditionList const& conditions)
+{
+ if (conditions.empty())
+ return GRID_MAP_TYPE_MASK_ALL;
+ // groupId, typeMask
+ std::map<uint32, uint32> ElseGroupStore;
+ for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
+ {
+ // no point of having not loaded conditions in list
+ ASSERT((*i)->isLoaded() && "ConditionMgr::GetSearcherTypeMaskForConditionList - not yet loaded condition found in list");
+ std::map<uint32, uint32>::const_iterator itr = ElseGroupStore.find((*i)->ElseGroup);
+ // group not filled yet, fill with widest mask possible
+ if (itr == ElseGroupStore.end())
+ ElseGroupStore[(*i)->ElseGroup] = GRID_MAP_TYPE_MASK_ALL;
+ // no point of checking anymore, empty mask
+ else if (!(*itr).second)
+ continue;
+
+ if ((*i)->ReferenceId) // handle reference
+ {
+ ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find((*i)->ReferenceId);
+ ASSERT(ref != ConditionReferenceStore.end() && "ConditionMgr::GetSearcherTypeMaskForConditionList - incorrect reference");
+ ElseGroupStore[(*i)->ElseGroup] &= GetSearcherTypeMaskForConditionList((*ref).second);
+ }
+ else // handle normal condition
+ {
+ // object will match conditions in one ElseGroupStore only when it matches all of them
+ // so, let's find a smallest possible mask which satisfies all conditions
+ ElseGroupStore[(*i)->ElseGroup] &= (*i)->GetSearcherTypeMaskForCondition();
+ }
+ }
+ // object will match condition when one of the checks in ElseGroupStore is matching
+ // so, let's include all possible masks
+ uint32 mask = 0;
+ for (std::map<uint32, uint32>::const_iterator i = ElseGroupStore.begin(); i != ElseGroupStore.end(); ++i)
+ mask |= i->second;
+
+ return mask;
+}
+
+bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo, ConditionList const& conditions)
{
+ // groupId, groupCheckPassed
std::map<uint32, bool> ElseGroupStore;
for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
{
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->mConditionType, (*i)->mConditionValue1);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->ConditionType, (*i)->ConditionValue1);
if ((*i)->isLoaded())
{
- std::map<uint32, bool>::const_iterator itr = ElseGroupStore.find((*i)->mElseGroup);
+ std::map<uint32, bool>::const_iterator itr = ElseGroupStore.find((*i)->ElseGroup);
if (itr == ElseGroupStore.end())
- ElseGroupStore[(*i)->mElseGroup] = true;
+ ElseGroupStore[(*i)->ElseGroup] = true;
else if (!(*itr).second)
continue;
- if ((*i)->mReferenceId)//handle reference
+ if ((*i)->ReferenceId)//handle reference
{
- ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find((*i)->mReferenceId);
+ ConditionReferenceContainer::const_iterator ref = ConditionReferenceStore.find((*i)->ReferenceId);
if (ref != ConditionReferenceStore.end())
{
- if (!IsPlayerMeetToConditionList(player, (*ref).second, invoker))
- ElseGroupStore[(*i)->mElseGroup] = false;
+ if (!IsObjectMeetToConditionList(sourceInfo, (*ref).second))
+ ElseGroupStore[(*i)->ElseGroup] = false;
}
else
{
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "IsPlayerMeetToConditionList: Reference template -%u not found",
- (*i)->mReferenceId);//checked at loading, should never happen
+ (*i)->ReferenceId);//checked at loading, should never happen
}
}
else //handle normal condition
{
- if (!(*i)->Meets(player, invoker))
- ElseGroupStore[(*i)->mElseGroup] = false;
+ if (!(*i)->Meets(sourceInfo))
+ ElseGroupStore[(*i)->ElseGroup] = false;
}
}
}
@@ -292,21 +550,52 @@ bool ConditionMgr::IsPlayerMeetToConditionList(Player* player, ConditionList con
return false;
}
-bool ConditionMgr::IsPlayerMeetToConditions(Player* player, ConditionList const& conditions, Unit* invoker /*= NULL*/)
+bool ConditionMgr::IsObjectMeetToConditions(WorldObject* object, ConditionList const& conditions)
+{
+ ConditionSourceInfo srcInfo = ConditionSourceInfo(object);
+ return IsObjectMeetToConditions(srcInfo, conditions);
+}
+
+bool ConditionMgr::IsObjectMeetToConditions(WorldObject* object1, WorldObject* object2, ConditionList const& conditions)
+{
+ ConditionSourceInfo srcInfo = ConditionSourceInfo(object1, object2);
+ return IsObjectMeetToConditions(srcInfo, conditions);
+}
+
+bool ConditionMgr::IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, ConditionList const& conditions)
{
if (conditions.empty())
return true;
- if (player)
- player->m_ConditionErrorMsgId = 0;
-
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditions");
- bool result = IsPlayerMeetToConditionList(player, conditions, invoker);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsObjectMeetToConditions");
+ return IsObjectMeetToConditionList(sourceInfo, conditions);
+}
- if (player && player->m_ConditionErrorMsgId && player->GetSession() && !result)
- player->GetSession()->SendNotification(player->m_ConditionErrorMsgId); //m_ConditionErrorMsgId is set only if a condition was not met
+bool ConditionMgr::CanHaveSourceGroupSet(ConditionSourceType sourceType) const
+{
+ return (sourceType == CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE ||
+ sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU ||
+ sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION ||
+ sourceType == CONDITION_SOURCE_TYPE_VEHICLE_SPELL ||
+ sourceType == CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET ||
+ sourceType == CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT ||
+ sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT);
+}
- return result;
+bool ConditionMgr::CanHaveSourceIdSet(ConditionSourceType sourceType) const
+{
+ return (sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT);
}
ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry)
@@ -328,33 +617,50 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType
return spellCond;
}
-ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureID, uint32 spellID)
+
+ConditionList ConditionMgr::GetConditionsForSpellClickEvent(uint32 creatureId, uint32 spellId)
{
ConditionList cond;
- VehicleSpellConditionContainer::const_iterator itr = VehicleSpellConditionStore.find(creatureID);
+ CreatureSpellConditionContainer::const_iterator itr = SpellClickEventConditionStore.find(creatureId);
+ if (itr != SpellClickEventConditionStore.end())
+ {
+ ConditionTypeContainer::const_iterator i = (*itr).second.find(spellId);
+ if (i != (*itr).second.end())
+ {
+ cond = (*i).second;
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForSpellClickEvent: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
+ }
+ }
+ return cond;
+}
+
+ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureId, uint32 spellId)
+{
+ ConditionList cond;
+ CreatureSpellConditionContainer::const_iterator itr = VehicleSpellConditionStore.find(creatureId);
if (itr != VehicleSpellConditionStore.end())
{
- ConditionTypeContainer::const_iterator i = (*itr).second.find(spellID);
+ ConditionTypeContainer::const_iterator i = (*itr).second.find(spellId);
if (i != (*itr).second.end())
{
cond = (*i).second;
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureID, spellID);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
}
}
return cond;
}
-ConditionList ConditionMgr::GetConditionsForSmartEvent(uint32 entry, uint32 eventId, uint32 sourceType)
+ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType)
{
ConditionList cond;
- SmartEventConditionContainer::const_iterator itr = SmartEventConditionStore.find(std::make_pair(entry, sourceType));
+ SmartEventConditionContainer::const_iterator itr = SmartEventConditionStore.find(std::make_pair(entryOrGuid, sourceType));
if (itr != SmartEventConditionStore.end())
{
ConditionTypeContainer::const_iterator i = (*itr).second.find(eventId + 1);
if (i != (*itr).second.end())
{
cond = (*i).second;
- sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForSmartEvent: found conditions for Smart Event entry %u event_id %u", entry, eventId);
+ sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId);
}
}
return cond;
@@ -388,10 +694,11 @@ void ConditionMgr::LoadConditions(bool isReload)
sLog->outString("Re-Loading `gossip_menu_option` Table for Conditions!");
sObjectMgr->LoadGossipMenuItems();
+ sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
}
- QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, "
- " ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName FROM conditions");
+ QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, "
+ " ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorTextId, ScriptName FROM conditions");
if (!result)
{
@@ -409,19 +716,24 @@ void ConditionMgr::LoadConditions(bool isReload)
Condition* cond = new Condition();
int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
- cond->mSourceGroup = fields[1].GetUInt32();
- cond->mSourceEntry = fields[2].GetUInt32();
- cond->mSourceId = fields[3].GetUInt32();
- cond->mElseGroup = fields[4].GetUInt32();
+ cond->SourceGroup = fields[1].GetUInt32();
+ cond->SourceEntry = fields[2].GetInt32();
+ cond->SourceId = fields[3].GetUInt32();
+ cond->ElseGroup = fields[4].GetUInt32();
int32 iConditionTypeOrReference = fields[5].GetInt32();
- cond->mConditionValue1 = fields[6].GetUInt32();
- cond->mConditionValue2 = fields[7].GetUInt32();
- cond->mConditionValue3 = fields[8].GetUInt32();
- cond->ErrorTextd = fields[9].GetUInt32();
- cond->mScriptId = sObjectMgr->GetScriptId(fields[10].GetCString());
+ cond->ConditionTarget = fields[6].GetUInt8();
+ cond->ConditionValue1 = fields[7].GetUInt32();
+ cond->ConditionValue2 = fields[8].GetUInt32();
+ cond->ConditionValue3 = fields[9].GetUInt32();
+ cond->NegativeCondition = fields[10].GetUInt8();
+ cond->ErrorTextId = fields[11].GetUInt32();
+ cond->ScriptId = sObjectMgr->GetScriptId(fields[12].GetCString());
if (iConditionTypeOrReference >= 0)
- cond->mConditionType = ConditionType(iConditionTypeOrReference);
+ cond->ConditionType = ConditionTypes(iConditionTypeOrReference);
+
+ if (iSourceTypeOrReferenceId >= 0)
+ cond->SourceType = ConditionSourceType(iSourceTypeOrReferenceId);
if (iConditionTypeOrReference < 0)//it has a reference
{
@@ -431,22 +743,26 @@ void ConditionMgr::LoadConditions(bool isReload)
delete cond;
continue;
}
- cond->mReferenceId = uint32(abs(iConditionTypeOrReference));
+ cond->ReferenceId = uint32(abs(iConditionTypeOrReference));
const char* rowType = "reference template";
if (iSourceTypeOrReferenceId >= 0)
rowType = "reference";
//check for useless data
- if (cond->mConditionValue1)
- sLog->outErrorDb("Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionValue1);
- if (cond->mConditionValue2)
- sLog->outErrorDb("Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionValue2);
- if (cond->mConditionValue3)
- sLog->outErrorDb("Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->mConditionValue3);
- if (cond->mSourceGroup && iSourceTypeOrReferenceId < 0)
- sLog->outErrorDb("Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->mSourceGroup);
- if (cond->mSourceEntry && iSourceTypeOrReferenceId < 0)
- sLog->outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->mSourceEntry);
+ if (cond->ConditionTarget)
+ sLog->outErrorDb("Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget);
+ if (cond->ConditionValue1)
+ sLog->outErrorDb("Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3);
+ if (cond->NegativeCondition)
+ sLog->outErrorDb("Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition);
+ if (cond->SourceGroup && iSourceTypeOrReferenceId < 0)
+ sLog->outErrorDb("Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup);
+ if (cond->SourceEntry && iSourceTypeOrReferenceId < 0)
+ sLog->outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry);
}
else if (!isConditionTypeValid(cond))//doesn't have reference, validate ConditionType
{
@@ -467,8 +783,6 @@ void ConditionMgr::LoadConditions(bool isReload)
continue;
}//end of reference templates
- cond->mSourceType = ConditionSourceType(iSourceTypeOrReferenceId);
-
//if not a reference and SourceType is invalid, skip
if (iConditionTypeOrReference >= 0 && !isSourceTypeValid(cond))
{
@@ -477,53 +791,60 @@ void ConditionMgr::LoadConditions(bool isReload)
}
//Grouping is only allowed for some types (loot templates, gossip menus, gossip items)
- if (cond->mSourceGroup && !isGroupable(cond->mSourceType))
+ if (cond->SourceGroup && !CanHaveSourceGroupSet(cond->SourceType))
{
- sLog->outErrorDb("Condition type %u has not allowed grouping %u!", uint32(cond->mSourceType), cond->mSourceGroup);
+ sLog->outErrorDb("Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup);
delete cond;
continue;
}
- else if (cond->mSourceGroup)
+ if (cond->SourceId && !CanHaveSourceIdSet(cond->SourceType))
+ {
+ sLog->outErrorDb("Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId);
+ delete cond;
+ continue;
+ }
+
+ if (cond->SourceGroup)
{
bool valid = false;
- //handle grouped conditions
- switch (cond->mSourceType)
+ // handle grouped conditions
+ switch (cond->SourceType)
{
case CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Creature.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Creature.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Disenchant.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Disenchant.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Fishing.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Fishing.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Gameobject.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Gameobject.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Item.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Item.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Mail.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Mail.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Milling.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Milling.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Pickpocketing.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Pickpocketing.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Prospecting.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Prospecting.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Reference.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Reference.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Skinning.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Skinning.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE:
- valid = addToLootTemplate(cond, LootTemplates_Spell.GetLootForConditionFill(cond->mSourceGroup));
+ valid = addToLootTemplate(cond, LootTemplates_Spell.GetLootForConditionFill(cond->SourceGroup));
break;
case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
valid = addToGossipMenus(cond);
@@ -531,21 +852,44 @@ void ConditionMgr::LoadConditions(bool isReload)
case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
valid = addToGossipMenuItems(cond);
break;
+ case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT:
+ {
+ //if no list for npc create one
+ if (SpellClickEventConditionStore.find(cond->SourceGroup) == SpellClickEventConditionStore.end())
+ {
+ ConditionTypeContainer cmap;
+ SpellClickEventConditionStore[cond->SourceGroup] = cmap;
+ }
+ //if no list for spellclick spell create one
+ if (SpellClickEventConditionStore[cond->SourceGroup].find(cond->SourceEntry) == SpellClickEventConditionStore[cond->SourceGroup].end())
+ {
+ ConditionList clist;
+ SpellClickEventConditionStore[cond->SourceGroup][cond->SourceEntry] = clist;
+ }
+ SpellClickEventConditionStore[cond->SourceGroup][cond->SourceEntry].push_back(cond);
+ valid = true;
+ ++count;
+ continue; // do not add to m_AllocatedMemory to avoid double deleting
+ break;
+ }
+ case CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
+ valid = addToSpellImplicitTargetConditions(cond);
+ break;
case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
{
//if no list for vehicle create one
- if (VehicleSpellConditionStore.find(cond->mSourceGroup) == VehicleSpellConditionStore.end())
+ if (VehicleSpellConditionStore.find(cond->SourceGroup) == VehicleSpellConditionStore.end())
{
ConditionTypeContainer cmap;
- VehicleSpellConditionStore[cond->mSourceGroup] = cmap;
+ VehicleSpellConditionStore[cond->SourceGroup] = cmap;
}
//if no list for vehicle's spell create one
- if (VehicleSpellConditionStore[cond->mSourceGroup].find(cond->mSourceEntry) == VehicleSpellConditionStore[cond->mSourceGroup].end())
+ if (VehicleSpellConditionStore[cond->SourceGroup].find(cond->SourceEntry) == VehicleSpellConditionStore[cond->SourceGroup].end())
{
ConditionList clist;
- VehicleSpellConditionStore[cond->mSourceGroup][cond->mSourceEntry] = clist;
+ VehicleSpellConditionStore[cond->SourceGroup][cond->SourceEntry] = clist;
}
- VehicleSpellConditionStore[cond->mSourceGroup][cond->mSourceEntry].push_back(cond);
+ VehicleSpellConditionStore[cond->SourceGroup][cond->SourceEntry].push_back(cond);
valid = true;
++count;
continue; // do not add to m_AllocatedMemory to avoid double deleting
@@ -553,18 +897,18 @@ void ConditionMgr::LoadConditions(bool isReload)
case CONDITION_SOURCE_TYPE_SMART_EVENT:
{
// If the entry does not exist, create a new list
- std::pair<uint32, uint32> key = std::make_pair(cond->mSourceEntry, cond->mSourceId);
+ std::pair<int32, uint32> key = std::make_pair(cond->SourceEntry, cond->SourceId);
if (SmartEventConditionStore.find(key) == SmartEventConditionStore.end())
{
ConditionTypeContainer cmap;
SmartEventConditionStore[key] = cmap;
}
- if (SmartEventConditionStore[key].find(cond->mSourceGroup) == SmartEventConditionStore[key].end())
+ if (SmartEventConditionStore[key].find(cond->SourceGroup) == SmartEventConditionStore[key].end())
{
ConditionList clist;
- SmartEventConditionStore[key][cond->mSourceGroup] = clist;
+ SmartEventConditionStore[key][cond->SourceGroup] = clist;
}
- SmartEventConditionStore[key][cond->mSourceGroup].push_back(cond);
+ SmartEventConditionStore[key][cond->SourceGroup].push_back(cond);
valid = true;
++count;
continue;
@@ -575,7 +919,7 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!valid)
{
- sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->mSourceGroup);
+ sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->SourceGroup);
delete cond;
}
else
@@ -588,21 +932,21 @@ void ConditionMgr::LoadConditions(bool isReload)
//handle not grouped conditions
//make sure we have a storage list for our SourceType
- if (ConditionStore.find(cond->mSourceType) == ConditionStore.end())
+ if (ConditionStore.find(cond->SourceType) == ConditionStore.end())
{
ConditionTypeContainer mTypeMap;
- ConditionStore[cond->mSourceType] = mTypeMap;//add new empty list for SourceType
+ ConditionStore[cond->SourceType] = mTypeMap;//add new empty list for SourceType
}
//make sure we have a condition list for our SourceType's entry
- if (ConditionStore[cond->mSourceType].find(cond->mSourceEntry) == ConditionStore[cond->mSourceType].end())
+ if (ConditionStore[cond->SourceType].find(cond->SourceEntry) == ConditionStore[cond->SourceType].end())
{
ConditionList mCondList;
- ConditionStore[cond->mSourceType][cond->mSourceEntry] = mCondList;
+ ConditionStore[cond->SourceType][cond->SourceEntry] = mCondList;
}
//add new Condition to storage based on Type/Entry
- ConditionStore[cond->mSourceType][cond->mSourceEntry].push_back(cond);
+ ConditionStore[cond->SourceType][cond->SourceEntry].push_back(cond);
++count;
}
while (result->NextRow());
@@ -615,26 +959,26 @@ bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot)
{
if (!loot)
{
- sLog->outErrorDb("ConditionMgr: LootTemplate %u not found", cond->mSourceGroup);
+ sLog->outErrorDb("ConditionMgr: LootTemplate %u not found", cond->SourceGroup);
return false;
}
if (loot->addConditionItem(cond))
return true;
- sLog->outErrorDb("ConditionMgr: Item %u not found in LootTemplate %u", cond->mSourceEntry, cond->mSourceGroup);
+ sLog->outErrorDb("ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup);
return false;
}
bool ConditionMgr::addToGossipMenus(Condition* cond)
{
- GossipMenusMapBoundsNonConst pMenuBounds = sObjectMgr->GetGossipMenusMapBoundsNonConst(cond->mSourceGroup);
+ GossipMenusMapBoundsNonConst pMenuBounds = sObjectMgr->GetGossipMenusMapBoundsNonConst(cond->SourceGroup);
if (pMenuBounds.first != pMenuBounds.second)
{
- for (GossipMenusMap::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
+ for (GossipMenusContainer::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
{
- if ((*itr).second.entry == cond->mSourceGroup && (*itr).second.text_id == cond->mSourceEntry)
+ if ((*itr).second.entry == cond->SourceGroup && (*itr).second.text_id == uint32(cond->SourceEntry))
{
(*itr).second.conditions.push_back(cond);
return true;
@@ -642,18 +986,18 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
}
}
- sLog->outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->mSourceGroup);
+ sLog->outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->SourceGroup);
return false;
}
bool ConditionMgr::addToGossipMenuItems(Condition* cond)
{
- GossipMenuItemsMapBoundsNonConst pMenuItemBounds = sObjectMgr->GetGossipMenuItemsMapBoundsNonConst(cond->mSourceGroup);
+ GossipMenuItemsMapBoundsNonConst pMenuItemBounds = sObjectMgr->GetGossipMenuItemsMapBoundsNonConst(cond->SourceGroup);
if (pMenuItemBounds.first != pMenuItemBounds.second)
{
- for (GossipMenuItemsMap::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
+ for (GossipMenuItemsContainer::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
{
- if ((*itr).second.MenuId == cond->mSourceGroup && (*itr).second.OptionIndex == cond->mSourceEntry)
+ if ((*itr).second.MenuId == cond->SourceGroup && (*itr).second.OptionIndex == uint32(cond->SourceEntry))
{
(*itr).second.Conditions.push_back(cond);
return true;
@@ -661,380 +1005,402 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
}
}
- sLog->outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->mSourceGroup, cond->mSourceEntry);
+ sLog->outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry);
return false;
}
+bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
+{
+ uint32 conditionEffMask = cond->SourceGroup;
+ SpellInfo* spellInfo = const_cast<SpellInfo*>(sSpellMgr->GetSpellInfo(cond->SourceEntry));
+ ASSERT(spellInfo);
+ std::list<uint32> sharedMasks;
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ {
+ // check if effect is already a part of some shared mask
+ bool found = false;
+ for (std::list<uint32>::iterator itr = sharedMasks.begin(); itr != sharedMasks.end(); ++itr)
+ {
+ if ((1<<i) & *itr)
+ {
+ found = true;
+ break;
+ }
+ }
+ if (found)
+ continue;
+
+ // build new shared mask with found effect
+ uint32 sharedMask = (1<<i);
+ ConditionList* cmp = spellInfo->Effects[i].ImplicitTargetConditions;
+ for (uint8 effIndex = i+1; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
+ {
+ if (spellInfo->Effects[effIndex].ImplicitTargetConditions == cmp)
+ sharedMask |= 1<<effIndex;
+ }
+ sharedMasks.push_back(sharedMask);
+ }
+
+ for (std::list<uint32>::iterator itr = sharedMasks.begin(); itr != sharedMasks.end(); ++itr)
+ {
+ // some effect indexes should have same data
+ if (uint32 commonMask = *itr & conditionEffMask)
+ {
+ uint8 firstEffIndex = 0;
+ for (; firstEffIndex < MAX_SPELL_EFFECTS; ++firstEffIndex)
+ if ((1<<firstEffIndex) & *itr)
+ break;
+
+ // get shared data
+ ConditionList* sharedList = spellInfo->Effects[firstEffIndex].ImplicitTargetConditions;
+
+ // there's already data entry for that sharedMask
+ if (sharedList)
+ {
+ // we have overlapping masks in db
+ if (conditionEffMask != *itr)
+ {
+ sLog->outErrorDb("SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - "
+ "effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->SourceEntry, cond->SourceGroup);
+ return false;
+ }
+ }
+ // no data for shared mask, we can create new submask
+ else
+ {
+ // add new list, create new shared mask
+ sharedList = new ConditionList();
+ for (uint8 i = firstEffIndex; i < MAX_SPELL_EFFECTS; ++i)
+ if ((1<<i) & commonMask)
+ spellInfo->Effects[i].ImplicitTargetConditions = sharedList;
+ }
+ sharedList->push_back(cond);
+ break;
+ }
+ }
+ return true;
+}
+
bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
- if (cond->mSourceType == CONDITION_SOURCE_TYPE_NONE || cond->mSourceType >= CONDITION_SOURCE_TYPE_MAX)
+ if (cond->SourceType == CONDITION_SOURCE_TYPE_NONE || cond->SourceType >= CONDITION_SOURCE_TYPE_MAX)
{
- sLog->outErrorDb("Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->mSourceType));
+ sLog->outErrorDb("Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType));
return false;
}
- switch (cond->mSourceType)
+ switch (cond->SourceType)
{
case CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE:
{
- if (!LootTemplates_Creature.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Creature.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Creature.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Creature.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE:
{
- if (!LootTemplates_Disenchant.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Disenchant.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Disenchant.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Disenchant.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Fishing.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Fishing.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Fishing.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Fishing.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE:
{
- if (!LootTemplates_Gameobject.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Gameobject.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Gameobject.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Gameobject.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE:
{
- if (!LootTemplates_Item.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Item.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Item.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Item.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE:
{
- if (!LootTemplates_Mail.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Mail.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Mail.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Mail.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Milling.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Milling.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Milling.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Milling.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Pickpocketing.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Pickpocketing.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Pickpocketing.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Pickpocketing.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Prospecting.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Prospecting.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Prospecting.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Prospecting.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE:
{
- if (!LootTemplates_Reference.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Reference.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Reference.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Reference.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE:
{
- if (!LootTemplates_Skinning.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Skinning.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Skinning.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Skinning.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE:
{
- if (!LootTemplates_Spell.HaveLootFor(cond->mSourceGroup))
+ if (!LootTemplates_Spell.HaveLootFor(cond->SourceGroup))
{
- sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
- LootTemplate* loot = LootTemplates_Spell.GetLootForConditionFill(cond->mSourceGroup);
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto && !loot->isReference(cond->mSourceEntry))
+ LootTemplate* loot = LootTemplates_Spell.GetLootForConditionFill(cond->SourceGroup);
+ ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
+ if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->mSourceType, cond->mSourceEntry);
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
}
- case CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET:
+ case CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
{
- if (cond->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cond->SourceEntry);
+ if (!spellInfo)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, has ConditionType %u. Only CONDITION_SPELL_SCRIPT_TARGET(18) is valid for CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET(14), ignoring.", cond->mSourceEntry, uint32(cond->mConditionType));
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
- SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->mSourceEntry);
- if (!spellProto)
+ if ((cond->SourceGroup > MAX_EFFECT_MASK) || !cond->SourceGroup)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set , ignoring.", cond->SourceEntry, cond->SourceGroup);
return false;
}
- bool targetfound = false;
+ uint32 origGroup = cond->SourceGroup;
+
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
- if (spellProto->Effects[i].TargetA.GetTarget() == TARGET_UNIT_SRC_AREA_ENTRY ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_UNIT_SRC_AREA_ENTRY ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_UNIT_DEST_AREA_ENTRY ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_UNIT_DEST_AREA_ENTRY ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_UNIT_NEARBY_ENTRY ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_UNIT_NEARBY_ENTRY ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_GAMEOBJECT_NEARBY_ENTRY ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_GAMEOBJECT_NEARBY_ENTRY ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_GAMEOBJECT_SRC_AREA ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_GAMEOBJECT_SRC_AREA ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_GAMEOBJECT_DEST_AREA ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_GAMEOBJECT_DEST_AREA ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_DEST_NEARBY_ENTRY ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_DEST_NEARBY_ENTRY ||
- spellProto->Effects[i].TargetA.GetTarget() == TARGET_UNIT_CONE_ENTRY ||
- spellProto->Effects[i].TargetB.GetTarget() == TARGET_UNIT_CONE_ENTRY)
+ if (!((1<<i) & cond->SourceGroup))
+ continue;
+
+ switch (spellInfo->Effects[i].TargetA.GetSelectionCategory())
{
- targetfound = true;
- //break;
+ case TARGET_SELECT_CATEGORY_NEARBY:
+ case TARGET_SELECT_CATEGORY_CONE:
+ case TARGET_SELECT_CATEGORY_AREA:
+ continue;
+ default:
+ break;
}
- else if (cond->mConditionValue3 & (1 << i))
+
+ switch (spellInfo->Effects[i].TargetB.GetSelectionCategory())
{
- cond->mConditionValue3 &= ~(1 << i);
- sLog->outErrorDb("SourceEntry %u in `condition` table does not have any implicit target TARGET_UNIT_NEARBY_ENTRY(38) or TARGET_DEST_NEARBY_ENTRY (46)"
- ", TARGET_UNIT_SRC_AREA_ENTRY(7), TARGET_UNIT_DEST_AREA_ENTRY(8), TARGET_UNIT_CONE_ENTRY(60), TARGET_GAMEOBJECT_NEARBY_ENTRY(40)"
- "TARGET_GAMEOBJECT_SRC_AREA(51), TARGET_GAMEOBJECT_DEST_AREA(52) in effect %u", cond->mSourceEntry, uint32(i));
+ case TARGET_SELECT_CATEGORY_NEARBY:
+ case TARGET_SELECT_CATEGORY_CONE:
+ case TARGET_SELECT_CATEGORY_AREA:
+ continue;
+ default:
+ break;
}
+
+ sLog->outErrorDb("SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
+ cond->SourceGroup &= ~(1<<i);
}
- if (!targetfound && !cond->mConditionValue3) // cond->mConditionValue3 already errored up there
- {
- sLog->outErrorDb("SourceEntry %u in `condition` table does not have any implicit target TARGET_UNIT_NEARBY_ENTRY(38) or TARGET_DEST_NEARBY_ENTRY (46)"
- ", TARGET_UNIT_SRC_AREA_ENTRY(7), TARGET_UNIT_DEST_AREA_ENTRY(8), TARGET_UNIT_CONE_ENTRY(60), TARGET_GAMEOBJECT_NEARBY_ENTRY(40)"
- "TARGET_GAMEOBJECT_SRC_AREA(51), TARGET_GAMEOBJECT_DEST_AREA(52)", cond->mSourceEntry);
- return false;
- }
- if ((cond->mConditionValue1 == SPELL_TARGET_TYPE_DEAD) && !spellProto->IsAllowingDeadTarget())
- {
- sLog->outErrorDb("SourceEntry %u in `condition` table does have SPELL_TARGET_TYPE_DEAD specified but spell does not have SPELL_ATTR2_CAN_TARGET_DEAD", cond->mSourceEntry);
+ // all effects were removed, no need to add the condition at all
+ if (!cond->SourceGroup)
return false;
- }
break;
}
case CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE:
{
- if (!sObjectMgr->GetCreatureTemplate(cond->mSourceEntry))
+ if (!sObjectMgr->GetCreatureTemplate(cond->SourceEntry))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_SPELL:
{
- SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->mSourceEntry);
+ SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry);
if (!spellProto)
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
}
- case CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET:
- {
- if (cond->mConditionType != CONDITION_ITEM_TARGET)
+ case CONDITION_SOURCE_TYPE_QUEST_ACCEPT:
+ if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, has ConditionType %u. Only CONDITION_ITEM_TARGET(24) is valid for CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET(18), ignoring.", cond->mSourceEntry, uint32(cond->mConditionType));
+ sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry);
return false;
}
-
- ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry);
- if (!pItemProto)
+ break;
+ case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK:
+ if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `item_tamplate`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry);
return false;
}
-
- bool bIsItemSpellValid = false;
- for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
- {
- if (SpellInfo const* pSpellInfo = sSpellMgr->GetSpellInfo(pItemProto->Spells[i].SpellId))
- {
- if (pItemProto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE ||
- pItemProto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE)
- {
- ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET, pSpellInfo->Id);//script loading is done before item target loading
- if (!conditions.empty())
- break;
-
- for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
- {
- if (pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
- pSpellInfo->Effects[j].TargetB.GetTarget() == TARGET_UNIT_TARGET_ENEMY ||
- pSpellInfo->Effects[j].TargetA.GetTarget() == TARGET_UNIT_TARGET_ANY ||
- pSpellInfo->Effects[j].TargetB.GetTarget() == TARGET_UNIT_TARGET_ANY)
- {
- bIsItemSpellValid = true;
- break;
- }
- }
-
- if (bIsItemSpellValid)
- break;
- }
- }
- }
-
- if (!bIsItemSpellValid)
- {
- sLog->outErrorDb("Conditions: CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET for item %u, which either doesn't have item spelltrigger or its spells don't have implicit target "
- "TARGET_UNIT_TARGET_ENEMY(6), TARGET_UNIT_TARGET_ANY(25), or the spells are already listed in CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET conditions.", cond->mSourceEntry);
- break;
- }
break;
- }
- case CONDITION_SOURCE_TYPE_QUEST_ACCEPT:
- if (!sObjectMgr->GetQuestTemplate(cond->mSourceEntry))
+ case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
+ if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
- break;
- case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK:
- if (!sObjectMgr->GetQuestTemplate(cond->mSourceEntry))
+
+ if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
{
- sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
- case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
- if (!sObjectMgr->GetCreatureTemplate(cond->mSourceGroup))
+ case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT:
+ if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->mSourceGroup);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
- if (!sSpellMgr->GetSpellInfo(cond->mSourceEntry))
+ if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
{
- sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->mSourceEntry);
+ sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
@@ -1050,113 +1416,131 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
}
bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
- if (cond->mConditionType == CONDITION_NONE || cond->mConditionType >= CONDITION_MAX)
+ if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX)
{
- sLog->outErrorDb("Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->mConditionType), cond->mSourceEntry);
+ sLog->outErrorDb("Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry);
return false;
}
- switch (cond->mConditionType)
+ if (cond->ConditionTarget >= cond->GetMaxAvailableConditionTargets())
+ {
+ sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry);
+ return false;
+ }
+
+ switch (cond->ConditionType)
{
case CONDITION_AURA:
{
- if (!sSpellMgr->GetSpellInfo(cond->mConditionValue1))
+ if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
{
- sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 > 2)
+ if (cond->ConditionValue2 > EFFECT_2)
{
- sLog->outErrorDb("Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2);
return false;
}
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Aura condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ITEM:
{
- ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1);
+ ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
if (!proto)
{
- sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->ConditionValue1);
return false;
}
- if (!cond->mConditionValue2)
+ if (!cond->ConditionValue2)
{
- sLog->outErrorDb("Item condition has 0 set for item count in value2 (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2);
return false;
}
break;
}
case CONDITION_ITEM_EQUIPPED:
{
- ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1);
+ ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
if (!proto)
{
- sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("ItemEquipped condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ZONEID:
{
- AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->mConditionValue1);
+ AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1);
if (!areaEntry)
{
- sLog->outErrorDb("Zone condition has non existing area (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1);
return false;
}
if (areaEntry->zone != 0)
{
- sLog->outErrorDb("Zone condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Zone condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_REPUTATION_RANK:
{
- FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->mConditionValue1);
+ FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->ConditionValue1);
if (!factionEntry)
{
- sLog->outErrorDb("Reputation condition has non existing faction (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1);
return false;
}
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TEAM:
{
- if (cond->mConditionValue1 != ALLIANCE && cond->mConditionValue1 != HORDE)
+ if (cond->ConditionValue1 != ALLIANCE && cond->ConditionValue1 != HORDE)
{
- sLog->outErrorDb("Team condition specifies unknown team (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Team condition specifies unknown team (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Team condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Team condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Team condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_SKILL:
{
- SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->mConditionValue1);
+ SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->ConditionValue1);
if (!pSkill)
{
- sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 < 1 || cond->mConditionValue2 > sWorld->GetConfigMaxSkillValue())
+ if (cond->ConditionValue2 < 1 || cond->ConditionValue2 > sWorld->GetConfigMaxSkillValue())
{
- sLog->outErrorDb("Skill condition specifies invalid skill value (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("Skill condition specifies invalid skill value (%u), skipped", cond->ConditionValue2);
return false;
}
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Skill condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_QUESTREWARDED:
@@ -1164,246 +1548,331 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case CONDITION_QUEST_NONE:
case CONDITION_QUEST_COMPLETE:
{
- if (!sObjectMgr->GetQuestTemplate(cond->mConditionValue1))
+ if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2 > 1)
- sLog->outErrorDb("Quest condition has useless data in value2 (%u)!", cond->mConditionValue2);
- break;
- }
- case CONDITION_NO_AURA:
- {
- if (!sSpellMgr->GetSpellInfo(cond->mConditionValue1))
- {
- sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->mConditionValue1);
- return false;
- }
-
- if (cond->mConditionValue2 > 2)
- {
- sLog->outErrorDb("Aura condition has non existing effect index (%u) in value2 (must be 0..2), skipped", cond->mConditionValue2);
- return false;
- }
+ if (cond->ConditionValue2 > 1)
+ sLog->outErrorDb("Quest condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Quest condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ACTIVE_EVENT:
{
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
- if (cond->mConditionValue1 >=events.size() || !events[cond->mConditionValue1].isValid())
+ if (cond->ConditionValue1 >=events.size() || !events[cond->ConditionValue1].isValid())
{
- sLog->outErrorDb("Active event condition has non existing event id (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Active event condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ACHIEVEMENT:
{
- AchievementEntry const* achievement = GetAchievementStore()->LookupEntry(cond->mConditionValue1);
+ AchievementEntry const* achievement = GetAchievementStore()->LookupEntry(cond->ConditionValue1);
if (!achievement)
{
- sLog->outErrorDb("Achivemen condition has non existing achivement id (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Achivemen condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_CLASS:
{
- if (!(cond->mConditionValue1 & CLASSMASK_ALL_PLAYABLE))
+ if (!(cond->ConditionValue1 & CLASSMASK_ALL_PLAYABLE))
{
- sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->mConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
+ sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Class condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Class condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Class condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_RACE:
{
- if (!(cond->mConditionValue1 & RACEMASK_ALL_PLAYABLE))
+ if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE))
{
- sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->mConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
+ sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("Race condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Race condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_SPELL_SCRIPT_TARGET:
+ case CONDITION_MAPID:
{
- if (cond->mConditionValue1 >= MAX_SPELL_TARGET_TYPE)
+ MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1);
+ if (!me)
{
- sLog->outErrorDb("SpellTarget condition has non existing spell target type (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->ConditionValue1);
return false;
}
- switch (cond->mConditionValue1)
- {
- case SPELL_TARGET_TYPE_GAMEOBJECT:
- {
- if (cond->mConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->mConditionValue2))
- {
- sLog->outErrorDb("SpellTarget condition has non existing gameobject (%u) as target, skipped", cond->mConditionValue2);
- return false;
- }
- break;
- }
- case SPELL_TARGET_TYPE_CONTROLLED:
- case SPELL_TARGET_TYPE_CREATURE:
- case SPELL_TARGET_TYPE_DEAD:
- {
- if (cond->mConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue2))
- {
- sLog->outErrorDb("SpellTarget condition has non existing creature template entry (%u) as target, skipped", cond->mConditionValue2);
- return false;
- }
-
- const CreatureTemplate* cInfo = sObjectMgr->GetCreatureTemplate(cond->mConditionValue2);
- if (cond->mSourceEntry == 30427 && !cInfo->SkinLootId)
- {
- sLog->outErrorDb("SpellTarget condition has creature entry %u as a target of spellid 30427, but this creature has no skinlootid. Gas extraction will not work!, skipped", cond->mConditionValue2);
- return false;
- }
- break;
- }
- }
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Map condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Map condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_CREATURE_TARGET:
+ case CONDITION_SPELL:
{
- if (!cond->mConditionValue1 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue1))
+ if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
{
- sLog->outErrorDb("CreatureTarget condition has non existing creature template entry (%u) as target, skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
return false;
}
- if (cond->mConditionValue2)
- sLog->outErrorDb("CreatureTarget condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Spell condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Spell condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_TARGET_HEALTH_BELOW_PCT:
+ case CONDITION_LEVEL:
{
- if (cond->mConditionValue1 > 100)
+ if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("TargetHealthBelowPct condition has invalid data in value1 (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("Level condition has invalid option (%u), skipped", cond->ConditionValue2);
return false;
}
-
- if (cond->mConditionValue2)
- sLog->outErrorDb("TargetHealthBelowPct condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Level condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_TARGET_RANGE:
+ case CONDITION_DRUNKENSTATE:
{
- if (cond->mConditionValue2 && cond->mConditionValue2 < cond->mConditionValue1)//maxDist can be 0 for infinit max range
+ if (cond->ConditionValue1 > DRUNKEN_SMASHED)
+ {
+ sLog->outErrorDb("DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue2)
{
- sLog->outErrorDb("TargetRange condition has max distance closer then min distance, skipped");
+ sLog->outErrorDb("DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2);
return false;
}
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_MAPID:
+ case CONDITION_NEAR_CREATURE:
{
- MapEntry const* me = sMapStore.LookupEntry(cond->mConditionValue1);
- if (!me)
+ if (!sObjectMgr->GetCreatureTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1);
return false;
}
-
- if (cond->mConditionValue2)
- sLog->outErrorDb("Map condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_ITEM_TARGET:
+ case CONDITION_NEAR_GAMEOBJECT:
{
- if (!cond->mConditionValue1 || cond->mConditionValue1 > MAX_ITEM_REQ_TARGET_TYPE)
+ if (!sObjectMgr->GetGameObjectTemplate(cond->ConditionValue1))
{
- sLog->outErrorDb("ItemTarget condition has incorrect target type (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1);
return false;
}
-
- if (!cond->mConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->mConditionValue2))
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ break;
+ }
+ case CONDITION_OBJECT_ENTRY:
+ {
+ switch (cond->ConditionValue1)
{
- sLog->outErrorDb("ItemTarget condition has non existing creature template entry (%u) as target, skipped", cond->mConditionValue2);
- return false;
+ case TYPEID_UNIT:
+ if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2))
+ {
+ sLog->outErrorDb("ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2);
+ return false;
+ }
+ break;
+ case TYPEID_GAMEOBJECT:
+ if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2))
+ {
+ sLog->outErrorDb("ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2);
+ return false;
+ }
+ break;
+ case TYPEID_PLAYER:
+ case TYPEID_CORPSE:
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ break;
+ default:
+ sLog->outErrorDb("ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1);
+ return false;
}
-
- if (cond->mConditionValue3)
- sLog->outErrorDb("ItemTarget condition has useless data in value3 (%u)!", cond->mConditionValue3);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_SPELL:
+ case CONDITION_TYPE_MASK:
{
- if (!sSpellMgr->GetSpellInfo(cond->mConditionValue1))
+ if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE)))
{
- sLog->outErrorDb("Spell condition has non existing spell (Id: %d), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2);
return false;
}
-
- if (cond->mConditionValue2)
- sLog->outErrorDb("Spell condition has useless data in value2 (%u)!", cond->mConditionValue2);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_NOITEM:
+ case CONDITION_RELATION_TO:
{
- ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1);
- if (!proto)
+ if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
+ {
+ sLog->outErrorDb("RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue1 == cond->ConditionTarget)
+ {
+ sLog->outErrorDb("RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue2 >= RELATION_MAX)
{
- sLog->outErrorDb("NoItem condition has non existing item (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2);
return false;
}
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_LEVEL:
+ case CONDITION_REACTION_TO:
{
- if (cond->mConditionValue2 >= LVL_COND_MAX)
+ if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
+ {
+ sLog->outErrorDb("ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue1 == cond->ConditionTarget)
+ {
+ sLog->outErrorDb("ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (!cond->ConditionValue2)
{
- sLog->outErrorDb("Level condition has invalid option (%u), skipped", cond->mConditionValue2);
+ sLog->outErrorDb("mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2);
return false;
}
break;
}
- case CONDITION_DRUNKENSTATE:
+ case CONDITION_DISTANCE_TO:
{
- if (cond->mConditionValue1 > DRUNKEN_SMASHED)
+ if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
+ {
+ sLog->outErrorDb("DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue1 == cond->ConditionTarget)
+ {
+ sLog->outErrorDb("DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue3 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("DrunkState condition has invalid state (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3);
return false;
}
break;
}
- case CONDITION_NEAR_CREATURE:
+ case CONDITION_ALIVE:
+ {
+ if (cond->ConditionValue1)
+ sLog->outErrorDb("Alive condition has useless data in value1 (%u)!", cond->ConditionValue1);
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Alive condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Alive condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ break;
+ }
+ case CONDITION_HP_VAL:
{
- if (!sObjectMgr->GetCreatureTemplate(cond->mConditionValue1))
+ if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- sLog->outErrorDb("NearCreature condition has non existing creature template entry (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
return false;
}
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
- case CONDITION_NEAR_GAMEOBJECT:
+ case CONDITION_HP_PCT:
{
- if (!sObjectMgr->GetGameObjectTemplate(cond->mConditionValue1))
+ if (cond->ConditionValue1 > 100)
{
- sLog->outErrorDb("NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->mConditionValue1);
+ sLog->outErrorDb("HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1);
return false;
}
+ if (cond->ConditionValue2 >= COMP_TYPE_MAX)
+ {
+ sLog->outErrorDb("HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
+ return false;
+ }
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_AREAID:
case CONDITION_INSTANCE_DATA:
break;
+ case CONDITION_WORLD_STATE:
+ {
+ if (!sWorld->getWorldState(cond->ConditionValue1))
+ {
+ sLog->outErrorDb("World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1);
+ return false;
+ }
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("World state condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ break;
+ }
+ case CONDITION_PHASEMASK:
+ {
+ if (cond->ConditionValue2)
+ sLog->outErrorDb("Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ if (cond->ConditionValue3)
+ sLog->outErrorDb("Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ break;
+ }
+ case CONDITION_UNUSED_18:
+ sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_18 in `conditions` table - ignoring");
+ return false;
+ case CONDITION_UNUSED_19:
+ sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_19 in `conditions` table - ignoring");
+ return false;
+ case CONDITION_UNUSED_20:
+ sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring");
+ return false;
+ case CONDITION_UNUSED_21:
+ sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring");
+ return false;
+ case CONDITION_UNUSED_24:
+ sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_24 in `conditions` table - ignoring");
+ return false;
default:
break;
}
@@ -1434,7 +1903,7 @@ void ConditionMgr::Clean()
ConditionStore.clear();
- for (VehicleSpellConditionContainer::iterator itr = VehicleSpellConditionStore.begin(); itr != VehicleSpellConditionStore.end(); ++itr)
+ for (CreatureSpellConditionContainer::iterator itr = VehicleSpellConditionStore.begin(); itr != VehicleSpellConditionStore.end(); ++itr)
{
for (ConditionTypeContainer::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
{
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index a9bb97251da..5a5e2dd1c2e 100755
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -24,121 +24,165 @@
class Player;
class Unit;
+class WorldObject;
class LootTemplate;
+struct Condition;
+
+enum ConditionTypes
+{ // value1 value2 value3
+ CONDITION_NONE = 0, // 0 0 0 always true
+ CONDITION_AURA = 1, // spell_id effindex use target? true if player (or target, if value3) has aura of spell_id with effect effindex
+ CONDITION_ITEM = 2, // item_id count bank true if has #count of item_ids (if 'bank' is set it searches in bank slots too)
+ CONDITION_ITEM_EQUIPPED = 3, // item_id 0 0 true if has item_id equipped
+ CONDITION_ZONEID = 4, // zone_id 0 0 true if in zone_id
+ CONDITION_REPUTATION_RANK = 5, // faction_id rankMask 0 true if has min_rank for faction_id
+ CONDITION_TEAM = 6, // player_team 0, 0 469 - Alliance, 67 - Horde)
+ CONDITION_SKILL = 7, // skill_id skill_value 0 true if has skill_value for skill_id
+ CONDITION_QUESTREWARDED = 8, // quest_id 0 0 true if quest_id was rewarded before
+ CONDITION_QUESTTAKEN = 9, // quest_id 0, 0 true while quest active
+ CONDITION_DRUNKENSTATE = 10, // DrunkenState 0, 0 true if player is drunk enough
+ CONDITION_WORLD_STATE = 11, // index value 0 true if world has the value for the index
+ CONDITION_ACTIVE_EVENT = 12, // event_id 0 0 true if event is active
+ CONDITION_INSTANCE_DATA = 13, // entry data 0 true if data is set in current instance
+ CONDITION_QUEST_NONE = 14, // quest_id 0 0 true if doesn't have quest saved
+ CONDITION_CLASS = 15, // class 0 0 true if player's class is equal to class
+ CONDITION_RACE = 16, // race 0 0 true if player's race is equal to race
+ CONDITION_ACHIEVEMENT = 17, // achievement_id 0 0 true if achievement is complete
+ CONDITION_UNUSED_18 = 18, //
+ CONDITION_UNUSED_19 = 19, //
+ CONDITION_UNUSED_20 = 20, //
+ CONDITION_UNUSED_21 = 21, //
+ CONDITION_MAPID = 22, // map_id 0 0 true if in map_id
+ CONDITION_AREAID = 23, // area_id 0 0 true if in area_id
+ CONDITION_UNUSED_24 = 24, //
+ CONDITION_SPELL = 25, // spell_id 0 0 true if player has learned spell
+ CONDITION_PHASEMASK = 26, // phasemask 0 0 true if object is in phasemask
+ CONDITION_LEVEL = 27, // level ComparisonType 0 true if unit's level is equal to param1 (param2 can modify the statement)
+ CONDITION_QUEST_COMPLETE = 28, // quest_id 0 0 true if player has quest_id with all objectives complete, but not yet rewarded
+ CONDITION_NEAR_CREATURE = 29, // creature entry distance 0 true if there is a creature of entry in range
+ CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance 0 true if there is a gameobject of entry in range
+ CONDITION_OBJECT_ENTRY = 31, // TypeID entry 0 true if object is type TypeID and the entry is 0 or matches entry of the object
+ CONDITION_TYPE_MASK = 32, // TypeMask 0 0 true if object is type object's TypeMask matches provided TypeMask
+ CONDITION_RELATION_TO = 33, // ConditionTarget RelationType 0 true if object is in given relation with object specified by ConditionTarget
+ CONDITION_REACTION_TO = 34, // ConditionTarget rankMask 0 true if object's reaction matches rankMask object specified by ConditionTarget
+ CONDITION_DISTANCE_TO = 35, // ConditionTarget distance ComparisonType true if object and ConditionTarget are within distance given by parameters
+ CONDITION_ALIVE = 36, // 0 0 0 true if unit is alive
+ CONDITION_HP_VAL = 37, // hpVal ComparisonType 0 true if unit's hp matches given value
+ CONDITION_HP_PCT = 38, // hpPct ComparisonType 0 true if unit's hp matches given pct
+ CONDITION_MAX = 39 // MAX
+};
-enum ConditionType
-{ // value1 value2 value3
- CONDITION_NONE = 0, // 0 0 0 always true
- CONDITION_AURA = 1, // spell_id effindex use target? true if player (or target, if value3) has aura of spell_id with effect effindex
- CONDITION_ITEM = 2, // item_id count +referenceID true if has #count of item_ids
- CONDITION_ITEM_EQUIPPED = 3, // item_id 0 +referenceID true if has item_id equipped
- CONDITION_ZONEID = 4, // zone_id 0 +referenceID true if in zone_id
- CONDITION_REPUTATION_RANK = 5, // faction_id min_rank +referenceID true if has min_rank for faction_id
- CONDITION_TEAM = 6, // player_team 0, +referenceID 469 - Alliance, 67 - Horde)
- CONDITION_SKILL = 7, // skill_id skill_value +referenceID true if has skill_value for skill_id
- CONDITION_QUESTREWARDED = 8, // quest_id 0 +referenceID true if quest_id was rewarded before
- CONDITION_QUESTTAKEN = 9, // quest_id 0, +referenceID true while quest active
- CONDITION_DRUNKENSTATE = 10, // DrunkenState 0, +referenceID true if player is drunk enough
- CONDITION_NO_AURA = 11, // spell_id effindex +referenceID true if does not have aura of spell_id with effect effindex
- CONDITION_ACTIVE_EVENT = 12, // event_id 0 +referenceID true if event is active
- CONDITION_INSTANCE_DATA = 13, // entry data +referenceID true if data is set in current instance
- CONDITION_QUEST_NONE = 14, // quest_id 0 +referenceID true if doesn't have quest saved
- CONDITION_CLASS = 15, // class 0 +referenceID true if player's class is equal to class
- CONDITION_RACE = 16, // race 0 +referenceID true if player's race is equal to race
- CONDITION_ACHIEVEMENT = 17, // achievement_id 0 +referenceID true if achievement is complete
- CONDITION_SPELL_SCRIPT_TARGET = 18, // SpellScriptTargetType, TargetEntry, 0
- CONDITION_CREATURE_TARGET = 19, // creature entry 0 +referenceID true if current target is creature with value1 entry
- CONDITION_TARGET_HEALTH_BELOW_PCT = 20, // 0-100 0 +referenceID true if target's health is below value1 percent, false if over or no target
- CONDITION_TARGET_RANGE = 21, // minDistance maxDist +referenceID true if target is closer then minDist and further then maxDist or if max is 0 then max dist is infinit
- CONDITION_MAPID = 22, // map_id 0 +referenceID true if in map_id
- CONDITION_AREAID = 23, // area_id 0 +referenceID true if in area_id
- CONDITION_ITEM_TARGET = 24, // ItemRequiredTargetType, TargetEntry, 0
- CONDITION_SPELL = 25, // spell_id bool +referenceID bool 1 for true 0 for false
- CONDITION_NOITEM = 26, // item_id bank +referenceID true if player does not have any of the item (if 'bank' is set it searches in bank slots too)
- CONDITION_LEVEL = 27, // level opt +referenceID true if player's level is equal to param1 (param2 can modify the statement)
- CONDITION_QUEST_COMPLETE = 28, // quest_id 0 +referenceID true if player has quest_id with all objectives complete, but not yet rewarded
- CONDITION_NEAR_CREATURE = 29, // creature entry distance +referenceID true if there is a creature of entry in range
- CONDITION_NEAR_GAMEOBJECT = 30, // gameobject entry distance +referenceID true if there is a gameobject of entry in range
- CONDITION_MAX = 31 // MAX
+enum ConditionSourceType
+{
+ CONDITION_SOURCE_TYPE_NONE = 0,
+ CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE = 1,
+ CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE = 2,
+ CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE = 3,
+ CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE = 4,
+ CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE = 5,
+ CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE = 6,
+ CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE = 7,
+ CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE = 8,
+ CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE = 9,
+ CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE = 10,
+ CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE = 11,
+ CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE = 12,
+ CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET = 13,
+ CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14,
+ CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15,
+ CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16,
+ CONDITION_SOURCE_TYPE_SPELL = 17,
+ CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT = 18,
+ CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19,
+ CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20,
+ CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21,
+ CONDITION_SOURCE_TYPE_SMART_EVENT = 22,
+ CONDITION_SOURCE_TYPE_MAX = 23 //MAX
};
-enum LevelConditionType
+enum ComparisionType
{
- LVL_COND_EQ,
- LVL_COND_HIGH,
- LVL_COND_LOW,
- LVL_COND_HIGH_EQ,
- LVL_COND_LOW_EQ,
- LVL_COND_MAX
+ COMP_TYPE_EQ = 0,
+ COMP_TYPE_HIGH,
+ COMP_TYPE_LOW,
+ COMP_TYPE_HIGH_EQ,
+ COMP_TYPE_LOW_EQ,
+ COMP_TYPE_MAX
};
-enum ConditionSourceType
+enum RelationType
{
- CONDITION_SOURCE_TYPE_NONE = 0, //DONE
- CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE = 1, //DONE
- CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE = 2, //DONE
- CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE = 3, //DONE
- CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE = 4, //DONE
- CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE = 5, //DONE
- CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE = 6, //DONE
- CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE = 7, //DONE
- CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE = 8, //DONE
- CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE = 9, //DONE
- CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE = 10, //DONE
- CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE = 11, //DONE
- CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE = 12, //DONE
- CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET = 13, //DONE
- CONDITION_SOURCE_TYPE_GOSSIP_MENU = 14, //DONE
- CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 15, //DONE
- CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE = 16, //DONE
- CONDITION_SOURCE_TYPE_SPELL = 17, //DONE
- CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET = 18, //DONE
- CONDITION_SOURCE_TYPE_QUEST_ACCEPT = 19, //DONE
- CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK = 20, //DONE
- CONDITION_SOURCE_TYPE_VEHICLE_SPELL = 21, //DONE
- CONDITION_SOURCE_TYPE_SMART_EVENT = 22, //DONE
- CONDITION_SOURCE_TYPE_MAX = 23 //MAX
+ RELATION_SELF = 0,
+ RELATION_IN_PARTY,
+ RELATION_IN_RAID_OR_PARTY,
+ RELATION_OWNED_BY,
+ RELATION_PASSENGER_OF,
+ RELATION_MAX
+};
+
+enum
+{
+ MAX_CONDITION_TARGETS = 3,
+};
+
+struct ConditionSourceInfo
+{
+ WorldObject* mConditionTargets[MAX_CONDITION_TARGETS]; // an array of targets available for conditions
+ Condition* mLastFailedCondition;
+ ConditionSourceInfo(WorldObject* target0, WorldObject* target1 = NULL, WorldObject* target2 = NULL)
+ {
+ mConditionTargets[0] = target0;
+ mConditionTargets[1] = target1;
+ mConditionTargets[2] = target2;
+ mLastFailedCondition = NULL;
+ }
};
struct Condition
{
- ConditionSourceType mSourceType; //SourceTypeOrReferenceId
- uint32 mSourceGroup;
- uint32 mSourceEntry;
- uint32 mSourceId; // So far, only used in CONDITION_SOURCE_TYPE_SMART_EVENT
- uint32 mElseGroup;
- ConditionType mConditionType; //ConditionTypeOrReference
- uint32 mConditionValue1;
- uint32 mConditionValue2;
- uint32 mConditionValue3;
- uint32 ErrorTextd;
- uint32 mReferenceId;
- uint32 mScriptId;
+ ConditionSourceType SourceType; //SourceTypeOrReferenceId
+ uint32 SourceGroup;
+ int32 SourceEntry;
+ uint32 SourceId; // So far, only used in CONDITION_SOURCE_TYPE_SMART_EVENT
+ uint32 ElseGroup;
+ ConditionTypes ConditionType; //ConditionTypeOrReference
+ uint32 ConditionValue1;
+ uint32 ConditionValue2;
+ uint32 ConditionValue3;
+ uint32 ErrorTextId;
+ uint32 ReferenceId;
+ uint32 ScriptId;
+ uint8 ConditionTarget;
+ bool NegativeCondition;
Condition()
{
- mSourceType = CONDITION_SOURCE_TYPE_NONE;
- mSourceGroup = 0;
- mSourceEntry = 0;
- mElseGroup = 0;
- mConditionType = CONDITION_NONE;
- mConditionValue1 = 0;
- mConditionValue2 = 0;
- mConditionValue3 = 0;
- mReferenceId = 0;
- ErrorTextd = 0;
- mScriptId = 0;
+ SourceType = CONDITION_SOURCE_TYPE_NONE;
+ SourceGroup = 0;
+ SourceEntry = 0;
+ ElseGroup = 0;
+ ConditionType = CONDITION_NONE;
+ ConditionTarget = 0;
+ ConditionValue1 = 0;
+ ConditionValue2 = 0;
+ ConditionValue3 = 0;
+ ReferenceId = 0;
+ ErrorTextId = 0;
+ ScriptId = 0;
+ NegativeCondition = false;
}
- bool Meets(Player* player, Unit* invoker = NULL);
- bool isLoaded() const { return mConditionType > CONDITION_NONE || mReferenceId; }
+ bool Meets(ConditionSourceInfo& sourceInfo);
+ uint32 GetSearcherTypeMaskForCondition();
+ bool isLoaded() const { return ConditionType > CONDITION_NONE || ReferenceId; }
+ uint32 GetMaxAvailableConditionTargets();
};
typedef std::list<Condition*> ConditionList;
typedef std::map<uint32, ConditionList> ConditionTypeContainer;
typedef std::map<ConditionSourceType, ConditionTypeContainer> ConditionContainer;
-typedef std::map<uint32, ConditionTypeContainer> VehicleSpellConditionContainer;
-typedef std::map<std::pair<uint32, uint32 /*SAI source_type*/>, ConditionTypeContainer> SmartEventConditionContainer;
+typedef std::map<uint32, ConditionTypeContainer> CreatureSpellConditionContainer;
+typedef std::map<std::pair<int32, uint32 /*SAI source_type*/>, ConditionTypeContainer> SmartEventConditionContainer;
typedef std::map<uint32, ConditionList> ConditionReferenceContainer;//only used for references
@@ -155,47 +199,56 @@ class ConditionMgr
bool isConditionTypeValid(Condition* cond);
ConditionList GetConditionReferences(uint32 refId);
- bool IsPlayerMeetToConditions(Player* player, ConditionList const& conditions, Unit* invoker = NULL);
+ uint32 GetSearcherTypeMaskForConditionList(ConditionList const& conditions);
+ bool IsObjectMeetToConditions(WorldObject* object, ConditionList const& conditions);
+ bool IsObjectMeetToConditions(WorldObject* object1, WorldObject* object2, ConditionList const& conditions);
+ bool IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, ConditionList const& conditions);
+ bool CanHaveSourceGroupSet(ConditionSourceType sourceType) const;
+ bool CanHaveSourceIdSet(ConditionSourceType sourceType) const;
ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry);
- ConditionList GetConditionsForSmartEvent(uint32 entry, uint32 eventId, uint32 sourceType);
- ConditionList GetConditionsForVehicleSpell(uint32 creatureID, uint32 spellID);
+ ConditionList GetConditionsForSpellClickEvent(uint32 creatureId, uint32 spellId);
+ ConditionList GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType);
+ ConditionList GetConditionsForVehicleSpell(uint32 creatureId, uint32 spellId);
private:
bool isSourceTypeValid(Condition* cond);
bool addToLootTemplate(Condition* cond, LootTemplate* loot);
bool addToGossipMenus(Condition* cond);
bool addToGossipMenuItems(Condition* cond);
- bool IsPlayerMeetToConditionList(Player* player, ConditionList const& conditions, Unit* invoker = NULL);
-
- bool isGroupable(ConditionSourceType sourceType) const
- {
- return (sourceType == CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE ||
- sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU ||
- sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION ||
- sourceType == CONDITION_SOURCE_TYPE_VEHICLE_SPELL ||
- sourceType == CONDITION_SOURCE_TYPE_SMART_EVENT);
- }
+ bool addToSpellImplicitTargetConditions(Condition* cond);
+ bool IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo, ConditionList const& conditions);
void Clean(); // free up resources
std::list<Condition*> AllocatedMemoryStore; // some garbage collection :)
ConditionContainer ConditionStore;
ConditionReferenceContainer ConditionReferenceStore;
- VehicleSpellConditionContainer VehicleSpellConditionStore;
+ CreatureSpellConditionContainer VehicleSpellConditionStore;
+ CreatureSpellConditionContainer SpellClickEventConditionStore;
SmartEventConditionContainer SmartEventConditionStore;
};
+template <class T> bool CompareValues(ComparisionType type, T val1, T val2)
+{
+ switch (type)
+ {
+ case COMP_TYPE_EQ:
+ return val1 == val2;
+ case COMP_TYPE_HIGH:
+ return val1 > val2;
+ case COMP_TYPE_LOW:
+ return val1 < val2;
+ case COMP_TYPE_HIGH_EQ:
+ return val1 >= val2;
+ case COMP_TYPE_LOW_EQ:
+ return val1 <= val2;
+ default:
+ // incorrect parameter
+ ASSERT(false);
+ return false;
+ }
+}
+
#define sConditionMgr ACE_Singleton<ConditionMgr, ACE_Null_Mutex>::instance()
#endif
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 98b21355504..6dbd1d847db 100755
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -682,10 +682,9 @@ void LoadDBCStores(const std::string& dataPath)
if (node->map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94)
sOldContinentsNodesMask[field] |= submask;
- // fix DK node at Ebon Hold
- if (i == 315) {
+ // fix DK node at Ebon Hold and Shadow Vault flight master
+ if (i == 315 || i == 333)
((TaxiNodesEntry*)node)->MountCreatureID[1] = 32981;
- }
}
}
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index eb25a6d8624..cc25a8f5495 100755
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1015,7 +1015,7 @@ struct FactionTemplateEntry
struct GameObjectDisplayInfoEntry
{
uint32 Displayid; // 0 m_ID
- // char* filename; // 1
+ char* filename; // 1
//uint32 unk1[10]; //2-11
float minX;
float minY;
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 81f6e1a75a0..c0923b45400 100755
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -56,7 +56,7 @@ const char EmotesEntryfmt[]="nxxiiixx";
const char EmotesTextEntryfmt[]="nxixxxxxxxxxxxxxxxx";
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiiffixsxx";
const char FactionTemplateEntryfmt[]="niiiiiiiiiiiii";
-const char GameObjectDisplayInfofmt[]="nxxxxxxxxxxxffffffxxx";
+const char GameObjectDisplayInfofmt[]="nsxxxxxxxxxxffffffxxx";
const char GemPropertiesEntryfmt[]="nixxix";
const char GlyphPropertiesfmt[]="niii";
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index cccb780e412..e6039880b63 100755
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -83,12 +83,12 @@ void LFGMgr::_LoadFromDB(Field* fields, uint64 guid)
uint32 dungeon = fields[16].GetUInt32();
uint8 state = fields[17].GetUInt8();
-
+
if (!dungeon || !state)
return;
SetDungeon(guid, dungeon);
-
+
switch (state)
{
case LFG_STATE_DUNGEON:
@@ -104,19 +104,19 @@ void LFGMgr::_SaveToDB(uint64 guid, uint32 db_guid)
{
if (!IS_GROUP(guid))
return;
-
+
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_LFG_DATA);
stmt->setUInt32(0, db_guid);
CharacterDatabase.Execute(stmt);
-
+
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_LFG_DATA);
stmt->setUInt32(0, db_guid);
-
+
stmt->setUInt32(1, GetDungeon(guid));
stmt->setUInt32(2, GetState(guid));
-
+
CharacterDatabase.Execute(stmt);
}
@@ -999,7 +999,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal)
LfgQueueInfo* queue = itQueue->second;
if (!queue)
continue;
-
+
for (LfgRolesMap::const_iterator itPlayer = queue->roles.begin(); itPlayer != queue->roles.end(); ++itPlayer)
{
if (*itPlayers == ObjectAccessor::FindPlayer(itPlayer->first))
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 82c5ce09d35..fc403ef1ff7 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -141,11 +141,11 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
Creature::Creature(bool isWorldObject): Unit(isWorldObject), 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_PlayerDamageReq(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),
m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false),
m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
-m_creatureInfo(NULL), m_creatureData(NULL), m_formation(NULL), m_path_id(0)
+m_creatureInfo(NULL), m_creatureData(NULL), m_path_id(0), m_formation(NULL)
{
m_regenTimer = CREATURE_REGEN_INTERVAL;
m_valuesCount = UNIT_END;
@@ -1289,7 +1289,7 @@ bool Creature::LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap)
m_deathState = DEAD;
if (canFly())
{
- float tz = map->GetHeight(data->posX, data->posY, data->posZ, false);
+ float tz = map->GetHeight(GetPhaseMask(), data->posX, data->posY, data->posZ, false);
if (data->posZ - tz > 0.1f)
Relocate(data->posX, data->posY, tz);
}
@@ -1413,9 +1413,9 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
if (isCivilian())
return false;
- if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE))
+ if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
return false;
-
+
// Do not attack non-combat pets
if (who->GetTypeId() == TYPEID_UNIT && who->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET)
return false;
@@ -1565,7 +1565,7 @@ void Creature::Respawn(bool force)
if (m_DBTableGuid)
sObjectMgr->RemoveCreatureRespawnTime(m_DBTableGuid, GetInstanceId());
- sLog->outStaticDebug("Respawning...");
+ sLog->outStaticDebug("Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)", GetName(), GetGUIDLow(), GetGUID(), GetEntry());
m_respawnTime = 0;
lootForPickPocketed = false;
lootForBody = false;
@@ -1907,7 +1907,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
if (isCivilian())
return false;
- if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PASSIVE))
+ if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_NPC))
return false;
// skip fighting creature
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index e890b6ac6fe..847f2aa6fd1 100755
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -211,7 +211,7 @@ struct CreatureBaseStats
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
};
-typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsMap;
+typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
struct CreatureLocale
{
@@ -723,7 +723,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
static float _GetHealthMod(int32 Rank);
- uint32 m_lootMoney;
uint64 m_lootRecipient;
uint32 m_lootRecipientGroup;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 64cc1bb325c..c04dd0b1941 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -30,7 +30,10 @@
#include "CreatureAISelector.h"
#include "Group.h"
-GameObject::GameObject() : WorldObject(false), m_goValue(new GameObjectValue), m_AI(NULL)
+#include "GameObjectModel.h"
+#include "DynamicTree.h"
+
+GameObject::GameObject() : WorldObject(false), m_model(NULL), m_goValue(new GameObjectValue), m_AI(NULL)
{
m_objectType |= TYPEMASK_GAMEOBJECT;
m_objectTypeId = TYPEID_GAMEOBJECT;
@@ -62,6 +65,7 @@ GameObject::~GameObject()
{
delete m_goValue;
delete m_AI;
+ delete m_model;
//if (m_uint32Values) // field array can be not exist if GameOBject not loaded
// CleanupsBeforeDelete();
}
@@ -127,6 +131,13 @@ void GameObject::AddToWorld()
m_zoneScript->OnGameObjectCreate(this);
sObjectAccessor->AddObject(this);
+ bool startOpen = (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? GetGOInfo()->door.startOpen : false);
+ bool toggledState = (GetGOData() ? GetGOData()->go_state == GO_STATE_ACTIVE : false);
+ if (m_model)
+ GetMap()->Insert(*m_model);
+ if ((startOpen && !toggledState) || (!startOpen && toggledState))
+ EnableCollision(false);
+
WorldObject::AddToWorld();
}
}
@@ -140,6 +151,9 @@ void GameObject::RemoveFromWorld()
m_zoneScript->OnGameObjectRemove(this);
RemoveFromOwner();
+ if (m_model)
+ if (GetMap()->Contains(*m_model))
+ GetMap()->Remove(*m_model);
WorldObject::RemoveFromWorld();
sObjectAccessor->RemoveObject(this);
}
@@ -199,15 +213,17 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
// set name for logs usage, doesn't affect anything ingame
SetName(goinfo->name);
- SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId);
+ SetDisplayId(goinfo->displayId);
+ m_model = GameObjectModel::Create(*this);
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
- SetGoState(go_state);
SetGoType(GameobjectTypes(goinfo->type));
+ SetGoState(go_state);
SetGoArtKit(0); // unknown what this is
SetByteValue(GAMEOBJECT_BYTES_1, 2, artKit);
+
switch (goinfo->type)
{
case GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING:
@@ -228,13 +244,13 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
if (GetGOInfo()->trap.stealthed)
{
m_stealth.AddFlag(STEALTH_TRAP);
- m_stealth.AddValue(STEALTH_TRAP, 300);
+ m_stealth.AddValue(STEALTH_TRAP, 70);
}
if (GetGOInfo()->trap.invisible)
{
m_invisibility.AddFlag(INVISIBILITY_TRAP);
- m_invisibility.AddValue(INVISIBILITY_TRAP, 70);
+ m_invisibility.AddValue(INVISIBILITY_TRAP, 300);
}
break;
@@ -850,6 +866,20 @@ bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const
if (IsTransport())
return true;
+ if (!seer)
+ return false;
+
+ // Always seen by owner and friendly units
+ if (uint64 guid = GetOwnerGUID())
+ {
+ if (seer->GetGUID() == guid)
+ return true;
+
+ Unit* owner = GetOwner();
+ if (owner && seer->isType(TYPEMASK_UNIT) && owner->IsFriendlyTo(((Unit*)seer)))
+ return true;
+ }
+
return false;
}
@@ -1779,7 +1809,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
{
case GO_DESTRUCTIBLE_INTACT:
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_DESTROYED);
- SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->displayId);
+ SetDisplayId(m_goInfo->displayId);
if (setHealth)
{
m_goValue->Building.Health = m_goValue->Building.MaxHealth;
@@ -1801,7 +1831,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData))
if (modelData->DamagedDisplayId)
modelId = modelData->DamagedDisplayId;
- SetUInt32Value(GAMEOBJECT_DISPLAYID, modelId);
+ SetDisplayId(modelId);
if (setHealth)
{
@@ -1834,7 +1864,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData))
if (modelData->DestroyedDisplayId)
modelId = modelData->DestroyedDisplayId;
- SetUInt32Value(GAMEOBJECT_DISPLAYID, modelId);
+ SetDisplayId(modelId);
if (setHealth)
{
@@ -1852,7 +1882,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData))
if (modelData->RebuildingDisplayId)
modelId = modelData->RebuildingDisplayId;
- SetUInt32Value(GAMEOBJECT_DISPLAYID, modelId);
+ SetDisplayId(modelId);
// restores to full health
if (setHealth)
@@ -1865,8 +1895,78 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
}
}
-void GameObject::SetLootState(LootState s, Unit* unit)
+void GameObject::SetLootState(LootState state, Unit* unit)
{
- m_lootState = s;
- AI()->OnStateChanged(s, unit);
+ m_lootState = state;
+ AI()->OnStateChanged(state, unit);
+ if (m_model)
+ {
+ // startOpen determines whether we are going to add or remove the LoS on activation
+ bool startOpen = (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? GetGOInfo()->door.startOpen : false);
+
+ if (GetGOData() && GetGOData()->go_state == GO_NOT_READY)
+ startOpen = !startOpen;
+
+ if (state == GO_ACTIVATED || state == GO_JUST_DEACTIVATED)
+ EnableCollision(startOpen);
+ else if (state == GO_READY)
+ EnableCollision(!startOpen);
+ }
+}
+
+void GameObject::SetGoState(GOState state)
+{
+ SetByteValue(GAMEOBJECT_BYTES_1, 0, state);
+ if (m_model)
+ {
+ if (!IsInWorld())
+ return;
+
+ // startOpen determines whether we are going to add or remove the LoS on activation
+ bool startOpen = (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? GetGOInfo()->door.startOpen : false);
+
+ if (GetGOData() && GetGOData()->go_state == GO_NOT_READY)
+ startOpen = !startOpen;
+
+ if (state == GO_STATE_ACTIVE || state == GO_STATE_ACTIVE_ALTERNATIVE)
+ EnableCollision(startOpen);
+ else if (state == GO_STATE_READY)
+ EnableCollision(!startOpen);
+ }
+}
+
+void GameObject::SetDisplayId(uint32 displayid)
+{
+ SetUInt32Value(GAMEOBJECT_DISPLAYID, displayid);
+ UpdateModel();
+}
+
+void GameObject::SetPhaseMask(uint32 newPhaseMask, bool update)
+{
+ WorldObject::SetPhaseMask(newPhaseMask, update);
+ EnableCollision(true);
+}
+
+void GameObject::EnableCollision(bool enable)
+{
+ if (!m_model)
+ return;
+
+ /*if (enable && !GetMap()->Contains(*m_model))
+ GetMap()->Insert(*m_model);*/
+
+ m_model->enable(enable ? GetPhaseMask() : 0);
+}
+
+void GameObject::UpdateModel()
+{
+ if (!IsInWorld())
+ return;
+ if (m_model)
+ if (GetMap()->Contains(*m_model))
+ GetMap()->Remove(*m_model);
+ delete m_model;
+ m_model = GameObjectModel::Create(*this);
+ if (m_model)
+ GetMap()->Insert(*m_model);
}
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 2329ed10e49..2e40d45541c 100755
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -610,6 +610,7 @@ enum LootState
};
class Unit;
+class GameObjectModel;
// 5 sec for bobber catch
#define FISHING_BOBBER_READY_TIME 5
@@ -704,13 +705,16 @@ class GameObject : public WorldObject, public GridObject<GameObject>
GameobjectTypes GetGoType() const { return GameobjectTypes(GetByteValue(GAMEOBJECT_BYTES_1, 1)); }
void SetGoType(GameobjectTypes type) { SetByteValue(GAMEOBJECT_BYTES_1, 1, type); }
GOState GetGoState() const { return GOState(GetByteValue(GAMEOBJECT_BYTES_1, 0)); }
- void SetGoState(GOState state) { SetByteValue(GAMEOBJECT_BYTES_1, 0, state); }
+ void SetGoState(GOState state);
uint8 GetGoArtKit() const { return GetByteValue(GAMEOBJECT_BYTES_1, 2); }
void SetGoArtKit(uint8 artkit);
uint8 GetGoAnimProgress() const { return GetByteValue(GAMEOBJECT_BYTES_1, 3); }
void SetGoAnimProgress(uint8 animprogress) { SetByteValue(GAMEOBJECT_BYTES_1, 3, animprogress); }
static void SetGoArtKit(uint8 artkit, GameObject* go, uint32 lowguid = 0);
+ void SetPhaseMask(uint32 newPhaseMask, bool update);
+ void EnableCollision(bool enable);
+
void Use(Unit* user);
LootState getLootState() const { return m_lootState; }
@@ -791,6 +795,9 @@ class GameObject : public WorldObject, public GridObject<GameObject>
GameObjectAI* AI() const { return m_AI; }
std::string GetAIName() const;
+ void SetDisplayId(uint32 displayid);
+
+ GameObjectModel * m_model;
protected:
bool AIM_Initialize();
uint32 m_spellId;
@@ -820,6 +827,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>
private:
void RemoveFromOwner();
void SwitchDoorOrButton(bool activate, bool alternative = false);
+ void UpdateModel(); // updates model in case displayId were changed
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 93068b4ed18..b5e39fe19af 100755
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -870,24 +870,6 @@ bool Item::IsFitToSpellRequirements(SpellInfo const* spellInfo) const
return true;
}
-bool Item::IsTargetValidForItemUse(Unit* pUnitTarget)
-{
- ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET, GetTemplate()->ItemId);
- if (conditions.empty())
- return true;
-
- if (!pUnitTarget)
- return false;
-
- for (ConditionList::const_iterator itr = conditions.begin(); itr != conditions.end(); ++itr)
- {
- ItemRequiredTarget irt(ItemRequiredTargetType((*itr)->mConditionValue1), (*itr)->mConditionValue2);
- if (irt.IsFitToRequirements(pUnitTarget))
- return true;
- }
- return false;
-}
-
void Item::SetEnchantment(EnchantmentSlot slot, uint32 id, uint32 duration, uint32 charges)
{
// Better lost small time at check in comparison lost time at item save to DB.
@@ -1092,25 +1074,6 @@ bool Item::IsBindedNotWith(Player const* player) const
return true;
}
-bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const
-{
- if (pUnitTarget->GetTypeId() != TYPEID_UNIT)
- return false;
-
- if (pUnitTarget->GetEntry() != m_uiTargetEntry)
- return false;
-
- switch (m_uiType)
- {
- case ITEM_TARGET_TYPE_CREATURE:
- return pUnitTarget->isAlive();
- case ITEM_TARGET_TYPE_DEAD:
- return !pUnitTarget->isAlive();
- default:
- return false;
- }
-}
-
void Item::BuildUpdate(UpdateDataMapType& data_map)
{
if (Player* owner = GetOwner())
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index 41c13f78029..4887afc2b8a 100755
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -203,26 +203,8 @@ enum ItemUpdateState
ITEM_REMOVED = 3
};
-enum ItemRequiredTargetType
-{
- ITEM_TARGET_TYPE_CREATURE = 1,
- ITEM_TARGET_TYPE_DEAD = 2
-};
-
-#define MAX_ITEM_REQ_TARGET_TYPE 2
-
#define MAX_ITEM_SPELLS 5
-struct ItemRequiredTarget
-{
- ItemRequiredTarget(ItemRequiredTargetType uiType, uint32 uiTargetEntry) : m_uiType(uiType), m_uiTargetEntry(uiTargetEntry) {}
- ItemRequiredTargetType m_uiType;
- uint32 m_uiTargetEntry;
-
- // helpers
- bool IsFitToRequirements(Unit* pUnitTarget) const;
-};
-
bool ItemCanGoIntoBag(ItemTemplate const* proto, ItemTemplate const* pBagProto);
class Item : public Object
@@ -270,7 +252,6 @@ class Item : public Object
uint32 GetEnchantRequiredLevel() const;
bool IsFitToSpellRequirements(SpellInfo const* spellInfo) const;
- bool IsTargetValidForItemUse(Unit* pUnitTarget);
bool IsLimitedToAnotherMapOrZone(uint32 cur_mapId, uint32 cur_zoneId) const;
bool GemsFitSockets() const;
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 0332d0998b4..f1d0dd5a506 100755
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -46,6 +46,7 @@
#include "Totem.h"
#include "OutdoorPvPMgr.h"
#include "MovementPacketBuilder.h"
+#include "DynamicTree.h"
uint32 GuidHigh2TypeId(uint32 guid_hi)
{
@@ -1043,9 +1044,9 @@ bool Object::PrintIndexError(uint32 index, bool set) const
return false;
}
-bool Position::HasInLine(Unit const* target, float distance, float width) const
+bool Position::HasInLine(WorldObject const* target, float width) const
{
- if (!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance))
+ if (!HasInArc(M_PI, target))
return false;
width += target->GetObjectSize();
float angle = GetRelativeAngle(target);
@@ -1259,15 +1260,19 @@ bool WorldObject::IsWithinLOSInMap(const WorldObject* obj) const
float ox, oy, oz;
obj->GetPosition(ox, oy, oz);
- return(IsWithinLOS(ox, oy, oz));
+ return IsWithinLOS(ox, oy, oz);
}
bool WorldObject::IsWithinLOS(float ox, float oy, float oz) const
{
- float x, y, z;
+ /*float x, y, z;
GetPosition(x, y, z);
VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager();
- return vMapManager->isInLineOfSight(GetMapId(), x, y, z+2.0f, ox, oy, oz+2.0f);
+ return vMapManager->isInLineOfSight(GetMapId(), x, y, z+2.0f, ox, oy, oz+2.0f);*/
+ if (IsInWorld())
+ return GetMap()->isInLineOfSight(GetPositionX(), GetPositionY(), GetPositionZ()+2.f, ox, oy, oz+2.f, GetPhaseMask());
+
+ return true;
}
bool WorldObject::GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D /* = true */) const
@@ -1456,14 +1461,14 @@ bool WorldObject::IsInBetween(const WorldObject* obj1, const WorldObject* obj2,
return (size * size) >= GetExactDist2dSq(obj1->GetPositionX() + cos(angle) * dist, obj1->GetPositionY() + sin(angle) * dist);
}
-bool WorldObject::isInFront(WorldObject const* target, float distance, float arc) const
+bool WorldObject::isInFront(WorldObject const* target, float arc) const
{
- return IsWithinDist(target, distance) && HasInArc(arc, target);
+ return HasInArc(arc, target);
}
-bool WorldObject::isInBack(WorldObject const* target, float distance, float arc) const
+bool WorldObject::isInBack(WorldObject const* target, float arc) const
{
- return IsWithinDist(target, distance) && !HasInArc(2 * M_PI - arc, target);
+ return !HasInArc(2 * M_PI - arc, target);
}
void WorldObject::GetRandomPoint(const Position &pos, float distance, float &rand_x, float &rand_y, float &rand_z) const
@@ -1489,7 +1494,7 @@ void WorldObject::GetRandomPoint(const Position &pos, float distance, float &ran
void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const
{
- float new_z = GetBaseMap()->GetHeight(x, y, z, true);
+ float new_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if (new_z > INVALID_HEIGHT)
z = new_z+ 0.05f; // just to be sure that we are not a few pixel under the surface
}
@@ -1502,13 +1507,13 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
{
// non fly unit don't must be in air
// non swim unit must be at ground (mostly speedup, because it don't must be in water and water level check less fast
- if (!((Creature const*)this)->canFly())
+ if (!ToCreature()->canFly())
{
- bool canSwim = ((Creature const*)this)->canSwim();
+ bool canSwim = ToCreature()->canSwim();
float ground_z = z;
float max_z = canSwim
- ? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !((Unit const*)this)->HasAuraType(SPELL_AURA_WATER_WALK))
- : ((ground_z = GetBaseMap()->GetHeight(x, y, z, true)));
+ ? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
+ : ((ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true)));
if (max_z > INVALID_HEIGHT)
{
if (z > max_z)
@@ -1519,7 +1524,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
}
else
{
- float ground_z = GetBaseMap()->GetHeight(x, y, z, true);
+ float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if (z < ground_z)
z = ground_z;
}
@@ -1528,10 +1533,10 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
case TYPEID_PLAYER:
{
// for server controlled moves playr work same as creature (but it can always swim)
- if (!((Player const*)this)->canFly())
+ if (!ToPlayer()->canFly())
{
float ground_z = z;
- float max_z = GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !((Unit const*)this)->HasAuraType(SPELL_AURA_WATER_WALK));
+ float max_z = GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK));
if (max_z > INVALID_HEIGHT)
{
if (z > max_z)
@@ -1542,7 +1547,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
}
else
{
- float ground_z = GetBaseMap()->GetHeight(x, y, z, true);
+ float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if (z < ground_z)
z = ground_z;
}
@@ -1550,7 +1555,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
}
default:
{
- float ground_z = GetBaseMap()->GetHeight(x, y, z, true);
+ float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if(ground_z > INVALID_HEIGHT)
z = ground_z;
break;
@@ -1766,11 +1771,15 @@ bool WorldObject::CanDetectStealthOf(WorldObject const* obj) const
// Level difference: 5 point / level, starting from level 1.
// There may be spells for this and the starting points too, but
- // not in the DBCs of the client.
+ // not in the DBCs of the client.
detectionValue += int32(getLevelForTarget(obj) - 1) * 5;
// Apply modifiers
detectionValue += m_stealthDetect.GetValue(StealthType(i));
+ if (obj->isType(TYPEMASK_GAMEOBJECT))
+ if (Unit* owner = ((GameObject*)obj)->GetOwner())
+ detectionValue -= int32(owner->getLevelForTarget(this) - 1) * 5;
+
detectionValue -= obj->m_stealth.GetValue(StealthType(i));
// Calculate max distance
@@ -2621,11 +2630,11 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
{
angle += m_orientation;
float destx, desty, destz, ground, floor;
-
+ pos.m_positionZ += 2.0f;
destx = pos.m_positionX + dist * cos(angle);
desty = pos.m_positionY + dist * sin(angle);
- ground = GetMap()->GetHeight(destx, desty, MAX_HEIGHT, true);
- floor = GetMap()->GetHeight(destx, desty, pos.m_positionZ, true);
+ ground = GetMap()->GetHeight(GetPhaseMask(), destx, desty, MAX_HEIGHT, true);
+ floor = GetMap()->GetHeight(GetPhaseMask(), destx, desty, pos.m_positionZ, true);
destz = fabs(ground - pos.m_positionZ) <= fabs(floor - pos.m_positionZ) ? ground : floor;
bool col = VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(GetMapId(), pos.m_positionX, pos.m_positionY, pos.m_positionZ+0.5f, destx, desty, destz+0.5f, destx, desty, destz, -0.5f);
@@ -2639,6 +2648,17 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
dist = sqrt((pos.m_positionX - destx)*(pos.m_positionX - destx) + (pos.m_positionY - desty)*(pos.m_positionY - desty));
}
+ // check dynamic collision
+ col = GetMap()->getObjectHitPos(GetPhaseMask(), pos.m_positionX, pos.m_positionY, pos.m_positionZ+0.5f, destx, desty, destz+0.5f, destx, desty, destz, -0.5f);
+
+ // Collided with a gameobject
+ if (col)
+ {
+ destx -= CONTACT_DISTANCE * cos(angle);
+ desty -= CONTACT_DISTANCE * sin(angle);
+ dist = sqrt((pos.m_positionX - destx)*(pos.m_positionX - destx) + (pos.m_positionY - desty)*(pos.m_positionY - desty));
+ }
+
float step = dist/10.0f;
for (uint8 j = 0; j < 10; ++j)
@@ -2648,8 +2668,8 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
{
destx -= step * cos(angle);
desty -= step * sin(angle);
- ground = GetMap()->GetHeight(destx, desty, MAX_HEIGHT, true);
- floor = GetMap()->GetHeight(destx, desty, pos.m_positionZ, true);
+ ground = GetMap()->GetHeight(GetPhaseMask(), destx, desty, MAX_HEIGHT, true);
+ floor = GetMap()->GetHeight(GetPhaseMask(), destx, desty, pos.m_positionZ, true);
destz = fabs(ground - pos.m_positionZ) <= fabs(floor - pos.m_positionZ) ? ground : floor;
}
// we have correct destz now
@@ -2662,7 +2682,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
Trinity::NormalizeMapCoord(pos.m_positionX);
Trinity::NormalizeMapCoord(pos.m_positionY);
- UpdateGroundPositionZ(pos.m_positionX, pos.m_positionY, pos.m_positionZ);
+ UpdateAllowedPositionZ(pos.m_positionX, pos.m_positionY, pos.m_positionZ);
pos.m_orientation = m_orientation;
}
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index 666f71ffe68..54f64f8da38 100755
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -51,7 +51,7 @@ enum TypeMask
TYPEMASK_OBJECT = 0x0001,
TYPEMASK_ITEM = 0x0002,
TYPEMASK_CONTAINER = 0x0006, // TYPEMASK_ITEM | 0x0004
- TYPEMASK_UNIT = 0x0008, //creature or player
+ TYPEMASK_UNIT = 0x0008, // creature
TYPEMASK_PLAYER = 0x0010,
TYPEMASK_GAMEOBJECT = 0x0020,
TYPEMASK_DYNAMICOBJECT = 0x0040,
@@ -450,7 +450,7 @@ struct Position
bool IsInDist(const Position* pos, float dist) const
{ return GetExactDistSq(pos) < dist * dist; }
bool HasInArc(float arcangle, const Position* pos) const;
- bool HasInLine(Unit const* target, float distance, float width) const;
+ bool HasInLine(WorldObject const* target, float width) const;
std::string ToString() const;
};
ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer);
@@ -707,8 +707,8 @@ class WorldObject : public Object, public WorldLocation
bool IsInRange(WorldObject const* obj, float minRange, float maxRange, bool is3D = true) const;
bool IsInRange2d(float x, float y, float minRange, float maxRange) const;
bool IsInRange3d(float x, float y, float z, float minRange, float maxRange) const;
- bool isInFront(WorldObject const* target, float distance, float arc = M_PI) const;
- bool isInBack(WorldObject const* target, float distance, float arc = M_PI) const;
+ bool isInFront(WorldObject const* target, float arc = M_PI) const;
+ bool isInBack(WorldObject const* target, float arc = M_PI) const;
bool IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size = 0) const;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 30f1c6e404b..088957ab0b3 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -1107,6 +1107,9 @@ void Pet::_LoadAuras(uint32 timediff)
int32 baseDamage[3];
Field* fields = result->Fetch();
uint64 caster_guid = fields[0].GetUInt64();
+ // NULL guid stored - pet is the caster of the spell - see Pet::_SaveAuras
+ if (!caster_guid)
+ caster_guid = GetGUID();
uint32 spellid = fields[1].GetUInt32();
uint8 effmask = fields[2].GetUInt8();
uint8 recalculatemask = fields[3].GetUInt8();
@@ -1195,9 +1198,12 @@ void Pet::_SaveAuras(SQLTransaction& trans)
}
}
+ // don't save guid of caster in case we are caster of the spell - guid for pet is generated every pet load, so it won't match saved guid anyways
+ uint64 casterGUID = (itr->second->GetCasterGUID() == GetGUID()) ? 0 : itr->second->GetCasterGUID();
+
trans->PAppend("INSERT INTO pet_aura (guid, caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) "
"VALUES ('%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u')",
- m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(), itr->second->GetId(), effMask, recalculateMask,
+ m_charmInfo->GetPetNumber(), casterGUID, itr->second->GetId(), effMask, recalculateMask,
itr->second->GetStackAmount(), damage[0], damage[1], damage[2], baseDamage[0], baseDamage[1], baseDamage[2],
itr->second->GetMaxDuration(), itr->second->GetDuration(), itr->second->GetCharges());
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 21994640e63..2c9747312af 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -435,9 +435,9 @@ void TradeData::SetAccepted(bool state, bool crosssend /*= false*/)
// 5. Credit instance encounter.
KillRewarder::KillRewarder(Player* killer, Unit* victim, bool isBattleGround) :
// 1. Initialize internal variables to default values.
- _killer(killer), _victim(victim), _isBattleGround(isBattleGround),
- _isPvP(false), _group(killer->GetGroup()), _groupRate(1.0f),
- _maxLevel(0), _maxNotGrayMember(NULL), _count(0), _sumLevel(0), _isFullXP(false), _xp(0)
+ _killer(killer), _victim(victim), _group(killer->GetGroup()),
+ _groupRate(1.0f), _maxNotGrayMember(NULL), _count(0), _sumLevel(0), _xp(0),
+ _isFullXP(false), _maxLevel(0), _isBattleGround(isBattleGround), _isPvP(false)
{
// mark the credit as pvp if victim is player
if (victim->GetTypeId() == TYPEID_PLAYER)
@@ -842,8 +842,6 @@ Player::Player(WorldSession* session): Unit(true), m_achievementMgr(this), m_rep
for (uint8 i = 0; i < MAX_POWERS; ++i)
m_powerFraction[i] = 0;
- m_ConditionErrorMsgId = 0;
-
isDebugAreaTriggers = false;
SetPendingBind(0, 0);
@@ -1545,7 +1543,7 @@ void Player::Update(uint32 p_time)
while (iter != m_timedquests.end())
{
QuestStatusData& q_status = m_QuestStatus[*iter];
- if (q_status.m_timer <= p_time)
+ if (q_status.Timer <= p_time)
{
uint32 quest_id = *iter;
++iter; // current iter will be removed in FailQuest
@@ -1553,7 +1551,7 @@ void Player::Update(uint32 p_time)
}
else
{
- q_status.m_timer -= p_time;
+ q_status.Timer -= p_time;
m_QuestStatusSave[*iter] = true;
++iter;
}
@@ -2397,14 +2395,9 @@ bool Player::TeleportToBGEntryPoint()
if (m_bgData.joinPos.m_mapId == MAPID_INVALID)
return false;
- Group* group = GetGroup();
- if (group && group->isLFGGroup() && group->GetMembersCount() == 1)
- group->Disband();
- else
- ScheduleDelayedOperation(DELAYED_BG_GROUP_RESTORE);
-
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
ScheduleDelayedOperation(DELAYED_BG_TAXI_RESTORE);
+ ScheduleDelayedOperation(DELAYED_BG_GROUP_RESTORE);
return TeleportTo(m_bgData.joinPos);
}
@@ -3338,7 +3331,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
// cleanup unit flags (will be re-applied if need at aura load).
RemoveFlag(UNIT_FIELD_FLAGS,
UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_ATTACKABLE_1 |
- UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE | UNIT_FLAG_LOOTING |
+ UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_LOOTING |
UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_SILENCED | UNIT_FLAG_PACIFIED |
UNIT_FLAG_STUNNED | UNIT_FLAG_IN_COMBAT | UNIT_FLAG_DISARMED |
UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_NOT_SELECTABLE |
@@ -4522,11 +4515,14 @@ bool Player::ResetTalents(bool no_cost)
// skip non-existant talent ranks
if (talentInfo->RankID[rank] == 0)
continue;
+ const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank]);
+ if (!_spellEntry)
+ continue;
removeSpell(talentInfo->RankID[rank], true);
- if (const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank]))
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellInfo for valid trigger spells
- if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL)
- removeSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches
+ // search for spells that the talent teaches and unlearn them
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL)
+ removeSpell(_spellEntry->Effects[i].TriggerSpell, true);
// if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted
PlayerTalentMap::iterator plrTalent = GetTalentMap(GetActiveSpec())->find(talentInfo->RankID[rank]);
if (plrTalent != GetTalentMap(GetActiveSpec())->end())
@@ -7048,38 +7044,38 @@ void Player::RewardReputation(Unit* pVictim, float rate)
float favored_rep_mult = 0;
if ((HasAura(32096) || HasAura(32098)) && (zone == 3483 || zone == 3562 || zone == 3836 || zone == 3713 || zone == 3714)) favored_rep_mult = 0.25; // Thrallmar's Favor and Honor Hold's Favor
- else if (HasAura(30754) && (Rep->repfaction1 == 609 || Rep->repfaction2 == 609) && !ChampioningFaction) favored_rep_mult = 0.25; // Cenarion Favor
+ else if (HasAura(30754) && (Rep->RepFaction1 == 609 || Rep->RepFaction2 == 609) && !ChampioningFaction) favored_rep_mult = 0.25; // Cenarion Favor
if (favored_rep_mult > 0) favored_rep_mult *= 2; // Multiplied by 2 because the reputation is divided by 2 for some reason (See "donerep1 / 2" and "donerep2 / 2") -- if you know why this is done, please update/explain :)
// Favored reputation increase END
bool recruitAFriend = GetsRecruitAFriendBonus(false);
- if (Rep->repfaction1 && (!Rep->team_dependent || team == ALLIANCE))
+ if (Rep->RepFaction1 && (!Rep->TeamDependent || team == ALLIANCE))
{
- int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, ChampioningFaction ? ChampioningFaction : Rep->repfaction1, false);
+ int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->RepValue1, ChampioningFaction ? ChampioningFaction : Rep->RepFaction1, false);
donerep1 = int32(donerep1*(rate + favored_rep_mult));
if (recruitAFriend)
donerep1 = int32(donerep1 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
- FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction1);
+ FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1);
uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1);
- if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1)
+ if (factionEntry1 && current_reputation_rank1 <= Rep->ReputationMaxCap1)
GetReputationMgr().ModifyReputation(factionEntry1, donerep1);
}
- if (Rep->repfaction2 && (!Rep->team_dependent || team == HORDE))
+ if (Rep->RepFaction2 && (!Rep->TeamDependent || team == HORDE))
{
- int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, ChampioningFaction ? ChampioningFaction : Rep->repfaction2, false);
+ int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->RepValue2, ChampioningFaction ? ChampioningFaction : Rep->RepFaction2, false);
donerep2 = int32(donerep2*(rate + favored_rep_mult));
if (recruitAFriend)
donerep2 = int32(donerep2 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
- FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction2);
+ FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2);
uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2);
- if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2)
+ if (factionEntry2 && current_reputation_rank2 <= Rep->ReputationMaxCap2)
GetReputationMgr().ModifyReputation(factionEntry2, donerep2);
}
}
@@ -11963,7 +11959,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
Map const* map = lootedObject->GetMap();
if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
- if (dungeon->map == map->GetId() && dungeon->difficulty == map->GetDifficulty())
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
lootedObjectInDungeon = true;
if (!lootedObjectInDungeon)
@@ -12054,6 +12050,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update
{
ItemAddedQuestCheck(item, count);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, item, count);
+ GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, item, 1);
if (randomPropertyId)
pItem->SetItemRandomProperties(randomPropertyId);
pItem = StoreItem(dest, pItem, update);
@@ -12091,7 +12088,6 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update)
return NULL;
Item* lastItem = pItem;
- uint32 entry = pItem->GetEntry();
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end();)
{
uint16 pos = itr->pos;
@@ -12107,7 +12103,6 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update)
lastItem = _StoreItem(pos, pItem, count, true, update);
}
- GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, entry);
return lastItem;
}
@@ -14148,10 +14143,10 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
if (source->ToGameObject()->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
PrepareQuestMenu(source->GetGUID());
- for (GossipMenuItemsMap::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
+ for (GossipMenuItemsContainer::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
{
bool canTalk = true;
- if (!sConditionMgr->IsPlayerMeetToConditions(this, itr->second.Conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(this, source, itr->second.Conditions))
continue;
if (source->GetTypeId() == TYPEID_UNIT)
@@ -14295,7 +14290,7 @@ void Player::SendPreparedGossip(WorldObject* source)
uint32 textId = GetGossipTextId(source);
if (uint32 menuId = PlayerTalkClass->GetGossipMenu().GetMenuId())
- textId = GetGossipTextId(menuId);
+ textId = GetGossipTextId(menuId, source);
PlayerTalkClass->SendGossipMenu(textId, source->GetGUID());
}
@@ -14386,7 +14381,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
break;
case GOSSIP_OPTION_UNLEARNTALENTS:
PlayerTalkClass->SendCloseGossip();
- source->ToCreature()->CastSpell(this, 46331, true); // Trainer: Untrain Talents
+ SendTalentWipeConfirm(guid);
break;
case GOSSIP_OPTION_UNLEARNPETTALENTS:
PlayerTalkClass->SendCloseGossip();
@@ -14440,10 +14435,10 @@ uint32 Player::GetGossipTextId(WorldObject* source)
if (!source)
return DEFAULT_GOSSIP_MESSAGE;
- return GetGossipTextId(GetDefaultGossipMenuForSource(source));
+ return GetGossipTextId(GetDefaultGossipMenuForSource(source), source);
}
-uint32 Player::GetGossipTextId(uint32 menuId)
+uint32 Player::GetGossipTextId(uint32 menuId, WorldObject* source)
{
uint32 textId = DEFAULT_GOSSIP_MESSAGE;
@@ -14452,9 +14447,11 @@ uint32 Player::GetGossipTextId(uint32 menuId)
GossipMenusMapBounds menuBounds = sObjectMgr->GetGossipMenusMapBounds(menuId);
- for (GossipMenusMap::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
- if (sConditionMgr->IsPlayerMeetToConditions(this, itr->second.conditions))
+ for (GossipMenusContainer::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
+ {
+ if (sConditionMgr->IsObjectMeetToConditions(this, source, itr->second.conditions))
textId = itr->second.text_id;
+ }
return textId;
}
@@ -14740,13 +14737,13 @@ bool Player::CanCompleteQuest(uint32 quest_id)
QuestStatusData &q_status = itr->second;
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER))
{
for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; i++)
{
- if (qInfo->RequiredItemCount[i]!= 0 && q_status.m_itemcount[i] < qInfo->RequiredItemCount[i])
+ if (qInfo->RequiredItemCount[i]!= 0 && q_status.ItemCount[i] < qInfo->RequiredItemCount[i])
return false;
}
}
@@ -14758,19 +14755,19 @@ bool Player::CanCompleteQuest(uint32 quest_id)
if (qInfo->RequiredNpcOrGo[i] == 0)
continue;
- if (qInfo->RequiredNpcOrGoCount[i] != 0 && q_status.m_creatureOrGOcount[i] < qInfo->RequiredNpcOrGoCount[i])
+ if (qInfo->RequiredNpcOrGoCount[i] != 0 && q_status.CreatureOrGOCount[i] < qInfo->RequiredNpcOrGoCount[i])
return false;
}
}
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
- if (qInfo->GetPlayersSlain() != 0 && q_status.m_playercount < qInfo->GetPlayersSlain())
+ if (qInfo->GetPlayersSlain() != 0 && q_status.PlayerCount < qInfo->GetPlayersSlain())
return false;
- if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT) && !q_status.m_explored)
+ if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT) && !q_status.Explored)
return false;
- if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && q_status.m_timer == 0)
+ if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && q_status.Timer == 0)
return false;
if (qInfo->GetRewOrReqMoney() < 0)
@@ -14887,7 +14884,9 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg)
void Player::AddQuest(Quest const* quest, Object* questGiver)
{
uint16 log_slot = FindQuestSlot(0);
- ASSERT(log_slot < MAX_QUEST_LOG_SIZE);
+
+ if (log_slot >= MAX_QUEST_LOG_SIZE) // Player does not have any free slot in the quest log
+ return;
uint32 quest_id = quest->GetQuestId();
@@ -14895,23 +14894,23 @@ void Player::AddQuest(Quest const* quest, Object* questGiver)
QuestStatusData& questStatusData = m_QuestStatus[quest_id];
// check for repeatable quests status reset
- questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
- questStatusData.m_explored = false;
+ questStatusData.Status = QUEST_STATUS_INCOMPLETE;
+ questStatusData.Explored = false;
if (quest->HasFlag(QUEST_TRINITY_FLAGS_DELIVER))
{
for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
- questStatusData.m_itemcount[i] = 0;
+ questStatusData.ItemCount[i] = 0;
}
if (quest->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO))
{
for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
- questStatusData.m_creatureOrGOcount[i] = 0;
+ questStatusData.CreatureOrGOCount[i] = 0;
}
if (quest->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
- questStatusData.m_playercount = 0;
+ questStatusData.PlayerCount = 0;
GiveQuestSourceItem(quest);
AdjustQuestReqItemCount(quest, questStatusData);
@@ -14931,14 +14930,14 @@ void Player::AddQuest(Quest const* quest, Object* questGiver)
// shared timed quest
if (questGiver && questGiver->GetTypeId() == TYPEID_PLAYER)
- limittime = questGiver->ToPlayer()->getQuestStatusMap()[quest_id].m_timer / IN_MILLISECONDS;
+ limittime = questGiver->ToPlayer()->getQuestStatusMap()[quest_id].Timer / IN_MILLISECONDS;
AddTimedQuest(quest_id);
- questStatusData.m_timer = limittime * IN_MILLISECONDS;
+ questStatusData.Timer = limittime * IN_MILLISECONDS;
qtime = static_cast<uint32>(time(NULL)) + limittime;
}
else
- questStatusData.m_timer = 0;
+ questStatusData.Timer = 0;
SetQuestSlot(log_slot, quest_id, qtime);
@@ -15198,7 +15197,7 @@ void Player::FailQuest(uint32 questId)
QuestStatusData& q_status = m_QuestStatus[questId];
RemoveTimedQuest(questId);
- q_status.m_timer = 0;
+ q_status.Timer = 0;
SendQuestTimerFailed(questId);
}
@@ -15436,7 +15435,7 @@ bool Player::SatisfyQuestStatus(Quest const* qInfo, bool msg)
bool Player::SatisfyQuestConditions(Quest const* qInfo, bool msg)
{
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_ACCEPT, qInfo->GetQuestId());
- if (!sConditionMgr->IsPlayerMeetToConditions(this, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(this, conditions))
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
@@ -15528,7 +15527,7 @@ bool Player::SatisfyQuestPrevChain(Quest const* qInfo, bool msg)
QuestStatusMap::const_iterator itr = m_QuestStatus.find(*iter);
// If any of the previous quests in chain active, return false
- if (itr != m_QuestStatus.end() && itr->second.m_status != QUEST_STATUS_NONE)
+ if (itr != m_QuestStatus.end() && itr->second.Status != QUEST_STATUS_NONE)
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
@@ -15594,8 +15593,8 @@ bool Player::SatisfyQuestSeasonal(Quest const* qInfo, bool /*msg*/)
return true;
uint16 eventId = sGameEventMgr->GetEventIdForQuest(qInfo);
- if (m_seasonalquests.find(eventId) == m_seasonalquests.end())
- return false;
+ if (m_seasonalquests.find(eventId) == m_seasonalquests.end() || m_seasonalquests[eventId].empty())
+ return true;
// if not found in cooldown list
return m_seasonalquests[eventId].find(qInfo->GetQuestId()) == m_seasonalquests[eventId].end();
@@ -15688,7 +15687,7 @@ QuestStatus Player::GetQuestStatus(uint32 quest_id) const
{
QuestStatusMap::const_iterator itr = m_QuestStatus.find(quest_id);
if (itr != m_QuestStatus.end())
- return itr->second.m_status;
+ return itr->second.Status;
if (Quest const* qInfo = sObjectMgr->GetQuestTemplate(quest_id))
if (!qInfo->IsRepeatable() && m_RewardedQuests.find(quest_id) != m_RewardedQuests.end())
@@ -15704,7 +15703,7 @@ bool Player::CanShareQuest(uint32 quest_id) const
{
QuestStatusMap::const_iterator itr = m_QuestStatus.find(quest_id);
if (itr != m_QuestStatus.end())
- return itr->second.m_status == QUEST_STATUS_INCOMPLETE;
+ return itr->second.Status == QUEST_STATUS_INCOMPLETE;
}
return false;
}
@@ -15713,7 +15712,7 @@ void Player::SetQuestStatus(uint32 quest_id, QuestStatus status)
{
if (sObjectMgr->GetQuestTemplate(quest_id))
{
- m_QuestStatus[quest_id].m_status = status;
+ m_QuestStatus[quest_id].Status = status;
m_QuestStatusSave[quest_id] = true;
}
@@ -15750,7 +15749,7 @@ uint16 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry)
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
if (qInfo->RequiredNpcOrGo[j] == entry)
- return m_QuestStatus[quest_id].m_creatureOrGOcount[j];
+ return m_QuestStatus[quest_id].CreatureOrGOCount[j];
return 0;
}
@@ -15766,7 +15765,7 @@ void Player::AdjustQuestReqItemCount(Quest const* quest, QuestStatusData& questS
{
uint32 curitemcount = GetItemCount(quest->RequiredItemId[i], true);
- questStatusData.m_itemcount[i] = std::min(curitemcount, reqitemcount);
+ questStatusData.ItemCount[i] = std::min(curitemcount, reqitemcount);
m_QuestStatusSave[quest->GetQuestId()] = true;
}
}
@@ -15791,9 +15790,9 @@ void Player::AreaExploredOrEventHappens(uint32 questId)
{
QuestStatusData& q_status = m_QuestStatus[questId];
- if (!q_status.m_explored)
+ if (!q_status.Explored)
{
- q_status.m_explored = true;
+ q_status.Explored = true;
m_QuestStatusSave[questId] = true;
}
}
@@ -15830,7 +15829,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status != QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status != QUEST_STATUS_INCOMPLETE)
continue;
Quest const* qInfo = sObjectMgr->GetQuestTemplate(questid);
@@ -15843,11 +15842,11 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
if (reqitem == entry)
{
uint32 reqitemcount = qInfo->RequiredItemCount[j];
- uint16 curitemcount = q_status.m_itemcount[j];
+ uint16 curitemcount = q_status.ItemCount[j];
if (curitemcount < reqitemcount)
{
uint16 additemcount = curitemcount + count <= reqitemcount ? count : reqitemcount - curitemcount;
- q_status.m_itemcount[j] += additemcount;
+ q_status.ItemCount[j] += additemcount;
m_QuestStatusSave[questid] = true;
@@ -15884,14 +15883,14 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count)
uint32 reqitemcount = qInfo->RequiredItemCount[j];
uint16 curitemcount;
- if (q_status.m_status != QUEST_STATUS_COMPLETE)
- curitemcount = q_status.m_itemcount[j];
+ if (q_status.Status != QUEST_STATUS_COMPLETE)
+ curitemcount = q_status.ItemCount[j];
else
curitemcount = GetItemCount(entry, true);
if (curitemcount < reqitemcount + count)
{
uint16 remitemcount = curitemcount <= reqitemcount ? count : count + reqitemcount - curitemcount;
- q_status.m_itemcount[j] = (curitemcount <= remitemcount) ? 0 : curitemcount - remitemcount;
+ q_status.ItemCount[j] = (curitemcount <= remitemcount) ? 0 : curitemcount - remitemcount;
m_QuestStatusSave[questid] = true;
@@ -15939,7 +15938,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
continue;
// just if !ingroup || !noraidgroup || raidgroup
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
{
@@ -15958,10 +15957,10 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
if (reqkill == real_entry)
{
uint32 reqkillcount = qInfo->RequiredNpcOrGoCount[j];
- uint16 curkillcount = q_status.m_creatureOrGOcount[j];
+ uint16 curkillcount = q_status.CreatureOrGOCount[j];
if (curkillcount < reqkillcount)
{
- q_status.m_creatureOrGOcount[j] = curkillcount + addkillcount;
+ q_status.CreatureOrGOCount[j] = curkillcount + addkillcount;
m_QuestStatusSave[questid] = true;
@@ -15994,16 +15993,16 @@ void Player::KilledPlayerCredit()
continue;
// just if !ingroup || !noraidgroup || raidgroup
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL))
{
uint32 reqkill = qInfo->GetPlayersSlain();
- uint16 curkill = q_status.m_playercount;
+ uint16 curkill = q_status.PlayerCount;
if (curkill < reqkill)
{
- q_status.m_playercount = curkill + addkillcount;
+ q_status.PlayerCount = curkill + addkillcount;
m_QuestStatusSave[questid] = true;
@@ -16036,7 +16035,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
{
@@ -16077,10 +16076,10 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id)
continue;
uint32 reqCastCount = qInfo->RequiredNpcOrGoCount[j];
- uint16 curCastCount = q_status.m_creatureOrGOcount[j];
+ uint16 curCastCount = q_status.CreatureOrGOCount[j];
if (curCastCount < reqCastCount)
{
- q_status.m_creatureOrGOcount[j] = curCastCount + addCastCount;
+ q_status.CreatureOrGOCount[j] = curCastCount + addCastCount;
m_QuestStatusSave[questid] = true;
@@ -16113,7 +16112,7 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid)
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO))
{
@@ -16134,10 +16133,10 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid)
if (reqTarget == entry)
{
uint32 reqTalkCount = qInfo->RequiredNpcOrGoCount[j];
- uint16 curTalkCount = q_status.m_creatureOrGOcount[j];
+ uint16 curTalkCount = q_status.CreatureOrGOCount[j];
if (curTalkCount < reqTalkCount)
{
- q_status.m_creatureOrGOcount[j] = curTalkCount + addTalkCount;
+ q_status.CreatureOrGOCount[j] = curTalkCount + addTalkCount;
m_QuestStatusSave[questid] = true;
@@ -16168,7 +16167,7 @@ void Player::MoneyChanged(uint32 count)
{
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (int32(count) >= -qInfo->GetRewOrReqMoney())
{
@@ -16176,7 +16175,7 @@ void Player::MoneyChanged(uint32 count)
CompleteQuest(questid);
}
}
- else if (q_status.m_status == QUEST_STATUS_COMPLETE)
+ else if (q_status.Status == QUEST_STATUS_COMPLETE)
{
if (int32(count) < -qInfo->GetRewOrReqMoney())
IncompleteQuest(questid);
@@ -16196,13 +16195,13 @@ void Player::ReputationChanged(FactionEntry const* factionEntry)
if (qInfo->GetRepObjectiveFaction() == factionEntry->ID)
{
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) >= qInfo->GetRepObjectiveValue())
if (CanCompleteQuest(questid))
CompleteQuest(questid);
}
- else if (q_status.m_status == QUEST_STATUS_COMPLETE)
+ else if (q_status.Status == QUEST_STATUS_COMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) < qInfo->GetRepObjectiveValue())
IncompleteQuest(questid);
@@ -16224,13 +16223,13 @@ void Player::ReputationChanged2(FactionEntry const* factionEntry)
if (qInfo->GetRepObjectiveFaction2() == factionEntry->ID)
{
QuestStatusData& q_status = m_QuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) >= qInfo->GetRepObjectiveValue2())
if (CanCompleteQuest(questid))
CompleteQuest(questid);
}
- else if (q_status.m_status == QUEST_STATUS_COMPLETE)
+ else if (q_status.Status == QUEST_STATUS_COMPLETE)
{
if (GetReputationMgr().GetReputation(factionEntry) < qInfo->GetRepObjectiveValue2())
IncompleteQuest(questid);
@@ -16255,7 +16254,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
QuestStatusData const& q_status = qs_itr->second;
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE)
+ if (q_status.Status == QUEST_STATUS_INCOMPLETE)
{
Quest const* qinfo = sObjectMgr->GetQuestTemplate(questid);
if (!qinfo)
@@ -16270,7 +16269,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
// This part for ReqItem drop
for (uint8 j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j)
{
- if (itemid == qinfo->RequiredItemId[j] && q_status.m_itemcount[j] < qinfo->RequiredItemCount[j])
+ if (itemid == qinfo->RequiredItemId[j] && q_status.ItemCount[j] < qinfo->RequiredItemCount[j])
return true;
}
// This part - for ReqSource
@@ -17888,14 +17887,14 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
uint8 qstatus = fields[1].GetUInt8();
if (qstatus < MAX_QUEST_STATUS)
- questStatusData.m_status = QuestStatus(qstatus);
+ questStatusData.Status = QuestStatus(qstatus);
else
{
- questStatusData.m_status = QUEST_STATUS_INCOMPLETE;
+ questStatusData.Status = QUEST_STATUS_INCOMPLETE;
sLog->outError("Player %s have invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).", GetName(), quest_id, qstatus);
}
- questStatusData.m_explored = (fields[2].GetUInt8() > 0);
+ questStatusData.Explored = (fields[2].GetUInt8() > 0);
time_t quest_time = time_t(fields[3].GetUInt32());
@@ -17904,44 +17903,44 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
AddTimedQuest(quest_id);
if (quest_time <= sWorld->GetGameTime())
- questStatusData.m_timer = 1;
+ questStatusData.Timer = 1;
else
- questStatusData.m_timer = uint32((quest_time - sWorld->GetGameTime()) * IN_MILLISECONDS);
+ questStatusData.Timer = uint32((quest_time - sWorld->GetGameTime()) * IN_MILLISECONDS);
}
else
quest_time = 0;
- questStatusData.m_creatureOrGOcount[0] = fields[4].GetUInt16();
- questStatusData.m_creatureOrGOcount[1] = fields[5].GetUInt16();
- questStatusData.m_creatureOrGOcount[2] = fields[6].GetUInt16();
- questStatusData.m_creatureOrGOcount[3] = fields[7].GetUInt16();
- questStatusData.m_itemcount[0] = fields[8].GetUInt16();
- questStatusData.m_itemcount[1] = fields[9].GetUInt16();
- questStatusData.m_itemcount[2] = fields[10].GetUInt16();
- questStatusData.m_itemcount[3] = fields[11].GetUInt16();
- questStatusData.m_playercount = fields[12].GetUInt16();
+ questStatusData.CreatureOrGOCount[0] = fields[4].GetUInt16();
+ questStatusData.CreatureOrGOCount[1] = fields[5].GetUInt16();
+ questStatusData.CreatureOrGOCount[2] = fields[6].GetUInt16();
+ questStatusData.CreatureOrGOCount[3] = fields[7].GetUInt16();
+ questStatusData.ItemCount[0] = fields[8].GetUInt16();
+ questStatusData.ItemCount[1] = fields[9].GetUInt16();
+ questStatusData.ItemCount[2] = fields[10].GetUInt16();
+ questStatusData.ItemCount[3] = fields[11].GetUInt16();
+ questStatusData.PlayerCount = fields[12].GetUInt16();
// add to quest log
- if (slot < MAX_QUEST_LOG_SIZE && questStatusData.m_status != QUEST_STATUS_NONE)
+ if (slot < MAX_QUEST_LOG_SIZE && questStatusData.Status != QUEST_STATUS_NONE)
{
SetQuestSlot(slot, quest_id, uint32(quest_time)); // cast can't be helped
- if (questStatusData.m_status == QUEST_STATUS_COMPLETE)
+ if (questStatusData.Status == QUEST_STATUS_COMPLETE)
SetQuestSlotState(slot, QUEST_STATE_COMPLETE);
- else if (questStatusData.m_status == QUEST_STATUS_FAILED)
+ else if (questStatusData.Status == QUEST_STATUS_FAILED)
SetQuestSlotState(slot, QUEST_STATE_FAIL);
for (uint8 idx = 0; idx < QUEST_OBJECTIVES_COUNT; ++idx)
- if (questStatusData.m_creatureOrGOcount[idx])
- SetQuestSlotCounter(slot, idx, questStatusData.m_creatureOrGOcount[idx]);
+ if (questStatusData.CreatureOrGOCount[idx])
+ SetQuestSlotCounter(slot, idx, questStatusData.CreatureOrGOCount[idx]);
- if (questStatusData.m_playercount)
- SetQuestSlotCounter(slot, QUEST_PVP_KILL_SLOT, questStatusData.m_playercount);
+ if (questStatusData.PlayerCount)
+ SetQuestSlotCounter(slot, QUEST_PVP_KILL_SLOT, questStatusData.PlayerCount);
++slot;
}
- sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.Status, quest_id, GetGUIDLow());
}
}
while (result->NextRow());
@@ -19119,10 +19118,10 @@ void Player::_SaveQuestStatus(SQLTransaction& trans)
if (saveItr->second)
{
statusItr = m_QuestStatus.find(saveItr->first);
- if (statusItr != m_QuestStatus.end() && (keepAbandoned || statusItr->second.m_status != QUEST_STATUS_NONE))
+ if (statusItr != m_QuestStatus.end() && (keepAbandoned || statusItr->second.Status != QUEST_STATUS_NONE))
trans->PAppend("REPLACE INTO character_queststatus (guid, quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, itemcount1, itemcount2, itemcount3, itemcount4, playercount) "
"VALUES ('%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
- GetGUIDLow(), statusItr->first, statusItr->second.m_status, statusItr->second.m_explored, uint64(statusItr->second.m_timer / IN_MILLISECONDS+ sWorld->GetGameTime()), statusItr->second.m_creatureOrGOcount[0], statusItr->second.m_creatureOrGOcount[1], statusItr->second.m_creatureOrGOcount[2], statusItr->second.m_creatureOrGOcount[3], statusItr->second.m_itemcount[0], statusItr->second.m_itemcount[1], statusItr->second.m_itemcount[2], statusItr->second.m_itemcount[3], statusItr->second.m_playercount);
+ GetGUIDLow(), statusItr->first, statusItr->second.Status, statusItr->second.Explored, uint64(statusItr->second.Timer / IN_MILLISECONDS+ sWorld->GetGameTime()), statusItr->second.CreatureOrGOCount[0], statusItr->second.CreatureOrGOCount[1], statusItr->second.CreatureOrGOCount[2], statusItr->second.CreatureOrGOCount[3], statusItr->second.ItemCount[0], statusItr->second.ItemCount[1], statusItr->second.ItemCount[2], statusItr->second.ItemCount[3], statusItr->second.PlayerCount);
}
else
trans->PAppend("DELETE FROM character_queststatus WHERE guid = %u AND quest = %u", GetGUIDLow(), saveItr->first);
@@ -19977,7 +19976,7 @@ void Player::VehicleSpellInitialize()
}
ConditionList conditions = sConditionMgr->GetConditionsForVehicleSpell(veh->GetEntry(), spellId);
- if (!sConditionMgr->IsPlayerMeetToConditions(this, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(this, veh, conditions))
{
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId);
data << uint16(0) << uint8(0) << uint8(i+8);
@@ -20387,9 +20386,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// not let cheating with start flight in time of logout process || while in combat || has type state: stunned || has type state: root
if (GetSession()->isLogingOut() || isInCombat() || HasUnitState(UNIT_STATE_STUNNED) || HasUnitState(UNIT_STATE_ROOT))
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIPLAYERBUSY);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERBUSY);
return false;
}
@@ -20402,26 +20399,20 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// not let cheating with start flight mounted
if (IsMounted())
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIPLAYERALREADYMOUNTED);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERALREADYMOUNTED);
return false;
}
if (IsInDisallowedMountForm())
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIPLAYERSHAPESHIFTED);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERSHAPESHIFTED);
return false;
}
// not let cheating with start flight in time of logout process || if casting not finished || while in combat || if not use Spell's with EffectSendTaxi
if (IsNonMeleeSpellCasted(false))
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIPLAYERBUSY);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERBUSY);
return false;
}
}
@@ -20450,9 +20441,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(sourcenode);
if (!node)
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXINOSUCHPATH);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXINOSUCHPATH);
return false;
}
@@ -20465,18 +20454,14 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
(node->z - GetPositionZ())*(node->z - GetPositionZ()) >
(2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE))
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXITOOFARAWAY);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXITOOFARAWAY);
return false;
}
}
// node must have pos if taxi master case (npc != NULL)
else if (npc)
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIUNSPECIFIEDSERVERERROR);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXIUNSPECIFIEDSERVERERROR);
return false;
}
@@ -20539,9 +20524,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// in spell case allow 0 model
if ((mount_display_id == 0 && spellid == 0) || sourcepath == 0)
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIUNSPECIFIEDSERVERERROR);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXIUNSPECIFIEDSERVERERROR);
m_taxi.ClearTaxiDestinations();
return false;
}
@@ -20553,9 +20536,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
if (money < totalcost)
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXINOTENOUGHMONEY);
- GetSession()->SendPacket(&data);
+ GetSession()->SendActivateTaxiReply(ERR_TAXINOTENOUGHMONEY);
m_taxi.ClearTaxiDestinations();
return false;
}
@@ -20577,10 +20558,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
}
else
{
- WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
- data << uint32(ERR_TAXIOK);
- GetSession()->SendPacket(&data);
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ACTIVATETAXIREPLY");
+ GetSession()->SendActivateTaxiReply(ERR_TAXIOK);
GetSession()->SendDoFlight(mount_display_id, sourcepath);
}
return true;
@@ -22434,7 +22412,7 @@ bool Player::HasQuestForGO(int32 GOId) const
QuestStatusData const& qs = qs_itr->second;
- if (qs.m_status == QUEST_STATUS_INCOMPLETE)
+ if (qs.Status == QUEST_STATUS_INCOMPLETE)
{
Quest const* qinfo = sObjectMgr->GetQuestTemplate(questid);
if (!qinfo)
@@ -22448,7 +22426,7 @@ bool Player::HasQuestForGO(int32 GOId) const
if (qinfo->RequiredNpcOrGo[j] >= 0) //skip non GO case
continue;
- if ((-1)*GOId == qinfo->RequiredNpcOrGo[j] && qs.m_creatureOrGOcount[j] < qinfo->RequiredNpcOrGoCount[j])
+ if ((-1)*GOId == qinfo->RequiredNpcOrGo[j] && qs.CreatureOrGOCount[j] < qinfo->RequiredNpcOrGoCount[j])
return true;
}
}
@@ -22481,12 +22459,22 @@ void Player::UpdateForQuestWorldObjects()
continue;
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(obj->GetEntry());
- for (SpellClickInfoMap::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
- if (_itr->second.questStart || _itr->second.questEnd)
+ for (SpellClickInfoContainer::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
+ {
+ //! This code doesn't look right, but it was logically converted to condition system to do the exact
+ //! same thing it did before. It definitely needs to be overlooked for intended functionality.
+ ConditionList conds = sConditionMgr->GetConditionsForSpellClickEvent(obj->GetEntry(), _itr->second.spellId);
+ bool buildUpdateBlock = false;
+ for (ConditionList::const_iterator jtr = conds.begin(); jtr != conds.end() && !buildUpdateBlock; ++jtr)
+ if ((*jtr)->ConditionType == CONDITION_QUESTREWARDED || (*jtr)->ConditionType == CONDITION_QUESTTAKEN)
+ buildUpdateBlock = true;
+
+ if (buildUpdateBlock)
{
obj->BuildCreateUpdateBlockForPlayer(&udata, this);
break;
}
+ }
}
}
udata.BuildPacket(&packet);
@@ -24281,11 +24269,18 @@ bool Player::canSeeSpellClickOn(Creature const* c) const
if (clickPair.first == clickPair.second)
return true;
- for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
- if (itr->second.IsFitToRequirements(this, c))
- return true;
+ for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ {
+ if (!itr->second.IsFitToRequirements(this, c))
+ return false;
- return false;
+ ConditionList conds = sConditionMgr->GetConditionsForSpellClickEvent(c->GetEntry(), itr->second.spellId);
+ ConditionSourceInfo info = ConditionSourceInfo(const_cast<Player*>(this), const_cast<Creature*>(c));
+ if (!sConditionMgr->IsObjectMeetToConditions(info, conds))
+ return false;
+ }
+
+ return true;
}
void Player::BuildPlayerTalentsInfoData(WorldPacket* data)
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index ae2e0df2a63..c79cec42315 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -482,23 +482,6 @@ enum PlayerFieldByte2Flags
PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW = 0x40
};
-enum ActivateTaxiReplies
-{
- ERR_TAXIOK = 0,
- ERR_TAXIUNSPECIFIEDSERVERERROR = 1,
- ERR_TAXINOSUCHPATH = 2,
- ERR_TAXINOTENOUGHMONEY = 3,
- ERR_TAXITOOFARAWAY = 4,
- ERR_TAXINOVENDORNEARBY = 5,
- ERR_TAXINOTVISITED = 6,
- ERR_TAXIPLAYERBUSY = 7,
- ERR_TAXIPLAYERALREADYMOUNTED = 8,
- ERR_TAXIPLAYERSHAPESHIFTED = 9,
- ERR_TAXIPLAYERMOVING = 10,
- ERR_TAXISAMENODE = 11,
- ERR_TAXINOTSTANDING = 12
-};
-
enum MirrorTimerType
{
FATIGUE_TIMER = 0,
@@ -1074,19 +1057,16 @@ private:
Player* _killer;
Unit* _victim;
- bool _isBattleGround;
-
- bool _isPvP;
-
Group* _group;
float _groupRate;
- uint8 _maxLevel;
Player* _maxNotGrayMember;
uint32 _count;
uint32 _sumLevel;
- bool _isFullXP;
-
uint32 _xp;
+ bool _isFullXP;
+ uint8 _maxLevel;
+ bool _isBattleGround;
+ bool _isPvP;
};
struct PlayerTalentInfo
@@ -1444,7 +1424,7 @@ class Player : public Unit, public GridObject<Player>
void SendPreparedGossip(WorldObject* source);
void OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 menuId);
- uint32 GetGossipTextId(uint32 menuId);
+ uint32 GetGossipTextId(uint32 menuId, WorldObject* source);
uint32 GetGossipTextId(WorldObject* source);
static uint32 GetDefaultGossipMenuForSource(WorldObject* source);
@@ -2401,8 +2381,6 @@ class Player : public Unit, public GridObject<Player>
void SetHomebind(WorldLocation const& loc, uint32 area_id);
- uint32 m_ConditionErrorMsgId;
-
// Homebind coordinates
uint32 m_homebindMapId;
uint16 m_homebindAreaId;
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index a2e59f855ba..f18b041ba88 100755
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -222,7 +222,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
SetUInt32Value(GAMEOBJECT_LEVEL, m_period);
SetEntry(goinfo->entry);
- SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId);
+ SetDisplayId(goinfo->displayId);
SetGoState(GO_STATE_READY);
SetGoType(GameobjectTypes(goinfo->type));
@@ -496,7 +496,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
ResetMap();
Map* newMap = sMapMgr->CreateBaseMap(newMapid);
SetMap(newMap);
- ASSERT (GetMap());
+ ASSERT(GetMap());
AddToWorld();
if (oldMap != newMap)
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 1fda85c6c9c..01c1175f074 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -55,6 +55,7 @@
#include "SpellInfo.h"
#include "MoveSplineInit.h"
#include "MoveSpline.h"
+#include "ConditionMgr.h"
#include <math.h>
@@ -146,9 +147,10 @@ _hitMask(hitMask), _spell(spell), _damageInfo(damageInfo), _healInfo(healInfo)
#endif
Unit::Unit(bool isWorldObject): WorldObject(isWorldObject),
m_movedPlayer(NULL), m_lastSanctuaryTime(0), IsAIEnabled(false), NeedChangeAI(false),
-m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0),
-m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this), m_vehicle(NULL),
-m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this), movespline(new Movement::MoveSpline())
+m_ControlledByPlayer(false), movespline(new Movement::MoveSpline()), i_AI(NULL),
+i_disabledAI(NULL), m_procDeep(0), m_removedAurasCount(0), i_motionMaster(this),
+m_ThreatManager(this), m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
+m_HostileRefManager(this)
{
#ifdef _MSC_VER
#pragma warning(default:4355)
@@ -279,7 +281,6 @@ Unit::~Unit()
_DeleteRemovedAuras();
delete m_charmInfo;
- delete m_vehicleKit;
delete movespline;
ASSERT(!m_duringRemoveFromWorld);
@@ -516,6 +517,29 @@ bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint
return false;
}
+bool Unit::HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura) const
+{
+ AuraEffectList const& auras = GetAuraEffectsByType(type);
+ for (AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ if ((!excludeAura || excludeAura != (*itr)->GetSpellInfo()->Id) && //Avoid self interrupt of channeled Crowd Control spells like Seduction
+ ((*itr)->GetSpellInfo()->Attributes & SPELL_ATTR0_BREAKABLE_BY_DAMAGE || (*itr)->GetSpellInfo()->AuraInterruptFlags & AURA_INTERRUPT_FLAG_TAKE_DAMAGE))
+ return true;
+ return false;
+}
+
+bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) const
+{
+ uint32 excludeAura = 0;
+ if (Spell* currentChanneledSpell = excludeCasterChannel ? excludeCasterChannel->GetCurrentSpell(CURRENT_CHANNELED_SPELL) : NULL)
+ excludeAura = currentChanneledSpell->GetSpellInfo()->Id; //Avoid self interrupt of channeled Crowd Control spells like Seduction
+
+ return ( HasBreakableByDamageAuraType(SPELL_AURA_MOD_CONFUSE, excludeAura)
+ || HasBreakableByDamageAuraType(SPELL_AURA_MOD_FEAR, excludeAura)
+ || HasBreakableByDamageAuraType(SPELL_AURA_MOD_STUN, excludeAura)
+ || HasBreakableByDamageAuraType(SPELL_AURA_MOD_ROOT, excludeAura)
+ || HasBreakableByDamageAuraType(SPELL_AURA_TRANSFORM, excludeAura));
+}
+
void Unit::DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb)
{
if (!victim || !victim->isAlive() || victim->HasUnitState(UNIT_STATE_IN_FLIGHT) || (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsInEvadeMode()))
@@ -775,7 +799,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
ASSERT(he->duel);
- he->SetHealth(1);
+ if (duel_wasMounted) // In this case victim==mount
+ victim->SetHealth(1);
+ else
+ he->SetHealth(1);
he->duel->opponent->CombatStopWithPets(true);
he->CombatStopWithPets(true);
@@ -1265,9 +1292,9 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
// Hmmmm dont like this emotes client must by self do all animations
if (damageInfo->HitInfo & HITINFO_CRITICALHIT)
- victim->HandleEmoteCommand(EMOTE_ONESHOT_WOUNDCRITICAL);
+ victim->HandleEmoteCommand(EMOTE_ONESHOT_WOUND_CRITICAL);
if (damageInfo->blocked_amount && damageInfo->TargetState != VICTIMSTATE_BLOCKS)
- victim->HandleEmoteCommand(EMOTE_ONESHOT_PARRYSHIELD);
+ victim->HandleEmoteCommand(EMOTE_ONESHOT_PARRY_SHIELD);
if (damageInfo->TargetState == VICTIMSTATE_PARRY)
{
@@ -1866,7 +1893,7 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
else
{
// attack can be redirected to another target
- victim = SelectMagnetTarget(victim);
+ victim = GetMeleeHitRedirectTarget(victim);
CalcDamageInfo damageInfo;
CalculateMeleeDamage(victim, 0, &damageInfo, attType);
@@ -2418,7 +2445,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
// Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras
modHitChance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, schoolMask);
// Reduce spell hit chance for Area of effect spells from victim SPELL_AURA_MOD_AOE_AVOIDANCE aura
- if (spell->IsAOE())
+ if (spell->IsTargetingArea())
modHitChance -= victim->GetTotalAuraModifier(SPELL_AURA_MOD_AOE_AVOIDANCE);
// Decrease hit chance from victim rating bonus
@@ -3340,19 +3367,19 @@ void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
return;
bool remove = false;
- for (AuraMap::iterator i = m_ownedAuras.begin(); i != m_ownedAuras.end(); ++i)
+ for (AuraApplicationMap::iterator i = m_appliedAuras.begin(); i != m_appliedAuras.end(); ++i)
{
if (remove)
{
remove = false;
- i = m_ownedAuras.begin();
+ i = m_appliedAuras.begin();
}
- if (aura->CanStackWith(i->second))
+ if (aura->CanStackWith(i->second->GetBase()))
continue;
- RemoveOwnedAura(i, AURA_REMOVE_BY_DEFAULT);
- if (i == m_ownedAuras.end())
+ RemoveAura(i, AURA_REMOVE_BY_DEFAULT);
+ if (i == m_appliedAuras.end())
break;
remove = true;
}
@@ -3526,17 +3553,25 @@ void Unit::RemoveAuraFromStack(uint32 spellId, uint64 casterGUID, AuraRemoveMode
}
}
-void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved/*= 1*/)
+void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved/*= 1*/)
{
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);)
{
Aura* aura = iter->second;
if (aura->GetCasterGUID() == casterGUID)
{
+ DispelInfo dispelInfo(dispeller, dispellerSpellId, chargesRemoved);
+
+ // Call OnDispel hook on AuraScript
+ aura->CallScriptDispel(&dispelInfo);
+
if (aura->GetSpellInfo()->AttributesEx7 & SPELL_ATTR7_DISPEL_CHARGES)
- aura->ModCharges(-chargesRemoved, AURA_REMOVE_BY_ENEMY_SPELL);
+ aura->ModCharges(-dispelInfo.GetRemovedCharges(), AURA_REMOVE_BY_ENEMY_SPELL);
else
- aura->ModStackAmount(-chargesRemoved, AURA_REMOVE_BY_ENEMY_SPELL);
+ aura->ModStackAmount(-dispelInfo.GetRemovedCharges(), AURA_REMOVE_BY_ENEMY_SPELL);
+
+ // Call AfterDispel hook on AuraScript
+ aura->CallScriptAfterDispel(&dispelInfo);
switch (aura->GetSpellInfo()->SpellFamilyName)
{
@@ -3566,7 +3601,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
{
// final heal
int32 healAmount = aurEff->GetAmount();
- int32 stack = chargesRemoved;
+ int32 stack = dispelInfo.GetRemovedCharges();
CastCustomSpell(this, 33778, &healAmount, &stack, NULL, true, NULL, NULL, aura->GetCasterGUID());
// mana
@@ -4868,8 +4903,8 @@ bool Unit::HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 13877:
case 33735:
{
- target = SelectNearbyTarget();
- if (!target || target == victim)
+ target = SelectNearbyTarget(victim);
+ if (!target)
return false;
basepoints0 = damage;
triggered_spell_id = 22482;
@@ -5016,7 +5051,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 18765:
case 35429:
{
- target = SelectNearbyTarget();
+ target = SelectNearbyTarget(victim);
if (!target)
return false;
@@ -5736,7 +5771,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Sweeping Strikes
case 12328:
{
- target = SelectNearbyTarget();
+ target = SelectNearbyTarget(victim);
if (!target)
return false;
@@ -5812,12 +5847,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (!victim || !victim->isAlive() || !procSpell)
return false;
- target = SelectNearbyTarget();
- if (!target || target == victim)
+ target = SelectNearbyTarget(victim);
+ if (!target)
return false;
- CastSpell(target, 58567, true);
- return true;
+ triggered_spell_id = 58567;
+ break;
}
break;
}
@@ -6985,8 +7020,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
- || attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK
- || attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK)
+ || (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
+ || (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
return false;
// Now compute real proc chance...
@@ -7282,8 +7317,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
Player* player = ToPlayer();
WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
- || attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK
- || attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK)
+ || (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
+ || (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
return false;
float fire_onhit = float(CalculatePctF(dummySpell->Effects[EFFECT_0]. CalcValue(), 1.0f));
@@ -9738,6 +9773,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
{
// Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL));
+
if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE))
ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, NULL, true);
}
@@ -9957,44 +9993,44 @@ int32 Unit::DealHeal(Unit* victim, uint32 addhealth)
return gain;
}
-Unit* Unit::SelectMagnetTarget(Unit* victim, SpellInfo const* spellInfo)
+Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
{
- if (!victim)
- return NULL;
+ // Patch 1.2 notes: Spell Reflection no longer reflects abilities
+ if (spellInfo->Attributes & SPELL_ATTR0_ABILITY || spellInfo->AttributesEx & SPELL_ATTR1_CANT_BE_REDIRECTED || spellInfo->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
+ return victim;
- // Magic case
- if (spellInfo && (spellInfo->DmgClass == SPELL_DAMAGE_CLASS_NONE || spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC))
+ Unit::AuraEffectList const& magnetAuras = victim->GetAuraEffectsByType(SPELL_AURA_SPELL_MAGNET);
+ for (Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
{
- // Patch 1.2 notes: Spell Reflection no longer reflects abilities
- if (spellInfo->Attributes & SPELL_ATTR0_ABILITY || spellInfo->AttributesEx & SPELL_ATTR1_CANT_BE_REDIRECTED || spellInfo->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
- return victim;
- // I am not sure if this should be redirected.
- if (spellInfo->DmgClass == SPELL_DAMAGE_CLASS_NONE)
- return victim;
+ if (Unit* magnet = (*itr)->GetBase()->GetUnitOwner())
+ if (spellInfo->CheckExplicitTarget(this, magnet) == SPELL_CAST_OK
+ && spellInfo->CheckTarget(this, magnet, false) == SPELL_CAST_OK
+ && _IsValidAttackTarget(magnet, spellInfo)
+ && IsWithinLOSInMap(magnet))
+ {
+ // TODO: handle this charge drop by proc in cast phase on explicit target
+ (*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
+ return magnet;
+ }
+ }
+ return victim;
+}
- Unit::AuraEffectList const& magnetAuras = victim->GetAuraEffectsByType(SPELL_AURA_SPELL_MAGNET);
- for (Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
- if (Unit* magnet = (*itr)->GetBase()->GetUnitOwner())
- if (magnet->isAlive() && IsWithinLOSInMap(magnet))
+Unit* Unit::GetMeleeHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
+{
+ AuraEffectList const& hitTriggerAuras = victim->GetAuraEffectsByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER);
+ for (AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i)
+ {
+ if (Unit* magnet = (*i)->GetBase()->GetCaster())
+ if (_IsValidAttackTarget(magnet, spellInfo) && magnet->IsWithinLOSInMap(this)
+ && (!spellInfo || (spellInfo->CheckExplicitTarget(this, magnet) == SPELL_CAST_OK
+ && spellInfo->CheckTarget(this, magnet, false) == SPELL_CAST_OK)))
+ if (roll_chance_i((*i)->GetAmount()))
{
- (*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
+ (*i)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
return magnet;
}
}
- // Melee && ranged case
- else
- {
- AuraEffectList const& hitTriggerAuras = victim->GetAuraEffectsByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER);
- for (AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i)
- if (Unit* magnet = (*i)->GetBase()->GetCaster())
- if (magnet->isAlive() && magnet->IsWithinLOSInMap(this))
- if (roll_chance_i((*i)->GetAmount()))
- {
- (*i)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
- return magnet;
- }
- }
-
return victim;
}
@@ -12067,7 +12103,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
if (IsAIEnabled)
{
creature->AI()->EnterCombat(enemy);
- RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); // always remove Out of Combat Non Attackable flag if we enter combat and AI is enabled
+ RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); // unit has engaged in combat, remove immunity so players can fight back
}
if (creature->GetFormation())
creature->GetFormation()->MemberAttackStart(creature, enemy);
@@ -12099,8 +12135,8 @@ void Unit::ClearInCombat()
// Player's state will be cleared in Player::UpdateContestedPvP
if (Creature* creature = ToCreature())
{
- if (creature->GetCreatureInfo() && creature->GetCreatureInfo()->unit_flags & UNIT_FLAG_OOC_NOT_ATTACKABLE)
- SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); // re-apply Out of Combat Non Attackable flag if we leave combat, can be overriden in scripts in EnterEvadeMode()
+ if (creature->GetCreatureInfo() && creature->GetCreatureInfo()->unit_flags & UNIT_FLAG_IMMUNE_TO_PC)
+ SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); // set immunity state to the one from db on evade
ClearUnitState(UNIT_STATE_ATTACK_PLAYER);
if (HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED))
@@ -12128,7 +12164,7 @@ bool Unit::isTargetableForAttack(bool checkFakeDeath) const
return false;
if (HasFlag(UNIT_FIELD_FLAGS,
- UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE))
+ UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC))
return false;
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->isGameMaster())
@@ -12162,7 +12198,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co
return false;
// can't attack invisible (ignore stealth for aoe spells)
- if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE()))
+ if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
return false;
// can't attack dead
@@ -12181,10 +12217,11 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co
}
// check flags
if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_TAXI_FLIGHT | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_UNK_16)
- || (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE))
- || (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE))
- || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
- || (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)))
+ || (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
+ || (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
+ || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
+ // check if this is a world trigger cast - GOs are using world triggers to cast their spells, so we need to ignore their immunity flag here, this is a temp workaround, needs removal when go cast is implemented properly
+ || (GetEntry() != WORLD_TRIGGER && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)))
return false;
// CvC case - can attack each other only when one of them is hostile
@@ -12197,6 +12234,26 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co
|| target->GetReactionTo(this) > REP_NEUTRAL)
return false;
+ // Not all neutral creatures can be attacked
+ if (GetReactionTo(target) == REP_NEUTRAL &&
+ target->GetReactionTo(this) == REP_NEUTRAL)
+ {
+ if (
+ !(target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER) &&
+ !(target->GetTypeId() == TYPEID_UNIT && GetTypeId() == TYPEID_UNIT)
+ )
+ {
+ Player const* player = target->GetTypeId() == TYPEID_PLAYER ? target->ToPlayer() : ToPlayer();
+ Unit const* creature = target->GetTypeId() == TYPEID_UNIT ? target : this;
+
+ if (FactionTemplateEntry const* factionTemplate = creature->getFactionTemplateEntry())
+ if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplate->faction))
+ if (FactionState const* repState = player->GetReputationMgr().GetState(factionEntry))
+ if (!(repState->Flags & FACTION_FLAG_AT_WAR))
+ return false;
+ }
+ }
+
Creature const* creatureAttacker = ToCreature();
if (creatureAttacker && creatureAttacker->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_UNK26)
return false;
@@ -12256,7 +12313,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
return false;
// can't assist invisible
- if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE()))
+ if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
return false;
// can't assist dead
@@ -12272,12 +12329,12 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
{
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE))
{
- if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
+ if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
return false;
}
else
{
- if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE))
+ if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
return false;
}
}
@@ -13035,7 +13092,6 @@ void Unit::setDeathState(DeathState s)
{
// death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that
// it can be used to check creation of death items (such as soul shards).
- DeathState oldDeathState = m_deathState;
m_deathState = s;
if (s != ALIVE && s != JUST_ALIVED)
@@ -13074,14 +13130,6 @@ void Unit::setDeathState(DeathState s)
}
else if (s == JUST_ALIVED)
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground)
-
- if (oldDeathState != ALIVE && s == ALIVE)
- {
- // Reset display id on resurection - needed by corpse explosion to cleanup after display change
- // TODO: fix this
- if (!HasAuraType(SPELL_AURA_TRANSFORM))
- SetDisplayId(GetNativeDisplayId());
- }
}
/*########################################
@@ -14096,7 +14144,7 @@ void Unit::RemoveFromWorld()
{
m_duringRemoveFromWorld = true;
if (IsVehicle())
- GetVehicleKit()->Uninstall();
+ RemoveVehicleKit();
RemoveCharmAuras();
RemoveBindSightAuras();
@@ -14105,7 +14153,7 @@ void Unit::RemoveFromWorld()
RemoveAllGameObjects();
RemoveAllDynObjects();
- ExitVehicle();
+ ExitVehicle(); // Remove applied auras with SPELL_AURA_CONTROL_VEHICLE
UnsummonAllTotems();
RemoveAllControlled();
@@ -15070,7 +15118,7 @@ void Unit::SendMovementFlagUpdate()
{
WorldPacket data;
BuildHeartBeatMsg(&data);
- SendMessageToSet(&data, true);
+ SendMessageToSet(&data, false);
}
bool Unit::IsSitState() const
@@ -15230,7 +15278,7 @@ void Unit::UpdateReactives(uint32 p_time)
}
}
-Unit* Unit::SelectNearbyTarget(float dist) const
+Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
{
std::list<Unit*> targets;
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(this, this, dist);
@@ -15241,6 +15289,9 @@ Unit* Unit::SelectNearbyTarget(float dist) const
if (getVictim())
targets.remove(getVictim());
+ if (exclude)
+ targets.remove(exclude);
+
// remove not LoS targets
for (std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end();)
{
@@ -15329,7 +15380,7 @@ uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectTyp
break;
}
- if (spellProto->Effects[i].IsArea())
+ if (spellProto->Effects[i].IsTargetingArea())
AreaEffect = true;
}
@@ -15739,14 +15790,6 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (!victim->GetHealth())
return;
- // Inform pets (if any) when player kills target)
- if (Player* player = ToPlayer())
- {
- Pet* pet = player->GetPet();
- if (pet && pet->isAlive() && pet->isControlled())
- pet->AI()->KilledUnit(victim);
- }
-
// find player: owner of controlled `this` or `this` itself maybe
Player* player = GetCharmerOrOwnerPlayerOrPlayerItself();
Creature* creature = victim->ToCreature();
@@ -15875,6 +15918,16 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
victim->setDeathState(JUST_DIED);
}
+ // Inform pets (if any) when player kills target)
+ // MUST come after victim->setDeathState(JUST_DIED); or pet next target
+ // selection will get stuck on same target and break pet react state
+ if (Player* player = ToPlayer())
+ {
+ Pet* pet = player->GetPet();
+ if (pet && pet->isAlive() && pet->isControlled())
+ pet->AI()->KilledUnit(victim);
+ }
+
// 10% durability loss on death
// clean InHateListOf
if (Player* plrVictim = victim->ToPlayer())
@@ -15999,9 +16052,6 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (Player* killed = victim->ToPlayer())
sScriptMgr->OnPlayerKilledByCreature(killerCre, killed);
}
-
- if (victim->GetVehicle())
- victim->ExitVehicle();
}
void Unit::SetControlled(bool apply, UnitState state)
@@ -16587,26 +16637,6 @@ bool Unit::IsInRaidWith(Unit const* unit) const
return false;
}
-bool Unit::IsTargetMatchingCheck(Unit const* target, SpellTargetSelectionCheckTypes check) const
-{
- switch (check)
- {
- case TARGET_SELECT_CHECK_ENEMY:
- if (IsControlledByPlayer())
- return !IsFriendlyTo(target);
- else
- return IsHostileTo(target);
- case TARGET_SELECT_CHECK_ALLY:
- return IsFriendlyTo(target);
- case TARGET_SELECT_CHECK_PARTY:
- return IsInPartyWith(target);
- case TARGET_SELECT_CHECK_RAID:
- return IsInRaidWith(target);
- default:
- return true;
- }
-}
-
void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius)
{
Player* owner = GetCharmerOrOwnerPlayerOrPlayerItself();
@@ -17321,57 +17351,61 @@ void Unit::JumpTo(WorldObject* obj, float speedZ)
bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
{
- bool success = false;
uint32 spellClickEntry = GetVehicleKit() ? GetVehicleKit()->GetCreatureEntry() : GetEntry();
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(spellClickEntry);
- for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
- if (itr->second.IsFitToRequirements(clicker, this))
- {
- Unit* caster = (itr->second.castFlags & NPC_CLICK_CAST_CASTER_CLICKER) ? clicker : this;
- Unit* target = (itr->second.castFlags & NPC_CLICK_CAST_TARGET_CLICKER) ? clicker : this;
- uint64 origCasterGUID = (itr->second.castFlags & NPC_CLICK_CAST_ORIG_CASTER_OWNER) ? GetOwnerGUID() : clicker->GetGUID();
+ //! First check simple relations from clicker to clickee
+ if (!itr->second.IsFitToRequirements(clicker, this))
+ return false;
- SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->second.spellId);
- // if (!spellEntry) should be checked at npc_spellclick load
+ //! Check database conditions
+ ConditionList conds = sConditionMgr->GetConditionsForSpellClickEvent(spellClickEntry, itr->second.spellId);
+ ConditionSourceInfo info = ConditionSourceInfo(clicker, this);
+ if (!sConditionMgr->IsObjectMeetToConditions(info, conds))
+ return false;
- if (seatId > -1)
- {
- uint8 i = 0;
- bool valid = false;
- while (i < MAX_SPELL_EFFECTS && !valid)
- {
- if (spellEntry->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
- {
- valid = true;
- break;
- }
- ++i;
- }
+ Unit* caster = (itr->second.castFlags & NPC_CLICK_CAST_CASTER_CLICKER) ? clicker : this;
+ Unit* target = (itr->second.castFlags & NPC_CLICK_CAST_TARGET_CLICKER) ? clicker : this;
+ uint64 origCasterGUID = (itr->second.castFlags & NPC_CLICK_CAST_ORIG_CASTER_OWNER) ? GetOwnerGUID() : clicker->GetGUID();
- if (!valid)
- {
- sLog->outErrorDb("Spell %u specified in npc_spellclick_spells is not a valid vehicle enter aura!", itr->second.spellId);
- return false;
- }
+ SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->second.spellId);
+ // if (!spellEntry) should be checked at npc_spellclick load
- if (IsInMap(caster))
- caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, true, NULL, NULL, origCasterGUID);
- else // This can happen during Player::_LoadAuras
+ if (seatId > -1)
+ {
+ uint8 i = 0;
+ bool valid = false;
+ while (i < MAX_SPELL_EFFECTS && !valid)
+ {
+ if (spellEntry->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
{
- int32 bp0 = seatId;
- Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, &bp0, NULL, origCasterGUID);
+ valid = true;
+ break;
}
+ ++i;
}
- else
+
+ if (!valid)
{
- if (IsInMap(caster))
- caster->CastSpell(target, spellEntry, true, NULL, NULL, origCasterGUID);
- else
- Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, NULL, NULL, origCasterGUID);
+ sLog->outErrorDb("Spell %u specified in npc_spellclick_spells is not a valid vehicle enter aura!", itr->second.spellId);
+ return false;
}
- success = true;
+ if (IsInMap(caster))
+ caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, true, NULL, NULL, origCasterGUID);
+ else // This can happen during Player::_LoadAuras
+ {
+ int32 bp0 = seatId;
+ Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, &bp0, NULL, origCasterGUID);
+ }
+ }
+ else
+ {
+ if (IsInMap(caster))
+ caster->CastSpell(target, spellEntry, true, NULL, NULL, origCasterGUID);
+ else
+ Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, NULL, NULL, origCasterGUID);
}
}
@@ -17379,7 +17413,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
if (creature && creature->IsAIEnabled)
creature->AI()->DoAction(EVENT_SPELLCLICK);
- return success;
+ return true;
}
void Unit::EnterVehicle(Unit* base, int8 seatId)
@@ -17465,12 +17499,21 @@ void Unit::ChangeSeat(int8 seatId, bool next)
void Unit::ExitVehicle(Position const* exitPosition)
{
- // This function can be called at upper level code to initialize an exit from the passenger's side.
+ //! This function can be called at upper level code to initialize an exit from the passenger's side.
if (!m_vehicle)
return;
GetVehicleBase()->RemoveAurasByType(SPELL_AURA_CONTROL_VEHICLE, GetGUID());
- _ExitVehicle(exitPosition);
+ //! The following call would not even be executed successfully as the
+ //! SPELL_AURA_CONTROL_VEHICLE unapply handler already calls _ExitVehicle without
+ //! specifying an exitposition. The subsequent call below would return on if (!m_vehicle).
+ /*_ExitVehicle(exitPosition);*/
+ //! To do:
+ //! We need to allow SPELL_AURA_CONTROL_VEHICLE unapply handlers in spellscripts
+ //! to specify exit coordinates and either store those per passenger, or we need to
+ //! init spline movement based on those coordinates in unapply handlers, and
+ //! relocate exiting passengers based on Unit::moveSpline data. Either way,
+ //! Coming Soon™
}
void Unit::_ExitVehicle(Position const* exitPosition)
@@ -17513,9 +17556,7 @@ void Unit::_ExitVehicle(Position const* exitPosition)
if (Player* player = ToPlayer())
player->ResummonPetTemporaryUnSummonedIfAny();
- WorldPacket data2;
- BuildHeartBeatMsg(&data2);
- SendMessageToSet(&data2, true);
+ SendMovementFlagUpdate();
if (vehicle->GetBase()->HasUnitTypeMask(UNIT_MASK_MINION))
if (((Minion*)vehicle->GetBase())->GetOwner() == this)
@@ -17894,7 +17935,11 @@ bool CharmInfo::IsCommandAttack()
void CharmInfo::SaveStayPosition()
{
- m_unit->GetPosition(m_stayX, m_stayY, m_stayZ);
+ //! At this point a new spline destination is enabled because of Unit::StopMoving()
+ G3D::Vector3 const stayPos = m_unit->movespline->FinalDestination();
+ m_stayX = stayPos.x;
+ m_stayY = stayPos.y;
+ m_stayZ = stayPos.z;
}
void CharmInfo::GetStayPosition(float &x, float &y, float &z)
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index e65574bbfbc..e82c755ae41 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -589,8 +589,8 @@ enum UnitFlags
UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP
UNIT_FLAG_UNK_6 = 0x00000040,
UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PVP_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE
- UNIT_FLAG_OOC_NOT_ATTACKABLE = 0x00000100, // 2.0.8 - (OOC Out Of Combat) Can not be attacked when not in combat. Removed if unit for some reason enter combat.
- UNIT_FLAG_PASSIVE = 0x00000200, // makes you unable to attack everything. Almost identical to our "civilian"-term. Will ignore it's surroundings and not engage in combat unless "called upon" or engaged by another unit.
+ UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, // disables combat/assistance with PlayerCharacters (PC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
+ UNIT_FLAG_IMMUNE_TO_NPC = 0x00000200, // disables combat/assistance with NonPlayerCharacters (NPC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget
UNIT_FLAG_LOOTING = 0x00000400, // loot animation
UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8
UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3
@@ -788,6 +788,25 @@ enum MeleeHitOutcome
MELEE_HIT_GLANCING, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING, MELEE_HIT_NORMAL
};
+class DispelInfo
+{
+private:
+ Unit* const m_dispeller;
+ uint32 const m_dispellerSpellId;
+ uint8 m_chargesRemoved;
+public:
+ explicit DispelInfo(Unit* _dispeller, uint32 _dispellerSpellId, uint8 _chargesRemoved) :
+ m_dispeller(_dispeller), m_dispellerSpellId(_dispellerSpellId), m_chargesRemoved(_chargesRemoved) {}
+
+ Unit* GetDispeller() { return m_dispeller; }
+ uint32 GetDispellerSpellId() { return m_dispellerSpellId; }
+ uint8 GetRemovedCharges() { return m_chargesRemoved; }
+ void SetRemovedCharges(uint8 amount)
+ {
+ m_chargesRemoved = amount;
+ }
+};
+
struct CleanDamage
{
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome) :
@@ -1280,7 +1299,7 @@ class Unit : public WorldObject
void CombatStop(bool includingCast = false);
void CombatStopWithPets(bool includingCast = false);
void StopAttackFaction(uint32 faction_id);
- Unit* SelectNearbyTarget(float dist = NOMINAL_MELEE_RANGE) const;
+ Unit* SelectNearbyTarget(Unit* exclude = NULL, float dist = NOMINAL_MELEE_RANGE) const;
void SendMeleeAttackStop(Unit* victim = NULL);
void SendMeleeAttackStart(Unit* pVictim);
@@ -1377,7 +1396,6 @@ class Unit : public WorldObject
bool IsNeutralToAll() const;
bool IsInPartyWith(Unit const* unit) const;
bool IsInRaidWith(Unit const* unit) const;
- bool IsTargetMatchingCheck(Unit const* target, SpellTargetSelectionCheckTypes check) const;
void GetPartyMemberInDist(std::list<Unit*> &units, float dist);
void GetPartyMembers(std::list<Unit*> &units);
void GetRaidMember(std::list<Unit*> &units, float dist);
@@ -1539,6 +1557,8 @@ class Unit : public WorldObject
bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint32 familyFlags) const;
bool virtual HasSpell(uint32 /*spellID*/) const { return false; }
+ bool HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura = 0) const;
+ bool HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel = NULL) const;
bool HasStealthAura() const { return HasAuraType(SPELL_AURA_MOD_STEALTH); }
bool HasInvisibilityAura() const { return HasAuraType(SPELL_AURA_MOD_INVISIBILITY); }
@@ -1747,7 +1767,7 @@ class Unit : public WorldObject
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 RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved = 1);
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit* stealer);
void RemoveAurasDueToItemSpell(Item* castItem, uint32 spellId);
void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura* except = NULL, bool negative = true, bool positive = true);
@@ -1990,7 +2010,8 @@ class Unit : public WorldObject
uint32 BuildAuraStateUpdateForTarget(Unit* target) const;
bool HasAuraState(AuraStateType flag, SpellInfo const* spellProto = NULL, Unit const* Caster = NULL) const ;
void UnsummonAllTotems();
- Unit* SelectMagnetTarget(Unit* victim, SpellInfo const* spellInfo = NULL);
+ Unit* GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo);
+ Unit* GetMeleeHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo = NULL);
int32 SpellBaseDamageBonus(SpellSchoolMask schoolMask);
int32 SpellBaseHealingBonus(SpellSchoolMask schoolMask);
int32 SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* pVictim);
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 0ff5d402242..e0d67e9ceef 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -363,9 +363,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
if (_me->IsInWorld())
{
- unit->SendClearTarget(); // SMSG_BREAK_TARGET
- unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_MOVE_SPLINE_ROOT here (for creatures)
- // also adds MOVEMENTFLAG_ROOT
+ unit->SendClearTarget(); // SMSG_BREAK_TARGET
+ unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
+ // also adds MOVEMENTFLAG_ROOT
unit->SendMonsterMoveTransport(_me); // SMSG_MONSTER_MOVE_TRANSPORT
if (_me->GetTypeId() == TYPEID_UNIT)
@@ -433,8 +433,7 @@ void Vehicle::RemovePassenger(Unit* unit)
void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
{
- Map* map = _me->GetMap();
- ASSERT(map != NULL);
+ ASSERT(_me->GetMap());
// not sure that absolute position calculation is correct, it must depend on vehicle orientation and pitch angle
for (SeatMap::const_iterator itr = Seats.begin(); itr != Seats.end(); ++itr)
diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h
index 4ddfc0b2e81..fe7840c9878 100644
--- a/src/server/game/Entities/Vehicle/VehicleDefines.h
+++ b/src/server/game/Entities/Vehicle/VehicleDefines.h
@@ -85,16 +85,16 @@ struct VehicleSeat
struct VehicleAccessory
{
VehicleAccessory(uint32 entry, int8 seatId, bool isMinion, uint8 summonType, uint32 summonTime) :
- AccessoryEntry(entry), SeatId(seatId), IsMinion(isMinion), SummonedType(summonType), SummonTime(summonTime) {}
+ AccessoryEntry(entry), IsMinion(isMinion), SummonTime(summonTime), SeatId(seatId), SummonedType(summonType) {}
uint32 AccessoryEntry;
- int8 SeatId;
uint32 IsMinion;
- uint8 SummonedType;
uint32 SummonTime;
+ int8 SeatId;
+ uint8 SummonedType;
};
typedef std::vector<VehicleAccessory> VehicleAccessoryList;
-typedef std::map<uint32, VehicleAccessoryList> VehicleAccessoryMap;
+typedef std::map<uint32, VehicleAccessoryList> VehicleAccessoryContainer;
typedef std::map<int8, VehicleSeat> SeatMap;
#endif
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 7ed4af97a8b..d055707f68c 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -198,30 +198,8 @@ LanguageDesc const* GetLanguageDescByID(uint32 lang)
bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clickee) const
{
Player const* playerClicker = clicker->ToPlayer();
- if (playerClicker)
- {
- if (questStart)
- {
- // not in expected required quest state
- if ((!questStartCanActive || !playerClicker->IsActiveQuest(questStart)) && !playerClicker->GetQuestRewardStatus(questStart))
- return false;
- }
-
- if (questEnd)
- {
- // not in expected forbidden quest state
- if (playerClicker->GetQuestRewardStatus(questEnd))
- return false;
- }
- }
-
- if (auraRequired)
- if (!clicker->HasAura(auraRequired))
- return false;
-
- if (auraForbidden)
- if (clicker->HasAura(auraForbidden))
- return false;
+ if (!playerClicker)
+ return true;
Unit const* summoner = NULL;
// Check summoners for party
@@ -230,9 +208,6 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
if (!summoner)
summoner = clickee;
- if (!playerClicker)
- return true;
-
// This only applies to players
switch (userType)
{
@@ -255,32 +230,32 @@ bool SpellClickInfo::IsFitToRequirements(Unit const* clicker, Unit const* clicke
return true;
}
-ObjectMgr::ObjectMgr(): m_auctionid(1), m_equipmentSetGuid(1),
- m_ItemTextId(1), m_mailid(1), m_hiPetNumber(1), m_hiCharGuid(1),
- m_hiCreatureGuid(1), m_hiPetGuid(1), m_hiVehicleGuid(1), m_hiItemGuid(1),
- m_hiGoGuid(1), m_hiDoGuid(1), m_hiCorpseGuid(1), m_hiMoTransGuid(1)
+ObjectMgr::ObjectMgr(): _auctionId(1), _equipmentSetGuid(1),
+ _itemTextId(1), _mailId(1), _hiPetNumber(1), _hiCharGuid(1),
+ _hiCreatureGuid(1), _hiPetGuid(1), _hiVehicleGuid(1), _hiItemGuid(1),
+ _hiGoGuid(1), _hiDoGuid(1), _hiCorpseGuid(1), _hiMoTransGuid(1)
{}
ObjectMgr::~ObjectMgr()
{
- for (QuestMap::iterator i = mQuestTemplates.begin(); i != mQuestTemplates.end(); ++i)
+ for (QuestMap::iterator i = _questTemplates.begin(); i != _questTemplates.end(); ++i)
delete i->second;
- for (PetLevelInfoMap::iterator i = petInfo.begin(); i != petInfo.end(); ++i)
+ for (PetLevelInfoContainer::iterator i = _petInfoStore.begin(); i != _petInfoStore.end(); ++i)
delete[] i->second;
// free only if loaded
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] playerClassInfo[class_].levelInfo;
+ delete[] _playerClassInfo[class_].levelInfo;
for (int race = 0; race < MAX_RACES; ++race)
for (int class_ = 0; class_ < MAX_CLASSES; ++class_)
- delete[] playerInfo[race][class_].levelInfo;
+ delete[] _playerInfo[race][class_].levelInfo;
- for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
+ for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
- m_mCacheTrainerSpellMap.clear();
+ _cacheTrainerSpellStore.clear();
}
void ObjectMgr::AddLocaleString(std::string const& s, LocaleConstant locale, StringVector& data)
@@ -298,7 +273,7 @@ void ObjectMgr::LoadCreatureLocales()
{
uint32 oldMSTime = getMSTime();
- mCreatureLocaleMap.clear(); // need for reload case
+ _creatureLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, name_loc1, subname_loc1, name_loc2, subname_loc2, name_loc3, subname_loc3, name_loc4, subname_loc4, name_loc5, subname_loc5, name_loc6, subname_loc6, name_loc7, subname_loc7, name_loc8, subname_loc8 FROM locales_creature");
@@ -311,7 +286,7 @@ void ObjectMgr::LoadCreatureLocales()
uint32 entry = fields[0].GetUInt32();
- CreatureLocale& data = mCreatureLocaleMap[entry];
+ CreatureLocale& data = _creatureLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -321,7 +296,7 @@ void ObjectMgr::LoadCreatureLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)mCreatureLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -329,7 +304,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
{
uint32 oldMSTime = getMSTime();
- mGossipMenuItemsLocaleMap.clear(); // need for reload case
+ _gossipMenuItemsLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT menu_id, id, "
"option_text_loc1, box_text_loc1, option_text_loc2, box_text_loc2, "
@@ -348,7 +323,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
uint16 menuId = fields[0].GetUInt16();
uint16 id = fields[1].GetUInt16();
- GossipMenuItemsLocale& data = mGossipMenuItemsLocaleMap[MAKE_PAIR32(menuId, id)];
+ GossipMenuItemsLocale& data = _gossipMenuItemsLocaleStore[MAKE_PAIR32(menuId, id)];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -358,7 +333,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)mGossipMenuItemsLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -366,7 +341,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
{
uint32 oldMSTime = getMSTime();
- mPointOfInterestLocaleMap.clear(); // need for reload case
+ _pointOfInterestLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, icon_name_loc1, icon_name_loc2, icon_name_loc3, icon_name_loc4, icon_name_loc5, icon_name_loc6, icon_name_loc7, icon_name_loc8 FROM locales_points_of_interest");
@@ -379,13 +354,13 @@ void ObjectMgr::LoadPointOfInterestLocales()
uint32 entry = fields[0].GetUInt32();
- PointOfInterestLocale& data = mPointOfInterestLocaleMap[entry];
+ PointOfInterestLocale& data = _pointOfInterestLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)mPointOfInterestLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -426,19 +401,15 @@ void ObjectMgr::LoadCreatureTemplates()
uint32 entry = fields[0].GetUInt32();
- CreatureTemplate& creatureTemplate = CreatureTemplateStore[entry];
+ CreatureTemplate& creatureTemplate = _creatureTemplateStore[entry];
creatureTemplate.Entry = entry;
for (uint8 i = 0; i < MAX_DIFFICULTY - 1; ++i)
- {
creatureTemplate.DifficultyEntry[i] = fields[1 + i].GetUInt32();
- }
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
- {
creatureTemplate.KillCredit[i] = fields[4 + i].GetUInt32();
- }
creatureTemplate.Modelid1 = fields[6].GetUInt32();
creatureTemplate.Modelid2 = fields[7].GetUInt32();
@@ -517,10 +488,8 @@ void ObjectMgr::LoadCreatureTemplates()
while (result->NextRow());
// Checking needs to be done after loading because of the difficulty self referencing
- for (CreatureTemplateContainer::const_iterator itr = CreatureTemplateStore.begin(); itr != CreatureTemplateStore.end(); ++itr)
- {
+ for (CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr)
CheckCreatureTemplate(&itr->second);
- }
sLog->outString(">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
@@ -553,7 +522,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
continue;
}
- CreatureAddon& creatureAddon = CreatureTemplateAddonStore[entry];
+ CreatureAddon& creatureAddon = _creatureTemplateAddonStore[entry];
creatureAddon.path_id = fields[1].GetUInt32();
creatureAddon.mount = fields[2].GetUInt32();
@@ -619,20 +588,20 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
for (uint32 diff2 = 0; diff2 < MAX_DIFFICULTY - 1 && ok2; ++diff2)
{
ok2 = false;
- if (difficultyEntries[diff2].find(cInfo->Entry) != difficultyEntries[diff2].end())
+ if (_difficultyEntries[diff2].find(cInfo->Entry) != _difficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.",
cInfo->Entry, diff2 + 1, cInfo->DifficultyEntry[diff], diff + 1);
continue;
}
- if (difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != difficultyEntries[diff2].end())
+ if (_difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _difficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1);
continue;
}
- if (hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != hasDifficultyEntries[diff2].end())
+ if (_hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _hasDifficultyEntries[diff2].end())
{
sLog->outErrorDb("Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff], diff2 + 1);
@@ -694,8 +663,8 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
continue;
}
- hasDifficultyEntries[diff].insert(cInfo->Entry);
- difficultyEntries[diff].insert(cInfo->DifficultyEntry[diff]);
+ _hasDifficultyEntries[diff].insert(cInfo->Entry);
+ _difficultyEntries[diff].insert(cInfo->DifficultyEntry[diff]);
ok = true;
}
@@ -921,15 +890,22 @@ void ObjectMgr::LoadCreatureAddons()
uint32 guid = fields[0].GetUInt32();
- if (mCreatureDataMap.find(guid) == mCreatureDataMap.end())
+ CreatureData const* creData = GetCreatureData(guid);
+ if (!creData)
{
sLog->outErrorDb("Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid);
continue;
}
- CreatureAddon& creatureAddon = CreatureAddonStore[guid];
+ CreatureAddon& creatureAddon = _creatureAddonStore[guid];
creatureAddon.path_id = fields[1].GetUInt32();
+ if (creData->movementType == WAYPOINT_MOTION_TYPE && !creatureAddon.path_id)
+ {
+ const_cast<CreatureData*>(creData)->movementType = IDLE_MOTION_TYPE;
+ sLog->outErrorDb("Creature (GUID %u) has movement type set to WAYPOINT_MOTION_TYPE but no path assigned", guid);
+ }
+
creatureAddon.mount = fields[2].GetUInt32();
creatureAddon.bytes1 = fields[3].GetUInt32();
creatureAddon.bytes2 = fields[4].GetUInt32();
@@ -971,8 +947,8 @@ void ObjectMgr::LoadCreatureAddons()
CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
{
- CreatureAddonContainer::const_iterator itr = CreatureAddonStore.find(lowguid);
- if (itr != CreatureAddonStore.end())
+ CreatureAddonContainer::const_iterator itr = _creatureAddonStore.find(lowguid);
+ if (itr != _creatureAddonStore.end())
return &(itr->second);
return NULL;
@@ -980,8 +956,8 @@ CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
{
- CreatureAddonContainer::const_iterator itr = CreatureTemplateAddonStore.find(entry);
- if (itr != CreatureTemplateAddonStore.end())
+ CreatureAddonContainer::const_iterator itr = _creatureTemplateAddonStore.find(entry);
+ if (itr != _creatureTemplateAddonStore.end())
return &(itr->second);
return NULL;
@@ -989,8 +965,8 @@ CreatureAddon const* ObjectMgr::GetCreatureTemplateAddon(uint32 entry)
EquipmentInfo const* ObjectMgr::GetEquipmentInfo(uint32 entry)
{
- EquipmentInfoContainer::const_iterator itr = EquipmentInfoStore.find(entry);
- if (itr != EquipmentInfoStore.end())
+ EquipmentInfoContainer::const_iterator itr = _equipmentInfoStore.find(entry);
+ if (itr != _equipmentInfoStore.end())
return &(itr->second);
return NULL;
@@ -1016,7 +992,7 @@ void ObjectMgr::LoadEquipmentTemplates()
uint16 entry = fields[0].GetUInt16();
- EquipmentInfo& equipmentInfo = EquipmentInfoStore[entry];
+ EquipmentInfo& equipmentInfo = _equipmentInfoStore[entry];
equipmentInfo.ItemEntry[0] = fields[1].GetUInt32();
equipmentInfo.ItemEntry[1] = fields[2].GetUInt32();
@@ -1063,8 +1039,8 @@ void ObjectMgr::LoadEquipmentTemplates()
CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId)
{
- CreatureModelContainer::const_iterator itr = CreatureModelStore.find(modelId);
- if (itr != CreatureModelStore.end())
+ CreatureModelContainer::const_iterator itr = _creatureModelStore.find(modelId);
+ if (itr != _creatureModelStore.end())
return &(itr->second);
return NULL;
@@ -1148,7 +1124,7 @@ void ObjectMgr::LoadCreatureModelInfo()
uint32 modelId = fields[0].GetUInt32();
- CreatureModelInfo& modelInfo = CreatureModelStore[modelId];
+ CreatureModelInfo& modelInfo = _creatureModelStore[modelId];
modelInfo.bounding_radius = fields[1].GetFloat();
modelInfo.combat_reach = fields[2].GetFloat();
@@ -1189,7 +1165,7 @@ void ObjectMgr::LoadLinkedRespawn()
{
uint32 oldMSTime = getMSTime();
- mLinkedRespawnMap.clear();
+ _linkedRespawnStore.clear();
QueryResult result = WorldDatabase.Query("SELECT guid, linkedGuid, linkType FROM linked_respawn ORDER BY guid ASC");
if (!result)
@@ -1362,12 +1338,12 @@ void ObjectMgr::LoadLinkedRespawn()
}
if (!error)
- mLinkedRespawnMap[guid] = linkedGuid;
+ _linkedRespawnStore[guid] = linkedGuid;
}
while (result->NextRow());
- sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(mLinkedRespawnMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1381,7 +1357,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
if (!linkedGuidLow) // we're removing the linking
{
- mLinkedRespawnMap.erase(guid);
+ _linkedRespawnStore.erase(guid);
PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_CRELINKED_RESPAWN);
stmt->setUInt32(0, guidLow);
WorldDatabase.Execute(stmt);
@@ -1405,7 +1381,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
uint64 linkedGuid = MAKE_NEW_GUID(linkedGuidLow, slave->id, HIGHGUID_UNIT);
- mLinkedRespawnMap[guid] = linkedGuid;
+ _linkedRespawnStore[guid] = linkedGuid;
PreparedStatement *stmt = WorldDatabase.GetPreparedStatement(WORLD_REP_CREATURE_LINKED_RESPAWN);
stmt->setUInt32(0, guidLow);
stmt->setUInt32(1, linkedGuidLow);
@@ -1432,15 +1408,6 @@ void ObjectMgr::LoadCreatures()
return;
}
- // Build single time for check creature data
- std::set<uint32> difficultyCreatures[MAX_DIFFICULTY - 1];
-
- CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
- for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
- for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1; ++diff)
- if (itr->second.DifficultyEntry[diff])
- difficultyCreatures[diff].insert(itr->second.DifficultyEntry[diff]);
-
// Build single time for check spawnmask
std::map<uint32, uint32> spawnMasks;
for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i)
@@ -1464,7 +1431,7 @@ void ObjectMgr::LoadCreatures()
continue;
}
- CreatureData& data = mCreatureDataMap[guid];
+ CreatureData& data = _creatureDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
@@ -1501,7 +1468,7 @@ void ObjectMgr::LoadCreatures()
bool ok = true;
for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff)
{
- if (difficultyCreatures[diff].find(data.id) != difficultyCreatures[diff].end())
+ if (_difficultyEntries[diff].find(data.id) != _difficultyEntries[diff].end())
{
sLog->outErrorDb("Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.",
guid, diff + 1, data.id);
@@ -1575,7 +1542,7 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.creatures.insert(guid);
}
}
@@ -1589,7 +1556,7 @@ void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.creatures.erase(guid);
}
}
@@ -1792,7 +1759,7 @@ void ObjectMgr::LoadGameobjects()
continue;
}
- GameObjectData& data = mGameObjectDataMap[guid];
+ GameObjectData& data = _gameObjectDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
@@ -1868,7 +1835,7 @@ void ObjectMgr::LoadGameobjects()
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)mGameObjectDataMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1880,7 +1847,7 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.gameobjects.insert(guid);
}
}
@@ -1894,7 +1861,7 @@ void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data
if (mask & 1)
{
CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(data->mapid, i)][cellCoord.GetId()];
cell_guids.gameobjects.erase(guid);
}
}
@@ -1922,12 +1889,12 @@ void ObjectMgr::LoadCreatureRespawnTimes()
uint32 respawn_time = fields[1].GetUInt32();
uint32 instance = fields[2].GetUInt32();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
++count;
} while (result->NextRow());
- sLog->outString(">> Loaded %lu creature respawn times in %u ms", (unsigned long)mCreatureRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu creature respawn times in %u ms", (unsigned long)_creatureRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -1956,13 +1923,13 @@ void ObjectMgr::LoadGameobjectRespawnTimes()
uint32 respawn_time = fields[1].GetUInt32();
uint32 instance = fields[2].GetUInt32();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = time_t(respawn_time);
++count;
} while (result->NextRow());
sLog->outString();
- sLog->outString(">> Loaded %lu gameobject respawn times in %u ms", (unsigned long)mGORespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobject respawn times in %u ms", (unsigned long)_goRespawnTimes.size(), GetMSTimeDiffToNow(oldMSTime));
}
Player* ObjectMgr::GetPlayerByLowGUID(uint32 lowguid) const
@@ -2059,7 +2026,7 @@ void ObjectMgr::LoadItemLocales()
{
uint32 oldMSTime = getMSTime();
- mItemLocaleMap.clear(); // need for reload case
+ _itemLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, name_loc1, description_loc1, name_loc2, description_loc2, name_loc3, description_loc3, name_loc4, description_loc4, name_loc5, description_loc5, name_loc6, description_loc6, name_loc7, description_loc7, name_loc8, description_loc8 FROM locales_item");
@@ -2072,7 +2039,7 @@ void ObjectMgr::LoadItemLocales()
uint32 entry = fields[0].GetUInt32();
- ItemLocale& data = mItemLocaleMap[entry];
+ ItemLocale& data = _itemLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -2082,7 +2049,7 @@ void ObjectMgr::LoadItemLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)mItemLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -2593,8 +2560,8 @@ void ObjectMgr::LoadItemScriptNames()
ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry)
{
- ItemTemplateContainer::const_iterator itr = ItemTemplateStore.find(entry);
- if (itr != ItemTemplateStore.end())
+ ItemTemplateContainer::const_iterator itr = _itemTemplateStore.find(entry);
+ if (itr != _itemTemplateStore.end())
return &(itr->second);
return NULL;
@@ -2604,7 +2571,7 @@ void ObjectMgr::LoadItemSetNameLocales()
{
uint32 oldMSTime = getMSTime();
- mItemSetNameLocaleMap.clear(); // need for reload case
+ _itemSetNameLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT `entry`, `name_loc1`, `name_loc2`, `name_loc3`, `name_loc4`, `name_loc5`, `name_loc6`, `name_loc7`, `name_loc8` FROM `locales_item_set_names`");
@@ -2617,13 +2584,13 @@ void ObjectMgr::LoadItemSetNameLocales()
uint32 entry = fields[0].GetUInt32();
- ItemSetNameLocale& data = mItemSetNameLocaleMap[entry];
+ ItemSetNameLocale& data = _itemSetNameLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
} while (result->NextRow());
- sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(mItemSetNameLocaleMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -2631,7 +2598,7 @@ void ObjectMgr::LoadItemSetNames()
{
uint32 oldMSTime = getMSTime();
- mItemSetNameMap.clear(); // needed for reload case
+ _itemSetNameStore.clear(); // needed for reload case
std::set<uint32> itemSetItems;
@@ -2669,7 +2636,7 @@ void ObjectMgr::LoadItemSetNames()
continue;
}
- ItemSetNameEntry &data = mItemSetNameMap[entry];
+ ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = fields[1].GetString();
uint32 invType = fields[2].GetUInt32();
@@ -2695,7 +2662,7 @@ void ObjectMgr::LoadItemSetNames()
if (pProto)
{
sLog->outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry);
- ItemSetNameEntry &data = mItemSetNameMap[entry];
+ ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = pProto->Name1;
data.InventoryType = pProto->InventoryType;
++count;
@@ -2713,7 +2680,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
{
uint32 oldMSTime = getMSTime();
- m_VehicleTemplateAccessoryMap.clear(); // needed for reload case
+ _vehicleTemplateAccessoryStore.clear(); // needed for reload case
uint32 count = 0;
@@ -2749,13 +2716,13 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
continue;
}
- if (mSpellClickInfoMap.find(uiEntry) == mSpellClickInfoMap.end())
+ if (_spellClickInfoStore.find(uiEntry) == _spellClickInfoStore.end())
{
sLog->outErrorDb("Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry);
continue;
}
- m_VehicleTemplateAccessoryMap[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
+ _vehicleTemplateAccessoryStore[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
}
@@ -2769,7 +2736,7 @@ void ObjectMgr::LoadVehicleAccessories()
{
uint32 oldMSTime = getMSTime();
- m_VehicleAccessoryMap.clear(); // needed for reload case
+ _vehicleAccessoryStore.clear(); // needed for reload case
uint32 count = 0;
@@ -2799,7 +2766,7 @@ void ObjectMgr::LoadVehicleAccessories()
continue;
}
- m_VehicleAccessoryMap[uiGUID].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
+ _vehicleAccessoryStore[uiGUID].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
}
@@ -2854,7 +2821,7 @@ void ObjectMgr::LoadPetLevelInfo()
continue;
}
- PetLevelInfo*& pInfoMapEntry = petInfo[creature_id];
+ PetLevelInfo*& pInfoMapEntry = _petInfoStore[creature_id];
if (pInfoMapEntry == NULL)
pInfoMapEntry = new PetLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -2876,7 +2843,7 @@ void ObjectMgr::LoadPetLevelInfo()
while (result->NextRow());
// Fill gaps and check integrity
- for (PetLevelInfoMap::iterator itr = petInfo.begin(); itr != petInfo.end(); ++itr)
+ for (PetLevelInfoContainer::iterator itr = _petInfoStore.begin(); itr != _petInfoStore.end(); ++itr)
{
PetLevelInfo* pInfo = itr->second;
@@ -2907,8 +2874,8 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
- PetLevelInfoMap::const_iterator itr = petInfo.find(creature_id);
- if (itr == petInfo.end())
+ PetLevelInfoContainer::const_iterator itr = _petInfoStore.find(creature_id);
+ if (itr == _petInfoStore.end())
return NULL;
return &itr->second[level-1]; // data for level 1 stored in [0] array element, ...
@@ -2917,7 +2884,7 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
{
if (count > 0)
- playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
+ _playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
else
{
if (count < -1)
@@ -3024,7 +2991,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
pInfo->mapId = mapId;
pInfo->areaId = areaId;
@@ -3163,10 +3130,10 @@ void ObjectMgr::LoadPlayerInfo()
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
for (uint32 r = min_race; r < max_race; ++r)
for (uint32 c = min_class; c < max_class; ++c)
- playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
+ _playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
}
else
- playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
+ _playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
++count;
}
@@ -3212,7 +3179,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
pInfo->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt8(), fields[3].GetUInt32(), fields[4].GetUInt8()));
++count;
@@ -3260,7 +3227,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerClassInfo* pClassInfo = &playerClassInfo[current_class];
+ PlayerClassInfo* pClassInfo = &_playerClassInfo[current_class];
if (!pClassInfo->levelInfo)
pClassInfo->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -3281,7 +3248,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerClassInfo* pClassInfo = &playerClassInfo[class_];
+ PlayerClassInfo* pClassInfo = &_playerClassInfo[class_];
// fatal error if no level 1 data
if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0)
@@ -3353,7 +3320,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
+ PlayerInfo* pInfo = &_playerInfo[current_race][current_class];
if (!pInfo->levelInfo)
pInfo->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
@@ -3382,7 +3349,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!sChrClassesStore.LookupEntry(class_))
continue;
- PlayerInfo* pInfo = &playerInfo[race][class_];
+ PlayerInfo* pInfo = &_playerInfo[race][class_];
// skip non loaded combinations
if (!pInfo->displayId_m || !pInfo->displayId_f)
@@ -3424,9 +3391,9 @@ void ObjectMgr::LoadPlayerInfo()
{
uint32 oldMSTime = getMSTime();
- mPlayerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
+ _playerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
for (uint8 level = 0; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
- mPlayerXPperLevel[level] = 0;
+ _playerXPperLevel[level] = 0;
// 0 1
QueryResult result = WorldDatabase.Query("SELECT lvl, xp_for_next_level FROM player_xp_for_level");
@@ -3459,7 +3426,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
//PlayerXPperLevel
- mPlayerXPperLevel[current_level] = current_xp;
+ _playerXPperLevel[current_level] = current_xp;
++count;
}
while (result->NextRow());
@@ -3467,10 +3434,10 @@ void ObjectMgr::LoadPlayerInfo()
// fill level gaps
for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
{
- if (mPlayerXPperLevel[level] == 0)
+ if (_playerXPperLevel[level] == 0)
{
sLog->outErrorDb("Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level);
- mPlayerXPperLevel[level] = mPlayerXPperLevel[level-1]+100;
+ _playerXPperLevel[level] = _playerXPperLevel[level-1]+100;
}
}
@@ -3484,7 +3451,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassL
if (level < 1 || class_ >= MAX_CLASSES)
return;
- PlayerClassInfo const* pInfo = &playerClassInfo[class_];
+ PlayerClassInfo const* pInfo = &_playerClassInfo[class_];
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
@@ -3497,7 +3464,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES)
return;
- PlayerInfo const* pInfo = &playerInfo[race][class_];
+ PlayerInfo const* pInfo = &_playerInfo[race][class_];
if (pInfo->displayId_m == 0 || pInfo->displayId_f == 0)
return;
@@ -3510,7 +3477,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const
{
// base data (last known level)
- *info = playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
+ *info = _playerInfo[race][_class].levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
@@ -3588,9 +3555,9 @@ void ObjectMgr::LoadQuests()
uint32 oldMSTime = getMSTime();
// For reload case
- for (QuestMap::const_iterator itr=mQuestTemplates.begin(); itr != mQuestTemplates.end(); ++itr)
+ for (QuestMap::const_iterator itr=_questTemplates.begin(); itr != _questTemplates.end(); ++itr)
delete itr->second;
- mQuestTemplates.clear();
+ _questTemplates.clear();
mExclusiveQuestGroups.clear();
@@ -3649,13 +3616,13 @@ void ObjectMgr::LoadQuests()
Field* fields = result->Fetch();
Quest * newQuest = new Quest(fields);
- mQuestTemplates[newQuest->GetQuestId()] = newQuest;
+ _questTemplates[newQuest->GetQuestId()] = newQuest;
} while (result->NextRow());
std::map<uint32, uint32> usedMailTemplates;
// Post processing
- for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
+ for (QuestMap::iterator iter = _questTemplates.begin(); iter != _questTemplates.end(); ++iter)
{
// skip post-loading checks for disabled quests
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, iter->first, NULL))
@@ -4191,8 +4158,8 @@ void ObjectMgr::LoadQuests()
if (qinfo->NextQuestIdChain)
{
- QuestMap::iterator qNextItr = mQuestTemplates.find(qinfo->NextQuestIdChain);
- if (qNextItr == mQuestTemplates.end())
+ QuestMap::iterator qNextItr = _questTemplates.find(qinfo->NextQuestIdChain);
+ if (qNextItr == _questTemplates.end())
{
sLog->outErrorDb("Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.",
qinfo->GetQuestId(), qinfo->NextQuestIdChain, qinfo->NextQuestIdChain);
@@ -4360,7 +4327,7 @@ void ObjectMgr::LoadQuests()
// fill additional data stores
if (qinfo->PrevQuestId)
{
- if (mQuestTemplates.find(abs(qinfo->GetPrevQuestId())) == mQuestTemplates.end())
+ if (_questTemplates.find(abs(qinfo->GetPrevQuestId())) == _questTemplates.end())
{
sLog->outErrorDb("Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId());
}
@@ -4372,8 +4339,8 @@ void ObjectMgr::LoadQuests()
if (qinfo->NextQuestId)
{
- QuestMap::iterator qNextItr = mQuestTemplates.find(abs(qinfo->GetNextQuestId()));
- if (qNextItr == mQuestTemplates.end())
+ QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId()));
+ if (qNextItr == _questTemplates.end())
{
sLog->outErrorDb("Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
}
@@ -4422,7 +4389,7 @@ void ObjectMgr::LoadQuests()
}
}
- sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)mQuestTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -4430,7 +4397,7 @@ void ObjectMgr::LoadQuestLocales()
{
uint32 oldMSTime = getMSTime();
- mQuestLocaleMap.clear(); // need for reload case
+ _questLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"Title_loc1, Details_loc1, Objectives_loc1, OfferRewardText_loc1, RequestItemsText_loc1, EndText_loc1, CompletedText_loc1, ObjectiveText1_loc1, ObjectiveText2_loc1, ObjectiveText3_loc1, ObjectiveText4_loc1, QuestGiverTextWindow_loc1, QuestGiverTargetName_loc1, QuestTurnTextWindow_loc1, QuestTurnTargetName_loc1,"
@@ -4452,7 +4419,7 @@ void ObjectMgr::LoadQuestLocales()
uint32 entry = fields[0].GetUInt32();
- QuestLocale& data = mQuestLocaleMap[entry];
+ QuestLocale& data = _questLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -4475,7 +4442,7 @@ void ObjectMgr::LoadQuestLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)mQuestLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -4935,7 +4902,7 @@ void ObjectMgr::LoadSpellScriptNames()
{
uint32 oldMSTime = getMSTime();
- mSpellScripts.clear(); // need for reload case
+ _spellScriptsStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT spell_id, ScriptName FROM spell_script_names");
@@ -4979,12 +4946,12 @@ void ObjectMgr::LoadSpellScriptNames()
}
while (spellInfo)
{
- mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName)));
+ _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
spellInfo = sSpellMgr->GetSpellInfo(spellInfo->Id)->GetNextRankSpell();
}
}
else
- mSpellScripts.insert(SpellScriptsMap::value_type(spellInfo->Id, GetScriptId(scriptName)));
+ _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
++count;
}
while (result->NextRow());
@@ -4997,7 +4964,7 @@ void ObjectMgr::ValidateSpellScripts()
{
uint32 oldMSTime = getMSTime();
- if (mSpellScripts.empty())
+ if (_spellScriptsStore.empty())
{
sLog->outString(">> Validated 0 scripts.");
sLog->outString();
@@ -5006,14 +4973,14 @@ void ObjectMgr::ValidateSpellScripts()
uint32 count = 0;
- for (SpellScriptsMap::iterator itr = mSpellScripts.begin(); itr != mSpellScripts.end();)
+ for (SpellScriptsContainer::iterator itr = _spellScriptsStore.begin(); itr != _spellScriptsStore.end();)
{
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->first);
- std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> > SpellScriptLoaders;
+ std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> > SpellScriptLoaders;
sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders);
- itr = mSpellScripts.upper_bound(itr->first);
+ itr = _spellScriptsStore.upper_bound(itr->first);
- for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
+ for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
{
SpellScript* spellScript = sitr->first->GetSpellScript();
AuraScript* auraScript = sitr->first->GetAuraScript();
@@ -5041,7 +5008,7 @@ void ObjectMgr::ValidateSpellScripts()
}
if (!valid)
{
- mSpellScripts.erase(sitr->second);
+ _spellScriptsStore.erase(sitr->second);
}
}
++count;
@@ -5069,7 +5036,7 @@ void ObjectMgr::LoadPageTexts()
{
Field* fields = result->Fetch();
- PageText& pageText = PageTextStore[fields[0].GetUInt32()];
+ PageText& pageText = _pageTextStore[fields[0].GetUInt32()];
pageText.Text = fields[1].GetString();
pageText.NextPage = fields[2].GetInt16();
@@ -5078,12 +5045,12 @@ void ObjectMgr::LoadPageTexts()
}
while (result->NextRow());
- for (PageTextContainer::const_iterator itr = PageTextStore.begin(); itr != PageTextStore.end(); ++itr)
+ for (PageTextContainer::const_iterator itr = _pageTextStore.begin(); itr != _pageTextStore.end(); ++itr)
{
if (itr->second.NextPage)
{
- PageTextContainer::const_iterator itr2 = PageTextStore.find(itr->second.NextPage);
- if (itr2 == PageTextStore.end())
+ PageTextContainer::const_iterator itr2 = _pageTextStore.find(itr->second.NextPage);
+ if (itr2 == _pageTextStore.end())
sLog->outErrorDb("Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage);
}
@@ -5095,8 +5062,8 @@ void ObjectMgr::LoadPageTexts()
PageText const* ObjectMgr::GetPageText(uint32 pageEntry)
{
- PageTextContainer::const_iterator itr = PageTextStore.find(pageEntry);
- if (itr != PageTextStore.end())
+ PageTextContainer::const_iterator itr = _pageTextStore.find(pageEntry);
+ if (itr != _pageTextStore.end())
return &(itr->second);
return NULL;
@@ -5106,7 +5073,7 @@ void ObjectMgr::LoadPageTextLocales()
{
uint32 oldMSTime = getMSTime();
- mPageTextLocaleMap.clear(); // need for reload case
+ _pageTextLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8 FROM locales_page_text");
@@ -5119,13 +5086,13 @@ void ObjectMgr::LoadPageTextLocales()
uint32 entry = fields[0].GetUInt32();
- PageTextLocale& data = mPageTextLocaleMap[entry];
+ PageTextLocale& data = _pageTextLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)mPageTextLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -5161,7 +5128,7 @@ void ObjectMgr::LoadInstanceTemplate()
instanceTemplate.Parent = uint32(fields[1].GetUInt16());
instanceTemplate.ScriptId = sObjectMgr->GetScriptId(fields[2].GetCString());
- InstanceTemplateStore[mapID] = instanceTemplate;
+ _instanceTemplateStore[mapID] = instanceTemplate;
++count;
}
@@ -5173,8 +5140,8 @@ void ObjectMgr::LoadInstanceTemplate()
InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID)
{
- InstanceTemplateContainer::const_iterator itr = InstanceTemplateStore.find(uint16(mapID));
- if (itr != InstanceTemplateStore.end())
+ InstanceTemplateContainer::const_iterator itr = _instanceTemplateStore.find(uint16(mapID));
+ if (itr != _instanceTemplateStore.end())
return &(itr->second);
return NULL;
@@ -5251,7 +5218,7 @@ void ObjectMgr::LoadInstanceEncounters()
continue;
}
- DungeonEncounterList& encounters = mDungeonEncounters[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)];
+ DungeonEncounterList& encounters = _dungeonEncounterStore[MAKE_PAIR32(dungeonEncounter->mapId, dungeonEncounter->difficulty)];
encounters.push_back(new DungeonEncounter(dungeonEncounter, EncounterCreditType(creditType), creditEntry, lastEncounterDungeon));
++count;
} while (result->NextRow());
@@ -5262,8 +5229,8 @@ void ObjectMgr::LoadInstanceEncounters()
GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const
{
- GossipTextMap::const_iterator itr = mGossipText.find(Text_ID);
- if (itr != mGossipText.end())
+ GossipTextContainer::const_iterator itr = _gossipTextStore.find(Text_ID);
+ if (itr != _gossipTextStore.end())
return &itr->second;
return NULL;
}
@@ -5299,7 +5266,7 @@ void ObjectMgr::LoadGossipText()
continue;
}
- GossipText& gText = mGossipText[Text_ID];
+ GossipText& gText = _gossipTextStore[Text_ID];
for (int i = 0; i < MAX_GOSSIP_TEXT_OPTIONS; i++)
{
@@ -5325,7 +5292,7 @@ void ObjectMgr::LoadNpcTextLocales()
{
uint32 oldMSTime = getMSTime();
- mNpcTextLocaleMap.clear(); // need for reload case
+ _npcTextLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"Text0_0_loc1, Text0_1_loc1, Text1_0_loc1, Text1_1_loc1, Text2_0_loc1, Text2_1_loc1, Text3_0_loc1, Text3_1_loc1, Text4_0_loc1, Text4_1_loc1, Text5_0_loc1, Text5_1_loc1, Text6_0_loc1, Text6_1_loc1, Text7_0_loc1, Text7_1_loc1, "
@@ -5347,7 +5314,7 @@ void ObjectMgr::LoadNpcTextLocales()
uint32 entry = fields[0].GetUInt32();
- NpcTextLocale& data = mNpcTextLocaleMap[entry];
+ NpcTextLocale& data = _npcTextLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
{
@@ -5360,7 +5327,7 @@ void ObjectMgr::LoadNpcTextLocales()
}
} while (result->NextRow());
- sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)mNpcTextLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -5499,7 +5466,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
{
uint32 oldMSTime = getMSTime();
- mQuestAreaTriggerMap.clear(); // need for reload case
+ _questAreaTriggerStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id, quest FROM areatrigger_involvedrelation");
@@ -5546,7 +5513,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
// continue; - quest modified to required objective and trigger can be allowed.
}
- mQuestAreaTriggerMap[trigger_ID] = quest_ID;
+ _questAreaTriggerStore[trigger_ID] = quest_ID;
} while (result->NextRow());
@@ -5558,7 +5525,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
{
uint32 oldMSTime = getMSTime();
- mTavernAreaTriggerSet.clear(); // need for reload case
+ _tavernAreaTriggerStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id FROM areatrigger_tavern");
@@ -5586,7 +5553,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
continue;
}
- mTavernAreaTriggerSet.insert(Trigger_ID);
+ _tavernAreaTriggerStore.insert(Trigger_ID);
} while (result->NextRow());
sLog->outString(">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -5597,7 +5564,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
{
uint32 oldMSTime = getMSTime();
- mAreaTriggerScripts.clear(); // need for reload case
+ _areaTriggerScriptStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, ScriptName FROM areatrigger_scripts");
if (!result)
@@ -5624,7 +5591,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
sLog->outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
- mAreaTriggerScripts[Trigger_ID] = GetScriptId(scriptName);
+ _areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName);
} while (result->NextRow());
sLog->outString(">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -5739,7 +5706,7 @@ void ObjectMgr::LoadGraveyardZones()
{
uint32 oldMSTime = getMSTime();
- mGraveYardMap.clear(); // need for reload case
+ GraveYardStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT id, ghost_zone, faction FROM game_graveyard_zone");
@@ -5832,8 +5799,8 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
// then check faction
// if mapId != graveyard.mapId (ghost in instance) and search any graveyard associated
// then check faction
- GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::const_iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::const_iterator graveUp = GraveYardStore.upper_bound(zoneId);
MapEntry const* map = sMapStore.LookupEntry(MapId);
// not need to check validity of map object; MapId _MUST_ be valid here
@@ -5858,7 +5825,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
MapEntry const* mapEntry = sMapStore.LookupEntry(MapId);
- for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardContainer::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
GraveYardData const& data = itr->second;
@@ -5938,10 +5905,10 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
GraveYardData const* ObjectMgr::FindGraveYardData(uint32 id, uint32 zoneId)
{
- GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::const_iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::const_iterator graveUp = GraveYardStore.upper_bound(zoneId);
- for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardContainer::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
if (itr->second.safeLocId == id)
return &itr->second;
@@ -5960,7 +5927,7 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool per
data.safeLocId = id;
data.team = team;
- mGraveYardMap.insert(GraveYardMap::value_type(zoneId, data));
+ GraveYardStore.insert(GraveYardContainer::value_type(zoneId, data));
// add link to DB
if (persist)
@@ -5979,8 +5946,8 @@ bool ObjectMgr::AddGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool per
void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool persist /*= false*/)
{
- GraveYardMap::iterator graveLow = mGraveYardMap.lower_bound(zoneId);
- GraveYardMap::iterator graveUp = mGraveYardMap.upper_bound(zoneId);
+ GraveYardContainer::iterator graveLow = GraveYardStore.lower_bound(zoneId);
+ GraveYardContainer::iterator graveUp = GraveYardStore.upper_bound(zoneId);
if (graveLow == graveUp)
{
//sLog->outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
@@ -5989,7 +5956,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
bool found = false;
- GraveYardMap::iterator itr;
+ GraveYardContainer::iterator itr;
for (itr = graveLow; itr != graveUp; ++itr)
{
@@ -6013,7 +5980,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
return;
// remove from links
- mGraveYardMap.erase(itr);
+ GraveYardStore.erase(itr);
// remove link from DB
if (persist)
@@ -6034,7 +6001,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
{
uint32 oldMSTime = getMSTime();
- mAreaTriggers.clear(); // need for reload case
+ _areaTriggerStore.clear(); // need for reload case
// 0 1 2 3 4 5
QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
@@ -6083,7 +6050,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
continue;
}
- mAreaTriggers[Trigger_ID] = at;
+ _areaTriggerStore[Trigger_ID] = at;
} while (result->NextRow());
@@ -6095,7 +6062,7 @@ void ObjectMgr::LoadAccessRequirements()
{
uint32 oldMSTime = getMSTime();
- mAccessRequirements.clear(); // need for reload case
+ _accessRequirementStore.clear(); // need for reload case
// 0 1 2 3 4 5 6 7 8 9
QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement");
@@ -6176,7 +6143,7 @@ void ObjectMgr::LoadAccessRequirements()
}
}
- mAccessRequirements[requirement_ID] = ar;
+ _accessRequirementStore[requirement_ID] = ar;
} while (result->NextRow());
sLog->outString(">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@@ -6206,7 +6173,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
}
uint32 entrance_map = uint32(mapEntry->entrance_map);
- for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
+ for (AreaTriggerContainer::const_iterator itr = _areaTriggerStore.begin(); itr != _areaTriggerStore.end(); ++itr)
if ((!useParentDbValue && itr->second.target_mapId == entrance_map) || (useParentDbValue && itr->second.target_mapId == parentId))
{
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
@@ -6221,7 +6188,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
*/
AreaTrigger const* ObjectMgr::GetMapEntranceTrigger(uint32 Map) const
{
- for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
+ for (AreaTriggerContainer::const_iterator itr = _areaTriggerStore.begin(); itr != _areaTriggerStore.end(); ++itr)
{
if (itr->second.target_mapId == Map)
{
@@ -6237,41 +6204,41 @@ void ObjectMgr::SetHighestGuids()
{
QueryResult result = CharacterDatabase.Query("SELECT MAX(guid) FROM characters");
if (result)
- m_hiCharGuid = (*result)[0].GetUInt32()+1;
+ _hiCharGuid = (*result)[0].GetUInt32()+1;
result = WorldDatabase.Query("SELECT MAX(guid) FROM creature");
if (result)
- m_hiCreatureGuid = (*result)[0].GetUInt32()+1;
+ _hiCreatureGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(guid) FROM item_instance");
if (result)
- m_hiItemGuid = (*result)[0].GetUInt32()+1;
+ _hiItemGuid = (*result)[0].GetUInt32()+1;
- // Cleanup other tables from not existed guids ( >= m_hiItemGuid)
- CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", m_hiItemGuid); // One-time query
- CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", m_hiItemGuid); // One-time query
+ // Cleanup other tables from not existed guids ( >= _hiItemGuid)
+ CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM auctionhouse WHERE itemguid >= '%u'", _hiItemGuid); // One-time query
+ CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE item_guid >= '%u'", _hiItemGuid); // One-time query
result = WorldDatabase.Query("SELECT MAX(guid) FROM gameobject");
if (result)
- m_hiGoGuid = (*result)[0].GetUInt32()+1;
+ _hiGoGuid = (*result)[0].GetUInt32()+1;
result = WorldDatabase.Query("SELECT MAX(guid) FROM transports");
if (result)
- m_hiMoTransGuid = (*result)[0].GetUInt32()+1;
+ _hiMoTransGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(id) FROM auctionhouse");
if (result)
- m_auctionid = (*result)[0].GetUInt32()+1;
+ _auctionId = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(id) FROM mail");
if (result)
- m_mailid = (*result)[0].GetUInt32()+1;
+ _mailId = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(corpseGuid) FROM corpse");
if (result)
- m_hiCorpseGuid = (*result)[0].GetUInt32()+1;
+ _hiCorpseGuid = (*result)[0].GetUInt32()+1;
result = CharacterDatabase.Query("SELECT MAX(arenateamid) FROM arena_team");
if (result)
@@ -6279,7 +6246,7 @@ void ObjectMgr::SetHighestGuids()
result = CharacterDatabase.Query("SELECT MAX(setguid) FROM character_equipmentsets");
if (result)
- m_equipmentSetGuid = (*result)[0].GetUInt64()+1;
+ _equipmentSetGuid = (*result)[0].GetUInt64()+1;
result = CharacterDatabase.Query("SELECT MAX(guildId) FROM guild");
if (result)
@@ -6292,32 +6259,32 @@ void ObjectMgr::SetHighestGuids()
uint32 ObjectMgr::GenerateAuctionID()
{
- if (m_auctionid >= 0xFFFFFFFE)
+ if (_auctionId >= 0xFFFFFFFE)
{
sLog->outError("Auctions ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_auctionid++;
+ return _auctionId++;
}
uint64 ObjectMgr::GenerateEquipmentSetGuid()
{
- if (m_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
+ if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
{
sLog->outError("EquipmentSet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_equipmentSetGuid++;
+ return _equipmentSetGuid++;
}
uint32 ObjectMgr::GenerateMailID()
{
- if (m_mailid >= 0xFFFFFFFE)
+ if (_mailId >= 0xFFFFFFFE)
{
sLog->outError("Mail ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_mailid++;
+ return _mailId++;
}
uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
@@ -6325,68 +6292,68 @@ uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
switch (guidhigh)
{
case HIGHGUID_ITEM:
- if (m_hiItemGuid >= 0xFFFFFFFE)
+ if (_hiItemGuid >= 0xFFFFFFFE)
{
sLog->outError("Item guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiItemGuid++;
+ return _hiItemGuid++;
case HIGHGUID_UNIT:
- if (m_hiCreatureGuid >= 0x00FFFFFE)
+ if (_hiCreatureGuid >= 0x00FFFFFE)
{
sLog->outError("Creature guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCreatureGuid++;
+ return _hiCreatureGuid++;
case HIGHGUID_PET:
- if (m_hiPetGuid >= 0x00FFFFFE)
+ if (_hiPetGuid >= 0x00FFFFFE)
{
sLog->outError("Pet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiPetGuid++;
+ return _hiPetGuid++;
case HIGHGUID_VEHICLE:
- if (m_hiVehicleGuid >= 0x00FFFFFF)
+ if (_hiVehicleGuid >= 0x00FFFFFF)
{
sLog->outError("Vehicle guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiVehicleGuid++;
+ return _hiVehicleGuid++;
case HIGHGUID_PLAYER:
- if (m_hiCharGuid >= 0xFFFFFFFE)
+ if (_hiCharGuid >= 0xFFFFFFFE)
{
sLog->outError("Players guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCharGuid++;
+ return _hiCharGuid++;
case HIGHGUID_GAMEOBJECT:
- if (m_hiGoGuid >= 0x00FFFFFE)
+ if (_hiGoGuid >= 0x00FFFFFE)
{
sLog->outError("Gameobject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiGoGuid++;
+ return _hiGoGuid++;
case HIGHGUID_CORPSE:
- if (m_hiCorpseGuid >= 0xFFFFFFFE)
+ if (_hiCorpseGuid >= 0xFFFFFFFE)
{
sLog->outError("Corpse guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiCorpseGuid++;
+ return _hiCorpseGuid++;
case HIGHGUID_DYNAMICOBJECT:
- if (m_hiDoGuid >= 0xFFFFFFFE)
+ if (_hiDoGuid >= 0xFFFFFFFE)
{
sLog->outError("DynamicObject guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiDoGuid++;
+ return _hiDoGuid++;
case HIGHGUID_MO_TRANSPORT:
- if (m_hiMoTransGuid >= 0xFFFFFFFE)
+ if (_hiMoTransGuid >= 0xFFFFFFFE)
{
sLog->outError("MO Transport guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
- return m_hiMoTransGuid++;
+ return _hiMoTransGuid++;
default:
ASSERT(0);
}
@@ -6399,7 +6366,7 @@ void ObjectMgr::LoadGameObjectLocales()
{
uint32 oldMSTime = getMSTime();
- mGameObjectLocaleMap.clear(); // need for reload case
+ _gameObjectLocaleStore.clear(); // need for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, "
"name_loc1, name_loc2, name_loc3, name_loc4, name_loc5, name_loc6, name_loc7, name_loc8, "
@@ -6415,7 +6382,7 @@ void ObjectMgr::LoadGameObjectLocales()
uint32 entry = fields[0].GetUInt32();
- GameObjectLocale& data = mGameObjectLocaleMap[entry];
+ GameObjectLocale& data = _gameObjectLocaleStore[entry];
for (uint8 i = 1; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
@@ -6424,7 +6391,7 @@ void ObjectMgr::LoadGameObjectLocales()
AddLocaleString(fields[i + (TOTAL_LOCALES - 1)].GetString(), LocaleConstant(i), data.CastBarCaption);
} while (result->NextRow());
- sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)mGameObjectLocaleMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -6515,7 +6482,7 @@ void ObjectMgr::LoadGameObjectTemplate()
uint32 entry = fields[0].GetUInt32();
- GameObjectTemplate& got = GameObjectTemplateStore[entry];
+ GameObjectTemplate& got = _gameObjectTemplateStore[entry];
got.entry = entry;
got.type = uint32(fields[1].GetUInt8());
@@ -6698,7 +6665,7 @@ void ObjectMgr::LoadExplorationBaseXP()
Field* fields = result->Fetch();
uint8 level = fields[0].GetUInt8();
uint32 basexp = fields[1].GetUInt32();
- mBaseXPTable[level] = basexp;
+ _baseXPTable[level] = basexp;
++count;
}
while (result->NextRow());
@@ -6709,13 +6676,13 @@ void ObjectMgr::LoadExplorationBaseXP()
uint32 ObjectMgr::GetBaseXP(uint8 level)
{
- return mBaseXPTable[level] ? mBaseXPTable[level] : 0;
+ return _baseXPTable[level] ? _baseXPTable[level] : 0;
}
uint32 ObjectMgr::GetXPForLevel(uint8 level)
{
- if (level < mPlayerXPperLevel.size())
- return mPlayerXPperLevel[level];
+ if (level < _playerXPperLevel.size())
+ return _playerXPperLevel[level];
return 0;
}
@@ -6742,9 +6709,9 @@ void ObjectMgr::LoadPetNames()
uint32 entry = fields[1].GetUInt32();
bool half = fields[2].GetBool();
if (half)
- PetHalfName1[entry].push_back(word);
+ _petHalfName1[entry].push_back(word);
else
- PetHalfName0[entry].push_back(word);
+ _petHalfName0[entry].push_back(word);
++count;
}
while (result->NextRow());
@@ -6761,17 +6728,17 @@ void ObjectMgr::LoadPetNumber()
if (result)
{
Field* fields = result->Fetch();
- m_hiPetNumber = fields[0].GetUInt32()+1;
+ _hiPetNumber = fields[0].GetUInt32()+1;
}
- sLog->outString(">> Loaded the max pet number: %d in %u ms", m_hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
std::string ObjectMgr::GeneratePetName(uint32 entry)
{
- StringVector & list0 = PetHalfName0[entry];
- StringVector & list1 = PetHalfName1[entry];
+ StringVector & list0 = _petHalfName0[entry];
+ StringVector & list1 = _petHalfName1[entry];
if (list0.empty() || list1.empty())
{
@@ -6788,7 +6755,7 @@ std::string ObjectMgr::GeneratePetName(uint32 entry)
uint32 ObjectMgr::GeneratePetNumber()
{
- return ++m_hiPetNumber;
+ return ++_hiPetNumber;
}
void ObjectMgr::LoadCorpses()
@@ -6801,7 +6768,7 @@ void ObjectMgr::LoadCorpses()
PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSES));
if (!result)
{
- sLog->outString(">> Loaded 0 corpses. DB table `pet_name_generation` is empty.");
+ sLog->outString(">> Loaded 0 corpses. DB table `corpse` is empty.");
sLog->outString();
return;
}
@@ -6838,7 +6805,7 @@ void ObjectMgr::LoadReputationRewardRate()
{
uint32 oldMSTime = getMSTime();
- m_RepRewardRateMap.clear(); // for reload case
+ _repRewardRateStore.clear(); // for reload case
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, creature_rate, spell_rate FROM reputation_reward_rate");
@@ -6888,7 +6855,7 @@ void ObjectMgr::LoadReputationRewardRate()
continue;
}
- m_RepRewardRateMap[factionId] = repRate;
+ _repRewardRateStore[factionId] = repRate;
++count;
}
@@ -6903,7 +6870,7 @@ void ObjectMgr::LoadReputationOnKill()
uint32 oldMSTime = getMSTime();
// For reload case
- mRepOnKill.clear();
+ _repOnKillStore.clear();
uint32 count = 0;
@@ -6927,15 +6894,15 @@ void ObjectMgr::LoadReputationOnKill()
uint32 creature_id = fields[0].GetUInt32();
ReputationOnKillEntry repOnKill;
- repOnKill.repfaction1 = fields[1].GetUInt32();
- repOnKill.repfaction2 = fields[2].GetUInt32();
- repOnKill.is_teamaward1 = fields[3].GetBool();
- repOnKill.reputation_max_cap1 = fields[4].GetUInt32();
- repOnKill.repvalue1 = fields[5].GetInt32();
- repOnKill.is_teamaward2 = fields[6].GetBool();
- repOnKill.reputation_max_cap2 = fields[7].GetUInt32();
- repOnKill.repvalue2 = fields[8].GetInt32();
- repOnKill.team_dependent = fields[9].GetUInt8();
+ repOnKill.RepFaction1 = fields[1].GetUInt32();
+ repOnKill.RepFaction2 = fields[2].GetUInt32();
+ repOnKill.IsTeamAward1 = fields[3].GetBool();
+ repOnKill.ReputationMaxCap1 = fields[4].GetUInt32();
+ repOnKill.RepValue1 = fields[5].GetInt32();
+ repOnKill.IsTeamAward2 = fields[6].GetBool();
+ repOnKill.ReputationMaxCap2 = fields[7].GetUInt32();
+ repOnKill.RepValue2 = fields[8].GetInt32();
+ repOnKill.TeamDependent = fields[9].GetUInt8();
if (!GetCreatureTemplate(creature_id))
{
@@ -6943,27 +6910,27 @@ void ObjectMgr::LoadReputationOnKill()
continue;
}
- if (repOnKill.repfaction1)
+ if (repOnKill.RepFaction1)
{
- FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1);
+ FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.RepFaction1);
if (!factionEntry1)
{
- sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction1);
+ sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction1);
continue;
}
}
- if (repOnKill.repfaction2)
+ if (repOnKill.RepFaction2)
{
- FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2);
+ FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.RepFaction2);
if (!factionEntry2)
{
- sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction2);
+ sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction2);
continue;
}
}
- mRepOnKill[creature_id] = repOnKill;
+ _repOnKillStore[creature_id] = repOnKill;
++count;
} while (result->NextRow());
@@ -6976,7 +6943,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
{
uint32 oldMSTime = getMSTime();
- m_RepSpilloverTemplateMap.clear(); // for reload case
+ _repSpilloverTemplateStore.clear(); // for reload case
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT faction, faction1, rate_1, rank_1, faction2, rate_2, rank_2, faction3, rate_3, rank_3, faction4, rate_4, rank_4 FROM reputation_spillover_template");
@@ -7075,7 +7042,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
continue;
}
- m_RepSpilloverTemplateMap[factionId] = repTemplate;
+ _repSpilloverTemplateStore[factionId] = repTemplate;
++count;
}
@@ -7089,7 +7056,7 @@ void ObjectMgr::LoadPointsOfInterest()
{
uint32 oldMSTime = getMSTime();
- mPointsOfInterest.clear(); // need for reload case
+ _pointsOfInterestStore.clear(); // need for reload case
uint32 count = 0;
@@ -7123,7 +7090,7 @@ void ObjectMgr::LoadPointsOfInterest()
continue;
}
- mPointsOfInterest[point_id] = POI;
+ _pointsOfInterestStore[point_id] = POI;
++count;
} while (result->NextRow());
@@ -7136,7 +7103,7 @@ void ObjectMgr::LoadQuestPOI()
{
uint32 oldMSTime = getMSTime();
- mQuestPOIMap.clear(); // need for reload case
+ _questPOIStore.clear(); // need for reload case
uint32 count = 0;
@@ -7196,7 +7163,7 @@ void ObjectMgr::LoadQuestPOI()
QuestPOI POI(id, objIndex, mapId, WorldMapAreaId, FloorId, unk3, unk4);
POI.points = POIs[questId][id];
- mQuestPOIMap[questId].push_back(POI);
+ _questPOIStore[questId].push_back(POI);
++count;
} while (result->NextRow());
@@ -7209,9 +7176,9 @@ void ObjectMgr::LoadNPCSpellClickSpells()
{
uint32 oldMSTime = getMSTime();
- mSpellClickInfoMap.clear();
- // 0 1 2 3 4 5 6 7 8
- QueryResult result = WorldDatabase.Query("SELECT npc_entry, spell_id, quest_start, quest_start_active, quest_end, cast_flags, aura_required, aura_forbidden, user_type FROM npc_spellclick_spells");
+ _spellClickInfoStore.clear();
+ // 0 1 2 3
+ QueryResult result = WorldDatabase.Query("SELECT npc_entry, spell_id, cast_flags, user_type FROM npc_spellclick_spells");
if (!result)
{
@@ -7242,68 +7209,16 @@ void ObjectMgr::LoadNPCSpellClickSpells()
continue;
}
- uint32 auraRequired = fields[6].GetUInt32();
- if (auraRequired)
- {
- SpellInfo const* aurReqInfo = sSpellMgr->GetSpellInfo(auraRequired);
- if (!aurReqInfo)
- {
- sLog->outErrorDb("Table npc_spellclick_spells references unknown aura required %u. Skipping entry.", auraRequired);
- continue;
- }
- }
-
- uint32 auraForbidden = fields[7].GetUInt32();
- if (auraForbidden)
- {
- SpellInfo const* aurForInfo = sSpellMgr->GetSpellInfo(auraForbidden);
- if (!aurForInfo)
- {
- sLog->outErrorDb("Table npc_spellclick_spells references unknown aura forbidden %u. Skipping entry.", auraForbidden);
- continue;
- }
- }
-
- uint32 quest_start = fields[2].GetUInt32();
-
- // quest might be 0 to enable spellclick independent of any quest
- if (quest_start)
- {
- if (mQuestTemplates.find(quest_start) == mQuestTemplates.end())
- {
- sLog->outErrorDb("Table npc_spellclick_spells references unknown start quest %u. Skipping entry.", quest_start);
- continue;
- }
- }
-
- bool quest_start_active = fields[3].GetBool();
-
- uint32 quest_end = fields[4].GetUInt32();
- // quest might be 0 to enable spellclick active infinity after start quest
- if (quest_end)
- {
- if (mQuestTemplates.find(quest_end) == mQuestTemplates.end())
- {
- sLog->outErrorDb("Table npc_spellclick_spells references unknown end quest %u. Skipping entry.", quest_end);
- continue;
- }
- }
-
- uint8 userType = fields[8].GetUInt8();
+ uint8 userType = fields[3].GetUInt8();
if (userType >= SPELL_CLICK_USER_MAX)
sLog->outErrorDb("Table npc_spellclick_spells references unknown user type %u. Skipping entry.", uint32(userType));
- uint8 castFlags = fields[5].GetUInt8();
+ uint8 castFlags = fields[2].GetUInt8();
SpellClickInfo info;
info.spellId = spellid;
- info.questStart = quest_start;
- info.questStartCanActive = quest_start_active;
- info.questEnd = quest_end;
info.castFlags = castFlags;
- info.auraRequired = auraRequired;
- info.auraForbidden = auraForbidden;
info.userType = SpellClickUserTypes(userType);
- mSpellClickInfoMap.insert(SpellClickInfoMap::value_type(npc_entry, info));
+ _spellClickInfoStore.insert(SpellClickInfoContainer::value_type(npc_entry, info));
++count;
}
@@ -7314,7 +7229,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
{
- if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && mSpellClickInfoMap.find(itr->second.Entry) == mSpellClickInfoMap.end())
+ if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && _spellClickInfoStore.find(itr->second.Entry) == _spellClickInfoStore.end())
{
sLog->outErrorDb("npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry);
const_cast<CreatureTemplate*>(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_SPELLCLICK;
@@ -7336,9 +7251,9 @@ void ObjectMgr::SaveCreatureRespawnTime(uint32 loguid, uint32 instance, time_t t
// This function can be called from various map threads concurrently
{
- m_CreatureRespawnTimesMtx.acquire();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.acquire();
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CREATURE_RESPAWN);
@@ -7352,9 +7267,9 @@ void ObjectMgr::RemoveCreatureRespawnTime(uint32 loguid, uint32 instance)
{
// This function can be called from various map threads concurrently
{
- m_CreatureRespawnTimesMtx.acquire();
- mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.acquire();
+ _creatureRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN);
@@ -7370,7 +7285,7 @@ void ObjectMgr::DeleteCreatureData(uint32 guid)
if (data)
RemoveCreatureFromGrid(guid, data);
- mCreatureDataMap.erase(guid);
+ _creatureDataStore.erase(guid);
}
void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
@@ -7384,9 +7299,9 @@ void ObjectMgr::SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t)
// This function can be called from different map threads concurrently
{
- m_GORespawnTimesMtx.acquire();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.acquire();
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = t;
+ _goRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GO_RESPAWN);
@@ -7400,9 +7315,9 @@ void ObjectMgr::RemoveGORespawnTime(uint32 loguid, uint32 instance)
{
// This function can be called from different map threads concurrently
{
- m_GORespawnTimesMtx.acquire();
- mGORespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.acquire();
+ _goRespawnTimes[MAKE_PAIR64(loguid, instance)] = 0;
+ _goRespawnTimesMutex.release();
}
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GO_RESPAWN);
@@ -7417,28 +7332,28 @@ void ObjectMgr::DeleteRespawnTimeForInstance(uint32 instance)
RespawnTimes::iterator next;
{
- m_GORespawnTimesMtx.acquire();
- for (RespawnTimes::iterator itr = mGORespawnTimes.begin(); itr != mGORespawnTimes.end(); itr = next)
+ _goRespawnTimesMutex.acquire();
+ for (RespawnTimes::iterator itr = _goRespawnTimes.begin(); itr != _goRespawnTimes.end(); itr = next)
{
next = itr;
++next;
if (GUID_HIPART(itr->first) == instance)
- mGORespawnTimes.erase(itr);
+ _goRespawnTimes.erase(itr);
}
- m_GORespawnTimesMtx.release();
+ _goRespawnTimesMutex.release();
}
{
- m_CreatureRespawnTimesMtx.acquire();
- for (RespawnTimes::iterator itr = mCreatureRespawnTimes.begin(); itr != mCreatureRespawnTimes.end(); itr = next)
+ _creatureRespawnTimesMutex.acquire();
+ for (RespawnTimes::iterator itr = _creatureRespawnTimes.begin(); itr != _creatureRespawnTimes.end(); itr = next)
{
next = itr;
++next;
if (GUID_HIPART(itr->first) == instance)
- mCreatureRespawnTimes.erase(itr);
+ _creatureRespawnTimes.erase(itr);
}
- m_CreatureRespawnTimesMtx.release();
+ _creatureRespawnTimesMutex.release();
}
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN_BY_INSTANCE);
stmt->setUInt32(0, instance);
@@ -7455,20 +7370,20 @@ void ObjectMgr::DeleteGOData(uint32 guid)
if (data)
RemoveGameobjectFromGrid(guid, data);
- mGameObjectDataMap.erase(guid);
+ _gameObjectDataStore.erase(guid);
}
void ObjectMgr::AddCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid, uint32 instance)
{
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(mapid, 0)][cellid];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(mapid, 0)][cellid];
cell_guids.corpses[player_guid] = instance;
}
void ObjectMgr::DeleteCorpseCellData(uint32 mapid, uint32 cellid, uint32 player_guid)
{
// corpses are always added to spawn mode 0 and they are spawned by their instance id
- CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(mapid, 0)][cellid];
+ CellObjectGuids& cell_guids = _mapObjectGuidsStore[MAKE_PAIR32(mapid, 0)][cellid];
cell_guids.corpses.erase(player_guid);
}
@@ -7500,7 +7415,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
uint32 quest = result->Fetch()[1].GetUInt32();
uint32 poolId = result->Fetch()[2].GetUInt32();
- if (mQuestTemplates.find(quest) == mQuestTemplates.end())
+ if (_questTemplates.find(quest) == _questTemplates.end())
{
sLog->outErrorDb("Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
continue;
@@ -7520,9 +7435,9 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table,
void ObjectMgr::LoadGameobjectQuestRelations()
{
- LoadQuestRelationsHelper(mGOQuestRelations, "gameobject_questrelation", true, true);
+ LoadQuestRelationsHelper(_goQuestRelations, "gameobject_questrelation", true, true);
- for (QuestRelations::iterator itr = mGOQuestRelations.begin(); itr != mGOQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _goQuestRelations.begin(); itr != _goQuestRelations.end(); ++itr)
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
@@ -7534,9 +7449,9 @@ void ObjectMgr::LoadGameobjectQuestRelations()
void ObjectMgr::LoadGameobjectInvolvedRelations()
{
- LoadQuestRelationsHelper(mGOQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
+ LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
- for (QuestRelations::iterator itr = mGOQuestInvolvedRelations.begin(); itr != mGOQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _goQuestInvolvedRelations.begin(); itr != _goQuestInvolvedRelations.end(); ++itr)
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
@@ -7548,9 +7463,9 @@ void ObjectMgr::LoadGameobjectInvolvedRelations()
void ObjectMgr::LoadCreatureQuestRelations()
{
- LoadQuestRelationsHelper(mCreatureQuestRelations, "creature_questrelation", true, false);
+ LoadQuestRelationsHelper(_creatureQuestRelations, "creature_questrelation", true, false);
- for (QuestRelations::iterator itr = mCreatureQuestRelations.begin(); itr != mCreatureQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _creatureQuestRelations.begin(); itr != _creatureQuestRelations.end(); ++itr)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
@@ -7562,9 +7477,9 @@ void ObjectMgr::LoadCreatureQuestRelations()
void ObjectMgr::LoadCreatureInvolvedRelations()
{
- LoadQuestRelationsHelper(mCreatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
+ LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
- for (QuestRelations::iterator itr = mCreatureQuestInvolvedRelations.begin(); itr != mCreatureQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = _creatureQuestInvolvedRelations.begin(); itr != _creatureQuestInvolvedRelations.end(); ++itr)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
@@ -7578,7 +7493,7 @@ void ObjectMgr::LoadReservedPlayersNames()
{
uint32 oldMSTime = getMSTime();
- m_ReservedNames.clear(); // need for reload case
+ _reservedNamesStore.clear(); // need for reload case
QueryResult result = CharacterDatabase.Query("SELECT name FROM reserved_name");
@@ -7606,7 +7521,7 @@ void ObjectMgr::LoadReservedPlayersNames()
wstrToLower(wstr);
- m_ReservedNames.insert(wstr);
+ _reservedNamesStore.insert(wstr);
++count;
}
while (result->NextRow());
@@ -7623,7 +7538,7 @@ bool ObjectMgr::IsReservedName(const std::string& name) const
wstrToLower(wstr);
- return m_ReservedNames.find(wstr) != m_ReservedNames.end();
+ return _reservedNamesStore.find(wstr) != _reservedNamesStore.end();
}
enum LanguageType
@@ -7761,7 +7676,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
uint32 oldMSTime = getMSTime();
- mGameObjectForQuestSet.clear(); // need for reload case
+ _gameObjectForQuestStore.clear(); // need for reload case
if (sObjectMgr->GetGameObjectTemplates()->empty())
{
@@ -7786,7 +7701,7 @@ void ObjectMgr::LoadGameObjectForQuests()
// find quest loot for GO
if (itr->second.chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
++count;
}
break;
@@ -7795,7 +7710,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
if (itr->second._generic.questID > 0) //quests objects
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
count++;
}
break;
@@ -7804,7 +7719,7 @@ void ObjectMgr::LoadGameObjectForQuests()
{
if (itr->second.goober.questId > 0) //quests objects
{
- mGameObjectForQuestSet.insert(itr->second.entry);
+ _gameObjectForQuestStore.insert(itr->second.entry);
count++;
}
break;
@@ -7848,10 +7763,10 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
}
// cleanup affected map part for reloading case
- for (TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end();)
+ for (TrinityStringLocaleContainer::iterator itr = _trinityStringLocaleStore.begin(); itr != _trinityStringLocaleStore.end();)
{
if (itr->first >= start_value && itr->first < end_value)
- mTrinityStringLocaleMap.erase(itr++);
+ _trinityStringLocaleStore.erase(itr++);
else
++itr;
}
@@ -7888,7 +7803,7 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max
continue;
}
- TrinityStringLocale& data = mTrinityStringLocaleMap[entry];
+ TrinityStringLocale& data = _trinityStringLocaleStore[entry];
if (!data.Content.empty())
{
@@ -7933,7 +7848,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
{
uint32 oldMSTime = getMSTime();
- mFishingBaseForArea.clear(); // for reload case
+ _fishingBaseForAreaStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT entry, skill FROM skill_fishing_base_level");
@@ -7960,7 +7875,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
continue;
}
- mFishingBaseForArea[entry] = skill;
+ _fishingBaseForAreaStore[entry] = skill;
++count;
}
while (result->NextRow());
@@ -7995,15 +7910,15 @@ bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& n
uint32 ObjectMgr::GetAreaTriggerScriptId(uint32 trigger_id)
{
- AreaTriggerScriptMap::const_iterator i = mAreaTriggerScripts.find(trigger_id);
- if (i!= mAreaTriggerScripts.end())
+ AreaTriggerScriptContainer::const_iterator i = _areaTriggerScriptStore.find(trigger_id);
+ if (i!= _areaTriggerScriptStore.end())
return i->second;
return 0;
}
SpellScriptsBounds ObjectMgr::GetSpellScriptsBounds(uint32 spell_id)
{
- return SpellScriptsBounds(mSpellScripts.lower_bound(spell_id), mSpellScripts.upper_bound(spell_id));
+ return SpellScriptsBounds(_spellScriptsStore.lower_bound(spell_id), _spellScriptsStore.upper_bound(spell_id));
}
SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial)
@@ -8042,7 +7957,7 @@ void ObjectMgr::LoadGameTele()
{
uint32 oldMSTime = getMSTime();
- m_GameTeleMap.clear(); // for reload case
+ _gameTeleStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, map, name FROM game_tele");
@@ -8085,7 +8000,7 @@ void ObjectMgr::LoadGameTele()
wstrToLower(gt.wnameLow);
- m_GameTeleMap[id] = gt;
+ _gameTeleStore[id] = gt;
++count;
}
@@ -8107,7 +8022,7 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
// Alternative first GameTele what contains wnameLow as substring in case no GameTele location found
const GameTele* alt = NULL;
- for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
{
if (itr->second.wnameLow == wname)
return &itr->second;
@@ -8122,7 +8037,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
{
// find max id
uint32 new_id = 0;
- for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
if (itr->first > new_id)
new_id = itr->first;
@@ -8134,7 +8049,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
wstrToLower(tele.wnameLow);
- m_GameTeleMap[new_id] = tele;
+ _gameTeleStore[new_id] = tele;
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_GAME_TELE);
@@ -8161,7 +8076,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
// converting string that we try to find to lower case
wstrToLower(wname);
- for (GameTeleMap::iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleContainer::iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
{
if (itr->second.wnameLow == wname)
{
@@ -8171,7 +8086,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
WorldDatabase.Execute(stmt);
- m_GameTeleMap.erase(itr);
+ _gameTeleStore.erase(itr);
return true;
}
}
@@ -8183,7 +8098,7 @@ void ObjectMgr::LoadMailLevelRewards()
{
uint32 oldMSTime = getMSTime();
- m_mailLevelRewardMap.clear(); // for reload case
+ _mailLevelRewardStore.clear(); // for reload case
QueryResult result = WorldDatabase.Query("SELECT level, raceMask, mailTemplateId, senderEntry FROM mail_level_reward");
@@ -8230,7 +8145,7 @@ void ObjectMgr::LoadMailLevelRewards()
continue;
}
- m_mailLevelRewardMap[level].push_back(MailLevelReward(raceMask, mailTemplateId, senderEntry));
+ _mailLevelRewardStore[level].push_back(MailLevelReward(raceMask, mailTemplateId, senderEntry));
++count;
}
@@ -8277,7 +8192,7 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost,
return;
}
- TrainerSpellData& data = m_mCacheTrainerSpellMap[entry];
+ TrainerSpellData& data = _cacheTrainerSpellStore[entry];
TrainerSpell& trainerSpell = data.spellList[spell];
trainerSpell.spell = spell;
@@ -8323,7 +8238,7 @@ void ObjectMgr::LoadTrainerSpell()
uint32 oldMSTime = getMSTime();
// For reload case
- m_mCacheTrainerSpellMap.clear();
+ _cacheTrainerSpellStore.clear();
std::set<uint32> skip_trainers;
@@ -8389,7 +8304,7 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *s
if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, NULL, skip_vendors))
continue;
- VendorItemData& vList = m_mCacheVendorItemMap[vendor];
+ VendorItemData& vList = _cacheVendorItemStore[vendor];
vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
@@ -8405,9 +8320,9 @@ void ObjectMgr::LoadVendors()
uint32 oldMSTime = getMSTime();
// For reload case
- for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
+ for (CacheVendorItemContainer::iterator itr = _cacheVendorItemStore.begin(); itr != _cacheVendorItemStore.end(); ++itr)
itr->second.Clear();
- m_mCacheVendorItemMap.clear();
+ _cacheVendorItemStore.clear();
std::set<uint32> skip_vendors;
@@ -8440,7 +8355,7 @@ void ObjectMgr::LoadVendors()
if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, NULL, &skip_vendors))
continue;
- VendorItemData& vList = m_mCacheVendorItemMap[entry];
+ VendorItemData& vList = _cacheVendorItemStore[entry];
vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
@@ -8457,7 +8372,7 @@ void ObjectMgr::LoadGossipMenu()
{
uint32 oldMSTime = getMSTime();
- m_mGossipMenusMap.clear();
+ _gossipMenusStore.clear();
QueryResult result = WorldDatabase.Query("SELECT entry, text_id FROM gossip_menu");
@@ -8486,7 +8401,7 @@ void ObjectMgr::LoadGossipMenu()
continue;
}
- m_mGossipMenusMap.insert(GossipMenusMap::value_type(gMenu.entry, gMenu));
+ _gossipMenusStore.insert(GossipMenusContainer::value_type(gMenu.entry, gMenu));
++count;
}
@@ -8500,7 +8415,7 @@ void ObjectMgr::LoadGossipMenuItems()
{
uint32 oldMSTime = getMSTime();
- m_mGossipMenuItemsMap.clear();
+ _gossipMenuItemsStore.clear();
QueryResult result = WorldDatabase.Query(
"SELECT menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, "
@@ -8549,7 +8464,7 @@ void ObjectMgr::LoadGossipMenuItems()
gMenuItem.ActionPoiId = 0;
}
- m_mGossipMenuItemsMap.insert(GossipMenuItemsMap::value_type(gMenuItem.MenuId, gMenuItem));
+ _gossipMenuItemsStore.insert(GossipMenuItemsContainer::value_type(gMenuItem.MenuId, gMenuItem));
++count;
}
while (result->NextRow());
@@ -8560,7 +8475,7 @@ void ObjectMgr::LoadGossipMenuItems()
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
{
- VendorItemData& vList = m_mCacheVendorItemMap[entry];
+ VendorItemData& vList = _cacheVendorItemStore[entry];
vList.AddItem(item, maxcount, incrtime, extendedCost);
if (persist)
@@ -8579,8 +8494,8 @@ void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32
bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool persist /*= true*/)
{
- CacheVendorItemMap::iterator iter = m_mCacheVendorItemMap.find(entry);
- if (iter == m_mCacheVendorItemMap.end())
+ CacheVendorItemContainer::iterator iter = _cacheVendorItemStore.find(entry);
+ if (iter == _cacheVendorItemStore.end())
return false;
if (!iter->second.RemoveItem(item))
@@ -8690,7 +8605,7 @@ void ObjectMgr::LoadScriptNames()
{
uint32 oldMSTime = getMSTime();
- m_scriptNames.push_back("");
+ _scriptNamesStore.push_back("");
QueryResult result = WorldDatabase.Query(
"SELECT DISTINCT(ScriptName) FROM achievement_criteria_data WHERE ScriptName <> '' AND type = 11 "
"UNION "
@@ -8727,12 +8642,12 @@ void ObjectMgr::LoadScriptNames()
do
{
- m_scriptNames.push_back((*result)[0].GetString());
+ _scriptNamesStore.push_back((*result)[0].GetString());
++count;
}
while (result->NextRow());
- std::sort(m_scriptNames.begin(), m_scriptNames.end());
+ std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end());
sLog->outString(">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
@@ -8742,10 +8657,10 @@ uint32 ObjectMgr::GetScriptId(const char *name)
// use binary search to find the script name in the sorted vector
// assume "" is the first element
if (!name) return 0;
- ScriptNameMap::const_iterator itr =
- std::lower_bound(m_scriptNames.begin(), m_scriptNames.end(), name);
- if (itr == m_scriptNames.end() || *itr != name) return 0;
- return uint32(itr - m_scriptNames.begin());
+ ScriptNameContainer::const_iterator itr =
+ std::lower_bound(_scriptNamesStore.begin(), _scriptNamesStore.end(), name);
+ if (itr == _scriptNamesStore.end() || *itr != name) return 0;
+ return uint32(itr - _scriptNamesStore.begin());
}
void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids)
@@ -8806,9 +8721,9 @@ bool LoadTrinityStrings(char const* table, int32 start_value, int32 end_value)
CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unitClass)
{
- CreatureBaseStatsMap::const_iterator it = m_creatureBaseStatsMap.find(MAKE_PAIR16(level, unitClass));
+ CreatureBaseStatsContainer::const_iterator it = _creatureBaseStatsStore.find(MAKE_PAIR16(level, unitClass));
- if (it != m_creatureBaseStatsMap.end())
+ if (it != _creatureBaseStatsStore.end())
return &(it->second);
struct DefaultCreatureBaseStats : public CreatureBaseStats
@@ -8866,7 +8781,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
}
}
- m_creatureBaseStatsMap[MAKE_PAIR16(Level, Class)] = stats;
+ _creatureBaseStatsStore[MAKE_PAIR16(Level, Class)] = stats;
++count;
}
@@ -8877,7 +8792,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
{
for (uint16 lvl = itr->second.minlevel; lvl <= itr->second.maxlevel; ++lvl)
{
- if (m_creatureBaseStatsMap.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == m_creatureBaseStatsMap.end())
+ if (_creatureBaseStatsStore.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == _creatureBaseStatsStore.end())
sLog->outErrorDb("Missing base stats for creature class %u level %u", itr->second.unit_class, lvl);
}
}
@@ -8913,7 +8828,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
else if (!sAchievementStore.LookupEntry(horde))
sLog->outErrorDb("Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
else
- factionchange_achievements[alliance] = horde;
+ FactionChange_Achievements[alliance] = horde;
++count;
}
@@ -8950,7 +8865,7 @@ void ObjectMgr::LoadFactionChangeItems()
else if (!GetItemTemplate(horde))
sLog->outErrorDb("Item %u referenced in `player_factionchange_items` does not exist, pair skipped!", horde);
else
- factionchange_items[alliance] = horde;
+ FactionChange_Items[alliance] = horde;
++count;
}
@@ -8987,7 +8902,7 @@ void ObjectMgr::LoadFactionChangeSpells()
else if (!sSpellMgr->GetSpellInfo(horde))
sLog->outErrorDb("Spell %u referenced in `player_factionchange_spells` does not exist, pair skipped!", horde);
else
- factionchange_spells[alliance] = horde;
+ FactionChange_Spells[alliance] = horde;
++count;
}
@@ -9024,7 +8939,7 @@ void ObjectMgr::LoadFactionChangeReputations()
else if (!sFactionStore.LookupEntry(horde))
sLog->outErrorDb("Reputation %u referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
else
- factionchange_reputations[alliance] = horde;
+ FactionChange_Reputation[alliance] = horde;
++count;
}
@@ -9071,8 +8986,8 @@ void ObjectMgr::LoadHotfixData()
GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
{
- GameObjectTemplateContainer::const_iterator itr = GameObjectTemplateStore.find(entry);
- if (itr != GameObjectTemplateStore.end())
+ GameObjectTemplateContainer::const_iterator itr = _gameObjectTemplateStore.find(entry);
+ if (itr != _gameObjectTemplateStore.end())
return &(itr->second);
return NULL;
@@ -9080,8 +8995,8 @@ GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
CreatureTemplate const* ObjectMgr::GetCreatureTemplate(uint32 entry)
{
- CreatureTemplateContainer::const_iterator itr = CreatureTemplateStore.find(entry);
- if (itr != CreatureTemplateStore.end())
+ CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.find(entry);
+ if (itr != _creatureTemplateStore.end())
return &(itr->second);
return NULL;
@@ -9092,14 +9007,14 @@ VehicleAccessoryList const* ObjectMgr::GetVehicleAccessoryList(Vehicle* veh) con
if (Creature* cre = veh->GetBase()->ToCreature())
{
// Give preference to GUID-based accessories
- VehicleAccessoryMap::const_iterator itr = m_VehicleAccessoryMap.find(cre->GetDBTableGUIDLow());
- if (itr != m_VehicleAccessoryMap.end())
+ VehicleAccessoryContainer::const_iterator itr = _vehicleAccessoryStore.find(cre->GetDBTableGUIDLow());
+ if (itr != _vehicleAccessoryStore.end())
return &itr->second;
}
// Otherwise return entry-based
- VehicleAccessoryMap::const_iterator itr = m_VehicleTemplateAccessoryMap.find(veh->GetCreatureEntry());
- if (itr != m_VehicleTemplateAccessoryMap.end())
+ VehicleAccessoryContainer::const_iterator itr = _vehicleTemplateAccessoryStore.find(veh->GetCreatureEntry());
+ if (itr != _vehicleTemplateAccessoryStore.end())
return &itr->second;
return NULL;
}
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 023b28d0860..ae699a01da7 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -82,7 +82,7 @@ struct GameTele
std::wstring wnameLow;
};
-typedef UNORDERED_MAP<uint32, GameTele > GameTeleMap;
+typedef UNORDERED_MAP<uint32, GameTele > GameTeleContainer;
enum ScriptsType
{
@@ -321,8 +321,8 @@ struct ScriptInfo
typedef std::multimap<uint32, ScriptInfo> ScriptMap;
typedef std::map<uint32, ScriptMap > ScriptMapMap;
-typedef std::multimap<uint32, uint32> SpellScriptsMap;
-typedef std::pair<SpellScriptsMap::iterator, SpellScriptsMap::iterator> SpellScriptsBounds;
+typedef std::multimap<uint32, uint32> SpellScriptsContainer;
+typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds;
extern ScriptMapMap sQuestEndScripts;
extern ScriptMapMap sQuestStartScripts;
extern ScriptMapMap sSpellScripts;
@@ -337,20 +337,15 @@ std::string GetScriptCommandName(ScriptCommands command);
struct SpellClickInfo
{
uint32 spellId;
- uint32 questStart; // quest start (quest must be active or rewarded for spell apply)
- uint32 questEnd; // quest end (quest must not be rewarded for spell apply)
- bool questStartCanActive; // if true then quest start can be active (not only rewarded)
uint8 castFlags;
- uint32 auraRequired;
- uint32 auraForbidden;
SpellClickUserTypes userType;
// helpers
bool IsFitToRequirements(Unit const* clicker, Unit const* clickee) const;
};
-typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoMap;
-typedef std::pair<SpellClickInfoMap::const_iterator, SpellClickInfoMap::const_iterator> SpellClickInfoMapBounds;
+typedef std::multimap<uint32, SpellClickInfo> SpellClickInfoContainer;
+typedef std::pair<SpellClickInfoContainer::const_iterator, SpellClickInfoContainer::const_iterator> SpellClickInfoMapBounds;
struct AreaTrigger
{
@@ -390,24 +385,22 @@ struct TrinityStringLocale
StringVector Content;
};
-typedef std::map<uint64, uint64> LinkedRespawnMap;
-typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataMap;
-typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataMap;
-typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleMap;
-typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleMap;
-typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleMap;
-typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleMap;
-typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleMap;
-typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleMap;
-typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleMap;
-typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleMap;
-typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleMap;
-typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleMap;
+typedef std::map<uint64, uint64> LinkedRespawnContainer;
+typedef UNORDERED_MAP<uint32, CreatureData> CreatureDataContainer;
+typedef UNORDERED_MAP<uint32, GameObjectData> GameObjectDataContainer;
+typedef UNORDERED_MAP<uint32, CreatureLocale> CreatureLocaleContainer;
+typedef UNORDERED_MAP<uint32, GameObjectLocale> GameObjectLocaleContainer;
+typedef UNORDERED_MAP<uint32, ItemLocale> ItemLocaleContainer;
+typedef UNORDERED_MAP<uint32, ItemSetNameLocale> ItemSetNameLocaleContainer;
+typedef UNORDERED_MAP<uint32, QuestLocale> QuestLocaleContainer;
+typedef UNORDERED_MAP<uint32, NpcTextLocale> NpcTextLocaleContainer;
+typedef UNORDERED_MAP<uint32, PageTextLocale> PageTextLocaleContainer;
+typedef UNORDERED_MAP<int32, TrinityStringLocale> TrinityStringLocaleContainer;
+typedef UNORDERED_MAP<uint32, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer;
+typedef UNORDERED_MAP<uint32, PointOfInterestLocale> PointOfInterestLocaleContainer;
typedef std::multimap<uint32, uint32> QuestRelations;
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds;
-typedef std::multimap<uint32, ItemRequiredTarget> ItemRequiredTargetMap;
-typedef std::pair<ItemRequiredTargetMap::const_iterator, ItemRequiredTargetMap::const_iterator> ItemRequiredTargetMapBounds;
struct PetLevelInfo
{
@@ -430,7 +423,7 @@ struct MailLevelReward
};
typedef std::list<MailLevelReward> MailLevelRewardList;
-typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardMap;
+typedef UNORDERED_MAP<uint8, MailLevelRewardList> MailLevelRewardContainer;
// We assume the rate is in general the same for all three types below, but chose to keep three for scalability and customization
struct RepRewardRate
@@ -442,15 +435,15 @@ struct RepRewardRate
struct ReputationOnKillEntry
{
- uint32 repfaction1;
- uint32 repfaction2;
- bool is_teamaward1;
- uint32 reputation_max_cap1;
- int32 repvalue1;
- bool is_teamaward2;
- uint32 reputation_max_cap2;
- int32 repvalue2;
- bool team_dependent;
+ uint32 RepFaction1;
+ uint32 RepFaction2;
+ uint32 ReputationMaxCap1;
+ int32 RepValue1;
+ uint32 ReputationMaxCap2;
+ int32 RepValue2;
+ bool IsTeamAward1;
+ bool IsTeamAward2;
+ bool TeamDependent;
};
struct RepSpilloverTemplate
@@ -494,12 +487,12 @@ struct GossipMenus
ConditionList conditions;
};
-typedef std::multimap<uint32, GossipMenus> GossipMenusMap;
-typedef std::pair<GossipMenusMap::const_iterator, GossipMenusMap::const_iterator> GossipMenusMapBounds;
-typedef std::pair<GossipMenusMap::iterator, GossipMenusMap::iterator> GossipMenusMapBoundsNonConst;
-typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsMap;
-typedef std::pair<GossipMenuItemsMap::const_iterator, GossipMenuItemsMap::const_iterator> GossipMenuItemsMapBounds;
-typedef std::pair<GossipMenuItemsMap::iterator, GossipMenuItemsMap::iterator> GossipMenuItemsMapBoundsNonConst;
+typedef std::multimap<uint32, GossipMenus> GossipMenusContainer;
+typedef std::pair<GossipMenusContainer::const_iterator, GossipMenusContainer::const_iterator> GossipMenusMapBounds;
+typedef std::pair<GossipMenusContainer::iterator, GossipMenusContainer::iterator> GossipMenusMapBoundsNonConst;
+typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsContainer;
+typedef std::pair<GossipMenuItemsContainer::const_iterator, GossipMenuItemsContainer::const_iterator> GossipMenuItemsMapBounds;
+typedef std::pair<GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator> GossipMenuItemsMapBoundsNonConst;
struct QuestPOIPoint
{
@@ -526,17 +519,17 @@ struct QuestPOI
};
typedef std::vector<QuestPOI> QuestPOIVector;
-typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIMap;
+typedef UNORDERED_MAP<uint32, QuestPOIVector> QuestPOIContainer;
struct GraveYardData
{
uint32 safeLocId;
uint32 team;
};
-typedef std::multimap<uint32, GraveYardData> GraveYardMap;
+typedef std::multimap<uint32, GraveYardData> GraveYardContainer;
-typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap;
-typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellMap;
+typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemContainer;
+typedef UNORDERED_MAP<uint32, TrainerSpellData> CacheTrainerSpellContainer;
enum SkillRangeType
{
@@ -584,7 +577,7 @@ struct DungeonEncounter
};
typedef std::list<DungeonEncounter const*> DungeonEncounterList;
-typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterMap;
+typedef UNORDERED_MAP<uint32, DungeonEncounterList> DungeonEncounterContainer;
struct HotfixInfo
{
@@ -611,33 +604,33 @@ class ObjectMgr
typedef UNORDERED_MAP<uint32, Quest*> QuestMap;
- typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerMap;
+ typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerContainer;
- typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptMap;
+ typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptContainer;
- typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementMap;
+ typedef UNORDERED_MAP<uint32, AccessRequirement> AccessRequirementContainer;
- typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateMap;
- typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillMap;
- typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateMap;
+ typedef UNORDERED_MAP<uint32, RepRewardRate > RepRewardRateContainer;
+ typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillContainer;
+ typedef UNORDERED_MAP<uint32, RepSpilloverTemplate> RepSpilloverTemplateContainer;
- typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestMap;
+ typedef UNORDERED_MAP<uint32, PointOfInterest> PointOfInterestContainer;
- typedef std::vector<std::string> ScriptNameMap;
+ typedef std::vector<std::string> ScriptNameContainer;
typedef std::map<uint32, uint32> CharacterConversionMap;
Player* GetPlayerByLowGUID(uint32 lowguid) const;
GameObjectTemplate const* GetGameObjectTemplate(uint32 entry);
- GameObjectTemplateContainer const* GetGameObjectTemplates() { return &GameObjectTemplateStore; }
+ GameObjectTemplateContainer const* GetGameObjectTemplates() { return &_gameObjectTemplateStore; }
int LoadReferenceVendor(int32 vendor, int32 item_id, std::set<uint32> *skip_vendors);
void LoadGameObjectTemplate();
void AddGameobjectInfo(GameObjectTemplate* goinfo);
CreatureTemplate const* GetCreatureTemplate(uint32 entry);
- CreatureTemplateContainer const* GetCreatureTemplates() { return &CreatureTemplateStore; }
+ CreatureTemplateContainer const* GetCreatureTemplates() { return &_creatureTemplateStore; }
CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId);
CreatureModelInfo const* GetCreatureModelRandomGender(uint32* displayID);
static uint32 ChooseDisplayId(uint32 team, const CreatureTemplate* cinfo, const CreatureData* data = NULL);
@@ -646,12 +639,12 @@ class ObjectMgr
CreatureAddon const* GetCreatureAddon(uint32 lowguid);
CreatureAddon const* GetCreatureTemplateAddon(uint32 entry);
ItemTemplate const* GetItemTemplate(uint32 entry);
- ItemTemplateContainer const* GetItemTemplateStore() { return &ItemTemplateStore; }
+ ItemTemplateContainer const* GetItemTemplateStore() { return &_itemTemplateStore; }
ItemSetNameEntry const* GetItemSetNameEntry(uint32 itemId)
{
- ItemSetNameMap::iterator itr = mItemSetNameMap.find(itemId);
- if (itr != mItemSetNameMap.end())
+ ItemSetNameContainer::iterator itr = _itemSetNameStore.find(itemId);
+ if (itr != _itemSetNameStore.end())
return &itr->second;
return NULL;
}
@@ -664,7 +657,7 @@ class ObjectMgr
{
if (class_ >= MAX_CLASSES)
return NULL;
- return &playerClassInfo[class_];
+ return &_playerClassInfo[class_];
}
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
@@ -674,7 +667,7 @@ class ObjectMgr
return NULL;
if (class_ >= MAX_CLASSES)
return NULL;
- PlayerInfo const* info = &playerInfo[race][class_];
+ PlayerInfo const* info = &_playerInfo[race][class_];
if (info->displayId_m == 0 || info->displayId_f == 0)
return NULL;
return info;
@@ -694,28 +687,28 @@ class ObjectMgr
Quest const* GetQuestTemplate(uint32 quest_id) const
{
- QuestMap::const_iterator itr = mQuestTemplates.find(quest_id);
- return itr != mQuestTemplates.end() ? itr->second : NULL;
+ QuestMap::const_iterator itr = _questTemplates.find(quest_id);
+ return itr != _questTemplates.end() ? itr->second : NULL;
}
- QuestMap const& GetQuestTemplates() const { return mQuestTemplates; }
+ QuestMap const& GetQuestTemplates() const { return _questTemplates; }
uint32 GetQuestForAreaTrigger(uint32 Trigger_ID) const
{
- QuestAreaTriggerMap::const_iterator itr = mQuestAreaTriggerMap.find(Trigger_ID);
- if (itr != mQuestAreaTriggerMap.end())
+ QuestAreaTriggerContainer::const_iterator itr = _questAreaTriggerStore.find(Trigger_ID);
+ if (itr != _questAreaTriggerStore.end())
return itr->second;
return 0;
}
bool IsTavernAreaTrigger(uint32 Trigger_ID) const
{
- return mTavernAreaTriggerSet.find(Trigger_ID) != mTavernAreaTriggerSet.end();
+ return _tavernAreaTriggerStore.find(Trigger_ID) != _tavernAreaTriggerStore.end();
}
bool IsGameObjectForQuests(uint32 entry) const
{
- return mGameObjectForQuestSet.find(entry) != mGameObjectForQuestSet.end();
+ return _gameObjectForQuestStore.find(entry) != _gameObjectForQuestStore.end();
}
GossipText const* GetGossipText(uint32 Text_ID) const;
@@ -729,16 +722,16 @@ class ObjectMgr
AreaTrigger const* GetAreaTrigger(uint32 trigger) const
{
- AreaTriggerMap::const_iterator itr = mAreaTriggers.find(trigger);
- if (itr != mAreaTriggers.end())
+ AreaTriggerContainer::const_iterator itr = _areaTriggerStore.find(trigger);
+ if (itr != _areaTriggerStore.end())
return &itr->second;
return NULL;
}
AccessRequirement const* GetAccessRequirement(uint32 mapid, Difficulty difficulty) const
{
- AccessRequirementMap::const_iterator itr = mAccessRequirements.find(MAKE_PAIR32(mapid, difficulty));
- if (itr != mAccessRequirements.end())
+ AccessRequirementContainer::const_iterator itr = _accessRequirementStore.find(MAKE_PAIR32(mapid, difficulty));
+ if (itr != _accessRequirementStore.end())
return &itr->second;
return NULL;
}
@@ -751,8 +744,8 @@ class ObjectMgr
RepRewardRate const* GetRepRewardRate(uint32 factionId) const
{
- RepRewardRateMap::const_iterator itr = m_RepRewardRateMap.find(factionId);
- if (itr != m_RepRewardRateMap.end())
+ RepRewardRateContainer::const_iterator itr = _repRewardRateStore.find(factionId);
+ if (itr != _repRewardRateStore.end())
return &itr->second;
return NULL;
@@ -760,16 +753,16 @@ class ObjectMgr
ReputationOnKillEntry const* GetReputationOnKilEntry(uint32 id) const
{
- RepOnKillMap::const_iterator itr = mRepOnKill.find(id);
- if (itr != mRepOnKill.end())
+ RepOnKillContainer::const_iterator itr = _repOnKillStore.find(id);
+ if (itr != _repOnKillStore.end())
return &itr->second;
return NULL;
}
RepSpilloverTemplate const* GetRepSpilloverTemplate(uint32 factionId) const
{
- RepSpilloverTemplateMap::const_iterator itr = m_RepSpilloverTemplateMap.find(factionId);
- if (itr != m_RepSpilloverTemplateMap.end())
+ RepSpilloverTemplateContainer::const_iterator itr = _repSpilloverTemplateStore.find(factionId);
+ if (itr != _repSpilloverTemplateStore.end())
return &itr->second;
return NULL;
@@ -777,16 +770,16 @@ class ObjectMgr
PointOfInterest const* GetPointOfInterest(uint32 id) const
{
- PointOfInterestMap::const_iterator itr = mPointsOfInterest.find(id);
- if (itr != mPointsOfInterest.end())
+ PointOfInterestContainer::const_iterator itr = _pointsOfInterestStore.find(id);
+ if (itr != _pointsOfInterestStore.end())
return &itr->second;
return NULL;
}
QuestPOIVector const* GetQuestPOIVector(uint32 questId)
{
- QuestPOIMap::const_iterator itr = mQuestPOIMap.find(questId);
- if (itr != mQuestPOIMap.end())
+ QuestPOIContainer::const_iterator itr = _questPOIStore.find(questId);
+ if (itr != _questPOIStore.end())
return &itr->second;
return NULL;
}
@@ -795,8 +788,8 @@ class ObjectMgr
DungeonEncounterList const* GetDungeonEncounterList(uint32 mapId, Difficulty difficulty)
{
- UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = mDungeonEncounters.find(MAKE_PAIR32(mapId, difficulty));
- if (itr != mDungeonEncounters.end())
+ UNORDERED_MAP<uint32, DungeonEncounterList>::const_iterator itr = _dungeonEncounterStore.find(MAKE_PAIR32(mapId, difficulty));
+ if (itr != _dungeonEncounterStore.end())
return &itr->second;
return NULL;
}
@@ -820,32 +813,32 @@ class ObjectMgr
QuestRelations* GetGOQuestRelationMap()
{
- return &mGOQuestRelations;
+ return &_goQuestRelations;
}
QuestRelationBounds GetGOQuestRelationBounds(uint32 go_entry)
{
- return mGOQuestRelations.equal_range(go_entry);
+ return _goQuestRelations.equal_range(go_entry);
}
QuestRelationBounds GetGOQuestInvolvedRelationBounds(uint32 go_entry)
{
- return mGOQuestInvolvedRelations.equal_range(go_entry);
+ return _goQuestInvolvedRelations.equal_range(go_entry);
}
QuestRelations* GetCreatureQuestRelationMap()
{
- return &mCreatureQuestRelations;
+ return &_creatureQuestRelations;
}
QuestRelationBounds GetCreatureQuestRelationBounds(uint32 creature_entry)
{
- return mCreatureQuestRelations.equal_range(creature_entry);
+ return _creatureQuestRelations.equal_range(creature_entry);
}
QuestRelationBounds GetCreatureQuestInvolvedRelationBounds(uint32 creature_entry)
{
- return mCreatureQuestInvolvedRelations.equal_range(creature_entry);
+ return _creatureQuestInvolvedRelations.equal_range(creature_entry);
}
void LoadGameObjectScripts();
@@ -937,8 +930,8 @@ class ObjectMgr
int32 GetFishingBaseSkillLevel(uint32 entry) const
{
- FishingBaseSkillMap::const_iterator itr = mFishingBaseForArea.find(entry);
- return itr != mFishingBaseForArea.end() ? itr->second : 0;
+ FishingBaseSkillContainer::const_iterator itr = _fishingBaseForAreaStore.find(entry);
+ return itr != _fishingBaseForAreaStore.end() ? itr->second : 0;
}
void ReturnOrDeleteOldMails(bool serverUp);
@@ -957,8 +950,8 @@ class ObjectMgr
MailLevelReward const* GetMailLevelReward(uint32 level, uint32 raceMask)
{
- MailLevelRewardMap::const_iterator map_itr = m_mailLevelRewardMap.find(level);
- if (map_itr == m_mailLevelRewardMap.end())
+ MailLevelRewardContainer::const_iterator map_itr = _mailLevelRewardStore.find(level);
+ if (map_itr == _mailLevelRewardStore.end())
return NULL;
for (MailLevelRewardList::const_iterator set_itr = map_itr->second.begin(); set_itr != map_itr->second.end(); ++set_itr)
@@ -970,81 +963,81 @@ class ObjectMgr
CellObjectGuids const& GetCellObjectGuids(uint16 mapid, uint8 spawnMode, uint32 cell_id)
{
- return mMapObjectGuids[MAKE_PAIR32(mapid, spawnMode)][cell_id];
+ return _mapObjectGuidsStore[MAKE_PAIR32(mapid, spawnMode)][cell_id];
}
CreatureData const* GetCreatureData(uint32 guid) const
{
- CreatureDataMap::const_iterator itr = mCreatureDataMap.find(guid);
- if (itr == mCreatureDataMap.end()) return NULL;
+ CreatureDataContainer::const_iterator itr = _creatureDataStore.find(guid);
+ if (itr == _creatureDataStore.end()) return NULL;
return &itr->second;
}
- CreatureData& NewOrExistCreatureData(uint32 guid) { return mCreatureDataMap[guid]; }
+ CreatureData& NewOrExistCreatureData(uint32 guid) { return _creatureDataStore[guid]; }
void DeleteCreatureData(uint32 guid);
uint64 GetLinkedRespawnGuid(uint64 guid) const
{
- LinkedRespawnMap::const_iterator itr = mLinkedRespawnMap.find(guid);
- if (itr == mLinkedRespawnMap.end()) return 0;
+ LinkedRespawnContainer::const_iterator itr = _linkedRespawnStore.find(guid);
+ if (itr == _linkedRespawnStore.end()) return 0;
return itr->second;
}
CreatureLocale const* GetCreatureLocale(uint32 entry) const
{
- CreatureLocaleMap::const_iterator itr = mCreatureLocaleMap.find(entry);
- if (itr == mCreatureLocaleMap.end()) return NULL;
+ CreatureLocaleContainer::const_iterator itr = _creatureLocaleStore.find(entry);
+ if (itr == _creatureLocaleStore.end()) return NULL;
return &itr->second;
}
GameObjectLocale const* GetGameObjectLocale(uint32 entry) const
{
- GameObjectLocaleMap::const_iterator itr = mGameObjectLocaleMap.find(entry);
- if (itr == mGameObjectLocaleMap.end()) return NULL;
+ GameObjectLocaleContainer::const_iterator itr = _gameObjectLocaleStore.find(entry);
+ if (itr == _gameObjectLocaleStore.end()) return NULL;
return &itr->second;
}
ItemLocale const* GetItemLocale(uint32 entry) const
{
- ItemLocaleMap::const_iterator itr = mItemLocaleMap.find(entry);
- if (itr == mItemLocaleMap.end()) return NULL;
+ ItemLocaleContainer::const_iterator itr = _itemLocaleStore.find(entry);
+ if (itr == _itemLocaleStore.end()) return NULL;
return &itr->second;
}
ItemSetNameLocale const* GetItemSetNameLocale(uint32 entry) const
{
- ItemSetNameLocaleMap::const_iterator itr = mItemSetNameLocaleMap.find(entry);
- if (itr == mItemSetNameLocaleMap.end())return NULL;
+ ItemSetNameLocaleContainer::const_iterator itr = _itemSetNameLocaleStore.find(entry);
+ if (itr == _itemSetNameLocaleStore.end())return NULL;
return &itr->second;
}
QuestLocale const* GetQuestLocale(uint32 entry) const
{
- QuestLocaleMap::const_iterator itr = mQuestLocaleMap.find(entry);
- if (itr == mQuestLocaleMap.end()) return NULL;
+ QuestLocaleContainer::const_iterator itr = _questLocaleStore.find(entry);
+ if (itr == _questLocaleStore.end()) return NULL;
return &itr->second;
}
NpcTextLocale const* GetNpcTextLocale(uint32 entry) const
{
- NpcTextLocaleMap::const_iterator itr = mNpcTextLocaleMap.find(entry);
- if (itr == mNpcTextLocaleMap.end()) return NULL;
+ NpcTextLocaleContainer::const_iterator itr = _npcTextLocaleStore.find(entry);
+ if (itr == _npcTextLocaleStore.end()) return NULL;
return &itr->second;
}
PageTextLocale const* GetPageTextLocale(uint32 entry) const
{
- PageTextLocaleMap::const_iterator itr = mPageTextLocaleMap.find(entry);
- if (itr == mPageTextLocaleMap.end()) return NULL;
+ PageTextLocaleContainer::const_iterator itr = _pageTextLocaleStore.find(entry);
+ if (itr == _pageTextLocaleStore.end()) return NULL;
return &itr->second;
}
GossipMenuItemsLocale const* GetGossipMenuItemsLocale(uint32 entry) const
{
- GossipMenuItemsLocaleMap::const_iterator itr = mGossipMenuItemsLocaleMap.find(entry);
- if (itr == mGossipMenuItemsLocaleMap.end()) return NULL;
+ GossipMenuItemsLocaleContainer::const_iterator itr = _gossipMenuItemsLocaleStore.find(entry);
+ if (itr == _gossipMenuItemsLocaleStore.end()) return NULL;
return &itr->second;
}
PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const
{
- PointOfInterestLocaleMap::const_iterator itr = mPointOfInterestLocaleMap.find(poi_id);
- if (itr == mPointOfInterestLocaleMap.end()) return NULL;
+ PointOfInterestLocaleContainer::const_iterator itr = _pointOfInterestLocaleStore.find(poi_id);
+ if (itr == _pointOfInterestLocaleStore.end()) return NULL;
return &itr->second;
}
bool IsGoOfSpecificEntrySpawned(uint32 entry) const
{
- for (GameObjectDataMap::const_iterator it = mGameObjectDataMap.begin(); it != mGameObjectDataMap.end(); ++it)
+ for (GameObjectDataContainer::const_iterator it = _gameObjectDataStore.begin(); it != _gameObjectDataStore.end(); ++it)
if (it->second.id == entry)
return true;
@@ -1053,17 +1046,17 @@ class ObjectMgr
GameObjectData const* GetGOData(uint32 guid) const
{
- GameObjectDataMap::const_iterator itr = mGameObjectDataMap.find(guid);
- if (itr == mGameObjectDataMap.end()) return NULL;
+ GameObjectDataContainer::const_iterator itr = _gameObjectDataStore.find(guid);
+ if (itr == _gameObjectDataStore.end()) return NULL;
return &itr->second;
}
- GameObjectData& NewGOData(uint32 guid) { return mGameObjectDataMap[guid]; }
+ GameObjectData& NewGOData(uint32 guid) { return _gameObjectDataStore[guid]; }
void DeleteGOData(uint32 guid);
TrinityStringLocale const* GetTrinityStringLocale(int32 entry) const
{
- TrinityStringLocaleMap::const_iterator itr = mTrinityStringLocaleMap.find(entry);
- if (itr == mTrinityStringLocaleMap.end()) return NULL;
+ TrinityStringLocaleContainer::const_iterator itr = _trinityStringLocaleStore.find(entry);
+ if (itr == _trinityStringLocaleStore.end()) return NULL;
return &itr->second;
}
const char *GetTrinityString(int32 entry, LocaleConstant locale_idx) const;
@@ -1090,15 +1083,15 @@ class ObjectMgr
time_t GetCreatureRespawnTime(uint32 loguid, uint32 instance)
{
- TRINITY_GUARD(ACE_Thread_Mutex, m_CreatureRespawnTimesMtx);
- return mCreatureRespawnTimes[MAKE_PAIR64(loguid, instance)];
+ TRINITY_GUARD(ACE_Thread_Mutex, _creatureRespawnTimesMutex);
+ return _creatureRespawnTimes[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)
{
- TRINITY_GUARD(ACE_Thread_Mutex, m_GORespawnTimesMtx);
- return mGORespawnTimes[MAKE_PAIR64(loguid, instance)];
+ TRINITY_GUARD(ACE_Thread_Mutex, _goRespawnTimesMutex);
+ return _goRespawnTimes[MAKE_PAIR64(loguid, instance)];
}
void SaveGORespawnTime(uint32 loguid, uint32 instance, time_t t);
void RemoveGORespawnTime(uint32 loguid, uint32 instance);
@@ -1126,19 +1119,19 @@ class ObjectMgr
GameTele const* GetGameTele(uint32 id) const
{
- GameTeleMap::const_iterator itr = m_GameTeleMap.find(id);
- if (itr == m_GameTeleMap.end()) return NULL;
+ GameTeleContainer::const_iterator itr = _gameTeleStore.find(id);
+ if (itr == _gameTeleStore.end()) return NULL;
return &itr->second;
}
GameTele const* GetGameTele(const std::string& name) const;
- GameTeleMap const& GetGameTeleMap() const { return m_GameTeleMap; }
+ GameTeleContainer const& GetGameTeleMap() const { return _gameTeleStore; }
bool AddGameTele(GameTele& data);
bool DeleteGameTele(const std::string& name);
TrainerSpellData const* GetNpcTrainerSpells(uint32 entry) const
{
- CacheTrainerSpellMap::const_iterator iter = m_mCacheTrainerSpellMap.find(entry);
- if (iter == m_mCacheTrainerSpellMap.end())
+ CacheTrainerSpellContainer::const_iterator iter = _cacheTrainerSpellStore.find(entry);
+ if (iter == _cacheTrainerSpellStore.end())
return NULL;
return &iter->second;
@@ -1146,8 +1139,8 @@ class ObjectMgr
VendorItemData const* GetNpcVendorItemList(uint32 entry) const
{
- CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry);
- if (iter == m_mCacheVendorItemMap.end())
+ CacheVendorItemContainer::const_iterator iter = _cacheVendorItemStore.find(entry);
+ if (iter == _cacheVendorItemStore.end())
return NULL;
return &iter->second;
@@ -1157,36 +1150,36 @@ class ObjectMgr
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; }
- const char * GetScriptName(uint32 id) { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; }
+ ScriptNameContainer &GetScriptNames() { return _scriptNamesStore; }
+ const char * GetScriptName(uint32 id) { return id < _scriptNamesStore.size() ? _scriptNamesStore[id].c_str() : ""; }
uint32 GetScriptId(const char *name);
SpellClickInfoMapBounds GetSpellClickInfoMapBounds(uint32 creature_id) const
{
- return SpellClickInfoMapBounds(mSpellClickInfoMap.lower_bound(creature_id), mSpellClickInfoMap.upper_bound(creature_id));
+ return SpellClickInfoMapBounds(_spellClickInfoStore.lower_bound(creature_id), _spellClickInfoStore.upper_bound(creature_id));
}
GossipMenusMapBounds GetGossipMenusMapBounds(uint32 uiMenuId) const
{
- return GossipMenusMapBounds(m_mGossipMenusMap.lower_bound(uiMenuId), m_mGossipMenusMap.upper_bound(uiMenuId));
+ return GossipMenusMapBounds(_gossipMenusStore.lower_bound(uiMenuId), _gossipMenusStore.upper_bound(uiMenuId));
}
GossipMenusMapBoundsNonConst GetGossipMenusMapBoundsNonConst(uint32 uiMenuId)
{
- return GossipMenusMapBoundsNonConst(m_mGossipMenusMap.lower_bound(uiMenuId), m_mGossipMenusMap.upper_bound(uiMenuId));
+ return GossipMenusMapBoundsNonConst(_gossipMenusStore.lower_bound(uiMenuId), _gossipMenusStore.upper_bound(uiMenuId));
}
GossipMenuItemsMapBounds GetGossipMenuItemsMapBounds(uint32 uiMenuId) const
{
- return GossipMenuItemsMapBounds(m_mGossipMenuItemsMap.lower_bound(uiMenuId), m_mGossipMenuItemsMap.upper_bound(uiMenuId));
+ return GossipMenuItemsMapBounds(_gossipMenuItemsStore.lower_bound(uiMenuId), _gossipMenuItemsStore.upper_bound(uiMenuId));
}
GossipMenuItemsMapBoundsNonConst GetGossipMenuItemsMapBoundsNonConst(uint32 uiMenuId)
{
- return GossipMenuItemsMapBoundsNonConst(m_mGossipMenuItemsMap.lower_bound(uiMenuId), m_mGossipMenuItemsMap.upper_bound(uiMenuId));
+ return GossipMenuItemsMapBoundsNonConst(_gossipMenuItemsStore.lower_bound(uiMenuId), _gossipMenuItemsStore.upper_bound(uiMenuId));
}
// for wintergrasp only
- GraveYardMap mGraveYardMap;
+ GraveYardContainer GraveYardStore;
static void AddLocaleString(const std::string& s, LocaleConstant locale, StringVector& data);
static inline void GetLocaleString(const StringVector& data, int loc_idx, std::string& value)
@@ -1195,10 +1188,10 @@ class ObjectMgr
value = data[loc_idx];
}
- CharacterConversionMap factionchange_achievements;
- CharacterConversionMap factionchange_items;
- CharacterConversionMap factionchange_spells;
- CharacterConversionMap factionchange_reputations;
+ CharacterConversionMap FactionChange_Achievements;
+ CharacterConversionMap FactionChange_Items;
+ CharacterConversionMap FactionChange_Spells;
+ CharacterConversionMap FactionChange_Reputation;
void LoadFactionChangeAchievements();
void LoadFactionChangeItems();
@@ -1210,80 +1203,73 @@ class ObjectMgr
private:
// first free id for selected id type
- uint32 m_auctionid;
- uint64 m_equipmentSetGuid;
- uint32 m_ItemTextId;
- uint32 m_mailid;
- uint32 m_hiPetNumber;
+ uint32 _auctionId;
+ uint64 _equipmentSetGuid;
+ uint32 _itemTextId;
+ uint32 _mailId;
+ uint32 _hiPetNumber;
// first free low guid for selected guid type
- uint32 m_hiCharGuid;
- uint32 m_hiCreatureGuid;
- uint32 m_hiPetGuid;
- uint32 m_hiVehicleGuid;
- uint32 m_hiItemGuid;
- uint32 m_hiGoGuid;
- uint32 m_hiDoGuid;
- uint32 m_hiCorpseGuid;
- uint32 m_hiMoTransGuid;
-
- QuestMap mQuestTemplates;
-
- typedef UNORDERED_MAP<uint32, GossipText> GossipTextMap;
- typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerMap;
- typedef std::set<uint32> TavernAreaTriggerSet;
- typedef std::set<uint32> GameObjectForQuestSet;
-
- QuestAreaTriggerMap mQuestAreaTriggerMap;
- TavernAreaTriggerSet mTavernAreaTriggerSet;
- GameObjectForQuestSet mGameObjectForQuestSet;
- GossipTextMap mGossipText;
- AreaTriggerMap mAreaTriggers;
- AreaTriggerScriptMap mAreaTriggerScripts;
- AccessRequirementMap mAccessRequirements;
- DungeonEncounterMap mDungeonEncounters;
-
- RepRewardRateMap m_RepRewardRateMap;
- RepOnKillMap mRepOnKill;
- RepSpilloverTemplateMap m_RepSpilloverTemplateMap;
-
- GossipMenusMap m_mGossipMenusMap;
- GossipMenuItemsMap m_mGossipMenuItemsMap;
- PointOfInterestMap mPointsOfInterest;
-
- QuestPOIMap mQuestPOIMap;
-
- QuestRelations mGOQuestRelations;
- QuestRelations mGOQuestInvolvedRelations;
- QuestRelations mCreatureQuestRelations;
- QuestRelations mCreatureQuestInvolvedRelations;
+ uint32 _hiCharGuid;
+ uint32 _hiCreatureGuid;
+ uint32 _hiPetGuid;
+ uint32 _hiVehicleGuid;
+ uint32 _hiItemGuid;
+ uint32 _hiGoGuid;
+ uint32 _hiDoGuid;
+ uint32 _hiCorpseGuid;
+ uint32 _hiMoTransGuid;
+
+ QuestMap _questTemplates;
+
+ typedef UNORDERED_MAP<uint32, GossipText> GossipTextContainer;
+ typedef UNORDERED_MAP<uint32, uint32> QuestAreaTriggerContainer;
+ typedef std::set<uint32> TavernAreaTriggerContainer;
+ typedef std::set<uint32> GameObjectForQuestContainer;
+
+ QuestAreaTriggerContainer _questAreaTriggerStore;
+ TavernAreaTriggerContainer _tavernAreaTriggerStore;
+ GameObjectForQuestContainer _gameObjectForQuestStore;
+ GossipTextContainer _gossipTextStore;
+ AreaTriggerContainer _areaTriggerStore;
+ AreaTriggerScriptContainer _areaTriggerScriptStore;
+ AccessRequirementContainer _accessRequirementStore;
+ DungeonEncounterContainer _dungeonEncounterStore;
+
+ RepRewardRateContainer _repRewardRateStore;
+ RepOnKillContainer _repOnKillStore;
+ RepSpilloverTemplateContainer _repSpilloverTemplateStore;
+
+ GossipMenusContainer _gossipMenusStore;
+ GossipMenuItemsContainer _gossipMenuItemsStore;
+ PointOfInterestContainer _pointsOfInterestStore;
+
+ QuestPOIContainer _questPOIStore;
+
+ QuestRelations _goQuestRelations;
+ QuestRelations _goQuestInvolvedRelations;
+ QuestRelations _creatureQuestRelations;
+ QuestRelations _creatureQuestInvolvedRelations;
//character reserved names
- typedef std::set<std::wstring> ReservedNamesMap;
- ReservedNamesMap m_ReservedNames;
+ typedef std::set<std::wstring> ReservedNamesContainer;
+ ReservedNamesContainer _reservedNamesStore;
-// GraveYardMap mGraveYardMap;
+ GameTeleContainer _gameTeleStore;
- GameTeleMap m_GameTeleMap;
+ ScriptNameContainer _scriptNamesStore;
- ScriptNameMap m_scriptNames;
+ SpellClickInfoContainer _spellClickInfoStore;
- SpellClickInfoMap mSpellClickInfoMap;
+ SpellScriptsContainer _spellScriptsStore;
- SpellScriptsMap mSpellScripts;
-
- ItemRequiredTargetMap m_ItemRequiredTarget;
-
- VehicleAccessoryMap m_VehicleTemplateAccessoryMap;
- VehicleAccessoryMap m_VehicleAccessoryMap;
-
- typedef std::vector<LocaleConstant> LocalForIndex;
- LocalForIndex m_LocalForIndex;
+ VehicleAccessoryContainer _vehicleTemplateAccessoryStore;
+ VehicleAccessoryContainer _vehicleAccessoryStore;
LocaleConstant DBCLocaleIndex;
- PageTextContainer PageTextStore;
- InstanceTemplateContainer InstanceTemplateStore;
+ PageTextContainer _pageTextStore;
+ InstanceTemplateContainer _instanceTemplateStore;
private:
void LoadScripts(ScriptsType type);
@@ -1291,67 +1277,68 @@ class ObjectMgr
void LoadQuestRelationsHelper(QuestRelations& map, std::string table, bool starter, bool go);
void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count);
- MailLevelRewardMap m_mailLevelRewardMap;
+ MailLevelRewardContainer _mailLevelRewardStore;
- CreatureBaseStatsMap m_creatureBaseStatsMap;
+ CreatureBaseStatsContainer _creatureBaseStatsStore;
- typedef std::map<uint32, PetLevelInfo*> PetLevelInfoMap;
- // PetLevelInfoMap[creature_id][level]
- PetLevelInfoMap petInfo; // [creature_id][level]
+ typedef std::map<uint32, PetLevelInfo*> PetLevelInfoContainer;
+ // PetLevelInfoContainer[creature_id][level]
+ PetLevelInfoContainer _petInfoStore; // [creature_id][level]
- PlayerClassInfo playerClassInfo[MAX_CLASSES];
+ PlayerClassInfo _playerClassInfo[MAX_CLASSES];
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
- PlayerInfo playerInfo[MAX_RACES][MAX_CLASSES];
+
+ PlayerInfo _playerInfo[MAX_RACES][MAX_CLASSES];
typedef std::vector<uint32> PlayerXPperLevel; // [level]
- PlayerXPperLevel mPlayerXPperLevel;
-
- typedef std::map<uint32, uint32> BaseXPMap; // [area level][base xp]
- BaseXPMap mBaseXPTable;
-
- typedef std::map<uint32, int32> FishingBaseSkillMap; // [areaId][base skill level]
- FishingBaseSkillMap mFishingBaseForArea;
-
- typedef std::map<uint32, StringVector> HalfNameMap;
- HalfNameMap PetHalfName0;
- HalfNameMap PetHalfName1;
-
- typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameMap;
- ItemSetNameMap mItemSetNameMap;
-
- MapObjectGuids mMapObjectGuids;
- CreatureDataMap mCreatureDataMap;
- CreatureTemplateContainer CreatureTemplateStore;
- CreatureModelContainer CreatureModelStore;
- CreatureAddonContainer CreatureAddonStore;
- CreatureAddonContainer CreatureTemplateAddonStore;
- EquipmentInfoContainer EquipmentInfoStore;
- LinkedRespawnMap mLinkedRespawnMap;
- CreatureLocaleMap mCreatureLocaleMap;
- GameObjectDataMap mGameObjectDataMap;
- GameObjectLocaleMap mGameObjectLocaleMap;
- GameObjectTemplateContainer GameObjectTemplateStore;
-
- ItemTemplateContainer ItemTemplateStore;
- ItemLocaleMap mItemLocaleMap;
- ItemSetNameLocaleMap mItemSetNameLocaleMap;
- QuestLocaleMap mQuestLocaleMap;
- NpcTextLocaleMap mNpcTextLocaleMap;
- PageTextLocaleMap mPageTextLocaleMap;
- TrinityStringLocaleMap mTrinityStringLocaleMap;
- GossipMenuItemsLocaleMap mGossipMenuItemsLocaleMap;
- PointOfInterestLocaleMap mPointOfInterestLocaleMap;
- RespawnTimes mCreatureRespawnTimes;
- ACE_Thread_Mutex m_CreatureRespawnTimesMtx;
- RespawnTimes mGORespawnTimes;
- ACE_Thread_Mutex m_GORespawnTimesMtx;
-
- CacheVendorItemMap m_mCacheVendorItemMap;
- CacheTrainerSpellMap m_mCacheTrainerSpellMap;
-
- std::set<uint32> difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
- std::set<uint32> hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
+ PlayerXPperLevel _playerXPperLevel;
+
+ typedef std::map<uint32, uint32> BaseXPContainer; // [area level][base xp]
+ BaseXPContainer _baseXPTable;
+
+ typedef std::map<uint32, int32> FishingBaseSkillContainer; // [areaId][base skill level]
+ FishingBaseSkillContainer _fishingBaseForAreaStore;
+
+ typedef std::map<uint32, StringVector> HalfNameContainer;
+ HalfNameContainer _petHalfName0;
+ HalfNameContainer _petHalfName1;
+
+ typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameContainer;
+ ItemSetNameContainer _itemSetNameStore;
+
+ MapObjectGuids _mapObjectGuidsStore;
+ CreatureDataContainer _creatureDataStore;
+ CreatureTemplateContainer _creatureTemplateStore;
+ CreatureModelContainer _creatureModelStore;
+ CreatureAddonContainer _creatureAddonStore;
+ CreatureAddonContainer _creatureTemplateAddonStore;
+ EquipmentInfoContainer _equipmentInfoStore;
+ LinkedRespawnContainer _linkedRespawnStore;
+ CreatureLocaleContainer _creatureLocaleStore;
+ GameObjectDataContainer _gameObjectDataStore;
+ GameObjectLocaleContainer _gameObjectLocaleStore;
+ GameObjectTemplateContainer _gameObjectTemplateStore;
+
+ ItemTemplateContainer _itemTemplateStore;
+ ItemLocaleContainer _itemLocaleStore;
+ ItemSetNameLocaleContainer _itemSetNameLocaleStore;
+ QuestLocaleContainer _questLocaleStore;
+ NpcTextLocaleContainer _npcTextLocaleStore;
+ PageTextLocaleContainer _pageTextLocaleStore;
+ TrinityStringLocaleContainer _trinityStringLocaleStore;
+ GossipMenuItemsLocaleContainer _gossipMenuItemsLocaleStore;
+ PointOfInterestLocaleContainer _pointOfInterestLocaleStore;
+ RespawnTimes _creatureRespawnTimes;
+ ACE_Thread_Mutex _creatureRespawnTimesMutex;
+ RespawnTimes _goRespawnTimes;
+ ACE_Thread_Mutex _goRespawnTimesMutex;
+
+ CacheVendorItemContainer _cacheVendorItemStore;
+ CacheTrainerSpellContainer _cacheTrainerSpellStore;
+
+ std::set<uint32> _difficultyEntries[MAX_DIFFICULTY - 1]; // already loaded difficulty 1 value in creatures, used in CheckCreatureTemplate
+ std::set<uint32> _hasDifficultyEntries[MAX_DIFFICULTY - 1]; // already loaded creatures with difficulty 1 values, used in CheckCreatureTemplate
enum CreatureLinkedRespawnType
{
diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h
index 8651680cb49..d096bb7ab63 100644
--- a/src/server/game/Grids/GridDefines.h
+++ b/src/server/game/Grids/GridDefines.h
@@ -65,6 +65,16 @@ typedef GridRefManager<DynamicObject> DynamicObjectMapType;
typedef GridRefManager<GameObject> GameObjectMapType;
typedef GridRefManager<Player> PlayerMapType;
+enum GridMapTypeMask
+{
+ GRID_MAP_TYPE_MASK_CORPSE = 0x01,
+ GRID_MAP_TYPE_MASK_CREATURE = 0x02,
+ GRID_MAP_TYPE_MASK_DYNAMICOBJECT = 0x04,
+ GRID_MAP_TYPE_MASK_GAMEOBJECT = 0x08,
+ GRID_MAP_TYPE_MASK_PLAYER = 0x10,
+ GRID_MAP_TYPE_MASK_ALL = 0x1F
+};
+
typedef Grid<Player, AllWorldObjectTypes, AllGridObjectTypes> GridType;
typedef NGrid<MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes> NGridType;
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index 2446e9d4276..17d3066e64d 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -343,24 +343,17 @@ bool AnyDeadUnitObjectInRangeCheck::operator()(Creature* u)
bool AnyDeadUnitSpellTargetInRangeCheck::operator()(Player* u)
{
- return AnyDeadUnitObjectInRangeCheck::operator()(u)
- && (i_spellInfo->CheckTarget(i_searchObj, u, true) == SPELL_CAST_OK)
- && i_searchObj->IsTargetMatchingCheck(u, i_check);
+ return AnyDeadUnitObjectInRangeCheck::operator()(u) && i_check(u);
}
bool AnyDeadUnitSpellTargetInRangeCheck::operator()(Corpse* u)
{
- Player* owner = ObjectAccessor::FindPlayer(u->GetOwnerGUID());
- return owner && AnyDeadUnitObjectInRangeCheck::operator()(u)
- && (i_spellInfo->CheckTarget(i_searchObj, owner, true) == SPELL_CAST_OK)
- && i_searchObj->IsTargetMatchingCheck(owner, i_check);
+ return AnyDeadUnitObjectInRangeCheck::operator()(u) && i_check(u);
}
bool AnyDeadUnitSpellTargetInRangeCheck::operator()(Creature* u)
{
- return AnyDeadUnitObjectInRangeCheck::operator()(u)
- && (i_spellInfo->CheckTarget(i_searchObj, u, true) == SPELL_CAST_OK)
- && i_searchObj->IsTargetMatchingCheck(u, i_check);
+ return AnyDeadUnitObjectInRangeCheck::operator()(u) && i_check(u);
}
template void ObjectUpdater::Visit<GameObject>(GameObjectMapType &);
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 4bec8b2e897..48b9860eb0b 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -30,6 +30,7 @@
#include "Player.h"
#include "Unit.h"
#include "CreatureAI.h"
+#include "Spell.h"
class Player;
//class Map;
@@ -168,12 +169,33 @@ namespace Trinity
template<class Check>
struct WorldObjectSearcher
{
+ uint32 i_mapTypeMask;
uint32 i_phaseMask;
WorldObject* &i_object;
Check &i_check;
- WorldObjectSearcher(WorldObject const* searcher, WorldObject* & result, Check& check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ WorldObjectSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+
+ void Visit(GameObjectMapType &m);
+ void Visit(PlayerMapType &m);
+ void Visit(CreatureMapType &m);
+ void Visit(CorpseMapType &m);
+ void Visit(DynamicObjectMapType &m);
+
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ };
+
+ template<class Check>
+ struct WorldObjectLastSearcher
+ {
+ uint32 i_mapTypeMask;
+ uint32 i_phaseMask;
+ WorldObject* &i_object;
+ Check &i_check;
+
+ WorldObjectLastSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
void Visit(GameObjectMapType &m);
void Visit(PlayerMapType &m);
@@ -187,12 +209,13 @@ namespace Trinity
template<class Check>
struct WorldObjectListSearcher
{
+ uint32 i_mapTypeMask;
uint32 i_phaseMask;
std::list<WorldObject*> &i_objects;
Check& i_check;
- WorldObjectListSearcher(WorldObject const* searcher, std::list<WorldObject*> &objects, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
+ WorldObjectListSearcher(WorldObject const* searcher, std::list<WorldObject*> &objects, Check & check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
@@ -206,14 +229,17 @@ namespace Trinity
template<class Do>
struct WorldObjectWorker
{
+ uint32 i_mapTypeMask;
uint32 i_phaseMask;
Do const& i_do;
- WorldObjectWorker(WorldObject const* searcher, Do const& _do)
- : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
+ WorldObjectWorker(WorldObject const* searcher, Do const& _do, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
void Visit(GameObjectMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_GAMEOBJECT))
+ return;
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
@@ -221,12 +247,16 @@ namespace Trinity
void Visit(PlayerMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_PLAYER))
+ return;
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
void Visit(CreatureMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CREATURE))
+ return;
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
@@ -234,6 +264,8 @@ namespace Trinity
void Visit(CorpseMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CORPSE))
+ return;
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
@@ -241,6 +273,8 @@ namespace Trinity
void Visit(DynamicObjectMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_DYNAMICOBJECT))
+ return;
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
@@ -527,57 +561,11 @@ namespace Trinity
// CHECKS && DO classes
// WorldObject check classes
- class RaiseDeadObjectCheck
- {
- public:
- RaiseDeadObjectCheck(Unit* funit, float range) : i_funit(funit), i_range(range) {}
- bool operator()(Creature* u)
- {
- if (i_funit->GetTypeId() != TYPEID_PLAYER || !((Player*)i_funit)->isHonorOrXPTarget(u) ||
- u->getDeathState() != CORPSE || u->isInFlight() ||
- (u->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0 ||
- (u->GetDisplayId() != u->GetNativeDisplayId()))
- return false;
-
- return i_funit->IsWithinDistInMap(u, i_range);
- }
- template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; }
- private:
- Unit* const i_funit;
- float i_range;
- };
-
- class ExplodeCorpseObjectCheck
- {
- public:
- ExplodeCorpseObjectCheck(Unit* funit, float range) : i_funit(funit), i_range(range) {}
- bool operator()(Player* u)
- {
- if (u->getDeathState() != CORPSE || u->isInFlight() ||
- u->HasAuraType(SPELL_AURA_GHOST) || (u->GetDisplayId() != u->GetNativeDisplayId()))
- return false;
-
- return i_funit->IsWithinDistInMap(u, i_range);
- }
- bool operator()(Creature* u)
- {
- if (u->getDeathState() != CORPSE || u->isInFlight() ||
- (u->GetDisplayId() != u->GetNativeDisplayId()) ||
- (u->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL) != 0)
- return false;
-
- return i_funit->IsWithinDistInMap(u, i_range);
- }
- template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; }
- private:
- Unit* const i_funit;
- float i_range;
- };
class AnyDeadUnitObjectInRangeCheck
{
public:
- AnyDeadUnitObjectInRangeCheck(Unit const* searchObj, float range) : i_searchObj(searchObj), i_range(range) {}
+ AnyDeadUnitObjectInRangeCheck(Unit* searchObj, float range) : i_searchObj(searchObj), i_range(range) {}
bool operator()(Player* u);
bool operator()(Corpse* u);
bool operator()(Creature* u);
@@ -590,15 +578,16 @@ namespace Trinity
class AnyDeadUnitSpellTargetInRangeCheck : public AnyDeadUnitObjectInRangeCheck
{
public:
- AnyDeadUnitSpellTargetInRangeCheck(Unit const* searchObj, float range, SpellInfo const* spellInfo, SpellTargetSelectionCheckTypes check)
- : AnyDeadUnitObjectInRangeCheck(searchObj, range), i_spellInfo(spellInfo), i_check(check) {}
+ AnyDeadUnitSpellTargetInRangeCheck(Unit* searchObj, float range, SpellInfo const* spellInfo, SpellTargetCheckTypes check)
+ : AnyDeadUnitObjectInRangeCheck(searchObj, range), i_spellInfo(spellInfo), i_check(searchObj, searchObj, spellInfo, check, NULL)
+ {}
bool operator()(Player* u);
bool operator()(Corpse* u);
bool operator()(Creature* u);
template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; }
protected:
SpellInfo const* i_spellInfo;
- SpellTargetSelectionCheckTypes i_check;
+ WorldObjectSpellTargetCheck i_check;
};
// WorldObject do classes
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index 34fe7757c5f..40b3863679b 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -51,6 +51,9 @@ inline void Trinity::ObjectUpdater::Visit(CreatureMapType &m)
template<class Check>
void Trinity::WorldObjectSearcher<Check>::Visit(GameObjectMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_GAMEOBJECT))
+ return;
+
// already found
if (i_object)
return;
@@ -71,6 +74,9 @@ void Trinity::WorldObjectSearcher<Check>::Visit(GameObjectMapType &m)
template<class Check>
void Trinity::WorldObjectSearcher<Check>::Visit(PlayerMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_PLAYER))
+ return;
+
// already found
if (i_object)
return;
@@ -91,6 +97,9 @@ void Trinity::WorldObjectSearcher<Check>::Visit(PlayerMapType &m)
template<class Check>
void Trinity::WorldObjectSearcher<Check>::Visit(CreatureMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CREATURE))
+ return;
+
// already found
if (i_object)
return;
@@ -111,6 +120,9 @@ void Trinity::WorldObjectSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::WorldObjectSearcher<Check>::Visit(CorpseMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CORPSE))
+ return;
+
// already found
if (i_object)
return;
@@ -131,6 +143,9 @@ void Trinity::WorldObjectSearcher<Check>::Visit(CorpseMapType &m)
template<class Check>
void Trinity::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_DYNAMICOBJECT))
+ return;
+
// already found
if (i_object)
return;
@@ -148,9 +163,93 @@ void Trinity::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
}
}
+
+template<class Check>
+void Trinity::WorldObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
+{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_GAMEOBJECT))
+ return;
+
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ {
+ if (!itr->getSource()->InSamePhase(i_phaseMask))
+ continue;
+
+ if (i_check(itr->getSource()))
+ i_object = itr->getSource();
+ }
+}
+
+template<class Check>
+void Trinity::WorldObjectLastSearcher<Check>::Visit(PlayerMapType &m)
+{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_PLAYER))
+ return;
+
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ {
+ if (!itr->getSource()->InSamePhase(i_phaseMask))
+ continue;
+
+ if (i_check(itr->getSource()))
+ i_object = itr->getSource();
+ }
+}
+
+template<class Check>
+void Trinity::WorldObjectLastSearcher<Check>::Visit(CreatureMapType &m)
+{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CREATURE))
+ return;
+
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ {
+ if (!itr->getSource()->InSamePhase(i_phaseMask))
+ continue;
+
+ if (i_check(itr->getSource()))
+ i_object = itr->getSource();
+ }
+}
+
+template<class Check>
+void Trinity::WorldObjectLastSearcher<Check>::Visit(CorpseMapType &m)
+{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CORPSE))
+ return;
+
+ for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ {
+ if (!itr->getSource()->InSamePhase(i_phaseMask))
+ continue;
+
+ if (i_check(itr->getSource()))
+ i_object = itr->getSource();
+ }
+}
+
+template<class Check>
+void Trinity::WorldObjectLastSearcher<Check>::Visit(DynamicObjectMapType &m)
+{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_DYNAMICOBJECT))
+ return;
+
+ for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ {
+ if (!itr->getSource()->InSamePhase(i_phaseMask))
+ continue;
+
+ if (i_check(itr->getSource()))
+ i_object = itr->getSource();
+ }
+}
+
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_PLAYER))
+ return;
+
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
if (i_check(itr->getSource()))
@@ -160,6 +259,9 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CREATURE))
+ return;
+
for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
if (i_check(itr->getSource()))
@@ -169,6 +271,9 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_CORPSE))
+ return;
+
for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
if (i_check(itr->getSource()))
@@ -178,6 +283,9 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_GAMEOBJECT))
+ return;
+
for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
if (i_check(itr->getSource()))
@@ -187,6 +295,9 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(DynamicObjectMapType &m)
{
+ if (!(i_mapTypeMask & GRID_MAP_TYPE_MASK_DYNAMICOBJECT))
+ return;
+
for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_phaseMask))
if (i_check(itr->getSource()))
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index fd5b40f8031..1af656d7664 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -585,7 +585,7 @@ bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOV
{
Player* Leader = ObjectAccessor::FindPlayer(GetLeaderGUID());
LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(sLFGMgr->GetDungeon(GetGUID()));
- if ((Leader && dungeon && Leader->isAlive() && Leader->GetMapId() != dungeon->map) || !dungeon)
+ if ((Leader && dungeon && Leader->isAlive() && Leader->GetMapId() != uint32(dungeon->map)) || !dungeon)
{
Disband();
return false;
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 9b2d502b331..929532b6362 100755
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -115,42 +115,53 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
//this void creates new auction and adds auction to some auctionhouse
void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_SELL_ITEM");
-
- uint64 auctioneer, item;
- uint32 etime, bid, buyout, count;
+ uint64 auctioneer;
+ uint32 itemsCount, etime, bid, buyout;
recv_data >> auctioneer;
- recv_data.read_skip<uint32>(); // const 1?
- recv_data >> item;
- recv_data >> count; // 3.2.2, number of items being auctioned
+ recv_data >> itemsCount;
+
+ uint64 itemGUIDs[MAX_AUCTION_ITEMS]; // 160 slot = 4x 36 slot bag + backpack 16 slot
+ uint32 count[MAX_AUCTION_ITEMS];
+
+ if (itemsCount > MAX_AUCTION_ITEMS)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
+
+ for (uint32 i = 0; i < itemsCount; ++i)
+ {
+ recv_data >> itemGUIDs[i];
+ recv_data >> count[i];
+
+ if (!itemGUIDs[i] || !count[i] || count[i] > 1000 )
+ return;
+ }
+
recv_data >> bid;
recv_data >> buyout;
recv_data >> etime;
- Player* player = GetPlayer();
-
- if (!item || !bid || !etime)
- return; //check for cheaters
+ if (!bid || !etime)
+ return;
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(auctioneer));
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
if (!auctionHouseEntry)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer)));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", GUID_LOPART(auctioneer));
return;
}
- // client send time in minutes, convert to common used sec time
etime *= MINUTE;
- // client understand only 3 auction time
- switch (etime)
+ switch(etime)
{
case 1*MIN_AUCTION_TIME:
case 2*MIN_AUCTION_TIME:
@@ -160,96 +171,181 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
- // remove fake death
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- 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", player->GetName(), GUID_LOPART(item));
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
- }
- // prevent sending bag with items (cheat: can be placed in bag after adding equiped empty bag to auction)
- if (!it)
+ Item* items[MAX_AUCTION_ITEMS];
+
+ uint32 finalCount = 0;
+
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
- return;
+ Item* item = _player->GetItemByGuid(itemGUIDs[i]);
+
+ if (!item)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
+ return;
+ }
+
+ if (sAuctionMgr->GetAItem(item->GetGUIDLow()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
+ item->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
+ item->GetCount() < count[i])
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
+
+ items[i] = item;
+ finalCount += count[i];
}
- if (!it->CanBeTraded())
+ if (!finalCount)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
- if (it->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || it->GetUInt32Value(ITEM_FIELD_DURATION))
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
+ Item* item = items[i];
+
+ if (item->GetMaxStackCount() < finalCount)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
}
- if (it->IsNotEmptyBag())
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
- }
+ Item* item = items[i];
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
- //we have to take deposit :
- uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, it, count);
- if (!player->HasEnoughMoney(deposit))
- {
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
- return;
- }
+ uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
+ if (!_player->HasEnoughMoney(deposit))
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
+ return;
+ }
- if (AccountMgr::IsGMAccount(GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
- {
- sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
- GetPlayerName(), GetAccountId(), it->GetTemplate()->Name1.c_str(), it->GetEntry(), count);
- }
+ _player->ModifyMoney(-int32(deposit));
- player->ModifyMoney(-int32(deposit));
+ AuctionEntry* AH = new AuctionEntry;
+ AH->Id = sObjectMgr->GenerateAuctionID();
- uint32 auction_time = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
+ AH->auctioneer = 23442;
+ else
+ AH->auctioneer = GUID_LOPART(auctioneer);
- AuctionEntry* AH = new AuctionEntry;
- AH->Id = sObjectMgr->GenerateAuctionID();
- if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
- AH->auctioneer = 23442;
- else
- AH->auctioneer = GUID_LOPART(auctioneer);
- AH->item_guidlow = GUID_LOPART(item);
- AH->item_template = it->GetEntry();
- AH->owner = player->GetGUIDLow();
- AH->startbid = bid;
- AH->bidder = 0;
- AH->bid = 0;
- AH->buyout = buyout;
- AH->expire_time = time(NULL) + auction_time;
- AH->deposit = deposit;
- AH->auctionHouseEntry = auctionHouseEntry;
-
- sLog->outDetail("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
- sAuctionMgr->AddAItem(it);
- auctionHouse->AddAuction(AH);
-
- player->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
+ if (itemsCount == 1 && item->GetCount() == count[i])
+ {
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
+ {
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ GetPlayerName(), GetAccountId(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount());
+ }
- 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);
- player->SaveInventoryAndGoldToDB(trans);
- CharacterDatabase.CommitTransaction(trans);
+ AH->item_guidlow = item->GetGUIDLow();
+ AH->item_template = item->GetEntry();
+ AH->owner = _player->GetGUIDLow();
+ AH->startbid = bid;
+ AH->bidder = 0;
+ AH->bid = 0;
+ AH->buyout = buyout;
+ AH->expire_time = time(NULL) + auctionTime;
+ AH->deposit = deposit;
+ AH->auctionHouseEntry = auctionHouseEntry;
+
+ sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ sAuctionMgr->AddAItem(item);
+ auctionHouse->AddAuction(AH);
+
+ _player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->DeleteFromInventoryDB(trans);
+ item->SaveToDB(trans);
+ AH->SaveToDB(trans);
+ _player->SaveInventoryAndGoldToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+
+ GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ return;
+ }
+ else
+ {
+ Item* newItem = item->CloneItem(finalCount, _player);
+ if (!newItem)
+ {
+ sLog->outError("CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
- SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
+ {
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ GetPlayerName(), GetAccountId(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetCount());
+ }
+
+ AH->item_guidlow = newItem->GetGUIDLow();
+ AH->item_template = newItem->GetEntry();
+ AH->owner = _player->GetGUIDLow();
+ AH->startbid = bid;
+ AH->bidder = 0;
+ AH->bid = 0;
+ AH->buyout = buyout;
+ AH->expire_time = time(NULL) + auctionTime;
+ AH->deposit = deposit;
+ AH->auctionHouseEntry = auctionHouseEntry;
+
+ sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ sAuctionMgr->AddAItem(newItem);
+ auctionHouse->AddAuction(AH);
+
+ for (uint32 i = 0; i < itemsCount; ++i)
+ {
+ Item* item = items[i];
+
+ if (item->GetCount() == count[i])
+ {
+ _player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->DeleteFromInventoryDB(trans);
+ item->SaveToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+ }
+ else
+ {
+ item->SetCount(item->GetCount() - count[i]);
+ item->SetState(ITEM_CHANGED, _player);
+ _player->ItemRemovedQuestCheck(item->GetEntry(), count[i]);
+ item->SendUpdateToPlayer(_player);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->SaveToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+ }
+ }
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ AH->SaveToDB(trans);
+ _player->SaveInventoryAndGoldToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
- GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+
+ GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ return;
+ }
+ }
}
// this function is called when client bids or buys out auction
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index be547c84b19..820079a90e1 100755
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -88,7 +88,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recv_data*/)
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)
{
@@ -102,7 +102,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recv_data*/)
continue;
sentMaps.insert(mapId);
-
+
data << uint32(mapId);
data << uint32(itr->second - cur_time);
data << uint32(mapEntry->unk_time);
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index c4208215053..16129985d0f 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -197,7 +197,7 @@ bool LoginQueryHolder::Initialize()
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES);
stmt->setUInt32(0, m_accountId);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES, stmt);
-
+
return res;
}
@@ -686,6 +686,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
}
Player newChar(this);
+ newChar.GetMotionMaster()->Initialize();
if (!newChar.Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), createInfo))
{
// Player not create (race/class/etc problem?)
@@ -1968,7 +1969,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
trans->Append(stmt);
// Achievement conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_achievements.begin(); it != sObjectMgr->factionchange_achievements.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Achievements.begin(); it != sObjectMgr->FactionChange_Achievements.end(); ++it)
{
uint32 achiev_alliance = it->first;
uint32 achiev_horde = it->second;
@@ -1979,7 +1980,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Item conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_items.begin(); it != sObjectMgr->factionchange_items.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Items.begin(); it != sObjectMgr->FactionChange_Items.end(); ++it)
{
uint32 item_alliance = it->first;
uint32 item_horde = it->second;
@@ -1988,7 +1989,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Spell conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_spells.begin(); it != sObjectMgr->factionchange_spells.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Spells.begin(); it != sObjectMgr->FactionChange_Spells.end(); ++it)
{
uint32 spell_alliance = it->first;
uint32 spell_horde = it->second;
@@ -1999,7 +2000,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Reputation conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_reputations.begin(); it != sObjectMgr->factionchange_reputations.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChange_Reputation.begin(); it != sObjectMgr->FactionChange_Reputation.end(); ++it)
{
uint32 reputation_alliance = it->first;
uint32 reputation_horde = it->second;
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 8184334d2b1..1cd4df5de2c 100755
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -1194,16 +1194,6 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
GetPlayer()->SetByteValue(PLAYER_FIELD_BYTES, 2, ActionBar);
}
-void WorldSession::HandleWardenDataOpcode(WorldPacket& recv_data)
-{
- recv_data.read_skip<uint8>();
- /*
- uint8 tmp;
- recv_data >> tmp;
- sLog->outDebug("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u", tmp);
- */
-}
-
void WorldSession::HandlePlayedTime(WorldPacket& recv_data)
{
uint8 unk1;
@@ -1491,20 +1481,14 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data)
void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES");
- Group* group = _player->GetGroup();
- if (group)
+
+ if (Group* group = _player->GetGroup())
{
if (group->IsLeader(_player->GetGUID()))
- {
group->ResetInstances(INSTANCE_RESET_ALL, false, _player);
- group->ResetInstances(INSTANCE_RESET_ALL, true, _player);
- }
}
else
- {
_player->ResetInstances(INSTANCE_RESET_ALL, false);
- _player->ResetInstances(INSTANCE_RESET_ALL, true);
- }
}
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
@@ -1524,7 +1508,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
return;
// cannot reset while in an instance
- Map* map = _player->GetMap();
+ Map* map = _player->FindMap();
if (map && map->IsDungeon())
{
sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", _player->GetName(), _player->GetGUIDLow());
@@ -1545,8 +1529,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
if (!pGroupGuy->IsInMap(pGroupGuy))
return;
- map = pGroupGuy->GetMap();
- if (map && map->IsNonRaidDungeon())
+ if (pGroupGuy->GetMap()->IsNonRaidDungeon())
{
sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), pGroupGuy->GetName(), pGroupGuy->GetGUIDLow());
return;
@@ -1579,7 +1562,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
}
// cannot reset while in an instance
- Map* map = _player->GetMap();
+ Map* map = _player->FindMap();
if (map && map->IsDungeon())
{
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
@@ -1603,8 +1586,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
if (!pGroupGuy->IsInMap(pGroupGuy))
return;
- map = pGroupGuy->GetMap();
- if (map && map->IsRaid())
+ if (pGroupGuy->GetMap()->IsRaid())
{
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index 945116ea5d8..385b91c9f7d 100755
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -621,7 +621,7 @@ void WorldSession::HandleStablePet(WorldPacket & recv_data)
Pet* pet = _player->GetPet();
// can't place in stable dead pet
- if (!pet||!pet->isAlive()||pet->getPetType() != HUNTER_PET)
+ if (!pet || !pet->isAlive() || pet->getPetType() != HUNTER_PET)
{
SendStableResult(STABLE_ERR_STABLE);
return;
@@ -859,16 +859,22 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
return;
}
- // move alive pet to slot or delete dead pet
Pet* pet = _player->GetPet();
+ // The player's pet could have been removed during the delay of the DB callback
+ if (!pet)
+ {
+ SendStableResult(STABLE_ERR_STABLE);
+ return;
+ }
+ // move alive pet to slot or delete dead pet
_player->RemovePet(pet, pet->isAlive() ? PetSaveMode(slot) : PET_SAVE_AS_DELETED);
// summon unstabled pet
- Pet* newpet = new Pet(_player);
- if (!newpet->LoadPetFromDB(_player, petEntry, petId))
+ Pet* newPet = new Pet(_player);
+ if (!newPet->LoadPetFromDB(_player, petEntry, petId))
{
- delete newpet;
+ delete newPet;
SendStableResult(STABLE_ERR_STABLE);
}
else
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index fb94800d1bd..f278e6b017e 100755
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -160,6 +160,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
case COMMAND_STAY: //flat=1792 //STAY
pet->AttackStop();
pet->InterruptNonMeleeSpells(false);
+ pet->StopMoving();
pet->GetMotionMaster()->Clear(false);
pet->GetMotionMaster()->MoveIdle();
charmInfo->SetCommandState(COMMAND_STAY);
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index f363fa71038..7faabb730e4 100755
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -241,9 +241,8 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction(trans);
}
-void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
+void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recv_data)
{
- // ok
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
uint8 signs = 0;
@@ -256,7 +255,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
QueryResult result = CharacterDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", petitionguid_low);
if (!result)
{
- sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
+ sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
return;
}
Field* fields = result->Fetch();
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index abb62fb0185..a18fbcddfca 100755
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -257,7 +257,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
mapid = corpseMapEntry->entrance_map;
x = corpseMapEntry->entrance_x;
y = corpseMapEntry->entrance_y;
- z = entranceMap->GetHeight(x, y, MAX_HEIGHT);
+ z = entranceMap->GetHeight(GetPlayer()->GetPhaseMask(), x, y, MAX_HEIGHT);
}
}
}
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 6cba7b7fb4f..761fb9657c9 100755
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -652,7 +652,7 @@ uint32 WorldSession::getDialogStatus(Player* player, Object* questgiver, uint32
if (!pQuest) continue;
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId());
- if (!sConditionMgr->IsPlayerMeetToConditions(player, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(player, conditions))
continue;
QuestStatus status = player->GetQuestStatus(quest_id);
@@ -680,7 +680,7 @@ uint32 WorldSession::getDialogStatus(Player* player, Object* questgiver, uint32
continue;
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId());
- if (!sConditionMgr->IsPlayerMeetToConditions(player, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(player, conditions))
continue;
QuestStatus status = player->GetQuestStatus(quest_id);
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 09ba46654ee..4e3a5a91db7 100755
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -166,24 +166,6 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
targets.Read(recvPacket, pUser);
HandleClientCastFlags(recvPacket, castFlags, targets);
- if (!pItem->IsTargetValidForItemUse(targets.GetUnitTarget()))
- {
- // free gray item after use fail
- pUser->SendEquipError(EQUIP_ERR_NONE, pItem, NULL);
-
- // send spell error
- if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId))
- {
- // for implicit area/coord target spells
- if (!targets.GetUnitTarget())
- Spell::SendCastResult(_player, spellInfo, castCount, SPELL_FAILED_NO_VALID_TARGETS);
- // for explicit target spells
- else
- Spell::SendCastResult(_player, spellInfo, castCount, SPELL_FAILED_BAD_TARGETS);
- }
- return;
- }
-
// Note: If script stop casting it must send appropriate data to client to prevent stuck item in gray state.
if (!sScriptMgr->OnItemUse(pUser, pItem, targets))
{
diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp
index 8eb1eab06d9..44889e6dda8 100755
--- a/src/server/game/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Handlers/TaxiHandler.cpp
@@ -292,3 +292,12 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data)
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}
+
+void WorldSession::SendActivateTaxiReply(ActivateTaxiReply reply)
+{
+ WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
+ data << uint32(reply);
+ SendPacket(&data);
+
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ACTIVATETAXIREPLY");
+}
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index 1869a21c738..d0a96e3b62e 100755
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -316,7 +316,7 @@ void InstanceScript::DoSendNotifyToInstance(char const* format, ...)
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
if (Player* player = i->getSource())
if (WorldSession* session = player->GetSession())
- session->SendNotification(buff);
+ session->SendNotification("%s", buff);
}
}
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index a0ede8c7eef..edc8d24c635 100755
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -102,9 +102,7 @@ uint32 LootStore::LoadLootTable()
QueryResult result = WorldDatabase.PQuery("SELECT entry, item, ChanceOrQuestChance, lootmode, groupid, mincountOrRef, maxcount FROM %s", GetName());
if (!result)
- {
return 0;
-}
uint32 count = 0;
@@ -341,7 +339,7 @@ LootItem::LootItem(LootStoreItem const& li)
bool LootItem::AllowedForPlayer(Player const* player) const
{
// DB conditions check
- if (!sConditionMgr->IsPlayerMeetToConditions(const_cast<Player*>(player), conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(const_cast<Player*>(player), conditions))
return false;
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid);
@@ -1367,7 +1365,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
for (LootStoreItemList::iterator i = Entries.begin(); i != Entries.end(); ++i)
{
- if (i->itemid == cond->mSourceEntry)
+ if (i->itemid == uint32(cond->SourceEntry))
{
i->conditions.push_back(cond);
return true;
@@ -1383,7 +1381,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
for (LootStoreItemList::iterator i = itemList->begin(); i != itemList->end(); ++i)
{
- if ((*i).itemid == cond->mSourceEntry)
+ if ((*i).itemid == uint32(cond->SourceEntry))
{
(*i).conditions.push_back(cond);
return true;
@@ -1395,7 +1393,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
for (LootStoreItemList::iterator i = itemList->begin(); i != itemList->end(); ++i)
{
- if ((*i).itemid == cond->mSourceEntry)
+ if ((*i).itemid == uint32(cond->SourceEntry))
{
(*i).conditions.push_back(cond);
return true;
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index ec362cf1a83..81b4f958e5d 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -31,6 +31,7 @@
#include "ObjectMgr.h"
#include "Group.h"
#include "LFGMgr.h"
+#include "DynamicTree.h"
union u_map_magic
{
@@ -368,6 +369,7 @@ bool Map::EnsureGridLoaded(const Cell &cell)
// Add resurrectable corpses to world object list in grid
sObjectAccessor->AddCorpsesToGrid(GridCoord(cell.GridX(), cell.GridY()), grid->GetGridType(cell.CellX(), cell.CellY()), this);
+ Balance();
return true;
}
@@ -498,6 +500,7 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::Obj
void Map::Update(const uint32 t_diff)
{
+ _dynamicTree.update(t_diff);
/// update worldsessions for existing players
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
@@ -663,9 +666,11 @@ void Map::RemovePlayerFromMap(Player* player, bool remove)
ASSERT(remove); //maybe deleted in logoutplayer when player is not in a map
if (remove)
+ {
DeleteFromWorld(player);
- sScriptMgr->OnPlayerLeaveMap(this, player);
+ sScriptMgr->OnPlayerLeaveMap(this, player);
+ }
}
template<class T>
@@ -1018,24 +1023,24 @@ void Map::UnloadAll()
// *****************************
GridMap::GridMap()
{
- m_flags = 0;
+ _flags = 0;
// Area data
- m_gridArea = 0;
- m_area_map = NULL;
+ _gridArea = 0;
+ _areaMap = NULL;
// Height level data
- m_gridHeight = INVALID_HEIGHT;
- m_gridGetHeight = &GridMap::getHeightFromFlat;
+ _gridHeight = INVALID_HEIGHT;
+ _gridGetHeight = &GridMap::getHeightFromFlat;
m_V9 = NULL;
m_V8 = NULL;
// Liquid data
- m_liquidType = 0;
- m_liquid_offX = 0;
- m_liquid_offY = 0;
- m_liquid_width = 0;
- m_liquid_height = 0;
- m_liquidLevel = INVALID_HEIGHT;
- m_liquid_type = NULL;
- m_liquid_map = NULL;
+ _liquidType = 0;
+ _liquidOffX = 0;
+ _liquidOffY = 0;
+ _liquidWidth = 0;
+ _liquidHeight = 0;
+ _liquidLevel = INVALID_HEIGHT;
+ _liquidData = NULL;
+ _liquidMap = NULL;
}
GridMap::~GridMap()
@@ -1093,17 +1098,17 @@ bool GridMap::loadData(char *filename)
void GridMap::unloadData()
{
- delete[] m_area_map;
+ delete[] _areaMap;
delete[] m_V9;
delete[] m_V8;
- delete[] m_liquid_type;
- delete[] m_liquid_map;
- m_area_map = NULL;
+ delete[] _liquidData;
+ delete[] _liquidMap;
+ _areaMap = NULL;
m_V9 = NULL;
m_V8 = NULL;
- m_liquid_type = NULL;
- m_liquid_map = NULL;
- m_gridGetHeight = &GridMap::getHeightFromFlat;
+ _liquidData = NULL;
+ _liquidMap = NULL;
+ _gridGetHeight = &GridMap::getHeightFromFlat;
}
bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/)
@@ -1114,11 +1119,11 @@ bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(&header, sizeof(header), 1, in) != 1 || header.fourcc != MapAreaMagic.asUInt)
return false;
- m_gridArea = header.gridArea;
+ _gridArea = header.gridArea;
if (!(header.flags & MAP_AREA_NO_AREA))
{
- m_area_map = new uint16 [16*16];
- if (fread(m_area_map, sizeof(uint16), 16*16, in) != 16*16)
+ _areaMap = new uint16 [16*16];
+ if (fread(_areaMap, sizeof(uint16), 16*16, in) != 16*16)
return false;
}
return true;
@@ -1132,7 +1137,7 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(&header, sizeof(header), 1, in) != 1 || header.fourcc != MapHeightMagic.asUInt)
return false;
- m_gridHeight = header.gridHeight;
+ _gridHeight = header.gridHeight;
if (!(header.flags & MAP_HEIGHT_NO_HEIGHT))
{
if ((header.flags & MAP_HEIGHT_AS_INT16))
@@ -1142,8 +1147,8 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(m_uint16_V9, sizeof(uint16), 129*129, in) != 129*129 ||
fread(m_uint16_V8, sizeof(uint16), 128*128, in) != 128*128)
return false;
- m_gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 65535;
- m_gridGetHeight = &GridMap::getHeightFromUint16;
+ _gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 65535;
+ _gridGetHeight = &GridMap::getHeightFromUint16;
}
else if ((header.flags & MAP_HEIGHT_AS_INT8))
{
@@ -1152,8 +1157,8 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(m_uint8_V9, sizeof(uint8), 129*129, in) != 129*129 ||
fread(m_uint8_V8, sizeof(uint8), 128*128, in) != 128*128)
return false;
- m_gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 255;
- m_gridGetHeight = &GridMap::getHeightFromUint8;
+ _gridIntHeightMultiplier = (header.gridMaxHeight - header.gridHeight) / 255;
+ _gridGetHeight = &GridMap::getHeightFromUint8;
}
else
{
@@ -1162,11 +1167,11 @@ bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(m_V9, sizeof(float), 129*129, in) != 129*129 ||
fread(m_V8, sizeof(float), 128*128, in) != 128*128)
return false;
- m_gridGetHeight = &GridMap::getHeightFromFloat;
+ _gridGetHeight = &GridMap::getHeightFromFloat;
}
}
else
- m_gridGetHeight = &GridMap::getHeightFromFlat;
+ _gridGetHeight = &GridMap::getHeightFromFlat;
return true;
}
@@ -1178,23 +1183,23 @@ bool GridMap::loadLiquidData(FILE* in, uint32 offset, uint32 /*size*/)
if (fread(&header, sizeof(header), 1, in) != 1 || header.fourcc != MapLiquidMagic.asUInt)
return false;
- m_liquidType = header.liquidType;
- m_liquid_offX = header.offsetX;
- m_liquid_offY = header.offsetY;
- m_liquid_width = header.width;
- m_liquid_height= header.height;
- m_liquidLevel = header.liquidLevel;
+ _liquidType = header.liquidType;
+ _liquidOffX = header.offsetX;
+ _liquidOffY = header.offsetY;
+ _liquidWidth = header.width;
+ _liquidHeight= header.height;
+ _liquidLevel = header.liquidLevel;
if (!(header.flags & MAP_LIQUID_NO_TYPE))
{
- m_liquid_type = new uint8 [16*16];
- if (fread(m_liquid_type, sizeof(uint8), 16*16, in) != 16*16)
+ _liquidData = new uint8 [16*16];
+ if (fread(_liquidData, sizeof(uint8), 16*16, in) != 16*16)
return false;
}
if (!(header.flags & MAP_LIQUID_NO_HEIGHT))
{
- m_liquid_map = new float [m_liquid_width*m_liquid_height];
- if (fread(m_liquid_map, sizeof(float), m_liquid_width*m_liquid_height, in) != m_liquid_width*m_liquid_height)
+ _liquidMap = new float [_liquidWidth*_liquidHeight];
+ if (fread(_liquidMap, sizeof(float), _liquidWidth*_liquidHeight, in) != _liquidWidth*_liquidHeight)
return false;
}
return true;
@@ -1202,25 +1207,25 @@ bool GridMap::loadLiquidData(FILE* in, uint32 offset, uint32 /*size*/)
uint16 GridMap::getArea(float x, float y)
{
- if (!m_area_map)
- return m_gridArea;
+ if (!_areaMap)
+ return _gridArea;
x = 16 * (32 - x/SIZE_OF_GRIDS);
y = 16 * (32 - y/SIZE_OF_GRIDS);
int lx = (int)x & 15;
int ly = (int)y & 15;
- return m_area_map[lx*16 + ly];
+ return _areaMap[lx*16 + ly];
}
float GridMap::getHeightFromFlat(float /*x*/, float /*y*/) const
{
- return m_gridHeight;
+ return _gridHeight;
}
float GridMap::getHeightFromFloat(float x, float y) const
{
if (!m_V8 || !m_V9)
- return m_gridHeight;
+ return _gridHeight;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
@@ -1302,7 +1307,7 @@ float GridMap::getHeightFromFloat(float x, float y) const
float GridMap::getHeightFromUint8(float x, float y) const
{
if (!m_uint8_V8 || !m_uint8_V9)
- return m_gridHeight;
+ return _gridHeight;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
@@ -1363,13 +1368,13 @@ float GridMap::getHeightFromUint8(float x, float y) const
}
}
// Calculate height
- return (float)((a * x) + (b * y) + c)*m_gridIntHeightMultiplier + m_gridHeight;
+ return (float)((a * x) + (b * y) + c)*_gridIntHeightMultiplier + _gridHeight;
}
float GridMap::getHeightFromUint16(float x, float y) const
{
if (!m_uint16_V8 || !m_uint16_V9)
- return m_gridHeight;
+ return _gridHeight;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
@@ -1430,45 +1435,45 @@ float GridMap::getHeightFromUint16(float x, float y) const
}
}
// Calculate height
- return (float)((a * x) + (b * y) + c)*m_gridIntHeightMultiplier + m_gridHeight;
+ return (float)((a * x) + (b * y) + c)*_gridIntHeightMultiplier + _gridHeight;
}
float GridMap::getLiquidLevel(float x, float y)
{
- if (!m_liquid_map)
- return m_liquidLevel;
+ if (!_liquidMap)
+ return _liquidLevel;
x = MAP_RESOLUTION * (32 - x/SIZE_OF_GRIDS);
y = MAP_RESOLUTION * (32 - y/SIZE_OF_GRIDS);
- int cx_int = ((int)x & (MAP_RESOLUTION-1)) - m_liquid_offY;
- int cy_int = ((int)y & (MAP_RESOLUTION-1)) - m_liquid_offX;
+ int cx_int = ((int)x & (MAP_RESOLUTION-1)) - _liquidOffY;
+ int cy_int = ((int)y & (MAP_RESOLUTION-1)) - _liquidOffX;
- if (cx_int < 0 || cx_int >=m_liquid_height)
+ if (cx_int < 0 || cx_int >=_liquidHeight)
return INVALID_HEIGHT;
- if (cy_int < 0 || cy_int >=m_liquid_width)
+ if (cy_int < 0 || cy_int >=_liquidWidth)
return INVALID_HEIGHT;
- return m_liquid_map[cx_int*m_liquid_width + cy_int];
+ return _liquidMap[cx_int*_liquidWidth + cy_int];
}
uint8 GridMap::getTerrainType(float x, float y)
{
- if (!m_liquid_type)
+ if (!_liquidData)
return 0;
x = 16 * (32 - x/SIZE_OF_GRIDS);
y = 16 * (32 - y/SIZE_OF_GRIDS);
int lx = (int)x & 15;
int ly = (int)y & 15;
- return m_liquid_type[lx*16 + ly];
+ return _liquidData[lx*16 + ly];
}
// Get water state on map
inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data)
{
// Check water type (if no water return)
- if (!m_liquid_type && !m_liquidType)
+ if (!_liquidType && !_liquidData)
return LIQUID_MAP_NO_WATER;
// Get cell
@@ -1479,7 +1484,7 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R
int y_int = (int)cy & (MAP_RESOLUTION-1);
// Check water type in cell
- uint8 type = m_liquid_type ? m_liquid_type[(x_int>>3)*16 + (y_int>>3)] : m_liquidType;
+ uint8 type = _liquidData ? _liquidData[(x_int>>3)*16 + (y_int>>3)] : _liquidType;
if (type == 0)
return LIQUID_MAP_NO_WATER;
@@ -1489,15 +1494,15 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R
// Check water level:
// Check water height map
- int lx_int = x_int - m_liquid_offY;
- int ly_int = y_int - m_liquid_offX;
- if (lx_int < 0 || lx_int >=m_liquid_height)
+ int lx_int = x_int - _liquidOffY;
+ int ly_int = y_int - _liquidOffX;
+ if (lx_int < 0 || lx_int >=_liquidHeight)
return LIQUID_MAP_NO_WATER;
- if (ly_int < 0 || ly_int >=m_liquid_width)
+ if (ly_int < 0 || ly_int >=_liquidWidth)
return LIQUID_MAP_NO_WATER;
// Get water level
- float liquid_level = m_liquid_map ? m_liquid_map[lx_int*m_liquid_width + ly_int] : m_liquidLevel;
+ float liquid_level = _liquidMap ? _liquidMap[lx_int*_liquidWidth + ly_int] : _liquidLevel;
// Get ground level (sub 0.2 for fix some errors)
float ground_level = getHeight(x, y);
@@ -1539,19 +1544,19 @@ inline GridMap* Map::GetGrid(float x, float y)
return GridMaps[gx][gy];
}
-float Map::GetWaterOrGroundLevel(float x, float y, float z, float* ground /*= NULL*/, bool swim /*= false*/) const
+float Map::GetWaterOrGroundLevel(float x, float y, float z, float* ground /*= NULL*/, bool /*swim = false*/) const
{
if (const_cast<Map*>(this)->GetGrid(x, y))
{
// we need ground level (including grid height version) for proper return water level in point
- float ground_z = GetHeight(x, y, z, true, 50.0f);
+ float ground_z = GetHeight(PHASEMASK_NORMAL, x, y, z, true, 50.0f);
if (ground)
*ground = ground_z;
LiquidData liquid_status;
ZLiquidStatus res = getLiquidStatus(x, y, ground_z, MAP_ALL_LIQUIDS, &liquid_status);
- return res ? ( swim ? liquid_status.level - 2.0f : liquid_status.level) : ground_z;
+ return res ? liquid_status.level : ground_z;
}
return VMAP_INVALID_HEIGHT_VALUE;
@@ -1793,6 +1798,31 @@ void Map::GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 area
zoneid = entry ? ((entry->zone != 0) ? entry->zone : entry->ID) : 0;
}
+bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const
+{
+ return VMAP::VMapFactory::createOrGetVMapManager()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2)
+ && _dynamicTree.isInLineOfSight(x1, y1, z1, x2, y2, z2, phasemask);
+}
+
+bool Map::getObjectHitPos(uint32 phasemask, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist)
+{
+ Vector3 startPos = Vector3(x1, y1, z1);
+ Vector3 dstPos = Vector3(x2, y2, z2);
+
+ Vector3 resultPos;
+ bool result = _dynamicTree.getObjectHitPos(phasemask, startPos, dstPos, resultPos, modifyDist);
+
+ rx = resultPos.x;
+ ry = resultPos.y;
+ rz = resultPos.z;
+ return result;
+}
+
+float Map::GetHeight(uint32 phasemask, float x, float y, float z, bool vmap/*=true*/, float maxSearchDist/*=DEFAULT_HEIGHT_SEARCH*/) const
+{
+ return std::max<float>(GetHeight(x, y, z, vmap, maxSearchDist), _dynamicTree.getHeight(x, y, z, maxSearchDist, phasemask));
+}
+
bool Map::IsInWater(float x, float y, float pZ, LiquidData* data) const
{
// Check surface in x, y point for liquid
@@ -2346,7 +2376,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
if (LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
- if (dungeon->map == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM)
+ if (uint32(dungeon->map) == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM)
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
}
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index f3b45bd8f37..d8db4c947a3 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -30,6 +30,8 @@
#include "SharedDefines.h"
#include "GridRefManager.h"
#include "MapRefManager.h"
+#include "DynamicTree.h"
+#include "GameObjectModel.h"
#include <bitset>
#include <list>
@@ -141,55 +143,58 @@ struct LiquidData
class GridMap
{
- uint32 m_flags;
- // Area data
- uint16 m_gridArea;
- uint16 *m_area_map;
- // Height level data
- float m_gridHeight;
- float m_gridIntHeightMultiplier;
+ uint32 _flags;
union{
- float *m_V9;
- uint16 *m_uint16_V9;
- uint8 *m_uint8_V9;
+ float* m_V9;
+ uint16* m_uint16_V9;
+ uint8* m_uint8_V9;
};
union{
- float *m_V8;
- uint16 *m_uint16_V8;
- uint8 *m_uint8_V8;
+ float* m_V8;
+ uint16* m_uint16_V8;
+ uint8* m_uint8_V8;
};
+ // Height level data
+ float _gridHeight;
+ float _gridIntHeightMultiplier;
+
+ // Area data
+ uint16* _areaMap;
+
// Liquid data
- uint16 m_liquidType;
- uint8 m_liquid_offX;
- uint8 m_liquid_offY;
- uint8 m_liquid_width;
- uint8 m_liquid_height;
- float m_liquidLevel;
- uint8 *m_liquid_type;
- float *m_liquid_map;
-
- bool loadAreaData(FILE* in, uint32 offset, uint32 size);
- bool loadHeihgtData(FILE* in, uint32 offset, uint32 size);
- bool loadLiquidData(FILE* in, uint32 offset, uint32 size);
+ float _liquidLevel;
+ uint8* _liquidData;
+ float* _liquidMap;
+ uint16 _gridArea;
+ uint16 _liquidType;
+ uint8 _liquidOffX;
+ uint8 _liquidOffY;
+ uint8 _liquidWidth;
+ uint8 _liquidHeight;
+
+
+ bool loadAreaData(FILE* in, uint32 offset, uint32 size);
+ bool loadHeihgtData(FILE* in, uint32 offset, uint32 size);
+ bool loadLiquidData(FILE* in, uint32 offset, uint32 size);
// Get height functions and pointers
- typedef float (GridMap::*pGetHeightPtr) (float x, float y) const;
- pGetHeightPtr m_gridGetHeight;
- float getHeightFromFloat(float x, float y) const;
- float getHeightFromUint16(float x, float y) const;
- float getHeightFromUint8(float x, float y) const;
- float getHeightFromFlat(float x, float y) const;
+ typedef float (GridMap::*GetHeightPtr) (float x, float y) const;
+ GetHeightPtr _gridGetHeight;
+ float getHeightFromFloat(float x, float y) const;
+ float getHeightFromUint16(float x, float y) const;
+ float getHeightFromUint8(float x, float y) const;
+ float getHeightFromFlat(float x, float y) const;
public:
GridMap();
~GridMap();
- bool loadData(char *filaname);
- void unloadData();
+ bool loadData(char* filaname);
+ void unloadData();
uint16 getArea(float x, float y);
- inline float getHeight(float x, float y) {return (this->*m_gridGetHeight)(x, y);}
- float getLiquidLevel(float x, float y);
- uint8 getTerrainType(float x, float y);
+ inline float getHeight(float x, float y) {return (this->*_gridGetHeight)(x, y);}
+ float getLiquidLevel(float x, float y);
+ uint8 getTerrainType(float x, float y);
ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0);
};
@@ -425,7 +430,13 @@ class Map : public GridRefManager<NGridType>
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; }
float GetWaterOrGroundLevel(float x, float y, float z, float* ground = NULL, bool swim = false) const;
-
+ float GetHeight(uint32 phasemask, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const;
+ bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const;
+ void Balance() { _dynamicTree.balance(); }
+ void Remove(const GameObjectModel& mdl) { _dynamicTree.remove(mdl); }
+ void Insert(const GameObjectModel& mdl) { _dynamicTree.insert(mdl); }
+ bool Contains(const GameObjectModel& mdl) const { return _dynamicTree.contains(mdl);}
+ bool getObjectHitPos(uint32 phasemask, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float &ry, float& rz, float modifyDist);
private:
void LoadMapAndVMap(int gx, int gy);
void LoadVMap(int gx, int gy);
@@ -481,6 +492,7 @@ class Map : public GridRefManager<NGridType>
uint32 i_InstanceId;
uint32 m_unloadTimer;
float m_VisibleDistance;
+ DynamicMapTree _dynamicTree;
MapRefManager m_mapRefManager;
MapRefManager::iterator m_mapRefIter;
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 323f31c9bb4..f1ebfb6ec96 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -100,6 +100,7 @@ enum Races
// Class value is index in ChrClasses.dbc
enum Classes
{
+ CLASS_NONE = 0,
CLASS_WARRIOR = 1,
CLASS_PALADIN = 2,
CLASS_HUNTER = 3,
@@ -1566,6 +1567,7 @@ enum GameObjectDestructibleState
GO_DESTRUCTIBLE_REBUILDING = 3,
};
+// EmotesText.dbc
enum TextEmotes
{
TEXT_EMOTE_AGREE = 1,
@@ -1729,7 +1731,7 @@ enum TextEmotes
TEXT_EMOTE_ATTACKMYTARGET = 307,
TEXT_EMOTE_OOM = 323,
TEXT_EMOTE_FOLLOW = 324,
- TEXT_EMOTE_HELP = 325,
+ TEXT_EMOTE_WAIT = 325,
TEXT_EMOTE_HEALME = 326,
TEXT_EMOTE_OPENFIRE = 327,
TEXT_EMOTE_FLIRT = 328,
@@ -1738,7 +1740,7 @@ enum TextEmotes
TEXT_EMOTE_WINK = 363,
TEXT_EMOTE_PAT = 364,
TEXT_EMOTE_SERIOUS = 365,
- TEXT_EMOTE_MOUNTSPECIAL = 366,
+ TEXT_EMOTE_MOUNT_SPECIAL = 366,
TEXT_EMOTE_GOODLUCK = 367,
TEXT_EMOTE_BLAME = 368,
TEXT_EMOTE_BLANK = 369,
@@ -1751,6 +1753,7 @@ enum TextEmotes
TEXT_EMOTE_ENEMY = 376,
TEXT_EMOTE_EYEBROW = 377,
TEXT_EMOTE_TOAST = 378,
+ TEXT_EMOTE_FAIL = 379,
TEXT_EMOTE_HIGHFIVE = 380,
TEXT_EMOTE_ABSENT = 381,
TEXT_EMOTE_ARM = 382,
@@ -1805,6 +1808,7 @@ enum TextEmotes
TEXT_EMOTE_SNEEZE = 436,
TEXT_EMOTE_SNORT = 437,
TEXT_EMOTE_SQUEAL = 438,
+ TEXT_EMOTE_STOPATTACK = 439,
TEXT_EMOTE_SUSPICIOUS = 440,
TEXT_EMOTE_THINK = 441,
TEXT_EMOTE_TRUCE = 442,
@@ -1820,402 +1824,695 @@ enum TextEmotes
TEXT_EMOTE_YW = 453,
};
+// Emotes.dbc
enum Emote
{
- EMOTE_ONESHOT_NONE = 0,
- EMOTE_ONESHOT_TALK = 1,
- EMOTE_ONESHOT_BOW = 2,
- EMOTE_ONESHOT_WAVE = 3,
- EMOTE_ONESHOT_CHEER = 4,
- EMOTE_ONESHOT_EXCLAMATION = 5,
- EMOTE_ONESHOT_QUESTION = 6,
- EMOTE_ONESHOT_EAT = 7,
- EMOTE_STATE_DANCE = 10,
- EMOTE_ONESHOT_LAUGH = 11,
- EMOTE_STATE_SLEEP = 12,
- EMOTE_STATE_SIT = 13,
- EMOTE_ONESHOT_RUDE = 14,
- EMOTE_ONESHOT_ROAR = 15,
- EMOTE_ONESHOT_KNEEL = 16,
- EMOTE_ONESHOT_KISS = 17,
- EMOTE_ONESHOT_CRY = 18,
- EMOTE_ONESHOT_CHICKEN = 19,
- EMOTE_ONESHOT_BEG = 20,
- EMOTE_ONESHOT_APPLAUD = 21,
- EMOTE_ONESHOT_SHOUT = 22,
- EMOTE_ONESHOT_FLEX = 23,
- EMOTE_ONESHOT_SHY = 24,
- EMOTE_ONESHOT_POINT = 25,
- EMOTE_STATE_STAND = 26,
- EMOTE_STATE_READYUNARMED = 27,
- EMOTE_STATE_WORK_SHEATHED = 28,
- EMOTE_STATE_POINT = 29,
- EMOTE_STATE_NONE = 30,
- EMOTE_ONESHOT_WOUND = 33,
- EMOTE_ONESHOT_WOUNDCRITICAL = 34,
- EMOTE_ONESHOT_ATTACKUNARMED = 35,
- EMOTE_ONESHOT_ATTACK1H = 36,
- EMOTE_ONESHOT_ATTACK2HTIGHT = 37,
- EMOTE_ONESHOT_ATTACK2HLOOSE = 38,
- EMOTE_ONESHOT_PARRYUNARMED = 39,
- EMOTE_ONESHOT_PARRYSHIELD = 43,
- EMOTE_ONESHOT_READYUNARMED = 44,
- EMOTE_ONESHOT_READY1H = 45,
- EMOTE_ONESHOT_READYBOW = 48,
- EMOTE_ONESHOT_SPELLPRECAST = 50,
- EMOTE_ONESHOT_SPELLCAST = 51,
- EMOTE_ONESHOT_BATTLEROAR = 53,
- EMOTE_ONESHOT_SPECIALATTACK1H = 54,
- EMOTE_ONESHOT_KICK = 60,
- EMOTE_ONESHOT_ATTACKTHROWN = 61,
- EMOTE_STATE_STUN = 64,
- EMOTE_STATE_DEAD = 65,
- EMOTE_ONESHOT_SALUTE = 66,
- EMOTE_STATE_KNEEL = 68,
- EMOTE_STATE_USESTANDING = 69,
- EMOTE_ONESHOT_WAVE_NOSHEATHE = 70,
- EMOTE_ONESHOT_CHEER_NOSHEATHE = 71,
- EMOTE_ONESHOT_EAT_NOSHEATHE = 92,
- EMOTE_STATE_STUN_NOSHEATHE = 93,
- EMOTE_ONESHOT_DANCE = 94,
- EMOTE_ONESHOT_SALUTE_NOSHEATH = 113,
- EMOTE_STATE_USESTANDING_NOSHEATHE = 133,
- EMOTE_ONESHOT_LAUGH_NOSHEATHE = 153,
- EMOTE_STATE_WORK = 173,
- EMOTE_STATE_SPELLPRECAST = 193,
- EMOTE_ONESHOT_READYRIFLE = 213,
- EMOTE_STATE_READYRIFLE = 214,
- EMOTE_STATE_WORK_MINING = 233,
- EMOTE_STATE_WORK_CHOPWOOD = 234,
- EMOTE_STATE_APPLAUD = 253,
- EMOTE_ONESHOT_LIFTOFF = 254,
- EMOTE_ONESHOT_YES = 273,
- EMOTE_ONESHOT_NO = 274,
- EMOTE_ONESHOT_TRAIN = 275,
- EMOTE_ONESHOT_LAND = 293,
- EMOTE_STATE_AT_EASE = 313,
- EMOTE_STATE_READY1H = 333,
- EMOTE_STATE_SPELLKNEELSTART = 353,
- EMOTE_STATE_SUBMERGED = 373,
- EMOTE_ONESHOT_SUBMERGE = 374,
- EMOTE_STATE_READY2H = 375,
- EMOTE_STATE_READYBOW = 376,
- EMOTE_ONESHOT_MOUNTSPECIAL = 377,
- EMOTE_STATE_TALK = 378,
- EMOTE_STATE_FISHING = 379,
- EMOTE_ONESHOT_FISHING = 380,
- EMOTE_ONESHOT_LOOT = 381,
- EMOTE_STATE_WHIRLWIND = 382,
- EMOTE_STATE_DROWNED = 383,
- EMOTE_STATE_HOLD_BOW = 384,
- EMOTE_STATE_HOLD_RIFLE = 385,
- EMOTE_STATE_HOLD_THROWN = 386,
- EMOTE_ONESHOT_DROWN = 387,
- EMOTE_ONESHOT_STOMP = 388,
- EMOTE_ONESHOT_ATTACKOFF = 389,
- EMOTE_ONESHOT_ATTACKOFFPIERCE = 390,
- EMOTE_STATE_ROAR = 391,
- EMOTE_STATE_LAUGH = 392,
- EMOTE_ONESHOT_CREATURE_SPECIAL = 393,
- EMOTE_ONESHOT_JUMPLANDRUN = 394,
- EMOTE_ONESHOT_JUMPEND = 395,
- EMOTE_ONESHOT_TALK_NOSHEATHE = 396,
- EMOTE_ONESHOT_POINT_NOSHEATHE = 397,
- EMOTE_STATE_CANNIBALIZE = 398,
- EMOTE_ONESHOT_JUMPSTART = 399,
- EMOTE_STATE_DANCESPECIAL = 400,
- EMOTE_ONESHOT_DANCESPECIAL = 401,
- EMOTE_ONESHOT_CUSTOMSPELL01 = 402,
- EMOTE_ONESHOT_CUSTOMSPELL02 = 403,
- EMOTE_ONESHOT_CUSTOMSPELL03 = 404,
- EMOTE_ONESHOT_CUSTOMSPELL04 = 405,
- EMOTE_ONESHOT_CUSTOMSPELL05 = 406,
- EMOTE_ONESHOT_CUSTOMSPELL06 = 407,
- EMOTE_ONESHOT_CUSTOMSPELL07 = 408,
- EMOTE_ONESHOT_CUSTOMSPELL08 = 409,
- EMOTE_ONESHOT_CUSTOMSPELL09 = 410,
- EMOTE_ONESHOT_CUSTOMSPELL10 = 411,
- EMOTE_STATE_EXCLAIM = 412,
- EMOTE_STATE_DANCE_CUSTOM = 413,
- EMOTE_STATE_SIT_CHAIR_MED = 415,
- EMOTE_STATE_CUSTOM_SPELL_01 = 416,
- EMOTE_STATE_CUSTOM_SPELL_02 = 417,
- EMOTE_STATE_EAT = 418,
- EMOTE_STATE_CUSTOM_SPELL_04 = 419,
- EMOTE_STATE_CUSTOM_SPELL_03 = 420,
- EMOTE_STATE_CUSTOM_SPELL_05 = 421,
- EMOTE_STATE_SPELLEFFECT_HOLD = 422,
- EMOTE_STATE_EAT_NO_SHEATHE = 423,
- EMOTE_STATE_MOUNT = 424,
- EMOTE_STATE_READY2HL = 425,
- EMOTE_STATE_SIT_CHAIR_HIGH = 426,
- EMOTE_STATE_FALL = 427,
- EMOTE_STATE_LOOT = 428,
- EMOTE_STATE_SUBMERGED_NEW = 429,
- EMOTE_ONESHOT_COWER = 430,
- EMOTE_STATE_COWER = 431,
- EMOTE_ONESHOT_USESTANDING = 432,
- EMOTE_STATE_STEALTH_STAND = 433,
- EMOTE_ONESHOT_OMNICAST_GHOUL = 434,
- EMOTE_ONESHOT_ATTACKBOW = 435,
- EMOTE_ONESHOT_ATTACKRIFLE = 436,
- EMOTE_STATE_SWIM_IDLE = 437,
- EMOTE_STATE_ATTACK_UNARMED = 438,
- EMOTE_ONESHOT_SPELLCAST_W_SOUND = 439,
- EMOTE_ONESHOT_DODGE = 440,
- EMOTE_ONESHOT_PARRY1H = 441,
- EMOTE_ONESHOT_PARRY2H = 442,
- EMOTE_ONESHOT_PARRY2HL = 443,
- EMOTE_STATE_FLYFALL = 444,
- EMOTE_ONESHOT_FLYDEATH = 445,
- EMOTE_STATE_FLY_FALL = 446,
- EMOTE_ONESHOT_FLY_SIT_GROUND_DOWN = 447,
- EMOTE_ONESHOT_FLY_SIT_GROUND_UP = 448,
- EMOTE_ONESHOT_EMERGE = 449,
- EMOTE_ONESHOT_DRAGONSPIT = 450,
- EMOTE_STATE_SPECIALUNARMED = 451,
- EMOTE_ONESHOT_FLYGRAB = 452,
- EMOTE_STATE_FLYGRABCLOSED = 453,
- EMOTE_ONESHOT_FLYGRABTHROWN = 454,
- EMOTE_STATE_FLY_SIT_GROUND = 455,
- EMOTE_STATE_WALKBACKWARDS = 456,
- EMOTE_ONESHOT_FLYTALK = 457,
- EMOTE_ONESHOT_FLYATTACK1H = 458,
- EMOTE_STATE_CUSTOMSPELL08 = 459,
- EMOTE_ONESHOT_FLY_DRAGONSPIT = 460,
- EMOTE_STATE_SIT_CHAIR_LOW = 461,
- EMOTE_ONE_SHOT_STUN = 462,
- EMOTE_ONESHOT_SPELLCAST_OMNI = 463,
- EMOTE_STATE_READYTHROWN = 464
-};
-
+ EMOTE_ONESHOT_NONE = 0,
+ EMOTE_ONESHOT_TALK = 1,
+ EMOTE_ONESHOT_BOW = 2,
+ EMOTE_ONESHOT_WAVE = 3,
+ EMOTE_ONESHOT_CHEER = 4,
+ EMOTE_ONESHOT_EXCLAMATION = 5,
+ EMOTE_ONESHOT_QUESTION = 6,
+ EMOTE_ONESHOT_EAT = 7,
+ EMOTE_STATE_DANCE = 10,
+ EMOTE_ONESHOT_LAUGH = 11,
+ EMOTE_STATE_SLEEP = 12,
+ EMOTE_STATE_SIT = 13,
+ EMOTE_ONESHOT_RUDE = 14,
+ EMOTE_ONESHOT_ROAR = 15,
+ EMOTE_ONESHOT_KNEEL = 16,
+ EMOTE_ONESHOT_KISS = 17,
+ EMOTE_ONESHOT_CRY = 18,
+ EMOTE_ONESHOT_CHICKEN = 19,
+ EMOTE_ONESHOT_BEG = 20,
+ EMOTE_ONESHOT_APPLAUD = 21,
+ EMOTE_ONESHOT_SHOUT = 22,
+ EMOTE_ONESHOT_FLEX = 23,
+ EMOTE_ONESHOT_SHY = 24,
+ EMOTE_ONESHOT_POINT = 25,
+ EMOTE_STATE_STAND = 26,
+ EMOTE_STATE_READY_UNARMED = 27,
+ EMOTE_STATE_WORK_SHEATHED = 28,
+ EMOTE_STATE_POINT = 29,
+ EMOTE_STATE_NONE = 30,
+ EMOTE_ONESHOT_WOUND = 33,
+ EMOTE_ONESHOT_WOUND_CRITICAL = 34,
+ EMOTE_ONESHOT_ATTACK_UNARMED = 35,
+ EMOTE_ONESHOT_ATTACK1H = 36,
+ EMOTE_ONESHOT_ATTACK2HTIGHT = 37,
+ EMOTE_ONESHOT_ATTACK2H_LOOSE = 38,
+ EMOTE_ONESHOT_PARRY_UNARMED = 39,
+ EMOTE_ONESHOT_PARRY_SHIELD = 43,
+ EMOTE_ONESHOT_READY_UNARMED = 44,
+ EMOTE_ONESHOT_READY1H = 45,
+ EMOTE_ONESHOT_READY_BOW = 48,
+ EMOTE_ONESHOT_SPELL_PRECAST = 50,
+ EMOTE_ONESHOT_SPELL_CAST = 51,
+ EMOTE_ONESHOT_BATTLE_ROAR = 53,
+ EMOTE_ONESHOT_SPECIALATTACK1H = 54,
+ EMOTE_ONESHOT_KICK = 60,
+ EMOTE_ONESHOT_ATTACK_THROWN = 61,
+ EMOTE_STATE_STUN = 64,
+ EMOTE_STATE_DEAD = 65,
+ EMOTE_ONESHOT_SALUTE = 66,
+ EMOTE_STATE_KNEEL = 68,
+ EMOTE_STATE_USE_STANDING = 69,
+ EMOTE_ONESHOT_WAVE_NO_SHEATHE = 70,
+ EMOTE_ONESHOT_CHEER_NO_SHEATHE = 71,
+ EMOTE_ONESHOT_EAT_NO_SHEATHE = 92,
+ EMOTE_STATE_STUN_NO_SHEATHE = 93,
+ EMOTE_ONESHOT_DANCE = 94,
+ EMOTE_ONESHOT_SALUTE_NO_SHEATH = 113,
+ EMOTE_STATE_USE_STANDING_NO_SHEATHE = 133,
+ EMOTE_ONESHOT_LAUGH_NO_SHEATHE = 153,
+ EMOTE_STATE_WORK = 173,
+ EMOTE_STATE_SPELL_PRECAST = 193,
+ EMOTE_ONESHOT_READY_RIFLE = 213,
+ EMOTE_STATE_READY_RIFLE = 214,
+ EMOTE_STATE_WORK_MINING = 233,
+ EMOTE_STATE_WORK_CHOPWOOD = 234,
+ EMOTE_STATE_APPLAUD = 253,
+ EMOTE_ONESHOT_LIFTOFF = 254,
+ EMOTE_ONESHOT_YES = 273,
+ EMOTE_ONESHOT_NO = 274,
+ EMOTE_ONESHOT_TRAIN = 275,
+ EMOTE_ONESHOT_LAND = 293,
+ EMOTE_STATE_AT_EASE = 313,
+ EMOTE_STATE_READY1H = 333,
+ EMOTE_STATE_SPELL_KNEEL_START = 353,
+ EMOTE_STATE_SUBMERGED = 373,
+ EMOTE_ONESHOT_SUBMERGE = 374,
+ EMOTE_STATE_READY2H = 375,
+ EMOTE_STATE_READY_BOW = 376,
+ EMOTE_ONESHOT_MOUNT_SPECIAL = 377,
+ EMOTE_STATE_TALK = 378,
+ EMOTE_STATE_FISHING = 379,
+ EMOTE_ONESHOT_FISHING = 380,
+ EMOTE_ONESHOT_LOOT = 381,
+ EMOTE_STATE_WHIRLWIND = 382,
+ EMOTE_STATE_DROWNED = 383,
+ EMOTE_STATE_HOLD_BOW = 384,
+ EMOTE_STATE_HOLD_RIFLE = 385,
+ EMOTE_STATE_HOLD_THROWN = 386,
+ EMOTE_ONESHOT_DROWN = 387,
+ EMOTE_ONESHOT_STOMP = 388,
+ EMOTE_ONESHOT_ATTACK_OFF = 389,
+ EMOTE_ONESHOT_ATTACK_OFF_PIERCE = 390,
+ EMOTE_STATE_ROAR = 391,
+ EMOTE_STATE_LAUGH = 392,
+ EMOTE_ONESHOT_CREATURE_SPECIAL = 393,
+ EMOTE_ONESHOT_JUMPLANDRUN = 394,
+ EMOTE_ONESHOT_JUMPEND = 395,
+ EMOTE_ONESHOT_TALK_NO_SHEATHE = 396,
+ EMOTE_ONESHOT_POINT_NO_SHEATHE = 397,
+ EMOTE_STATE_CANNIBALIZE = 398,
+ EMOTE_ONESHOT_JUMPSTART = 399,
+ EMOTE_STATE_DANCESPECIAL = 400,
+ EMOTE_ONESHOT_DANCESPECIAL = 401,
+ EMOTE_ONESHOT_CUSTOM_SPELL_01 = 402,
+ EMOTE_ONESHOT_CUSTOM_SPELL_02 = 403,
+ EMOTE_ONESHOT_CUSTOM_SPELL_03 = 404,
+ EMOTE_ONESHOT_CUSTOM_SPELL_04 = 405,
+ EMOTE_ONESHOT_CUSTOM_SPELL_05 = 406,
+ EMOTE_ONESHOT_CUSTOM_SPELL_06 = 407,
+ EMOTE_ONESHOT_CUSTOM_SPELL_07 = 408,
+ EMOTE_ONESHOT_CUSTOM_SPELL_08 = 409,
+ EMOTE_ONESHOT_CUSTOM_SPELL_09 = 410,
+ EMOTE_ONESHOT_CUSTOM_SPELL_10 = 411,
+ EMOTE_STATE_EXCLAIM = 412,
+ EMOTE_STATE_DANCE_CUSTOM = 413,
+ EMOTE_STATE_SIT_CHAIR_MED = 415,
+ EMOTE_STATE_CUSTOM_SPELL_01 = 416,
+ EMOTE_STATE_CUSTOM_SPELL_02 = 417,
+ EMOTE_STATE_EAT = 418,
+ EMOTE_STATE_CUSTOM_SPELL_04 = 419,
+ EMOTE_STATE_CUSTOM_SPELL_03 = 420,
+ EMOTE_STATE_CUSTOM_SPELL_05 = 421,
+ EMOTE_STATE_SPELLEFFECT_HOLD = 422,
+ EMOTE_STATE_EAT_NO_SHEATHE = 423,
+ EMOTE_STATE_MOUNT = 424,
+ EMOTE_STATE_READY2HL = 425,
+ EMOTE_STATE_SIT_CHAIR_HIGH = 426,
+ EMOTE_STATE_FALL = 427,
+ EMOTE_STATE_LOOT = 428,
+ EMOTE_STATE_SUBMERGED_NEW = 429,
+ EMOTE_ONESHOT_COWER = 430,
+ EMOTE_STATE_COWER = 431,
+ EMOTE_ONESHOT_USE_STANDING = 432,
+ EMOTE_STATE_STEALTH_STAND = 433,
+ EMOTE_ONESHOT_OMNICAST_GHOUL = 434,
+ EMOTE_ONESHOT_ATTACK_BOW = 435,
+ EMOTE_ONESHOT_ATTACK_RIFLE = 436,
+ EMOTE_STATE_SWIM_IDLE = 437,
+ EMOTE_STATE_ATTACK_UNARMED = 438,
+ EMOTE_ONESHOT_SPELL_CAST_W_SOUND = 439,
+ EMOTE_ONESHOT_DODGE = 440,
+ EMOTE_ONESHOT_PARRY1H = 441,
+ EMOTE_ONESHOT_PARRY2H = 442,
+ EMOTE_ONESHOT_PARRY2HL = 443,
+ EMOTE_STATE_FLYFALL = 444,
+ EMOTE_ONESHOT_FLYDEATH = 445,
+ EMOTE_STATE_FLY_FALL = 446,
+ EMOTE_ONESHOT_FLY_SIT_GROUND_DOWN = 447,
+ EMOTE_ONESHOT_FLY_SIT_GROUND_UP = 448,
+ EMOTE_ONESHOT_EMERGE = 449,
+ EMOTE_ONESHOT_DRAGON_SPIT = 450,
+ EMOTE_STATE_SPECIAL_UNARMED = 451,
+ EMOTE_ONESHOT_FLYGRAB = 452,
+ EMOTE_STATE_FLYGRABCLOSED = 453,
+ EMOTE_ONESHOT_FLYGRABTHROWN = 454,
+ EMOTE_STATE_FLY_SIT_GROUND = 455,
+ EMOTE_STATE_WALK_BACKWARDS = 456,
+ EMOTE_ONESHOT_FLYTALK = 457,
+ EMOTE_ONESHOT_FLYATTACK1H = 458,
+ EMOTE_STATE_CUSTOM_SPELL_08 = 459,
+ EMOTE_ONESHOT_FLY_DRAGON_SPIT = 460,
+ EMOTE_STATE_SIT_CHAIR_LOW = 461,
+ EMOTE_ONESHOT_STUN = 462,
+ EMOTE_ONESHOT_SPELL_CAST_OMNI = 463,
+ EMOTE_STATE_READY_THROWN = 465,
+ EMOTE_ONESHOT_WORK_CHOPWOOD = 466,
+ EMOTE_ONESHOT_WORK_MINING = 467,
+ EMOTE_STATE_SPELL_CHANNEL_OMNI = 468,
+ EMOTE_STATE_SPELL_CHANNEL_DIRECTED = 469,
+ EMOTE_STAND_STATE_NONE = 470,
+ EMOTE_STATE_READYJOUST = 471,
+ EMOTE_STATE_STRANGULATE = 473,
+ EMOTE_STATE_READY_SPELL_OMNI = 474,
+ EMOTE_STATE_HOLD_JOUST = 475,
+ EMOTE_ONESHOT_CRY_JAINA = 476
+};
+
+// AnimationData.dbc
enum Anim
{
- ANIM_STAND = 0x0,
- ANIM_DEATH = 0x1,
- ANIM_SPELL = 0x2,
- ANIM_STOP = 0x3,
- ANIM_WALK = 0x4,
- ANIM_RUN = 0x5,
- ANIM_DEAD = 0x6,
- ANIM_RISE = 0x7,
- ANIM_STANDWOUND = 0x8,
- ANIM_COMBATWOUND = 0x9,
- ANIM_COMBATCRITICAL = 0xA,
- ANIM_SHUFFLE_LEFT = 0xB,
- ANIM_SHUFFLE_RIGHT = 0xC,
- ANIM_WALK_BACKWARDS = 0xD,
- ANIM_STUN = 0xE,
- ANIM_HANDS_CLOSED = 0xF,
- ANIM_ATTACKUNARMED = 0x10,
- ANIM_ATTACK1H = 0x11,
- ANIM_ATTACK2HTIGHT = 0x12,
- ANIM_ATTACK2HLOOSE = 0x13,
- ANIM_PARRYUNARMED = 0x14,
- ANIM_PARRY1H = 0x15,
- ANIM_PARRY2HTIGHT = 0x16,
- ANIM_PARRY2HLOOSE = 0x17,
- ANIM_PARRYSHIELD = 0x18,
- ANIM_READYUNARMED = 0x19,
- ANIM_READY1H = 0x1A,
- ANIM_READY2HTIGHT = 0x1B,
- ANIM_READY2HLOOSE = 0x1C,
- ANIM_READYBOW = 0x1D,
- ANIM_DODGE = 0x1E,
- ANIM_SPELLPRECAST = 0x1F,
- ANIM_SPELLCAST = 0x20,
- ANIM_SPELLCASTAREA = 0x21,
- ANIM_NPCWELCOME = 0x22,
- ANIM_NPCGOODBYE = 0x23,
- ANIM_BLOCK = 0x24,
- ANIM_JUMPSTART = 0x25,
- ANIM_JUMP = 0x26,
- ANIM_JUMPEND = 0x27,
- ANIM_FALL = 0x28,
- ANIM_SWIMIDLE = 0x29,
- ANIM_SWIM = 0x2A,
- ANIM_SWIM_LEFT = 0x2B,
- ANIM_SWIM_RIGHT = 0x2C,
- ANIM_SWIM_BACKWARDS = 0x2D,
- ANIM_ATTACKBOW = 0x2E,
- ANIM_FIREBOW = 0x2F,
- ANIM_READYRIFLE = 0x30,
- ANIM_ATTACKRIFLE = 0x31,
- ANIM_LOOT = 0x32,
- ANIM_SPELL_PRECAST_DIRECTED = 0x33,
- ANIM_SPELL_PRECAST_OMNI = 0x34,
- ANIM_SPELL_CAST_DIRECTED = 0x35,
- ANIM_SPELL_CAST_OMNI = 0x36,
- ANIM_SPELL_BATTLEROAR = 0x37,
- ANIM_SPELL_READYABILITY = 0x38,
- ANIM_SPELL_SPECIAL1H = 0x39,
- ANIM_SPELL_SPECIAL2H = 0x3A,
- ANIM_SPELL_SHIELDBASH = 0x3B,
- ANIM_EMOTE_TALK = 0x3C,
- ANIM_EMOTE_EAT = 0x3D,
- ANIM_EMOTE_WORK = 0x3E,
- ANIM_EMOTE_USE_STANDING = 0x3F,
- ANIM_EMOTE_EXCLAMATION = 0x40,
- ANIM_EMOTE_QUESTION = 0x41,
- ANIM_EMOTE_BOW = 0x42,
- ANIM_EMOTE_WAVE = 0x43,
- ANIM_EMOTE_CHEER = 0x44,
- ANIM_EMOTE_DANCE = 0x45,
- ANIM_EMOTE_LAUGH = 0x46,
- ANIM_EMOTE_SLEEP = 0x47,
- ANIM_EMOTE_SIT_GROUND = 0x48,
- ANIM_EMOTE_RUDE = 0x49,
- ANIM_EMOTE_ROAR = 0x4A,
- ANIM_EMOTE_KNEEL = 0x4B,
- ANIM_EMOTE_KISS = 0x4C,
- ANIM_EMOTE_CRY = 0x4D,
- ANIM_EMOTE_CHICKEN = 0x4E,
- ANIM_EMOTE_BEG = 0x4F,
- ANIM_EMOTE_APPLAUD = 0x50,
- ANIM_EMOTE_SHOUT = 0x51,
- ANIM_EMOTE_FLEX = 0x52,
- ANIM_EMOTE_SHY = 0x53,
- ANIM_EMOTE_POINT = 0x54,
- ANIM_ATTACK1HPIERCE = 0x55,
- ANIM_ATTACK2HLOOSEPIERCE = 0x56,
- ANIM_ATTACKOFF = 0x57,
- ANIM_ATTACKOFFPIERCE = 0x58,
- ANIM_SHEATHE = 0x59,
- ANIM_HIPSHEATHE = 0x5A,
- ANIM_MOUNT = 0x5B,
- ANIM_RUN_LEANRIGHT = 0x5C,
- ANIM_RUN_LEANLEFT = 0x5D,
- ANIM_MOUNT_SPECIAL = 0x5E,
- ANIM_KICK = 0x5F,
- ANIM_SITDOWN = 0x60,
- ANIM_SITTING = 0x61,
- ANIM_SITUP = 0x62,
- ANIM_SLEEPDOWN = 0x63,
- ANIM_SLEEPING = 0x64,
- ANIM_SLEEPUP = 0x65,
- ANIM_SITCHAIRLOW = 0x66,
- ANIM_SITCHAIRMEDIUM = 0x67,
- ANIM_SITCHAIRHIGH = 0x68,
- ANIM_LOADBOW = 0x69,
- ANIM_LOADRIFLE = 0x6A,
- ANIM_ATTACKTHROWN = 0x6B,
- ANIM_READYTHROWN = 0x6C,
- ANIM_HOLDBOW = 0x6D,
- ANIM_HOLDRIFLE = 0x6E,
- ANIM_HOLDTHROWN = 0x6F,
- ANIM_LOADTHROWN = 0x70,
- ANIM_EMOTE_SALUTE = 0x71,
- ANIM_KNEELDOWN = 0x72,
- ANIM_KNEELING = 0x73,
- ANIM_KNEELUP = 0x74,
- ANIM_ATTACKUNARMEDOFF = 0x75,
- ANIM_SPECIALUNARMED = 0x76,
- ANIM_STEALTHWALK = 0x77,
- ANIM_STEALTHSTAND = 0x78,
- ANIM_KNOCKDOWN = 0x79,
- ANIM_EATING = 0x7A,
- ANIM_USESTANDINGLOOP = 0x7B,
- ANIM_CHANNELCASTDIRECTED = 0x7C,
- ANIM_CHANNELCASTOMNI = 0x7D,
- ANIM_WHIRLWIND = 0x7E,
- ANIM_BIRTH = 0x7F,
- ANIM_USESTANDINGSTART = 0x80,
- ANIM_USESTANDINGEND = 0x81,
- ANIM_HOWL = 0x82,
- ANIM_DROWN = 0x83,
- ANIM_DROWNED = 0x84,
- ANIM_FISHINGCAST = 0x85,
- ANIM_FISHINGLOOP = 0x86,
- ANIM_FLY = 0x87,
- ANIM_EMOTE_WORK_NO_SHEATHE = 0x88,
- ANIM_EMOTE_STUN_NO_SHEATHE = 0x89,
- ANIM_EMOTE_USE_STANDING_NO_SHEATHE= 0x8A,
- ANIM_SPELL_SLEEP_DOWN = 0x8B,
- ANIM_SPELL_KNEEL_START = 0x8C,
- ANIM_SPELL_KNEEL_LOOP = 0x8D,
- ANIM_SPELL_KNEEL_END = 0x8E,
- ANIM_SPRINT = 0x8F,
- ANIM_IN_FIGHT = 0x90,
-
- ANIM_GAMEOBJ_SPAWN = 145,
- ANIM_GAMEOBJ_CLOSE = 146,
- ANIM_GAMEOBJ_CLOSED = 147,
- ANIM_GAMEOBJ_OPEN = 148,
- ANIM_GAMEOBJ_OPENED = 149,
- ANIM_GAMEOBJ_DESTROY = 150,
- ANIM_GAMEOBJ_DESTROYED = 151,
- ANIM_GAMEOBJ_REBUILD = 152,
- ANIM_GAMEOBJ_CUSTOM0 = 153,
- ANIM_GAMEOBJ_CUSTOM1 = 154,
- ANIM_GAMEOBJ_CUSTOM2 = 155,
- ANIM_GAMEOBJ_CUSTOM3 = 156,
- ANIM_GAMEOBJ_DESPAWN = 157,
- ANIM_HOLD = 158,
- ANIM_DECAY = 159,
- ANIM_BOWPULL = 160,
- ANIM_BOWRELEASE = 161,
- ANIM_SHIPSTART = 162,
- ANIM_SHIPMOVEING = 163,
- ANIM_SHIPSTOP = 164,
- ANIM_GROUPARROW = 165,
- ANIM_ARROW = 166,
- ANIM_CORPSEARROW = 167,
- ANIM_GUIDEARROW = 168,
- ANIM_SWAY = 169,
- ANIM_DRUIDCATPOUNCE = 170,
- ANIM_DRUIDCATRIP = 171,
- ANIM_DRUIDCATRAKE = 172,
- ANIM_DRUIDCATRAVAGE = 173,
- ANIM_DRUIDCATCLAW = 174,
- ANIM_DRUIDCATCOWER = 175,
- ANIM_DRUIDBEARSWIPE = 176,
- ANIM_DRUIDBEARBITE = 177,
- ANIM_DRUIDBEARMAUL = 178,
- ANIM_DRUIDBEARBASH = 179,
- ANIM_DRAGONTAIL = 180,
- ANIM_DRAGONSTOMP = 181,
- ANIM_DRAGONSPIT = 182,
- ANIM_DRAGONSPITHOVER = 183,
- ANIM_DRAGONSPITFLY = 184,
- ANIM_EMOTEYES = 185,
- ANIM_EMOTENO = 186,
- ANIM_JUMPLANDRUN = 187,
- ANIM_LOOTHOLD = 188,
- ANIM_LOOTUP = 189,
- ANIM_STANDHIGH = 190,
- ANIM_IMPACT = 191,
- ANIM_LIFTOFF = 192,
- ANIM_HOVER = 193,
- ANIM_SUCCUBUSENTICE = 194,
- ANIM_EMOTETRAIN = 195,
- ANIM_EMOTEDEAD = 196,
- ANIM_EMOTEDANCEONCE = 197,
- ANIM_DEFLECT = 198,
- ANIM_EMOTEEATNOSHEATHE = 199,
- ANIM_LAND = 200,
- ANIM_SUBMERGE = 201,
- ANIM_SUBMERGED = 202,
- ANIM_CANNIBALIZE = 203,
- ANIM_ARROWBIRTH = 204,
- ANIM_GROURARROWBIRTH = 205,
- ANIM_CORPSEARROWBIRTH = 206,
- ANIM_GUIDEARROWBIRTH = 207,
- ANIM_EMOTETALKNOSHEATHE = 208,
- ANIM_EMOTEPOINTNOSHEATHE = 209,
- ANIM_EMOTESALUTENOSHEATHE = 210,
- ANIM_EMOTEDANCESPECIAL = 211,
- ANIM_MUTILATE = 212,
- ANIM_CUSTOMSPELL01 = 213,
- ANIM_CUSTOMSPELL02 = 214,
- ANIM_CUSTOMSPELL03 = 215,
- ANIM_CUSTOMSPELL04 = 216,
- ANIM_CUSTOMSPELL05 = 217,
- ANIM_CUSTOMSPELL06 = 218,
- ANIM_CUSTOMSPELL07 = 219,
- ANIM_CUSTOMSPELL08 = 220,
- ANIM_CUSTOMSPELL09 = 221,
- ANIM_CUSTOMSPELL10 = 222,
- ANIM_StealthRun = 223
+ ANIM_STAND = 0,
+ ANIM_DEATH = 1,
+ ANIM_SPELL = 2,
+ ANIM_STOP = 3,
+ ANIM_WALK = 4,
+ ANIM_RUN = 5,
+ ANIM_DEAD = 6,
+ ANIM_RISE = 7,
+ ANIM_STAND_WOUND = 8,
+ ANIM_COMBAT_WOUND = 9,
+ ANIM_COMBAT_CRITICAL = 10,
+ ANIM_SHUFFLE_LEFT = 11,
+ ANIM_SHUFFLE_RIGHT = 12,
+ ANIM_WALK_BACKWARDS = 13,
+ ANIM_STUN = 14,
+ ANIM_HANDS_CLOSED = 15,
+ ANIM_ATTACK_UNARMED = 16,
+ ANIM_ATTACK1H = 17,
+ ANIM_ATTACK2H = 18,
+ ANIM_ATTACK2HL = 19,
+ ANIM_PARRY_UNARMED = 20,
+ ANIM_PARRY1H = 21,
+ ANIM_PARRY2H = 22,
+ ANIM_PARRY2HL = 23,
+ ANIM_SHIELD_BLOCK = 24,
+ ANIM_READY_UNARMED = 25,
+ ANIM_READY1H = 26,
+ ANIM_READY2H = 27,
+ ANIM_READY2HL = 28,
+ ANIM_READY_BOW = 29,
+ ANIM_DODGE = 30,
+ ANIM_SPELL_PRECAST = 31,
+ ANIM_SPELL_CAST = 32,
+ ANIM_SPELL_CAST_AREA = 33,
+ ANIM_NPC_WELCOME = 34,
+ ANIM_NPC_GOODBYE = 35,
+ ANIM_BLOCK = 36,
+ ANIM_JUMP_START = 37,
+ ANIM_JUMP = 38,
+ ANIM_JUMP_END = 39,
+ ANIM_FALL = 40,
+ ANIM_SWIM_IDLE = 41,
+ ANIM_SWIM = 42,
+ ANIM_SWIM_LEFT = 43,
+ ANIM_SWIM_RIGHT = 44,
+ ANIM_SWIM_BACKWARDS = 45,
+ ANIM_ATTACK_BOW = 46,
+ ANIM_FIRE_BOW = 47,
+ ANIM_READY_RIFLE = 48,
+ ANIM_ATTACK_RIFLE = 49,
+ ANIM_LOOT = 50,
+ ANIM_READY_SPELL_DIRECTED = 51,
+ ANIM_READY_SPELL_OMNI = 52,
+ ANIM_SPELL_CAST_DIRECTED = 53,
+ ANIM_SPELL_CAST_OMNI = 54,
+ ANIM_BATTLE_ROAR = 55,
+ ANIM_READY_ABILITY = 56,
+ ANIM_SPECIAL1H = 57,
+ ANIM_SPECIAL2H = 58,
+ ANIM_SHIELD_BASH = 59,
+ ANIM_EMOTE_TALK = 60,
+ ANIM_EMOTE_EAT = 61,
+ ANIM_EMOTE_WORK = 62,
+ ANIM_EMOTE_USE_STANDING = 63,
+ ANIM_EMOTE_TALK_EXCLAMATION = 64,
+ ANIM_EMOTE_TALK_QUESTION = 65,
+ ANIM_EMOTE_BOW = 66,
+ ANIM_EMOTE_WAVE = 67,
+ ANIM_EMOTE_CHEER = 68,
+ ANIM_EMOTE_DANCE = 69,
+ ANIM_EMOTE_LAUGH = 70,
+ ANIM_EMOTE_SLEEP = 71,
+ ANIM_EMOTE_SIT_GROUND = 72,
+ ANIM_EMOTE_RUDE = 73,
+ ANIM_EMOTE_ROAR = 74,
+ ANIM_EMOTE_KNEEL = 75,
+ ANIM_EMOTE_KISS = 76,
+ ANIM_EMOTE_CRY = 77,
+ ANIM_EMOTE_CHICKEN = 78,
+ ANIM_EMOTE_BEG = 79,
+ ANIM_EMOTE_APPLAUD = 80,
+ ANIM_EMOTE_SHOUT = 81,
+ ANIM_EMOTE_FLEX = 82,
+ ANIM_EMOTE_SHY = 83,
+ ANIM_EMOTE_POINT = 84,
+ ANIM_ATTACK1H_PIERCE = 85,
+ ANIM_ATTACK2H_LOOSE_PIERCE = 86,
+ ANIM_ATTACK_OFF = 87,
+ ANIM_ATTACK_OFF_PIERCE = 88,
+ ANIM_SHEATHE = 89,
+ ANIM_HIP_SHEATHE = 90,
+ ANIM_MOUNT = 91,
+ ANIM_RUN_RIGHT = 92,
+ ANIM_RUN_LEFT = 93,
+ ANIM_MOUNT_SPECIAL = 94,
+ ANIM_KICK = 95,
+ ANIM_SIT_GROUND_DOWN = 96,
+ ANIM_SIT_GROUND = 97,
+ ANIM_SIT_GROUND_UP = 98,
+ ANIM_SLEEP_DOWN = 99,
+ ANIM_SLEEP = 100,
+ ANIM_SLEEP_UP = 101,
+ ANIM_SIT_CHAIR_LOW = 102,
+ ANIM_SIT_CHAIR_MED = 103,
+ ANIM_SIT_CHAIR_HIGH = 104,
+ ANIM_LOAD_BOW = 105,
+ ANIM_LOAD_RIFLE = 106,
+ ANIM_ATTACK_THROWN = 107,
+ ANIM_READY_THROWN = 108,
+ ANIM_HOLD_BOW = 109,
+ ANIM_HOLD_RIFLE = 110,
+ ANIM_HOLD_THROWN = 111,
+ ANIM_LOAD_THROWN = 112,
+ ANIM_EMOTE_SALUTE = 113,
+ ANIM_KNEEL_START = 114,
+ ANIM_KNEEL_LOOP = 115,
+ ANIM_KNEEL_END = 116,
+ ANIM_ATTACK_UNARMED_OFF = 117,
+ ANIM_SPECIAL_UNARMED = 118,
+ ANIM_STEALTH_WALK = 119,
+ ANIM_STEALTH_STAND = 120,
+ ANIM_KNOCKDOWN = 121,
+ ANIM_EATING_LOOP = 122,
+ ANIM_USE_STANDING_LOOP = 123,
+ ANIM_CHANNEL_CAST_DIRECTED = 124,
+ ANIM_CHANNEL_CAST_OMNI = 125,
+ ANIM_WHIRLWIND = 126,
+ ANIM_BIRTH = 127,
+ ANIM_USE_STANDING_START = 128,
+ ANIM_USE_STANDING_END = 129,
+ ANIM_CREATURE_SPECIAL = 130,
+ ANIM_DROWN = 131,
+ ANIM_DROWNED = 132,
+ ANIM_FISHING_CAST = 133,
+ ANIM_FISHING_LOOP = 134,
+ ANIM_FLY = 135,
+ ANIM_EMOTE_WORK_NO_SHEATHE = 136,
+ ANIM_EMOTE_STUN_NO_SHEATHE = 137,
+ ANIM_EMOTE_USE_STANDING_NO_SHEATHE = 138,
+ ANIM_SPELL_SLEEP_DOWN = 139,
+ ANIM_SPELL_KNEEL_START = 140,
+ ANIM_SPELL_KNEEL_LOOP = 141,
+ ANIM_SPELL_KNEEL_END = 142,
+ ANIM_SPRINT = 143,
+ ANIM_IN_FIGHT = 144,
+ ANIM_SPAWN = 145,
+ ANIM_CLOSE = 146,
+ ANIM_CLOSED = 147,
+ ANIM_OPEN = 148,
+ ANIM_OPENED = 149,
+ ANIM_DESTROY = 150,
+ ANIM_DESTROYED = 151,
+ ANIM_REBUILD = 152,
+ ANIM_CUSTOM_0 = 153,
+ ANIM_CUSTOM_1 = 154,
+ ANIM_CUSTOM_2 = 155,
+ ANIM_CUSTOM_3 = 156,
+ ANIM_DESPAWN = 157,
+ ANIM_HOLD = 158,
+ ANIM_DECAY = 159,
+ ANIM_BOW_PULL = 160,
+ ANIM_BOW_RELEASE = 161,
+ ANIM_SHIP_START = 162,
+ ANIM_SHIP_MOVING = 163,
+ ANIM_SHIP_STOP = 164,
+ ANIM_GROUP_ARROW = 165,
+ ANIM_ARROW = 166,
+ ANIM_CORPSE_ARROW = 167,
+ ANIM_GUIDE_ARROW = 168,
+ ANIM_SWAY = 169,
+ ANIM_DRUID_CAT_POUNCE = 170,
+ ANIM_DRUID_CAT_RIP = 171,
+ ANIM_DRUID_CAT_RAKE = 172,
+ ANIM_DRUID_CAT_RAVAGE = 173,
+ ANIM_DRUID_CAT_CLAW = 174,
+ ANIM_DRUID_CAT_COWER = 175,
+ ANIM_DRUID_BEAR_SWIPE = 176,
+ ANIM_DRUID_BEAR_BITE = 177,
+ ANIM_DRUID_BEAR_MAUL = 178,
+ ANIM_DRUID_BEAR_BASH = 179,
+ ANIM_DRAGON_TAIL = 180,
+ ANIM_DRAGON_STOMP = 181,
+ ANIM_DRAGON_SPIT = 182,
+ ANIM_DRAGON_SPIT_HOVER = 183,
+ ANIM_DRAGON_SPIT_FLY = 184,
+ ANIM_EMOTE_YES = 185,
+ ANIM_EMOTE_NO = 186,
+ ANIM_JUMP_LAND_RUN = 187,
+ ANIM_LOOT_HOLD = 188,
+ ANIM_LOOT_UP = 189,
+ ANIM_STAND_HIGH = 190,
+ ANIM_IMPACT = 191,
+ ANIM_LIFTOFF = 192,
+ ANIM_HOVER = 193,
+ ANIM_SUCCUBUS_ENTICE = 194,
+ ANIM_EMOTE_TRAIN = 195,
+ ANIM_EMOTE_DEAD = 196,
+ ANIM_EMOTE_DANCE_ONCE = 197,
+ ANIM_DEFLECT = 198,
+ ANIM_EMOTE_EAT_NO_SHEATHE = 199,
+ ANIM_LAND = 200,
+ ANIM_SUBMERGE = 201,
+ ANIM_SUBMERGED = 202,
+ ANIM_CANNIBALIZE = 203,
+ ANIM_ARROW_BIRTH = 204,
+ ANIM_GROUP_ARROW_BIRTH = 205,
+ ANIM_CORPSE_ARROW_BIRTH = 206,
+ ANIM_GUIDE_ARROW_BIRTH = 207,
+ ANIM_EMOTE_TALK_NO_SHEATHE = 208,
+ ANIM_EMOTE_POINT_NO_SHEATHE = 209,
+ ANIM_EMOTE_SALUTE_NO_SHEATHE = 210,
+ ANIM_EMOTE_DANCE_SPECIAL = 211,
+ ANIM_MUTILATE = 212,
+ ANIM_CUSTOM_SPELL_01 = 213,
+ ANIM_CUSTOM_SPELL_02 = 214,
+ ANIM_CUSTOM_SPELL_03 = 215,
+ ANIM_CUSTOM_SPELL_04 = 216,
+ ANIM_CUSTOM_SPELL_05 = 217,
+ ANIM_CUSTOM_SPELL_06 = 218,
+ ANIM_CUSTOM_SPELL_07 = 219,
+ ANIM_CUSTOM_SPELL_08 = 220,
+ ANIM_CUSTOM_SPELL_09 = 221,
+ ANIM_CUSTOM_SPELL_10 = 222,
+ ANIM_STEALTH_RUN = 223,
+ ANIM_EMERGE = 224,
+ ANIM_COWER = 225,
+ ANIM_GRAB = 226,
+ ANIM_GRAB_CLOSED = 227,
+ ANIM_GRAB_THROWN = 228,
+ ANIM_FLY_STAND = 229,
+ ANIM_FLY_DEATH = 230,
+ ANIM_FLY_SPELL = 231,
+ ANIM_FLY_STOP = 232,
+ ANIM_FLY_WALK = 233,
+ ANIM_FLY_RUN = 234,
+ ANIM_FLY_DEAD = 235,
+ ANIM_FLY_RISE = 236,
+ ANIM_FLY_STAND_WOUND = 237,
+ ANIM_FLY_COMBAT_WOUND = 238,
+ ANIM_FLY_COMBAT_CRITICAL = 239,
+ ANIM_FLY_SHUFFLE_LEFT = 240,
+ ANIM_FLY_SHUFFLE_RIGHT = 241,
+ ANIM_FLY_WALK_BACKWARDS = 242,
+ ANIM_FLY_STUN = 243,
+ ANIM_FLY_HANDS_CLOSED = 244,
+ ANIM_FLY_ATTACK_UNARMED = 245,
+ ANIM_FLY_ATTACK1H = 246,
+ ANIM_FLY_ATTACK2H = 247,
+ ANIM_FLY_ATTACK2HL = 248,
+ ANIM_FLY_PARRY_UNARMED = 249,
+ ANIM_FLY_PARRY1H = 250,
+ ANIM_FLY_PARRY2H = 251,
+ ANIM_FLY_PARRY2HL = 252,
+ ANIM_FLY_SHIELD_BLOCK = 253,
+ ANIM_FLY_READY_UNARMED = 254,
+ ANIM_FLY_READY1H = 255,
+ ANIM_FLY_READY2H = 256,
+ ANIM_FLY_READY2HL = 257,
+ ANIM_FLY_READY_BOW = 258,
+ ANIM_FLY_DODGE = 259,
+ ANIM_FLY_SPELL_PRECAST = 260,
+ ANIM_FLY_SPELL_CAST = 261,
+ ANIM_FLY_SPELL_CAST_AREA = 262,
+ ANIM_FLY_NPC_WELCOME = 263,
+ ANIM_FLY_NPC_GOODBYE = 264,
+ ANIM_FLY_BLOCK = 265,
+ ANIM_FLY_JUMP_START = 266,
+ ANIM_FLY_JUMP = 267,
+ ANIM_FLY_JUMP_END = 268,
+ ANIM_FLY_FALL = 269,
+ ANIM_FLY_SWIM_IDLE = 270,
+ ANIM_FLY_SWIM = 271,
+ ANIM_FLY_SWIM_LEFT = 272,
+ ANIM_FLY_SWIM_RIGHT = 273,
+ ANIM_FLY_SWIM_BACKWARDS = 274,
+ ANIM_FLY_ATTACK_BOW = 275,
+ ANIM_FLY_FIRE_BOW = 276,
+ ANIM_FLY_READY_RIFLE = 277,
+ ANIM_FLY_ATTACK_RIFLE = 278,
+ ANIM_FLY_LOOT = 279,
+ ANIM_FLY_READY_SPELL_DIRECTED = 280,
+ ANIM_FLY_READY_SPELL_OMNI = 281,
+ ANIM_FLY_SPELL_CAST_DIRECTED = 282,
+ ANIM_FLY_SPELL_CAST_OMNI = 283,
+ ANIM_FLY_SPELL_BATTLE_ROAR = 284,
+ ANIM_FLY_READY_ABILITY = 285,
+ ANIM_FLY_SPECIAL1H = 286,
+ ANIM_FLY_SPECIAL2H = 287,
+ ANIM_FLY_SHIELD_BASH = 288,
+ ANIM_FLY_EMOTE_TALK = 289,
+ ANIM_FLY_EMOTE_EAT = 290,
+ ANIM_FLY_EMOTE_WORK = 291,
+ ANIM_FLY_USE_STANDING = 292,
+ ANIM_FLY_EMOTE_TALK_EXCLAMATION = 293,
+ ANIM_FLY_EMOTE_TALK_QUESTION = 294,
+ ANIM_FLY_EMOTE_BOW = 295,
+ ANIM_FLY_EMOTE_WAVE = 296,
+ ANIM_FLY_EMOTE_CHEER = 297,
+ ANIM_FLY_EMOTE_DANCE = 298,
+ ANIM_FLY_EMOTE_LAUGH = 299,
+ ANIM_FLY_EMOTE_SLEEP = 300,
+ ANIM_FLY_EMOTE_SIT_GROUND = 301,
+ ANIM_FLY_EMOTE_RUDE = 302,
+ ANIM_FLY_EMOTE_ROAR = 303,
+ ANIM_FLY_EMOTE_KNEEL = 304,
+ ANIM_FLY_EMOTE_KISS = 305,
+ ANIM_FLY_EMOTE_CRY = 306,
+ ANIM_FLY_EMOTE_CHICKEN = 307,
+ ANIM_FLY_EMOTE_BEG = 308,
+ ANIM_FLY_EMOTE_APPLAUD = 309,
+ ANIM_FLY_EMOTE_SHOUT = 310,
+ ANIM_FLY_EMOTE_FLEX = 311,
+ ANIM_FLY_EMOTE_SHY = 312,
+ ANIM_FLY_EMOTE_POINT = 313,
+ ANIM_FLY_ATTACK1H_PIERCE = 314,
+ ANIM_FLY_ATTACK2H_LOOSE_PIERCE = 315,
+ ANIM_FLY_ATTACK_OFF = 316,
+ ANIM_FLY_ATTACK_OFF_PIERCE = 317,
+ ANIM_FLY_SHEATH = 318,
+ ANIM_FLY_HIP_SHEATH = 319,
+ ANIM_FLY_MOUNT = 320,
+ ANIM_FLY_RUN_RIGHT = 321,
+ ANIM_FLY_RUN_LEFT = 322,
+ ANIM_FLY_MOUNT_SPECIAL = 323,
+ ANIM_FLY_KICK = 324,
+ ANIM_FLY_SIT_GROUND_DOWN = 325,
+ ANIM_FLY_SIT_GROUND = 326,
+ ANIM_FLY_SIT_GROUND_UP = 327,
+ ANIM_FLY_SLEEP_DOWN = 328,
+ ANIM_FLY_SLEEP = 329,
+ ANIM_FLY_SLEEP_UP = 330,
+ ANIM_FLY_SIT_CHAIR_LOW = 331,
+ ANIM_FLY_SIT_CHAIR_MED = 332,
+ ANIM_FLY_SIT_CHAIR_HIGH = 333,
+ ANIM_FLY_LOAD_BOW = 334,
+ ANIM_FLY_LOAD_RIFLE = 335,
+ ANIM_FLY_ATTACK_THROWN = 336,
+ ANIM_FLY_READY_THROWN = 337,
+ ANIM_FLY_HOLD_BOW = 338,
+ ANIM_FLY_HOLD_RIFLE = 339,
+ ANIM_FLY_HOLD_THROWN = 340,
+ ANIM_FLY_LOAD_THROWN = 341,
+ ANIM_FLY_EMOTE_SALUTE = 342,
+ ANIM_FLY_KNEEL_START = 343,
+ ANIM_FLY_KNEEL_LOOP = 344,
+ ANIM_FLY_KNEEL_END = 345,
+ ANIM_FLY_ATTACK_UNARMED_OFF = 346,
+ ANIM_FLY_SPECIAL_UNARMED = 347,
+ ANIM_FLY_STEALTH_WALK = 348,
+ ANIM_FLY_STEALTH_STAND = 349,
+ ANIM_FLY_KNOCKDOWN = 350,
+ ANIM_FLY_EATING_LOOP = 351,
+ ANIM_FLY_USE_STANDING_LOOP = 352,
+ ANIM_FLY_CHANNEL_CAST_DIRECTED = 353,
+ ANIM_FLY_CHANNEL_CAST_OMNI = 354,
+ ANIM_FLY_WHIRLWIND = 355,
+ ANIM_FLY_BIRTH = 356,
+ ANIM_FLY_USE_STANDING_START = 357,
+ ANIM_FLY_USE_STANDING_END = 358,
+ ANIM_FLY_CREATURE_SPECIAL = 359,
+ ANIM_FLY_DROWN = 360,
+ ANIM_FLY_DROWNED = 361,
+ ANIM_FLY_FISHING_CAST = 362,
+ ANIM_FLY_FISHING_LOOP = 363,
+ ANIM_FLY_FLY = 364,
+ ANIM_FLY_EMOTE_WORK_NO_SHEATHE = 365,
+ ANIM_FLY_EMOTE_STUN_NO_SHEATHE = 366,
+ ANIM_FLY_EMOTE_USE_STANDING_NO_SHEATHE = 367,
+ ANIM_FLY_SPELL_SLEEP_DOWN = 368,
+ ANIM_FLY_SPELL_KNEEL_START = 369,
+ ANIM_FLY_SPELL_KNEEL_LOOP = 370,
+ ANIM_FLY_SPELL_KNEEL_END = 371,
+ ANIM_FLY_SPRINT = 372,
+ ANIM_FLY_IN_FLIGHT = 373,
+ ANIM_FLY_SPAWN = 374,
+ ANIM_FLY_CLOSE = 375,
+ ANIM_FLY_CLOSED = 376,
+ ANIM_FLY_OPEN = 377,
+ ANIM_FLY_OPENED = 378,
+ ANIM_FLY_DESTROY = 379,
+ ANIM_FLY_DESTROYED = 380,
+ ANIM_FLY_REBUILD = 381,
+ ANIM_FLY_CUSTOM_0 = 382,
+ ANIM_FLY_CUSTOM_1 = 383,
+ ANIM_FLY_CUSTOM_2 = 384,
+ ANIM_FLY_CUSTOM_3 = 385,
+ ANIM_FLY_DESPAWN = 386,
+ ANIM_FLY_HOLD = 387,
+ ANIM_FLY_DECAY = 388,
+ ANIM_FLY_BOW_PULL = 389,
+ ANIM_FLY_BOW_RELEASE = 390,
+ ANIM_FLY_SHIP_START = 391,
+ ANIM_FLY_SHIP_MOVING = 392,
+ ANIM_FLY_SHIP_STOP = 393,
+ ANIM_FLY_GROUP_ARROW = 394,
+ ANIM_FLY_ARROW = 395,
+ ANIM_FLY_CORPSE_ARROW = 396,
+ ANIM_FLY_GUIDE_ARROW = 397,
+ ANIM_FLY_SWAY = 398,
+ ANIM_FLY_DRUID_CAT_POUNCE = 399,
+ ANIM_FLY_DRUID_CAT_RIP = 400,
+ ANIM_FLY_DRUID_CAT_RAKE = 401,
+ ANIM_FLY_DRUID_CAT_RAVAGE = 402,
+ ANIM_FLY_DRUID_CAT_CLAW = 403,
+ ANIM_FLY_DRUID_CAT_COWER = 404,
+ ANIM_FLY_DRUID_BEAR_SWIPE = 405,
+ ANIM_FLY_DRUID_BEAR_BITE = 406,
+ ANIM_FLY_DRUID_BEAR_MAUL = 407,
+ ANIM_FLY_DRUID_BEAR_BASH = 408,
+ ANIM_FLY_DRAGON_TAIL = 409,
+ ANIM_FLY_DRAGON_STOMP = 410,
+ ANIM_FLY_DRAGON_SPIT = 411,
+ ANIM_FLY_DRAGON_SPIT_HOVER = 412,
+ ANIM_FLY_DRAGON_SPIT_FLY = 413,
+ ANIM_FLY_EMOTE_YES = 414,
+ ANIM_FLY_EMOTE_NO = 415,
+ ANIM_FLY_JUMP_LAND_RUN = 416,
+ ANIM_FLY_LOOT_HOLD = 417,
+ ANIM_FLY_LOOT_UP = 418,
+ ANIM_FLY_STAND_HIGH = 419,
+ ANIM_FLY_IMPACT = 420,
+ ANIM_FLY_LIFTOFF = 421,
+ ANIM_FLY_HOVER = 422,
+ ANIM_FLY_SUCCUBUS_ENTICE = 423,
+ ANIM_FLY_EMOTE_TRAIN = 424,
+ ANIM_FLY_EMOTE_DEAD = 425,
+ ANIM_FLY_EMOTE_DANCE_ONCE = 426,
+ ANIM_FLY_DEFLECT = 427,
+ ANIM_FLY_EMOTE_EAT_NO_SHEATHE = 428,
+ ANIM_FLY_LAND = 429,
+ ANIM_FLY_SUBMERGE = 430,
+ ANIM_FLY_SUBMERGED = 431,
+ ANIM_FLY_CANNIBALIZE = 432,
+ ANIM_FLY_ARROW_BIRTH = 433,
+ ANIM_FLY_GROUP_ARROW_BIRTH = 434,
+ ANIM_FLY_CORPSE_ARROW_BIRTH = 435,
+ ANIM_FLY_GUIDE_ARROW_BIRTH = 436,
+ ANIM_FLY_EMOTE_TALK_NO_SHEATHE = 437,
+ ANIM_FLY_EMOTE_POINT_NO_SHEATHE = 438,
+ ANIM_FLY_EMOTE_SALUTE_NO_SHEATHE = 439,
+ ANIM_FLY_EMOTE_DANCE_SPECIAL = 440,
+ ANIM_FLY_MUTILATE = 441,
+ ANIM_FLY_CUSTOM_SPELL_01 = 442,
+ ANIM_FLY_CUSTOM_SPELL_02 = 443,
+ ANIM_FLY_CUSTOM_SPELL_03 = 444,
+ ANIM_FLY_CUSTOM_SPELL_04 = 445,
+ ANIM_FLY_CUSTOM_SPELL_05 = 446,
+ ANIM_FLY_CUSTOM_SPELL_06 = 447,
+ ANIM_FLY_CUSTOM_SPELL_07 = 448,
+ ANIM_FLY_CUSTOM_SPELL_08 = 449,
+ ANIM_FLY_CUSTOM_SPELL_09 = 450,
+ ANIM_FLY_CUSTOM_SPELL_10 = 451,
+ ANIM_FLY_STEALTH_RUN = 452,
+ ANIM_FLY_EMERGE = 453,
+ ANIM_FLY_COWER = 454,
+ ANIM_FLY_GRAB = 455,
+ ANIM_FLY_GRAB_CLOSED = 456,
+ ANIM_FLY_GRAB_THROWN = 457,
+ ANIM_TO_FLY = 458,
+ ANIM_TO_HOVER = 459,
+ ANIM_TO_GROUND = 460,
+ ANIM_FLY_TO_FLY = 461,
+ ANIM_FLY_TO_HOVER = 462,
+ ANIM_FLY_TO_GROUND = 463,
+ ANIM_SETTLE = 464,
+ ANIM_FLY_SETTLE = 465,
+ ANIM_DEATH_START = 466,
+ ANIM_DEATH_LOOP = 467,
+ ANIM_DEATH_END = 468,
+ ANIM_FLY_DEATH_START = 469,
+ ANIM_FLY_DEATH_LOOP = 470,
+ ANIM_FLY_DEATH_END = 471,
+ ANIM_DEATH_END_HOLD = 472,
+ ANIM_FLY_DEATH_END_HOLD = 473,
+ ANIM_STRANGULATE = 474,
+ ANIM_FLY_STRANGULATE = 475,
+ ANIM_READY_JOUST = 476,
+ ANIM_LOAD_JOUST = 477,
+ ANIM_HOLD_JOUST = 478,
+ ANIM_FLY_READY_JOUST = 479,
+ ANIM_FLY_LOAD_JOUST = 480,
+ ANIM_FLY_HOLD_JOUST = 481,
+ ANIM_ATTACK_JOUST = 482,
+ ANIM_FLY_ATTACK_JOUST = 483,
+ ANIM_RECLINED_MOUNT = 484,
+ ANIM_FLY_RECLINED_MOUNT = 485,
+ ANIM_TO_ALTERED = 486,
+ ANIM_FROM_ALTERED = 487,
+ ANIM_FLY_TO_ALTERED = 488,
+ ANIM_FLY_FROM_ALTERED = 489,
+ ANIM_IN_STOCKS = 490,
+ ANIM_FLY_IN_STOCKS = 491,
+ ANIM_VEHICLE_GRAB = 492,
+ ANIM_VEHICLE_THROW = 493,
+ ANIM_FLY_VEHICLE_GRAB = 494,
+ ANIM_FLY_VEHICLE_THROW = 495,
+ ANIM_TO_ALTERED_POST_SWAP = 496,
+ ANIM_FROM_ALTERED_POST_SWAP = 497,
+ ANIM_FLY_TO_ALTERED_POST_SWAP = 498,
+ ANIM_FLY_FROM_ALTERED_POST_SWAP = 499,
+ ANIM_RECLINED_MOUNT_PASSENGER = 500,
+ ANIM_FLY_RECLINED_MOUNT_PASSENGER = 501,
+ ANIM_CARRY2H = 502,
+ ANIM_CARRIED2H = 503,
+ ANIM_FLY_CARRY2H = 504,
+ ANIM_FLY_CARRIED2H = 505
};
enum LockKeyType
@@ -2413,7 +2710,7 @@ enum HolidayIds
HOLIDAY_HARVEST_FESTIVAL = 321,
HOLIDAY_HALLOWS_END = 324,
HOLIDAY_LUNAR_FESTIVAL = 327,
- HOLIDAY_LOVE_IS_IN_THE_AIR = 335,
+ // HOLIDAY_LOVE_IS_IN_THE_AIR = 335, unused/duplicated
HOLIDAY_FIRE_FESTIVAL = 341,
HOLIDAY_CALL_TO_ARMS_EY = 353,
HOLIDAY_BREWFEST = 372,
@@ -2426,7 +2723,7 @@ enum HolidayIds
HOLIDAY_WOTLK_LAUNCH = 406,
HOLIDAY_DAY_OF_DEAD = 409,
HOLIDAY_CALL_TO_ARMS_IC = 420,
- HOLIDAY_LOVE_IS_IN_THE_AIR_2 = 423,
+ HOLIDAY_LOVE_IS_IN_THE_AIR = 423,
HOLIDAY_KALU_AK_FISHING_DERBY = 424,
HOLIDAY_CALL_TO_ARMS_BFG = 435,
HOLIDAY_CALL_TO_ARMS_TP = 436,
@@ -2561,8 +2858,8 @@ enum SkillType
SKILL_SURVIVAL2 = 142,
SKILL_RIDING_HORSE = 148,
SKILL_RIDING_WOLF = 149,
- SKILL_RIDING_RAM = 152,
SKILL_RIDING_TIGER = 150,
+ SKILL_RIDING_RAM = 152,
SKILL_SWIMING = 155,
SKILL_2H_MACES = 160,
SKILL_UNARMED = 162,
@@ -3245,4 +3542,21 @@ enum RemoveMethod
GROUP_REMOVEMETHOD_LEAVE = 2,
};
+enum ActivateTaxiReply
+{
+ ERR_TAXIOK = 0,
+ ERR_TAXIUNSPECIFIEDSERVERERROR = 1,
+ ERR_TAXINOSUCHPATH = 2,
+ ERR_TAXINOTENOUGHMONEY = 3,
+ ERR_TAXITOOFARAWAY = 4,
+ ERR_TAXINOVENDORNEARBY = 5,
+ ERR_TAXINOTVISITED = 6,
+ ERR_TAXIPLAYERBUSY = 7,
+ ERR_TAXIPLAYERALREADYMOUNTED = 8,
+ ERR_TAXIPLAYERSHAPESHIFTED = 9,
+ ERR_TAXIPLAYERMOVING = 10,
+ ERR_TAXISAMENODE = 11,
+ ERR_TAXINOTSTANDING = 12
+};
+
#endif
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 4945ae2a014..27816753ca7 100755
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -53,9 +53,9 @@ void MotionMaster::Initialize()
// set new default movement generator
void MotionMaster::InitDefault()
{
- if (i_owner->GetTypeId() == TYPEID_UNIT)
+ if (_owner->GetTypeId() == TYPEID_UNIT)
{
- MovementGenerator* movement = FactorySelector::selectMovementGenerator(i_owner->ToCreature());
+ MovementGenerator* movement = FactorySelector::selectMovementGenerator(_owner->ToCreature());
Mutate(movement == NULL ? &si_idleMovement : movement, MOTION_SLOT_IDLE);
}
else
@@ -77,42 +77,42 @@ MotionMaster::~MotionMaster()
void MotionMaster::UpdateMotion(uint32 diff)
{
- if (!i_owner)
+ if (!_owner)
return;
- if (i_owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) // what about UNIT_STATE_DISTRACTED? Why is this not included?
+ if (_owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) // what about UNIT_STATE_DISTRACTED? Why is this not included?
return;
ASSERT(!empty());
- m_cleanFlag |= MMCF_UPDATE;
- if (!top()->Update(*i_owner, diff))
+ _cleanFlag |= MMCF_UPDATE;
+ if (!top()->Update(*_owner, diff))
{
- m_cleanFlag &= ~MMCF_UPDATE;
+ _cleanFlag &= ~MMCF_UPDATE;
MovementExpired();
}
else
- m_cleanFlag &= ~MMCF_UPDATE;
+ _cleanFlag &= ~MMCF_UPDATE;
- if (m_expList)
+ if (_expList)
{
- for (size_t i = 0; i < m_expList->size(); ++i)
+ for (size_t i = 0; i < _expList->size(); ++i)
{
- MovementGenerator* mg = (*m_expList)[i];
+ MovementGenerator* mg = (*_expList)[i];
DirectDelete(mg);
}
- delete m_expList;
- m_expList = NULL;
+ delete _expList;
+ _expList = NULL;
if (empty())
Initialize();
else if (needInitTop())
InitTop();
- else if (m_cleanFlag & MMCF_RESET)
- top()->Reset(*i_owner);
+ else if (_cleanFlag & MMCF_RESET)
+ top()->Reset(*_owner);
- m_cleanFlag &= ~MMCF_RESET;
+ _cleanFlag &= ~MMCF_RESET;
}
}
@@ -128,7 +128,7 @@ void MotionMaster::DirectClean(bool reset)
if (needInitTop())
InitTop();
else if (reset)
- top()->Reset(*i_owner);
+ top()->Reset(*_owner);
}
void MotionMaster::DelayedClean()
@@ -152,14 +152,14 @@ void MotionMaster::DirectExpire(bool reset)
}
while (!top())
- --i_top;
+ --_top;
if (empty())
Initialize();
else if (needInitTop())
InitTop();
else if (reset)
- top()->Reset(*i_owner);
+ top()->Reset(*_owner);
}
void MotionMaster::DelayedExpire()
@@ -172,7 +172,7 @@ void MotionMaster::DelayedExpire()
}
while (!top())
- --i_top;
+ --_top;
}
void MotionMaster::MoveIdle()
@@ -184,9 +184,9 @@ void MotionMaster::MoveIdle()
void MotionMaster::MoveRandom(float spawndist)
{
- if (i_owner->GetTypeId() == TYPEID_UNIT)
+ if (_owner->GetTypeId() == TYPEID_UNIT)
{
- sLog->outStaticDebug("Creature (GUID: %u) start moving random", i_owner->GetGUIDLow());
+ sLog->outStaticDebug("Creature (GUID: %u) start moving random", _owner->GetGUIDLow());
Mutate(new RandomMovementGenerator<Creature>(spawndist), MOTION_SLOT_IDLE);
}
}
@@ -195,15 +195,15 @@ void MotionMaster::MoveTargetedHome()
{
Clear(false);
- if (i_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)i_owner)->GetCharmerOrOwnerGUID())
+ if (_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)_owner)->GetCharmerOrOwnerGUID())
{
- sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", i_owner->GetEntry(), i_owner->GetGUIDLow());
+ sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE);
}
- else if (i_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)i_owner)->GetCharmerOrOwnerGUID())
+ else if (_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)_owner)->GetCharmerOrOwnerGUID())
{
- sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", i_owner->GetEntry(), i_owner->GetGUIDLow() );
- Unit *target = ((Creature*)i_owner)->GetCharmerOrOwner();
+ sLog->outStaticDebug("Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow() );
+ Unit *target = ((Creature*)_owner)->GetCharmerOrOwner();
if (target)
{
sLog->outStaticDebug("Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow() );
@@ -212,21 +212,21 @@ void MotionMaster::MoveTargetedHome()
}
else
{
- sLog->outError("Player (GUID: %u) attempt targeted home", i_owner->GetGUIDLow());
+ sLog->outError("Player (GUID: %u) attempt targeted home", _owner->GetGUIDLow());
}
}
void MotionMaster::MoveConfused()
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) move confused", i_owner->GetGUIDLow());
+ sLog->outStaticDebug("Player (GUID: %u) move confused", _owner->GetGUIDLow());
Mutate(new ConfusedMovementGenerator<Player>(), MOTION_SLOT_CONTROLLED);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) move confused",
- i_owner->GetEntry(), i_owner->GetGUIDLow());
+ _owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new ConfusedMovementGenerator<Creature>(), MOTION_SLOT_CONTROLLED);
}
}
@@ -234,14 +234,14 @@ void MotionMaster::MoveConfused()
void MotionMaster::MoveChase(Unit* target, float dist, float angle)
{
// ignore movement request if target not exist
- if (!target || target == i_owner || i_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
+ if (!target || target == _owner || _owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
return;
- //i_owner->ClearUnitState(UNIT_STATE_FOLLOW);
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ //_owner->ClearUnitState(UNIT_STATE_FOLLOW);
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
sLog->outStaticDebug("Player (GUID: %u) chase to %s (GUID: %u)",
- i_owner->GetGUIDLow(),
+ _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new ChaseMovementGenerator<Player>(*target,dist,angle), MOTION_SLOT_ACTIVE);
@@ -249,7 +249,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(),
+ _owner->GetEntry(), _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new ChaseMovementGenerator<Creature>(*target,dist,angle), MOTION_SLOT_ACTIVE);
@@ -259,13 +259,13 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlot slot)
{
// ignore movement request if target not exist
- if (!target || target == i_owner || i_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
+ if (!target || target == _owner || _owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
return;
- //i_owner->AddUnitState(UNIT_STATE_FOLLOW);
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ //_owner->AddUnitState(UNIT_STATE_FOLLOW);
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", i_owner->GetGUIDLow(),
+ sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new FollowMovementGenerator<Player>(*target,dist,angle), slot);
@@ -273,7 +273,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(),
+ _owner->GetEntry(), _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new FollowMovementGenerator<Creature>(*target,dist,angle), slot);
@@ -282,15 +282,15 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
void MotionMaster::MovePoint(uint32 id, float x, float y, float z)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), id, x, y, z);
+ sLog->outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), id, x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z), MOTION_SLOT_ACTIVE);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), id, x, y, z);
+ _owner->GetEntry(), _owner->GetGUIDLow(), id, x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z), MOTION_SLOT_ACTIVE);
}
}
@@ -300,9 +300,9 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed)
float x, y, z;
pos.GetPosition(x, y, z);
- sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z);
+ sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
- Movement::MoveSplineInit init(*i_owner);
+ Movement::MoveSplineInit init(*_owner);
init.MoveTo(x,y,z);
init.SetVelocity(speed);
init.SetAnimation(Movement::ToGround);
@@ -315,9 +315,9 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed)
float x, y, z;
pos.GetPosition(x, y, z);
- sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), id, x, y, z);
+ sLog->outStaticDebug("Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
- Movement::MoveSplineInit init(*i_owner);
+ Movement::MoveSplineInit init(*_owner);
init.MoveTo(x,y,z);
init.SetVelocity(speed);
init.SetAnimation(Movement::ToFly);
@@ -328,66 +328,63 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed)
void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ)
{
//this function may make players fall below map
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
return;
float x, y, z;
float moveTimeHalf = speedZ / Movement::gravity;
float dist = 2 * moveTimeHalf * speedXY;
- i_owner->GetNearPoint(i_owner, x, y, z, i_owner->GetObjectSize(), dist, i_owner->GetAngle(srcX, srcY) + M_PI);
+ _owner->GetNearPoint(_owner, x, y, z, _owner->GetObjectSize(), dist, _owner->GetAngle(srcX, srcY) + M_PI);
MoveJump(x, y, z, speedXY, speedZ);
}
void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ)
{
//this function may make players fall below map
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
return;
float x, y, z;
float moveTimeHalf = speedZ / Movement::gravity;
float dist = 2 * moveTimeHalf * speedXY;
- i_owner->GetClosePoint(x, y, z, i_owner->GetObjectSize(), dist, angle);
+ _owner->GetClosePoint(x, y, z, _owner->GetObjectSize(), dist, angle);
MoveJump(x, y, z, speedXY, speedZ);
}
void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id)
{
- sLog->outStaticDebug("Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z);
+ sLog->outStaticDebug("Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
float moveTimeHalf = speedZ / Movement::gravity;
float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ);
- Movement::MoveSplineInit init(*i_owner);
+ Movement::MoveSplineInit init(*_owner);
init.MoveTo(x,y,z);
init.SetParabolic(max_height,0);
init.SetVelocity(speedXY);
init.Launch();
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
- Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
- else
- Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
+ Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
}
void MotionMaster::MoveFall(uint32 id/*=0*/)
{
// use larger distance for vmap height search than in most other cases
- float tz = i_owner->GetMap()->GetHeight(i_owner->GetPositionX(), i_owner->GetPositionY(), i_owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
+ float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
sLog->outStaticDebug("MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
- i_owner->GetMap()->GetId(), i_owner->GetPositionX(), i_owner->GetPositionX(), i_owner->GetPositionZ());
+ _owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionX(), _owner->GetPositionZ());
return;
}
// Abort too if the ground is very near
- if (fabs(i_owner->GetPositionZ() - tz) < 0.1f)
+ if (fabs(_owner->GetPositionZ() - tz) < 0.1f)
return;
- Movement::MoveSplineInit init(*i_owner);
- init.MoveTo(i_owner->GetPositionX(),i_owner->GetPositionY(),tz);
+ Movement::MoveSplineInit init(*_owner);
+ init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz);
init.SetFall();
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
@@ -398,45 +395,45 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id)
if (Impl[MOTION_SLOT_CONTROLLED] && Impl[MOTION_SLOT_CONTROLLED]->GetMovementGeneratorType() != DISTRACT_MOTION_TYPE)
return;
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z);
+ sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z, speed), MOTION_SLOT_CONTROLLED);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z);
+ _owner->GetEntry(), _owner->GetGUIDLow(), x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, speed), MOTION_SLOT_CONTROLLED);
}
}
void MotionMaster::MoveSeekAssistance(float x, float y, float z)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outError("Player (GUID: %u) attempt to seek assistance", i_owner->GetGUIDLow());
+ sLog->outError("Player (GUID: %u) attempt to seek assistance", _owner->GetGUIDLow());
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z);
- i_owner->AttackStop();
- i_owner->ToCreature()->SetReactState(REACT_PASSIVE);
+ _owner->GetEntry(), _owner->GetGUIDLow(), x, y, z);
+ _owner->AttackStop();
+ _owner->ToCreature()->SetReactState(REACT_PASSIVE);
Mutate(new AssistanceMovementGenerator(x, y, z), MOTION_SLOT_ACTIVE);
}
}
void MotionMaster::MoveSeekAssistanceDistract(uint32 time)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outError("Player (GUID: %u) attempt to call distract after assistance", i_owner->GetGUIDLow());
+ sLog->outError("Player (GUID: %u) attempt to call distract after assistance", _owner->GetGUIDLow());
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), time);
+ _owner->GetEntry(), _owner->GetGUIDLow(), time);
Mutate(new AssistanceDistractMovementGenerator(time), MOTION_SLOT_ACTIVE);
}
}
@@ -446,12 +443,12 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
if (!enemy)
return;
- if (i_owner->HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
+ if (_owner->HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
return;
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", i_owner->GetGUIDLow(),
+ sLog->outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(),
enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow());
Mutate(new FleeingMovementGenerator<Player>(enemy->GetGUID()), MOTION_SLOT_CONTROLLED);
@@ -459,7 +456,7 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s",
- i_owner->GetEntry(), i_owner->GetGUIDLow(),
+ _owner->GetEntry(), _owner->GetGUIDLow(),
enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow(),
time ? " for a limited time" : "");
@@ -472,24 +469,24 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
void MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
{
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
if (path < sTaxiPathNodesByPath.size())
{
- sLog->outStaticDebug("%s taxi to (Path %u node %u)", i_owner->GetName(), path, pathnode);
+ sLog->outStaticDebug("%s taxi to (Path %u node %u)", _owner->GetName(), path, pathnode);
FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path], pathnode);
Mutate(mgen, MOTION_SLOT_CONTROLLED);
}
else
{
sLog->outError("%s attempt taxi to (not existed Path %u node %u)",
- i_owner->GetName(), path, pathnode);
+ _owner->GetName(), path, pathnode);
}
}
else
{
sLog->outError("Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), path, pathnode);
+ _owner->GetEntry(), _owner->GetGUIDLow(), path, pathnode);
}
}
@@ -498,14 +495,14 @@ void MotionMaster::MoveDistract(uint32 timer)
if (Impl[MOTION_SLOT_CONTROLLED])
return;
- if (i_owner->GetTypeId() == TYPEID_PLAYER)
+ if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- sLog->outStaticDebug("Player (GUID: %u) distracted (timer: %u)", i_owner->GetGUIDLow(), timer);
+ sLog->outStaticDebug("Player (GUID: %u) distracted (timer: %u)", _owner->GetGUIDLow(), timer);
}
else
{
sLog->outStaticDebug("Creature (Entry: %u GUID: %u) (timer: %u)",
- i_owner->GetEntry(), i_owner->GetGUIDLow(), timer);
+ _owner->GetEntry(), _owner->GetGUIDLow(), timer);
}
DistractMovementGenerator* mgen = new DistractMovementGenerator(timer);
@@ -517,23 +514,23 @@ void MotionMaster::Mutate(MovementGenerator *m, MovementSlot slot)
if (MovementGenerator *curr = Impl[slot])
{
Impl[slot] = NULL; // in case a new one is generated in this slot during directdelete
- if (i_top == slot && (m_cleanFlag & MMCF_UPDATE))
+ if (_top == slot && (_cleanFlag & MMCF_UPDATE))
DelayedDelete(curr);
else
DirectDelete(curr);
}
- else if (i_top < slot)
+ else if (_top < slot)
{
- i_top = slot;
+ _top = slot;
}
Impl[slot] = m;
- if (i_top > slot)
- needInit[slot] = true;
+ if (_top > slot)
+ _needInit[slot] = true;
else
{
- needInit[slot] = false;
- m->Initialize(*i_owner);
+ _needInit[slot] = false;
+ m->Initialize(*_owner);
}
}
@@ -546,19 +543,19 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable)
/*while (!empty())
{
MovementGenerator *curr = top();
- curr->Finalize(*i_owner);
+ curr->Finalize(*_owner);
pop();
if (!isStatic(curr))
delete curr;
}*/
- //i_owner->GetTypeId() == TYPEID_PLAYER ?
+ //_owner->GetTypeId() == TYPEID_PLAYER ?
//Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)):
Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE);
sLog->outStaticDebug("%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)",
- i_owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature",
- i_owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO");
+ _owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature",
+ _owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO");
}
void MotionMaster::MoveRotate(uint32 time, RotateDirection direction)
@@ -576,7 +573,7 @@ void MotionMaster::propagateSpeedChange()
{
(*it)->unitSpeedChanged();
}*/
- for (int i = 0; i <= i_top; ++i)
+ for (int i = 0; i <= _top; ++i)
{
if (Impl[i])
Impl[i]->unitSpeedChanged();
@@ -601,34 +598,34 @@ MovementGeneratorType MotionMaster::GetMotionSlotType(int slot) const
void MotionMaster::InitTop()
{
- top()->Initialize(*i_owner);
- needInit[i_top] = false;
+ top()->Initialize(*_owner);
+ _needInit[_top] = false;
}
void MotionMaster::DirectDelete(_Ty curr)
{
if (isStatic(curr))
return;
- curr->Finalize(*i_owner);
+ curr->Finalize(*_owner);
delete curr;
}
void MotionMaster::DelayedDelete(_Ty curr)
{
- sLog->outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", i_owner->GetEntry(), curr->GetMovementGeneratorType());
+ sLog->outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType());
if (isStatic(curr))
return;
- if (!m_expList)
- m_expList = new ExpireList();
- m_expList->push_back(curr);
+ if (!_expList)
+ _expList = new ExpireList();
+ _expList->push_back(curr);
}
bool MotionMaster::GetDestination(float &x, float &y, float &z)
{
- if (i_owner->movespline->Finalized())
+ if (_owner->movespline->Finalized())
return false;
- const G3D::Vector3& dest = i_owner->movespline->FinalDestination();
+ const G3D::Vector3& dest = _owner->movespline->FinalDestination();
x = dest.x;
y = dest.y;
z = dest.z;
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index a5bd0861b04..d6144bfcc3a 100755
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -83,24 +83,25 @@ class MotionMaster //: private std::stack<MovementGenerator *>
private:
//typedef std::stack<MovementGenerator *> Impl;
typedef MovementGenerator* _Ty;
- _Ty Impl[MAX_MOTION_SLOT];
- bool needInit[MAX_MOTION_SLOT];
- typedef std::vector<_Ty> ExpireList;
- int i_top;
- void pop() { Impl[i_top] = NULL; --i_top; }
- void push(_Ty _Val) { ++i_top; Impl[i_top] = _Val; }
+ void pop()
+ {
+ Impl[_top] = NULL;
+ while (!top())
+ --_top;
+ }
+ void push(_Ty _Val) { ++_top; Impl[_top] = _Val; }
- bool needInitTop() const { return needInit[i_top]; }
+ bool needInitTop() const { return _needInit[_top]; }
void InitTop();
public:
- explicit MotionMaster(Unit* unit) : i_top(-1), i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE)
+ explicit MotionMaster(Unit* unit) : _expList(NULL), _top(-1), _owner(unit), _cleanFlag(MMCF_NONE)
{
for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
{
Impl[i] = NULL;
- needInit[i] = true;
+ _needInit[i] = true;
}
}
~MotionMaster();
@@ -108,9 +109,9 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void Initialize();
void InitDefault();
- bool empty() const { return (i_top < 0); }
- int size() const { return i_top + 1; }
- _Ty top() const { return Impl[i_top]; }
+ bool empty() const { return (_top < 0); }
+ int size() const { return _top + 1; }
+ _Ty top() const { return Impl[_top]; }
_Ty GetMotionSlot(int slot) const { return Impl[slot]; }
void DirectDelete(_Ty curr);
@@ -119,12 +120,12 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void UpdateMotion(uint32 diff);
void Clear(bool reset = true)
{
- if (m_cleanFlag & MMCF_UPDATE)
+ if (_cleanFlag & MMCF_UPDATE)
{
if (reset)
- m_cleanFlag |= MMCF_RESET;
+ _cleanFlag |= MMCF_RESET;
else
- m_cleanFlag &= ~MMCF_RESET;
+ _cleanFlag &= ~MMCF_RESET;
DelayedClean();
}
else
@@ -132,12 +133,12 @@ class MotionMaster //: private std::stack<MovementGenerator *>
}
void MovementExpired(bool reset = true)
{
- if (m_cleanFlag & MMCF_UPDATE)
+ if (_cleanFlag & MMCF_UPDATE)
{
if (reset)
- m_cleanFlag |= MMCF_RESET;
+ _cleanFlag |= MMCF_RESET;
else
- m_cleanFlag &= ~MMCF_RESET;
+ _cleanFlag &= ~MMCF_RESET;
DelayedExpire();
}
else
@@ -187,9 +188,13 @@ class MotionMaster //: private std::stack<MovementGenerator *>
void DirectExpire(bool reset);
void DelayedExpire();
- Unit *i_owner;
- ExpireList* m_expList;
- uint8 m_cleanFlag;
+ typedef std::vector<_Ty> ExpireList;
+ ExpireList* _expList;
+ _Ty Impl[MAX_MOTION_SLOT];
+ int _top;
+ Unit* _owner;
+ bool _needInit[MAX_MOTION_SLOT];
+ uint8 _cleanFlag;
};
#endif
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
index ed5b73dd378..216afbb2b20 100755
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
@@ -157,7 +157,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
y = temp_y;
return true;
}
- float new_z = _map->GetHeight(temp_x, temp_y, z, true);
+ float new_z = _map->GetHeight(owner.GetPhaseMask(), temp_x, temp_y, z, true);
if (new_z <= INVALID_HEIGHT)
continue;
@@ -169,8 +169,8 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
if (!(new_z - z) || distance / fabs(new_z - z) > 1.0f)
{
- float new_z_left = _map->GetHeight(temp_x + 1.0f*cos(angle+static_cast<float>(M_PI/2)),temp_y + 1.0f*sin(angle+static_cast<float>(M_PI/2)),z,true);
- float new_z_right = _map->GetHeight(temp_x + 1.0f*cos(angle-static_cast<float>(M_PI/2)),temp_y + 1.0f*sin(angle-static_cast<float>(M_PI/2)),z,true);
+ float new_z_left = _map->GetHeight(owner.GetPhaseMask(), temp_x + 1.0f*cos(angle+static_cast<float>(M_PI/2)),temp_y + 1.0f*sin(angle+static_cast<float>(M_PI/2)),z,true);
+ float new_z_right = _map->GetHeight(owner.GetPhaseMask(), temp_x + 1.0f*cos(angle-static_cast<float>(M_PI/2)),temp_y + 1.0f*sin(angle-static_cast<float>(M_PI/2)),z,true);
if (fabs(new_z_left - new_z) < 1.2f && fabs(new_z_right - new_z) < 1.2f)
{
x = temp_x;
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
index dc47898352e..5725aec54f6 100755
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
@@ -57,7 +57,7 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner)
owner.ClearUnitState(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE);
}
-bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32 time_diff)
+bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32 /*time_diff*/)
{
arrived = owner.movespline->Finalized();
return !arrived;
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index 02f9ebce847..c565e150740 100755
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -41,7 +41,7 @@ void PointMovementGenerator<T>::Initialize(T &unit)
}
template<class T>
-bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
+bool PointMovementGenerator<T>::Update(T &unit, const uint32 & /*diff*/)
{
if (!&unit)
return false;
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index 22adc7be92f..b65fa210723 100755
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
@@ -33,11 +33,10 @@
#endif
template<>
-void RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
+void RandomMovementGenerator<Creature>::_setRandomLocation(Creature& creature)
{
- float respX, respY, respZ, respO, currZ, destX, destY, destZ, travelDistZ;
+ float respX, respY, respZ, respO, destX, destY, destZ, travelDistZ;
creature.GetHomePosition(respX, respY, respZ, respO);
- currZ = creature.GetPositionZ();
Map const* map = creature.GetBaseMap();
// For 2D/3D system selection
@@ -78,17 +77,17 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
// The fastest way to get an accurate result 90% of the time.
// Better result can be obtained like 99% accuracy with a ray light, but the cost is too high and the code is too long.
- destZ = map->GetHeight(destX, destY, respZ+travelDistZ-2.0f, false);
+ destZ = map->GetHeight(creature.GetPhaseMask(), destX, destY, respZ+travelDistZ-2.0f, false);
if (fabs(destZ - respZ) > travelDistZ) // Map check
{
// Vmap Horizontal or above
- destZ = map->GetHeight(destX, destY, respZ - 2.0f, true);
+ destZ = map->GetHeight(creature.GetPhaseMask(), destX, destY, respZ - 2.0f, true);
if (fabs(destZ - respZ) > travelDistZ)
{
// Vmap Higher
- destZ = map->GetHeight(destX, destY, respZ+travelDistZ-2.0f, true);
+ destZ = map->GetHeight(creature.GetPhaseMask(), destX, destY, respZ+travelDistZ-2.0f, true);
// let's forget this bad coords where a z cannot be find and retry at next tick
if (fabs(destZ - respZ) > travelDistZ)
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index 964b4402438..064a8fc8297 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -38,15 +38,18 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
return;
float x, y, z;
-
- if (i_offset && i_target->IsWithinDistInMap(&owner,2*i_offset))
- {
- if (!owner.movespline->Finalized())
- return;
-
- owner.GetPosition(x, y, z);
- }
- else if (!i_offset)
+ //! Following block of code deleted by MrSmite in issue 4891
+ //! Code kept for learning and diagnostical purposes
+//
+// if (i_offset && i_target->IsWithinDistInMap(&owner,2*i_offset))
+// {
+// if (!owner.movespline->Finalized())
+// return;
+//
+// owner.GetPosition(x, y, z);
+// }
+// else
+ if (!i_offset)
{
if (i_target->IsWithinMeleeRange(&owner))
return;
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
index bf2eecc89f6..b851dbc0e05 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
@@ -39,8 +39,9 @@ class TargetedMovementGeneratorMedium
{
protected:
TargetedMovementGeneratorMedium(Unit &target, float offset, float angle) :
- TargetedMovementGeneratorBase(target), i_offset(offset), i_angle(angle),
- i_recalculateTravel(false), i_targetReached(false), i_recheckDistance(0)
+ TargetedMovementGeneratorBase(target), i_recheckDistance(0),
+ i_offset(offset), i_angle(angle),
+ i_recalculateTravel(false), i_targetReached(false)
{
}
~TargetedMovementGeneratorMedium() {}
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 55cf3c28d46..fb2249c508e 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -78,7 +78,7 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature& creature)
if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
{
- sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Creature movement start script %u at point %u for %u.", i_path->at(i_currentNode)->event_id, i_currentNode, creature.GetGUID());
+ sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Creature movement start script %u at point %u for "UI64FMTD".", i_path->at(i_currentNode)->event_id, i_currentNode, creature.GetGUID());
creature.GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, &creature, NULL/*, false*/);
}
@@ -111,8 +111,8 @@ bool WaypointMovementGenerator<Creature>::StartMove(Creature &creature)
m_isArrivalDone = false;
- creature.AddUnitState(UNIT_STATE_ROAMING_MOVE);
-
+ creature.AddUnitState(UNIT_STATE_ROAMING_MOVE);
+
Movement::MoveSplineInit init(creature);
init.MoveTo(node->x, node->y, node->z);
@@ -147,7 +147,7 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
if (CanMove(diff))
return StartMove(creature);
}
- else
+ else
{
if (creature.IsStopped())
Stop(STOP_TIME_FOR_PLAYER);
@@ -155,7 +155,7 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
{
OnArrived(creature);
return StartMove(creature);
- }
+ }
}
return true;
}
@@ -201,20 +201,17 @@ void FlightPathMovementGenerator::Initialize(Player &player)
InitEndGridInfo();
}
-void FlightPathMovementGenerator::Finalize(Player & player)
+void FlightPathMovementGenerator::Finalize(Player& player)
{
// remove flag to prevent send object build movement packets for flight state and crash (movement generator already not at top of stack)
player.ClearUnitState(UNIT_STATE_IN_FLIGHT);
player.Dismount();
- player.RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
+ player.RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
- if(player.m_taxi.empty())
+ if (player.m_taxi.empty())
{
player.getHostileRefManager().setOnlineOfflineState(true);
- if(player.pvpInfo.inHostileArea)
- player.CastSpell(&player, 2479, true);
-
// update z position to ground and orientation for landing point
// this prevent cheating with landing point at lags
// when client side flight end early in comparison server side
@@ -243,7 +240,7 @@ void FlightPathMovementGenerator::Reset(Player & player)
init.Launch();
}
-bool FlightPathMovementGenerator::Update(Player &player, const uint32 diff)
+bool FlightPathMovementGenerator::Update(Player &player, const uint32 /*diff*/)
{
uint32 pointId = (uint32)player.movespline->currentPathIdx();
if (pointId > i_currentNode)
@@ -296,7 +293,7 @@ bool FlightPathMovementGenerator::GetResetPosition(Player&, float& x, float& y,
x = node.x; y = node.y; z = node.z;
return true;
}
-
+
void FlightPathMovementGenerator::InitEndGridInfo()
{
/*! Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
index aa6d327db3b..9c2475267f6 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
@@ -42,7 +42,7 @@ template<class T, class P>
class PathMovementBase
{
public:
- PathMovementBase() : i_currentNode(0), i_path(NULL) {}
+ PathMovementBase() : i_path(NULL), i_currentNode(0) {}
virtual ~PathMovementBase() {};
// template pattern, not defined .. override required
@@ -63,7 +63,8 @@ class WaypointMovementGenerator<Creature>
public PathMovementBase<Creature, WaypointPath const*>
{
public:
- WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true) : i_nextMoveTime(0), path_id(_path_id), m_isArrivalDone(false), repeating(_repeating) {}
+ WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true)
+ : i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) {}
~WaypointMovementGenerator() { i_path = NULL; }
void Initialize(Creature &);
void Finalize(Creature &);
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index 4eaa6b57b36..5d0344f9769 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -187,7 +187,7 @@ void MoveSpline::Initialize(const MoveSplineInitArgs& args)
}
MoveSpline::MoveSpline() : m_Id(0), time_passed(0),
- vertical_acceleration(0.f), effect_start_time(0), point_Idx(0), point_Idx_offset(0), initialOrientation(0.f)
+ vertical_acceleration(0.f), initialOrientation(0.f), effect_start_time(0), point_Idx(0), point_Idx_offset(0)
{
splineflags.done = true;
}
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index 4b8dbcc8ee3..d4b19b21634 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -47,7 +47,6 @@ namespace Movement
Result_NextCycle = 0x04,
Result_NextSegment = 0x08,
};
- #pragma region fields
friend class PacketBuilder;
protected:
MySpline spline;
@@ -88,7 +87,6 @@ namespace Movement
void _Finalize();
void _Interrupt() { splineflags.done = true;}
- #pragma endregion
public:
void Initialize(const MoveSplineInitArgs&);
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index de91f63c30a..33973064e09 100644
--- a/src/server/game/Movement/Spline/MoveSplineFlag.h
+++ b/src/server/game/Movement/Spline/MoveSplineFlag.h
@@ -98,14 +98,14 @@ namespace Movement
void operator &= (uint32 f) { raw() &= f;}
void operator |= (uint32 f) { raw() |= f;}
- void EnableAnimation(uint8 anim) { raw() = raw() & ~(Mask_Animations|Falling|Parabolic) | Animation|anim;}
- void EnableParabolic() { raw() = raw() & ~(Mask_Animations|Falling|Animation) | Parabolic;}
- void EnableFalling() { raw() = raw() & ~(Mask_Animations|Parabolic|Animation) | Falling;}
- void EnableFlying() { raw() = raw() & ~Catmullrom | Flying; }
- void EnableCatmullRom() { raw() = raw() & ~Flying | Catmullrom; }
- void EnableFacingPoint() { raw() = raw() & ~Mask_Final_Facing | Final_Point;}
- void EnableFacingAngle() { raw() = raw() & ~Mask_Final_Facing | Final_Angle;}
- void EnableFacingTarget() { raw() = raw() & ~Mask_Final_Facing | Final_Target;}
+ void EnableAnimation(uint8 anim) { raw() = (raw() & ~(Mask_Animations|Falling|Parabolic)) | Animation|anim;}
+ void EnableParabolic() { raw() = (raw() & ~(Mask_Animations|Falling|Animation)) | Parabolic;}
+ void EnableFalling() { raw() = (raw() & ~(Mask_Animations|Parabolic|Animation)) | Falling;}
+ void EnableFlying() { raw() = (raw() & ~Catmullrom) | Flying; }
+ void EnableCatmullRom() { raw() = (raw() & ~Flying) | Catmullrom; }
+ void EnableFacingPoint() { raw() = (raw() & ~Mask_Final_Facing) | Final_Point;}
+ void EnableFacingAngle() { raw() = (raw() & ~Mask_Final_Facing) | Final_Angle;}
+ void EnableFacingTarget() { raw() = (raw() & ~Mask_Final_Facing) | Final_Target;}
uint8 animId : 8;
bool done : 1;
diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp
index 14c1bd0c117..6970acf5415 100644
--- a/src/server/game/Movement/Spline/Spline.cpp
+++ b/src/server/game/Movement/Spline/Spline.cpp
@@ -56,7 +56,6 @@ SplineBase::InitMethtod SplineBase::initializers[SplineBase::ModesEnd] =
};
///////////
-#pragma region evaluation methtods
using G3D::Matrix4;
static const Matrix4 s_catmullRomCoeffs(
@@ -199,7 +198,6 @@ float SplineBase::SegLengthBezier3(index_type index) const
}
return length;
}
-#pragma endregion
void SplineBase::init_spline(const Vector3 * controls, index_type count, EvaluationMode m)
{
diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h
index 28876b220d4..627cdcf3e3b 100644
--- a/src/server/game/Movement/Spline/Spline.h
+++ b/src/server/game/Movement/Spline/Spline.h
@@ -39,7 +39,6 @@ public:
ModesEnd
};
- #pragma region fields
protected:
ControlArray points;
@@ -84,10 +83,9 @@ protected:
void UninitializedSpline() const { ASSERT(false);}
- #pragma endregion
public:
- explicit SplineBase() : m_mode(UninitializedMode), index_lo(0), index_hi(0), cyclic(false) {}
+ explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) {}
/** Caclulates the position for given segment Idx, and percent of segment length t
@param t - percent of segment length, assumes that t in range [0, 1]
@@ -138,13 +136,11 @@ class Spline : public SplineBase
public:
typedef length_type LengthType;
typedef std::vector<length_type> LengthArray;
- #pragma region fields
protected:
LengthArray lengths;
index_type computeIndexInBounds(length_type length) const;
- #pragma endregion
public:
explicit Spline(){}
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 1a0b21c9615..abd8ebbb302 100755
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -342,9 +342,14 @@ void Quest::BuildExtraQuestInfo(WorldPacket& data, Player* player) const
data << uint32(0); // 4.x Unk
}
+bool Quest::IsAutoAccept() const
+{
+ return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) ? false : (Flags & QUEST_FLAGS_AUTO_ACCEPT);
+}
+
bool Quest::IsAutoComplete() const
{
- return Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE);
+ return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : (Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE));
}
bool Quest::IsAllowedInRaid() const
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 0edd44328f1..1c8afd2a90b 100755
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -261,6 +261,7 @@ class Quest
uint32 GetQuestStartScript() const { return StartScript; }
uint32 GetQuestCompleteScript() const { return CompleteScript; }
bool IsRepeatable() const { return Flags & QUEST_TRINITY_FLAGS_REPEATABLE; }
+ bool IsAutoAccept() const;
bool IsAutoComplete() const;
uint32 GetFlags() const { return Flags; }
uint32 GetMinimapTargetMark() const { return MinimapTargetMark; }
@@ -271,9 +272,8 @@ class Quest
uint32 GetQuestTurnInPortrait() const { return QuestTurnInPortrait; }
bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; }
bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; }
- bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN); }
+ bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); }
bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
- bool IsAutoAccept() const { return Flags & QUEST_FLAGS_AUTO_ACCEPT; }
bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
bool IsAllowedInRaid() const;
bool IsDFQuest() const { return Flags & QUEST_TRINITY_FLAGS_DF_QUEST; }
@@ -405,17 +405,17 @@ class Quest
struct QuestStatusData
{
- QuestStatusData(): m_status(QUEST_STATUS_NONE), m_explored(false), m_timer(0), m_playercount(0)
+ QuestStatusData(): Status(QUEST_STATUS_NONE), Timer(0), PlayerCount(0), Explored(false)
{
- memset(m_itemcount, 0, QUEST_ITEM_OBJECTIVES_COUNT * sizeof(uint16));
- memset(m_creatureOrGOcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint16));
+ memset(ItemCount, 0, QUEST_ITEM_OBJECTIVES_COUNT * sizeof(uint16));
+ memset(CreatureOrGOCount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint16));
}
- QuestStatus m_status;
- bool m_explored;
- uint32 m_timer;
- uint16 m_itemcount[QUEST_ITEM_OBJECTIVES_COUNT];
- uint16 m_creatureOrGOcount[QUEST_OBJECTIVES_COUNT];
- uint16 m_playercount;
+ QuestStatus Status;
+ uint32 Timer;
+ uint16 ItemCount[QUEST_ITEM_OBJECTIVES_COUNT];
+ uint16 CreatureOrGOCount[QUEST_OBJECTIVES_COUNT];
+ uint16 PlayerCount;
+ bool Explored;
};
#endif
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index d988959f890..b1f38dfb86d 100755
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -45,7 +45,7 @@ bool ReputationMgr::IsAtWar(uint32 faction_id) const
if (!factionEntry)
{
- sLog->outError("ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", m_player->GetName(), faction_id);
+ sLog->outError("ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id);
return 0;
}
@@ -68,7 +68,7 @@ int32 ReputationMgr::GetReputation(uint32 faction_id) const
if (!factionEntry)
{
- sLog->outError("ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", m_player->GetName(), faction_id);
+ sLog->outError("ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName(), faction_id);
return 0;
}
@@ -80,8 +80,8 @@ int32 ReputationMgr::GetBaseReputation(FactionEntry const* factionEntry) const
if (!factionEntry)
return 0;
- uint32 raceMask = m_player->getRaceMask();
- uint32 classMask = m_player->getClassMask();
+ uint32 raceMask = _player->getRaceMask();
+ uint32 classMask = _player->getClassMask();
for (int i=0; i < 4; i++)
{
if ((factionEntry->BaseRepRaceMask[i] & raceMask ||
@@ -124,9 +124,9 @@ ReputationRank ReputationMgr::GetBaseRank(FactionEntry const* factionEntry) cons
void ReputationMgr::ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply)
{
if (apply)
- m_forcedReactions[faction_id] = rank;
+ _forcedReactions[faction_id] = rank;
else
- m_forcedReactions.erase(faction_id);
+ _forcedReactions.erase(faction_id);
}
uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) const
@@ -134,8 +134,8 @@ uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) con
if (!factionEntry)
return 0;
- uint32 raceMask = m_player->getRaceMask();
- uint32 classMask = m_player->getClassMask();
+ uint32 raceMask = _player->getRaceMask();
+ uint32 classMask = _player->getClassMask();
for (int i=0; i < 4; i++)
{
if ((factionEntry->BaseRepRaceMask[i] & raceMask ||
@@ -152,14 +152,14 @@ uint32 ReputationMgr::GetDefaultStateFlags(FactionEntry const* factionEntry) con
void ReputationMgr::SendForceReactions()
{
WorldPacket data;
- data.Initialize(SMSG_SET_FORCED_REACTIONS, 4+m_forcedReactions.size()*(4+4));
- data << uint32(m_forcedReactions.size());
- for (ForcedReactions::const_iterator itr = m_forcedReactions.begin(); itr != m_forcedReactions.end(); ++itr)
+ data.Initialize(SMSG_SET_FORCED_REACTIONS, 4+_forcedReactions.size()*(4+4));
+ data << uint32(_forcedReactions.size());
+ for (ForcedReactions::const_iterator itr = _forcedReactions.begin(); itr != _forcedReactions.end(); ++itr)
{
data << uint32(itr->first); // faction_id (Faction.dbc)
data << uint32(itr->second); // reputation rank
}
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::SendState(FactionState const* faction)
@@ -176,7 +176,7 @@ void ReputationMgr::SendState(FactionState const* faction)
data << (uint32) faction->ReputationListID;
data << (uint32) faction->Standing;
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
if (itr->second.needSend)
{
@@ -191,7 +191,7 @@ void ReputationMgr::SendState(FactionState const* faction)
}
data.put<uint32>(p_count, count);
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::SendInitialReputations()
@@ -201,7 +201,7 @@ void ReputationMgr::SendInitialReputations()
RepListID a = 0;
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
// fill in absent fields
for (; a != itr->first; a++)
@@ -226,33 +226,33 @@ void ReputationMgr::SendInitialReputations()
data << uint32 (0x00000000);
}
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::SendStates()
{
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
SendState(&(itr->second));
}
void ReputationMgr::SendVisible(FactionState const* faction) const
{
- if (m_player->GetSession()->PlayerLoading())
+ if (_player->GetSession()->PlayerLoading())
return;
// make faction visible in reputation list at client
WorldPacket data(SMSG_SET_FACTION_VISIBLE, 4);
data << faction->ReputationListID;
- m_player->SendDirectMessage(&data);
+ _player->SendDirectMessage(&data);
}
void ReputationMgr::Initialize()
{
- m_factions.clear();
- m_visibleFactionCount = 0;
- m_honoredFactionCount = 0;
- m_reveredFactionCount = 0;
- m_exaltedFactionCount = 0;
+ _factions.clear();
+ _visibleFactionCount = 0;
+ _honoredFactionCount = 0;
+ _reveredFactionCount = 0;
+ _exaltedFactionCount = 0;
for (unsigned int i = 1; i < sFactionStore.GetNumRows(); i++)
{
@@ -269,18 +269,18 @@ void ReputationMgr::Initialize()
newFaction.needSave = true;
if (newFaction.Flags & FACTION_FLAG_VISIBLE)
- ++m_visibleFactionCount;
+ ++_visibleFactionCount;
UpdateRankCounters(REP_HOSTILE, GetBaseRank(factionEntry));
- m_factions[newFaction.ReputationListID] = newFaction;
+ _factions[newFaction.ReputationListID] = newFaction;
}
}
}
bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental)
{
- sScriptMgr->OnPlayerReputationChange(m_player, factionEntry->ID, standing, incremental);
+ sScriptMgr->OnPlayerReputationChange(_player, factionEntry->ID, standing, incremental);
bool res = false;
// if spillover definition exists in DB, override DBC
if (const RepSpilloverTemplate* repTemplate = sObjectMgr->GetRepSpilloverTemplate(factionEntry->ID))
@@ -289,7 +289,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
{
if (repTemplate->faction[i])
{
- if (m_player->GetReputationRank(repTemplate->faction[i]) <= ReputationRank(repTemplate->faction_rank[i]))
+ if (_player->GetReputationRank(repTemplate->faction[i]) <= ReputationRank(repTemplate->faction_rank[i]))
{
// bonuses are already given, so just modify standing by rate
int32 spilloverRep = int32(standing * repTemplate->faction_rate[i]);
@@ -309,9 +309,9 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
spillOverRepOut *= factionEntry->spilloverRateOut;
if (FactionEntry const* parent = sFactionStore.LookupEntry(factionEntry->team))
{
- FactionStateList::iterator parentState = m_factions.find(parent->reputationListID);
+ FactionStateList::iterator parentState = _factions.find(parent->reputationListID);
// some team factions have own reputation standing, in this case do not spill to other sub-factions
- if (parentState != m_factions.end() && (parentState->second.Flags & FACTION_FLAG_SPECIAL))
+ if (parentState != _factions.end() && (parentState->second.Flags & FACTION_FLAG_SPECIAL))
{
SetOneFactionReputation(parent, int32(spillOverRepOut), incremental);
}
@@ -338,8 +338,8 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
}
}
// spillover done, update faction itself
- FactionStateList::iterator faction = m_factions.find(factionEntry->reputationListID);
- if (faction != m_factions.end())
+ FactionStateList::iterator faction = _factions.find(factionEntry->reputationListID);
+ if (faction != _factions.end())
{
res = SetOneFactionReputation(factionEntry, standing, incremental);
// only this faction gets reported to client, even if it has no own visible standing
@@ -350,8 +350,8 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental)
{
- FactionStateList::iterator itr = m_factions.find(factionEntry->reputationListID);
- if (itr != m_factions.end())
+ FactionStateList::iterator itr = _factions.find(factionEntry->reputationListID);
+ if (itr != _factions.end())
{
int32 BaseRep = GetBaseReputation(factionEntry);
@@ -381,12 +381,12 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
UpdateRankCounters(old_rank, new_rank);
- m_player->ReputationChanged(factionEntry);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION, factionEntry->ID);
- m_player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION, factionEntry->ID);
+ _player->ReputationChanged(factionEntry);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION, factionEntry->ID);
+ _player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION, factionEntry->ID);
return true;
}
@@ -400,7 +400,7 @@ void ReputationMgr::SetVisible(FactionTemplateEntry const*factionTemplateEntry)
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction))
// Never show factions of the opposing team
- if (!(factionEntry->BaseRepRaceMask[1] & m_player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom))
+ if (!(factionEntry->BaseRepRaceMask[1] & _player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom))
SetVisible(factionEntry);
}
@@ -409,8 +409,8 @@ void ReputationMgr::SetVisible(FactionEntry const* factionEntry)
if (factionEntry->reputationListID < 0)
return;
- FactionStateList::iterator itr = m_factions.find(factionEntry->reputationListID);
- if (itr == m_factions.end())
+ FactionStateList::iterator itr = _factions.find(factionEntry->reputationListID);
+ if (itr == _factions.end())
return;
SetVisible(&itr->second);
@@ -431,15 +431,15 @@ void ReputationMgr::SetVisible(FactionState* faction)
faction->needSend = true;
faction->needSave = true;
- ++m_visibleFactionCount;
+ ++_visibleFactionCount;
SendVisible(faction);
}
void ReputationMgr::SetAtWar(RepListID repListID, bool on)
{
- FactionStateList::iterator itr = m_factions.find(repListID);
- if (itr == m_factions.end())
+ FactionStateList::iterator itr = _factions.find(repListID);
+ if (itr == _factions.end())
return;
// always invisible or hidden faction can't change war state
@@ -470,8 +470,8 @@ void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
void ReputationMgr::SetInactive(RepListID repListID, bool on)
{
- FactionStateList::iterator itr = m_factions.find(repListID);
- if (itr == m_factions.end())
+ FactionStateList::iterator itr = _factions.find(repListID);
+ if (itr == _factions.end())
return;
SetInactive(&itr->second, on);
@@ -512,7 +512,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result)
FactionEntry const* factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16());
if (factionEntry && (factionEntry->reputationListID >= 0))
{
- FactionState* faction = &m_factions[factionEntry->reputationListID];
+ FactionState* faction = &_factions[factionEntry->reputationListID];
// update standing to current
faction->Standing = int32(fields[1].GetUInt32());
@@ -558,12 +558,12 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result)
void ReputationMgr::SaveToDB(SQLTransaction& trans)
{
- for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = _factions.begin(); itr != _factions.end(); ++itr)
{
if (itr->second.needSave)
{
- trans->PAppend("DELETE FROM character_reputation WHERE guid = '%u' AND faction='%u'", m_player->GetGUIDLow(), itr->second.ID);
- trans->PAppend("INSERT INTO character_reputation (guid, faction, standing, flags) VALUES ('%u', '%u', '%i', '%u')", m_player->GetGUIDLow(), itr->second.ID, itr->second.Standing, itr->second.Flags);
+ trans->PAppend("DELETE FROM character_reputation WHERE guid = '%u' AND faction='%u'", _player->GetGUIDLow(), itr->second.ID);
+ trans->PAppend("INSERT INTO character_reputation (guid, faction, standing, flags) VALUES ('%u', '%u', '%i', '%u')", _player->GetGUIDLow(), itr->second.ID, itr->second.Standing, itr->second.Flags);
itr->second.needSave = false;
}
}
@@ -572,16 +572,16 @@ void ReputationMgr::SaveToDB(SQLTransaction& trans)
void ReputationMgr::UpdateRankCounters(ReputationRank old_rank, ReputationRank new_rank)
{
if (old_rank >= REP_EXALTED)
- --m_exaltedFactionCount;
+ --_exaltedFactionCount;
if (old_rank >= REP_REVERED)
- --m_reveredFactionCount;
+ --_reveredFactionCount;
if (old_rank >= REP_HONORED)
- --m_honoredFactionCount;
+ --_honoredFactionCount;
if (new_rank >= REP_EXALTED)
- ++m_exaltedFactionCount;
+ ++_exaltedFactionCount;
if (new_rank >= REP_REVERED)
- ++m_reveredFactionCount;
+ ++_reveredFactionCount;
if (new_rank >= REP_HONORED)
- ++m_honoredFactionCount;
+ ++_honoredFactionCount;
}
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index b73574d288f..84013f7ec20 100755
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
@@ -50,8 +50,8 @@ struct FactionState
{
uint32 ID;
RepListID ReputationListID;
- uint8 Flags;
int32 Standing;
+ uint8 Flags;
bool needSend;
bool needSave;
};
@@ -64,8 +64,8 @@ class Player;
class ReputationMgr
{
public: // constructors and global modifiers
- explicit ReputationMgr(Player* owner) : m_player(owner),
- m_visibleFactionCount(0), m_honoredFactionCount(0), m_reveredFactionCount(0), m_exaltedFactionCount(0) {}
+ explicit ReputationMgr(Player* owner) : _player(owner),
+ _visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0) {}
~ReputationMgr() {}
void SaveToDB(SQLTransaction& trans);
@@ -77,12 +77,12 @@ class ReputationMgr
static ReputationRank ReputationToRank(int32 standing);
public: // accessors
- uint8 GetVisibleFactionCount() const { return m_visibleFactionCount; }
- uint8 GetHonoredFactionCount() const { return m_honoredFactionCount; }
- uint8 GetReveredFactionCount() const { return m_reveredFactionCount; }
- uint8 GetExaltedFactionCount() const { return m_exaltedFactionCount; }
+ uint8 GetVisibleFactionCount() const { return _visibleFactionCount; }
+ uint8 GetHonoredFactionCount() const { return _honoredFactionCount; }
+ uint8 GetReveredFactionCount() const { return _reveredFactionCount; }
+ uint8 GetExaltedFactionCount() const { return _exaltedFactionCount; }
- FactionStateList const& GetStateList() const { return m_factions; }
+ FactionStateList const& GetStateList() const { return _factions; }
FactionState const* GetState(FactionEntry const* factionEntry) const
{
@@ -91,8 +91,8 @@ class ReputationMgr
FactionState const* GetState(RepListID id) const
{
- FactionStateList::const_iterator repItr = m_factions.find (id);
- return repItr != m_factions.end() ? &repItr->second : NULL;
+ FactionStateList::const_iterator repItr = _factions.find (id);
+ return repItr != _factions.end() ? &repItr->second : NULL;
}
bool IsAtWar(uint32 faction_id) const;
@@ -111,8 +111,8 @@ class ReputationMgr
ReputationRank const* GetForcedRankIfAny(FactionTemplateEntry const* factionTemplateEntry) const
{
- ForcedReactions::const_iterator forceItr = m_forcedReactions.find(factionTemplateEntry->faction);
- return forceItr != m_forcedReactions.end() ? &forceItr->second : NULL;
+ ForcedReactions::const_iterator forceItr = _forcedReactions.find(factionTemplateEntry->faction);
+ return forceItr != _forcedReactions.end() ? &forceItr->second : NULL;
}
public: // modifiers
@@ -149,13 +149,13 @@ class ReputationMgr
void SendVisible(FactionState const* faction) const;
void UpdateRankCounters(ReputationRank old_rank, ReputationRank new_rank);
private:
- Player* m_player;
- FactionStateList m_factions;
- ForcedReactions m_forcedReactions;
- uint8 m_visibleFactionCount :8;
- uint8 m_honoredFactionCount :8;
- uint8 m_reveredFactionCount :8;
- uint8 m_exaltedFactionCount :8;
+ Player* _player;
+ FactionStateList _factions;
+ ForcedReactions _forcedReactions;
+ uint8 _visibleFactionCount :8;
+ uint8 _honoredFactionCount :8;
+ uint8 _reveredFactionCount :8;
+ uint8 _exaltedFactionCount :8;
};
#endif
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index c46721db6cd..1207b654817 100755
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -39,6 +39,7 @@ void AddSC_warrior_spell_scripts();
void AddSC_quest_spell_scripts();
void AddSC_item_spell_scripts();
void AddSC_example_spell_scripts();
+void AddSC_holiday_spell_scripts();
void AddSC_SmartSCripts();
@@ -245,7 +246,6 @@ void AddSC_ironforge();
void AddSC_isle_of_queldanas();
void AddSC_loch_modan();
void AddSC_redridge_mountains();
-void AddSC_searing_gorge();
void AddSC_silvermoon_city();
void AddSC_silverpine_forest();
void AddSC_stormwind_city();
@@ -642,6 +642,7 @@ void AddSpellScripts()
AddSC_quest_spell_scripts();
AddSC_item_spell_scripts();
AddSC_example_spell_scripts();
+ AddSC_holiday_spell_scripts();
}
void AddCommandScripts()
@@ -855,7 +856,6 @@ void AddEasternKingdomsScripts()
AddSC_isle_of_queldanas();
AddSC_loch_modan();
AddSC_redridge_mountains();
- AddSC_searing_gorge();
AddSC_silvermoon_city();
AddSC_silverpine_forest();
AddSC_stormwind_city();
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index d5e8f71e1fd..47751338d66 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -395,7 +395,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scri
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -416,7 +416,7 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -433,12 +433,12 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
}
}
-void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsMap::iterator> >& scriptVector)
+void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::iterator> >& scriptVector)
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
scriptVector.reserve(std::distance(bounds.first, bounds.second));
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -1036,14 +1036,12 @@ void ScriptMgr::OnAuctionExpire(AuctionHouseObject* ah, AuctionEntry* entry)
FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionExpire(ah, entry);
}
-bool ScriptMgr::OnConditionCheck(Condition* condition, Player* player, Unit* invoker)
+bool ScriptMgr::OnConditionCheck(Condition* condition, ConditionSourceInfo& sourceInfo)
{
ASSERT(condition);
- ASSERT(player);
- // invoker can be NULL.
- GET_SCRIPT_RET(ConditionScript, condition->mScriptId, tmpscript, true);
- return tmpscript->OnConditionCheck(condition, player, invoker);
+ GET_SCRIPT_RET(ConditionScript, condition->ScriptId, tmpscript, true);
+ return tmpscript->OnConditionCheck(condition, sourceInfo);
}
void ScriptMgr::OnInstall(Vehicle* veh)
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 60052bea0ea..048a7581215 100755
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -62,6 +62,7 @@ class WorldObject;
struct AchievementCriteriaData;
struct AuctionEntry;
+struct ConditionSourceInfo;
struct Condition;
struct ItemTemplate;
struct OutdoorPvPData;
@@ -572,7 +573,7 @@ class ConditionScript : public ScriptObject
bool IsDatabaseBound() const { return true; }
// Called when a single condition is checked for a player.
- virtual bool OnConditionCheck(Condition* /*condition*/, Player* /*player*/, Unit* /*invoker*/) { return true; }
+ virtual bool OnConditionCheck(Condition* /*condition*/, ConditionSourceInfo& /*sourceInfo*/) { return true; }
};
class VehicleScript : public ScriptObject
@@ -938,7 +939,7 @@ class ScriptMgr
public: /* ConditionScript */
- bool OnConditionCheck(Condition* condition, Player* player, Unit* invoker);
+ bool OnConditionCheck(Condition* condition, ConditionSourceInfo& sourceInfo);
public: /* VehicleScript */
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 4ed8f90b10e..707dd65e2ad 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -27,7 +27,6 @@ OpcodeHandler* opcodeTable[NUM_OPCODE_HANDLERS] = { };
/// Correspondence between opcodes and their names
void InitOpcodes()
{
-
#define DEFINE_OPCODE_HANDLER(opcode, status, processing, handler) \
if (opcode == 0) \
sLog->outError("Opcode %s got value 0", #opcode); \
@@ -803,7 +802,7 @@ void InitOpcodes()
//DEFINE_OPCODE_HANDLER(SMSG_AREA_SPIRIT_HEALER_TIME, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(CMSG_GM_UNTEACH, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL );
//DEFINE_OPCODE_HANDLER(SMSG_WARDEN_DATA, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
- //DEFINE_OPCODE_HANDLER(CMSG_WARDEN_DATA, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleWardenDataOpcode );
+ //DEFINE_OPCODE_HANDLER(CMSG_WARDEN_DATA, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleWardenDataOpcode );
//DEFINE_OPCODE_HANDLER(SMSG_GROUP_JOINED_BATTLEGROUND, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide );
//DEFINE_OPCODE_HANDLER(MSG_BATTLEGROUND_PLAYER_POSITIONS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBattlegroundPlayerPositionsOpcode);
//DEFINE_OPCODE_HANDLER(CMSG_PET_STOP_ATTACK, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandlePetStopAttack );
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 978f33c88aa..e93c0eb8102 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -42,6 +42,8 @@
#include "zlib.h"
#include "ScriptMgr.h"
#include "Transport.h"
+#include "WardenWin.h"
+#include "WardenMac.h"
bool MapSessionFilter::Process(WorldPacket* packet)
{
@@ -98,6 +100,8 @@ m_sessionDbLocaleIndex(locale),
m_latency(0), m_TutorialsChanged(false), recruiterId(recruiter),
isRecruiter(isARecruiter), timeLastWhoCommand(0)
{
+ _warden = NULL;
+
if (sock)
{
m_Address = sock->GetRemoteAddress();
@@ -124,6 +128,9 @@ WorldSession::~WorldSession()
m_Socket = NULL;
}
+ if (_warden)
+ delete _warden;
+
///- empty incoming packet queue
WorldPacket* packet = NULL;
while (_recvQueue.next(packet))
@@ -144,6 +151,12 @@ char const* WorldSession::GetPlayerName() const
return GetPlayer() ? GetPlayer()->GetName() : "<none>";
}
+/// Get player guid if available. Use for logging purposes only
+uint32 WorldSession::GetGuidLow() const
+{
+ return GetPlayer() ? GetPlayer()->GetGUIDLow() : 0;
+}
+
/// Send a packet to the client
void WorldSession::SendPacket(WorldPacket const* packet)
{
@@ -349,6 +362,9 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
delete packet;
}
+ if (m_Socket && !m_Socket->IsClosed() && _warden)
+ _warden->Update();
+
ProcessQueryCallbacks();
//check if we are safe to proceed with logout
@@ -360,6 +376,9 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
if (ShouldLogOut(currTime) && !m_playerLoading)
LogoutPlayer(true);
+ if (m_Socket && GetPlayer() && _warden)
+ _warden->Update();
+
///- Cleanup socket pointer if need
if (m_Socket && m_Socket->IsClosed())
{
@@ -520,8 +539,8 @@ void WorldSession::LogoutPlayer(bool Save)
// calls to GetMap in this case may cause crashes
_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->RemovePlayerFromMap(_player, true);
+ if (Map* _map = _player->FindMap())
+ _map->RemovePlayerFromMap(_player, true);
SetPlayer(NULL); // deleted in Remove call
///- Send the 'logout complete' packet to the client
@@ -997,3 +1016,18 @@ void WorldSession::ProcessQueryCallbacks()
_stableSwapCallback.FreeResult();
}
}
+
+void WorldSession::InitWarden(BigNumber* k, std::string os)
+{
+ if (os == "Win")
+ {
+ _warden = new WardenWin();
+ _warden->Init(this, k);
+ }
+ else if (os == "OSX")
+ {
+ // Disabled as it is causing the client to crash
+ // _warden = new WardenMac();
+ // _warden->Init(this, k);
+ }
+}
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index ec2587f8b29..21cc3991b9f 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -29,6 +29,7 @@
#include "DatabaseEnv.h"
#include "World.h"
#include "WorldPacket.h"
+#include "Cryptography/BigNumber.h"
struct ItemTemplate;
struct AuctionEntry;
@@ -46,6 +47,7 @@ class WorldPacket;
class WorldSocket;
class LoginQueryHolder;
class SpellCastTargets;
+class Warden;
struct AreaTableEntry;
struct LfgJoinResultData;
struct LfgLockStatus;
@@ -252,11 +254,14 @@ class WorldSession
uint32 GetAccountId() const { return _accountId; }
Player* GetPlayer() const { return _player; }
char const* GetPlayerName() const;
+ uint32 GetGuidLow() const;
void SetSecurity(AccountTypes security) { _security = security; }
std::string const& GetRemoteAddress() { return m_Address; }
void SetPlayer(Player* player);
uint8 Expansion() const { return m_expansion; }
+ void InitWarden(BigNumber* k, std::string os);
+
/// Session in auth.queue currently
void SetInQueue(bool state) { m_inQueue = state; }
@@ -501,6 +506,7 @@ class WorldSession
void HandleSetActionButtonOpcode(WorldPacket& recvPacket);
void HandleGameObjectUseOpcode(WorldPacket& recPacket);
+ void HandleMeetingStoneInfo(WorldPacket& recPacket);
void HandleGameobjectReportUse(WorldPacket& recvPacket);
void HandleNameQueryOpcode(WorldPacket& recvPacket);
@@ -585,6 +591,7 @@ class WorldSession
void HandleActivateTaxiOpcode(WorldPacket& recvPacket);
void HandleActivateTaxiExpressOpcode(WorldPacket& recvPacket);
void HandleMoveSplineDoneOpcode(WorldPacket& recvPacket);
+ void SendActivateTaxiReply(ActivateTaxiReply reply);
void HandleTabardVendorActivateOpcode(WorldPacket& recvPacket);
void HandleBankerActivateOpcode(WorldPacket& recvPacket);
@@ -950,6 +957,9 @@ class WorldSession
typedef std::list<AddonInfo> AddonsList;
+ // Warden
+ Warden* _warden; // Remains NULL if Warden system is not enabled by config
+
time_t _logoutTime;
bool m_inQueue; // session wait in auth.queue
bool m_playerLoading; // code processed in LoginPlayer
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 881464ce40a..22689e40c2b 100755
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -869,7 +869,8 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
"expansion, " //6
"mutetime, " //7
"locale, " //8
- "recruiter " //9
+ "recruiter, " //9
+ "os "
"FROM account "
"WHERE username = '%s'",
safe_account.c_str());
@@ -926,10 +927,10 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
id = fields[0].GetUInt32();
/*
if (security > SEC_ADMINISTRATOR) // prevent invalid security settings in DB
- security = SEC_ADMINISTRATOR;
- */
+ security = SEC_ADMINISTRATOR;
+ */
- K.SetHexStr (fields[1].GetCString());
+ k.SetHexStr (fields[1].GetCString());
int64 mutetime = fields[7].GetInt64();
//! Negative mutetime indicates amount of seconds to be muted effective on next login - which is now.
@@ -950,6 +951,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
locale = LOCALE_enUS;
uint32 recruiter = fields[9].GetUInt32();
+ std::string os = fields[10].GetString();
// Checks gmlevel per Realm
result = LoginDatabase.PQuery ("SELECT "
@@ -1000,8 +1002,6 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
}
// Check that Key and account name are the same on client and server
- SHA1Hash sha;
-
uint32 t = 0;
uint32 seed = m_Seed;
@@ -1009,7 +1009,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
sha.UpdateData ((uint8 *) & t, 4);
sha.UpdateData ((uint8 *) & clientSeed, 4);
sha.UpdateData ((uint8 *) & seed, 4);
- sha.UpdateBigNumbers (&K, NULL);
+ sha.UpdateBigNumbers (&k, NULL);
sha.Finalize();
std::string address = GetRemoteAddress();
@@ -1037,13 +1037,17 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
// NOTE ATM the socket is single-threaded, have this in mind ...
ACE_NEW_RETURN (m_Session, WorldSession (id, this, AccountTypes(security), expansion, mutetime, locale, recruiter, isRecruiter), -1);
- m_Crypt.Init(&K);
+ m_Crypt.Init(&k);
m_Session->LoadGlobalAccountData();
m_Session->LoadTutorialsData();
packetAddon.rpos(0);
m_Session->ReadAddonsInfo(packetAddon);
+ // Initialize Warden system only if it is enabled by config
+ if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
+ m_Session->InitWarden(&k, os);
+
// Sleep this Network thread for
uint32 sleepTime = sWorld->getIntConfig(CONFIG_SESSION_ADD_DELAY);
ACE_OS::sleep (ACE_Time_Value (0, sleepTime));
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index b3b4cf4a30d..273fcb4f049 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -419,10 +419,10 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
};
AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* caster):
-m_base(base), m_spellInfo(base->GetSpellInfo()), m_effIndex(effIndex),
-m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[m_effIndex].BasePoints),
-m_canBeRecalculated(true), m_spellmod(NULL), m_isPeriodic(false),
-m_periodicTimer(0), m_tickNumber(0)
+m_base(base), m_spellInfo(base->GetSpellInfo()),
+m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[effIndex].BasePoints),
+m_spellmod(NULL), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
+m_canBeRecalculated(true), m_isPeriodic(false)
{
CalculatePeriodic(caster, true, false);
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 930dfba4289..28a5beafa2c 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -95,18 +95,19 @@ class AuraEffect
Aura* const m_base;
SpellInfo const* const m_spellInfo;
- uint8 const m_effIndex;
int32 const m_baseAmount;
int32 m_amount;
- bool m_canBeRecalculated;
SpellModifier* m_spellmod;
- bool m_isPeriodic;
int32 m_periodicTimer;
int32 m_amplitude;
uint32 m_tickNumber;
+
+ uint8 const m_effIndex;
+ bool m_canBeRecalculated;
+ bool m_isPeriodic;
private:
bool IsPeriodicTickCrit(Unit* target, Unit const* caster) const;
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index d20411eb8a6..6015a944bdb 100755
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -37,8 +37,8 @@
#include "Vehicle.h"
AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 effMask):
-m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE),
-m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(false)
+_target(target), _base(aura), _removeMode(AURA_REMOVE_NONE), _slot(MAX_AURAS),
+_flags(AFLAG_NONE), _effectsToApply(effMask), _needClientUpdate(false)
{
ASSERT(GetTarget() && GetBase());
@@ -70,7 +70,7 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa
// Register Visible Aura
if (slot < MAX_AURAS)
{
- m_slot = slot;
+ _slot = slot;
GetTarget()->SetVisibleAura(slot, this);
SetNeedClientUpdate();
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
@@ -89,7 +89,7 @@ void AuraApplication::_Remove()
if (slot >= MAX_AURAS)
return;
- if (AuraApplication * foundAura = m_target->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID(), GetBase()->GetCastItemGUID()))
+ if (AuraApplication * foundAura = _target->GetAuraApplication(GetBase()->GetId(), GetBase()->GetCasterGUID(), GetBase()->GetCastItemGUID()))
{
// Reuse visible aura slot by aura which is still applied - prevent storing dead pointers
if (slot == foundAura->GetSlot())
@@ -115,7 +115,7 @@ void AuraApplication::_Remove()
void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
{
// mark as selfcasted if needed
- m_flags |= (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE;
+ _flags |= (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE;
// aura is casted by self or an enemy
// one negative effect and we know aura is negative
@@ -130,7 +130,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
break;
}
}
- m_flags |= negativeFound ? AFLAG_NEGATIVE : AFLAG_POSITIVE;
+ _flags |= negativeFound ? AFLAG_NEGATIVE : AFLAG_POSITIVE;
}
// aura is casted by friend
// one positive effect and we know aura is positive
@@ -145,7 +145,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
break;
}
}
- m_flags |= positiveFound ? AFLAG_POSITIVE : AFLAG_NEGATIVE;
+ _flags |= positiveFound ? AFLAG_POSITIVE : AFLAG_NEGATIVE;
}
// there are more auras that require this flag, this is just the beginning
@@ -164,19 +164,19 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
AuraEffect* aurEff = GetBase()->GetEffect(effIndex);
ASSERT(aurEff);
ASSERT(HasEffect(effIndex) == (!apply));
- ASSERT((1<<effIndex) & m_effectsToApply);
+ ASSERT((1<<effIndex) & _effectsToApply);
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
if (apply)
{
- ASSERT(!(m_flags & (1<<effIndex)));
- m_flags |= 1<<effIndex;
+ ASSERT(!(_flags & (1<<effIndex)));
+ _flags |= 1<<effIndex;
aurEff->HandleEffect(this, AURA_EFFECT_HANDLE_REAL, true);
}
else
{
- ASSERT(m_flags & (1<<effIndex));
- m_flags &= ~(1<<effIndex);
+ ASSERT(_flags & (1<<effIndex));
+ _flags &= ~(1<<effIndex);
aurEff->HandleEffect(this, AURA_EFFECT_HANDLE_REAL, false);
// Remove all triggered by aura spells vs unlimited duration
@@ -187,19 +187,19 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
void AuraApplication::BuildUpdatePacket(ByteBuffer& data, bool remove) const
{
- data << uint8(m_slot);
+ data << uint8(_slot);
if (remove)
{
- ASSERT(!m_target->GetVisibleAura(m_slot));
+ ASSERT(!_target->GetVisibleAura(_slot));
data << uint32(0);
return;
}
- ASSERT(m_target->GetVisibleAura(m_slot));
+ ASSERT(_target->GetVisibleAura(_slot));
Aura const* aura = GetBase();
data << uint32(aura->GetId());
- uint32 flags = m_flags;
+ uint32 flags = _flags;
if (aura->GetMaxDuration() > 0 && !(aura->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_HIDE_DURATION))
flags |= AFLAG_DURATION;
data << uint16(flags);
@@ -225,13 +225,13 @@ void AuraApplication::BuildUpdatePacket(ByteBuffer& data, bool remove) const
void AuraApplication::ClientUpdate(bool remove)
{
- m_needClientUpdate = false;
+ _needClientUpdate = false;
WorldPacket data(SMSG_AURA_UPDATE);
data.append(GetTarget()->GetPackGUID());
BuildUpdatePacket(data, remove);
- m_target->SendMessageToSet(&data, true);
+ _target->SendMessageToSet(&data, true);
}
uint8 Aura::BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleEffectMask, WorldObject* owner)
@@ -535,7 +535,13 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
bool addUnit = true;
// check target immunities
- if (itr->first->IsImmunedToSpell(GetSpellInfo())
+ for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
+ {
+ if (itr->first->IsImmunedToSpellEffect(GetSpellInfo(), effIndex))
+ itr->second &= ~(1 << effIndex);
+ }
+ if (!itr->second
+ || itr->first->IsImmunedToSpell(GetSpellInfo())
|| !CanBeAppliedOn(itr->first))
addUnit = false;
@@ -1849,6 +1855,10 @@ bool Aura::CanStackWith(Aura const* existingAura) const
if (!sameCaster)
{
+ // Channeled auras can stack if not forbidden by db or aura type
+ if (existingAura->GetSpellInfo()->IsChanneled())
+ return true;
+
if (m_spellInfo->AttributesEx3 & SPELL_ATTR3_STACK_FOR_DIFF_CASTERS)
return true;
@@ -1870,7 +1880,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const
case SPELL_AURA_OBS_MOD_HEALTH:
case SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE:
// periodic auras which target areas are not allowed to stack this way (replenishment for example)
- if (m_spellInfo->Effects[i].IsArea() || existingSpellInfo->Effects[i].IsArea())
+ if (m_spellInfo->Effects[i].IsTargetingArea() || existingSpellInfo->Effects[i].IsTargetingArea())
break;
return true;
default:
@@ -2050,7 +2060,7 @@ void Aura::TriggerProcOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo)
if (aurApp->HasEffect(i))
// TODO: OnEffectProc hook here (allowing prevention of selected effects)
GetEffect(i)->HandleProc(aurApp, eventInfo);
- // TODO: AfterEffectProc hook here
+ // TODO: AfterEffectProc hook here
// TODO: AfterProc hook here
@@ -2100,6 +2110,30 @@ bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target)
return true;
}
+void Aura::CallScriptDispel(DispelInfo* dispelInfo)
+{
+ for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
+ {
+ (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_DISPEL);
+ std::list<AuraScript::AuraDispelHandler>::iterator hookItrEnd = (*scritr)->OnDispel.end(), hookItr = (*scritr)->OnDispel.begin();
+ for (; hookItr != hookItrEnd ; ++hookItr)
+ (*hookItr).Call(*scritr, dispelInfo);
+ (*scritr)->_FinishScriptCall();
+ }
+}
+
+void Aura::CallScriptAfterDispel(DispelInfo* dispelInfo)
+{
+ for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
+ {
+ (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_AFTER_DISPEL);
+ std::list<AuraScript::AuraDispelHandler>::iterator hookItrEnd = (*scritr)->AfterDispel.end(), hookItr = (*scritr)->AfterDispel.begin();
+ for (; hookItr != hookItrEnd ; ++hookItr)
+ (*hookItr).Call(*scritr, dispelInfo);
+ (*scritr)->_FinishScriptCall();
+ }
+}
+
bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
{
bool preventDefault = false;
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index de743eb2991..2f50d47a79b 100755
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -21,6 +21,7 @@
#include "SpellAuraDefines.h"
#include "SpellInfo.h"
+#include "Unit.h"
class Unit;
class SpellInfo;
@@ -46,13 +47,13 @@ class AuraApplication
friend void Unit::RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode);
friend AuraApplication * Unit::_CreateAuraApplication(Aura* aura, uint8 effMask);
private:
- Unit* const m_target;
- Aura* const m_base;
- uint8 m_slot; // Aura slot on unit
- uint8 m_flags; // Aura info flag
- uint8 m_effectsToApply; // Used only at spell hit to determine which effect should be applied
- AuraRemoveMode m_removeMode:8; // Store info for know remove aura reason
- bool m_needClientUpdate:1;
+ Unit* const _target;
+ Aura* const _base;
+ AuraRemoveMode _removeMode:8; // Store info for know remove aura reason
+ uint8 _slot; // Aura slot on unit
+ uint8 _flags; // Aura info flag
+ uint8 _effectsToApply; // Used only at spell hit to determine which effect should be applied
+ bool _needClientUpdate:1;
explicit AuraApplication(Unit* target, Unit* caster, Aura* base, uint8 effMask);
void _Remove();
@@ -61,22 +62,22 @@ class AuraApplication
void _HandleEffect(uint8 effIndex, bool apply);
public:
- Unit* GetTarget() const { return m_target; }
- Aura* GetBase() const { return m_base; }
+ Unit* GetTarget() const { return _target; }
+ Aura* GetBase() const { return _base; }
- uint8 GetSlot() const { return m_slot; }
- uint8 GetFlags() const { return m_flags; }
- uint8 GetEffectMask() const { return m_flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2); }
- bool HasEffect(uint8 effect) const { ASSERT(effect < MAX_SPELL_EFFECTS); return m_flags & (1<<effect); }
- bool IsPositive() const { return m_flags & AFLAG_POSITIVE; }
- bool IsSelfcasted() const { return m_flags & AFLAG_CASTER; }
- uint8 GetEffectsToApply() const { return m_effectsToApply; }
+ uint8 GetSlot() const { return _slot; }
+ uint8 GetFlags() const { return _flags; }
+ uint8 GetEffectMask() const { return _flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2); }
+ bool HasEffect(uint8 effect) const { ASSERT(effect < MAX_SPELL_EFFECTS); return _flags & (1<<effect); }
+ bool IsPositive() const { return _flags & AFLAG_POSITIVE; }
+ bool IsSelfcasted() const { return _flags & AFLAG_CASTER; }
+ uint8 GetEffectsToApply() const { return _effectsToApply; }
- void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; }
- AuraRemoveMode GetRemoveMode() const {return m_removeMode;}
+ void SetRemoveMode(AuraRemoveMode mode) { _removeMode = mode; }
+ AuraRemoveMode GetRemoveMode() const {return _removeMode;}
- void SetNeedClientUpdate() { m_needClientUpdate = true;}
- bool IsNeedClientUpdate() const { return m_needClientUpdate;}
+ void SetNeedClientUpdate() { _needClientUpdate = true;}
+ bool IsNeedClientUpdate() const { return _needClientUpdate;}
void BuildUpdatePacket(ByteBuffer& data, bool remove) const;
void ClientUpdate(bool remove = false);
};
@@ -186,7 +187,7 @@ class Aura
bool CanStackWith(Aura const* existingAura) const;
// Proc system
- // this subsystem is not yet in use - the core of it is functional, but still some research has to be done
+ // this subsystem is not yet in use - the core of it is functional, but still some research has to be done
// and some dependant problems fixed before it can replace old proc system (for example cooldown handling)
// currently proc system functionality is implemented in Unit::ProcDamageAndSpell
bool IsProcOnCooldown() const;
@@ -201,6 +202,8 @@ class Aura
// AuraScript
void LoadScripts();
bool CallScriptCheckAreaTargetHandlers(Unit* target);
+ void CallScriptDispel(DispelInfo* dispelInfo);
+ void CallScriptAfterDispel(DispelInfo* dispelInfo);
bool CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
bool CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
void CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index c56969b2094..88654dcc4b1 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -593,33 +593,6 @@ Spell::~Spell()
CheckEffectExecuteData();
}
-template<typename T>
-WorldObject* Spell::FindCorpseUsing()
-{
- // non-standard target selection
- float max_range = m_spellInfo->GetMaxRange(false);
-
- CellCoord p(Trinity::ComputeCellCoord(m_caster->GetPositionX(), m_caster->GetPositionY()));
- Cell cell(p);
- cell.SetNoCreate();
-
- WorldObject* result = NULL;
-
- T u_check(m_caster, max_range);
- Trinity::WorldObjectSearcher<T> searcher(m_caster, result, u_check);
-
- TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher);
- cell.Visit(p, grid_searcher, *m_caster->GetMap(), *m_caster, max_range);
-
- if (!result)
- {
- TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher);
- cell.Visit(p, world_searcher, *m_caster->GetMap(), *m_caster, max_range);
- }
-
- return result;
-}
-
void Spell::InitExplicitTargets(SpellCastTargets const& targets)
{
m_targets = targets;
@@ -689,9 +662,41 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets)
m_targets.RemoveSrc();
}
+void Spell::SelectExplicitTargets()
+{
+ // here go all explicit target changes made to explicit targets after spell prepare phase is finished
+ if (Unit* target = m_targets.GetUnitTarget())
+ {
+ // check for explicit target redirection, for Grounding Totem for example
+ if (m_spellInfo->GetExplicitTargetMask() & TARGET_FLAG_UNIT_ENEMY
+ || (m_spellInfo->GetExplicitTargetMask() & TARGET_FLAG_UNIT && !m_spellInfo->IsPositive()))
+ {
+ Unit* redirect;
+ switch (m_spellInfo->DmgClass)
+ {
+ case SPELL_DAMAGE_CLASS_MAGIC:
+ redirect = m_caster->GetMagicHitRedirectTarget(target, m_spellInfo);
+ break;
+ case SPELL_DAMAGE_CLASS_MELEE:
+ case SPELL_DAMAGE_CLASS_RANGED:
+ redirect = m_caster->GetMeleeHitRedirectTarget(target, m_spellInfo);
+ break;
+ default:
+ redirect = NULL;
+ break;
+ }
+ if (redirect && (redirect != target))
+ m_targets.SetUnitTarget(redirect);
+ }
+ }
+}
+
void Spell::SelectSpellTargets()
{
- uint32 processedTargets = 0;
+ // select targets for cast phase
+ SelectExplicitTargets();
+
+ uint32 processedAreaEffectsMask = 0;
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
// not call for empty effect.
@@ -699,9 +704,6 @@ void Spell::SelectSpellTargets()
if (!m_spellInfo->Effects[i].IsEffect())
continue;
- if (processedTargets & (1 << i))
- continue;
-
// set expected type of implicit targets to be sent to client
uint32 implicitTargetMask = GetTargetFlagMask(m_spellInfo->Effects[i].TargetA.GetObjectType()) | GetTargetFlagMask(m_spellInfo->Effects[i].TargetB.GetObjectType());
if (implicitTargetMask & TARGET_FLAG_UNIT)
@@ -709,13 +711,8 @@ void Spell::SelectSpellTargets()
if (implicitTargetMask & (TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_GAMEOBJECT_ITEM))
m_targets.SetTargetFlag(TARGET_FLAG_GAMEOBJECT);
- uint32 targetA = m_spellInfo->Effects[i].TargetA.GetTarget();
- uint32 targetB = m_spellInfo->Effects[i].TargetB.GetTarget();
-
- if (targetA)
- processedTargets |= SelectEffectTargets(i, m_spellInfo->Effects[i].TargetA);
- if (targetB)
- processedTargets |= SelectEffectTargets(i, m_spellInfo->Effects[i].TargetB);
+ SelectEffectImplicitTargets(SpellEffIndex(i), m_spellInfo->Effects[i].TargetA, processedAreaEffectsMask);
+ SelectEffectImplicitTargets(SpellEffIndex(i), m_spellInfo->Effects[i].TargetB, processedAreaEffectsMask);
// Select targets of effect based on effect type
// those are used when no valid target could be added for spell effect based on spell target type
@@ -777,6 +774,938 @@ void Spell::SelectSpellTargets()
}
}
+void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32& processedEffectMask)
+{
+ if (!targetType.GetTarget())
+ return;
+
+ uint32 effectMask = 1 << effIndex;
+ // set the same target list for all effects
+ // some spells appear to need this, however this requires more research
+ switch (targetType.GetSelectionCategory())
+ {
+ case TARGET_SELECT_CATEGORY_NEARBY:
+ case TARGET_SELECT_CATEGORY_CONE:
+ case TARGET_SELECT_CATEGORY_AREA:
+ // targets for effect already selected
+ if (effectMask & processedEffectMask)
+ return;
+ // choose which targets we can select at once
+ for (uint32 j = effIndex + 1; j < MAX_SPELL_EFFECTS; ++j)
+ if (GetSpellInfo()->Effects[effIndex].TargetA.GetTarget() == GetSpellInfo()->Effects[j].TargetA.GetTarget() &&
+ GetSpellInfo()->Effects[effIndex].TargetB.GetTarget() == GetSpellInfo()->Effects[j].TargetB.GetTarget() &&
+ GetSpellInfo()->Effects[effIndex].ImplicitTargetConditions == GetSpellInfo()->Effects[j].ImplicitTargetConditions &&
+ GetSpellInfo()->Effects[effIndex].CalcRadius(m_caster) == GetSpellInfo()->Effects[j].CalcRadius(m_caster))
+ effectMask |= 1 << j;
+ processedEffectMask |= effectMask;
+ break;
+ default:
+ break;
+ }
+
+ switch(targetType.GetSelectionCategory())
+ {
+ case TARGET_SELECT_CATEGORY_CHANNEL:
+ SelectImplicitChannelTargets(effIndex, targetType);
+ break;
+ case TARGET_SELECT_CATEGORY_NEARBY:
+ SelectImplicitNearbyTargets(effIndex, targetType, effectMask);
+ break;
+ case TARGET_SELECT_CATEGORY_CONE:
+ SelectImplicitConeTargets(effIndex, targetType, effectMask);
+ break;
+ case TARGET_SELECT_CATEGORY_AREA:
+ SelectImplicitAreaTargets(effIndex, targetType, effectMask);
+ break;
+ case TARGET_SELECT_CATEGORY_DEFAULT:
+ switch (targetType.GetObjectType())
+ {
+ case TARGET_OBJECT_TYPE_SRC:
+ switch(targetType.GetReferenceType())
+ {
+ case TARGET_REFERENCE_TYPE_CASTER:
+ m_targets.SetSrc(*m_caster);
+ break;
+ default:
+ ASSERT("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_SRC");
+ break;
+ }
+ break;
+ case TARGET_OBJECT_TYPE_DEST:
+ switch(targetType.GetReferenceType())
+ {
+ case TARGET_REFERENCE_TYPE_CASTER:
+ SelectImplicitCasterDestTargets(effIndex, targetType);
+ break;
+ case TARGET_REFERENCE_TYPE_TARGET:
+ SelectImplicitTargetDestTargets(effIndex, targetType);
+ break;
+ case TARGET_REFERENCE_TYPE_DEST:
+ SelectImplicitDestDestTargets(effIndex, targetType);
+ break;
+ default:
+ ASSERT("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST");
+ break;
+ }
+ break;
+ default:
+ switch(targetType.GetReferenceType())
+ {
+ case TARGET_REFERENCE_TYPE_CASTER:
+ SelectImplicitCasterObjectTargets(effIndex, targetType);
+ break;
+ case TARGET_REFERENCE_TYPE_TARGET:
+ SelectImplicitTargetObjectTargets(effIndex, targetType);
+ break;
+ default:
+ ASSERT("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT");
+ break;
+ }
+ break;
+ }
+ break;
+ case TARGET_SELECT_CATEGORY_NYI:
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget());
+ break;
+ default:
+ ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target category");
+ break;
+ }
+}
+
+void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
+{
+ if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER)
+ {
+ ASSERT(false && "Spell::SelectImplicitChannelTargets: received not implemented target reference type");
+ return;
+ }
+
+ Spell* channeledSpell = m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
+ if (!channeledSpell)
+ {
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitChannelTargets: cannot find channel spell for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ return;
+ }
+ switch (targetType.GetTarget())
+ {
+ case TARGET_UNIT_CHANNEL_TARGET:
+ // unit target may be no longer avalible - teleported out of map for example
+ if (Unit* target = Unit::GetUnit(*m_caster, channeledSpell->m_targets.GetUnitTargetGUID()))
+ AddUnitTarget(target, 1 << effIndex);
+ else
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ break;
+ case TARGET_DEST_CHANNEL_TARGET:
+ if (channeledSpell->m_targets.HasDst())
+ m_targets.SetDst(channeledSpell->m_targets);
+ else if (WorldObject* target = ObjectAccessor::GetWorldObject(*m_caster, channeledSpell->m_targets.GetObjectTargetGUID()))
+ m_targets.SetDst(*target);
+ else
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ break;
+ case TARGET_DEST_CHANNEL_CASTER:
+ m_targets.SetDst(*channeledSpell->GetCaster());
+ break;
+ default:
+ ASSERT(false && "Spell::SelectImplicitChannelTargets: received not implemented target type");
+ break;
+ }
+}
+
+void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask)
+{
+ if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER)
+ {
+ ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented target reference type");
+ return;
+ }
+
+ float range = 0.0f;
+ switch (targetType.GetCheckType())
+ {
+ case TARGET_CHECK_ENEMY:
+ range = m_spellInfo->GetMaxRange(false, m_caster, this);
+ break;
+ case TARGET_CHECK_ALLY:
+ case TARGET_CHECK_PARTY:
+ case TARGET_CHECK_RAID:
+ case TARGET_CHECK_RAID_CLASS:
+ range = m_spellInfo->GetMaxRange(true, m_caster, this);
+ break;
+ case TARGET_CHECK_ENTRY:
+ case TARGET_CHECK_DEFAULT:
+ range = m_spellInfo->GetMaxRange(m_spellInfo->IsPositive(), m_caster, this);
+ break;
+ default:
+ ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented selection check type");
+ break;
+ }
+
+ ConditionList* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
+
+ // handle emergency case - try to use other provided targets if no conditions provided
+ if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty()))
+ {
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
+ switch (targetType.GetObjectType())
+ {
+ case TARGET_OBJECT_TYPE_GOBJ:
+ if (m_spellInfo->RequiresSpellFocus)
+ {
+ if (focusObject)
+ AddGOTarget(focusObject, effMask);
+ return;
+ }
+ break;
+ case TARGET_OBJECT_TYPE_DEST:
+ if (m_spellInfo->RequiresSpellFocus)
+ {
+ if (focusObject)
+ m_targets.SetDst(*focusObject);
+ return;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ WorldObject* target = SearchNearbyTarget(range, targetType.GetObjectType(), targetType.GetCheckType(), condList);
+ if (!target)
+ {
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ return;
+ }
+
+ switch (targetType.GetObjectType())
+ {
+ case TARGET_OBJECT_TYPE_UNIT:
+ if (Unit* unitTarget = target->ToUnit())
+ AddUnitTarget(unitTarget, effMask, false);
+ break;
+ case TARGET_OBJECT_TYPE_GOBJ:
+ if (GameObject* gobjTarget = target->ToGameObject())
+ AddGOTarget(gobjTarget, effMask);
+ break;
+ case TARGET_OBJECT_TYPE_DEST:
+ m_targets.SetDst(*target);
+ break;
+ default:
+ ASSERT(false && "Spell::SelectImplicitNearbyTargets: received not implemented target object type");
+ break;
+ }
+
+ SelectImplicitChainTargets(effIndex, targetType, target, effMask);
+}
+
+void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask)
+{
+ if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER)
+ {
+ ASSERT(false && "Spell::SelectImplicitConeTargets: received not implemented target reference type");
+ return;
+ }
+ std::list<WorldObject*> targets;
+ SpellTargetObjectTypes objectType = targetType.GetObjectType();
+ SpellTargetCheckTypes selectionType = targetType.GetCheckType();
+ ConditionList* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
+ float coneAngle = M_PI/2;
+ float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster) * m_spellValue->RadiusMod;
+
+ if (uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList))
+ {
+ Trinity::WorldObjectSpellConeTargetCheck check(coneAngle, radius, m_caster, m_spellInfo, selectionType, condList);
+ Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> searcher(m_caster, targets, check, containerTypeMask);
+ SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> > (searcher, containerTypeMask, m_caster, m_caster, radius);
+
+ if (!targets.empty())
+ {
+ // Other special target selection goes here
+ if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
+ {
+ Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
+ for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
+ if ((*j)->IsAffectedOnSpell(m_spellInfo))
+ maxTargets += (*j)->GetAmount();
+
+ Trinity::RandomResizeList(targets, maxTargets);
+ }
+
+ // for compability with older code - add only unit and go targets
+ // TODO: remove this
+ std::list<Unit*> unitTargets;
+ std::list<GameObject*> gObjTargets;
+
+ for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ {
+ if (Unit* unitTarget = (*itr)->ToUnit())
+ unitTargets.push_back(unitTarget);
+ else if (GameObject* gObjTarget = (*itr)->ToGameObject())
+ gObjTargets.push_back(gObjTarget);
+ }
+
+ CallScriptAfterUnitTargetSelectHandlers(unitTargets, effIndex);
+
+ for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end(); ++itr)
+ AddUnitTarget(*itr, effMask, false);
+
+ for (std::list<GameObject*>::iterator itr = gObjTargets.begin(); itr != gObjTargets.end(); ++itr)
+ AddGOTarget(*itr, effMask);
+ }
+ }
+}
+
+void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask)
+{
+ Unit* referer = NULL;
+ switch (targetType.GetReferenceType())
+ {
+ case TARGET_REFERENCE_TYPE_SRC:
+ case TARGET_REFERENCE_TYPE_DEST:
+ case TARGET_REFERENCE_TYPE_CASTER:
+ referer = m_caster;
+ break;
+ case TARGET_REFERENCE_TYPE_TARGET:
+ referer = m_targets.GetUnitTarget();
+ break;
+ case TARGET_REFERENCE_TYPE_LAST:
+ {
+ // find last added target for this effect
+ for (std::list<TargetInfo>::reverse_iterator ihit = m_UniqueTargetInfo.rbegin(); ihit != m_UniqueTargetInfo.rend(); ++ihit)
+ {
+ if (ihit->effectMask & (1<<effIndex))
+ {
+ referer = ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
+ break;
+ }
+ }
+ break;
+ }
+ default:
+ ASSERT(false && "Spell::SelectImplicitAreaTargets: received not implemented target reference type");
+ return;
+ }
+ if (!referer)
+ return;
+
+ Position const* center = NULL;
+ switch (targetType.GetReferenceType())
+ {
+ case TARGET_REFERENCE_TYPE_SRC:
+ center = m_targets.GetSrc();
+ break;
+ case TARGET_REFERENCE_TYPE_DEST:
+ center = m_targets.GetDst();
+ break;
+ case TARGET_REFERENCE_TYPE_CASTER:
+ case TARGET_REFERENCE_TYPE_TARGET:
+ case TARGET_REFERENCE_TYPE_LAST:
+ center = referer;
+ break;
+ default:
+ ASSERT(false && "Spell::SelectImplicitAreaTargets: received not implemented target reference type");
+ return;
+ }
+ std::list<WorldObject*> targets;
+ float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster) * m_spellValue->RadiusMod;
+ SearchAreaTargets(targets, radius, center, referer, targetType.GetObjectType(), targetType.GetCheckType(), m_spellInfo->Effects[effIndex].ImplicitTargetConditions);
+
+ // Custom entries
+ // TODO: remove those
+ switch (m_spellInfo->Id)
+ {
+ case 46584: // Raise Dead
+ {
+ if (Player* playerCaster = m_caster->ToPlayer())
+ {
+ for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ {
+ switch ((*itr)->GetTypeId())
+ {
+ case TYPEID_UNIT:
+ case TYPEID_PLAYER:
+ {
+ Unit* unitTarget = (*itr)->ToUnit();
+ if (unitTarget->isAlive() || !playerCaster->isHonorOrXPTarget(unitTarget)
+ || ((unitTarget->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0)
+ || (unitTarget->GetDisplayId() != unitTarget->GetNativeDisplayId()))
+ break;
+ AddUnitTarget(unitTarget, effMask, false);
+ // no break;
+ }
+ case TYPEID_CORPSE: // wont work until corpses are allowed in target lists, but at least will send dest in packet
+ m_targets.SetDst(*(*itr));
+ return; // nothing more to do here
+ default:
+ break;
+ }
+ }
+ }
+ return; // don't add targets to target map
+ }
+ // Corpse Explosion
+ case 49158:
+ case 51325:
+ case 51326:
+ case 51327:
+ case 51328:
+ // check if our target is not valid (spell can target ghoul or dead unit)
+ if (!(m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetDisplayId() == m_targets.GetUnitTarget()->GetNativeDisplayId() &&
+ ((m_targets.GetUnitTarget()->GetEntry() == 26125 && m_targets.GetUnitTarget()->GetOwnerGUID() == m_caster->GetGUID())
+ || m_targets.GetUnitTarget()->isDead())))
+ {
+ // remove existing targets
+ CleanupTargetList();
+
+ for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ {
+ switch ((*itr)->GetTypeId())
+ {
+ case TYPEID_UNIT:
+ case TYPEID_PLAYER:
+ if (!(*itr)->ToUnit()->isDead())
+ break;
+ AddUnitTarget((*itr)->ToUnit(), 1 << effIndex, false);
+ return;
+ default:
+ break;
+ }
+ }
+ if (m_caster->GetTypeId() == TYPEID_PLAYER)
+ m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true);
+ SendCastResult(SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW);
+ finish(false);
+ }
+ return;
+ default:
+ break;
+ }
+ std::list<Unit*> unitTargets;
+ std::list<GameObject*> gObjTargets;
+ // for compability with older code - add only unit and go targets
+ // TODO: remove this
+ for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ {
+ if (Unit* unitTarget = (*itr)->ToUnit())
+ unitTargets.push_back(unitTarget);
+ else if (GameObject* gObjTarget = (*itr)->ToGameObject())
+ gObjTargets.push_back(gObjTarget);
+ }
+
+ if (!unitTargets.empty())
+ {
+ // Special target selection for smart heals and energizes
+ uint32 maxSize = 0;
+ int32 power = -1;
+ switch (m_spellInfo->SpellFamilyName)
+ {
+ case SPELLFAMILY_GENERIC:
+ switch (m_spellInfo->Id)
+ {
+ case 52759: // Ancestral Awakening
+ case 71610: // Echoes of Light (Althor's Abacus normal version)
+ case 71641: // Echoes of Light (Althor's Abacus heroic version)
+ maxSize = 1;
+ power = POWER_HEALTH;
+ break;
+ case 54968: // Glyph of Holy Light
+ maxSize = m_spellInfo->MaxAffectedTargets;
+ power = POWER_HEALTH;
+ break;
+ case 57669: // Replenishment
+ // In arenas Replenishment may only affect the caster
+ if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->InArena())
+ {
+ unitTargets.clear();
+ unitTargets.push_back(m_caster);
+ break;
+ }
+ maxSize = 10;
+ power = POWER_MANA;
+ break;
+ default:
+ break;
+ }
+ break;
+ case SPELLFAMILY_PRIEST:
+ if (m_spellInfo->SpellFamilyFlags[0] == 0x10000000) // Circle of Healing
+ {
+ maxSize = m_caster->HasAura(55675) ? 6 : 5; // Glyph of Circle of Healing
+ power = POWER_HEALTH;
+ }
+ else if (m_spellInfo->Id == 64844) // Divine Hymn
+ {
+ maxSize = 3;
+ power = POWER_HEALTH;
+ }
+ else if (m_spellInfo->Id == 64904) // Hymn of Hope
+ {
+ maxSize = 3;
+ power = POWER_MANA;
+ }
+ else
+ break;
+
+ // Remove targets outside caster's raid
+ for (std::list<Unit*>::iterator itr = unitTargets.begin() ; itr != unitTargets.end();)
+ {
+ if (!(*itr)->IsInRaidWith(m_caster))
+ itr = unitTargets.erase(itr);
+ else
+ ++itr;
+ }
+ break;
+ case SPELLFAMILY_DRUID:
+ if (m_spellInfo->SpellFamilyFlags[1] == 0x04000000) // Wild Growth
+ {
+ maxSize = m_caster->HasAura(62970) ? 6 : 5; // Glyph of Wild Growth
+ power = POWER_HEALTH;
+ }
+ else if (m_spellInfo->SpellFamilyFlags[2] == 0x0100) // Starfall
+ {
+ // Remove targets not in LoS or in stealth
+ for (std::list<Unit*>::iterator itr = unitTargets.begin() ; itr != unitTargets.end();)
+ {
+ if ((*itr)->HasStealthAura() || (*itr)->HasInvisibilityAura() || !(*itr)->IsWithinLOSInMap(m_caster))
+ itr = unitTargets.erase(itr);
+ else
+ ++itr;
+ }
+ break;
+ }
+ else
+ break;
+
+ // Remove targets outside caster's raid
+ for (std::list<Unit*>::iterator itr = unitTargets.begin() ; itr != unitTargets.end();)
+ if (!(*itr)->IsInRaidWith(m_caster))
+ itr = unitTargets.erase(itr);
+ else
+ ++itr;
+ break;
+ default:
+ break;
+ }
+
+ if (maxSize && power != -1)
+ {
+ if (Powers(power) == POWER_HEALTH)
+ {
+ if (unitTargets.size() > maxSize)
+ {
+ unitTargets.sort(Trinity::HealthPctOrderPred());
+ unitTargets.resize(maxSize);
+ }
+ }
+ else
+ {
+ for (std::list<Unit*>::iterator itr = unitTargets.begin() ; itr != unitTargets.end();)
+ if ((*itr)->getPowerType() != (Powers)power)
+ itr = unitTargets.erase(itr);
+ else
+ ++itr;
+
+ if (unitTargets.size() > maxSize)
+ {
+ unitTargets.sort(Trinity::PowerPctOrderPred((Powers)power));
+ unitTargets.resize(maxSize);
+ }
+ }
+ }
+
+ // Other special target selection goes here
+ if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
+ {
+ Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
+ for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
+ if ((*j)->IsAffectedOnSpell(m_spellInfo))
+ maxTargets += (*j)->GetAmount();
+
+ if (m_spellInfo->Id == 5246) //Intimidating Shout
+ unitTargets.remove(m_targets.GetUnitTarget());
+ Trinity::RandomResizeList(unitTargets, maxTargets);
+ }
+
+ CallScriptAfterUnitTargetSelectHandlers(unitTargets, effIndex);
+
+ for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end(); ++itr)
+ AddUnitTarget(*itr, effMask, false);
+ }
+
+ if (!gObjTargets.empty())
+ {
+ if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
+ {
+ Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
+ for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
+ if ((*j)->IsAffectedOnSpell(m_spellInfo))
+ maxTargets += (*j)->GetAmount();
+
+ Trinity::RandomResizeList(gObjTargets, maxTargets);
+ }
+ for (std::list<GameObject*>::iterator itr = gObjTargets.begin(); itr != gObjTargets.end(); ++itr)
+ AddGOTarget(*itr, effMask);
+ }
+}
+
+void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
+{
+ switch(targetType.GetTarget())
+ {
+ case TARGET_DEST_CASTER:
+ m_targets.SetDst(*m_caster);
+ return;
+ case TARGET_DEST_HOME:
+ if (Player* playerCaster = m_caster->ToPlayer())
+ m_targets.SetDst(playerCaster->m_homebindX, playerCaster->m_homebindY, playerCaster->m_homebindZ, playerCaster->GetOrientation(), playerCaster->m_homebindMapId);
+ return;
+ case TARGET_DEST_DB:
+ if (SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id))
+ {
+ // TODO: fix this check
+ if (m_spellInfo->HasEffect(SPELL_EFFECT_TELEPORT_UNITS))
+ m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation, (int32)st->target_mapId);
+ else if (st->target_mapId == m_caster->GetMapId())
+ m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation);
+ }
+ else
+ {
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
+ WorldObject* target = m_targets.GetObjectTarget();
+ m_targets.SetDst(target ? *target : *m_caster);
+ }
+ return;
+ case TARGET_DEST_CASTER_FISHING:
+ {
+ float min_dis = m_spellInfo->GetMinRange(true);
+ float max_dis = m_spellInfo->GetMaxRange(true);
+ float dis = (float)rand_norm() * (max_dis - min_dis) + min_dis;
+ float x, y, z, angle;
+ angle = (float)rand_norm() * static_cast<float>(M_PI * 35.0f / 180.0f) - static_cast<float>(M_PI * 17.5f / 180.0f);
+ m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE, dis, angle);
+ m_targets.SetDst(x, y, z, m_caster->GetOrientation());
+ return;
+ }
+ default:
+ break;
+ }
+
+ float dist;
+ float angle = targetType.CalcDirectionAngle();
+ float objSize = m_caster->GetObjectSize();
+ if (targetType.GetTarget() == TARGET_DEST_CASTER_SUMMON)
+ dist = PET_FOLLOW_DIST;
+ else
+ dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
+
+ if (dist < objSize)
+ dist = objSize;
+ else if (targetType.GetTarget() == TARGET_DEST_CASTER_RANDOM)
+ dist = objSize + (dist - objSize) * (float)rand_norm();
+
+ Position pos;
+ if (targetType.GetTarget() == TARGET_DEST_CASTER_FRONT_LEAP)
+ m_caster->GetFirstCollisionPosition(pos, dist, angle);
+ else
+ m_caster->GetNearPosition(pos, dist, angle);
+ m_targets.SetDst(*m_caster);
+ m_targets.ModDst(pos);
+}
+
+void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
+{
+ WorldObject* target = m_targets.GetObjectTarget();
+ switch(targetType.GetTarget())
+ {
+ case TARGET_DEST_TARGET_ENEMY:
+ case TARGET_DEST_TARGET_ANY:
+ m_targets.SetDst(*target);
+ return;
+ default:
+ break;
+ }
+
+ float angle = targetType.CalcDirectionAngle();
+ float objSize = target->GetObjectSize();
+ float dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
+ if (dist < objSize)
+ dist = objSize;
+ else if (targetType.GetTarget() == TARGET_DEST_TARGET_RANDOM)
+ dist = objSize + (dist - objSize) * (float)rand_norm();
+
+ Position pos;
+ target->GetNearPosition(pos, dist, angle);
+ m_targets.SetDst(*target);
+ m_targets.ModDst(pos);
+}
+
+void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
+{
+ // set destination to caster if no dest provided
+ // can only happen if previous destination target could not be set for some reason
+ // (not found nearby target, or channel target for example
+ // maybe we should abort the spell in such case?
+ if (!m_targets.HasDst())
+ m_targets.SetDst(*m_caster);
+
+ switch(targetType.GetTarget())
+ {
+ case TARGET_DEST_DYNOBJ_ENEMY:
+ case TARGET_DEST_DYNOBJ_ALLY:
+ case TARGET_DEST_DYNOBJ_NONE:
+ case TARGET_DEST_DEST:
+ return;
+ case TARGET_DEST_TRAJ:
+ SelectImplicitTrajTargets();
+ return;
+ default:
+ break;
+ }
+
+ float angle = targetType.CalcDirectionAngle();
+ float dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
+ if (targetType.GetTarget() == TARGET_DEST_DEST_RANDOM)
+ dist *= (float)rand_norm();
+
+ Position pos = *m_targets.GetDst();
+ m_caster->MovePosition(pos, dist, angle);
+ m_targets.ModDst(pos);
+}
+
+void Spell::SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
+{
+ switch(targetType.GetTarget())
+ {
+ case TARGET_UNIT_CASTER:
+ AddUnitTarget(m_caster, 1 << effIndex, false);
+ break;
+ case TARGET_UNIT_MASTER:
+ if (Unit* owner = m_caster->GetCharmerOrOwner())
+ AddUnitTarget(owner, 1 << effIndex);
+ break;
+ case TARGET_UNIT_PET:
+ if (Guardian* pet = m_caster->GetGuardianPet())
+ AddUnitTarget(pet, 1 << effIndex);
+ break;
+ case TARGET_UNIT_SUMMONER:
+ if (m_caster->isSummon())
+ if (Unit* unit = m_caster->ToTempSummon()->GetSummoner())
+ AddUnitTarget(unit, 1 << effIndex);
+ break;
+ case TARGET_UNIT_VEHICLE:
+ if (Unit *vehicle = m_caster->GetVehicleBase())
+ AddUnitTarget(vehicle, 1 << effIndex);
+ break;
+ case TARGET_UNIT_PASSENGER_0:
+ case TARGET_UNIT_PASSENGER_1:
+ case TARGET_UNIT_PASSENGER_2:
+ case TARGET_UNIT_PASSENGER_3:
+ case TARGET_UNIT_PASSENGER_4:
+ case TARGET_UNIT_PASSENGER_5:
+ case TARGET_UNIT_PASSENGER_6:
+ case TARGET_UNIT_PASSENGER_7:
+ if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsVehicle())
+ if (Unit *unit = m_caster->GetVehicleKit()->GetPassenger(targetType.GetTarget() - TARGET_UNIT_PASSENGER_0))
+ AddUnitTarget(unit, 1 << effIndex);
+ break;
+ default:
+ break;
+ }
+}
+
+void Spell::SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
+{
+ ASSERT((m_targets.GetObjectTarget() || m_targets.GetItemTarget()) && "Spell::SelectImplicitTargetObjectTargets - no explicit object or item target available!");
+ if (Unit* unit = m_targets.GetUnitTarget())
+ AddUnitTarget(unit, 1 << effIndex);
+ else if (GameObject* gobj = m_targets.GetGOTarget())
+ AddGOTarget(gobj, 1 << effIndex);
+ else
+ AddItemTarget(m_targets.GetItemTarget(), effIndex);
+
+ if (WorldObject* target = m_targets.GetObjectTarget())
+ SelectImplicitChainTargets(effIndex, targetType, target, 1 << effIndex);
+}
+
+void Spell::SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, WorldObject* target, uint32 effMask)
+{
+ uint32 maxTargets = m_spellInfo->Effects[effIndex].ChainTarget;
+ if (Player* modOwner = m_caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, maxTargets, this);
+
+ if (maxTargets > 1)
+ {
+ // mark damage multipliers as used
+ for (uint32 k = effIndex; k < MAX_SPELL_EFFECTS; ++k)
+ if (effMask & (1 << k))
+ m_damageMultipliers[k] = 1.0f;
+ m_applyMultiplierMask |= effMask;
+
+ std::list<WorldObject*> targets;
+ SearchChainTargets(targets, maxTargets - 1, target, targetType.GetObjectType(), targetType.GetCheckType()
+ , m_spellInfo->Effects[effIndex].ImplicitTargetConditions, targetType.GetTarget() == TARGET_UNIT_TARGET_CHAINHEAL_ALLY);
+
+ // for backward compability
+ std::list<Unit*> unitTargets;
+ for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ if (Unit* unitTarget = (*itr)->ToUnit())
+ unitTargets.push_back(unitTarget);
+
+ CallScriptAfterUnitTargetSelectHandlers(unitTargets, effIndex);
+
+ for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end(); ++itr)
+ AddUnitTarget(*itr, effMask, false);
+ }
+}
+
+float tangent(float x)
+{
+ x = tan(x);
+ //if (x < std::numeric_limits<float>::max() && x > -std::numeric_limits<float>::max()) return x;
+ //if (x >= std::numeric_limits<float>::max()) return std::numeric_limits<float>::max();
+ //if (x <= -std::numeric_limits<float>::max()) return -std::numeric_limits<float>::max();
+ if (x < 100000.0f && x > -100000.0f) return x;
+ if (x >= 100000.0f) return 100000.0f;
+ if (x <= 100000.0f) return -100000.0f;
+ return 0.0f;
+}
+
+#define DEBUG_TRAJ(a) //a
+
+void Spell::SelectImplicitTrajTargets()
+{
+ if (!m_targets.HasTraj())
+ return;
+
+ float dist2d = m_targets.GetDist2d();
+ if (!dist2d)
+ return;
+
+ float srcToDestDelta = m_targets.GetDst()->m_positionZ - m_targets.GetSrc()->m_positionZ;
+
+ std::list<WorldObject*> targets;
+ Trinity::WorldObjectSpellTrajTargetCheck check(dist2d, m_targets.GetSrc(), m_caster, m_spellInfo);
+ Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellTrajTargetCheck> searcher(m_caster, targets, check, GRID_MAP_TYPE_MASK_ALL);
+ SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellTrajTargetCheck> > (searcher, GRID_MAP_TYPE_MASK_ALL, m_caster, m_targets.GetSrc(), dist2d);
+ if (targets.empty())
+ return;
+
+ targets.sort(Trinity::ObjectDistanceOrderPred(m_caster));
+
+ float b = tangent(m_targets.GetElevation());
+ float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
+ if (a > -0.0001f)
+ a = 0;
+ DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: a %f b %f", a, b);)
+
+ float bestDist = m_spellInfo->GetMaxRange(false);
+
+ std::list<WorldObject*>::const_iterator itr = targets.begin();
+ for (; itr != targets.end(); ++itr)
+ {
+ if (Unit* unitTarget = (*itr)->ToUnit())
+ if (m_caster == *itr || m_caster->IsOnVehicle(unitTarget) || (unitTarget)->GetVehicle())//(*itr)->IsOnVehicle(m_caster))
+ continue;
+
+ const float size = std::max((*itr)->GetObjectSize() * 0.7f, 1.0f); // 1/sqrt(3)
+ // TODO: all calculation should be based on src instead of m_caster
+ const float objDist2d = m_targets.GetSrc()->GetExactDist2d(*itr) * cos(m_targets.GetSrc()->GetRelativeAngle(*itr));
+ const float dz = (*itr)->GetPositionZ() - m_targets.GetSrc()->m_positionZ;
+
+ DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);)
+
+ float dist = objDist2d - size;
+ float height = dist * (a * dist + b);
+ DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
+ if (dist < bestDist && height < dz + size && height > dz - size)
+ {
+ bestDist = dist > 0 ? dist : 0;
+ break;
+ }
+
+#define CHECK_DIST {\
+ DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
+ if (dist > bestDist)\
+ continue;\
+ if (dist < objDist2d + size && dist > objDist2d - size)\
+ {\
+ bestDist = dist;\
+ break;\
+ }\
+ }
+
+ if (!a)
+ {
+ height = dz - size;
+ dist = height / b;
+ CHECK_DIST;
+
+ height = dz + size;
+ dist = height / b;
+ CHECK_DIST;
+
+ continue;
+ }
+
+ height = dz - size;
+ float sqrt1 = b * b + 4 * a * height;
+ if (sqrt1 > 0)
+ {
+ sqrt1 = sqrt(sqrt1);
+ dist = (sqrt1 - b) / (2 * a);
+ CHECK_DIST;
+ }
+
+ height = dz + size;
+ float sqrt2 = b * b + 4 * a * height;
+ if (sqrt2 > 0)
+ {
+ sqrt2 = sqrt(sqrt2);
+ dist = (sqrt2 - b) / (2 * a);
+ CHECK_DIST;
+
+ dist = (-sqrt2 - b) / (2 * a);
+ CHECK_DIST;
+ }
+
+ if (sqrt1 > 0)
+ {
+ dist = (-sqrt1 - b) / (2 * a);
+ CHECK_DIST;
+ }
+ }
+
+ if (m_targets.GetSrc()->GetExactDist2d(m_targets.GetDst()) > bestDist)
+ {
+ float x = m_targets.GetSrc()->m_positionX + cos(m_caster->GetOrientation()) * bestDist;
+ float y = m_targets.GetSrc()->m_positionY + sin(m_caster->GetOrientation()) * bestDist;
+ float z = m_targets.GetSrc()->m_positionZ + bestDist * (a * bestDist + b);
+
+ if (itr != targets.end())
+ {
+ float distSq = (*itr)->GetExactDistSq(x, y, z);
+ float sizeSq = (*itr)->GetObjectSize();
+ sizeSq *= sizeSq;
+ DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
+ if (distSq > sizeSq)
+ {
+ float factor = 1 - sqrt(sizeSq / distSq);
+ x += factor * ((*itr)->GetPositionX() - x);
+ y += factor * ((*itr)->GetPositionY() - y);
+ z += factor * ((*itr)->GetPositionZ() - z);
+
+ distSq = (*itr)->GetExactDistSq(x, y, z);
+ DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
+ }
+ }
+
+ Position trajDst;
+ trajDst.Relocate(x, y, z, m_caster->GetOrientation());
+ m_targets.ModDst(trajDst);
+ }
+}
+
void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
{
// special case for SPELL_EFFECT_SUMMON_RAF_FRIEND and SPELL_EFFECT_SUMMON_PLAYER
@@ -849,6 +1778,192 @@ void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
}
}
+uint32 Spell::GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList* condList)
+{
+ // this function selects which containers need to be searched for spell target
+ uint32 retMask = GRID_MAP_TYPE_MASK_ALL;
+
+ // filter searchers based on searched object type
+ switch (objType)
+ {
+ case TARGET_OBJECT_TYPE_UNIT:
+ case TARGET_OBJECT_TYPE_UNIT_AND_DEST:
+ case TARGET_OBJECT_TYPE_CORPSE:
+ case TARGET_OBJECT_TYPE_CORPSE_ENEMY:
+ case TARGET_OBJECT_TYPE_CORPSE_ALLY:
+ retMask &= GRID_MAP_TYPE_MASK_PLAYER | GRID_MAP_TYPE_MASK_CORPSE | GRID_MAP_TYPE_MASK_CREATURE;
+ break;
+ case TARGET_OBJECT_TYPE_GOBJ:
+ case TARGET_OBJECT_TYPE_GOBJ_ITEM:
+ retMask &= GRID_MAP_TYPE_MASK_GAMEOBJECT;
+ break;
+ default:
+ break;
+ }
+ if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD))
+ retMask &= ~GRID_MAP_TYPE_MASK_CORPSE;
+ if (m_spellInfo->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS)
+ retMask &= GRID_MAP_TYPE_MASK_CORPSE | GRID_MAP_TYPE_MASK_PLAYER;
+ if (m_spellInfo->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS)
+ retMask &= GRID_MAP_TYPE_MASK_PLAYER;
+
+ if (condList)
+ retMask &= sConditionMgr->GetSearcherTypeMaskForConditionList(*condList);
+ return retMask;
+}
+
+template<class SEARCHER>
+void Spell::SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* referer, Position const* pos, float radius)
+{
+ if (!containerMask)
+ return;
+
+ // search world and grid for possible targets
+ bool searchInGrid = containerMask & (GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_GAMEOBJECT);
+ bool searchInWorld = containerMask & (GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER | GRID_MAP_TYPE_MASK_CORPSE);
+ if (searchInGrid || searchInWorld)
+ {
+ float x,y;
+ x = pos->GetPositionX();
+ y = pos->GetPositionY();
+
+ CellCoord p(Trinity::ComputeCellCoord(x, y));
+ Cell cell(p);
+ cell.SetNoCreate();
+
+ Map& map = *(referer->GetMap());
+
+ if (searchInWorld)
+ {
+ TypeContainerVisitor<SEARCHER, WorldTypeMapContainer> world_object_notifier(searcher);
+ cell.Visit(p, world_object_notifier, map, radius, x, y);
+ }
+ if (searchInGrid)
+ {
+ TypeContainerVisitor<SEARCHER, GridTypeMapContainer > grid_object_notifier(searcher);
+ cell.Visit(p, grid_object_notifier, map, radius, x , y);
+ }
+ }
+}
+
+WorldObject* Spell::SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList)
+{
+ WorldObject* target = NULL;
+ uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList);
+ if (!containerTypeMask)
+ return NULL;
+ Trinity::WorldObjectSpellNearbyTargetCheck check(range, m_caster, m_spellInfo, selectionType, condList);
+ Trinity::WorldObjectLastSearcher<Trinity::WorldObjectSpellNearbyTargetCheck> searcher(m_caster, target, check, containerTypeMask);
+ SearchTargets<Trinity::WorldObjectLastSearcher<Trinity::WorldObjectSpellNearbyTargetCheck> > (searcher, containerTypeMask, m_caster, m_caster, range);
+ return target;
+}
+
+void Spell::SearchAreaTargets(std::list<WorldObject*>& targets, float range, Position const* position, Unit* referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList)
+{
+ uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList);
+ if (!containerTypeMask)
+ return;
+ Trinity::WorldObjectSpellAreaTargetCheck check(range, position, m_caster, referer, m_spellInfo, selectionType, condList);
+ Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> searcher(m_caster, targets, check, containerTypeMask);
+ SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> > (searcher, containerTypeMask, m_caster, m_caster, range);
+}
+
+void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTargets, WorldObject* target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, ConditionList* condList, bool isChainHeal)
+{
+ // max dist for jump target selection
+ float jumpRadius = 0.0f;
+ switch (m_spellInfo->DmgClass)
+ {
+ case SPELL_DAMAGE_CLASS_RANGED:
+ // 7.5y for multi shot
+ jumpRadius = 7.5f;
+ break;
+ case SPELL_DAMAGE_CLASS_MELEE:
+ // 5y for swipe, cleave and similar
+ jumpRadius = 5.0f;
+ break;
+ case SPELL_DAMAGE_CLASS_NONE:
+ case SPELL_DAMAGE_CLASS_MAGIC:
+ // 12.5y for chain heal spell since 3.2 patch
+ if (isChainHeal)
+ jumpRadius = 12.5f;
+ // 10y as default for magic chain spells
+ else
+ jumpRadius = 10.0f;
+ break;
+ }
+
+ // chain lightning/heal spells and similar - allow to jump at larger distance and go out of los
+ bool isBouncingFar = (m_spellInfo->AttributesEx4 & SPELL_ATTR4_AREA_TARGET_CHAIN
+ || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_NONE
+ || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC);
+
+ // max dist which spell can reach
+ float searchRadius = jumpRadius;
+ if (isBouncingFar)
+ searchRadius *= chainTargets;
+
+ std::list<WorldObject*> tempTargets;
+ SearchAreaTargets(tempTargets, searchRadius, target, m_caster, objectType, selectType, condList);
+ tempTargets.remove(target);
+
+ // remove targets which are always invalid for chain spells
+ // for some spells allow only chain targets in front of caster (swipe for example)
+ if (!isBouncingFar)
+ {
+ for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end();)
+ {
+ std::list<WorldObject*>::iterator checkItr = itr++;
+ if (!m_caster->HasInArc(static_cast<float>(M_PI), *checkItr))
+ tempTargets.erase(checkItr);
+ }
+ }
+
+ while (chainTargets)
+ {
+ // try to get unit for next chain jump
+ std::list<WorldObject*>::iterator foundItr = tempTargets.end();
+ // get unit with highest hp deficit in dist
+ if (isChainHeal)
+ {
+ uint32 maxHPDeficit = 0;
+ for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end(); ++itr)
+ {
+ if (Unit* unitTarget = (*itr)->ToUnit())
+ {
+ uint32 deficit = unitTarget->GetMaxHealth() - unitTarget->GetHealth();
+ if ((deficit > maxHPDeficit || foundItr == tempTargets.end()) && target->IsWithinDist(unitTarget, jumpRadius) && target->IsWithinLOSInMap(unitTarget))
+ {
+ foundItr = itr;
+ maxHPDeficit = deficit;
+ }
+ }
+ }
+ }
+ // get closest object
+ else
+ {
+ for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end(); ++itr)
+ {
+ if (foundItr == tempTargets.end())
+ {
+ if ((!isBouncingFar || target->IsWithinDist(*itr, jumpRadius)) && target->IsWithinLOSInMap(*itr))
+ foundItr = itr;
+ }
+ else if (target->GetDistanceOrder(*itr, *foundItr) && target->IsWithinLOSInMap(*itr))
+ foundItr = itr;
+ }
+ }
+ // not found any valid target - chain ends
+ if (foundItr == tempTargets.end())
+ break;
+ target = *foundItr;
+ tempTargets.erase(foundItr);
+ targets.push_back(target);
+ --chainTargets;
+ }
+}
+
void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
{
//==========================================================================================
@@ -1402,13 +2517,17 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
}
}
-SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool scaleAura)
+SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleAura)
{
if (!unit || !effectMask)
return SPELL_MISS_EVADE;
- // Recheck immune (only for delayed spells)
- if (m_spellInfo->Speed && (unit->IsImmunedToDamage(m_spellInfo) || unit->IsImmunedToSpell(m_spellInfo)))
+ // For delayed spells immunity may be applied between missile launch and hit - check immunity for that case
+ // disable effects to which unit is immune
+ for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
+ if (effectMask & (1 << effectNumber) && unit->IsImmunedToSpellEffect(m_spellInfo, effectNumber))
+ effectMask &= ~(1 << effectNumber);
+ if (!effectMask || (m_spellInfo->Speed && (unit->IsImmunedToDamage(m_spellInfo) || unit->IsImmunedToSpell(m_spellInfo))))
return SPELL_MISS_IMMUNE;
PrepareScriptHitHandlers();
@@ -1563,7 +2682,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
}
for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
- if (effectMask & (1 << effectNumber) && !unit->IsImmunedToSpellEffect(m_spellInfo, effectNumber)) //Handle effect only if the target isn't immune.
+ if (effectMask & (1 << effectNumber))
HandleEffects(unit, NULL, NULL, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
return SPELL_MISS_NONE;
@@ -1771,1082 +2890,6 @@ struct ChainHealingOrder : public std::binary_function<const Unit*, const Unit*,
}
};
-void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uint32 num, SpellTargets TargetType)
-{
- Unit* cur = m_targets.GetUnitTarget();
- if (!cur)
- return;
-
- //FIXME: This very like horrible hack and wrong for most spells
- if (m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE)
- max_range += num * CHAIN_SPELL_JUMP_RADIUS;
-
- std::list<Unit*> tempUnitMap;
- if (TargetType == SPELL_TARGETS_CHAINHEAL)
- {
- SearchAreaTarget(tempUnitMap, max_range, PUSH_CHAIN, SPELL_TARGETS_ALLY);
- tempUnitMap.sort(ChainHealingOrder(m_caster));
- }
- else
- SearchAreaTarget(tempUnitMap, max_range, PUSH_CHAIN, TargetType);
- tempUnitMap.remove(cur);
-
- while (num)
- {
- TagUnitMap.push_back(cur);
- --num;
-
- if (tempUnitMap.empty())
- break;
-
- std::list<Unit*>::iterator next;
-
- if (TargetType == SPELL_TARGETS_CHAINHEAL)
- {
- next = tempUnitMap.begin();
- while (cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS || !cur->IsWithinLOSInMap(*next))
- {
- ++next;
- if (next == tempUnitMap.end())
- return;
- }
- }
- else
- {
- tempUnitMap.sort(Trinity::ObjectDistanceOrderPred(cur));
- next = tempUnitMap.begin();
-
- if (cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS) // Don't search beyond the max jump radius
- break;
-
- // Check if (*next) is a valid chain target. If not, don't add to TagUnitMap, and repeat loop.
- // If you want to add any conditions to exclude a target from TagUnitMap, add condition in this while () loop.
- while ((m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE
- && !m_caster->isInFrontInMap(*next, max_range))
- || !m_caster->canSeeOrDetect(*next)
- || !cur->IsWithinLOSInMap(*next)
- || (*next)->GetCreatureType() == CREATURE_TYPE_CRITTER
- || ((GetSpellInfo()->AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED) && !(*next)->CanFreeMove()))
- {
- ++next;
- if (next == tempUnitMap.end() || cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS) // Don't search beyond the max jump radius
- return;
- }
- }
-
- cur = *next;
- tempUnitMap.erase(next);
- }
-}
-
-void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry)
-{
- if (TargetType == SPELL_TARGETS_GO)
- return;
-
- Position const* pos;
- switch (type)
- {
- case PUSH_DST_CENTER:
- CheckDst();
- pos = m_targets.GetDst();
- break;
- case PUSH_SRC_CENTER:
- CheckSrc();
- pos = m_targets.GetSrc();
- break;
- case PUSH_CHAIN:
- {
- Unit* target = m_targets.GetUnitTarget();
- if (!target)
- {
- sLog->outError("SPELL: cannot find unit target for spell ID %u\n", m_spellInfo->Id);
- return;
- }
- pos = target;
- break;
- }
- default:
- pos = m_caster;
- break;
- }
-
- Trinity::SpellNotifierCreatureAndPlayer notifier(m_caster, TagUnitMap, radius, type, TargetType, pos, entry, m_spellInfo);
- if ((m_spellInfo->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS) || (TargetType == SPELL_TARGETS_ENTRY && !entry))
- m_caster->GetMap()->VisitWorld(pos->m_positionX, pos->m_positionY, radius, notifier);
- else
- m_caster->GetMap()->VisitAll(pos->m_positionX, pos->m_positionY, radius, notifier);
-}
-
-void Spell::SearchGOAreaTarget(std::list<GameObject*> &TagGOMap, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry)
-{
- if (TargetType != SPELL_TARGETS_GO)
- return;
-
- Position const* pos;
- switch (type)
- {
- case PUSH_DST_CENTER:
- CheckDst();
- pos = m_targets.GetDst();
- break;
- case PUSH_SRC_CENTER:
- CheckSrc();
- pos = m_targets.GetSrc();
- break;
- default:
- pos = m_caster;
- break;
- }
-
- Trinity::GameObjectInRangeCheck check(pos->m_positionX, pos->m_positionY, pos->m_positionZ, radius, entry);
- Trinity::GameObjectListSearcher<Trinity::GameObjectInRangeCheck> searcher(m_caster, TagGOMap, check);
- m_caster->GetMap()->VisitGrid(pos->m_positionX, pos->m_positionY, radius, searcher);
-}
-
-WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, SpellEffIndex effIndex)
-{
- switch (TargetType)
- {
- case SPELL_TARGETS_ENTRY:
- {
- ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET, m_spellInfo->Id);
- if (conditions.empty())
- {
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) (caster Entry: %u) does not have record in `conditions` for spell script target (ConditionSourceType 13)", m_spellInfo->Id, m_caster->GetEntry());
- if (m_spellInfo->IsPositive())
- return SearchNearbyTarget(range, SPELL_TARGETS_ALLY, effIndex);
- else
- return SearchNearbyTarget(range, SPELL_TARGETS_ENEMY, effIndex);
- }
-
- Creature* creatureScriptTarget = NULL;
- GameObject* goScriptTarget = NULL;
-
- for (ConditionList::const_iterator i_spellST = conditions.begin(); i_spellST != conditions.end(); ++i_spellST)
- {
- if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
- continue;
- if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & (1 << uint32(effIndex))))
- continue;
- switch ((*i_spellST)->mConditionValue1)
- {
- case SPELL_TARGET_TYPE_CONTROLLED:
- for (Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
- if ((*itr)->GetEntry() == (*i_spellST)->mConditionValue2 && (*itr)->IsWithinDistInMap(m_caster, range))
- {
- goScriptTarget = NULL;
- creatureScriptTarget = (*itr)->ToCreature();
- range = m_caster->GetDistance(creatureScriptTarget);
- }
- break;
- case SPELL_TARGET_TYPE_GAMEOBJECT:
- if ((*i_spellST)->mConditionValue2)
- {
- if (GameObject* go = m_caster->FindNearestGameObject((*i_spellST)->mConditionValue2, range))
- {
- // remember found target and range, next attempt will find more near target with another entry
- goScriptTarget = go;
- creatureScriptTarget = NULL;
- range = m_caster->GetDistance(goScriptTarget);
- }
- }
- else if (focusObject) //Focus Object
- {
- float frange = m_caster->GetDistance(focusObject);
- if (range >= frange)
- {
- creatureScriptTarget = NULL;
- goScriptTarget = focusObject;
- range = frange;
- }
- }
- break;
- case SPELL_TARGET_TYPE_CREATURE:
- if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetEntry() == (*i_spellST)->mConditionValue2)
- return m_targets.GetUnitTarget();
- case SPELL_TARGET_TYPE_DEAD:
- default:
- if (Creature* cre = m_caster->FindNearestCreature((*i_spellST)->mConditionValue2, range, (*i_spellST)->mConditionValue1 != SPELL_TARGET_TYPE_DEAD))
- {
- creatureScriptTarget = cre;
- goScriptTarget = NULL;
- range = m_caster->GetDistance(creatureScriptTarget);
- }
- break;
- }
- }
-
- if (creatureScriptTarget)
- return creatureScriptTarget;
- else
- return goScriptTarget;
- }
- default:
- case SPELL_TARGETS_ENEMY:
- {
- Unit* target = NULL;
- Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, range);
- Trinity::UnitLastSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_caster, target, u_check);
- m_caster->VisitNearbyObject(range, searcher);
- return target;
- }
- case SPELL_TARGETS_ALLY:
- {
- Unit* target = NULL;
- Trinity::AnyFriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, range);
- Trinity::UnitLastSearcher<Trinity::AnyFriendlyUnitInObjectRangeCheck> searcher(m_caster, target, u_check);
- m_caster->VisitNearbyObject(range, searcher);
- return target;
- }
- }
-}
-
-uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
-{
- SpellNotifyPushType pushType = PUSH_NONE;
- Player* modOwner = NULL;
- if (m_originalCaster)
- modOwner = m_originalCaster->GetSpellModOwner();
-
- uint32 effectMask = 1 << i;
- // ENTRY targets may have different selection lists, skip those for now until we can compare lists easily and quickly
- if (GetSpellInfo()->Effects[i].TargetA.GetSelectionCheckType() != TARGET_SELECT_CHECK_ENTRY &&
- GetSpellInfo()->Effects[i].TargetB.GetSelectionCheckType() != TARGET_SELECT_CHECK_ENTRY)
- for (uint32 j = i + 1; j < MAX_SPELL_EFFECTS; ++j)
- if (GetSpellInfo()->Effects[i].TargetA.GetTarget() == GetSpellInfo()->Effects[j].TargetA.GetTarget() &&
- GetSpellInfo()->Effects[i].TargetB.GetTarget() == GetSpellInfo()->Effects[j].TargetB.GetTarget() &&
- GetSpellInfo()->Effects[i].CalcRadius(m_caster) == GetSpellInfo()->Effects[j].CalcRadius(m_caster))
- effectMask |= 1 << j;
-
- switch (cur.GetType())
- {
- case TARGET_TYPE_UNIT_CASTER:
- {
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_CASTER:
- AddUnitTarget(m_caster, effectMask, false);
- break;
- case TARGET_DEST_CASTER_FISHING:
- {
- float min_dis = m_spellInfo->GetMinRange(true);
- float max_dis = m_spellInfo->GetMaxRange(true);
- float dis = (float)rand_norm() * (max_dis - min_dis) + min_dis;
- float x, y, z, angle;
- angle = (float)rand_norm() * static_cast<float>(M_PI * 35.0f / 180.0f) - static_cast<float>(M_PI * 17.5f / 180.0f);
- m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE, dis, angle);
- m_targets.SetDst(x, y, z, m_caster->GetOrientation());
- break;
- }
- case TARGET_UNIT_MASTER:
- if (Unit* owner = m_caster->GetCharmerOrOwner())
- AddUnitTarget(owner, effectMask);
- break;
- case TARGET_UNIT_PET:
- if (Guardian* pet = m_caster->GetGuardianPet())
- AddUnitTarget(pet, effectMask);
- break;
- case TARGET_UNIT_SUMMONER:
- if (m_caster->isSummon())
- if (Unit* unit = m_caster->ToTempSummon()->GetSummoner())
- AddUnitTarget(unit, effectMask);
- break;
- case TARGET_UNIT_CASTER_AREA_PARTY:
- case TARGET_UNIT_CASTER_AREA_RAID:
- pushType = PUSH_CASTER_CENTER;
- break;
- case TARGET_UNIT_VEHICLE:
- if (Unit* vehicle = m_caster->GetVehicleBase())
- AddUnitTarget(vehicle, effectMask);
- break;
- case TARGET_UNIT_PASSENGER_0:
- case TARGET_UNIT_PASSENGER_1:
- case TARGET_UNIT_PASSENGER_2:
- case TARGET_UNIT_PASSENGER_3:
- case TARGET_UNIT_PASSENGER_4:
- case TARGET_UNIT_PASSENGER_5:
- case TARGET_UNIT_PASSENGER_6:
- case TARGET_UNIT_PASSENGER_7:
- if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsVehicle())
- if (Unit* unit = m_caster->GetVehicleKit()->GetPassenger(cur.GetTarget() - TARGET_UNIT_PASSENGER_0))
- AddUnitTarget(unit, effectMask);
- break;
- default:
- break;
- }
- break;
- }
-
- case TARGET_TYPE_UNIT_TARGET:
- {
- Unit* target = m_targets.GetUnitTarget();
- if (!target)
- {
- sLog->outError("SPELL: no unit target for spell ID %u", m_spellInfo->Id);
- break;
- }
-
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_TARGET_ENEMY:
- if (Unit* magnet = m_caster->SelectMagnetTarget(target, m_spellInfo))
- if (magnet != target)
- m_targets.SetUnitTarget(magnet);
- pushType = PUSH_CHAIN;
- break;
- case TARGET_UNIT_TARGET_ANY:
- if (!m_spellInfo->IsPositive())
- if (Unit* magnet = m_caster->SelectMagnetTarget(target, m_spellInfo))
- if (magnet != target)
- m_targets.SetUnitTarget(magnet);
- pushType = PUSH_CHAIN;
- break;
- case TARGET_UNIT_TARGET_CHAINHEAL_ALLY:
- pushType = PUSH_CHAIN;
- break;
- case TARGET_UNIT_TARGET_ALLY:
- AddUnitTarget(target, effectMask, false);
- break;
- case TARGET_UNIT_TARGET_RAID:
- case TARGET_UNIT_TARGET_PARTY:
- case TARGET_UNIT_TARGET_MINIPET:
- AddUnitTarget(target, effectMask, false);
- break;
- case TARGET_UNIT_TARGET_PASSENGER:
- AddUnitTarget(target, effectMask, false);
- break;
- case TARGET_UNIT_LASTTARGET_AREA_PARTY:
- case TARGET_UNIT_TARGET_AREA_RAID_CLASS:
- pushType = PUSH_CASTER_CENTER; // not real
- break;
- default:
- break;
- }
- break;
- }
-
- case TARGET_TYPE_UNIT_NEARBY:
- {
- WorldObject* target = NULL;
- float range;
-
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_NEARBY_ENEMY:
- range = m_spellInfo->GetMaxRange(false);
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- target = SearchNearbyTarget(range, SPELL_TARGETS_ENEMY, SpellEffIndex(i));
- break;
- case TARGET_UNIT_NEARBY_ALLY:
- case TARGET_UNIT_NEARBY_PARTY: // TODO: fix party/raid targets
- case TARGET_UNIT_NEARBY_RAID:
- range = m_spellInfo->GetMaxRange(true);
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- target = SearchNearbyTarget(range, SPELL_TARGETS_ALLY, SpellEffIndex(i));
- break;
- case TARGET_UNIT_NEARBY_ENTRY:
- case TARGET_GAMEOBJECT_NEARBY_ENTRY:
- range = m_spellInfo->GetMaxRange(m_spellInfo->IsPositive());
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY, SpellEffIndex(i));
- break;
- default:
- break;
- }
-
- if (!target)
- return 0;
- else if (target->GetTypeId() == TYPEID_GAMEOBJECT)
- AddGOTarget((GameObject*)target, effectMask);
- else
- {
- pushType = PUSH_CHAIN;
-
- if (m_targets.GetUnitTarget() != target)
- m_targets.SetUnitTarget((Unit*)target);
- }
-
- break;
- }
-
- case TARGET_TYPE_AREA_SRC:
- pushType = PUSH_SRC_CENTER;
- break;
-
- case TARGET_TYPE_AREA_DST:
- pushType = PUSH_DST_CENTER;
- break;
-
- case TARGET_TYPE_AREA_CONE:
- if (m_spellInfo->AttributesCu & SPELL_ATTR0_CU_CONE_BACK)
- pushType = PUSH_IN_BACK;
- else if (m_spellInfo->AttributesCu & SPELL_ATTR0_CU_CONE_LINE)
- pushType = PUSH_IN_LINE;
- else
- pushType = PUSH_IN_FRONT;
- break;
-
- case TARGET_TYPE_DEST_CASTER: //4+8+2
- {
- if (cur.GetTarget() == TARGET_SRC_CASTER)
- {
- m_targets.SetSrc(*m_caster);
- break;
- }
- else if (cur.GetTarget() == TARGET_DEST_CASTER)
- {
- m_targets.SetDst(*m_caster);
- break;
- }
-
- float angle, dist;
-
- float objSize = m_caster->GetObjectSize();
- if (cur.GetTarget() == TARGET_DEST_CASTER_SUMMON)
- dist = 0.0f;
- else
- dist = m_spellInfo->Effects[i].CalcRadius(m_caster);
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, dist, this);
- if (dist < objSize)
- dist = objSize;
- else if (cur.GetTarget() == TARGET_DEST_CASTER_RANDOM)
- dist = objSize + (dist - objSize) * (float)rand_norm();
-
- switch (cur.GetTarget())
- {
- case TARGET_DEST_CASTER_FRONT_LEFT: angle = static_cast<float>(-M_PI/4); break;
- case TARGET_DEST_CASTER_BACK_LEFT: angle = static_cast<float>(-3*M_PI/4); break;
- case TARGET_DEST_CASTER_BACK_RIGHT: angle = static_cast<float>(3*M_PI/4); break;
- case TARGET_DEST_CASTER_FRONT_RIGHT:angle = static_cast<float>(M_PI/4); break;
- case TARGET_DEST_CASTER_SUMMON:
- case TARGET_DEST_CASTER_FRONT_LEAP:
- case TARGET_DEST_CASTER_FRONT: angle = 0.0f; break;
- case TARGET_DEST_CASTER_BACK: angle = static_cast<float>(M_PI); break;
- case TARGET_DEST_CASTER_RIGHT: angle = static_cast<float>(-M_PI/2); break;
- case TARGET_DEST_CASTER_LEFT: angle = static_cast<float>(M_PI/2); break;
- default: angle = (float)rand_norm()*static_cast<float>(2*M_PI); break;
- }
-
- Position pos;
- if (cur.GetTarget() == TARGET_DEST_CASTER_FRONT_LEAP)
- m_caster->GetFirstCollisionPosition(pos, dist, angle);
- else
- m_caster->GetNearPosition(pos, dist, angle);
- m_targets.SetDst(*m_caster);
- m_targets.ModDst(pos);
- break;
- }
-
- case TARGET_TYPE_DEST_TARGET: //2+8+2
- {
- Unit* target = m_targets.GetUnitTarget();
- if (!target)
- {
- sLog->outError("SPELL: no unit target for spell ID %u", m_spellInfo->Id);
- break;
- }
-
- if (cur.GetTarget() == TARGET_DEST_TARGET_ENEMY || cur.GetTarget() == TARGET_DEST_TARGET_ANY)
- {
- m_targets.SetDst(*target);
- break;
- }
-
- float angle, dist;
-
- float objSize = target->GetObjectSize();
- dist = m_spellInfo->Effects[i].CalcRadius(m_caster);
- if (dist < objSize)
- dist = objSize;
- else if (cur.GetTarget() == TARGET_DEST_TARGET_RANDOM)
- dist = objSize + (dist - objSize) * (float)rand_norm();
-
- switch (cur.GetTarget())
- {
- case TARGET_DEST_TARGET_FRONT: angle = 0.0f; break;
- case TARGET_DEST_TARGET_BACK: angle = static_cast<float>(M_PI); break;
- case TARGET_DEST_TARGET_RIGHT: angle = static_cast<float>(M_PI/2); break;
- case TARGET_DEST_TARGET_LEFT: angle = static_cast<float>(-M_PI/2); break;
- case TARGET_DEST_TARGET_FRONT_LEFT: angle = static_cast<float>(-M_PI/4); break;
- case TARGET_DEST_TARGET_BACK_LEFT: angle = static_cast<float>(-3*M_PI/4); break;
- case TARGET_DEST_TARGET_BACK_RIGHT: angle = static_cast<float>(3*M_PI/4); break;
- case TARGET_DEST_TARGET_FRONT_RIGHT:angle = static_cast<float>(M_PI/4); break;
- default: angle = (float)rand_norm()*static_cast<float>(2*M_PI); break;
- }
-
- Position pos;
- target->GetNearPosition(pos, dist, angle);
- m_targets.SetDst(*target);
- m_targets.ModDst(pos);
- break;
- }
-
- case TARGET_TYPE_DEST_DEST: //5+8+1
- {
- if (!m_targets.HasDst())
- {
- sLog->outError("SPELL: no destination for spell ID %u", m_spellInfo->Id);
- break;
- }
-
- float angle;
- switch (cur.GetTarget())
- {
- case TARGET_DEST_DYNOBJ_ENEMY:
- case TARGET_DEST_DYNOBJ_ALLY:
- case TARGET_DEST_DYNOBJ_NONE:
- case TARGET_DEST_DEST:
- return effectMask;
- case TARGET_DEST_TRAJ:
- SelectTrajTargets();
- return effectMask;
- case TARGET_DEST_DEST_FRONT: angle = 0.0f; break;
- case TARGET_DEST_DEST_BACK: angle = static_cast<float>(M_PI); break;
- case TARGET_DEST_DEST_RIGHT: angle = static_cast<float>(M_PI/2); break;
- case TARGET_DEST_DEST_LEFT: angle = static_cast<float>(-M_PI/2); break;
- case TARGET_DEST_DEST_FRONT_LEFT: angle = static_cast<float>(-M_PI/4); break;
- case TARGET_DEST_DEST_BACK_LEFT: angle = static_cast<float>(-3*M_PI/4); break;
- case TARGET_DEST_DEST_BACK_RIGHT: angle = static_cast<float>(3*M_PI/4); break;
- case TARGET_DEST_DEST_FRONT_RIGHT:angle = static_cast<float>(M_PI/4); break;
- default: angle = (float)rand_norm()*static_cast<float>(2*M_PI); break;
- }
-
- float dist = m_spellInfo->Effects[i].CalcRadius(m_caster);
- if (cur.GetTarget() == TARGET_DEST_DEST_RANDOM || cur.GetTarget() == TARGET_DEST_DEST_RADIUS)
- dist *= (float)rand_norm();
-
- // must has dst, no need to set flag
- Position pos = *m_targets.GetDst();
- m_caster->MovePosition(pos, dist, angle);
- m_targets.ModDst(pos);
- break;
- }
-
- case TARGET_TYPE_DEST_SPECIAL:
- {
- switch (cur.GetTarget())
- {
- case TARGET_DEST_DB:
- if (SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id))
- {
- //TODO: fix this check
- if (m_spellInfo->Effects[0].Effect == SPELL_EFFECT_TELEPORT_UNITS || m_spellInfo->Effects[1].Effect == SPELL_EFFECT_TELEPORT_UNITS || m_spellInfo->Effects[2].Effect == SPELL_EFFECT_TELEPORT_UNITS)
- m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation, (int32)st->target_mapId);
- else if (st->target_mapId == m_caster->GetMapId())
- m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation);
- }
- else
- {
- sLog->outError("SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
- Unit* target = NULL;
- if (uint64 guid = m_caster->GetUInt64Value(UNIT_FIELD_TARGET))
- target = ObjectAccessor::GetUnit(*m_caster, guid);
- m_targets.SetDst(target ? *target : *m_caster);
- }
- break;
- case TARGET_DEST_HOME:
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- m_targets.SetDst(m_caster->ToPlayer()->m_homebindX, m_caster->ToPlayer()->m_homebindY, m_caster->ToPlayer()->m_homebindZ, m_caster->ToPlayer()->GetOrientation(), m_caster->ToPlayer()->m_homebindMapId);
- break;
- case TARGET_DEST_NEARBY_ENTRY:
- {
- float range = m_spellInfo->GetMaxRange(m_spellInfo->IsPositive());
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
-
- if (WorldObject* target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY, SpellEffIndex(i)))
- m_targets.SetDst(*target);
- break;
- }
- default:
- break;
- }
- break;
- }
-
- case TARGET_TYPE_CHANNEL:
- {
- if (!m_originalCaster || !m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
- {
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: no current channeled spell for spell ID %u - spell triggering this spell was interrupted.", m_spellInfo->Id);
- break;
- }
-
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_CHANNEL_TARGET:
- // unit target may be no longer avalible - teleported out of map for example
- if (Unit* target = Unit::GetUnit(*m_caster, m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets.GetUnitTargetGUID()))
- AddUnitTarget(target, effectMask);
- else
- sLog->outError("SPELL: cannot find channel spell target for spell ID %u", m_spellInfo->Id);
- break;
- case TARGET_DEST_CHANNEL_TARGET:
- if (m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets.HasDst())
- m_targets.SetDst(m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets);
- else if (Unit* target = Unit::GetUnit(*m_caster, m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets.GetUnitTargetGUID()))
- m_targets.SetDst(*target);
- else
- sLog->outError("SPELL: cannot find channel spell destination for spell ID %u", m_spellInfo->Id);
- break;
- case TARGET_DEST_CHANNEL_CASTER:
- m_targets.SetDst(*m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->GetCaster());
- break;
- default:
- break;
- }
- break;
- }
-
- default:
- {
- switch (cur.GetTarget())
- {
- case TARGET_GAMEOBJECT_TARGET:
- if (m_targets.GetGOTarget())
- AddGOTarget(m_targets.GetGOTarget(), effectMask);
- break;
- case TARGET_GAMEOBJECT_ITEM_TARGET:
- if (m_targets.GetGOTargetGUID())
- AddGOTarget(m_targets.GetGOTarget(), effectMask);
- else if (m_targets.GetItemTarget())
- AddItemTarget(m_targets.GetItemTarget(), effectMask);
- break;
- default:
- sLog->outError("SPELL (caster[type: %u; guidlow: %u], spell: %u): unhandled spell target (%u)",
- m_caster->GetTypeId(), m_caster->GetGUIDLow(), m_spellInfo->Id, cur.GetTarget());
- break;
- }
- break;
- }
- }
-
- if (pushType == PUSH_CHAIN) // Chain
- {
- Unit* target = m_targets.GetUnitTarget();
- if (!target)
- {
- sLog->outError("SPELL: no chain unit target for spell ID %u", m_spellInfo->Id);
- return 0;
- }
-
- //Chain: 2, 6, 22, 25, 45, 77
- uint32 maxTargets = m_spellInfo->Effects[i].ChainTarget;
- if (modOwner)
- modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, maxTargets, this);
-
- if (maxTargets > 1)
- {
- //otherwise, this multiplier is used for something else
- for (uint32 k = i; k < MAX_SPELL_EFFECTS; ++k)
- if (effectMask & (1 << k))
- m_damageMultipliers[k] = 1.0f;
- m_applyMultiplierMask |= effectMask;
-
- float range;
- std::list<Unit*> unitList;
-
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_NEARBY_ENEMY:
- case TARGET_UNIT_TARGET_ENEMY:
- case TARGET_UNIT_NEARBY_ENTRY: // fix me
- range = m_spellInfo->GetMaxRange(false);
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- SearchChainTarget(unitList, range, maxTargets, SPELL_TARGETS_ENEMY);
- break;
- case TARGET_UNIT_TARGET_CHAINHEAL_ALLY:
- case TARGET_UNIT_NEARBY_ALLY: // fix me
- case TARGET_UNIT_NEARBY_PARTY:
- case TARGET_UNIT_NEARBY_RAID:
- range = m_spellInfo->GetMaxRange(true);
- if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- SearchChainTarget(unitList, range, maxTargets, SPELL_TARGETS_CHAINHEAL);
- break;
- default:
- break;
- }
-
- CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i));
-
- for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
- AddUnitTarget(*itr, effectMask, false);
- }
- else
- AddUnitTarget(target, effectMask, false);
- }
- else if (pushType)
- {
- float radius;
- SpellTargets targetType;
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_SRC_AREA_ENEMY:
- case TARGET_UNIT_DEST_AREA_ENEMY:
- case TARGET_UNIT_CONE_ENEMY_24:
- case TARGET_UNIT_CONE_ENEMY_54:
- case TARGET_UNIT_CONE_ENEMY_104:
- radius = m_spellInfo->Effects[i].CalcRadius();
- targetType = SPELL_TARGETS_ENEMY;
- break;
- case TARGET_UNIT_SRC_AREA_ALLY:
- case TARGET_UNIT_DEST_AREA_ALLY:
- case TARGET_UNIT_CONE_ALLY:
- radius = m_spellInfo->Effects[i].CalcRadius();
- targetType = SPELL_TARGETS_ALLY;
- break;
- case TARGET_UNIT_DEST_AREA_ENTRY:
- case TARGET_UNIT_SRC_AREA_ENTRY:
- case TARGET_UNIT_CONE_ENTRY: // fix me
- radius = m_spellInfo->Effects[i].CalcRadius();
- targetType = SPELL_TARGETS_ENTRY;
- break;
- case TARGET_GAMEOBJECT_SRC_AREA:
- case TARGET_GAMEOBJECT_DEST_AREA:
- case TARGET_GAMEOBJECT_CONE:
- radius = m_spellInfo->Effects[i].CalcRadius();
- targetType = SPELL_TARGETS_GO;
- break;
- default:
- radius = m_spellInfo->Effects[i].CalcRadius();
- targetType = SPELL_TARGETS_NONE;
- break;
- }
-
- if (modOwner)
- modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius, this);
- radius *= m_spellValue->RadiusMod;
-
- std::list<Unit*> unitList;
- std::list<GameObject*> gobjectList;
- switch (targetType)
- {
- case SPELL_TARGETS_ENTRY:
- {
- ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET, m_spellInfo->Id);
- if (!conditions.empty())
- {
- for (ConditionList::const_iterator i_spellST = conditions.begin(); i_spellST != conditions.end(); ++i_spellST)
- {
- if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
- continue;
- if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & effectMask))
- continue;
- if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_CREATURE)
- SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, (*i_spellST)->mConditionValue2);
- else if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_CONTROLLED)
- {
- for (Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
- if ((*itr)->GetEntry() == (*i_spellST)->mConditionValue2 &&
- (*itr)->IsInMap(m_caster)) // For 60243 and 52173 need skip radius check or use range (no radius entry for effect)
- unitList.push_back(*itr);
- }
- }
- }
- else
- {
- // Custom entries
- // TODO: move these to sql
- switch (m_spellInfo->Id)
- {
- case 46584: // Raise Dead
- {
- if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck> ())
- {
- switch (result->GetTypeId())
- {
- case TYPEID_UNIT:
- m_targets.SetDst(*result);
- break;
- default:
- break;
- }
- }
- break;
- }
- // Corpse Explosion
- case 49158:
- case 51325:
- case 51326:
- case 51327:
- case 51328:
- // Search for ghoul if our ghoul or dead body not valid unit target
- if (!(m_targets.GetUnitTarget() && ((m_targets.GetUnitTarget()->GetEntry() == 26125 && m_targets.GetUnitTarget()->GetOwnerGUID() == m_caster->GetGUID())
- || (m_targets.GetUnitTarget()->getDeathState() == CORPSE
- && m_targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT
- && !(m_targets.GetUnitTarget()->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL)
- && m_targets.GetUnitTarget()->GetDisplayId() == m_targets.GetUnitTarget()->GetNativeDisplayId()))))
- {
- CleanupTargetList();
-
- WorldObject* result = FindCorpseUsing <Trinity::ExplodeCorpseObjectCheck> ();
-
- if (result)
- {
- switch (result->GetTypeId())
- {
- case TYPEID_UNIT:
- case TYPEID_PLAYER:
- m_targets.SetUnitTarget((Unit*)result);
- break;
- default:
- break;
- }
- }
- else
- {
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true);
- SendCastResult(SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW);
- finish(false);
- }
- }
- break;
-
- default:
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) (caster Entry: %u) does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry());
-
- if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_TELEPORT_UNITS)
- SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, 0);
- else if (m_spellInfo->IsPositiveEffect(i))
- SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ALLY);
- else
- SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENEMY);
- }
- }
- break;
- }
- case SPELL_TARGETS_GO:
- {
- ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET, m_spellInfo->Id);
- if (!conditions.empty())
- {
- for (ConditionList::const_iterator i_spellST = conditions.begin(); i_spellST != conditions.end(); ++i_spellST)
- {
- if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
- continue;
- if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & effectMask))
- continue;
- if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_GAMEOBJECT)
- SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO, (*i_spellST)->mConditionValue2);
- }
- }
- else
- {
- if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_ACTIVATE_OBJECT)
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) (caster Entry: %u) with SPELL_EFFECT_ACTIVATE_OBJECT does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry());
- SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO);
- }
- break;
- }
- case SPELL_TARGETS_ALLY:
- case SPELL_TARGETS_ENEMY:
- case SPELL_TARGETS_CHAINHEAL:
- case SPELL_TARGETS_ANY:
- SearchAreaTarget(unitList, radius, pushType, targetType);
- break;
- default:
- switch (cur.GetTarget())
- {
- case TARGET_UNIT_SRC_AREA_PARTY:
- case TARGET_UNIT_DEST_AREA_PARTY:
- m_caster->GetPartyMemberInDist(unitList, radius); //fix me
- break;
- case TARGET_UNIT_LASTTARGET_AREA_PARTY:
- m_targets.GetUnitTarget()->GetPartyMemberInDist(unitList, radius);
- break;
- case TARGET_UNIT_CASTER_AREA_PARTY:
- m_caster->GetPartyMemberInDist(unitList, radius);
- break;
- case TARGET_UNIT_CASTER_AREA_RAID:
- m_caster->GetRaidMember(unitList, radius);
- break;
- case TARGET_UNIT_TARGET_AREA_RAID_CLASS:
- {
- Player* targetPlayer = m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->GetTypeId() == TYPEID_PLAYER
- ? (Player*)m_targets.GetUnitTarget() : NULL;
-
- Group* group = targetPlayer ? targetPlayer->GetGroup() : NULL;
- if (group)
- {
- for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
- {
- Player* Target = itr->getSource();
-
- // IsHostileTo check duel and controlled by enemy
- if (Target && targetPlayer->IsWithinDistInMap(Target, radius) && targetPlayer->getClass() == Target->getClass() && !m_caster->IsHostileTo(Target))
- AddUnitTarget(Target, effectMask);
- }
- }
- else if (m_targets.GetUnitTarget())
- AddUnitTarget(m_targets.GetUnitTarget(), effectMask);
- break;
- }
- default:
- break;
- }
- break;
- }
-
- if (!unitList.empty())
- {
- // Special target selection for smart heals and energizes
- uint32 maxSize = 0;
- int32 power = -1;
- switch (m_spellInfo->SpellFamilyName)
- {
- case SPELLFAMILY_GENERIC:
- switch (m_spellInfo->Id)
- {
- case 52759: // Ancestral Awakening
- case 71610: // Echoes of Light (Althor's Abacus normal version)
- case 71641: // Echoes of Light (Althor's Abacus heroic version)
- maxSize = 1;
- power = POWER_HEALTH;
- break;
- case 54968: // Glyph of Holy Light
- maxSize = m_spellInfo->MaxAffectedTargets;
- power = POWER_HEALTH;
- break;
- case 57669: // Replenishment
- // In arenas Replenishment may only affect the caster
- if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->InArena())
- {
- unitList.clear();
- unitList.push_back(m_caster);
- break;
- }
- maxSize = 10;
- power = POWER_MANA;
- break;
- default:
- break;
- }
- break;
- case SPELLFAMILY_PRIEST:
- if (m_spellInfo->SpellFamilyFlags[0] == 0x10000000) // Circle of Healing
- {
- maxSize = m_caster->HasAura(55675) ? 6 : 5; // Glyph of Circle of Healing
- power = POWER_HEALTH;
- }
- else if (m_spellInfo->Id == 64844) // Divine Hymn
- {
- maxSize = 3;
- power = POWER_HEALTH;
- }
- else if (m_spellInfo->Id == 64904) // Hymn of Hope
- {
- maxSize = 3;
- power = POWER_MANA;
- }
- else
- break;
-
- // Remove targets outside caster's raid
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
- {
- if (!(*itr)->IsInRaidWith(m_caster))
- itr = unitList.erase(itr);
- else
- ++itr;
- }
- break;
- case SPELLFAMILY_DRUID:
- if (m_spellInfo->SpellFamilyFlags[1] == 0x04000000) // Wild Growth
- {
- maxSize = m_caster->HasAura(62970) ? 6 : 5; // Glyph of Wild Growth
- power = POWER_HEALTH;
- }
- else if (m_spellInfo->SpellFamilyFlags[2] == 0x0100) // Starfall
- {
- // Remove targets not in LoS or in stealth
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
- {
- if ((*itr)->HasStealthAura() || (*itr)->HasInvisibilityAura() || !(*itr)->IsWithinLOSInMap(m_caster))
- itr = unitList.erase(itr);
- else
- ++itr;
- }
- break;
- }
- else
- break;
-
- // Remove targets outside caster's raid
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
- if (!(*itr)->IsInRaidWith(m_caster))
- itr = unitList.erase(itr);
- else
- ++itr;
- break;
- default:
- break;
- }
-
- if (maxSize && power != -1)
- {
- if (Powers(power) == POWER_HEALTH)
- {
- if (unitList.size() > maxSize)
- {
- unitList.sort(Trinity::HealthPctOrderPred());
- unitList.resize(maxSize);
- }
- }
- else
- {
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
- if ((*itr)->getPowerType() != (Powers)power)
- itr = unitList.erase(itr);
- else
- ++itr;
-
- if (unitList.size() > maxSize)
- {
- unitList.sort(Trinity::PowerPctOrderPred((Powers)power));
- unitList.resize(maxSize);
- }
- }
- }
-
- // Other special target selection goes here
- if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
- {
- Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
- for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
- if ((*j)->IsAffectingSpell(m_spellInfo))
- maxTargets += (*j)->GetAmount();
-
- if (m_spellInfo->Id == 5246) //Intimidating Shout
- unitList.remove(m_targets.GetUnitTarget());
- Trinity::RandomResizeList(unitList, maxTargets);
- }
-
- CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i));
-
- for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
- AddUnitTarget(*itr, effectMask, false);
- }
-
- if (!gobjectList.empty())
- {
- if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
- {
- Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
- for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
- if ((*j)->IsAffectingSpell(m_spellInfo))
- maxTargets += (*j)->GetAmount();
-
- Trinity::RandomResizeList(gobjectList, maxTargets);
- }
- for (std::list<GameObject*>::iterator itr = gobjectList.begin(); itr != gobjectList.end(); ++itr)
- AddGOTarget(*itr, effectMask);
- }
- }
-
- return effectMask;
-}
-
void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura)
{
if (m_CastItem)
@@ -2856,20 +2899,6 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
InitExplicitTargets(*targets);
- if (Player* plrCaster = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself())
- {
- //check for special spell conditions
- ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id);
- if (!conditions.empty())
- if (!sConditionMgr->IsPlayerMeetToConditions(plrCaster, conditions))
- {
- //SendCastResult(SPELL_FAILED_DONT_REPORT);
- SendCastResult(plrCaster, m_spellInfo, m_cast_count, SPELL_FAILED_DONT_REPORT);
- finish(false);
- return;
- }
- }
-
// Fill aura scaling information
if (m_caster->IsControlledByPlayer() && !m_spellInfo->IsPassive() && m_spellInfo->SpellLevel && !m_spellInfo->IsChanneled() && !(_triggeredCastFlags & TRIGGERED_IGNORE_AURA_SCALING))
{
@@ -3762,6 +3791,27 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint8 cas
case SPELL_FAILED_SILENCED:
data << uint32(0); // Unknown
break;
+ case SPELL_FAILED_REAGENTS:
+ {
+ uint32 missingItem = 0;
+ for (uint32 i = 0; i < MAX_SPELL_REAGENTS; i++)
+ {
+ if (spellInfo->Reagent[i] <= 0)
+ continue;
+
+ uint32 itemid = spellInfo->Reagent[i];
+ uint32 itemcount = spellInfo->ReagentCount[i];
+
+ if (!caster->HasItemCount(itemid, itemcount))
+ {
+ missingItem = itemid;
+ break;
+ }
+ }
+
+ data << uint32(missingItem); // first missing item
+ break;
+ }
default:
break;
}
@@ -4617,7 +4667,7 @@ SpellCastResult Spell::CheckCast(bool strict)
Unit::AuraEffectList const& blockSpells = m_caster->GetAuraEffectsByType(SPELL_AURA_BLOCK_SPELL_FAMILY);
for (Unit::AuraEffectList::const_iterator blockItr = blockSpells.begin(); blockItr != blockSpells.end(); ++blockItr)
- if ((*blockItr)->GetMiscValue() == m_spellInfo->SpellFamilyName)
+ if (uint32((*blockItr)->GetMiscValue()) == m_spellInfo->SpellFamilyName)
return SPELL_FAILED_SPELL_UNAVAILABLE;
bool reqCombat = true;
@@ -4693,6 +4743,25 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_DONT_REPORT;
}
+ // check spell cast conditions from database
+ {
+ ConditionSourceInfo condInfo = ConditionSourceInfo(m_caster);
+ condInfo.mConditionTargets[1] = m_targets.GetObjectTarget();
+ ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id);
+ if (!conditions.empty() && !sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
+ {
+ // send error msg to player if condition failed and text message available
+ // TODO: using WorldSession::SendNotification is not blizzlike
+ if (Player* playerCaster = m_caster->ToPlayer())
+ {
+ if (playerCaster->GetSession() && condInfo.mLastFailedCondition
+ && condInfo.mLastFailedCondition->ErrorTextId)
+ playerCaster->GetSession()->SendNotification(condInfo.mLastFailedCondition->ErrorTextId);
+ }
+ return SPELL_FAILED_DONT_REPORT;
+ }
+ }
+
// Don't check explicit target for passive spells (workaround) (check should be skipped only for learn case)
// those spells may have incorrect target entries or not filled at all (for example 15332)
// such spells when learned are not targeting anyone using targeting system, they should apply directly to caster instead
@@ -4736,6 +4805,16 @@ SpellCastResult Spell::CheckCast(bool strict)
}
}
+ //Check for line of sight for spells with dest
+ if (m_targets.HasDst())
+ {
+ float x, y, z;
+ m_targets.GetDst()->GetPosition(x, y, z);
+
+ if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOS(x, y, z))
+ return SPELL_FAILED_LINE_OF_SIGHT;
+ }
+
// check pet presence
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
@@ -5266,7 +5345,7 @@ SpellCastResult Spell::CheckCast(bool strict)
{
float x, y, z;
m_caster->GetPosition(x, y, z);
- float ground_Z = m_caster->GetMap()->GetHeight(x, y, z);
+ float ground_Z = m_caster->GetMap()->GetHeight(m_caster->GetPhaseMask(), x, y, z);
if (fabs(ground_Z - z) < 0.1f)
return SPELL_FAILED_DONT_REPORT;
break;
@@ -5368,6 +5447,9 @@ SpellCastResult Spell::CheckCast(bool strict)
}
case SPELL_AURA_PERIODIC_MANA_LEECH:
{
+ if (m_spellInfo->Effects[i].IsTargetingArea())
+ break;
+
if (!m_targets.GetUnitTarget())
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
@@ -5871,7 +5953,7 @@ SpellCastResult Spell::CheckItems()
}
}
if (!p_caster->HasItemCount(itemid, itemcount))
- return SPELL_FAILED_ITEM_NOT_READY; //0x54
+ return SPELL_FAILED_REAGENTS;
}
}
@@ -6554,7 +6636,7 @@ void Spell::HandleLaunchPhase()
continue;
// do not consume ammo anymore for Hunter's volley spell
- if (IsTriggered() && m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->IsAOE())
+ if (IsTriggered() && m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->IsTargetingArea())
usesAmmo = false;
if (usesAmmo)
@@ -6605,7 +6687,7 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
if (m_damage > 0)
{
- if (m_spellInfo->Effects[i].IsArea())
+ if (m_spellInfo->Effects[i].IsTargetingArea())
{
m_damage = int32(float(m_damage) * unit->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE, m_spellInfo->SchoolMask));
if (m_caster->GetTypeId() == TYPEID_UNIT)
@@ -6719,150 +6801,6 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value)
}
}
-float tangent(float x)
-{
- x = tan(x);
- //if (x < std::numeric_limits<float>::max() && x > -std::numeric_limits<float>::max()) return x;
- //if (x >= std::numeric_limits<float>::max()) return std::numeric_limits<float>::max();
- //if (x <= -std::numeric_limits<float>::max()) return -std::numeric_limits<float>::max();
- if (x < 100000.0f && x > -100000.0f) return x;
- if (x >= 100000.0f) return 100000.0f;
- if (x <= 100000.0f) return -100000.0f;
- return 0.0f;
-}
-
-#define DEBUG_TRAJ(a) //a
-
-void Spell::SelectTrajTargets()
-{
- if (!m_targets.HasTraj())
- return;
-
- float dist2d = m_targets.GetDist2d();
- if (!dist2d)
- return;
-
- float srcToDestDelta = m_targets.GetDst()->m_positionZ - m_targets.GetSrc()->m_positionZ;
-
- UnitList unitList;
- SearchAreaTarget(unitList, dist2d, PUSH_IN_THIN_LINE, SPELL_TARGETS_ANY);
- if (unitList.empty())
- return;
-
- unitList.sort(Trinity::ObjectDistanceOrderPred(m_caster));
-
- float b = tangent(m_targets.GetElevation());
- float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
- if (a > -0.0001f)
- a = 0;
- DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: a %f b %f", a, b);)
-
- float bestDist = m_spellInfo->GetMaxRange(false);
-
- UnitList::const_iterator itr = unitList.begin();
- for (; itr != unitList.end(); ++itr)
- {
- if (m_caster == *itr || m_caster->IsOnVehicle(*itr) || (*itr)->GetVehicle())//(*itr)->IsOnVehicle(m_caster))
- continue;
-
- const float size = std::max((*itr)->GetObjectSize() * 0.7f, 1.0f); // 1/sqrt(3)
- // TODO: all calculation should be based on src instead of m_caster
- const float objDist2d = m_targets.GetSrc()->GetExactDist2d(*itr) * cos(m_targets.GetSrc()->GetRelativeAngle(*itr));
- const float dz = (*itr)->GetPositionZ() - m_targets.GetSrc()->m_positionZ;
-
- DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);)
-
- float dist = objDist2d - size;
- float height = dist * (a * dist + b);
- DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
- if (dist < bestDist && height < dz + size && height > dz - size)
- {
- bestDist = dist > 0 ? dist : 0;
- break;
- }
-
-#define CHECK_DIST {\
- DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
- if (dist > bestDist)\
- continue;\
- if (dist < objDist2d + size && dist > objDist2d - size)\
- {\
- bestDist = dist;\
- break;\
- }\
- }
-
- if (!a)
- {
- height = dz - size;
- dist = height / b;
- CHECK_DIST;
-
- height = dz + size;
- dist = height / b;
- CHECK_DIST;
-
- continue;
- }
-
- height = dz - size;
- float sqrt1 = b * b + 4 * a * height;
- if (sqrt1 > 0)
- {
- sqrt1 = sqrt(sqrt1);
- dist = (sqrt1 - b) / (2 * a);
- CHECK_DIST;
- }
-
- height = dz + size;
- float sqrt2 = b * b + 4 * a * height;
- if (sqrt2 > 0)
- {
- sqrt2 = sqrt(sqrt2);
- dist = (sqrt2 - b) / (2 * a);
- CHECK_DIST;
-
- dist = (-sqrt2 - b) / (2 * a);
- CHECK_DIST;
- }
-
- if (sqrt1 > 0)
- {
- dist = (-sqrt1 - b) / (2 * a);
- CHECK_DIST;
- }
- }
-
- if (m_targets.GetSrc()->GetExactDist2d(m_targets.GetDst()) > bestDist)
- {
- float x = m_targets.GetSrc()->m_positionX + cos(m_caster->GetOrientation()) * bestDist;
- float y = m_targets.GetSrc()->m_positionY + sin(m_caster->GetOrientation()) * bestDist;
- float z = m_targets.GetSrc()->m_positionZ + bestDist * (a * bestDist + b);
-
- if (itr != unitList.end())
- {
- float distSq = (*itr)->GetExactDistSq(x, y, z);
- float sizeSq = (*itr)->GetObjectSize();
- sizeSq *= sizeSq;
- DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
- if (distSq > sizeSq)
- {
- float factor = 1 - sqrt(sizeSq / distSq);
- x += factor * ((*itr)->GetPositionX() - x);
- y += factor * ((*itr)->GetPositionY() - y);
- z += factor * ((*itr)->GetPositionZ() - z);
-
- distSq = (*itr)->GetExactDistSq(x, y, z);
- DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
- }
- }
-
- Position trajDst;
- trajDst.Relocate(x, y, z, m_caster->GetOrientation());
- m_targets.ModDst(trajDst);
- }
-}
-
void Spell::PrepareTargetProcessing()
{
CheckEffectExecuteData();
@@ -7214,3 +7152,152 @@ void Spell::CancelGlobalCooldown()
else if (m_caster->GetTypeId() == TYPEID_PLAYER)
m_caster->ToPlayer()->GetGlobalCooldownMgr().CancelGlobalCooldown(m_spellInfo);
}
+
+namespace Trinity
+{
+
+WorldObjectSpellTargetCheck::WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
+ SpellTargetCheckTypes selectionType, ConditionList* condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo),
+ _targetSelectionType(selectionType), _condList(condList)
+{
+ if (condList)
+ _condSrcInfo = new ConditionSourceInfo(NULL, caster);
+ else
+ _condSrcInfo = NULL;
+}
+
+WorldObjectSpellTargetCheck::~WorldObjectSpellTargetCheck()
+{
+ if (_condSrcInfo)
+ delete _condSrcInfo;
+}
+
+bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
+{
+ if (_spellInfo->CheckTarget(_caster, target, true) != SPELL_CAST_OK)
+ return false;
+ Unit* unitTarget = target->ToUnit();
+ if (Corpse* corpseTarget = target->ToCorpse())
+ {
+ // use ofter for party/assistance checks
+ if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
+ unitTarget = owner;
+ else
+ return false;
+ }
+ if (unitTarget)
+ {
+ switch (_targetSelectionType)
+ {
+ case TARGET_CHECK_ENEMY:
+ if (unitTarget->isTotem())
+ return false;
+ if (!_caster->_IsValidAttackTarget(unitTarget, _spellInfo))
+ return false;
+ break;
+ case TARGET_CHECK_ALLY:
+ if (unitTarget->isTotem())
+ return false;
+ if (!_caster->_IsValidAssistTarget(unitTarget, _spellInfo))
+ return false;
+ break;
+ case TARGET_CHECK_PARTY:
+ if (unitTarget->isTotem())
+ return false;
+ if (!_caster->_IsValidAssistTarget(unitTarget, _spellInfo))
+ return false;
+ if (!_referer->IsInPartyWith(unitTarget))
+ return false;
+ break;
+ case TARGET_CHECK_RAID_CLASS:
+ if (_referer->getClass() != unitTarget->getClass())
+ return false;
+ // nobreak;
+ case TARGET_CHECK_RAID:
+ if (unitTarget->isTotem())
+ return false;
+ if (!_caster->_IsValidAssistTarget(unitTarget, _spellInfo))
+ return false;
+ if (!_referer->IsInRaidWith(unitTarget))
+ return false;
+ break;
+ default:
+ break;
+ }
+ }
+ if (!_condSrcInfo)
+ return true;
+ _condSrcInfo->mConditionTargets[0] = target;
+ return sConditionMgr->IsObjectMeetToConditions(*_condSrcInfo, *_condList);
+}
+
+WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
+ SpellTargetCheckTypes selectionType, ConditionList* condList)
+ : WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster)
+{
+}
+
+bool WorldObjectSpellNearbyTargetCheck::operator()(WorldObject* target)
+{
+ float dist = target->GetDistance(*_position);
+ if (dist < _range && WorldObjectSpellTargetCheck::operator ()(target))
+ {
+ _range = dist;
+ return true;
+ }
+ return false;
+}
+
+WorldObjectSpellAreaTargetCheck::WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster,
+ Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
+ : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position)
+{
+}
+
+bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target)
+{
+ if (!target->IsWithinDist3d(_position, _range))
+ return false;
+ return WorldObjectSpellTargetCheck::operator ()(target);
+}
+
+WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster,
+ SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
+ : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle)
+{
+}
+
+bool WorldObjectSpellConeTargetCheck::operator()(WorldObject* target)
+{
+ if (_spellInfo->AttributesCu & SPELL_ATTR0_CU_CONE_BACK)
+ {
+ if (!_caster->isInBack(target, _coneAngle))
+ return false;
+ }
+ else if (_spellInfo->AttributesCu & SPELL_ATTR0_CU_CONE_LINE)
+ {
+ if (!_caster->HasInLine(target, _caster->GetObjectSize()))
+ return false;
+ }
+ else
+ {
+ if (!_caster->isInFront(target, _coneAngle))
+ return false;
+ }
+ return WorldObjectSpellAreaTargetCheck::operator ()(target);
+}
+
+WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, SpellInfo const* spellInfo)
+ : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, TARGET_CHECK_DEFAULT, NULL)
+{
+}
+
+bool WorldObjectSpellTrajTargetCheck::operator()(WorldObject* target)
+{
+ // return all targets on missile trajectory (0 - size of a missile)
+ if (!_caster->HasInLine(target, 0))
+ return false;
+ return WorldObjectSpellAreaTargetCheck::operator ()(target);
+}
+
+} //namespace Trinity
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index dc3a95030ae..dd377d66feb 100755
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -79,19 +79,6 @@ enum SpellRangeFlag
SPELL_RANGE_RANGED = 2, //hunter range and ranged weapon
};
-enum SpellNotifyPushType
-{
- PUSH_NONE = 0,
- PUSH_IN_FRONT,
- PUSH_IN_BACK,
- PUSH_IN_LINE,
- PUSH_IN_THIN_LINE,
- PUSH_SRC_CENTER,
- PUSH_DST_CENTER,
- PUSH_CASTER_CENTER, //this is never used in grid search
- PUSH_CHAIN,
-};
-
class SpellCastTargets
{
public:
@@ -210,17 +197,6 @@ enum SpellEffectHandleMode
SPELL_EFFECT_HANDLE_HIT_TARGET,
};
-enum SpellTargets
-{
- SPELL_TARGETS_NONE = 0,
- SPELL_TARGETS_ALLY,
- SPELL_TARGETS_ENEMY,
- SPELL_TARGETS_ENTRY,
- SPELL_TARGETS_CHAINHEAL,
- SPELL_TARGETS_ANY,
- SPELL_TARGETS_GO
-};
-
namespace Trinity
{
struct SpellNotifierCreatureAndPlayer;
@@ -228,7 +204,6 @@ namespace Trinity
class Spell
{
- friend struct Trinity::SpellNotifierCreatureAndPlayer;
friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
friend class SpellScript;
public:
@@ -364,6 +339,32 @@ class Spell
Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID = 0, bool skipCheck = false);
~Spell();
+ void InitExplicitTargets(SpellCastTargets const& targets);
+ void SelectExplicitTargets();
+
+ void SelectSpellTargets();
+ void SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32& processedEffectMask);
+ void SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask);
+ void SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask);
+ void SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask);
+ void SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, WorldObject* target, uint32 effMask);
+ void SelectImplicitTrajTargets();
+
+ void SelectEffectTypeImplicitTargets(uint8 effIndex);
+
+ uint32 GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList* condList);
+ template<class SEARCHER> void SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* referer, Position const* pos, float radius);
+
+ WorldObject* SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList = NULL);
+ void SearchAreaTargets(std::list<WorldObject*>& targets, float range, Position const* position, Unit* referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList);
+ void SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTargets, WorldObject* target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, ConditionList* condList, bool isChainHeal);
+
void prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura = NULL);
void cancel();
void update(uint32 difftime);
@@ -403,14 +404,6 @@ class Spell
void DoCreateItem(uint32 i, uint32 itemtype);
void WriteSpellGoTargets(WorldPacket* data);
- void InitExplicitTargets(SpellCastTargets const& targets);
- void SelectSpellTargets();
- void SelectEffectTypeImplicitTargets(uint8 effIndex);
- uint32 SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur);
- void SelectTrajTargets();
-
- template<typename T> WorldObject* FindCorpseUsing();
-
bool CheckEffectTarget(Unit const* target, uint32 eff) const;
bool CanAutoCast(Unit* target);
void CheckSrc() { if (!m_targets.HasSrc()) m_targets.SetSrc(*m_caster); }
@@ -605,10 +598,6 @@ class Spell
void DoAllEffectOnTarget(GOTargetInfo* target);
void DoAllEffectOnTarget(ItemTargetInfo* target);
bool UpdateChanneledTargetList();
- void SearchAreaTarget(std::list<Unit*> &unitList, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry = 0);
- void SearchGOAreaTarget(std::list<GameObject*> &gobjectList, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry = 0);
- void SearchChainTarget(std::list<Unit*> &unitList, float radius, uint32 unMaxTargets, SpellTargets TargetType);
- WorldObject* SearchNearbyTarget(float range, SpellTargets TargetType, SpellEffIndex effIndex);
bool IsValidDeadOrAliveTarget(Unit const* target) const;
void HandleLaunchPhase();
void DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier);
@@ -642,7 +631,7 @@ class Spell
// effect helpers
void GetSummonPosition(uint32 i, Position &pos, float radius = 0.0f, uint32 count = 0);
- void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* properties);
+ void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* properties, uint32 numSummons);
void CalculateJumpSpeeds(uint8 i, float dist, float & speedxy, float & speedz);
SpellCastResult CanOpenLock(uint32 effIndex, uint32 lockid, SkillType& skillid, int32& reqSkillValue, int32& skillValue);
@@ -674,98 +663,52 @@ class Spell
namespace Trinity
{
- struct SpellNotifierCreatureAndPlayer
+ struct WorldObjectSpellTargetCheck
{
- std::list<Unit*> *i_data;
- SpellNotifyPushType i_push_type;
- float i_radius;
- SpellTargets i_TargetType;
- const Unit* const i_source;
- uint32 i_entry;
- const Position* const i_pos;
- SpellInfo const* i_spellProto;
-
- SpellNotifierCreatureAndPlayer(Unit* source, std::list<Unit*> &data, float radius, SpellNotifyPushType type,
- SpellTargets TargetType = SPELL_TARGETS_ENEMY, const Position* pos = NULL, uint32 entry = 0, SpellInfo const* spellProto = NULL)
- : i_data(&data), i_push_type(type), i_radius(radius), i_TargetType(TargetType),
- i_source(source), i_entry(entry), i_pos(pos), i_spellProto(spellProto)
- {
- ASSERT(i_source);
- }
+ Unit* _caster;
+ Unit* _referer;
+ SpellInfo const* _spellInfo;
+ SpellTargetCheckTypes _targetSelectionType;
+ ConditionSourceInfo* _condSrcInfo;
+ ConditionList* _condList;
+
+ WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
+ SpellTargetCheckTypes selectionType, ConditionList* condList);
+ ~WorldObjectSpellTargetCheck();
+ bool operator()(WorldObject* target);
+ };
- template<class T> inline void Visit(GridRefManager<T>& m)
- {
- for (typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr)
- {
- Unit* target = (Unit*)itr->getSource();
-
- if (i_spellProto->CheckTarget(i_source, target, true) != SPELL_CAST_OK)
- continue;
-
- switch (i_TargetType)
- {
- case SPELL_TARGETS_ENEMY:
- if (target->isTotem())
- continue;
- if (!i_source->_IsValidAttackTarget(target, i_spellProto))
- continue;
- break;
- case SPELL_TARGETS_ALLY:
- if (target->isTotem())
- continue;
- if (!i_source->_IsValidAssistTarget(target, i_spellProto))
- continue;
- break;
- case SPELL_TARGETS_ENTRY:
- if (target->GetEntry()!= i_entry)
- continue;
- break;
- case SPELL_TARGETS_ANY:
- default:
- break;
- }
-
- switch (i_push_type)
- {
- case PUSH_SRC_CENTER:
- case PUSH_DST_CENTER:
- case PUSH_CHAIN:
- default:
- if (target->IsWithinDist3d(i_pos, i_radius))
- i_data->push_back(target);
- break;
- case PUSH_IN_FRONT:
- if (i_source->isInFront(target, i_radius, static_cast<float>(M_PI/2)))
- i_data->push_back(target);
- break;
- case PUSH_IN_BACK:
- if (i_source->isInBack(target, i_radius, static_cast<float>(M_PI/2)))
- i_data->push_back(target);
- break;
- case PUSH_IN_LINE:
- if (i_source->HasInLine(target, i_radius, i_source->GetObjectSize()))
- i_data->push_back(target);
- break;
- case PUSH_IN_THIN_LINE: // only traj
- if (i_pos->HasInLine(target, i_radius, 0))
- i_data->push_back(target);
- break;
- }
- }
- }
+ struct WorldObjectSpellNearbyTargetCheck : public WorldObjectSpellTargetCheck
+ {
+ float _range;
+ Position const* _position;
+ WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
+ SpellTargetCheckTypes selectionType, ConditionList* condList);
+ bool operator()(WorldObject* target);
+ };
+
+ struct WorldObjectSpellAreaTargetCheck : public WorldObjectSpellTargetCheck
+ {
+ float _range;
+ Position const* _position;
+ WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster,
+ Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList);
+ bool operator()(WorldObject* target);
+ };
- #ifdef _WIN32
- template<> inline void Visit(CorpseMapType &) {}
- template<> inline void Visit(GameObjectMapType &) {}
- template<> inline void Visit(DynamicObjectMapType &) {}
- #endif
+ struct WorldObjectSpellConeTargetCheck : public WorldObjectSpellAreaTargetCheck
+ {
+ float _coneAngle;
+ WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster,
+ SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList);
+ bool operator()(WorldObject* target);
};
- #ifndef _WIN32
- template<> inline void SpellNotifierCreatureAndPlayer::Visit(CorpseMapType&) {}
- template<> inline void SpellNotifierCreatureAndPlayer::Visit(GameObjectMapType&) {}
- template<> inline void SpellNotifierCreatureAndPlayer::Visit(DynamicObjectMapType&) {}
- #endif
+ struct WorldObjectSpellTrajTargetCheck : public WorldObjectSpellAreaTargetCheck
+ {
+ WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, SpellInfo const* spellInfo);
+ bool operator()(WorldObject* target);
+ };
}
typedef void(Spell::*pEffect)(SpellEffIndex effIndex);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 6ea53fcfd8b..271d4859c4c 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -764,600 +764,6 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
// selection by spell family
switch (m_spellInfo->SpellFamilyName)
{
- case SPELLFAMILY_GENERIC:
- {
- switch (m_spellInfo->Id)
- {
- case 31225: // Shimmering Vessel (restore creature to life)
- {
- if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
- return;
- unitTarget->ToCreature()->setDeathState(JUST_ALIVED);
- return;
- }
- case 12162: // Deep wounds
- case 12850: // (now good common check for this spells)
- case 12868:
- {
- if (!unitTarget)
- return;
-
- // apply percent damage mods
- damage = m_caster->SpellDamageBonus(unitTarget, m_spellInfo, damage, SPELL_DIRECT_DAMAGE);
-
- switch (m_spellInfo->Id)
- {
- case 12162: ApplyPctN(damage, 16); break; // Rank 1
- case 12850: ApplyPctN(damage, 32); break; // Rank 2
- case 12868: ApplyPctN(damage, 48); break; // Rank 3
- default:
- sLog->outError("Spell::EffectDummy: Spell %u not handled in DW", m_spellInfo->Id);
- return;
- }
-
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(12721);
- uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude;
-
- // Add remaining ticks to damage done
- if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(12721, EFFECT_0, m_caster->GetGUID()))
- damage += aurEff->GetAmount() * (ticks - aurEff->GetTickNumber());
-
- damage = damage / ticks;
- m_caster->CastCustomSpell(unitTarget, 12721, &damage, NULL, NULL, true);
- return;
- }
- case 13567: // Dummy Trigger
- {
- // can be used for different aura triggering, so select by aura
- if (!m_triggeredByAuraSpell || !unitTarget)
- return;
-
- switch (m_triggeredByAuraSpell->Id)
- {
- case 26467: // Persistent Shield
- m_caster->CastCustomSpell(unitTarget, 26470, &damage, NULL, NULL, true);
- break;
- default:
- sLog->outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u", m_triggeredByAuraSpell->Id);
- break;
- }
- return;
- }
- case 17251: // Spirit Healer Res
- {
- if (!unitTarget || !m_originalCaster)
- return;
-
- if (m_originalCaster->GetTypeId() == TYPEID_PLAYER)
- {
- WorldPacket data(SMSG_SPIRIT_HEALER_CONFIRM, 8);
- data << uint64(unitTarget->GetGUID());
- m_originalCaster->ToPlayer()->GetSession()->SendPacket(&data);
- }
- return;
- }
- case 23019: // Crystal Prison Dummy DND
- {
- if (!unitTarget || !unitTarget->isAlive() || unitTarget->GetTypeId() != TYPEID_UNIT || unitTarget->ToCreature()->isPet())
- return;
-
- Creature* creatureTarget = unitTarget->ToCreature();
-
- m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, uint32(creatureTarget->GetRespawnTime()-time(NULL)));
- sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
-
- creatureTarget->DespawnOrUnsummon();
-
- return;
- }
- case 23448: // Transporter Arrival - Ultrasafe Transporter: Gadgetzan - backfires
- {
- int32 r = irand(0, 119);
- if (r < 20) // Transporter Malfunction - 1/6 polymorph
- m_caster->CastSpell(m_caster, 23444, true);
- else if (r < 100) // Evil Twin - 4/6 evil twin
- m_caster->CastSpell(m_caster, 23445, true);
- else // Transporter Malfunction - 1/6 miss the target
- m_caster->CastSpell(m_caster, 36902, true);
- return;
- }
- case 23453: // Gnomish Transporter - Ultrasafe Transporter: Gadgetzan
- if (roll_chance_i(50)) // Gadgetzan Transporter - success
- m_caster->CastSpell(m_caster, 23441, true);
- else // Gadgetzan Transporter Failure - failure
- m_caster->CastSpell(m_caster, 23446, true);
- return;
- case 25860: // Reindeer Transformation
- {
- if (!m_caster->HasAuraType(SPELL_AURA_MOUNTED))
- return;
-
- float flyspeed = m_caster->GetSpeedRate(MOVE_FLIGHT);
- float speed = m_caster->GetSpeedRate(MOVE_RUN);
-
- m_caster->RemoveAurasByType(SPELL_AURA_MOUNTED);
-
- //5 different spells used depending on mounted speed and if mount can fly or not
- if (flyspeed >= 4.1f)
- // Flying Reindeer
- m_caster->CastSpell(m_caster, 44827, true); //310% flying Reindeer
- else if (flyspeed >= 3.8f)
- // Flying Reindeer
- m_caster->CastSpell(m_caster, 44825, true); //280% flying Reindeer
- else if (flyspeed >= 1.6f)
- // Flying Reindeer
- m_caster->CastSpell(m_caster, 44824, true); //60% flying Reindeer
- else if (speed >= 2.0f)
- // Reindeer
- m_caster->CastSpell(m_caster, 25859, true); //100% ground Reindeer
- else
- // Reindeer
- m_caster->CastSpell(m_caster, 25858, true); //60% ground Reindeer
-
- return;
- }
- case 26074: // Holiday Cheer
- // implemented at client side
- return;
- // Polarity Shift
- case 28089:
- if (unitTarget)
- unitTarget->CastSpell(unitTarget, roll_chance_i(50) ? 28059 : 28084, true, NULL, NULL, m_caster->GetGUID());
- break;
- // Polarity Shift
- case 39096:
- if (unitTarget)
- unitTarget->CastSpell(unitTarget, roll_chance_i(50) ? 39088 : 39091, true, NULL, NULL, m_caster->GetGUID());
- break;
- case 29200: // Purify Helboar Meat
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- spell_id = roll_chance_i(50)
- ? 29277 // Summon Purified Helboar Meat
- : 29278; // Summon Toxic Helboar Meat
-
- m_caster->CastSpell(m_caster, spell_id, true, NULL);
- return;
- }
- case 29858: // Soulshatter
- if (unitTarget && unitTarget->CanHaveThreatList()
- && unitTarget->getThreatManager().getThreat(m_caster) > 0.0f)
- m_caster->CastSpell(unitTarget, 32835, true);
- return;
- case 30458: // Nigh Invulnerability
- if (!m_CastItem) return;
- if (roll_chance_i(86)) // Nigh-Invulnerability - success
- m_caster->CastSpell(m_caster, 30456, true, m_CastItem);
- else // Complete Vulnerability - backfire in 14% casts
- m_caster->CastSpell(m_caster, 30457, true, m_CastItem);
- return;
- case 30507: // Poultryizer
- if (!m_CastItem) return;
- if (roll_chance_i(80)) // Poultryized! - success
- m_caster->CastSpell(unitTarget, 30501, true, m_CastItem);
- else // Poultryized! - backfire 20%
- m_caster->CastSpell(unitTarget, 30504, true, m_CastItem);
- return;
- case 35745: // Socrethar's Stone
- {
- switch (m_caster->GetAreaId())
- {
- case 3900:
- spell_id = 35743;
- break; // Socrethar Portal
- case 3742:
- spell_id = 35744;
- break; // Socrethar Portal
- default:
- return;
- }
-
- m_caster->CastSpell(m_caster, spell_id, true);
- return;
- }
- case 37674: // Chaos Blast
- {
- if (!unitTarget)
- return;
-
- int32 basepoints0 = 100;
- m_caster->CastCustomSpell(unitTarget, 37675, &basepoints0, NULL, NULL, true);
- return;
- }
- // Wrath of the Astromancer
- case 42784:
- {
- uint32 count = 0;
- for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
- if (ihit->effectMask & (1<<effIndex))
- ++count;
-
- damage = 12000; // maybe wrong value
- damage /= count;
-
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(42784);
-
- // now deal the damage
- for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
- if (ihit->effectMask & (1<<effIndex))
- {
- if (Unit* casttarget = Unit::GetUnit((*unitTarget), ihit->targetGUID))
- m_caster->DealDamage(casttarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, spellInfo, false);
- }
-
- return;
- }
- // Demon Broiled Surprise
- case 43723:
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- Player* player = (Player*)m_caster;
-
- if (player && player->GetQuestStatus(11379) == QUEST_STATUS_INCOMPLETE)
- {
- Creature* creature = player->FindNearestCreature(19973, 10, false);
- if (!creature)
- {
- SendCastResult(SPELL_FAILED_NOT_HERE);
- return;
- }
-
- player->CastSpell(player, 43753, false);
- }
- return;
- }
- case 44875: // Complete Raptor Capture
- {
- if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
- return;
-
- unitTarget->ToCreature()->DespawnOrUnsummon();
-
- //cast spell Raptor Capture Credit
- m_caster->CastSpell(m_caster, 42337, true, NULL);
- return;
- }
- case 47170: // Impale Leviroth
- {
- if (!unitTarget || (unitTarget->GetEntry() != 26452 && unitTarget->HealthAbovePct(95)))
- return;
-
- m_caster->DealDamage(unitTarget, unitTarget->CountPctFromMaxHealth(93));
- return;
- }
- case 49357: // Brewfest Mount Transformation
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
- if (!m_caster->HasAuraType(SPELL_AURA_MOUNTED))
- return;
- m_caster->RemoveAurasByType(SPELL_AURA_MOUNTED);
- // Ram for Alliance, Kodo for Horde
- if (m_caster->ToPlayer()->GetTeam() == ALLIANCE)
- {
- if (m_caster->GetSpeedRate(MOVE_RUN) >= 2.0f)
- // 100% Ram
- m_caster->CastSpell(m_caster, 43900, true);
- else
- // 60% Ram
- m_caster->CastSpell(m_caster, 43899, true);
- }
- else
- {
- if (m_caster->ToPlayer()->GetSpeedRate(MOVE_RUN) >= 2.0f)
- // 100% Kodo
- m_caster->CastSpell(m_caster, 49379, true);
- else
- // 60% Kodo
- m_caster->CastSpell(m_caster, 49378, true);
- }
- return;
- case 52845: // Brewfest Mount Transformation (Faction Swap)
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
- if (!m_caster->HasAuraType(SPELL_AURA_MOUNTED))
- return;
- m_caster->RemoveAurasByType(SPELL_AURA_MOUNTED);
- // Ram for Horde, Kodo for Alliance
- if (m_caster->ToPlayer()->GetTeam() == HORDE)
- {
- if (m_caster->GetSpeedRate(MOVE_RUN) >= 2.0f)
- // 100% Ram
- m_caster->CastSpell(m_caster, 43900, true);
- else
- // 60% Ram
- m_caster->CastSpell(m_caster, 43899, true);
- }
- else
- {
- if (m_caster->ToPlayer()->GetSpeedRate(MOVE_RUN) >= 2.0f)
- // 100% Kodo
- m_caster->CastSpell(m_caster, 49379, true);
- else
- // 60% Kodo
- m_caster->CastSpell(m_caster, 49378, true);
- }
- return;
- case 55004: // Nitro Boosts
- if (!m_CastItem)
- return;
- if (roll_chance_i(95)) // Nitro Boosts - success
- m_caster->CastSpell(m_caster, 54861, true, m_CastItem);
- else // Knocked Up - backfire 5%
- m_caster->CastSpell(m_caster, 46014, true, m_CastItem);
- return;
- case 50243: // Teach Language
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- // spell has a 1/3 chance to trigger one of the below
- if (roll_chance_i(66))
- return;
- if (m_caster->ToPlayer()->GetTeam() == ALLIANCE)
- {
- // 1000001 - gnomish binary
- m_caster->CastSpell(m_caster, 50242, true);
- }
- else
- {
- // 01001000 - goblin binary
- m_caster->CastSpell(m_caster, 50246, true);
- }
-
- return;
- }
- case 51582: //Rocket Boots Engaged (Rocket Boots Xtreme and Rocket Boots Xtreme Lite)
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- if (Battleground* bg = m_caster->ToPlayer()->GetBattleground())
- bg->EventPlayerDroppedFlag(m_caster->ToPlayer());
-
- m_caster->CastSpell(m_caster, 30452, true, NULL);
- return;
- }
- case 52759: // Ancestral Awakening
- if (!unitTarget)
- return;
- m_caster->CastCustomSpell(unitTarget, 52752, &damage, NULL, NULL, true);
- return;
- case 54171: // Divine Storm
- {
- if (m_UniqueTargetInfo.size())
- {
- int32 heal = damage / m_UniqueTargetInfo.size();
- m_caster->CastCustomSpell(unitTarget, 54172, &heal, NULL, NULL, true);
- }
- return;
- }
- case 58418: // Portal to Orgrimmar
- case 58420: // Portal to Stormwind
- return; // implemented in EffectScript[0]
- case 62324: // Throw Passenger
- {
- if (m_targets.HasTraj())
- {
- if (Vehicle* vehicle = m_caster->GetVehicleKit())
- if (Unit* passenger = vehicle->GetPassenger(damage - 1))
- {
- std::list<Unit*> unitList;
- // use 99 because it is 3d search
- SearchAreaTarget(unitList, 99, PUSH_DST_CENTER, SPELL_TARGETS_ENTRY, 33114);
- float minDist = 99 * 99;
- Unit* target = NULL;
- for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
- {
- if (Vehicle* seat = (*itr)->GetVehicleKit())
- if (!seat->GetPassenger(0))
- if (Unit* device = seat->GetPassenger(2))
- if (!device->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
- {
- float dist = (*itr)->GetExactDistSq(m_targets.GetDst());
- if (dist < minDist)
- {
- minDist = dist;
- target = (*itr);
- }
- }
- }
- if (target && target->IsWithinDist2d(m_targets.GetDst(), m_spellInfo->Effects[effIndex].CalcRadius() * 2)) // now we use *2 because the location of the seat is not correct
- passenger->EnterVehicle(target, 0);
- else
- {
- passenger->ExitVehicle();
- float x, y, z;
- m_targets.GetDst()->GetPosition(x, y, z);
- passenger->GetMotionMaster()->MoveJump(x, y, z, m_targets.GetSpeedXY(), m_targets.GetSpeedZ());
- }
- }
- }
- return;
- }
- case 64385: // Unusual Compass
- {
- m_caster->SetOrientation(float(urand(0, 62832)) / 10000.0f);
- WorldPacket data;
- m_caster->BuildHeartBeatMsg(&data);
- m_caster->SendMessageToSet(&data, true);
- return;
- }
- case 53808: // Pygmy Oil
- {
- Aura* pAura = m_caster->GetAura(53806);
- if (pAura)
- pAura->RefreshDuration();
- else
- {
- pAura = m_caster->GetAura(53805);
- if (!pAura || pAura->GetStackAmount() < 5 || !roll_chance_i(50))
- m_caster->CastSpell(m_caster, 53805, true);
- else
- {
- pAura->Remove();
- m_caster->CastSpell(m_caster, 53806, true);
- }
- }
- return;
- }
- case 54577: // U.D.E.D.
- {
- if (unitTarget->GetEntry() != 29402)
- return;
-
- m_caster->SummonGameObject(192693, unitTarget->GetPositionX(), unitTarget->GetPositionY(),
- unitTarget->GetPositionZ(), unitTarget->GetOrientation(), 0, 0, 0, 0, 100);
-
- for (uint8 i = 0; i < 4; ++i)
- m_caster->SummonGameObject(191567, float(unitTarget->GetPositionX() + irand(-7, 7)),
- float(unitTarget->GetPositionY() + irand(-7, 7)), unitTarget->GetPositionZ(), unitTarget->GetOrientation(),
- 0, 0, 0, 0, 100);
-
- unitTarget->Kill(unitTarget);
- return;
- }
- case 51961: // Captured Chicken Cover - Quest 12702 & 12532
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER
- || !unitTarget->HasAura(51959)
- || !(m_caster->ToPlayer()->GetQuestStatus(12702) == QUEST_STATUS_INCOMPLETE || m_caster->ToPlayer()->GetQuestStatus(12532) == QUEST_STATUS_INCOMPLETE))
- return;
-
- m_caster->CastSpell(m_caster, 51037, true);
- unitTarget->Kill(unitTarget);
- return;
- }
- }
-
- break;
- }
- case SPELLFAMILY_WARRIOR:
- // Charge
- if (m_spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_WARRIOR_CHARGE && m_spellInfo->SpellVisual[0] == 867)
- {
- int32 chargeBasePoints0 = damage;
- m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, NULL, NULL, true);
-
- //Juggernaut crit bonus
- if (m_caster->HasAura(64976))
- m_caster->CastSpell(m_caster, 65156, true);
- return;
- }
- // Slam
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_WARRIOR_SLAM && m_spellInfo->SpellIconID == 559)
- {
- int32 bp0 = damage;
- m_caster->CastCustomSpell(unitTarget, 50783, &bp0, NULL, NULL, true, 0);
- return;
- }
- // Execute
- if (m_spellInfo->SpellFamilyFlags[EFFECT_0] & SPELLFAMILYFLAG_WARRIOR_EXECUTE)
- {
- if (!unitTarget)
- return;
-
- spell_id = 20647;
-
- int32 rageUsed = std::min<int32>(300 - m_powerCost, m_caster->GetPower(POWER_RAGE));
- int32 newRage = std::max<int32>(0, m_caster->GetPower(POWER_RAGE) - rageUsed);
-
- // Sudden Death rage save
- if (AuraEffect* aurEff = m_caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_GENERIC, 1989, EFFECT_0))
- {
- int32 ragesave = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue() * 10;
- newRage = std::max(newRage, ragesave);
- }
-
- m_caster->SetPower(POWER_RAGE, uint32(newRage));
-
- // Glyph of Execution bonus
- if (AuraEffect* aurEff = m_caster->GetAuraEffect(58367, EFFECT_0))
- rageUsed += aurEff->GetAmount() * 10;
-
- bp = damage + int32(rageUsed * m_spellInfo->Effects[effIndex].DamageMultiplier + m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.2f);
- break;
- }
- // Concussion Blow
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_WARRIOR_CONCUSSION_BLOW)
- {
- m_damage += CalculatePctF(damage, m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
- return;
- }
- switch (m_spellInfo->Id)
- {
- // Bloodthirst
- case 23881:
- {
- m_caster->CastCustomSpell(unitTarget, 23885, &damage, NULL, NULL, true, NULL);
- return;
- }
- }
- break;
- case SPELLFAMILY_WARLOCK:
- // Life Tap
- if ((m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_WARLOCK_LIFETAP) && m_caster->ToPlayer())
- {
- float spFactor = 0.0f;
- switch (m_spellInfo->Id)
- {
- case 11689: spFactor = 0.2f; break;
- case 27222:
- case 57946: spFactor = 0.5f; break;
- }
- int32 damage = int32(m_spellInfo->Effects[EFFECT_0].CalcValue() + (6.3875 * m_spellInfo->BaseLevel));
- int32 mana = int32(damage + (m_caster->ToPlayer()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+SPELL_SCHOOL_SHADOW) * spFactor));
-
- if (unitTarget && (int32(unitTarget->GetHealth()) > damage))
- {
- // Shouldn't Appear in Combat Log
- unitTarget->ModifyHealth(-damage);
-
- // Improved Life Tap mod
- if (AuraEffect const* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 208, 0))
- AddPctN(mana, aurEff->GetAmount());
-
- m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, false);
-
- // Mana Feed
- int32 manaFeedVal = 0;
- if (AuraEffect const* aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 1982, 0))
- manaFeedVal = aurEff->GetAmount();
-
- if (manaFeedVal > 0)
- {
- ApplyPctN(manaFeedVal, mana);
- m_caster->CastCustomSpell(m_caster, 32553, &manaFeedVal, NULL, NULL, true, NULL);
- }
- }
- else
- SendCastResult(SPELL_FAILED_FIZZLE);
- return;
- }
- break;
- case SPELLFAMILY_DRUID:
- // Starfall
- if (m_spellInfo->SpellFamilyFlags[2] & SPELLFAMILYFLAG2_DRUID_STARFALL)
- {
- //Shapeshifting into an animal form or mounting cancels the effect.
- if (m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
- {
- if (m_triggeredByAuraSpell)
- m_caster->RemoveAurasDueToSpell(m_triggeredByAuraSpell->Id);
- return;
- }
-
- //Any effect which causes you to lose control of your character will supress the starfall effect.
- if (m_caster->HasUnitState(UNIT_STATE_CONTROLLED))
- return;
-
- m_caster->CastSpell(unitTarget, damage, true);
- return;
- }
- break;
case SPELLFAMILY_PALADIN:
switch (m_spellInfo->Id)
{
@@ -1391,128 +797,40 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
}
break;
- case SPELLFAMILY_SHAMAN:
- // Cleansing Totem Pulse
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS && m_spellInfo->SpellIconID == 1673)
- {
- int32 bp1 = 1;
- // Cleansing Totem Effect
- if (unitTarget)
- m_caster->CastCustomSpell(unitTarget, 52025, NULL, &bp1, NULL, true, NULL, NULL, m_originalCasterGUID);
- return;
- }
- // Healing Stream Totem
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_SHAMAN_HEALING_STREAM)
- {
- if (!unitTarget)
- return;
- if (Unit* owner = m_caster->GetOwner())
- {
- if (m_triggeredByAuraSpell)
- damage = int32(owner->SpellHealingBonus(unitTarget, m_triggeredByAuraSpell, damage, HEAL));
-
- // Restorative Totems
- if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 338, 1))
- AddPctN(damage, dummy->GetAmount());
-
- // Glyph of Healing Stream Totem
- if (AuraEffect const* aurEff = owner->GetAuraEffect(55456, EFFECT_0))
- AddPctN(damage, aurEff->GetAmount());
- }
- m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
- return;
- }
- // Mana Spring Totem
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_SHAMAN_MANA_SPRING)
- {
- if (!unitTarget || unitTarget->getPowerType() != POWER_MANA)
- return;
- m_caster->CastCustomSpell(unitTarget, 52032, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
- return;
- }
- // Lava Lash
- if (m_spellInfo->SpellFamilyFlags[2] & SPELLFAMILYFLAG2_SHAMAN_LAVA_LASH)
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- if (m_caster->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
- {
- // Damage is increased by 25% if your off-hand weapon is enchanted with Flametongue.
- if (m_caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x200000, 0, 0))
- AddPctN(m_damage, damage);
- }
- return;
- }
- break;
case SPELLFAMILY_DEATHKNIGHT:
- // Death strike
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_DK_DEATH_STRIKE)
- {
- uint32 count = unitTarget->GetDiseasesByCaster(m_caster->GetGUID());
- bp = int32(count * m_caster->CountPctFromMaxHealth(int32(m_spellInfo->Effects[EFFECT_0].DamageMultiplier)));
- // Improved Death Strike
- if (AuraEffect const* aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
- AddPctN(bp, m_caster->CalculateSpellDamage(m_caster, aurEff->GetSpellInfo(), 2));
- m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, false);
- return;
- }
- // Death Coil
- if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_DK_DEATH_COIL)
- {
- if (m_caster->IsFriendlyTo(unitTarget))
- {
- bp = int32(damage * 1.5f);
- m_caster->CastCustomSpell(unitTarget, 47633, &bp, NULL, NULL, true);
- }
- else
- {
- bp = damage;
- m_caster->CastCustomSpell(unitTarget, 47632, &bp, NULL, NULL, true);
- }
- return;
- }
switch (m_spellInfo->Id)
{
- case 49560: // Death Grip
- Position pos;
- GetSummonPosition(effIndex, pos);
- if (Unit* unit = unitTarget->GetVehicleBase()) // what is this for?
- unit->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), damage, true);
- else if (!unitTarget->HasAuraType(SPELL_AURA_DEFLECT_SPELLS)) // Deterrence
- unitTarget->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), damage, true);
- return;
- case 46584: // Raise Dead
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return;
+ case 46584: // Raise Dead
+ if (m_caster->GetTypeId() != TYPEID_PLAYER)
+ return;
- // Do we have talent Master of Ghouls?
- if (m_caster->HasAura(52143))
- // summon as pet
- bp = 52150;
- else
- // or guardian
- bp = 46585;
+ // Do we have talent Master of Ghouls?
+ if (m_caster->HasAura(52143))
+ // summon as pet
+ bp = 52150;
+ else
+ // or guardian
+ bp = 46585;
- if (m_targets.HasDst())
- targets.SetDst(*m_targets.GetDst());
- else
- {
- targets.SetDst(*m_caster);
- // Corpse not found - take reagents (only not triggered cast can take them)
- triggered = false;
- }
- // Remove cooldown - summon spellls have category
- m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true);
- spell_id = 48289;
- break;
- // Raise dead - take reagents and trigger summon spells
- case 48289:
- if (m_targets.HasDst())
- targets.SetDst(*m_targets.GetDst());
+ if (m_targets.HasDst())
+ targets.SetDst(*m_targets.GetDst());
+ else
+ {
+ targets.SetDst(*m_caster);
+ // Corpse not found - take reagents (only not triggered cast can take them)
+ triggered = false;
+ }
+ // Remove cooldown - summon spellls have category
+ m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true);
+ spell_id = 48289;
+ break;
+ // Raise dead - take reagents and trigger summon spells
+ case 48289:
+ if (m_targets.HasDst())
+ targets.SetDst(*m_targets.GetDst());
- spell_id = CalculateDamage(0, NULL);
- break;
+ spell_id = CalculateDamage(0, NULL);
+ break;
}
break;
}
@@ -3057,6 +2375,36 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
TempSummon* summon = NULL;
+ // determine how many units should be summoned
+ uint32 numSummons;
+
+ // some spells need to summon many units, for those spells number of summons is stored in effect value
+ // however so far noone found a generic check to find all of those (there's no related data in summonproperties.dbc
+ // and in spell attributes, possibly we need to add a table for those)
+ // so here's a list of MiscValueB values, which is currently most generic check
+ switch (properties->Id)
+ {
+ case 64:
+ case 61:
+ case 1101:
+ case 66:
+ case 648:
+ case 2301:
+ case 1061:
+ case 1261:
+ case 629:
+ case 181:
+ case 715:
+ case 1562:
+ case 833:
+ case 1161:
+ numSummons = (damage > 0) ? damage : 1;
+ break;
+ default:
+ numSummons = 1;
+ break;
+ }
+
switch (properties->Category)
{
case SUMMON_CATEGORY_WILD:
@@ -3064,7 +2412,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
case SUMMON_CATEGORY_UNK:
if (properties->Flags & 512)
{
- SummonGuardian(effIndex, entry, properties);
+ SummonGuardian(effIndex, entry, properties, numSummons);
break;
}
switch (properties->Type)
@@ -3073,7 +2421,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
case SUMMON_TYPE_GUARDIAN:
case SUMMON_TYPE_GUARDIAN2:
case SUMMON_TYPE_MINION:
- SummonGuardian(effIndex, entry, properties);
+ SummonGuardian(effIndex, entry, properties, numSummons);
break;
// Summons a vehicle, but doesn't force anyone to enter it (see SUMMON_CATEGORY_VEHICLE)
case SUMMON_TYPE_VEHICLE:
@@ -3106,7 +2454,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
summon->SelectLevel(summon->GetCreatureInfo()); // some summoned creaters have different from 1 DB data for level/hp
summon->SetUInt32Value(UNIT_NPC_FLAGS, summon->GetCreatureInfo()->npcflag);
- summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
summon->AI()->EnterEvadeMode();
break;
@@ -3115,14 +2463,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
{
float radius = m_spellInfo->Effects[effIndex].CalcRadius();
- uint32 amount = damage > 0 ? damage : 1;
- if (m_spellInfo->Id == 18662 || // Curse of Doom
- properties->Id == 2081) // Mechanical Dragonling, Arcanite Dragonling, Mithril Dragonling TODO: Research on meaning of basepoints
- amount = 1;
-
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
- for (uint32 count = 0; count < amount; ++count)
+ for (uint32 count = 0; count < numSummons; ++count)
{
GetSummonPosition(effIndex, pos, radius, count);
@@ -3144,7 +2487,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
}//switch
break;
case SUMMON_CATEGORY_PET:
- SummonGuardian(effIndex, entry, properties);
+ SummonGuardian(effIndex, entry, properties, numSummons);
break;
case SUMMON_CATEGORY_PUPPET:
summon = m_caster->GetMap()->SummonCreature(entry, pos, properties, duration, m_originalCaster, m_spellInfo->Id);
@@ -3330,7 +2673,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
// Send dispelled spell info
dataSuccess << uint32(itr->first->GetId()); // Spell Id
dataSuccess << uint8(0); // 0 - dispelled !=0 cleansed
- unitTarget->RemoveAurasDueToSpellByDispel(itr->first->GetId(), itr->first->GetCasterGUID(), m_caster, itr->second);
+ unitTarget->RemoveAurasDueToSpellByDispel(itr->first->GetId(), m_spellInfo->Id, itr->first->GetCasterGUID(), m_caster, itr->second);
}
m_caster->SendMessageToSet(&dataSuccess, true);
@@ -3795,7 +3138,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
{
SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(67);
if (properties)
- SummonGuardian(effIndex, petentry, properties);
+ SummonGuardian(effIndex, petentry, properties, 1);
return;
}
@@ -5601,7 +4944,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
if (target->isInFlight())
return;
- target->TeleportTo(target->GetStartPosition(), m_caster == m_caster ? TELE_TO_SPELL : 0);
+ target->TeleportTo(target->GetStartPosition(), TELE_TO_SPELL);
// homebind location is loaded always
// target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation(), (m_caster == m_caster ? TELE_TO_SPELL : 0));
@@ -5627,7 +4970,7 @@ void Spell::EffectSummonPlayer(SpellEffIndex /*effIndex*/)
return;
float x, y, z;
- m_caster->GetClosePoint(x, y, z, unitTarget->GetObjectSize());
+ m_caster->GetPosition(x, y, z);
unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(), x, y, z);
@@ -6016,7 +5359,10 @@ void Spell::EffectLeap(SpellEffIndex /*effIndex*/)
if (!m_targets.HasDst())
return;
- unitTarget->NearTeleportTo(m_targets.GetDst()->GetPositionX(), m_targets.GetDst()->GetPositionY(), m_targets.GetDst()->GetPositionZ(), m_targets.GetDst()->GetOrientation(), unitTarget == m_caster);
+ Position pos;
+ m_targets.GetDst()->GetPosition(&pos);
+ unitTarget->GetFirstCollisionPosition(pos, unitTarget->GetDistance(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ() + 2.0f), 0.0f);
+ unitTarget->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), unitTarget == m_caster);
}
void Spell::EffectReputation(SpellEffIndex effIndex)
@@ -7062,7 +6408,7 @@ void Spell::EffectGameObjectSetDestructionState(SpellEffIndex effIndex)
gameObjTarget->SetDestructibleState(GameObjectDestructibleState(m_spellInfo->Effects[effIndex].MiscValue), player, true);
}
-void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* properties)
+void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* properties, uint32 numGuardians)
{
Unit* caster = m_originalCaster;
if (!caster)
@@ -7081,27 +6427,16 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
if (uint16 skill202 = caster->ToPlayer()->GetSkillValue(SKILL_ENGINEERING))
level = skill202 / 5;
- //float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
float radius = 5.0f;
- uint32 amount = damage > 0 ? damage : 1;
int32 duration = m_spellInfo->GetDuration();
- switch (m_spellInfo->Id)
- {
- case 1122: // Inferno
- amount = 1;
- break;
- case 49028: // Dancing Rune Weapon
- if (AuraEffect* aurEff = m_originalCaster->GetAuraEffect(63330, 0)) // glyph of Dancing Rune Weapon
- duration += aurEff->GetAmount();
- break;
- }
+
if (Player* modOwner = m_originalCaster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
//TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
Map* map = caster->GetMap();
- for (uint32 count = 0; count < amount; ++count)
+ for (uint32 count = 0; count < numGuardians; ++count)
{
Position pos;
GetSummonPosition(i, pos, radius, count);
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 718efaed411..8b8f1fb5afc 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -20,6 +20,7 @@
#include "SpellMgr.h"
#include "Spell.h"
#include "DBCStores.h"
+#include "ConditionMgr.h"
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
{
@@ -80,7 +81,7 @@ SpellTargetObjectTypes SpellImplicitTargetInfo::GetObjectType() const
return _data[_target].ObjectType;
}
-SpellTargetSelectionCheckTypes SpellImplicitTargetInfo::GetSelectionCheckType() const
+SpellTargetCheckTypes SpellImplicitTargetInfo::GetCheckType() const
{
return _data[_target].SelectionCheckType;
}
@@ -158,23 +159,25 @@ uint32 SpellImplicitTargetInfo::GetExplicitTargetMask(bool& srcSet, bool& dstSet
case TARGET_OBJECT_TYPE_UNIT_AND_DEST:
case TARGET_OBJECT_TYPE_UNIT:
case TARGET_OBJECT_TYPE_DEST:
- switch (GetSelectionCheckType())
+ switch (GetCheckType())
{
- case TARGET_SELECT_CHECK_ENEMY:
+ case TARGET_CHECK_ENEMY:
targetMask = TARGET_FLAG_UNIT_ENEMY;
break;
- case TARGET_SELECT_CHECK_ALLY:
+ case TARGET_CHECK_ALLY:
targetMask = TARGET_FLAG_UNIT_ALLY;
break;
- case TARGET_SELECT_CHECK_PARTY:
+ case TARGET_CHECK_PARTY:
targetMask = TARGET_FLAG_UNIT_PARTY;
break;
- case TARGET_SELECT_CHECK_RAID:
+ case TARGET_CHECK_RAID:
targetMask = TARGET_FLAG_UNIT_RAID;
break;
- case TARGET_SELECT_CHECK_PASSENGER:
+ case TARGET_CHECK_PASSENGER:
targetMask = TARGET_FLAG_UNIT_PASSENGER;
break;
+ case TARGET_CHECK_RAID_CLASS:
+ // nobreak;
default:
targetMask = TARGET_FLAG_UNIT;
break;
@@ -344,117 +347,117 @@ SpellSelectTargetTypes SpellImplicitTargetInfo::Type[TOTAL_SPELL_TARGETS];
SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_TARGETS] =
{
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, //
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 1 TARGET_UNIT_CASTER
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 2 TARGET_UNIT_NEARBY_ENEMY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_PARTY, TARGET_DIR_NONE}, // 3 TARGET_UNIT_NEARBY_PARTY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 4 TARGET_UNIT_NEARBY_ALLY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 5 TARGET_UNIT_PET
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 6 TARGET_UNIT_TARGET_ENEMY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_ENTRY, TARGET_DIR_NONE}, // 7 TARGET_UNIT_SRC_AREA_ENTRY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_ENTRY, TARGET_DIR_NONE}, // 8 TARGET_UNIT_DEST_AREA_ENTRY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 9 TARGET_DEST_HOME
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 10
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 11 TARGET_UNIT_SRC_AREA_UNK_11
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 12
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 13
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 14
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 15 TARGET_UNIT_SRC_AREA_ENEMY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 16 TARGET_UNIT_DEST_AREA_ENEMY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 17 TARGET_DEST_DB
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 18 TARGET_DEST_CASTER
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 19
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_PARTY, TARGET_DIR_NONE}, // 20 TARGET_UNIT_CASTER_AREA_PARTY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 21 TARGET_UNIT_TARGET_ALLY
- {TARGET_OBJECT_TYPE_SRC, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 22 TARGET_SRC_CASTER
- {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 23 TARGET_GAMEOBJECT_TARGET
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_FRONT}, // 24 TARGET_UNIT_CONE_ENEMY_24
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 25 TARGET_UNIT_TARGET_ANY
- {TARGET_OBJECT_TYPE_GOBJ_ITEM, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 26 TARGET_GAMEOBJECT_ITEM_TARGET
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 27 TARGET_UNIT_MASTER
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 28 TARGET_DEST_DYNOBJ_ENEMY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 29 TARGET_DEST_DYNOBJ_ALLY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 30 TARGET_UNIT_SRC_AREA_ALLY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 31 TARGET_UNIT_DEST_AREA_ALLY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 32 TARGET_DEST_CASTER_SUMMON
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_PARTY, TARGET_DIR_NONE}, // 33 TARGET_UNIT_SRC_AREA_PARTY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_PARTY, TARGET_DIR_NONE}, // 34 TARGET_UNIT_DEST_AREA_PARTY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_PARTY, TARGET_DIR_NONE}, // 35 TARGET_UNIT_TARGET_PARTY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 36 TARGET_DEST_CASTER_UNK_36
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_LAST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_PARTY, TARGET_DIR_NONE}, // 37 TARGET_UNIT_LASTTARGET_AREA_PARTY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_ENTRY, TARGET_DIR_NONE}, // 38 TARGET_UNIT_NEARBY_ENTRY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 39 TARGET_DEST_CASTER_FISHING
- {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_ENTRY, TARGET_DIR_NONE}, // 40 TARGET_GAMEOBJECT_NEARBY_ENTRY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_RIGHT}, // 41 TARGET_DEST_CASTER_FRONT_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK_RIGHT}, // 42 TARGET_DEST_CASTER_BACK_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK_LEFT}, // 43 TARGET_DEST_CASTER_BACK_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 44 TARGET_DEST_CASTER_FRONT_LEFT
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_NONE}, // 45 TARGET_UNIT_TARGET_CHAINHEAL_ALLY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_ENTRY, TARGET_DIR_NONE}, // 46 TARGET_DEST_NEARBY_ENTRY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 47 TARGET_DEST_CASTER_FRONT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK}, // 48 TARGET_DEST_CASTER_BACK
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RIGHT}, // 49 TARGET_DEST_CASTER_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_LEFT}, // 50 TARGET_DEST_CASTER_LEFT
- {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 51 TARGET_GAMEOBJECT_SRC_AREA
- {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 52 TARGET_GAMEOBJECT_DEST_AREA
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 53 TARGET_DEST_TARGET_ENEMY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_FRONT}, // 54 TARGET_UNIT_CONE_ENEMY_54
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 55 TARGET_DEST_CASTER_FRONT_LEAP
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_RAID, TARGET_DIR_NONE}, // 56 TARGET_UNIT_CASTER_AREA_RAID
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_RAID, TARGET_DIR_NONE}, // 57 TARGET_UNIT_TARGET_RAID
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_SELECT_CHECK_RAID, TARGET_DIR_NONE}, // 58 TARGET_UNIT_NEARBY_RAID
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_ALLY, TARGET_DIR_FRONT}, // 59 TARGET_UNIT_CONE_ALLY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_ENTRY, TARGET_DIR_FRONT}, // 60 TARGET_UNIT_CONE_ENTRY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_AREA, TARGET_SELECT_CHECK_RAID, TARGET_DIR_NONE}, // 61 TARGET_UNIT_TARGET_AREA_RAID_CLASS
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 62 TARGET_UNK_62
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 63 TARGET_DEST_TARGET_ANY
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 64 TARGET_DEST_TARGET_FRONT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK}, // 65 TARGET_DEST_TARGET_BACK
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RIGHT}, // 66 TARGET_DEST_TARGET_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_LEFT}, // 67 TARGET_DEST_TARGET_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_RIGHT}, // 68 TARGET_DEST_TARGET_FRONT_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK_RIGHT}, // 69 TARGET_DEST_TARGET_BACK_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK_LEFT}, // 70 TARGET_DEST_TARGET_BACK_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 71 TARGET_DEST_TARGET_FRONT_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 72 TARGET_DEST_CASTER_RANDOM
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 73 TARGET_DEST_CASTER_RADIUS
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 74 TARGET_DEST_TARGET_RANDOM
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 75 TARGET_DEST_TARGET_RADIUS
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 76 TARGET_DEST_CHANNEL_TARGET
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 77 TARGET_UNIT_CHANNEL_TARGET
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 78 TARGET_DEST_DEST_FRONT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK}, // 79 TARGET_DEST_DEST_BACK
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RIGHT}, // 80 TARGET_DEST_DEST_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_LEFT}, // 81 TARGET_DEST_DEST_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_RIGHT}, // 82 TARGET_DEST_DEST_FRONT_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK_RIGHT}, // 83 TARGET_DEST_DEST_BACK_RIGHT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_BACK_LEFT}, // 84 TARGET_DEST_DEST_BACK_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 85 TARGET_DEST_DEST_FRONT_LEFT
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 86 TARGET_DEST_DEST_RANDOM
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 87 TARGET_DEST_DEST
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 88 TARGET_DEST_DYNOBJ_NONE
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 89 TARGET_DEST_TRAJ
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 90 TARGET_UNIT_TARGET_MINIPET
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 91 TARGET_DEST_DEST_RADIUS
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 92 TARGET_UNIT_SUMMONER
- {TARGET_OBJECT_TYPE_CORPSE, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_NONE}, // 93 TARGET_CORPSE_SRC_AREA_ENEMY
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 94 TARGET_UNIT_VEHICLE
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_PASSENGER, TARGET_DIR_NONE}, // 95 TARGET_UNIT_TARGET_PASSENGER
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 96 TARGET_UNIT_PASSENGER_0
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 97 TARGET_UNIT_PASSENGER_1
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 98 TARGET_UNIT_PASSENGER_2
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 99 TARGET_UNIT_PASSENGER_3
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 100 TARGET_UNIT_PASSENGER_4
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 101 TARGET_UNIT_PASSENGER_5
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 102 TARGET_UNIT_PASSENGER_6
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 103 TARGET_UNIT_PASSENGER_7
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_ENEMY, TARGET_DIR_FRONT}, // 104 TARGET_UNIT_CONE_ENEMY_104
- {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 105 TARGET_UNIT_UNK_105
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 106 TARGET_DEST_CHANNEL_CASTER
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 107 TARGET_UNK_DEST_AREA_UNK_107
- {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 108 TARGET_GAMEOBJECT_CONE
- {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 109
- {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_SELECT_CHECK_DEFAULT, TARGET_DIR_NONE}, // 110 TARGET_DEST_UNK_110
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, //
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 1 TARGET_UNIT_CASTER
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 2 TARGET_UNIT_NEARBY_ENEMY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 3 TARGET_UNIT_NEARBY_PARTY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 4 TARGET_UNIT_NEARBY_ALLY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 5 TARGET_UNIT_PET
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 6 TARGET_UNIT_TARGET_ENEMY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ENTRY, TARGET_DIR_NONE}, // 7 TARGET_UNIT_SRC_AREA_ENTRY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ENTRY, TARGET_DIR_NONE}, // 8 TARGET_UNIT_DEST_AREA_ENTRY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 9 TARGET_DEST_HOME
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 10
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 11 TARGET_UNIT_SRC_AREA_UNK_11
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 12
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 13
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 14
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 15 TARGET_UNIT_SRC_AREA_ENEMY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 16 TARGET_UNIT_DEST_AREA_ENEMY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 17 TARGET_DEST_DB
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 18 TARGET_DEST_CASTER
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 19
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 20 TARGET_UNIT_CASTER_AREA_PARTY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 21 TARGET_UNIT_TARGET_ALLY
+ {TARGET_OBJECT_TYPE_SRC, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 22 TARGET_SRC_CASTER
+ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 23 TARGET_GAMEOBJECT_TARGET
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ENEMY, TARGET_DIR_FRONT}, // 24 TARGET_UNIT_CONE_ENEMY_24
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 25 TARGET_UNIT_TARGET_ANY
+ {TARGET_OBJECT_TYPE_GOBJ_ITEM, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 26 TARGET_GAMEOBJECT_ITEM_TARGET
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 27 TARGET_UNIT_MASTER
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 28 TARGET_DEST_DYNOBJ_ENEMY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 29 TARGET_DEST_DYNOBJ_ALLY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 30 TARGET_UNIT_SRC_AREA_ALLY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 31 TARGET_UNIT_DEST_AREA_ALLY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 32 TARGET_DEST_CASTER_SUMMON
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 33 TARGET_UNIT_SRC_AREA_PARTY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 34 TARGET_UNIT_DEST_AREA_PARTY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 35 TARGET_UNIT_TARGET_PARTY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 36 TARGET_DEST_CASTER_UNK_36
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_LAST, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_PARTY, TARGET_DIR_NONE}, // 37 TARGET_UNIT_LASTTARGET_AREA_PARTY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ENTRY, TARGET_DIR_NONE}, // 38 TARGET_UNIT_NEARBY_ENTRY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 39 TARGET_DEST_CASTER_FISHING
+ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ENTRY, TARGET_DIR_NONE}, // 40 TARGET_GAMEOBJECT_NEARBY_ENTRY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_RIGHT}, // 41 TARGET_DEST_CASTER_FRONT_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK_RIGHT}, // 42 TARGET_DEST_CASTER_BACK_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK_LEFT}, // 43 TARGET_DEST_CASTER_BACK_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 44 TARGET_DEST_CASTER_FRONT_LEFT
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 45 TARGET_UNIT_TARGET_CHAINHEAL_ALLY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_ENTRY, TARGET_DIR_NONE}, // 46 TARGET_DEST_NEARBY_ENTRY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 47 TARGET_DEST_CASTER_FRONT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK}, // 48 TARGET_DEST_CASTER_BACK
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RIGHT}, // 49 TARGET_DEST_CASTER_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_LEFT}, // 50 TARGET_DEST_CASTER_LEFT
+ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 51 TARGET_GAMEOBJECT_SRC_AREA
+ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 52 TARGET_GAMEOBJECT_DEST_AREA
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 53 TARGET_DEST_TARGET_ENEMY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ENEMY, TARGET_DIR_FRONT}, // 54 TARGET_UNIT_CONE_ENEMY_54
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 55 TARGET_DEST_CASTER_FRONT_LEAP
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_RAID, TARGET_DIR_NONE}, // 56 TARGET_UNIT_CASTER_AREA_RAID
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_RAID, TARGET_DIR_NONE}, // 57 TARGET_UNIT_TARGET_RAID
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_RAID, TARGET_DIR_NONE}, // 58 TARGET_UNIT_NEARBY_RAID
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ALLY, TARGET_DIR_FRONT}, // 59 TARGET_UNIT_CONE_ALLY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ENTRY, TARGET_DIR_FRONT}, // 60 TARGET_UNIT_CONE_ENTRY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_RAID_CLASS,TARGET_DIR_NONE}, // 61 TARGET_UNIT_TARGET_AREA_RAID_CLASS
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 62 TARGET_UNK_62
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 63 TARGET_DEST_TARGET_ANY
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 64 TARGET_DEST_TARGET_FRONT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK}, // 65 TARGET_DEST_TARGET_BACK
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RIGHT}, // 66 TARGET_DEST_TARGET_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_LEFT}, // 67 TARGET_DEST_TARGET_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_RIGHT}, // 68 TARGET_DEST_TARGET_FRONT_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK_RIGHT}, // 69 TARGET_DEST_TARGET_BACK_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK_LEFT}, // 70 TARGET_DEST_TARGET_BACK_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 71 TARGET_DEST_TARGET_FRONT_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 72 TARGET_DEST_CASTER_RANDOM
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 73 TARGET_DEST_CASTER_RADIUS
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 74 TARGET_DEST_TARGET_RANDOM
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 75 TARGET_DEST_TARGET_RADIUS
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 76 TARGET_DEST_CHANNEL_TARGET
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 77 TARGET_UNIT_CHANNEL_TARGET
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 78 TARGET_DEST_DEST_FRONT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK}, // 79 TARGET_DEST_DEST_BACK
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RIGHT}, // 80 TARGET_DEST_DEST_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_LEFT}, // 81 TARGET_DEST_DEST_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_RIGHT}, // 82 TARGET_DEST_DEST_FRONT_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK_RIGHT}, // 83 TARGET_DEST_DEST_BACK_RIGHT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_BACK_LEFT}, // 84 TARGET_DEST_DEST_BACK_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT_LEFT}, // 85 TARGET_DEST_DEST_FRONT_LEFT
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 86 TARGET_DEST_DEST_RANDOM
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 87 TARGET_DEST_DEST
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 88 TARGET_DEST_DYNOBJ_NONE
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 89 TARGET_DEST_TRAJ
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 90 TARGET_UNIT_TARGET_MINIPET
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 91 TARGET_DEST_DEST_RADIUS
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 92 TARGET_UNIT_SUMMONER
+ {TARGET_OBJECT_TYPE_CORPSE, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 93 TARGET_CORPSE_SRC_AREA_ENEMY
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 94 TARGET_UNIT_VEHICLE
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_PASSENGER, TARGET_DIR_NONE}, // 95 TARGET_UNIT_TARGET_PASSENGER
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 96 TARGET_UNIT_PASSENGER_0
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 97 TARGET_UNIT_PASSENGER_1
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 98 TARGET_UNIT_PASSENGER_2
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 99 TARGET_UNIT_PASSENGER_3
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 100 TARGET_UNIT_PASSENGER_4
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 101 TARGET_UNIT_PASSENGER_5
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 102 TARGET_UNIT_PASSENGER_6
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 103 TARGET_UNIT_PASSENGER_7
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ENEMY, TARGET_DIR_FRONT}, // 104 TARGET_UNIT_CONE_ENEMY_104
+ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 105 TARGET_UNIT_UNK_105
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CHANNEL, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 106 TARGET_DEST_CHANNEL_CASTER
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 107 TARGET_UNK_DEST_AREA_UNK_107
+ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 108 TARGET_GAMEOBJECT_CONE
+ {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 109
+ {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 110 TARGET_DEST_UNK_110
};
SpellEffectInfo::SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex)
@@ -463,7 +466,6 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const*
_spellInfo = spellInfo;
_effIndex = effIndex;
-
Effect = _effect ? _effect->Effect : 0;
ApplyAuraName = _effect ? _effect->EffectApplyAuraName : 0;
Amplitude = _effect ? _effect->EffectAmplitude : 0;
@@ -484,6 +486,7 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const*
ItemType = _effect ? _effect->EffectItemType : 0;
TriggerSpell = _effect ? _effect->EffectTriggerSpell : 0;
SpellClassMask = _effect ? _effect->EffectSpellClassMask : flag96(0);
+ ImplicitTargetConditions = NULL;
}
bool SpellEffectInfo::IsEffect() const
@@ -506,7 +509,7 @@ bool SpellEffectInfo::IsAura(AuraType aura) const
return IsAura() && ApplyAuraName == aura;
}
-bool SpellEffectInfo::IsArea() const
+bool SpellEffectInfo::IsTargetingArea() const
{
return TargetA.IsArea() || TargetB.IsArea();
}
@@ -1014,6 +1017,11 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
ChainEntry = NULL;
}
+SpellInfo::~SpellInfo()
+{
+ _UnloadImplicitTargetConditionLists();
+}
+
bool SpellInfo::HasEffect(SpellEffects effect) const
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -1137,10 +1145,19 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const
return false;
}
-bool SpellInfo::IsAOE() const
+bool SpellInfo::IsAffectingArea() const
+{
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if (Effects[i].IsEffect() && (Effects[i].IsTargetingArea() || Effects[i].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || Effects[i].IsAreaAuraEffect()))
+ return true;
+ return false;
+}
+
+// checks if spell targets are selected from area, doesn't include spell effects in check (like area wide auras for example)
+bool SpellInfo::IsTargetingArea() const
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (Effects[i].IsEffect() && Effects[i].IsArea())
+ if (Effects[i].IsEffect() && Effects[i].IsTargetingArea())
return true;
return false;
}
@@ -1630,38 +1647,99 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
return SPELL_CAST_OK;
}
-SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, bool implicit) const
+SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* target, bool implicit) const
{
if (AttributesEx & SPELL_ATTR1_CANT_TARGET_SELF && caster == target)
return SPELL_FAILED_BAD_TARGETS;
- if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && target->isInCombat())
- return SPELL_FAILED_TARGET_AFFECTING_COMBAT;
+ // check visibility - ignore stealth for implicit (area) targets
+ if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->canSeeOrDetect(target, implicit))
+ return SPELL_FAILED_BAD_TARGETS;
+
+ Unit const* unitTarget = target->ToUnit();
+
+ // creature/player specific target checks
+ if (unitTarget)
+ {
+ if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && unitTarget->isInCombat())
+ return SPELL_FAILED_TARGET_AFFECTING_COMBAT;
+
+ // only spells with SPELL_ATTR3_ONLY_TARGET_GHOSTS can target ghosts
+ if (((AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS) != 0) != unitTarget->HasAuraType(SPELL_AURA_GHOST))
+ {
+ if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS)
+ return SPELL_FAILED_TARGET_NOT_GHOST;
+ else
+ return SPELL_FAILED_BAD_TARGETS;
+ }
+
+ if (caster != unitTarget)
+ {
+ if (caster->GetTypeId() == TYPEID_PLAYER)
+ {
+ // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
+ if (AttributesEx2 & SPELL_ATTR2_CANT_TARGET_TAPPED)
+ if (Creature const* targetCreature = unitTarget->ToCreature())
+ if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
+ return SPELL_FAILED_CANT_CAST_ON_TAPPED;
+
+ if (AttributesCu & SPELL_ATTR0_CU_PICKPOCKET)
+ {
+ if (unitTarget->GetTypeId() == TYPEID_PLAYER)
+ return SPELL_FAILED_BAD_TARGETS;
+ else if ((unitTarget->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0)
+ return SPELL_FAILED_TARGET_NO_POCKETS;
+ }
- if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS && !target->ToPlayer())
+ // Not allow disarm unarmed player
+ if (Mechanic == MECHANIC_DISARM)
+ {
+ if (unitTarget->GetTypeId() == TYPEID_PLAYER)
+ {
+ Player const* player = unitTarget->ToPlayer();
+ if (!player->GetWeaponForAttack(BASE_ATTACK) || !player->IsUseEquipedWeapon(true))
+ return SPELL_FAILED_TARGET_NO_WEAPONS;
+ }
+ else if (!unitTarget->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID))
+ return SPELL_FAILED_TARGET_NO_WEAPONS;
+ }
+ }
+ }
+ }
+ // corpse specific target checks
+ else if (Corpse const* corpseTarget = target->ToCorpse())
+ {
+ // cannot target bare bones
+ if (corpseTarget->GetType() == CORPSE_BONES)
+ return SPELL_FAILED_BAD_TARGETS;
+ // we have to use owner for some checks (aura preventing resurrection for example)
+ if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
+ unitTarget = owner;
+ // we're not interested in corpses without owner
+ else
+ return SPELL_FAILED_BAD_TARGETS;
+ }
+ // other types of objects - always valid
+ else return SPELL_CAST_OK;
+
+ // corpseOwner and unit specific target checks
+ if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_PLAYERS && !unitTarget->ToPlayer())
return SPELL_FAILED_TARGET_NOT_PLAYER;
- if (!IsAllowingDeadTarget() && !target->isAlive())
+ if (!IsAllowingDeadTarget() && !unitTarget->isAlive())
return SPELL_FAILED_TARGETS_DEAD;
- if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS && !(!target->isAlive() && target->HasAuraType(SPELL_AURA_GHOST)))
- return SPELL_FAILED_TARGET_NOT_GHOST;
-
// check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
- if (implicit && AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED && !target->CanFreeMove())
+ if (implicit && AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED && !unitTarget->CanFreeMove())
return SPELL_FAILED_BAD_TARGETS;
- // check visibility - ignore stealth for implicit (area) targets
- if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->canSeeOrDetect(target, implicit))
- return SPELL_FAILED_BAD_TARGETS;
-
// checked in Unit::IsValidAttack/AssistTarget, shouldn't be checked for ENTRY targets
//if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
// return SPELL_FAILED_BAD_TARGETS;
//if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS)
- if (!CheckTargetCreatureType(target))
+ if (!CheckTargetCreatureType(unitTarget))
{
if (target->GetTypeId() == TYPEID_PLAYER)
return SPELL_FAILED_TARGET_IS_PLAYER;
@@ -1670,65 +1748,32 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, b
}
// check GM mode and GM invisibility - only for player casts (npc casts are controlled by AI) and negative spells
- if (target != caster && (caster->IsControlledByPlayer() || !IsPositive()) && target->GetTypeId() == TYPEID_PLAYER)
+ if (unitTarget != caster && (caster->IsControlledByPlayer() || !IsPositive()) && unitTarget->GetTypeId() == TYPEID_PLAYER)
{
- if (!target->ToPlayer()->IsVisible())
+ if (!unitTarget->ToPlayer()->IsVisible())
return SPELL_FAILED_BM_OR_INVISGOD;
- if (target->ToPlayer()->isGameMaster())
+ if (unitTarget->ToPlayer()->isGameMaster())
return SPELL_FAILED_BM_OR_INVISGOD;
}
// not allow casting on flying player
- if (target->HasUnitState(UNIT_STATE_IN_FLIGHT))
+ if (unitTarget->HasUnitState(UNIT_STATE_IN_FLIGHT))
return SPELL_FAILED_BAD_TARGETS;
- if (TargetAuraState && !target->HasAuraState(AuraStateType(TargetAuraState), this, caster))
+ if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
return SPELL_FAILED_TARGET_AURASTATE;
- if (TargetAuraStateNot && target->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
+ if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
return SPELL_FAILED_TARGET_AURASTATE;
- if (TargetAuraSpell && !target->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
+ if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
return SPELL_FAILED_TARGET_AURASTATE;
- if (ExcludeTargetAuraSpell && target->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
+ if (ExcludeTargetAuraSpell && unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(ExcludeTargetAuraSpell, caster)))
return SPELL_FAILED_TARGET_AURASTATE;
- if (caster != target)
- {
- if (caster->GetTypeId() == TYPEID_PLAYER)
- {
- // Do not allow these spells to target creatures not tapped by us (Banish, Polymorph, many quest spells)
- if (AttributesEx2 & SPELL_ATTR2_CANT_TARGET_TAPPED)
- if (Creature const* targetCreature = target->ToCreature())
- if (targetCreature->hasLootRecipient() && !targetCreature->isTappedBy(caster->ToPlayer()))
- return SPELL_FAILED_CANT_CAST_ON_TAPPED;
-
- if (AttributesCu & SPELL_ATTR0_CU_PICKPOCKET)
- {
- if (target->GetTypeId() == TYPEID_PLAYER)
- return SPELL_FAILED_BAD_TARGETS;
- else if ((target->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0)
- return SPELL_FAILED_TARGET_NO_POCKETS;
- }
-
- // Not allow disarm unarmed player
- if (Mechanic == MECHANIC_DISARM)
- {
- if (target->GetTypeId() == TYPEID_PLAYER)
- {
- Player const* player = target->ToPlayer();
- if (!player->GetWeaponForAttack(BASE_ATTACK) || !player->IsUseEquipedWeapon(true))
- return SPELL_FAILED_TARGET_NO_WEAPONS;
- }
- else if (!target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID))
- return SPELL_FAILED_TARGET_NO_WEAPONS;
- }
- }
- }
-
- if (target->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION))
+ if (unitTarget->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION))
if (HasEffect(SPELL_EFFECT_SELF_RESURRECT) || HasEffect(SPELL_EFFECT_RESURRECT) || HasEffect(SPELL_EFFECT_RESURRECT_NEW))
return SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED;
@@ -2102,13 +2147,19 @@ float SpellInfo::GetMinRange(bool positive) const
return RangeEntry->minRangeHostile;
}
-float SpellInfo::GetMaxRange(bool positive) const
+float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
{
if (!RangeEntry)
return 0.0f;
+ float range;
if (positive)
- return RangeEntry->maxRangeFriend;
- return RangeEntry->maxRangeHostile;
+ range = RangeEntry->maxRangeFriend;
+ else
+ range = RangeEntry->maxRangeHostile;
+ if (caster)
+ if (Player* modOwner = caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(Id, SPELLMOD_RANGE, range, spell);
+ return range;
}
int32 SpellInfo::GetDuration() const
@@ -2698,3 +2749,20 @@ SpellEffectEntry const* SpellEntry::GetSpellEffect(uint32 eff) const
{
return GetSpellEffectEntry(Id, eff);
}
+
+void SpellInfo::_UnloadImplicitTargetConditionLists()
+{
+ // find the same instances of ConditionList and delete them.
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ {
+ ConditionList* cur = Effects[i].ImplicitTargetConditions;
+ if (!cur)
+ continue;
+ for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
+ {
+ if (Effects[j].ImplicitTargetConditions == cur)
+ Effects[j].ImplicitTargetConditions = NULL;
+ }
+ delete cur;
+ }
+}
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index 44fb49bb17f..baf03589794 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -36,6 +36,7 @@ struct SpellRangeEntry;
struct SpellRadiusEntry;
struct SpellEntry;
struct SpellCastTimesEntry;
+struct Condition;
enum SpellCastTargetFlags
{
@@ -105,15 +106,16 @@ enum SpellTargetObjectTypes
TARGET_OBJECT_TYPE_CORPSE_ALLY,
};
-enum SpellTargetSelectionCheckTypes
+enum SpellTargetCheckTypes
{
- TARGET_SELECT_CHECK_DEFAULT,
- TARGET_SELECT_CHECK_ENTRY,
- TARGET_SELECT_CHECK_ENEMY,
- TARGET_SELECT_CHECK_ALLY,
- TARGET_SELECT_CHECK_PARTY,
- TARGET_SELECT_CHECK_RAID,
- TARGET_SELECT_CHECK_PASSENGER,
+ TARGET_CHECK_DEFAULT,
+ TARGET_CHECK_ENTRY,
+ TARGET_CHECK_ENEMY,
+ TARGET_CHECK_ALLY,
+ TARGET_CHECK_PARTY,
+ TARGET_CHECK_RAID,
+ TARGET_CHECK_RAID_CLASS,
+ TARGET_CHECK_PASSENGER,
};
enum SpellTargetDirectionTypes
@@ -220,7 +222,7 @@ public:
SpellTargetSelectionCategories GetSelectionCategory() const;
SpellTargetReferenceTypes GetReferenceType() const;
SpellTargetObjectTypes GetObjectType() const;
- SpellTargetSelectionCheckTypes GetSelectionCheckType() const;
+ SpellTargetCheckTypes GetCheckType() const;
SpellTargetDirectionTypes GetDirectionType() const;
float CalcDirectionAngle() const;
@@ -240,7 +242,7 @@ private:
SpellTargetObjectTypes ObjectType; // type of object returned by target type
SpellTargetReferenceTypes ReferenceType; // defines which object is used as a reference when selecting target
SpellTargetSelectionCategories SelectionCategory;
- SpellTargetSelectionCheckTypes SelectionCheckType; // defines selection criteria
+ SpellTargetCheckTypes SelectionCheckType; // defines selection criteria
SpellTargetDirectionTypes DirectionType; // direction for cone and dest targets
};
static StaticData _data[TOTAL_SPELL_TARGETS];
@@ -271,6 +273,7 @@ public:
uint32 ItemType;
uint32 TriggerSpell;
flag96 SpellClassMask;
+ std::list<Condition*>* ImplicitTargetConditions;
SpellEffectInfo() {}
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
@@ -279,7 +282,7 @@ public:
bool IsEffect(SpellEffects effectName) const;
bool IsAura() const;
bool IsAura(AuraType aura) const;
- bool IsArea() const;
+ bool IsTargetingArea() const;
bool IsAreaAuraEffect() const;
bool IsFarUnitTargetEffect() const;
bool IsFarDestTargetEffect() const;
@@ -431,6 +434,7 @@ public:
SpellTotemsEntry const* GetSpellTotems() const;
SpellInfo(SpellEntry const* spellEntry);
+ ~SpellInfo();
bool HasEffect(SpellEffects effect) const;
bool HasAura(AuraType aura) const;
@@ -446,7 +450,8 @@ public:
bool IsAbilityLearnedWithProfession() const;
bool IsAbilityOfSkillType(uint32 skillType) const;
- bool IsAOE() const;
+ bool IsAffectingArea() const;
+ bool IsTargetingArea() const;
bool NeedsExplicitUnitTarget() const;
bool NeedsToBeTriggeredByCaster() const;
@@ -480,7 +485,7 @@ public:
SpellCastResult CheckShapeshift(uint32 form) const;
SpellCastResult CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const* player = NULL) const;
- SpellCastResult CheckTarget(Unit const* caster, Unit const* target, bool implicit = true) const;
+ SpellCastResult CheckTarget(Unit const* caster, WorldObject const* target, bool implicit = true) const;
SpellCastResult CheckExplicitTarget(Unit const* caster, WorldObject const* target, Item const* itemTarget = NULL) const;
bool CheckTargetCreatureType(Unit const* target) const;
@@ -498,7 +503,7 @@ public:
SpellSpecificType GetSpellSpecific() const;
float GetMinRange(bool positive = false) const;
- float GetMaxRange(bool positive = false) const;
+ float GetMaxRange(bool positive = false, Unit* caster = NULL, Spell* spell = NULL) const;
int32 GetDuration() const;
int32 GetMaxDuration() const;
@@ -524,6 +529,9 @@ public:
bool _IsPositiveEffect(uint8 effIndex, bool deep) const;
bool _IsPositiveSpell() const;
static bool _IsPositiveTarget(uint32 targetA, uint32 targetB);
+
+ // unloading helpers
+ void _UnloadImplicitTargetConditionLists();
};
#endif // _SPELLINFO_H
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index a5bea319fee..67bd7939d70 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -104,9 +104,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
// Hamstring - limit duration to 10s in PvP
if (spellproto->SpellFamilyFlags[0] & 0x2)
return DIMINISHING_LIMITONLY;
- // Improved Hamstring
- else if (spellproto->AttributesEx3 & 0x80000 && spellproto->SpellIconID == 23)
- return DIMINISHING_ROOT;
// Charge Stun (own diminishing)
else if (spellproto->SpellFamilyFlags[0] & 0x01000000)
return DIMINISHING_CHARGE;
@@ -2647,11 +2644,20 @@ void SpellMgr::UnloadSpellInfoStore()
for (uint32 i = 0; i < mSpellInfoMap.size(); ++i)
{
if (mSpellInfoMap[i])
- delete mSpellInfoMap[i];
+ delete mSpellInfoMap[i];
}
mSpellInfoMap.clear();
}
+void SpellMgr::UnloadSpellInfoImplicitTargetConditionLists()
+{
+ for (uint32 i = 0; i < mSpellInfoMap.size(); ++i)
+ {
+ if (mSpellInfoMap[i])
+ mSpellInfoMap[i]->_UnloadImplicitTargetConditionLists();
+ }
+}
+
void SpellMgr::LoadSpellCustomAttr()
{
uint32 oldMSTime = getMSTime();
@@ -2893,6 +2899,7 @@ void SpellMgr::LoadSpellCustomAttr()
case 64588: // Thrust (Argent Tournament)
case 66479: // Thrust (Argent Tournament)
case 68505: // Thrust (Argent Tournament)
+ case 62709: // Counterattack! (Argent Tournament)
case 62626: // Break-Shield (Argent Tournament, Player)
case 64590: // Break-Shield (Argent Tournament, Player)
case 64342: // Break-Shield (Argent Tournament, NPC)
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index 14137b6a91b..9fffd474651 100755
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -360,17 +360,6 @@ struct SpellThreatEntry
typedef std::map<uint32, SpellThreatEntry> SpellThreatMap;
-// Spell script target related declarations (accessed using SpellMgr functions)
-enum SpellScriptTargetType
-{
- SPELL_TARGET_TYPE_GAMEOBJECT = 0,
- SPELL_TARGET_TYPE_CREATURE = 1,
- SPELL_TARGET_TYPE_DEAD = 2,
- SPELL_TARGET_TYPE_CONTROLLED = 3,
-};
-
-#define MAX_SPELL_TARGET_TYPE 4
-
// coordinates for spells (accessed using SpellMgr functions)
struct SpellTargetPosition
{
@@ -726,6 +715,7 @@ class SpellMgr
void LoadSpellAreas();
void LoadSpellInfoStore();
void UnloadSpellInfoStore();
+ void UnloadSpellInfoImplicitTargetConditionLists();
void LoadSpellCustomAttr();
void LoadDbcDataCorrections();
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 8e20fd21fcf..03fea614c0d 100755
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -468,6 +468,11 @@ void SpellScript::PreventHitAura()
m_spell->m_spellAura->Remove();
}
+void SpellScript::GetSummonPosition(uint32 i, Position &pos, float radius = 0.0f, uint32 count = 0)
+{
+ m_spell->GetSummonPosition(i, pos, radius, count);
+}
+
void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
@@ -542,6 +547,14 @@ bool AuraScript::_Validate(SpellInfo const* entry)
if (!entry->HasAreaAuraEffect())
sLog->outError("TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
+ if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
+ sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+
+ for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
+ if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
+ sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+
for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
@@ -607,6 +620,16 @@ bool AuraScript::CheckAreaTargetHandler::Call(AuraScript* auraScript, Unit* _tar
return (auraScript->*pHandlerScript)(_target);
}
+AuraScript::AuraDispelHandler::AuraDispelHandler(AuraDispelFnType _pHandlerScript)
+{
+ pHandlerScript = _pHandlerScript;
+}
+
+void AuraScript::AuraDispelHandler::Call(AuraScript* auraScript, DispelInfo* _dispelInfo)
+{
+ (auraScript->*pHandlerScript)(_dispelInfo);
+}
+
AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName)
: _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex)
{
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index a1d8e6563b0..1bf8d25adef 100755
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -21,6 +21,7 @@
#include "Util.h"
#include "SharedDefines.h"
#include "SpellAuraDefines.h"
+#include "Spell.h"
#include <stack>
class Unit;
@@ -333,7 +334,8 @@ class SpellScript : public _SpellScript
int32 GetHitHeal();
void SetHitHeal(int32 heal);
void PreventHitHeal() { SetHitHeal(0); }
-
+ Spell* GetSpell() { return m_spell; }
+ void GetSummonPosition(uint32 i, Position &pos, float radius, uint32 count);
// returns current spell hit target aura
Aura* GetHitAura();
// prevents applying aura on current spell hit target
@@ -385,6 +387,8 @@ enum AuraScriptHookType
AURA_SCRIPT_HOOK_EFFECT_MANASHIELD,
AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD,
AURA_SCRIPT_HOOK_CHECK_AREA_TARGET,
+ AURA_SCRIPT_HOOK_DISPEL,
+ AURA_SCRIPT_HOOK_AFTER_DISPEL,
/*AURA_SCRIPT_HOOK_APPLY,
AURA_SCRIPT_HOOK_REMOVE, */
};
@@ -400,6 +404,7 @@ class AuraScript : public _SpellScript
#define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \
+ typedef void(CLASSNAME::*AuraDispelFnType)(DispelInfo* dispelInfo); \
typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const*, AuraEffectHandleModes); \
typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const*); \
typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect*); \
@@ -418,6 +423,14 @@ class AuraScript : public _SpellScript
private:
AuraCheckAreaTargetFnType pHandlerScript;
};
+ class AuraDispelHandler
+ {
+ public:
+ AuraDispelHandler(AuraDispelFnType pHandlerScript);
+ void Call(AuraScript* auraScript, DispelInfo* dispelInfo);
+ private:
+ AuraDispelFnType pHandlerScript;
+ };
class EffectBase : public _SpellScript::EffectAuraNameCheck, public _SpellScript::EffectHook
{
public:
@@ -493,6 +506,7 @@ class AuraScript : public _SpellScript
#define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) {} }; \
+ class AuraDispelFunction : public AuraScript::AuraDispelHandler { public: AuraDispelFunction(AuraDispelFnType _pHandlerScript) : AuraScript::AuraDispelHandler((AuraScript::AuraDispelFnType)_pHandlerScript) {} }; \
class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
@@ -540,6 +554,17 @@ class AuraScript : public _SpellScript
// where function is: bool function (Unit* target);
HookList<CheckAreaTargetHandler> DoCheckAreaTarget;
#define AuraCheckAreaTargetFn(F) CheckAreaTargetFunction(&F)
+
+ // executed when aura is dispelled by a unit
+ // example: OnDispel += AuraDispelFn(class::function);
+ // where function is: void function (DispelInfo* dispelInfo);
+ HookList<AuraDispelHandler> OnDispel;
+ // executed after aura is dispelled by a unit
+ // example: AfterDispel += AuraDispelFn(class::function);
+ // where function is: void function (DispelInfo* dispelInfo);
+ HookList<AuraDispelHandler> AfterDispel;
+ #define AuraDispelFn(F) AuraDispelFunction(&F)
+
// executed when aura effect is applied with specified mode to target
// should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe
// example: OnEffectApply += AuraEffectApplyFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index b076447dd90..4d9c5a93875 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -404,15 +404,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// make sure the same guid doesn't already exist and is safe to use
bool incHighest = true;
- if (guid != 0 && guid < sObjectMgr->m_hiCharGuid)
+ if (guid != 0 && guid < sObjectMgr->_hiCharGuid)
{
result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE guid = '%d'", guid);
if (result)
- guid = sObjectMgr->m_hiCharGuid; // use first free if exists
+ guid = sObjectMgr->_hiCharGuid; // use first free if exists
else incHighest = false;
}
else
- guid = sObjectMgr->m_hiCharGuid;
+ guid = sObjectMgr->_hiCharGuid;
// normalize the name if specified and check if it exists
if (!normalizePlayerName(name))
@@ -564,15 +564,15 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
if (!changenth(line, 1, newguid)) // character_inventory.guid update
ROLLBACK(DUMP_FILE_BROKEN);
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid, true))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid, true))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.bag update
- if (!changeGuid(line, 4, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 4, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
break;
}
case DTT_MAIL: // mail
{
- if (!changeGuid(line, 1, mails, sObjectMgr->m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
if (!changenth(line, 6, newguid)) // mail.receiver update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -580,9 +580,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
}
case DTT_MAIL_ITEM: // mail_items
{
- if (!changeGuid(line, 1, mails, sObjectMgr->m_mailid))
+ if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
if (!changenth(line, 3, newguid)) // mail_items.receiver
ROLLBACK(DUMP_FILE_BROKEN);
@@ -591,7 +591,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
case DTT_ITEM:
{
// item, owner, data field:item, owner guid
- if (!changeGuid(line, 1, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 1, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // item_instance.guid update
if (!changenth(line, 3, newguid)) // item_instance.owner_guid update
ROLLBACK(DUMP_FILE_BROKEN);
@@ -601,7 +601,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
{
if (!changenth(line, 1, newguid)) // character_gifts.guid update
ROLLBACK(DUMP_FILE_BROKEN);
- if (!changeGuid(line, 2, items, sObjectMgr->m_hiItemGuid))
+ if (!changeGuid(line, 2, items, sObjectMgr->_hiItemGuid))
ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update
break;
}
@@ -662,11 +662,11 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// 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();
+ sObjectMgr->_hiItemGuid += items.size();
+ sObjectMgr->_mailId += mails.size();
if (incHighest)
- ++sObjectMgr->m_hiCharGuid;
+ ++sObjectMgr->_hiCharGuid;
fclose(fin);
diff --git a/src/server/game/Warden/Modules/WardenModuleMac.h b/src/server/game/Warden/Modules/WardenModuleMac.h
new file mode 100644
index 00000000000..46011c5bcd9
--- /dev/null
+++ b/src/server/game/Warden/Modules/WardenModuleMac.h
@@ -0,0 +1,614 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _WARDEN_MODULE_MAC_H
+#define _WARDEN_MODULE_MAC_H
+
+uint8 Module_0DBBF209A27B1E279A9FEC5C168A15F7_Data[9318] =
+{
+ 0x07, 0x0C, 0x44, 0xCD, 0xC9, 0xFB, 0x99, 0xBC, 0x7C, 0x77, 0xDC, 0xE8, 0x8D, 0x07, 0xBE, 0x55,
+ 0x37, 0x5C, 0x84, 0x10, 0x23, 0xE1, 0x36, 0x5B, 0xF1, 0xBC, 0x60, 0xF3, 0x68, 0xBA, 0x60, 0x69,
+ 0xDF, 0x48, 0x54, 0xFF, 0x49, 0x1F, 0xA6, 0x28, 0x08, 0x5A, 0x77, 0xFE, 0x4C, 0x3A, 0x9A, 0x28,
+ 0xA5, 0x9E, 0x01, 0x93, 0x05, 0xE4, 0xCD, 0x26, 0x41, 0xD7, 0xD6, 0x73, 0x81, 0xFD, 0xF5, 0xDB,
+ 0xA5, 0xF7, 0xF9, 0x1D, 0xFE, 0xF4, 0x06, 0x7C, 0xD0, 0xF8, 0x5A, 0xE8, 0x11, 0xFF, 0xE5, 0xF9,
+ 0x54, 0x49, 0xF7, 0xF0, 0xF8, 0x66, 0x22, 0x97, 0xA4, 0xB2, 0x86, 0xFE, 0xA6, 0x3A, 0x7F, 0x3B,
+ 0xF6, 0x47, 0xB4, 0x14, 0xEB, 0x9E, 0xC9, 0xEA, 0x0B, 0x41, 0xB4, 0x5B, 0xC2, 0xFB, 0x63, 0x1C,
+ 0x46, 0xC4, 0xAB, 0x3F, 0x30, 0x70, 0x7F, 0x35, 0xA3, 0xD2, 0x1A, 0xDE, 0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, 0xEA, 0x06, 0xD1, 0xAD, 0x2C, 0x07, 0x58, 0x90, 0x0E, 0x80, 0x6B, 0x60,
+ 0x43, 0x82, 0xAA, 0x0C, 0xEE, 0x1B
+};
+
+uint8 Module_0DBBF209A27B1E279A9FEC5C168A15F7_Key[16] =
+{
+ 0x5B, 0x27, 0x27, 0x01, 0x24, 0x56, 0xB4, 0xD4, 0x2D, 0xD0, 0x96, 0x77, 0x49, 0x51, 0xDC, 0x0A
+};
+
+#endif
diff --git a/src/server/game/Warden/Modules/WardenModuleWin.h b/src/server/game/Warden/Modules/WardenModuleWin.h
new file mode 100644
index 00000000000..ca61a270a81
--- /dev/null
+++ b/src/server/game/Warden/Modules/WardenModuleWin.h
@@ -0,0 +1,1204 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _WARDEN_MODULE_WIN_H
+#define _WARDEN_MODULE_WIN_H
+
+uint8 Module_79C0768D657977D697E10BAD956CCED1_Data[18756] =
+{
+ 0x21, 0x6C, 0xBB, 0x6A, 0xB9, 0xAF, 0xE8, 0xA1, 0x9A, 0x79, 0x18, 0xF1, 0x27, 0x9A, 0x14, 0xF5,
+ 0x42, 0x5D, 0x00, 0xBA, 0x74, 0x57, 0x0E, 0xAF, 0xD2, 0xAE, 0x8E, 0x51, 0xA5, 0xC1, 0x17, 0x4E,
+ 0xEC, 0x7F, 0xAC, 0xBC, 0xDD, 0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, 0x3B, 0x77, 0xBD, 0x36, 0x3C, 0x3E, 0xFE, 0x0F, 0xC1, 0x73, 0xF9
+};
+
+#endif
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
new file mode 100644
index 00000000000..3d625df63d0
--- /dev/null
+++ b/src/server/game/Warden/Warden.cpp
@@ -0,0 +1,234 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Common.h"
+#include "WorldPacket.h"
+#include "WorldSession.h"
+#include "Log.h"
+#include "Opcodes.h"
+#include "ByteBuffer.h"
+#include <openssl/md5.h>
+#include <openssl/sha.h>
+#include "World.h"
+#include "Player.h"
+#include "Util.h"
+#include "Warden.h"
+#include "AccountMgr.h"
+
+Warden::Warden() : _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _initialized(false)
+{
+}
+
+Warden::~Warden()
+{
+ delete[] _module->CompressedData;
+ delete _module;
+ _module = NULL;
+ _initialized = false;
+}
+
+void Warden::SendModuleToClient()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Send module to client");
+
+ // Create packet structure
+ WardenModuleTransfer packet;
+
+ uint32 sizeLeft = _module->CompressedSize;
+ uint32 pos = 0;
+ uint16 burstSize;
+ while (sizeLeft > 0)
+ {
+ burstSize = sizeLeft < 500 ? sizeLeft : 500;
+ packet.Command = WARDEN_SMSG_MODULE_CACHE;
+ packet.DataSize = burstSize;
+ memcpy(packet.Data, &_module->CompressedData[pos], burstSize);
+ sizeLeft -= burstSize;
+ pos += burstSize;
+
+ EncryptData((uint8*)&packet, burstSize + 3);
+ WorldPacket pkt1(SMSG_WARDEN_DATA, burstSize + 3);
+ pkt1.append((uint8*)&packet, burstSize + 3);
+ _session->SendPacket(&pkt1);
+ }
+}
+
+void Warden::RequestModule()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request module");
+
+ // Create packet structure
+ WardenModuleUse request;
+ request.Command = WARDEN_SMSG_MODULE_USE;
+
+ memcpy(request.ModuleId, _module->Id, 16);
+ memcpy(request.ModuleKey, _module->Key, 16);
+ request.Size = _module->CompressedSize;
+
+ // Encrypt with warden RC4 key.
+ EncryptData((uint8*)&request, sizeof(WardenModuleUse));
+
+ WorldPacket pkt(SMSG_WARDEN_DATA, sizeof(WardenModuleUse));
+ pkt.append((uint8*)&request, sizeof(WardenModuleUse));
+ _session->SendPacket(&pkt);
+}
+
+void Warden::Update()
+{
+ if (_initialized)
+ {
+ uint32 currentTimestamp = getMSTime();
+ uint32 diff = currentTimestamp - _previousTimestamp;
+ _previousTimestamp = currentTimestamp;
+
+ if (_dataSent)
+ {
+ uint32 maxClientResponseDelay = sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_RESPONSE_DELAY);
+
+ if (maxClientResponseDelay > 0)
+ {
+ // Kick player if client response delays more than set in config
+ if (_clientResponseTimer > maxClientResponseDelay * IN_MILLISECONDS)
+ {
+ sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u, latency: %u, IP: %s) exceeded Warden module response delay for more than %s - disconnecting client",
+ _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), _session->GetLatency(), _session->GetRemoteAddress().c_str(),
+ secsToTimeString(maxClientResponseDelay, true).c_str());
+ _session->KickPlayer();
+ }
+ else
+ _clientResponseTimer += diff;
+ }
+ }
+ else
+ {
+ if (diff >= _checkTimer)
+ {
+ RequestData();
+ }
+ else
+ _checkTimer -= diff;
+ }
+ }
+}
+
+void Warden::DecryptData(uint8* buffer, uint32 length)
+{
+ _inputCrypto.UpdateData(length, buffer);
+}
+
+void Warden::EncryptData(uint8* buffer, uint32 length)
+{
+ _outputCrypto.UpdateData(length, buffer);
+}
+
+bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 length)
+{
+ uint32 newChecksum = BuildChecksum(data, length);
+
+ if (checksum != newChecksum)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM IS NOT VALID");
+ return false;
+ }
+ else
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM IS VALID");
+ return true;
+ }
+}
+
+uint32 Warden::BuildChecksum(const uint8* data, uint32 length)
+{
+ uint8 hash[20];
+ SHA1(data, length, hash);
+ uint32 checkSum = 0;
+ for (uint8 i = 0; i < 5; ++i)
+ checkSum = checkSum ^ *(uint32*)(&hash[0] + i * 4);
+
+ return checkSum;
+}
+
+std::string Warden::Penalty(WardenCheck* check /*= NULL*/)
+{
+ WardenActions action;
+
+ if (check)
+ action = check->Action;
+ else
+ action = WardenActions(sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_FAIL_ACTION));
+
+ switch (action)
+ {
+ case WARDEN_ACTION_LOG:
+ return "None";
+ break;
+ case WARDEN_ACTION_KICK:
+ _session->KickPlayer();
+ return "Kick";
+ break;
+ case WARDEN_ACTION_BAN:
+ {
+ std::stringstream duration;
+ duration << sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_BAN_DURATION) << "s";
+ std::string accountName;
+ AccountMgr::GetName(_session->GetAccountId(), accountName);
+ sWorld->BanAccount(BAN_ACCOUNT, accountName, duration.str(), "Warden Anticheat violation","Server");
+
+ return "Ban";
+ break;
+ }
+ default:
+ return "Undefined";
+ break;
+ }
+}
+
+void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
+{
+ _warden->DecryptData(const_cast<uint8*>(recvData.contents()), recvData.size());
+ uint8 opcode;
+ recvData >> opcode;
+ sLog->outDebug(LOG_FILTER_WARDEN, "Got packet, opcode %02X, size %u", opcode, recvData.size());
+ recvData.hexlike();
+
+ switch(opcode)
+ {
+ case WARDEN_CMSG_MODULE_MISSING:
+ _warden->SendModuleToClient();
+ break;
+ case WARDEN_CMSG_MODULE_OK:
+ _warden->RequestHash();
+ break;
+ case WARDEN_CMSG_CHEAT_CHECKS_RESULT:
+ _warden->HandleData(recvData);
+ break;
+ case WARDEN_CMSG_MEM_CHECKS_RESULT:
+ sLog->outDebug(LOG_FILTER_WARDEN, "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
+ break;
+ case WARDEN_CMSG_HASH_RESULT:
+ _warden->HandleHashResult(recvData);
+ _warden->InitializeModule();
+ break;
+ case WARDEN_CMSG_MODULE_FAILED:
+ sLog->outDebug(LOG_FILTER_WARDEN, "NYI WARDEN_CMSG_MODULE_FAILED received!");
+ break;
+ default:
+ sLog->outDebug(LOG_FILTER_WARDEN, "Got unknown warden opcode %02X of size %u.", opcode, recvData.size() - 1);
+ break;
+ }
+}
diff --git a/src/server/game/Warden/Warden.h b/src/server/game/Warden/Warden.h
new file mode 100644
index 00000000000..e06ea7dca25
--- /dev/null
+++ b/src/server/game/Warden/Warden.h
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _WARDEN_BASE_H
+#define _WARDEN_BASE_H
+
+#include <map>
+#include "Cryptography/ARC4.h"
+#include "Cryptography/BigNumber.h"
+#include "ByteBuffer.h"
+#include "WardenCheckMgr.h"
+
+enum WardenOpcodes
+{
+ // Client->Server
+ WARDEN_CMSG_MODULE_MISSING = 0,
+ WARDEN_CMSG_MODULE_OK = 1,
+ WARDEN_CMSG_CHEAT_CHECKS_RESULT = 2,
+ WARDEN_CMSG_MEM_CHECKS_RESULT = 3, // only sent if MEM_CHECK bytes doesn't match
+ WARDEN_CMSG_HASH_RESULT = 4,
+ WARDEN_CMSG_MODULE_FAILED = 5, // this is sent when client failed to load uploaded module due to cache fail
+
+ // Server->Client
+ WARDEN_SMSG_MODULE_USE = 0,
+ WARDEN_SMSG_MODULE_CACHE = 1,
+ WARDEN_SMSG_CHEAT_CHECKS_REQUEST = 2,
+ WARDEN_SMSG_MODULE_INITIALIZE = 3,
+ WARDEN_SMSG_MEM_CHECKS_REQUEST = 4, // byte len; while(!EOF) { byte unk(1); byte index(++); string module(can be 0); int offset; byte len; byte[] bytes_to_compare[len]; }
+ WARDEN_SMSG_HASH_REQUEST = 5
+};
+
+enum WardenCheckType
+{
+ MEM_CHECK = 0xF3, // 243: byte moduleNameIndex + uint Offset + byte Len (check to ensure memory isn't modified)
+ PAGE_CHECK_A = 0xB2, // 178: uint Seed + byte[20] SHA1 + uint Addr + byte Len (scans all pages for specified hash)
+ PAGE_CHECK_B = 0xBF, // 191: uint Seed + byte[20] SHA1 + uint Addr + byte Len (scans only pages starts with MZ+PE headers for specified hash)
+ MPQ_CHECK = 0x98, // 152: byte fileNameIndex (check to ensure MPQ file isn't modified)
+ LUA_STR_CHECK = 0x8B, // 139: byte luaNameIndex (check to ensure LUA string isn't used)
+ DRIVER_CHECK = 0x71, // 113: uint Seed + byte[20] SHA1 + byte driverNameIndex (check to ensure driver isn't loaded)
+ TIMING_CHECK = 0x57, // 87: empty (check to ensure GetTickCount() isn't detoured)
+ PROC_CHECK = 0x7E, // 126: uint Seed + byte[20] SHA1 + byte moluleNameIndex + byte procNameIndex + uint Offset + byte Len (check to ensure proc isn't detoured)
+ MODULE_CHECK = 0xD9, // 217: uint Seed + byte[20] SHA1 (check to ensure module isn't injected)
+};
+
+#if defined(__GNUC__)
+#pragma pack(1)
+#else
+#pragma pack(push,1)
+#endif
+
+struct WardenModuleUse
+{
+ uint8 Command;
+ uint8 ModuleId[16];
+ uint8 ModuleKey[16];
+ uint32 Size;
+};
+
+struct WardenModuleTransfer
+{
+ uint8 Command;
+ uint16 DataSize;
+ uint8 Data[500];
+};
+
+struct WardenHashRequest
+{
+ uint8 Command;
+ uint8 Seed[16];
+};
+
+#if defined(__GNUC__)
+#pragma pack()
+#else
+#pragma pack(pop)
+#endif
+
+struct ClientWardenModule
+{
+ uint8 Id[16];
+ uint8 Key[16];
+ uint32 CompressedSize;
+ uint8* CompressedData;
+};
+
+class WorldSession;
+
+class Warden
+{
+ friend class WardenWin;
+ friend class WardenMac;
+
+ public:
+ Warden();
+ ~Warden();
+
+ virtual void Init(WorldSession* session, BigNumber* k) = 0;
+ virtual ClientWardenModule* GetModuleForClient() = 0;
+ virtual void InitializeModule() = 0;
+ virtual void RequestHash() = 0;
+ virtual void HandleHashResult(ByteBuffer &buff) = 0;
+ virtual void RequestData() = 0;
+ virtual void HandleData(ByteBuffer &buff) = 0;
+
+ void SendModuleToClient();
+ void RequestModule();
+ void Update();
+ void DecryptData(uint8* buffer, uint32 length);
+ void EncryptData(uint8* buffer, uint32 length);
+
+ static bool IsValidCheckSum(uint32 checksum, const uint8 *data, const uint16 length);
+ static uint32 BuildChecksum(const uint8 *data, uint32 length);
+
+ // If no check is passed, the default action from config is executed
+ std::string Penalty(WardenCheck* check = NULL);
+
+ private:
+ WorldSession* _session;
+ uint8 _inputKey[16];
+ uint8 _outputKey[16];
+ uint8 _seed[16];
+ ARC4 _inputCrypto;
+ ARC4 _outputCrypto;
+ uint32 _checkTimer; // Timer for sending check requests
+ uint32 _clientResponseTimer; // Timer for client response delay
+ bool _dataSent;
+ uint32 _previousTimestamp;
+ ClientWardenModule* _module;
+ bool _initialized;
+};
+
+#endif
diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp
new file mode 100644
index 00000000000..77332bd30a8
--- /dev/null
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Common.h"
+#include "WorldPacket.h"
+#include "WorldSession.h"
+#include "Log.h"
+#include "Database/DatabaseEnv.h"
+#include "Util.h"
+#include "WardenCheckMgr.h"
+#include "Warden.h"
+
+
+WardenCheckMgr::WardenCheckMgr()
+{
+ InternalDataID = 1;
+}
+
+WardenCheckMgr::~WardenCheckMgr()
+{
+ for (uint16 i = 0; i < CheckStore.size(); ++i)
+ delete CheckStore[i];
+
+ for (CheckResultContainer::iterator itr = CheckResultStore.begin(); itr != CheckResultStore.end(); ++itr)
+ delete itr->second;
+}
+
+void WardenCheckMgr::LoadWardenChecks()
+{
+ // Check if Warden is enabled by config before loading anything
+ if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
+ {
+ sLog->outString(">> Warden disabled, loading checks skipped.");
+ sLog->outString();
+ return;
+ }
+
+ // For reload case
+ for (uint16 i = 0; i < CheckStore.size(); ++i)
+ delete CheckStore[i];
+
+ CheckStore.clear();
+
+ for (CheckResultContainer::iterator itr = CheckResultStore.begin(); itr != CheckResultStore.end(); ++itr)
+ delete itr->second;
+ CheckResultStore.clear();
+
+
+ QueryResult result = WorldDatabase.Query("SELECT MAX(id) FROM warden_checks");
+
+ if (!result)
+ {
+ sLog->outString(">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
+ sLog->outString();
+ return;
+ }
+
+ Field* fields = result->Fetch();
+
+ uint32 maxCheckId = fields[0].GetUInt32();
+
+ CheckStore.resize(maxCheckId + 1);
+
+ // 0 1 2 3 4 5 6
+ result = WorldDatabase.Query("SELECT id, type, data, result, address, length, str FROM warden_checks ORDER BY id ASC");
+
+ uint32 count = 0;
+ do
+ {
+ Field* fields = result->Fetch();
+
+ uint16 id = fields[0].GetUInt16();
+ uint8 checkType = fields[1].GetUInt8();
+ std::string data = fields[2].GetString();
+ std::string checkResult = fields[3].GetString();
+ uint32 address = fields[4].GetUInt32();
+ uint8 length = fields[5].GetUInt8();
+ std::string str = fields[6].GetString();
+
+ WardenCheck* wardenCheck = new WardenCheck();
+ wardenCheck->Type = checkType;
+
+ // Initialize action with default action from config
+ wardenCheck->Action = WardenActions(sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_FAIL_ACTION));
+
+ if (checkType == PAGE_CHECK_A || checkType == PAGE_CHECK_B || checkType == DRIVER_CHECK)
+ {
+ wardenCheck->Data.SetHexStr(data.c_str());
+ int len = data.size() / 2;
+
+ if (wardenCheck->Data.GetNumBytes() < len)
+ {
+ uint8 temp[24];
+ memset(temp, 0, len);
+ memcpy(temp, wardenCheck->Data.AsByteArray(), wardenCheck->Data.GetNumBytes());
+ std::reverse(temp, temp + len);
+ wardenCheck->Data.SetBinary((uint8*)temp, len);
+ }
+ }
+
+ if (checkType == MEM_CHECK || checkType == MODULE_CHECK)
+ MemChecksIdPool.push_back(id);
+ else
+ OtherChecksIdPool.push_back(id);
+
+ if (checkType == MEM_CHECK || checkType == PAGE_CHECK_A || checkType == PAGE_CHECK_B || checkType == PROC_CHECK)
+ {
+ wardenCheck->Address = address;
+ wardenCheck->Length = length;
+ }
+
+ // PROC_CHECK support missing
+ if (checkType == MEM_CHECK || checkType == MPQ_CHECK || checkType == LUA_STR_CHECK || checkType == DRIVER_CHECK || checkType == MODULE_CHECK)
+ wardenCheck->Str = str;
+
+ CheckStore[id] = wardenCheck;
+
+ if (checkType == MPQ_CHECK || checkType == MEM_CHECK)
+ {
+ WardenCheckResult *wr = new WardenCheckResult();
+ wr->Result.SetHexStr(checkResult.c_str());
+ int len = checkResult.size() / 2;
+ if (wr->Result.GetNumBytes() < len)
+ {
+ uint8 *temp = new uint8[len];
+ memset(temp, 0, len);
+ memcpy(temp, wr->Result.AsByteArray(), wr->Result.GetNumBytes());
+ std::reverse(temp, temp + len);
+ wr->Result.SetBinary((uint8*)temp, len);
+ delete [] temp;
+ }
+ CheckResultStore[id] = wr;
+ }
+
+ ++count;
+ }
+ while (result->NextRow());
+
+ // Fetch overrides from char db and overwrite default action in CheckStore
+ QueryResult overrideResult = CharacterDatabase.Query("SELECT wardenId, action FROM warden_action");
+
+ uint32 overrideCount = 0;
+
+ if(overrideResult)
+ {
+ do
+ {
+ Field * fields = overrideResult->Fetch();
+
+ uint16 checkId = fields[0].GetUInt16();
+
+ // Check if override check ID actually exists in current Warden checks
+ if (checkId > maxCheckId)
+ sLog->outError("Warden check action override for invalid check (ID: %u, action: %u), skipped", checkId, fields[1].GetUInt8());
+ else
+ CheckStore[fields[0].GetUInt16()]->Action = WardenActions(fields[1].GetUInt8());
+
+ ++overrideCount;
+ }
+ while (overrideResult->NextRow());
+ }
+
+ sLog->outString(">> Loaded %u warden checks and %u action overrides.", count, overrideCount);
+ sLog->outString();
+}
+
+WardenCheck* WardenCheckMgr::GetWardenDataById(uint16 Id)
+{
+ if (Id < CheckStore.size())
+ return CheckStore[Id];
+
+ return NULL;
+}
+
+WardenCheckResult* WardenCheckMgr::GetWardenResultById(uint16 Id)
+{
+ CheckResultContainer::const_iterator itr = CheckResultStore.find(Id);
+ if (itr != CheckResultStore.end())
+ return itr->second;
+ return NULL;
+}
diff --git a/src/server/game/Warden/WardenCheckMgr.h b/src/server/game/Warden/WardenCheckMgr.h
new file mode 100644
index 00000000000..cbe8460db3b
--- /dev/null
+++ b/src/server/game/Warden/WardenCheckMgr.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _WARDENCHECKMGR_H
+#define _WARDENCHECKMGR_H
+
+#include <map>
+#include "Cryptography/BigNumber.h"
+
+enum WardenActions
+{
+ WARDEN_ACTION_LOG,
+ WARDEN_ACTION_KICK,
+ WARDEN_ACTION_BAN
+};
+
+struct WardenCheck
+{
+ uint8 Type;
+ BigNumber Data;
+ uint32 Address; // PROC_CHECK, MEM_CHECK, PAGE_CHECK
+ uint8 Length; // PROC_CHECK, MEM_CHECK, PAGE_CHECK
+ std::string Str; // LUA, MPQ, DRIVER
+ enum WardenActions Action;
+};
+
+struct WardenCheckResult
+{
+ BigNumber Result; // MEM_CHECK
+};
+
+class WardenCheckMgr
+{
+ friend class ACE_Singleton<WardenCheckMgr, ACE_Null_Mutex>;
+ WardenCheckMgr();
+ ~WardenCheckMgr();
+
+ public:
+ // We have a linear key without any gaps, so we use vector for fast access
+ typedef std::vector<WardenCheck*> CheckContainer;
+ typedef std::map<uint32, WardenCheckResult*> CheckResultContainer;
+
+ WardenCheck* GetWardenDataById(uint16 Id);
+ WardenCheckResult* GetWardenResultById(uint16 Id);
+
+ uint32 InternalDataID;
+ std::vector<uint16> MemChecksIdPool;
+ std::vector<uint16> OtherChecksIdPool;
+
+ void LoadWardenChecks();
+
+ private:
+ CheckContainer CheckStore;
+ CheckResultContainer CheckResultStore;
+};
+
+#define sWardenCheckMgr ACE_Singleton<WardenCheckMgr, ACE_Null_Mutex>::instance()
+
+#endif
diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp
new file mode 100644
index 00000000000..f62aa11a339
--- /dev/null
+++ b/src/server/game/Warden/WardenMac.cpp
@@ -0,0 +1,260 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Cryptography/WardenKeyGeneration.h"
+#include "Common.h"
+#include "WorldPacket.h"
+#include "WorldSession.h"
+#include "Log.h"
+#include "Opcodes.h"
+#include "ByteBuffer.h"
+#include <openssl/md5.h>
+#include "World.h"
+#include "Player.h"
+#include "Util.h"
+#include "WardenMac.h"
+#include "WardenModuleMac.h"
+
+WardenMac::WardenMac() : Warden()
+{
+}
+
+WardenMac::~WardenMac()
+{
+}
+
+void WardenMac::Init(WorldSession *pClient, BigNumber *K)
+{
+ _session = pClient;
+ // Generate Warden Key
+ SHA1Randx WK(K->AsByteArray(), K->GetNumBytes());
+ WK.generate(_inputKey, 16);
+ WK.generate(_outputKey, 16);
+ /*
+ Seed: 4D808D2C77D905C41A6380EC08586AFE (0x05 packet)
+ Hash: <?> (0x04 packet)
+ Module MD5: 0DBBF209A27B1E279A9FEC5C168A15F7
+ New Client Key: <?>
+ New Cerver Key: <?>
+ */
+ uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE };
+
+ memcpy(_seed, mod_seed, 16);
+
+ _inputCrypto.Init(_inputKey);
+ _outputCrypto.Init(_outputKey);
+ sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", pClient->GetAccountId());
+ sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
+
+ _module = GetModuleForClient();
+
+ sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
+ RequestModule();
+}
+
+ClientWardenModule* WardenMac::GetModuleForClient()
+{
+ ClientWardenModule *mod = new ClientWardenModule;
+
+ uint32 len = sizeof(Module_0DBBF209A27B1E279A9FEC5C168A15F7_Data);
+
+ // data assign
+ mod->CompressedSize = len;
+ mod->CompressedData = new uint8[len];
+ memcpy(mod->CompressedData, Module_0DBBF209A27B1E279A9FEC5C168A15F7_Data, len);
+ memcpy(mod->Key, Module_0DBBF209A27B1E279A9FEC5C168A15F7_Key, 16);
+
+ // md5 hash
+ MD5_CTX ctx;
+ MD5_Init(&ctx);
+ MD5_Update(&ctx, mod->CompressedData, len);
+ MD5_Final((uint8*)&mod->Id, &ctx);
+
+ return mod;
+}
+
+void WardenMac::InitializeModule()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Initialize module");
+}
+
+void WardenMac::RequestHash()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request hash");
+
+ // Create packet structure
+ WardenHashRequest Request;
+ Request.Command = WARDEN_SMSG_HASH_REQUEST;
+ memcpy(Request.Seed, _seed, 16);
+
+ // Encrypt with warden RC4 key.
+ EncryptData((uint8*)&Request, sizeof(WardenHashRequest));
+
+ WorldPacket pkt(SMSG_WARDEN_DATA, sizeof(WardenHashRequest));
+ pkt.append((uint8*)&Request, sizeof(WardenHashRequest));
+ _session->SendPacket(&pkt);
+}
+
+void WardenMac::HandleHashResult(ByteBuffer &buff)
+{
+
+ // test
+ int keyIn[4];
+
+ uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE };
+
+ for(int i = 0; i < 4; ++i)
+ {
+ keyIn[i] = *(int*)(&mod_seed[0] + i * 4);
+ }
+
+ int keyOut[4];
+ int keyIn1, keyIn2;
+ keyOut[0] = keyIn[0];
+ keyIn[0] ^= 0xDEADBEEFu;
+ keyIn1 = keyIn[1];
+ keyIn[1] -= 0x35014542u;
+ keyIn2 = keyIn[2];
+ keyIn[2] += 0x5313F22u;
+ keyIn[3] *= 0x1337F00Du;
+ keyOut[1] = keyIn1 - 0x6A028A84;
+ keyOut[2] = keyIn2 + 0xA627E44;
+ keyOut[3] = 0x1337F00D * keyIn[3];
+ // end test
+
+ buff.rpos(buff.wpos());
+
+ SHA1Hash sha1;
+ sha1.UpdateData((uint8*)keyIn, 16);
+ sha1.Finalize();
+
+ //const uint8 validHash[20] = { 0x56, 0x8C, 0x05, 0x4C, 0x78, 0x1A, 0x97, 0x2A, 0x60, 0x37, 0xA2, 0x29, 0x0C, 0x22, 0xB5, 0x25, 0x71, 0xA0, 0x6F, 0x4E };
+
+ // Verify key
+ if (memcmp(buff.contents() + 1, sha1.GetDigest(), 20) != 0)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed");
+ sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed hash reply. Action: %s",
+ _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str());
+ return;
+ }
+
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: succeed");
+
+ // client 7F96EEFDA5B63D20A4DF8E00CBF48304
+ //const uint8 client_key[16] = { 0x7F, 0x96, 0xEE, 0xFD, 0xA5, 0xB6, 0x3D, 0x20, 0xA4, 0xDF, 0x8E, 0x00, 0xCB, 0xF4, 0x83, 0x04 };
+
+ // server C2B7ADEDFCCCA9C2BFB3F85602BA809B
+ //const uint8 server_key[16] = { 0xC2, 0xB7, 0xAD, 0xED, 0xFC, 0xCC, 0xA9, 0xC2, 0xBF, 0xB3, 0xF8, 0x56, 0x02, 0xBA, 0x80, 0x9B };
+
+ // change keys here
+ memcpy(_inputKey, keyIn, 16);
+ memcpy(_outputKey, keyOut, 16);
+
+ _inputCrypto.Init(_inputKey);
+ _outputCrypto.Init(_outputKey);
+
+ _initialized = true;
+
+ _previousTimestamp = getMSTime();
+}
+
+void WardenMac::RequestData()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request data");
+
+ ByteBuffer buff;
+ buff << uint8(WARDEN_SMSG_CHEAT_CHECKS_REQUEST);
+
+ std::string str = "Test string!";
+
+ buff << uint8(str.size());
+ buff.append(str.c_str(), str.size());
+
+ buff.hexlike();
+
+ // Encrypt with warden RC4 key.
+ EncryptData(const_cast<uint8*>(buff.contents()), buff.size());
+
+ WorldPacket pkt(SMSG_WARDEN_DATA, buff.size());
+ pkt.append(buff);
+ _session->SendPacket(&pkt);
+
+ _dataSent = true;
+}
+
+void WardenMac::HandleData(ByteBuffer &buff)
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Handle data");
+
+ _dataSent = false;
+ _clientResponseTimer = 0;
+
+ //uint16 Length;
+ //buff >> Length;
+ //uint32 Checksum;
+ //buff >> Checksum;
+
+ //if (!IsValidCheckSum(Checksum, buff.contents() + buff.rpos(), Length))
+ //{
+ // buff.rpos(buff.wpos());
+ // if (sWorld->getBoolConfig(CONFIG_BOOL_WARDEN_KICK))
+ // Client->KickPlayer();
+ // return;
+ //}
+
+ bool found = false;
+
+ std::string str = "Test string!";
+
+ SHA1Hash sha1;
+ sha1.UpdateData(str);
+ uint32 magic = 0xFEEDFACE; // unsure
+ sha1.UpdateData((uint8*)&magic, 4);
+ sha1.Finalize();
+
+ uint8 sha1Hash[20];
+ buff.read(sha1Hash, 20);
+
+ if (memcmp(sha1Hash, sha1.GetDigest(), 20))
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "Handle data failed: SHA1 hash is wrong!");
+ found = true;
+ }
+
+ MD5_CTX ctx;
+ MD5_Init(&ctx);
+ MD5_Update(&ctx, str.c_str(), str.size());
+ uint8 ourMD5Hash[16];
+ MD5_Final(ourMD5Hash, &ctx);
+
+ uint8 theirsMD5Hash[16];
+ buff.read(theirsMD5Hash, 16);
+
+ if (memcmp(ourMD5Hash, theirsMD5Hash, 16))
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "Handle data failed: MD5 hash is wrong!");
+ found = true;
+ }
+
+ _session->KickPlayer();
+}
diff --git a/src/server/game/Warden/WardenMac.h b/src/server/game/Warden/WardenMac.h
new file mode 100644
index 00000000000..b2ecc72367d
--- /dev/null
+++ b/src/server/game/Warden/WardenMac.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _WARDEN_MAC_H
+#define _WARDEN_MAC_H
+
+#include "Cryptography/ARC4.h"
+#include <map>
+#include "Cryptography/BigNumber.h"
+#include "ByteBuffer.h"
+#include "Warden.h"
+
+class WorldSession;
+class Warden;
+
+class WardenMac : public Warden
+{
+ public:
+ WardenMac();
+ ~WardenMac();
+
+ void Init(WorldSession* session, BigNumber* k);
+ ClientWardenModule* GetModuleForClient();
+ void InitializeModule();
+ void RequestHash();
+ void HandleHashResult(ByteBuffer& buff);
+ void RequestData();
+ void HandleData(ByteBuffer& buff);
+};
+
+#endif
diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp
new file mode 100644
index 00000000000..a77c77a3261
--- /dev/null
+++ b/src/server/game/Warden/WardenWin.cpp
@@ -0,0 +1,523 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "Cryptography/HMACSHA1.h"
+#include "Cryptography/WardenKeyGeneration.h"
+#include "Common.h"
+#include "WorldPacket.h"
+#include "WorldSession.h"
+#include "Log.h"
+#include "Opcodes.h"
+#include "ByteBuffer.h"
+#include <openssl/md5.h>
+#include "Database/DatabaseEnv.h"
+#include "World.h"
+#include "Player.h"
+#include "Util.h"
+#include "WardenWin.h"
+#include "WardenModuleWin.h"
+#include "WardenCheckMgr.h"
+#include "AccountMgr.h"
+
+WardenWin::WardenWin() : Warden()
+{
+}
+
+WardenWin::~WardenWin()
+{
+}
+
+void WardenWin::Init(WorldSession* session, BigNumber *k)
+{
+ _session = session;
+ // Generate Warden Key
+ SHA1Randx WK(k->AsByteArray(), k->GetNumBytes());
+ WK.generate(_inputKey, 16);
+ WK.generate(_outputKey, 16);
+ /*
+ Seed: 4D808D2C77D905C41A6380EC08586AFE (0x05 packet)
+ Hash: 568C054C781A972A6037A2290C22B52571A06F4E (0x04 packet)
+ Module MD5: 79C0768D657977D697E10BAD956CCED1
+ New Client Key: 7F 96 EE FD A5 B6 3D 20 A4 DF 8E 00 CB F4 83 04
+ New Cerver Key: C2 B7 AD ED FC CC A9 C2 BF B3 F8 56 02 BA 80 9B
+ */
+ uint8 mod_seed[16] = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE };
+
+ memcpy(_seed, mod_seed, 16);
+
+ _inputCrypto.Init(_inputKey);
+ _outputCrypto.Init(_outputKey);
+ sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", session->GetAccountId());
+ sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
+
+ _module = GetModuleForClient();
+
+ sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
+ sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
+ RequestModule();
+}
+
+ClientWardenModule* WardenWin::GetModuleForClient()
+{
+ ClientWardenModule *mod = new ClientWardenModule;
+
+ uint32 length = sizeof(Module_79C0768D657977D697E10BAD956CCED1_Data);
+
+ // data assign
+ mod->CompressedSize = length;
+ mod->CompressedData = new uint8[length];
+ memcpy(mod->CompressedData, Module_79C0768D657977D697E10BAD956CCED1_Data, length);
+ memcpy(mod->Key, Module_79C0768D657977D697E10BAD956CCED1_Key, 16);
+
+ // md5 hash
+ MD5_CTX ctx;
+ MD5_Init(&ctx);
+ MD5_Update(&ctx, mod->CompressedData, length);
+ MD5_Final((uint8*)&mod->Id, &ctx);
+
+ return mod;
+}
+
+void WardenWin::InitializeModule()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Initialize module");
+
+ // Create packet structure
+ WardenInitModuleRequest Request;
+ Request.Command1 = WARDEN_SMSG_MODULE_INITIALIZE;
+ Request.Size1 = 20;
+ Request.CheckSumm1 = BuildChecksum(&Request.Unk1, 20);
+ Request.Unk1 = 1;
+ Request.Unk2 = 0;
+ Request.Type = 1;
+ Request.String_library1 = 0;
+ Request.Function1[0] = 0x00024F80; // 0x00400000 + 0x00024F80 SFileOpenFile
+ Request.Function1[1] = 0x000218C0; // 0x00400000 + 0x000218C0 SFileGetFileSize
+ Request.Function1[2] = 0x00022530; // 0x00400000 + 0x00022530 SFileReadFile
+ Request.Function1[3] = 0x00022910; // 0x00400000 + 0x00022910 SFileCloseFile
+
+ Request.Command2 = WARDEN_SMSG_MODULE_INITIALIZE;
+ Request.Size2 = 8;
+ Request.CheckSumm2 = BuildChecksum(&Request.Unk2, 8);
+ Request.Unk3 = 4;
+ Request.Unk4 = 0;
+ Request.String_library2 = 0;
+ Request.Function2 = 0x00419D40; // 0x00400000 + 0x00419D40 FrameScript::GetText
+ Request.Function2_set = 1;
+
+ Request.Command3 = WARDEN_SMSG_MODULE_INITIALIZE;
+ Request.Size3 = 8;
+ Request.CheckSumm3 = BuildChecksum(&Request.Unk5, 8);
+ Request.Unk5 = 1;
+ Request.Unk6 = 1;
+ Request.String_library3 = 0;
+ Request.Function3 = 0x0046AE20; // 0x00400000 + 0x0046AE20 PerformanceCounter
+ Request.Function3_set = 1;
+
+ // Encrypt with warden RC4 key.
+ EncryptData((uint8*)&Request, sizeof(WardenInitModuleRequest));
+
+ WorldPacket pkt(SMSG_WARDEN_DATA, sizeof(WardenInitModuleRequest));
+ pkt.append((uint8*)&Request, sizeof(WardenInitModuleRequest));
+ _session->SendPacket(&pkt);
+}
+
+void WardenWin::RequestHash()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request hash");
+
+ // Create packet structure
+ WardenHashRequest Request;
+ Request.Command = WARDEN_SMSG_HASH_REQUEST;
+ memcpy(Request.Seed, _seed, 16);
+
+ // Encrypt with warden RC4 key.
+ EncryptData((uint8*)&Request, sizeof(WardenHashRequest));
+
+ WorldPacket pkt(SMSG_WARDEN_DATA, sizeof(WardenHashRequest));
+ pkt.append((uint8*)&Request, sizeof(WardenHashRequest));
+ _session->SendPacket(&pkt);
+}
+
+void WardenWin::HandleHashResult(ByteBuffer &buff)
+{
+ buff.rpos(buff.wpos());
+
+ const uint8 validHash[20] = { 0x56, 0x8C, 0x05, 0x4C, 0x78, 0x1A, 0x97, 0x2A, 0x60, 0x37, 0xA2, 0x29, 0x0C, 0x22, 0xB5, 0x25, 0x71, 0xA0, 0x6F, 0x4E };
+
+ // Verify key
+ if (memcmp(buff.contents() + 1, validHash, sizeof(validHash)) != 0)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed");
+ sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed hash reply. Action: %s",
+ _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str());
+ return;
+ }
+
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: succeed");
+
+ // Client 7F96EEFDA5B63D20A4DF8E00CBF48304
+ const uint8 client_key[16] = { 0x7F, 0x96, 0xEE, 0xFD, 0xA5, 0xB6, 0x3D, 0x20, 0xA4, 0xDF, 0x8E, 0x00, 0xCB, 0xF4, 0x83, 0x04 };
+
+ // Server C2B7ADEDFCCCA9C2BFB3F85602BA809B
+ const uint8 server_key[16] = { 0xC2, 0xB7, 0xAD, 0xED, 0xFC, 0xCC, 0xA9, 0xC2, 0xBF, 0xB3, 0xF8, 0x56, 0x02, 0xBA, 0x80, 0x9B };
+
+ // Change keys here
+ memcpy(_inputKey, client_key, 16);
+ memcpy(_outputKey, server_key, 16);
+
+ _inputCrypto.Init(_inputKey);
+ _outputCrypto.Init(_outputKey);
+
+ _initialized = true;
+
+ _previousTimestamp = getMSTime();
+}
+
+void WardenWin::RequestData()
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Request data");
+
+ // If all checks were done, fill the todo list again
+ if (_memChecksTodo.empty())
+ _memChecksTodo.assign(sWardenCheckMgr->MemChecksIdPool.begin(), sWardenCheckMgr->MemChecksIdPool.end());
+
+ if (_otherChecksTodo.empty())
+ _otherChecksTodo.assign(sWardenCheckMgr->OtherChecksIdPool.begin(), sWardenCheckMgr->OtherChecksIdPool.end());
+
+ _serverTicks = getMSTime();
+
+ uint16 id;
+ uint8 type;
+ WardenCheck* wd;
+ _currentChecks.clear();
+
+ // Build check request
+ for (uint32 i = 0; i < sWorld->getIntConfig(CONFIG_WARDEN_NUM_MEM_CHECKS); ++i)
+ {
+ // If todo list is done break loop (will be filled on next Update() run)
+ if (_memChecksTodo.empty())
+ break;
+
+ // Get check id from the end and remove it from todo
+ id = _memChecksTodo.back();
+ _memChecksTodo.pop_back();
+
+ // Add the id to the list sent in this cycle
+ _currentChecks.push_back(id);
+ }
+
+ ByteBuffer buff;
+ buff << uint8(WARDEN_SMSG_CHEAT_CHECKS_REQUEST);
+
+ for (uint32 i = 0; i < sWorld->getIntConfig(CONFIG_WARDEN_NUM_OTHER_CHECKS); ++i)
+ {
+ // If todo list is done break loop (will be filled on next Update() run)
+ if (_otherChecksTodo.empty())
+ break;
+
+ // Get check id from the end and remove it from todo
+ id = _otherChecksTodo.back();
+ _otherChecksTodo.pop_back();
+
+ // Add the id to the list sent in this cycle
+ _currentChecks.push_back(id);
+
+ wd = sWardenCheckMgr->GetWardenDataById(id);
+
+ switch (wd->Type)
+ {
+ case MPQ_CHECK:
+ case LUA_STR_CHECK:
+ case DRIVER_CHECK:
+ buff << uint8(wd->Str.size());
+ buff.append(wd->Str.c_str(), wd->Str.size());
+ break;
+ default:
+ break;
+ }
+ }
+
+ uint8 xorByte = _inputKey[0];
+
+ // Add TIMING_CHECK
+ buff << uint8(0x00);
+ buff << uint8(TIMING_CHECK ^ xorByte);
+
+ uint8 index = 1;
+
+ for (std::list<uint16>::iterator itr = _currentChecks.begin(); itr != _currentChecks.end(); ++itr)
+ {
+ wd = sWardenCheckMgr->GetWardenDataById(*itr);
+
+ type = wd->Type;
+ buff << uint8(type ^ xorByte);
+ switch (type)
+ {
+ case MEM_CHECK:
+ {
+ buff << uint8(0x00);
+ buff << uint32(wd->Address);
+ buff << uint8(wd->Length);
+ break;
+ }
+ case PAGE_CHECK_A:
+ case PAGE_CHECK_B:
+ {
+ buff.append(wd->Data.AsByteArray(0, false), wd->Data.GetNumBytes());
+ buff << uint32(wd->Address);
+ buff << uint8(wd->Length);
+ break;
+ }
+ case MPQ_CHECK:
+ case LUA_STR_CHECK:
+ {
+ buff << uint8(index++);
+ break;
+ }
+ case DRIVER_CHECK:
+ {
+ buff.append(wd->Data.AsByteArray(0, false), wd->Data.GetNumBytes());
+ buff << uint8(index++);
+ break;
+ }
+ case MODULE_CHECK:
+ {
+ uint32 seed = static_cast<uint32>(rand32());
+ buff << uint32(seed);
+ HmacHash hmac(4, (uint8*)&seed);
+ hmac.UpdateData(wd->Str);
+ hmac.Finalize();
+ buff.append(hmac.GetDigest(), hmac.GetLength());
+ break;
+ }
+ /*case PROC_CHECK:
+ {
+ buff.append(wd->i.AsByteArray(0, false), wd->i.GetNumBytes());
+ buff << uint8(index++);
+ buff << uint8(index++);
+ buff << uint32(wd->Address);
+ buff << uint8(wd->Length);
+ break;
+ }*/
+ default:
+ break; // Should never happen
+ }
+ }
+ buff << uint8(xorByte);
+ buff.hexlike();
+
+ // Encrypt with warden RC4 key
+ EncryptData(const_cast<uint8*>(buff.contents()), buff.size());
+
+ WorldPacket pkt(SMSG_WARDEN_DATA, buff.size());
+ pkt.append(buff);
+ _session->SendPacket(&pkt);
+
+ _dataSent = true;
+
+ std::stringstream stream;
+ stream << "Sent check id's: ";
+ for (std::list<uint16>::iterator itr = _currentChecks.begin(); itr != _currentChecks.end(); ++itr)
+ stream << *itr << " ";
+
+ sLog->outWarden("%s", stream.str().c_str());
+}
+
+void WardenWin::HandleData(ByteBuffer &buff)
+{
+ sLog->outDebug(LOG_FILTER_WARDEN, "Handle data");
+
+ _dataSent = false;
+ _clientResponseTimer = 0;
+
+ uint16 Length;
+ buff >> Length;
+ uint32 Checksum;
+ buff >> Checksum;
+
+ if (!IsValidCheckSum(Checksum, buff.contents() + buff.rpos(), Length))
+ {
+ buff.rpos(buff.wpos());
+ sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM FAIL");
+ sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed checksum. Action: %s",
+ _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str());
+ return;
+ }
+
+ // TIMING_CHECK
+ {
+ uint8 result;
+ buff >> result;
+ // TODO: test it.
+ if (result == 0x00)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "TIMING CHECK FAIL result 0x00");
+ sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed timing check. Action: %s",
+ _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), Penalty().c_str());
+ return;
+ }
+
+ uint32 newClientTicks;
+ buff >> newClientTicks;
+
+ uint32 ticksNow = getMSTime();
+ uint32 ourTicks = newClientTicks + (ticksNow - _serverTicks);
+
+ sLog->outDebug(LOG_FILTER_WARDEN, "ServerTicks %u", ticksNow); // Now
+ sLog->outDebug(LOG_FILTER_WARDEN, "RequestTicks %u", _serverTicks); // At request
+ sLog->outDebug(LOG_FILTER_WARDEN, "Ticks %u", newClientTicks); // At response
+ sLog->outDebug(LOG_FILTER_WARDEN, "Ticks diff %u", ourTicks - newClientTicks);
+ }
+
+ WardenCheckResult *rs;
+ WardenCheck *rd;
+ uint8 type;
+ uint16 checkFailed = 0;
+
+ for (std::list<uint16>::iterator itr = _currentChecks.begin(); itr != _currentChecks.end(); ++itr)
+ {
+ rd = sWardenCheckMgr->GetWardenDataById(*itr);
+ rs = sWardenCheckMgr->GetWardenResultById(*itr);
+
+ type = rd->Type;
+ switch (type)
+ {
+ case MEM_CHECK:
+ {
+ uint8 Mem_Result;
+ buff >> Mem_Result;
+
+ if (Mem_Result != 0)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ checkFailed = *itr;
+ continue;
+ }
+
+ if (memcmp(buff.contents() + buff.rpos(), rs->Result.AsByteArray(0, false), rd->Length) != 0)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK fail CheckId %u account Id %u", *itr, _session->GetAccountId());
+ checkFailed = *itr;
+ buff.rpos(buff.rpos() + rd->Length);
+ continue;
+ }
+
+ buff.rpos(buff.rpos() + rd->Length);
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ break;
+ }
+ case PAGE_CHECK_A:
+ case PAGE_CHECK_B:
+ case DRIVER_CHECK:
+ case MODULE_CHECK:
+ {
+ const uint8 byte = 0xE9;
+ if (memcmp(buff.contents() + buff.rpos(), &byte, sizeof(uint8)) != 0)
+ {
+ if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ if (type == MODULE_CHECK)
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ if (type == DRIVER_CHECK)
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ checkFailed = *itr;
+ buff.rpos(buff.rpos() + 1);
+ continue;
+ }
+
+ buff.rpos(buff.rpos() + 1);
+ if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ else if (type == MODULE_CHECK)
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ else if (type == DRIVER_CHECK)
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ break;
+ }
+ case LUA_STR_CHECK:
+ {
+ uint8 Lua_Result;
+ buff >> Lua_Result;
+
+ if (Lua_Result != 0)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT LUA_STR_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ checkFailed = *itr;
+ continue;
+ }
+
+ uint8 luaStrLen;
+ buff >> luaStrLen;
+
+ if (luaStrLen != 0)
+ {
+ char *str = new char[luaStrLen + 1];
+ memset(str, 0, luaStrLen + 1);
+ memcpy(str, buff.contents() + buff.rpos(), luaStrLen);
+ sLog->outDebug(LOG_FILTER_WARDEN, "Lua string: %s", str);
+ delete[] str;
+ }
+ buff.rpos(buff.rpos() + luaStrLen); // Skip string
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT LUA_STR_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ break;
+ }
+ case MPQ_CHECK:
+ {
+ uint8 Mpq_Result;
+ buff >> Mpq_Result;
+
+ if (Mpq_Result != 0)
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
+ checkFailed = *itr;
+ continue;
+ }
+
+ if (memcmp(buff.contents() + buff.rpos(), rs->Result.AsByteArray(0, false), 20) != 0) // SHA1
+ {
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ checkFailed = *itr;
+ buff.rpos(buff.rpos() + 20); // 20 bytes SHA1
+ continue;
+ }
+
+ buff.rpos(buff.rpos() + 20); // 20 bytes SHA1
+ sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ break;
+ }
+ default: // Should never happen
+ break;
+ }
+ }
+
+ if (checkFailed > 0)
+ {
+ WardenCheck* check = sWardenCheckMgr->GetWardenDataById(checkFailed);
+
+ sLog->outWarden("WARDEN: Player %s (guid: %u, account: %u) failed Warden check %u. Action: %s",
+ _session->GetPlayerName(), _session->GetGuidLow(), _session->GetAccountId(), checkFailed, Penalty(check).c_str());
+ }
+
+ // Set hold off timer, minimum timer should at least be 1 second
+ uint32 holdOff = sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF);
+ _checkTimer = (holdOff < 1 ? 1 : holdOff) * IN_MILLISECONDS;
+}
diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h
new file mode 100644
index 00000000000..4d859f2b22a
--- /dev/null
+++ b/src/server/game/Warden/WardenWin.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _WARDEN_WIN_H
+#define _WARDEN_WIN_H
+
+#include <map>
+#include "Cryptography/ARC4.h"
+#include "Cryptography/BigNumber.h"
+#include "ByteBuffer.h"
+#include "Warden.h"
+
+#if defined(__GNUC__)
+#pragma pack(1)
+#else
+#pragma pack(push,1)
+#endif
+
+struct WardenInitModuleRequest
+{
+ uint8 Command1;
+ uint16 Size1;
+ uint32 CheckSumm1;
+ uint8 Unk1;
+ uint8 Unk2;
+ uint8 Type;
+ uint8 String_library1;
+ uint32 Function1[4];
+
+ uint8 Command2;
+ uint16 Size2;
+ uint32 CheckSumm2;
+ uint8 Unk3;
+ uint8 Unk4;
+ uint8 String_library2;
+ uint32 Function2;
+ uint8 Function2_set;
+
+ uint8 Command3;
+ uint16 Size3;
+ uint32 CheckSumm3;
+ uint8 Unk5;
+ uint8 Unk6;
+ uint8 String_library3;
+ uint32 Function3;
+ uint8 Function3_set;
+};
+
+#if defined(__GNUC__)
+#pragma pack()
+#else
+#pragma pack(pop)
+#endif
+
+class WorldSession;
+class Warden;
+
+class WardenWin : public Warden
+{
+ public:
+ WardenWin();
+ ~WardenWin();
+
+ void Init(WorldSession* session, BigNumber* K);
+ ClientWardenModule* GetModuleForClient();
+ void InitializeModule();
+ void RequestHash();
+ void HandleHashResult(ByteBuffer &buff);
+ void RequestData();
+ void HandleData(ByteBuffer &buff);
+
+ private:
+ uint32 _serverTicks;
+ std::list<uint16> _otherChecksTodo;
+ std::list<uint16> _memChecksTodo;
+ std::list<uint16> _currentChecks;
+};
+
+#endif
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index f492ff80fae..45b1c4dac64 100755
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -75,6 +75,8 @@
#include "CreatureTextMgr.h"
#include "SmartAI.h"
#include "Channel.h"
+#include "WardenCheckMgr.h"
+#include "Warden.h"
volatile bool World::m_stopEvent = false;
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
@@ -970,6 +972,8 @@ void World::LoadConfigSettings(bool reload)
if (m_int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
m_int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = MAX_LEVEL;
m_bool_configs[CONFIG_QUEST_IGNORE_RAID] = ConfigMgr::GetBoolDefault("Quests.IgnoreRaid", false);
+ m_bool_configs[CONFIG_QUEST_IGNORE_AUTO_ACCEPT] = ConfigMgr::GetBoolDefault("Quests.IgnoreAutoAccept", false);
+ m_bool_configs[CONFIG_QUEST_IGNORE_AUTO_COMPLETE] = ConfigMgr::GetBoolDefault("Quests.IgnoreAutoComplete", false);
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = ConfigMgr::GetIntDefault("Battleground.Random.ResetHour", 6);
if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
@@ -1169,6 +1173,15 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_CHATLOG_ADDON] = ConfigMgr::GetBoolDefault("ChatLogs.Addon", false);
m_bool_configs[CONFIG_CHATLOG_BGROUND] = ConfigMgr::GetBoolDefault("ChatLogs.Battleground", false);
+ // Warden
+ m_bool_configs[CONFIG_WARDEN_ENABLED] = ConfigMgr::GetBoolDefault("Warden.Enabled", false);
+ m_int_configs[CONFIG_WARDEN_NUM_MEM_CHECKS] = ConfigMgr::GetIntDefault("Warden.NumMemChecks", 3);
+ m_int_configs[CONFIG_WARDEN_NUM_OTHER_CHECKS] = ConfigMgr::GetIntDefault("Warden.NumOtherChecks", 7);
+ m_int_configs[CONFIG_WARDEN_CLIENT_BAN_DURATION] = ConfigMgr::GetIntDefault("Warden.BanDuration", 86400);
+ m_int_configs[CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF] = ConfigMgr::GetIntDefault("Warden.ClientCheckHoldOff", 30);
+ m_int_configs[CONFIG_WARDEN_CLIENT_FAIL_ACTION] = ConfigMgr::GetIntDefault("Warden.ClientCheckFailAction", 0);
+ m_int_configs[CONFIG_WARDEN_CLIENT_RESPONSE_DELAY] = ConfigMgr::GetIntDefault("Warden.ClientResponseDelay", 600);
+
// Dungeon finder
m_bool_configs[CONFIG_DUNGEON_FINDER_ENABLE] = ConfigMgr::GetBoolDefault("DungeonFinder.Enable", false);
@@ -1193,6 +1206,8 @@ void World::LoadConfigSettings(bool reload)
sScriptMgr->OnConfigLoad(reload);
}
+extern void LoadGameObjectModelList();
+
/// Initialize the World
void World::SetInitialWorldSettings()
{
@@ -1267,6 +1282,9 @@ void World::SetInitialWorldSettings()
sLog->outString("Loading spell custom attributes...");
sSpellMgr->LoadSpellCustomAttr();
+ sLog->outString("Loading GameObject models...");
+ LoadGameObjectModelList();
+
sLog->outString("Loading Script Names...");
sObjectMgr->LoadScriptNames();
@@ -1575,6 +1593,9 @@ void World::SetInitialWorldSettings()
sLog->outString("Loading Creature Formations...");
FormationMgr::LoadCreatureFormations();
+ sLog->outString("Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
+ LoadWorldStates();
+
sLog->outString("Loading Conditions...");
sConditionMgr->LoadConditions();
@@ -1702,9 +1723,6 @@ void World::SetInitialWorldSettings()
sTicketMgr->Initialize();
- sLog->outString("Loading World States..."); // must be loaded before battleground and outdoor PvP
- LoadWorldStates();
-
///- Initialize Battlegrounds
sLog->outString("Starting Battleground System");
sBattlegroundMgr->CreateInitialBattlegrounds();
@@ -1720,6 +1738,10 @@ void World::SetInitialWorldSettings()
sLog->outString("Loading Transport NPCs...");
sMapMgr->LoadTransportNPCs();
+ ///- Initialize Warden
+ sLog->outString("Loading Warden Checks..." );
+ sWardenCheckMgr->LoadWardenChecks();
+
sLog->outString("Deleting expired bans...");
LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate");
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index b7ca40f694e..6304699e7e1 100755
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -168,6 +168,9 @@ enum WorldBoolConfigs
CONFIG_PRESERVE_CUSTOM_CHANNELS,
CONFIG_PDUMP_NO_PATHS,
CONFIG_PDUMP_NO_OVERWRITE,
+ CONFIG_QUEST_IGNORE_AUTO_ACCEPT,
+ CONFIG_QUEST_IGNORE_AUTO_COMPLETE,
+ CONFIG_WARDEN_ENABLED,
BOOL_CONFIG_VALUE_COUNT
};
@@ -317,6 +320,12 @@ enum WorldIntConfigs
CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION,
CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS,
CONFIG_MAX_INSTANCES_PER_HOUR,
+ CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
+ CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF,
+ CONFIG_WARDEN_CLIENT_FAIL_ACTION,
+ CONFIG_WARDEN_CLIENT_BAN_DURATION,
+ CONFIG_WARDEN_NUM_MEM_CHECKS,
+ CONFIG_WARDEN_NUM_OTHER_CHECKS,
INT_CONFIG_VALUE_COUNT
};
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt
index 56e63af5bbf..62336e95ff6 100644
--- a/src/server/scripts/CMakeLists.txt
+++ b/src/server/scripts/CMakeLists.txt
@@ -52,6 +52,7 @@ message("")
include_directories(
${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/g3dlite/include
${CMAKE_SOURCE_DIR}/dep/SFMT
${CMAKE_SOURCE_DIR}/dep/mersennetwister
${CMAKE_SOURCE_DIR}/dep/zlib
@@ -69,6 +70,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
${CMAKE_SOURCE_DIR}/src/server/collision
${CMAKE_SOURCE_DIR}/src/server/collision/Management
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Database
${CMAKE_SOURCE_DIR}/src/server/game/Accounts
@@ -135,6 +137,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Texts
${CMAKE_SOURCE_DIR}/src/server/game/Tickets
${CMAKE_SOURCE_DIR}/src/server/game/Tools
+ ${CMAKE_SOURCE_DIR}/src/server/game/Warden
+ ${CMAKE_SOURCE_DIR}/src/server/game/Warden/Modules
${CMAKE_SOURCE_DIR}/src/server/game/Weather
${CMAKE_SOURCE_DIR}/src/server/game/World
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 06885e899e4..4c4869c1c5b 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -88,6 +88,7 @@ public:
{ "update", SEC_ADMINISTRATOR, false, &HandleDebugUpdateCommand, "", NULL },
{ "itemexpire", SEC_ADMINISTRATOR, false, &HandleDebugItemExpireCommand, "", NULL },
{ "areatriggers", SEC_ADMINISTRATOR, false, &HandleDebugAreaTriggersCommand, "", NULL },
+ { "los", SEC_MODERATOR, false, &HandleDebugLoSCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand commandTable[] =
@@ -1041,6 +1042,13 @@ public:
return true;
}
+ static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
+ {
+ if (Unit* unit = handler->getSelectedUnit())
+ handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
+ return true;
+ }
+
static bool HandleDebugSetAuraStateCommand(ChatHandler* handler, char const* args)
{
if (!*args)
diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp
index 3de0d89bac5..f7371884da2 100644
--- a/src/server/scripts/Commands/cs_go.cpp
+++ b/src/server/scripts/Commands/cs_go.cpp
@@ -496,7 +496,7 @@ public:
float z;
float ort = port ? (float)atof(port) : player->GetOrientation();
uint32 mapId = id ? (uint32)atoi(id) : player->GetMapId();
-
+
if (goZ)
{
z = (float)atof(goZ);
diff --git a/src/server/scripts/Commands/cs_gps.cpp b/src/server/scripts/Commands/cs_gps.cpp
index 0d249326837..12a5efddf47 100644
--- a/src/server/scripts/Commands/cs_gps.cpp
+++ b/src/server/scripts/Commands/cs_gps.cpp
@@ -87,8 +87,8 @@ public:
Map2ZoneCoordinates(zoneX, zoneY, zoneId);
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());
+ float groundZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
+ float floorZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 363f7645f6f..17c819f2f22 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -992,7 +992,7 @@ public:
return true;
}
- static bool HandleReloadWpCommand(ChatHandler* /*handler*/, const char* args)
+ static bool HandleReloadWpCommand(ChatHandler* handler, const char* args)
{
if (*args != 'a')
sLog->outString("Re-Loading Waypoints data from 'waypoints_data'");
@@ -1000,7 +1000,7 @@ public:
sWaypointMgr->Load();
if (*args != 'a')
- sLog->outString("DB Table 'waypoint_data' reloaded.");
+ handler->SendGlobalGMSysMessage("DB Table 'waypoint_data' reloaded.");
return true;
}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
index 54fcb9d99c2..3960351d395 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
@@ -24,7 +24,7 @@ enum Yells
YELL_RESPAWN1 = -1810010, // no creature_text
YELL_RESPAWN2 = -1810011, // no creature_text
YELL_RANDOM = 2,
- YELL_SPELL = 3,
+ YELL_SPELL = 3,
};
enum Spells
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index 8eff3e3a042..7ef11e5256a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -1238,10 +1238,10 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
break;
case 2:
- me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
break;
case 3:
- me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
break;
case 4:
me->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
@@ -1301,7 +1301,7 @@ void AddSC_blackrock_depths()
new npc_kharan_mighthammer();
new npc_lokhtos_darkbargainer();
new npc_rocknot();
- // Fix us
+ // Fix us
/*new npc_dughal_stormwing();
new npc_tobias_seecher();
new npc_marshal_windsor();
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 6b474166e7f..3c8d5fc4fa8 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -117,7 +117,7 @@ public:
player->CLOSE_GOSSIP_MENU();
//start event here
creature->setFaction(FACTION_HOSTILE);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
creature->AI()->AttackStart(player);
InstanceScript* instance = creature->GetInstanceScript();
if (instance)
@@ -165,7 +165,7 @@ public:
me->setFaction(FACTION_FRIEND);
// was set before event start, so set again
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
if (instance)
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
index f87d87d976c..2ef3ef48ecb 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
@@ -375,7 +375,7 @@ public:
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
{
boss->setFaction(FACTION_HOSTILE);
- boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
if (Unit* target = boss->SelectNearestTarget(500))
boss->AI()->AttackStart(target);
}
diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt
index af106ea0004..5af9dd2f23e 100644
--- a/src/server/scripts/EasternKingdoms/CMakeLists.txt
+++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt
@@ -33,7 +33,6 @@ set(scripts_STAT_SRCS
EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
EasternKingdoms/isle_of_queldanas.cpp
EasternKingdoms/boss_kruul.cpp
- EasternKingdoms/searing_gorge.cpp
EasternKingdoms/ZulGurub/boss_hakkar.cpp
EasternKingdoms/ZulGurub/boss_mandokir.cpp
EasternKingdoms/ZulGurub/boss_marli.cpp
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index a675c355cfc..b15cb7d3da1 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -655,7 +655,7 @@ public:
{
DoScriptText(RAND(SAY_CRONE_AGGRO, SAY_CRONE_AGGRO2), me);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void JustDied(Unit* /*killer*/)
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index a7d1c3ad8ba..a2c8a890feb 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -125,7 +125,7 @@ public:
phase = PHASE_CHAINED;
events.Reset();
me->setFaction(7);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
me->LoadEquipment(0, true);
}
@@ -230,7 +230,7 @@ public:
else
{
me->setFaction(14);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
phase = PHASE_ATTACKING;
if (Player* target = Unit::GetPlayer(*me, playerGUID))
@@ -378,7 +378,7 @@ public:
return true;
}
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32));
@@ -877,7 +877,7 @@ public:
{
npc_scarlet_miner_cartAI(Creature* c) : PassiveAI(c), minerGUID(0)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetDisplayId(me->GetCreatureInfo()->Modelid1); // Modelid2 is a horse.
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 1fb8287e54d..4583a33a196 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -264,7 +264,7 @@ public:
m_uiValrothGUID = summoned->GetGUID();
summoned->AddThreat(me, 0.0f);
- summoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ summoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void SummonAcolyte(uint32 uiAmount)
@@ -605,7 +605,7 @@ public:
ExecuteSpeech_Counter = 0;
PlayerGUID = 0;
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
bool MeetQuestCondition(Unit* player)
@@ -702,7 +702,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_6, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -730,7 +730,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_8, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -758,7 +758,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_3, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -786,7 +786,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_7, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -814,7 +814,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_4, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -842,7 +842,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_9, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -870,7 +870,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_5, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -898,7 +898,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_10, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -926,7 +926,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_1, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
@@ -954,7 +954,7 @@ public:
case 9:
DoScriptText(SAY_EXEC_TIME_2, me, player);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10: DoScriptText(SAY_EXEC_WAITING, me, player); break;
case 11:
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
index febe89772fd..9512d66b6eb 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
@@ -91,7 +91,7 @@ public:
case 2:
if (!player->isRessurectRequested())
{
- me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01);
DoCast(player, SPELL_REVIVE, true);
me->MonsterWhisper(VALK_WHISPER, player->GetGUID());
}
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index df369bb58b6..57b902ac6d4 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -252,7 +252,7 @@ public:
{
case 1:
summon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000);
- summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
summon->SetReactState(REACT_DEFENSIVE);
summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true);
DoScriptText(SAY_ARCHMAGE, summon);
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
index 7bcd2598271..1c6cad7278a 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
@@ -143,125 +143,10 @@ class AreaTrigger_at_map_chamber : public AreaTriggerScript
}
};
-/*######
-## npc_lore_keeper_of_norgannon
-######*/
-
-#define GOSSIP_HELLO_KEEPER "Who are the Earthen?"
-#define GOSSIP_SELECT_KEEPER1 "What is a \"subterranean being matrix\"?"
-#define GOSSIP_SELECT_KEEPER2 "What are the anomalies you speak of?"
-#define GOSSIP_SELECT_KEEPER3 "What is a resilient foundation of construction?"
-#define GOSSIP_SELECT_KEEPER4 "So... the Earthen were made out of stone?"
-#define GOSSIP_SELECT_KEEPER5 "Anything else I should know about the Earthen?"
-#define GOSSIP_SELECT_KEEPER6 "I think I understand the Creators' design intent for the Earthen now. What are the Earthen's anomalies that you spoke of earlier?"
-#define GOSSIP_SELECT_KEEPER7 "What high-stress environments would cause the Earthen to destabilize?"
-#define GOSSIP_SELECT_KEEPER8 "What happens when the Earthen destabilize?"
-#define GOSSIP_SELECT_KEEPER9 "Troggs?! Are the troggs you mention the same as the ones in the world today?"
-#define GOSSIP_SELECT_KEEPER10 "You mentioned two results when the Earthen destabilize. What is the second?"
-#define GOSSIP_SELECT_KEEPER11 "Dwarves!!! Now you're telling me that dwarves originally came from the Earthen?!"
-#define GOSSIP_SELECT_KEEPER12 "These dwarves are the same ones today, yes? Do the dwarves maintain any other links to the Earthen?"
-#define GOSSIP_SELECT_KEEPER13 "Who are the Creators?"
-#define GOSSIP_SELECT_KEEPER14 "This is a lot to think about."
-#define GOSSIP_SELECT_KEEPER15 "I will access the discs now."
-
-class npc_lore_keeper_of_norgannon : public CreatureScript
-{
- public:
-
- npc_lore_keeper_of_norgannon()
- : CreatureScript("npc_lore_keeper_of_norgannon")
- {
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->GetQuestStatus(2278) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_KEEPER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- player->SEND_GOSSIP_MENU(1079, creature->GetGUID());
-
- return true;
- }
-
- 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_KEEPER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
- player->SEND_GOSSIP_MENU(1080, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
- player->SEND_GOSSIP_MENU(1081, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
- player->SEND_GOSSIP_MENU(1082, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
- player->SEND_GOSSIP_MENU(1083, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
- player->SEND_GOSSIP_MENU(1084, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
- player->SEND_GOSSIP_MENU(1085, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+7:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
- player->SEND_GOSSIP_MENU(1086, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+8:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
- player->SEND_GOSSIP_MENU(1087, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+9:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
- player->SEND_GOSSIP_MENU(1088, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+10:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+11);
- player->SEND_GOSSIP_MENU(1089, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+11:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+12);
- player->SEND_GOSSIP_MENU(1090, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+12:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER12, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+13);
- player->SEND_GOSSIP_MENU(1091, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+13:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER13, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+14);
- player->SEND_GOSSIP_MENU(1092, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+14:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER14, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+15);
- player->SEND_GOSSIP_MENU(1093, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+15:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER15, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+16);
- player->SEND_GOSSIP_MENU(1094, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+16:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(2278);
- break;
- }
- return true;
- }
-};
-
void AddSC_uldaman()
{
new mob_jadespine_basilisk();
new go_keystone_chamber();
new AreaTrigger_at_map_chamber();
- new npc_lore_keeper_of_norgannon();
}
diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
index e2a9717882b..82b09b9dc18 100644
--- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
@@ -73,7 +73,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
switch (uiPointId)
{
- case 4:Talk(SAY_PROGRESS_2, player->GetGUID());break;
+ case 4:Talk(SAY_PROGRESS_2, player->GetGUID());break;
case 5:Talk(SAY_PROGRESS_3, player->GetGUID());break;
case 8:Talk(EMOTE_PROGRESS_4);break;
case 9:
diff --git a/src/server/scripts/EasternKingdoms/blasted_lands.cpp b/src/server/scripts/EasternKingdoms/blasted_lands.cpp
index 1e34051db28..2ad03f8b504 100644
--- a/src/server/scripts/EasternKingdoms/blasted_lands.cpp
+++ b/src/server/scripts/EasternKingdoms/blasted_lands.cpp
@@ -19,13 +19,12 @@
/* ScriptData
SDName: Blasted_Lands
SD%Complete: 90
-SDComment: Quest support: 2784, 2801, 3628. Missing some texts for Fallen Hero. Teleporter to Rise of the Defiler missing group support.
+SDComment: Quest support: 3628. Teleporter to Rise of the Defiler missing group support.
SDCategory: Blasted Lands
EndScriptData */
/* ContentData
npc_deathly_usher
-npc_fallen_hero_of_horde
EndContentData */
#include "ScriptPCH.h"
@@ -69,115 +68,7 @@ public:
};
-/*######
-## npc_fallen_hero_of_horde
-######*/
-
-enum HeroesOfOld
-{
- QUEST_HEROES_OF_OLD = 2702,
- NPC_THUND_SPLITHOOF = 7750,
-};
-
-#define GOSSIP_H_F1 "Why are you here?"
-#define GOSSIP_H_F2 "Continue story..."
-
-#define GOSSIP_ITEM_FALLEN "Continue..."
-
-#define GOSSIP_ITEM_FALLEN1 "What could be worse than death?"
-#define GOSSIP_ITEM_FALLEN2 "Subordinates?"
-#define GOSSIP_ITEM_FALLEN3 "What are the stones of binding?"
-#define GOSSIP_ITEM_FALLEN4 "You can count on me, Hero"
-#define GOSSIP_ITEM_FALLEN5 "I shall"
-
-class npc_fallen_hero_of_horde : public CreatureScript
-{
-public:
- npc_fallen_hero_of_horde() : CreatureScript("npc_fallen_hero_of_horde") { }
-
- 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_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
- player->SEND_GOSSIP_MENU(1392, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+11:
- player->SEND_GOSSIP_MENU(1411, creature->GetGUID());
- if (player->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
- player->AreaExploredOrEventHappens(2784);
- if (player->GetTeam() == ALLIANCE)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(1411, creature->GetGUID());
- }
- break;
-
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
- player->SEND_GOSSIP_MENU(1451, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+21:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
- player->SEND_GOSSIP_MENU(1452, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+22:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
- player->SEND_GOSSIP_MENU(1453, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+23:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
- player->SEND_GOSSIP_MENU(1454, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+24:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
- player->SEND_GOSSIP_MENU(1455, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+25:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
- player->SEND_GOSSIP_MENU(1456, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+26:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(2801);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- if (player->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && player->GetTeam() == HORDE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
-
- if (player->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && player->GetTeam() == ALLIANCE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-
- bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest)
- {
- if (quest->GetQuestId() == QUEST_HEROES_OF_OLD)
- creature->SummonCreature(NPC_THUND_SPLITHOOF, -10630.3f, -2987.05f, 28.96f, 4.54f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 9000000);
-
- return true;
- }
-
-};
-
void AddSC_blasted_lands()
{
new npc_deathly_usher();
- new npc_fallen_hero_of_horde();
}
diff --git a/src/server/scripts/EasternKingdoms/searing_gorge.cpp b/src/server/scripts/EasternKingdoms/searing_gorge.cpp
deleted file mode 100644
index 74172dda743..00000000000
--- a/src/server/scripts/EasternKingdoms/searing_gorge.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* ScriptData
-SDName: Searing_Gorge
-SD%Complete: 80
-SDComment: Quest support: 3377, 3441 (More accurate info on Kalaran needed). Lothos Riftwaker teleport to Molten Core.
-SDCategory: Searing Gorge
-EndScriptData */
-
-/* ContentData
-npc_kalaran_windblade
-npc_lothos_riftwaker
-npc_zamael_lunthistle
-EndContentData */
-
-#include "ScriptPCH.h"
-
-/*######
-## npc_kalaran_windblade
-######*/
-
-#define GOSSIP_HELLO_KW "Tell me what drives this vengance?"
-#define GOSSIP_SELECT_KW1 "Continue please"
-#define GOSSIP_SELECT_KW2 "Let me confer with my colleagues"
-
-class npc_kalaran_windblade : public CreatureScript
-{
-public:
- npc_kalaran_windblade() : CreatureScript("npc_kalaran_windblade") { }
-
- 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_SELECT_KW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(1954, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KW2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(1955, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(3441);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(3441) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_KW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
-## npc_lothos_riftwaker
-######*/
-
-#define GOSSIP_HELLO_LR "Teleport me to the Molten Core"
-
-class npc_lothos_riftwaker : public CreatureScript
-{
-public:
- npc_lothos_riftwaker() : CreatureScript("npc_lothos_riftwaker") { }
-
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
- {
- player->CLOSE_GOSSIP_MENU();
- player->TeleportTo(409, 1096, -467, -104.6f, 3.64f);
- }
-
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestRewardStatus(7487) || player->GetQuestRewardStatus(7848))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_LR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
-## npc_zamael_lunthistle
-######*/
-
-#define GOSSIP_HELLO_ZL "Tell me your story"
-#define GOSSIP_SELECT_ZL1 "Please continue..."
-#define GOSSIP_SELECT_ZL2 "Goodbye"
-
-class npc_zamael_lunthistle : public CreatureScript
-{
-public:
- npc_zamael_lunthistle() : CreatureScript("npc_zamael_lunthistle") { }
-
- 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_SELECT_ZL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(1921, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_ZL2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(1922, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(3377);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(3377) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_ZL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(1920, creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
-##
-######*/
-
-void AddSC_searing_gorge()
-{
- new npc_kalaran_windblade();
- new npc_lothos_riftwaker();
- new npc_zamael_lunthistle();
-}
diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
index 6cbf28f171c..0d72ab6fb2f 100644
--- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
@@ -53,7 +53,7 @@ public:
if (quest->GetQuestId() == QUEST_590)
{
creature->setFaction(FACTION_HOSTILE);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
CAST_AI(npc_calvin_montague::npc_calvin_montagueAI, creature->AI())->AttackStart(player);
}
return true;
@@ -80,8 +80,8 @@ public:
me->RestoreFaction();
- if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void EnterCombat(Unit* /*who*/) {}
@@ -101,7 +101,7 @@ public:
uiDamage = 0;
me->RestoreFaction();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->CombatStop(true);
m_uiPhase = 1;
diff --git a/src/server/scripts/EasternKingdoms/westfall.cpp b/src/server/scripts/EasternKingdoms/westfall.cpp
index 34cc8559a71..271e1d99d63 100644
--- a/src/server/scripts/EasternKingdoms/westfall.cpp
+++ b/src/server/scripts/EasternKingdoms/westfall.cpp
@@ -110,7 +110,7 @@ public:
case 4:
SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE);
me->SetSheath(SHEATH_STATE_RANGED);
- me->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING_NO_SHEATHE);
break;
case 7:
me->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
@@ -141,7 +141,7 @@ public:
case 13:
SetEquipmentSlots(true);
me->SetSheath(SHEATH_STATE_UNARMED);
- me->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING_NO_SHEATHE);
break;
case 17:
player->GroupEventHappens(QUEST_TOME_VALOR, me);
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index b1a8f17d16a..71dbd7f4fb0 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -93,14 +93,14 @@ class spell_ex_5581 : public SpellScriptLoader
void HandleAfterCast()
{
sLog->outString("All immediate actions for the spell are finished now");
- // this is a safe for triggering additional effects for a spell without interfering
+ // this is a safe for triggering additional effects for a spell without interfering
// with visuals or with other effects of the spell
//GetCaster()->CastSpell(target, SPELL_TRIGGERED, true);
}
SpellCastResult CheckRequirement()
{
- // in this hook you can add additional requirements for spell caster (and throw a client error if reqs're not passed)
+ // in this hook you can add additional requirements for spell caster (and throw a client error if reqs're not passed)
// in this case we're disallowing to select non-player as a target of the spell
//if (!GetTargetUnit() || GetTargetUnit()->ToPlayer())
//return SPELL_FAILED_BAD_TARGETS;
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index 878116ad476..3bfaa448b85 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -165,14 +165,14 @@ public:
DoCast(target, SPELL_FROST_BOLT_VOLLEY);
}
frostBoltVolleyTimer = urand(5000, 8000);
- }
+ }
else frostBoltVolleyTimer -= diff;
-
+
if (frostNovaTimer <= diff)
{
DoCastAOE(SPELL_FROST_NOVA, false);
frostNovaTimer = urand(25000, 30000);
- }
+ }
else frostNovaTimer -= diff;
break;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 0caec3c7069..107c9e8f2f9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -947,7 +947,7 @@ void hyjalAI::HideNearPos(float x, float y)
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);
+ TypeContainerVisitor <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher);
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 6466780f024..c94cb874bfa 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -678,7 +678,7 @@ public:
}
if (i == LastOverronPos && IsOverrun)
{
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACKUNARMED);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK_UNARMED);
if ((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
{
me->setDeathState(DEAD);
@@ -1200,7 +1200,7 @@ public:
float x, y, z;
me->GetPosition(x, y, z);
- z = me->GetMap()->GetHeight(x, y, z);
+ z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetPosition(x, y, z, 0);
}
@@ -1319,7 +1319,7 @@ public:
{
float x, y, z;
me->GetPosition(x, y, z);
- z = me->GetMap()->GetHeight(x, y, z);
+ z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetPosition(x, y, z, 0);
hyjal_trashAI::JustDied(victim);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 6cdb794bf5e..9518abd1635 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -414,7 +414,7 @@ public:
if (Creature* temp = me->SummonCreature((uint32)RiftAndSpawnsLocations[i][0], RiftAndSpawnsLocations[timeRiftID][1], RiftAndSpawnsLocations[timeRiftID][2], RiftAndSpawnsLocations[timeRiftID][3], RiftAndSpawnsLocations[timeRiftID][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
{
guidVector[i-timeRiftID-1] = temp->GetGUID();
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
temp->SetReactState(REACT_PASSIVE);
temp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]);
if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_EPOCH)
@@ -1003,7 +1003,7 @@ public:
{
pDisguised2->UpdateEntry(NPC_INFINITE_HUNTER, 0);
//Make them unattackable
- pDisguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ pDisguised2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
pDisguised2->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
@@ -1013,7 +1013,7 @@ public:
{
pDisguised1->UpdateEntry(NPC_INFINITE_AGENT, 0);
//Make them unattackable
- pDisguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ pDisguised1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
pDisguised1->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
@@ -1023,7 +1023,7 @@ public:
{
pDisguised0->UpdateEntry(NPC_INFINITE_ADVERSARY, 0);
//Make them unattackable
- pDisguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ pDisguised0->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
pDisguised0->SetReactState(REACT_PASSIVE);
}
JumpToNextStep(2000);
@@ -1037,7 +1037,7 @@ public:
for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i)
if (Creature* temp = Unit::GetCreature(*me, uiInfiniteDraconianGUID[i]))
{
- temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
temp->SetReactState(REACT_AGGRESSIVE);
}
JumpToNextStep(5000);
@@ -1095,7 +1095,7 @@ public:
if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
{
//Make Epoch attackable
- pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pEpoch->SetReactState(REACT_AGGRESSIVE);
}
@@ -1150,7 +1150,7 @@ public:
case 87:
if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
{
- pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_UNK_6 | UNIT_FLAG_PASSIVE | UNIT_FLAG_UNK_15);
+ pMalganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNK_15);
pMalganis->SetReactState(REACT_AGGRESSIVE);
}
JumpToNextStep(1000);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index b2c4911a20c..aa57b3d9499 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -139,9 +139,9 @@ public:
#define SPEED_RUN (1.0f)
#define SPEED_MOUNT (1.6f)
-#define THRALL_WEAPON_MODEL 22106
+#define THRALL_WEAPON_ITEM 927
#define THRALL_WEAPON_INFO 218169346
-#define THRALL_SHIELD_MODEL 18662
+#define THRALL_SHIELD_ITEM 2129
#define THRALL_SHIELD_INFO 234948100
#define THRALL_MODEL_UNEQUIPPED 17292
#define THRALL_MODEL_EQUIPPED 18165
@@ -309,10 +309,10 @@ public:
break;
case 9:
DoScriptText(SAY_TH_ARMORY, me);
- me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_MODEL);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_ITEM);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781);
- me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, THRALL_SHIELD_MODEL);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, THRALL_SHIELD_ITEM);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, THRALL_SHIELD_INFO);
//me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038);
break;
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
index 74e7a919263..38d9ce31563 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
@@ -77,7 +77,7 @@ public:
if (target)
DoCast(target, SPELL_WRATH);
Wrath_Timer = 8000;
- }
+ }
else Wrath_Timer -= diff;
//EntanglingRoots
@@ -85,7 +85,7 @@ public:
{
DoCast(me->getVictim(), SPELL_ENTANGLINGROOTS);
EntanglingRoots_Timer = 20000;
- }
+ }
else EntanglingRoots_Timer -= diff;
//CorruptForces
@@ -94,7 +94,7 @@ public:
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_CORRUPT_FORCES);
CorruptForces_Timer = 20000;
- }
+ }
else CorruptForces_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
index 418bf3a09ce..ea419793ae8 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
@@ -71,7 +71,7 @@ public:
{
DoCast(me->getVictim(), SPELL_KNOCKAWAY);
KnockAway_Timer = 15000;
- }
+ }
else KnockAway_Timer -= diff;
//Trample_Timer
@@ -79,7 +79,7 @@ public:
{
DoCast(me, SPELL_TRAMPLE);
Trample_Timer = 8000;
- }
+ }
else Trample_Timer -= diff;
//Landslide
@@ -90,7 +90,7 @@ public:
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_LANDSLIDE);
Landslide_Timer = 60000;
- }
+ }
else Landslide_Timer -= diff;
}
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
index 0e3ee5dc52b..18ce7be0f0a 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
@@ -80,7 +80,7 @@ public:
me->SetDisplayId(11172);
Invisible = false;
//me->m_canMove = true;
- }
+ }
else if (Invisible)
{
Invisible_Timer -= diff;
@@ -97,7 +97,7 @@ public:
{
DoCast(me->getVictim(), SPELL_TOXICVOLLEY);
ToxicVolley_Timer = 9000;
- }
+ }
else ToxicVolley_Timer -= diff;
//Uppercut_Timer
@@ -105,7 +105,7 @@ public:
{
DoCast(me->getVictim(), SPELL_UPPERCUT);
Uppercut_Timer = 12000;
- }
+ }
else Uppercut_Timer -= diff;
//Adds_Timer
@@ -127,7 +127,7 @@ public:
Invisible_Timer = 15000;
Adds_Timer = 40000;
- }
+ }
else Adds_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
index bade5655f36..039d30071d2 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
@@ -77,7 +77,7 @@ public:
{
DoCast(me, SPELL_DUSTFIELD);
Dustfield_Timer = 14000;
- }
+ }
else Dustfield_Timer -= diff;
//Boulder_Timer
@@ -88,7 +88,7 @@ public:
if (target)
DoCast(target, SPELL_BOULDER);
Boulder_Timer = 10000;
- }
+ }
else Boulder_Timer -= diff;
//RepulsiveGaze_Timer
@@ -96,7 +96,7 @@ public:
{
DoCast(me->getVictim(), SPELL_REPULSIVEGAZE);
RepulsiveGaze_Timer = 20000;
- }
+ }
else RepulsiveGaze_Timer -= diff;
//Thrash_Timer
@@ -104,7 +104,7 @@ public:
{
DoCast(me, SPELL_THRASH);
Thrash_Timer = 18000;
- }
+ }
else Thrash_Timer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index d56608ba7f1..7f3c19ac69c 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -38,7 +38,7 @@ EndScriptData */
#define SPELL_ARCANE_EXPLOSION 25679
#define SPELL_EARTH_SHOCK 26194
-#define SPELL_TRUE_FULFILLMENT4 26526
+#define SPELL_TRUE_FULFILLMENT 785
#define SPELL_BLINK 28391
class ov_mycoordinates
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index 1155d353371..8eb3d20d528 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -98,7 +98,7 @@ public:
DoScriptText(SAY_MAKE_PREPARATIONS, creature);
creature->setFaction(250);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
CAST_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->SetDespawnAtFar(false);
@@ -143,7 +143,7 @@ public:
currentEvent = 0;
eventProgress = 0;
me->setActive(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
uint32 eventTimer;
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index dd90eaa0e7f..61fe526407c 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -44,8 +44,8 @@ enum blyAndCrewFactions
enum blySays
{
- SAY_1 = -1209002,
- SAY_2 = -1209003
+ SAY_1 = 0,
+ SAY_2 = 1
};
enum blySpells
@@ -133,11 +133,11 @@ public:
//weegli doesn't fight - he goes & blows up the door
if (Creature* pWeegli = instance->instance->GetCreature(instance->GetData64(ENTRY_WEEGLI)))
pWeegli->AI()->DoAction(0);
- DoScriptText(SAY_1, me);
+ Talk(SAY_1);
Text_Timer = 5000;
break;
case 2:
- DoScriptText(SAY_2, me);
+ Talk(SAY_2);
Text_Timer = 5000;
break;
case 3:
diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp
index 421a1d7b38a..49a9be21a98 100644
--- a/src/server/scripts/Kalimdor/desolace.cpp
+++ b/src/server/scripts/Kalimdor/desolace.cpp
@@ -175,7 +175,7 @@ public:
## Hand of Iruxos
######*/
-enum
+enum
{
QUEST_HAND_IRUXOS = 5381,
NPC_DEMON_SPIRIT = 11876,
diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp
index 8cf72b3538d..6c91c64f981 100644
--- a/src/server/scripts/Kalimdor/durotar.cpp
+++ b/src/server/scripts/Kalimdor/durotar.cpp
@@ -84,7 +84,7 @@ public:
void UpdateAI(const uint32 uiDiff)
{
if (work == true)
- me->HandleEmoteCommand(466);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_WORK_CHOPWOOD);
if (m_uiRebuffTimer <= uiDiff)
{
DoCast(me, SPELL_BUFF_SLEEP);
diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
index 0ead5d95447..eede1aa069a 100644
--- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
@@ -176,7 +176,7 @@ public:
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
creature->SetSpeed(MOVE_RUN, creature->GetSpeedRate(MOVE_RUN), true);
creature->setFaction(35);
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NON_ATTACKABLE);
+ creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE);
creature->SetReactState(REACT_PASSIVE);
creature->GetMotionMaster()->MovePoint(1, DeserterDisappearPos);
break;
@@ -198,7 +198,7 @@ public:
void Reset()
{
me->RestoreFaction();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_AGGRESSIVE);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
@@ -531,7 +531,7 @@ public:
return;
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
SetCombatMovement(true);
if (me->isInCombat())
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index f9e4bce34d0..2d6e34ab9ee 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -602,7 +602,7 @@ public:
{
npc_omenAI(Creature* creature) : ScriptedAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->GetMotionMaster()->MovePoint(1, 7549.977f, -2855.137f, 456.9678f);
}
@@ -616,7 +616,7 @@ public:
if (pointId == 1)
{
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
if (Player* player = me->SelectNearestPlayer(40.0f))
AttackStart(player);
}
diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp
index 01cca58359e..c689d6954a4 100644
--- a/src/server/scripts/Kalimdor/mulgore.cpp
+++ b/src/server/scripts/Kalimdor/mulgore.cpp
@@ -171,7 +171,7 @@ public:
break;
case 2:
DoScriptText(EMOTE_EAT_LUNCH, me);
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
break;
case 3:
if (Player* unit = Unit::GetPlayer(*me, uiPlayerGUID))
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index e6322591bf3..fac56021c3a 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -1425,7 +1425,7 @@ class go_wind_stone : public GameObjectScript
break;
}
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(gossipId), go->GetGUID());
+ player->SEND_GOSSIP_MENU(player->GetGossipTextId(gossipId, go), go->GetGUID());
return true;
}
diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
index 3dd0d1cbf02..c31a7731865 100644
--- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
@@ -154,7 +154,7 @@ public:
DoScriptText(SAY_START, creature);
creature->setFaction(113);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
return true;
}
diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp
index 394a32e5cb6..ff6cdccb66a 100644
--- a/src/server/scripts/Kalimdor/tanaris.cpp
+++ b/src/server/scripts/Kalimdor/tanaris.cpp
@@ -410,7 +410,7 @@ public:
creature->setFaction(113);
creature->SetFullHealth();
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
DoScriptText(SAY_OOX_START, creature);
if (npc_escortAI* pEscortAI = CAST_AI(npc_OOX17::npc_OOX17AI, creature->AI()))
diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp
index 6f2ddb1febb..e12897c1def 100644
--- a/src/server/scripts/Kalimdor/the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/the_barrens.cpp
@@ -512,7 +512,7 @@ public:
//creature->GetMotionMaster()->MovePoint(0, -1693, -4343, 4.32f);
//creature->GetMotionMaster()->MovePoint(1, -1684, -4333, 2.78f);
creature->GetMotionMaster()->MovePoint(2, -1682, -4329, 2.79f);
- creature->HandleEmoteCommand(EMOTE_STATE_READYUNARMED);
+ creature->HandleEmoteCommand(EMOTE_STATE_READY_UNARMED);
EventBigWill = true;
Wave_Timer = 1000;
}
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 4e1b9da0adb..2789bc48a4c 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -402,7 +402,8 @@ public:
if (!CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerok)
CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerokFail = true;
- boss->AI()->DoAction(ACTION_INITIAND_KILLED);
+ if (Killer->GetTypeId() == TYPEID_PLAYER)
+ boss->AI()->DoAction(ACTION_INITIAND_KILLED);
}
instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0);
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 1e3a9a7a177..0f4b046f7d5 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -82,7 +82,7 @@ public:
boss_taldaramAI(Creature* c) : ScriptedAI(c)
{
instance = c->GetInstanceScript();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
@@ -314,7 +314,7 @@ public:
{
if (!instance)
return;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL);
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index d01e2663b12..3e9d8144c19 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -427,6 +427,7 @@ public:
bCanUseWill = true;
if (!pFetchTene->isInCombat())
{
+ DoCast(me, SPELL_POWER_OF_TENEBRON);
AddDrakeLootMode();
++drakeCount;
}
@@ -441,6 +442,7 @@ public:
bCanUseWill = true;
if (!pFetchShad->isInCombat())
{
+ DoCast(me, SPELL_POWER_OF_SHADRON);
AddDrakeLootMode();
++drakeCount;
}
@@ -455,6 +457,7 @@ public:
bCanUseWill = true;
if (!pFetchVesp->isInCombat())
{
+ DoCast(me, SPELL_POWER_OF_VESPERON);
AddDrakeLootMode();
++drakeCount;
}
@@ -1017,7 +1020,6 @@ public:
{
DoScriptText(SAY_TENEBRON_AGGRO, me);
DoZoneInCombat();
- DoCast(me, SPELL_POWER_OF_TENEBRON);
}
void KilledUnit(Unit* /*victim*/)
@@ -1113,7 +1115,6 @@ public:
{
DoScriptText(SAY_SHADRON_AGGRO, me);
DoZoneInCombat();
- DoCast(me, SPELL_POWER_OF_SHADRON);
}
void KilledUnit(Unit* /*victim*/)
@@ -1212,7 +1213,6 @@ public:
{
DoScriptText(SAY_VESPERON_AGGRO, me);
DoZoneInCombat();
- DoCast(me, SPELL_POWER_OF_VESPERON);
}
void KilledUnit(Unit* /*victim*/)
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp
index 851a56009f6..f41522f844d 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp
@@ -97,7 +97,7 @@ class boss_general_zarithrian : public CreatureScript
{
_Reset();
if (instance->GetBossState(DATA_SAVIANA_RAGEFIRE) == DONE && instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) == DONE)
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void EnterCombat(Unit* /*who*/)
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
index 0fb51df7ed9..f9e302d7634 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp
@@ -189,7 +189,7 @@ class instance_ruby_sanctum : public InstanceMapScript
{
HandleGameObject(FlameWallsGUID, true);
if (Creature* zarithrian = instance->GetCreature(GeneralZarithrianGUID))
- zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
}
break;
}
@@ -199,7 +199,7 @@ class instance_ruby_sanctum : public InstanceMapScript
{
HandleGameObject(FlameWallsGUID, true);
if (Creature* zarithrian = instance->GetCreature(GeneralZarithrianGUID))
- zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ zarithrian->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
}
break;
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
index d5695a0f39d..19ed96e8885 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -62,7 +62,7 @@ class OrientationCheck : public std::unary_function<Unit*, bool>
explicit OrientationCheck(Unit* _caster) : caster(_caster) { }
bool operator() (Unit* unit)
{
- return !unit->isInFront(caster, 40.0f, 2.5f);
+ return !unit->isInFront(caster, 2.5f) || !unit->IsWithinDist(caster, 40.0f);
}
private:
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
index ebdc55c51b7..9fcfcfa47e5 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
@@ -107,7 +107,7 @@ void AggroAllPlayers(Creature* temp)
if (player->isAlive())
{
- temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
temp->SetReactState(REACT_AGGRESSIVE);
temp->SetInCombatWith(player);
player->SetInCombatWith(temp);
@@ -320,7 +320,7 @@ public:
me->SetReactState(REACT_PASSIVE);
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
InstanceScript* instance;
@@ -453,7 +453,7 @@ public:
me->SetReactState(REACT_PASSIVE);
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
InstanceScript* instance;
@@ -592,7 +592,7 @@ public:
me->SetReactState(REACT_PASSIVE);
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
InstanceScript* instance;
@@ -739,7 +739,7 @@ public:
me->SetReactState(REACT_PASSIVE);
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
InstanceScript* instance;
@@ -895,7 +895,7 @@ public:
me->SetReactState(REACT_PASSIVE);
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
InstanceScript* instance;
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 d3d92375d39..a9e41d90899 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -535,7 +535,7 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_EFFECT);
DoCast(me, SPELL_EMERGE_EFFECT);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->CombatStart(me->SelectNearestTarget());
}
else
@@ -543,7 +543,7 @@ public:
if (!me->HasAura(SPELL_PERMAFROST_HELPER))
{
DoCast(me, SPELL_SUBMERGE_EFFECT);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->CombatStop();
}
}
@@ -647,7 +647,7 @@ public:
void Reset()
{
// For an unknown reason this npc isn't recognize the Aura of Permafrost with this flags =/
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
m_uiTargetGUID = 0;
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 45fdbdd5616..2fe0bd3f397 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -172,7 +172,7 @@ public:
{
Summons.Summon(temp);
temp->SetReactState(REACT_PASSIVE);
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
if (playerTeam == ALLIANCE)
{
temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0);
@@ -203,7 +203,7 @@ public:
if (Creature* temp = Unit::GetCreature(*me, *i))
{
temp->SetReactState(REACT_AGGRESSIVE);
- temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
}
}
break;
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 fc01ad2efea..6cd049967c1 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -68,7 +68,6 @@ enum BossSpells
{
SPELL_LEGION_FLAME = 66197, // player should run away from raid because he triggers Legion Flame
SPELL_LEGION_FLAME_EFFECT = 66201, // used by trigger npc
- SPELL_TOUCH_OF_JARAXXUS = 66209, // used only in 25H
SPELL_NETHER_POWER = 66228, // +20% of spell damage per stack, stackable up to 5/10 times, must be dispelled/stealed
SPELL_FEL_LIGHTING = 66528, // jumps to nearby targets
SPELL_FEL_FIREBALL = 66532, // does heavy damage to the tank, interruptable
@@ -120,7 +119,6 @@ public:
uint32 m_uiIncinerateFleshTimer;
uint32 m_uiNetherPowerTimer;
uint32 m_uiLegionFlameTimer;
- uint32 m_uiTouchOfJaraxxusTimer;
uint32 m_uiSummonNetherPortalTimer;
uint32 m_uiSummonInfernalEruptionTimer;
@@ -134,7 +132,6 @@ public:
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
- m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
m_uiSummonNetherPortalTimer = 1*MINUTE*IN_MILLISECONDS;
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
Summons.DespawnAll();
@@ -240,13 +237,6 @@ public:
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
} else m_uiLegionFlameTimer -= uiDiff;
- if (GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC && m_uiTouchOfJaraxxusTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_TOUCH_OF_JARAXXUS);
- m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiTouchOfJaraxxusTimer -= uiDiff;
-
DoMeleeAttackIfReady();
}
};
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index 029a7c3c351..1eca7edb590 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -155,15 +155,16 @@ public:
ScriptedAI::EnterEvadeMode();
}
- void MovementInform(uint32 uiType, uint32 uiId)
+ void MovementInform(uint32 type, uint32 pointId)
{
- if (uiType != POINT_MOTION_TYPE) return;
+ if (type != POINT_MOTION_TYPE)
+ return;
- switch (uiId)
+ switch (pointId)
{
case 0:
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
me->SetInCombatWithZone();
break;
@@ -215,24 +216,24 @@ public:
Summons.Despawn(summon);
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
- if (m_uiImpaleTimer <= uiDiff)
+ if (m_uiImpaleTimer <= diff)
{
DoCastVictim(SPELL_IMPALE);
m_uiImpaleTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS);
- } else m_uiImpaleTimer -= uiDiff;
+ } else m_uiImpaleTimer -= diff;
- if (m_uiStaggeringStompTimer <= uiDiff)
+ if (m_uiStaggeringStompTimer <= diff)
{
DoCastVictim(SPELL_STAGGERING_STOMP);
m_uiStaggeringStompTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
- } else m_uiStaggeringStompTimer -= uiDiff;
+ } else m_uiStaggeringStompTimer -= diff;
- if (m_uiSummonTimer <= uiDiff)
+ if (m_uiSummonTimer <= diff)
{
if (m_uiSummonCount > 0)
{
@@ -240,7 +241,7 @@ public:
DoScriptText(SAY_SNOBOLLED, me);
}
m_uiSummonTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiSummonTimer -= uiDiff;
+ } else m_uiSummonTimer -= diff;
DoMeleeAttackIfReady();
}
@@ -286,7 +287,7 @@ public:
if (m_instance)
m_uiBossGUID = m_instance->GetData64(NPC_GORMOK);
//Workaround for Snobold
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
}
void EnterEvadeMode()
@@ -308,11 +309,12 @@ public:
uiDamage = 0;
}
- void MovementInform(uint32 uiType, uint32 uiId)
+ void MovementInform(uint32 type, uint32 pointId)
{
- if (uiType != POINT_MOTION_TYPE) return;
+ if (type != POINT_MOTION_TYPE)
+ return;
- switch (uiId)
+ switch (pointId)
{
case 0:
if (m_bTargetDied)
@@ -330,7 +332,7 @@ public:
m_instance->SetData(DATA_SNOBOLD_COUNT, DECREASE);
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(uint32 const diff)
{
if (m_bTargetDied || !UpdateVictim())
return;
@@ -357,29 +359,29 @@ public:
}
}
- if (m_uiFireBombTimer < uiDiff)
+ if (m_uiFireBombTimer < diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_FIRE_BOMB);
m_uiFireBombTimer = 20000;
}
- else m_uiFireBombTimer -= uiDiff;
+ else m_uiFireBombTimer -= diff;
- if (m_uiBatterTimer < uiDiff)
+ if (m_uiBatterTimer < diff)
{
if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
DoCast(target, SPELL_BATTER);
m_uiBatterTimer = 10000;
}
- else m_uiBatterTimer -= uiDiff;
+ else m_uiBatterTimer -= diff;
- if (m_uiHeadCrackTimer < uiDiff)
+ if (m_uiHeadCrackTimer < diff)
{
if (Unit* target = Unit::GetPlayer(*me, m_uiTargetGUID))
DoCast(target, SPELL_HEAD_CRACK);
m_uiHeadCrackTimer = 35000;
}
- else m_uiHeadCrackTimer -= uiDiff;
+ else m_uiHeadCrackTimer -= diff;
DoMeleeAttackIfReady();
}
@@ -450,7 +452,7 @@ struct boss_jormungarAI : public ScriptedAI
instanceScript->SetData(TYPE_NORTHREND_BEASTS, SNAKES_IN_PROGRESS);
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(uint32 const diff)
{
if (!UpdateVictim()) return;
@@ -458,7 +460,7 @@ struct boss_jormungarAI : public ScriptedAI
{
DoScriptText(SAY_EMERGE, me);
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoCast(SPELL_ENRAGE);
enraged = true;
DoScriptText(SAY_BERSERK, me);
@@ -478,98 +480,98 @@ struct boss_jormungarAI : public ScriptedAI
switch (stage)
{
case 0: // Mobile
- if (biteTimer <= uiDiff)
+ if (biteTimer <= diff)
{
DoCastVictim(biteSpell);
biteTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else biteTimer -= uiDiff;
+ } else biteTimer -= diff;
- if (spewTimer <= uiDiff)
+ if (spewTimer <= diff)
{
DoCastAOE(spewSpell);
spewTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else spewTimer -= uiDiff;
+ } else spewTimer -= diff;
- if (slimePoolTimer <= uiDiff)
+ if (slimePoolTimer <= diff)
{
/* Spell summon has only 30s duration */
DoCast(me, SUMMON_SLIME_POOL);
slimePoolTimer = 30*IN_MILLISECONDS;
- } else slimePoolTimer -= uiDiff;
+ } else slimePoolTimer -= diff;
- if (submergeTimer <= uiDiff && !enraged)
+ if (submergeTimer <= diff && !enraged)
{
stage = 1;
submergeTimer = 5*IN_MILLISECONDS;
- } else submergeTimer -= uiDiff;
+ } else submergeTimer -= diff;
DoMeleeAttackIfReady();
break;
case 1: // Submerge
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_SUBMERGE_0);
DoScriptText(SAY_SUBMERGE, me);
- me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionY()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionZ());
+ me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+ frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ());
stage = 2;
case 2: // Wait til emerge
- if (submergeTimer <= uiDiff)
+ if (submergeTimer <= diff)
{
stage = 3;
submergeTimer = 50*IN_MILLISECONDS;
- } else submergeTimer -= uiDiff;
+ } else submergeTimer -= diff;
break;
case 3: // Emerge
me->SetDisplayId(modelStationary);
DoScriptText(SAY_EMERGE, me);
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
DoCast(me, SPELL_EMERGE_0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
SetCombatMovement(false);
me->GetMotionMaster()->MoveIdle();
stage = 4;
break;
case 4: // Stationary
- if (sprayTimer <= uiDiff)
+ if (sprayTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, spraySpell);
sprayTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else sprayTimer -= uiDiff;
+ } else sprayTimer -= diff;
- if (sweepTimer <= uiDiff)
+ if (sweepTimer <= diff)
{
DoCastAOE(SPELL_SWEEP_0);
sweepTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else sweepTimer -= uiDiff;
+ } else sweepTimer -= diff;
- if (submergeTimer <= uiDiff)
+ if (submergeTimer <= diff)
{
stage = 5;
submergeTimer = 10*IN_MILLISECONDS;
- } else submergeTimer -= uiDiff;
+ } else submergeTimer -= diff;
DoSpellAttackIfReady(spitSpell);
break;
case 5: // Submerge
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_SUBMERGE_0);
DoScriptText(SAY_SUBMERGE, me);
- me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionY()+urand(0, 80)-40, ToCCommonLoc[1].GetPositionZ());
+ me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ());
stage = 6;
case 6: // Wait til emerge
- if (submergeTimer <= uiDiff)
+ if (submergeTimer <= diff)
{
stage = 7;
submergeTimer = 45*IN_MILLISECONDS;
- } else submergeTimer -= uiDiff;
+ } else submergeTimer -= diff;
break;
case 7: // Emerge
me->SetDisplayId(modelMobile);
DoScriptText(SAY_EMERGE, me);
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0);
DoCast(me, SPELL_EMERGE_0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
SetCombatMovement(true);
me->GetMotionMaster()->MoveChase(me->getVictim());
@@ -662,20 +664,21 @@ public:
stage = 0;
}
- void MovementInform(uint32 uiType, uint32 uiId)
+ void MovementInform(uint32 type, uint32 pointId)
{
- if (uiType != POINT_MOTION_TYPE) return;
+ if (type != POINT_MOTION_TYPE)
+ return;
- switch (uiId)
+ switch (pointId)
{
case 0:
instanceScript->DoUseDoorOrButton(instanceScript->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
me->SetInCombatWithZone();
if (Creature* otherWorm = Unit::GetCreature(*me, instanceScript->GetData64(otherWormEntry)))
{
- otherWorm->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ otherWorm->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
otherWorm->SetReactState(REACT_AGGRESSIVE);
otherWorm->SetVisible(true);
otherWorm->SetInCombatWithZone();
@@ -728,7 +731,7 @@ public:
me->SetReactState(REACT_PASSIVE);
}
- void UpdateAI(const uint32 /*uiDiff*/)
+ void UpdateAI(uint32 const /*diff*/)
{
if (!casted)
{
@@ -795,11 +798,12 @@ public:
m_instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
}
- void MovementInform(uint32 uiType, uint32 uiId)
+ void MovementInform(uint32 type, uint32 pointId)
{
- if (uiType != POINT_MOTION_TYPE) return;
+ if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
+ return;
- switch (uiId)
+ switch (pointId)
{
case 0:
if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()) < 6.0f)
@@ -813,7 +817,9 @@ public:
if (Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
{
m_uiStage = 4;
- } else m_uiStage = 6;
+ }
+ else
+ m_uiStage = 6;
}
break;
case 1: // Finish trample
@@ -821,7 +827,7 @@ public:
break;
case 2:
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
me->SetInCombatWithZone();
break;
@@ -860,7 +866,7 @@ public:
me->SetInCombatWithZone();
}
- void SpellHitTarget(Unit* target, const SpellInfo* spell)
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
{
if (spell->Id == SPELL_TRAMPLE && target->GetTypeId() == TYPEID_PLAYER)
{
@@ -872,7 +878,7 @@ public:
}
}
- void UpdateAI(const uint32 uiDiff)
+ void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
@@ -880,31 +886,31 @@ public:
switch (m_uiStage)
{
case 0:
- if (m_uiFerociousButtTimer <= uiDiff)
+ if (m_uiFerociousButtTimer <= diff)
{
DoCastVictim(SPELL_FEROCIOUS_BUTT);
m_uiFerociousButtTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiFerociousButtTimer -= uiDiff;
+ } else m_uiFerociousButtTimer -= diff;
- if (m_uiArticBreathTimer <= uiDiff)
+ if (m_uiArticBreathTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_ARCTIC_BREATH);
m_uiArticBreathTimer = urand(25*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else m_uiArticBreathTimer -= uiDiff;
+ } else m_uiArticBreathTimer -= diff;
- if (m_uiWhirlTimer <= uiDiff)
+ if (m_uiWhirlTimer <= diff)
{
DoCastAOE(SPELL_WHIRL);
m_uiWhirlTimer = urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS);
- } else m_uiWhirlTimer -= uiDiff;
+ } else m_uiWhirlTimer -= diff;
- if (m_uiMassiveCrashTimer <= uiDiff)
+ if (m_uiMassiveCrashTimer <= diff)
{
me->GetMotionMaster()->MoveJump(ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 10.0f, 20.0f); // 1: Middle of the room
m_uiStage = 7; //Invalid (Do nothing more than move)
m_uiMassiveCrashTimer = 30*IN_MILLISECONDS;
- } else m_uiMassiveCrashTimer -= uiDiff;
+ } else m_uiMassiveCrashTimer -= diff;
DoMeleeAttackIfReady();
break;
@@ -927,7 +933,7 @@ public:
} else m_uiStage = 6;
break;
case 3:
- if (m_uiTrampleTimer <= uiDiff)
+ if (m_uiTrampleTimer <= diff)
{
if (Unit* target = Unit::GetPlayer(*me, m_uiTrampleTargetGUID))
{
@@ -942,7 +948,7 @@ public:
10.0f, 20.0f); // 2: Hop Backwards
m_uiStage = 7; //Invalid (Do nothing more than move)
} else m_uiStage = 6;
- } else m_uiTrampleTimer -= uiDiff;
+ } else m_uiTrampleTimer -= diff;
break;
case 4:
DoScriptText(SAY_TRAMPLE_START, me);
@@ -953,12 +959,12 @@ public:
case 5:
if (m_bMovementFinish)
{
- if (m_uiTrampleTimer <= uiDiff) DoCastAOE(SPELL_TRAMPLE);
+ if (m_uiTrampleTimer <= diff) DoCastAOE(SPELL_TRAMPLE);
m_bMovementFinish = false;
m_uiStage = 6;
return;
}
- if (m_uiTrampleTimer <= uiDiff)
+ if (m_uiTrampleTimer <= diff)
{
Map::PlayerList const &lPlayers = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
@@ -971,7 +977,7 @@ public:
break;
}
}
- } else m_uiTrampleTimer -= uiDiff;
+ } else m_uiTrampleTimer -= diff;
break;
case 6:
if (!m_bTrampleCasted)
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index 960b685f700..242b2f2f0ea 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -172,7 +172,7 @@ struct boss_twin_baseAI : public ScriptedAI
uint32 m_uiTouchSpellId;
void Reset() {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
me->ModifyAuraState(m_uiAuraState, true);
/* Uncomment this once that they are flying above the ground
@@ -205,7 +205,7 @@ struct boss_twin_baseAI : public ScriptedAI
{
case 1:
m_instance->DoUseDoorOrButton(m_instance->GetData64(GO_MAIN_GATE_DOOR));
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
break;
}
@@ -308,7 +308,7 @@ struct boss_twin_baseAI : public ScriptedAI
void EnableDualWield(bool mode = true)
{
- SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : EQUIP_UNEQUIP, EQUIP_UNEQUIP);
+ SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
me->SetCanDualWield(mode);
me->UpdateDamagePhysical(mode ? OFF_ATTACK : BASE_ATTACK);
}
@@ -562,17 +562,19 @@ struct mob_unleashed_ballAI : public ScriptedAI
{
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
float y = y0;
- float x = float(urand(uint32(x0 - r), uint32(x0 + r)));
+ float x = frand(x0 - r, x0 + r);
+ float sq = pow(r, 2) - pow(x - x0, 2);
+ float rt = sqrtf(fabs(sq));
if (urand(0, 1))
- y = y0 + sqrt(pow(r, 2) - pow((x-x0), 2));
+ y = y0 + rt;
else
- y = y0 - sqrt(pow(r, 2) - pow((x-x0), 2));
+ y = y0 - rt;
me->GetMotionMaster()->MovePoint(0, x, y, me->GetPositionZ());
}
void Reset()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->SetFlying(true);
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index 7412d75c97b..3831e4824ad 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -429,7 +429,7 @@ class npc_fizzlebang_toc : public CreatureScript
case 1130:
me->GetMotionMaster()->MovementExpired();
DoScriptText(SAY_STAGE_1_03, me);
- me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI);
if (Unit* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN))
{
m_uiTriggerGUID = pTrigger->GetGUID();
@@ -446,7 +446,7 @@ class npc_fizzlebang_toc : public CreatureScript
m_uiUpdateTimer = 4000;
break;
case 1134:
- me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI);
if (Creature* pPortal = me->SummonCreature(NPC_WILFRED_PORTAL, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.71239f, TEMPSUMMON_MANUAL_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -563,7 +563,7 @@ class npc_tirion_toc : public CreatureScript
if (Creature* temp = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS))
{
temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
temp->SetReactState(REACT_PASSIVE);
}
}
@@ -591,13 +591,13 @@ class npc_tirion_toc : public CreatureScript
if (Creature* temp = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
{
temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ());
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
temp->SetReactState(REACT_PASSIVE);
}
if (Creature* temp = me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN))
{
temp->SetVisible(true);
- temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
temp->SetReactState(REACT_PASSIVE);
}
}
@@ -623,7 +623,7 @@ class npc_tirion_toc : public CreatureScript
if (Creature* temp = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN))
{
temp->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ());
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
}
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index 54e234a6d87..5418cf8c4d0 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -100,8 +100,8 @@ public:
lSummons.DespawnAll();
crystalHandlerAmount = 0;
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
@@ -136,7 +136,7 @@ public:
}
instance->SetData(DATA_NOVOS_EVENT, IN_PROGRESS);
}
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -227,7 +227,7 @@ public:
if (luiCrystals.empty())
{
me->CastStop();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Phase = PHASE_2;
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 0f9495d4928..64609efd7ff 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -27,7 +27,7 @@ enum Yells
SAY_PHASE2 = -1658005,
SAY_PHASE3 = -1658006,
- SAY_TYRANNUS_DEATH = -1659007,
+ SAY_TYRANNUS_DEATH = -1658007,
};
enum Spells
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
index 25cd292d390..a91951ca25e 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
@@ -289,7 +289,7 @@ class spell_trash_mob_glacial_strike : public SpellScriptLoader
{
if (GetTarget()->IsFullHealth())
{
- GetTarget()->RemoveAura(GetId(), AURA_REMOVE_BY_ENEMY_SPELL);
+ GetTarget()->RemoveAura(GetId(), 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
PreventDefaultAction();
}
}
diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
index 11614708d99..b66c3d795f3 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
@@ -97,7 +97,7 @@ class boss_drakkari_colossus : public CreatureScript
if (GetData(DATA_INTRO_DONE))
{
me->SetReactState(REACT_AGGRESSIVE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveAura(SPELL_FREEZE_ANIM);
}
@@ -149,7 +149,7 @@ class boss_drakkari_colossus : public CreatureScript
me->GetMotionMaster()->MoveIdle();
me->SetReactState(REACT_PASSIVE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
DoCast(me, SPELL_FREEZE_ANIM);
break;
case ACTION_UNFREEZE_COLOSSUS:
@@ -158,7 +158,7 @@ class boss_drakkari_colossus : public CreatureScript
return;
me->SetReactState(REACT_AGGRESSIVE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveAura(SPELL_FREEZE_ANIM);
me->SetInCombatWithZone();
@@ -172,7 +172,7 @@ class boss_drakkari_colossus : public CreatureScript
void DamageTaken(Unit* /*attacker*/, uint32& damage)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
damage = 0;
if (phase == COLOSSUS_PHASE_NORMAL ||
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 ca86e4cef60..70b07c61e79 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -383,7 +383,7 @@ class boss_prince_keleseth_icc : public CreatureScript
events.Reset();
summons.DespawnAll();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
_isEmpowered = false;
me->SetHealth(_spawnHealth);
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
@@ -489,7 +489,7 @@ class boss_prince_keleseth_icc : public CreatureScript
{
case ACTION_STAND_UP:
me->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
@@ -607,7 +607,7 @@ class boss_prince_taldaram_icc : public CreatureScript
events.Reset();
summons.DespawnAll();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
_isEmpowered = false;
me->SetHealth(_spawnHealth);
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
@@ -707,7 +707,7 @@ class boss_prince_taldaram_icc : public CreatureScript
{
case ACTION_STAND_UP:
me->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
@@ -830,7 +830,7 @@ class boss_prince_valanar_icc : public CreatureScript
events.Reset();
summons.DespawnAll();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
_isEmpowered = false;
me->SetHealth(me->GetMaxHealth());
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
@@ -892,7 +892,7 @@ class boss_prince_valanar_icc : public CreatureScript
{
float x, y, z;
summon->GetPosition(x, y, z);
- float ground_Z = summon->GetMap()->GetHeight(x, y, z, true, 500.0f);
+ float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
break;
}
@@ -944,7 +944,7 @@ class boss_prince_valanar_icc : public CreatureScript
{
case ACTION_STAND_UP:
me->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
me->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
@@ -1238,7 +1238,7 @@ class npc_kinetic_bomb : public CreatureScript
me->SetReactState(REACT_PASSIVE);
me->SetSpeed(MOVE_FLIGHT, IsHeroic() ? 0.3f : 0.15f, true);
me->GetPosition(_x, _y, _groundZ);
- _groundZ = me->GetMap()->GetHeight(_x, _y, _groundZ, true, 500.0f);
+ _groundZ = me->GetMap()->GetHeight(me->GetPhaseMask(), _x, _y, _groundZ, true, 500.0f);
}
void DoAction(int32 const action)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index ace5f07a2f8..3c795187f43 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -279,7 +279,7 @@ class boss_deathbringer_saurfang : public CreatureScript
events.Reset();
events.SetPhase(PHASE_COMBAT);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
if (!_introDone)
{
DoCast(me, SPELL_GRIP_OF_AGONY);
@@ -314,7 +314,7 @@ class boss_deathbringer_saurfang : public CreatureScript
void AttackStart(Unit* victim)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
return;
ScriptedAI::AttackStart(victim);
@@ -324,7 +324,7 @@ class boss_deathbringer_saurfang : public CreatureScript
{
ScriptedAI::EnterEvadeMode();
if (_introDone)
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void JustReachedHome()
@@ -434,7 +434,7 @@ class boss_deathbringer_saurfang : public CreatureScript
case EVENT_INTRO_FINISH:
events.SetPhase(PHASE_COMBAT);
_introDone = true;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case EVENT_SUMMON_BLOOD_BEAST:
for (uint32 i10 = 0; i10 < 2; ++i10)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
index c05422cbbf6..1672d8b2d87 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
@@ -106,6 +106,7 @@ class boss_lord_marrowgar : public CreatureScript
events.ScheduleEvent(EVENT_COLDFLAME, 5000, EVENT_GROUP_SPECIAL);
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(45000, 50000));
events.ScheduleEvent(EVENT_ENRAGE, 600000);
+ _boneSlice = false;
}
void EnterCombat(Unit* /*who*/)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index a4c814e5789..8623fcfde81 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -196,7 +196,7 @@ class boss_professor_putricide : public CreatureScript
me->GetMotionMaster()->MovementExpired();
if (instance->GetBossState(DATA_ROTFACE) == DONE && instance->GetBossState(DATA_FESTERGUT) == DONE)
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
}
void EnterCombat(Unit* who)
@@ -948,7 +948,7 @@ class spell_putricide_ooze_summon : public SpellScriptLoader
uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
float x, y, z;
GetTarget()->GetPosition(x, y, z);
- z = GetTarget()->GetMap()->GetHeight(x, y, z, true, 25.0f);
+ z = GetTarget()->GetMap()->GetHeight(GetTarget()->GetPhaseMask(), x, y, z, true, 25.0f);
x += 10.0f * cosf(caster->GetOrientation());
y += 10.0f * sinf(caster->GetOrientation());
caster->CastSpell(x, y, z, triggerSpellId, true, NULL, NULL, GetCasterGUID());
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index bab58094468..1d9c3c14897 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -597,6 +597,16 @@ class npc_spinestalker : public CreatureScript
{
}
+ void InitializeAI()
+ {
+ // Increase add count
+ if (!me->isDead())
+ {
+ _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, 1); // this cannot be in Reset because reset also happens on evade
+ Reset();
+ }
+ }
+
void Reset()
{
_events.Reset();
@@ -712,6 +722,16 @@ class npc_rimefang : public CreatureScript
{
}
+ void InitializeAI()
+ {
+ // Increase add count
+ if (!me->isDead())
+ {
+ _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, 1); // this cannot be in Reset because reset also happens on evade
+ Reset();
+ }
+ }
+
void Reset()
{
_events.Reset();
@@ -749,7 +769,7 @@ class npc_rimefang : public CreatureScript
me->setActive(true);
me->SetSpeed(MOVE_FLIGHT, 2.0f);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f);
me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, RimefangLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250));
me->SetDefaultMovementType(IDLE_MOTION_TYPE);
@@ -768,7 +788,7 @@ class npc_rimefang : public CreatureScript
me->SetFlying(false);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->SetHomePosition(RimefangLandPos);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void EnterCombat(Unit* /*victim*/)
@@ -860,7 +880,10 @@ class npc_sindragosa_trash : public CreatureScript
_frostwyrmId = (me->GetHomePosition().GetPositionY() < 2484.35f) ? DATA_RIMEFANG : DATA_SPINESTALKER;
// Increase add count
if (!me->isDead())
+ {
_instance->SetData(_frostwyrmId, 1); // this cannot be in Reset because reset also happens on evade
+ Reset();
+ }
}
void Reset()
@@ -1344,6 +1367,9 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader
++itr;
}
+ if (unitList.empty())
+ return;
+
Unit* target = SelectRandomContainerElement(unitList);
unitList.clear();
unitList.push_back(target);
@@ -1356,7 +1382,10 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader
std::list<Creature*> unitList;
GetCreatureListWithEntryInGrid(unitList, GetCaster(), NPC_FROSTWING_WHELP, 150.0f);
if (Creature* creature = GetCaster()->ToCreature())
- unitList.remove_if (OrderWhelpTargetSelector(creature));
+ unitList.remove_if(OrderWhelpTargetSelector(creature));
+
+ if (unitList.empty())
+ return;
SelectRandomContainerElement(unitList)->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
}
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 f3750f38dd5..fbed870eb19 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -501,13 +501,6 @@ class boss_the_lich_king : public CreatureScript
DoCastAOE(SPELL_PLAY_MOVIE, false);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x03);
- float x, y, z;
- me->GetPosition(x, y, z);
- // use larger distance for vmap height search than in most other cases
- float ground_Z = me->GetMap()->GetHeight(x, y, z, true, MAX_FALL_DISTANCE);
- if (fabs(ground_Z - z) < 0.1f)
- return;
-
me->GetMotionMaster()->MoveFall();
}
@@ -883,7 +876,7 @@ class boss_the_lich_king : public CreatureScript
case EVENT_INTRO_TALK_1:
Talk(SAY_LK_INTRO_2);
// for some reason blizz sends 2 emotes in row here so (we handle one in Talk)
- me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE);
events.ScheduleEvent(EVENT_EMOTE_CAST_SHOUT, 7000, 0, PHASE_INTRO);
events.ScheduleEvent(EVENT_INTRO_EMOTE_1, 13000, 0, PHASE_INTRO);
events.ScheduleEvent(EVENT_EMOTE_CAST_SHOUT, 18000, 0, PHASE_INTRO);
@@ -893,7 +886,7 @@ class boss_the_lich_king : public CreatureScript
DoCast(me, SPELL_EMOTE_SHOUT_NO_SHEATH, false);
break;
case EVENT_INTRO_EMOTE_1:
- me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NO_SHEATHE);
break;
case EVENT_INTRO_CAST_FREEZE:
Talk(SAY_LK_INTRO_3);
@@ -902,7 +895,7 @@ class boss_the_lich_king : public CreatureScript
break;
case EVENT_FINISH_INTRO:
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_AGGRESSIVE);
events.SetPhase(PHASE_ONE);
break;
@@ -1043,7 +1036,7 @@ class boss_the_lich_king : public CreatureScript
DoCastAOE(SPELL_EMOTE_QUESTION_NO_SHEATH);
break;
case EVENT_OUTRO_EMOTE_TALK:
- me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_TALK_NO_SHEATHE);
break;
case EVENT_OUTRO_TALK_3:
if (Creature* tirion = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HIGHLORD_TIRION_FORDRING)))
@@ -1268,7 +1261,7 @@ class npc_tirion_fordring_tft : public CreatureScript
_events.ScheduleEvent(EVENT_INTRO_CHARGE, 5000, 0, PHASE_INTRO);
break;
case EVENT_INTRO_EMOTE_1:
- me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NO_SHEATHE);
break;
case EVENT_INTRO_CHARGE:
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
@@ -1825,7 +1818,7 @@ class npc_terenas_menethil : public CreatureScript
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING)))
{
lichKing->AI()->DoAction(ACTION_FINISH_OUTRO);
- lichKing->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
+ lichKing->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
if (Creature* tirion = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_HIGHLORD_TIRION_FORDRING)))
tirion->AI()->AttackStart(lichKing);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index 112e23c4691..60e85165cd5 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -477,7 +477,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
Talk(SAY_TIRION_INTRO_3);
break;
case EVENT_LK_INTRO_1:
- me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NOSHEATHE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_POINT_NO_SHEATHE);
if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _theLichKing))
theLichKing->AI()->Talk(SAY_LK_INTRO_1);
break;
@@ -809,7 +809,7 @@ class boss_sister_svalna : public CreatureScript
case ACTION_START_GAUNTLET:
me->setActive(true);
_isEventInProgress = true;
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
events.ScheduleEvent(EVENT_SVALNA_START, 25000);
break;
case ACTION_RESURRECT_CAPTAINS:
@@ -843,7 +843,7 @@ class boss_sister_svalna : public CreatureScript
_isEventInProgress = false;
me->setActive(false);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
me->SetFlying(false);
}
@@ -1680,7 +1680,7 @@ class spell_icc_stoneform : public SpellScriptLoader
if (Creature* target = GetTarget()->ToCreature())
{
target->SetReactState(REACT_PASSIVE);
- target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_02);
}
}
@@ -1690,7 +1690,7 @@ class spell_icc_stoneform : public SpellScriptLoader
if (Creature* target = GetTarget()->ToCreature())
{
target->SetReactState(REACT_AGGRESSIVE);
- target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC);
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
}
}
@@ -1921,7 +1921,7 @@ class spell_svalna_revive_champion : public SpellScriptLoader
Position pos;
caster->GetPosition(&pos);
caster->GetNearPosition(pos, 5.0f, 0.0f);
- pos.m_positionZ = caster->GetBaseMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 20.0f);
+ pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 20.0f);
pos.m_positionZ += 0.05f;
caster->SetHomePosition(pos);
caster->GetMotionMaster()->MovePoint(POINT_LAND, pos);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index 0266db5f26b..af8aba57a6d 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
@@ -84,7 +84,7 @@ class at_frozen_throne_teleport : public AreaTriggerScript
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/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 2a61d00d119..98f5c04ba42 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -279,13 +279,9 @@ class instance_icecrown_citadel : public InstanceMapScript
break;
case NPC_SPINESTALKER:
SpinestalkerGUID = creature->GetGUID();
- if (!creature->isDead())
- ++FrostwyrmCount;
break;
case NPC_RIMEFANG:
RimefangGUID = creature->GetGUID();
- if (!creature->isDead())
- ++FrostwyrmCount;
break;
case NPC_THE_LICH_KING:
TheLichKingGUID = creature->GetGUID();
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index 26e4b33ad8a..8c6afba18fd 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -354,7 +354,7 @@ class boss_gothik : public CreatureScript
}
if (spellId && me->isInCombat())
{
- me->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST);
if (Creature* pRandomDeadTrigger = Unit::GetCreature(*me, DeadTriggerGUID[rand() % POS_DEAD]))
me->CastSpell(pRandomDeadTrigger, spellId, true);
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index acdb2355841..e64099da3ac 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -15,7 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "SpellScript.h"
+
#include "naxxramas.h"
//Stalagg
@@ -87,7 +90,9 @@ enum ThaddiusSpells
SPELL_POSITIVE_CHARGE = 28062,
SPELL_POSITIVE_CHARGE_STACK = 29659,
SPELL_NEGATIVE_CHARGE = 28085,
- SPELL_NEGATIVE_CHARGE_STACK = 29660
+ SPELL_NEGATIVE_CHARGE_STACK = 29660,
+ SPELL_POSITIVE_POLARITY = 28059,
+ SPELL_NEGATIVE_POLARITY = 28084,
};
enum Events
@@ -132,12 +137,12 @@ public:
if (!checkFeugenAlive && !checkStalaggAlive)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
me->SetReactState(REACT_AGGRESSIVE);
}
else
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
me->SetReactState(REACT_PASSIVE);
}
}
@@ -179,13 +184,13 @@ public:
if (!checkFeugenAlive && !checkStalaggAlive)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
// REACT_AGGRESSIVE only reset when he takes damage.
DoZoneInCombat();
}
else
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
me->SetReactState(REACT_PASSIVE);
}
}
@@ -503,6 +508,41 @@ class spell_thaddius_pos_neg_charge : public SpellScriptLoader
}
};
+class spell_thaddius_polarity_shift : public SpellScriptLoader
+{
+ public:
+ spell_thaddius_polarity_shift() : SpellScriptLoader("spell_thaddius_polarity_shift") { }
+
+ class spell_thaddius_polarity_shift_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_thaddius_polarity_shift_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_POLARITY) || !sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_POLARITY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, NULL, NULL, caster->GetGUID());
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_thaddius_polarity_shift_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_thaddius_polarity_shift_SpellScript();
+ }
+};
+
class achievement_polarity_switch : public AchievementCriteriaScript
{
public:
@@ -520,5 +560,6 @@ void AddSC_boss_thaddius()
new mob_stalagg();
new mob_feugen();
new spell_thaddius_pos_neg_charge();
+ new spell_thaddius_polarity_shift();
new achievement_polarity_switch();
}
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 6dfa62df2d1..437d9980af3 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -31,7 +31,6 @@ Script Data End */
#include "eye_of_eternity.h"
#include "ScriptedEscortAI.h"
-// not implemented
enum Achievements
{
ACHIEV_TIMED_START_EVENT = 20387,
@@ -242,6 +241,9 @@ public:
_cannotMove = true;
me->SetFlying(true);
+
+ if (instance)
+ instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
}
uint32 GetData(uint32 data)
@@ -359,7 +361,10 @@ public:
Talk(SAY_AGGRO_P_ONE);
- DoCast(SPELL_BERSEKER);
+ DoCast(SPELL_BERSEKER); // periodic aura, first tick in 10 minutes
+
+ if (instance)
+ instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
}
void KilledUnit(Unit* who)
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index 6a57444893f..44c6c25fa3e 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -144,14 +144,14 @@ public:
{
if (remove)
{
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (me->HasAura(SPELL_FROZEN_PRISON))
me->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON);
}
else
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
DoCast(me, SPELL_FROZEN_PRISON, false);
}
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index aef959aad70..9671d59bcec 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -289,7 +289,7 @@ public:
void JustDied(Unit* /*killer*/)
{
_JustDied();
- DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
+ DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
}
void LeaveCombat()
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index 8de2945af30..8852338c362 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -256,10 +256,10 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
{
// flags taken from sniffs
// UNIT_FLAG_UNK_9 -> means passive but it is not yet implemented in core
- if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_PASSIVE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_UNK_6))
+ if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6))
{
caster->ToCreature()->SetReactState(REACT_PASSIVE);
- caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_PASSIVE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_UNK_6);
+ caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6);
}
}
}
@@ -269,7 +269,7 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
caster->ToCreature()->SetReactState(REACT_AGGRESSIVE);
- caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_PASSIVE|UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_UNK_6);
+ caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6);
}
}
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index c687aad8bd2..11433bfde37 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -201,7 +201,7 @@ public:
Talk(SAY_UROM);
me->DespawnOrUnsummon(60000);
}
- }
+ }
};
CreatureAI* GetAI(Creature* creature) const
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 47f74b1ddba..c4f973726bc 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -34,6 +34,7 @@
#include "Vehicle.h"
#include "VehicleDefines.h"
#include "ulduar.h"
+#include "Spell.h"
enum Spells
{
@@ -755,7 +756,7 @@ class boss_flame_leviathan_safety_container : public CreatureScript
{
float x, y, z;
me->GetPosition(x, y, z);
- z = me->GetMap()->GetHeight(x, y, z);
+ z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetPosition(x, y, z, 0);
}
@@ -1669,7 +1670,7 @@ class spell_pursue : public SpellScriptLoader
if (Creature* caster = GetCaster()->ToCreature())
caster->AI()->EnterEvadeMode();
}
- else
+ else
{
//! In the end, only one target should be selected
_target = SelectRandomContainerElement(targets);
@@ -1718,6 +1719,71 @@ class spell_pursue : public SpellScriptLoader
}
};
+class spell_vehicle_throw_passenger : public SpellScriptLoader
+{
+ public:
+ spell_vehicle_throw_passenger() : SpellScriptLoader("spell_vehicle_throw_passenger") {}
+
+ class spell_vehicle_throw_passenger_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_vehicle_throw_passenger_SpellScript);
+ void HandleScript(SpellEffIndex effIndex)
+ {
+ Spell* baseSpell = GetSpell();
+ SpellCastTargets targets = baseSpell->m_targets;
+ int32 damage = GetEffectValue();
+ if (targets.HasTraj())
+ if (Vehicle* vehicle = GetCaster()->GetVehicleKit())
+ if (Unit* passenger = vehicle->GetPassenger(damage - 1))
+ {
+ // use 99 because it is 3d search
+ std::list<WorldObject*> targetList;
+ Trinity::WorldObjectSpellAreaTargetCheck check(99, GetTargetDest(), GetCaster(), GetCaster(), GetSpellInfo(), TARGET_CHECK_DEFAULT, NULL);
+ Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> searcher(GetCaster(), targetList, check);
+ GetCaster()->GetMap()->VisitAll(GetCaster()->m_positionX, GetCaster()->m_positionY, 99, searcher);
+ float minDist = 99 * 99;
+ Unit* target = NULL;
+ for (std::list<WorldObject*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
+ {
+ if (Unit* unit = (*itr)->ToUnit())
+ if (unit->GetEntry() == NPC_SEAT)
+ if (Vehicle* seat = unit->GetVehicleKit())
+ if (!seat->GetPassenger(0))
+ if (Unit* device = seat->GetPassenger(2))
+ if (!device->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
+ {
+ float dist = unit->GetExactDistSq(targets.GetDst());
+ if (dist < minDist)
+ {
+ minDist = dist;
+ target = unit;
+ }
+ }
+ }
+ if (target && target->IsWithinDist2d(targets.GetDst(), GetSpellInfo()->Effects[effIndex].CalcRadius() * 2)) // now we use *2 because the location of the seat is not correct
+ passenger->EnterVehicle(target, 0);
+ else
+ {
+ passenger->ExitVehicle();
+ float x, y, z;
+ targets.GetDst()->GetPosition(x, y, z);
+ passenger->GetMotionMaster()->MoveJump(x, y, z, targets.GetSpeedXY(), targets.GetSpeedZ());
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_vehicle_throw_passenger_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_vehicle_throw_passenger_SpellScript();
+ }
+};
+
void AddSC_boss_flame_leviathan()
{
new boss_flame_leviathan();
@@ -1752,4 +1818,5 @@ void AddSC_boss_flame_leviathan()
new spell_auto_repair();
new spell_systems_shutdown();
new spell_pursue();
+ new spell_vehicle_throw_passenger();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index 1f4fc8d3938..159e2a9702b 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -593,7 +593,7 @@ class boss_freya : public CreatureScript
void JustDied(Unit* /*who*/)
{
//! Freya's chest is dynamically spawned on death by different spells.
- const uint32 summonSpell[2][4] =
+ const uint32 summonSpell[2][4] =
{
/* 0Elder, 1Elder, 2Elder, 3Elder */
/* 10N */ {62950, 62953, 62955, 62957},
@@ -1372,7 +1372,7 @@ class npc_healthy_spore : public CreatureScript
{
npc_healthy_sporeAI(Creature* creature) : Scripted_NoMovementAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
DoCast(me, SPELL_HEALTHY_SPORE_VISUAL);
DoCast(me, SPELL_POTENT_PHEROMONES);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index a156e6ef08b..d5034e4827e 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -485,6 +485,8 @@ class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
if (!GetHitPlayer() || !GetHitPlayer()->GetVehicle())
return;
+ //! Proper exit position does not work currently,
+ //! See documentation in void Unit::ExitVehicle(Position const* exitPosition)
Position pos;
pos.m_positionX = 1756.25f + irand(-3, 3);
pos.m_positionY = -8.3f + irand(-3, 3);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index 6b170bab6d8..45f9a1fa012 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -668,7 +668,7 @@ class npc_expedition_commander : public CreatureScript
break;
case 4:
for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
- Engineer[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING);
+ Engineer[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
for (uint8 n = 0; n < 4; ++n)
Defender[n]->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
me->MonsterYell(SAY_AGGRO_2, LANG_UNIVERSAL, 0);
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 43a848c6b16..a11f88fc6af 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
@@ -117,7 +117,7 @@ public:
bIsUndead = false;
bEventInProgress = false;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_STAND);
events.Reset();
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
index 8a6d7f80818..93cc94923db 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Boss_Prince_Keleseth
SD%Complete: 100
-SDComment:
+SDComment:
SDCategory: Utgarde Keep
EndScriptData */
@@ -158,7 +158,7 @@ public:
{
if (data == DATA_ON_THE_ROCKS)
return onTheRocks;
-
+
return 0;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
index 0a778f852a0..656b2931abb 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
@@ -268,7 +268,7 @@ public:
void JustReachedHome()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_FREEZE);
}
@@ -381,7 +381,7 @@ public:
void JustReachedHome()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_FREEZE);
}
@@ -496,7 +496,7 @@ public:
void JustReachedHome()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_FREEZE);
}
@@ -611,7 +611,7 @@ public:
void JustReachedHome()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_FREEZE);
}
@@ -732,7 +732,7 @@ public:
void JustReachedHome()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_FREEZE);
}
@@ -793,7 +793,7 @@ public:
if (pNext)
{
pNext->RemoveAurasDueToSpell(SPELL_FREEZE);
- pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
pNext->SetStandState(UNIT_STAND_STATE_STAND);
pNext->SetInCombatWithZone();
pNext->Attack(pNext->SelectNearestTarget(100), true);
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index 989e1e57453..915ead98bb7 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -34,7 +34,7 @@ enum Spells
SPELL_RITUAL_DISARM = 54159,
SPELL_RITUAL_STRIKE_EFF_1 = 48277,
SPELL_RITUAL_STRIKE_EFF_2 = 59930,
-
+
SPELL_SUMMONED_VIS = 64446,
SPELL_RITUAL_CHANNELER_1 = 48271,
SPELL_RITUAL_CHANNELER_2 = 48274,
@@ -62,7 +62,7 @@ enum Yells
SAY_SLAY = 3,
SAY_DEATH = 4,
SAY_SACRIFICE_PLAYER = 5,
-
+
// Image of Arthas
SAY_DIALOG_OF_ARTHAS_1 = 0,
SAY_DIALOG_OF_ARTHAS_2 = 1
@@ -101,7 +101,7 @@ enum SvalaPoint
#define DATA_INCREDIBLE_HULK 2043
-static const float spectatorWP[2][3] =
+static const float spectatorWP[2][3] =
{
{296.95f,-312.76f,86.36f},
{297.69f,-275.81f,86.36f}
@@ -133,7 +133,7 @@ public:
InstanceScript* instance;
SummonList summons;
SvalaPhase Phase;
-
+
Position pos;
float x, y, z;
@@ -157,7 +157,7 @@ public:
summons.DespawnAll();
me->RemoveAllAuras();
-
+
if (Phase > INTRO)
{
me->SetFlying(true);
@@ -177,7 +177,7 @@ public:
instance->SetData64(DATA_SACRIFICED_PLAYER, 0);
}
}
-
+
void JustReachedHome()
{
if (Phase > INTRO)
@@ -188,23 +188,23 @@ public:
me->SendMovementFlagUpdate();
}
}
-
+
void EnterCombat(Unit* /*who*/)
{
Talk(SAY_AGGRO);
-
+
sinsterStrikeTimer = 7 * IN_MILLISECONDS;
callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
if (instance)
instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, IN_PROGRESS);
}
-
+
void JustSummoned(Creature* summon)
{
if (summon->GetEntry() == CREATURE_RITUAL_CHANNELER)
summon->CastSpell(summon, SPELL_SUMMONED_VIS, true);
-
+
summons.Summon(summon);
}
@@ -222,7 +222,7 @@ public:
{
Phase = INTRO;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
-
+
if (GameObject* mirror = GetClosestGameObjectWithEntry(me, OBJECT_UTGARDE_MIRROR, 100.0f))
mirror->SetGoState(GO_STATE_READY);
@@ -233,13 +233,13 @@ public:
}
}
}
-
+
void KilledUnit(Unit* victim)
{
if (victim != me)
Talk(SAY_SLAY);
}
-
+
void DamageTaken(Unit* attacker, uint32 &damage)
{
if (Phase == SVALADEAD)
@@ -532,7 +532,7 @@ public:
if (IsHeroic())
DoCast(me, SPELL_SHADOWS_IN_THE_DARK);
}
-
+
void UpdateAI(const uint32 diff)
{
if (me->HasUnitState(UNIT_STATE_CASTING))
@@ -648,7 +648,7 @@ class npc_scourge_hulk : public CreatureScript
{
return type == DATA_INCREDIBLE_HULK ? killedByRitualStrike : 0;
}
-
+
void DamageTaken(Unit* attacker, uint32 &damage)
{
if (damage >= me->GetHealth() && attacker->GetEntry() == CREATURE_SVALA_SORROWGRAVE)
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index 148ae2b6c4b..63f0cd39893 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -97,7 +97,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
@@ -109,13 +109,13 @@ public:
if (Creature* pGuard1 = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_EREKEM_GUARD_1) : 0))
{
- pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
if (!pGuard1->getVictim() && pGuard1->AI())
pGuard1->AI()->AttackStart(who);
}
if (Creature* pGuard2 = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_EREKEM_GUARD_2) : 0))
{
- pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
if (!pGuard2->getVictim() && pGuard2->AI())
pGuard2->AI()->AttackStart(who);
}
@@ -290,7 +290,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index 5b36481eca8..a191d9349f2 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -140,7 +140,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
index 21e4df37d8e..c5b2cb3c327 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
@@ -87,7 +87,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
index 08bc24329ca..84b04579681 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
@@ -80,7 +80,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index 095d63f2dff..ac165ac39ef 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -123,7 +123,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index dc477855ff8..ff2009c2a17 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -91,7 +91,7 @@ public:
void AttackStart(Unit* who)
{
- if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 3db63e5057b..5980c534595 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -249,7 +249,7 @@ public:
if (uiCountErekemGuards < 2)
{
uiErekemGuard[uiCountErekemGuards++] = creature->GetGUID();
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
}
break;
case CREATURE_MORAGG:
@@ -257,7 +257,7 @@ public:
break;
case CREATURE_CYANIGOSA:
uiCyanigosa = creature->GetGUID();
- creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
break;
case CREATURE_SINCLARI:
uiSinclari = creature->GetGUID();
@@ -499,18 +499,18 @@ public:
if (Creature* pGuard1 = instance->GetCreature(uiErekemGuard[0]))
{
if (bForceRespawn)
- pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
else
- pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
pGuard1->GetMotionMaster()->MovePoint(0, BossStartMove21);
}
if (Creature* pGuard2 = instance->GetCreature(uiErekemGuard[1]))
{
if (bForceRespawn)
- pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
else
- pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
pGuard2->GetMotionMaster()->MovePoint(0, BossStartMove22);
}
break;
@@ -543,7 +543,7 @@ public:
// generic boss state changes
if (pBoss)
{
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
pBoss->SetReactState(REACT_AGGRESSIVE);
if (!bForceRespawn)
@@ -554,7 +554,7 @@ public:
pBoss->Respawn();
pBoss->RemoveLootMode(1);
}
- pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
uiWaveCount = 0;
}
}
@@ -750,7 +750,7 @@ public:
case 3:
pCyanigosa->RemoveAurasDueToSpell(CYANIGOSA_BLUE_AURA);
pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_SPELL_TRANSFORM, 0);
- pCyanigosa->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pCyanigosa->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
pCyanigosa->SetReactState(REACT_AGGRESSIVE);
uiCyanigosaEventTimer = 2*IN_MILLISECONDS;
++uiCyanigosaEventPhase;
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index 617ce9655a7..8b77cb250da 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -443,7 +443,7 @@ public:
if (instance && !uiBoss)
uiBoss = instance->GetData(DATA_WAVE_COUNT) == 6 ? instance->GetData(DATA_FIRST_BOSS) : instance->GetData(DATA_SECOND_BOSS);
me->SetReactState(REACT_PASSIVE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp
index cd3cbf29d0d..258d038ee4b 100644
--- a/src/server/scripts/Northrend/dalaran.cpp
+++ b/src/server/scripts/Northrend/dalaran.cpp
@@ -75,7 +75,7 @@ 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
player->HasAura(SPELL_SUNREAVER_DISGUISE_FEMALE) || player->HasAura(SPELL_SUNREAVER_DISGUISE_MALE) ||
diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp
index 9eb73463795..ccb31c869a4 100644
--- a/src/server/scripts/Northrend/grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/grizzly_hills.cpp
@@ -370,7 +370,7 @@ public:
if (me->FindNearestGameObject(OBJECT_HAUNCH, 2.0f))
{
me->SetStandState(UNIT_STAND_STATE_DEAD);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
}
m_uiPhase = 0;
@@ -415,7 +415,7 @@ public:
// call this each update tick?
if (me->FindNearestCreature(TALLHORN_STAG, 0.2f))
{
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
}
else
if (m_uiPhase)
@@ -624,7 +624,7 @@ public:
uiPlayerGUID = 0;
uiTimer = 0;
uiChopTimer = urand(10000, 12500);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_AGGRESSIVE);
}
@@ -683,7 +683,7 @@ public:
{
if (pCaster && pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SMOKE_BOMB)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
me->CombatStop(false);
uiPlayerGUID = pCaster->GetGUID();
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 91522503d65..8da992af8fb 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -335,6 +335,162 @@ public:
}
};
+/*######
+* npc_tournament_training_dummy
+######*/
+enum TournamentDummy
+{
+ NPC_CHARGE_TARGET = 33272,
+ NPC_MELEE_TARGET = 33229,
+ NPC_RANGED_TARGET = 33243,
+
+ SPELL_CHARGE_CREDIT = 62658,
+ SPELL_MELEE_CREDIT = 62672,
+ SPELL_RANGED_CREDIT = 62673,
+
+ SPELL_PLAYER_THRUST = 62544,
+ SPELL_PLAYER_BREAK_SHIELD = 62626,
+ SPELL_PLAYER_CHARGE = 62874,
+
+ SPELL_RANGED_DEFEND = 62719,
+ SPELL_CHARGE_DEFEND = 64100,
+ SPELL_VULNERABLE = 62665,
+
+ SPELL_COUNTERATTACK = 62709,
+
+ EVENT_DUMMY_RECAST_DEFEND = 1,
+ EVENT_DUMMY_RESET = 2,
+};
+
+class npc_tournament_training_dummy : public CreatureScript
+{
+ public:
+ npc_tournament_training_dummy(): CreatureScript("npc_tournament_training_dummy"){}
+
+ struct npc_tournament_training_dummyAI : Scripted_NoMovementAI
+ {
+ npc_tournament_training_dummyAI(Creature* creature) : Scripted_NoMovementAI(creature) {}
+
+ EventMap events;
+ bool isVulnerable;
+
+ void Reset()
+ {
+ me->SetControlled(true, UNIT_STATE_STUNNED);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
+ isVulnerable = false;
+
+ // Cast Defend spells to max stack size
+ switch (me->GetEntry())
+ {
+ case NPC_CHARGE_TARGET:
+ DoCast(SPELL_CHARGE_DEFEND);
+ break;
+ case NPC_RANGED_TARGET:
+ me->CastCustomSpell(SPELL_RANGED_DEFEND, SPELLVALUE_AURA_STACK, 3, me);
+ break;
+ }
+
+ events.Reset();
+ events.ScheduleEvent(EVENT_DUMMY_RECAST_DEFEND, 5000);
+ }
+
+ void EnterEvadeMode()
+ {
+ if (!_EnterEvadeMode())
+ return;
+
+ Reset();
+ }
+
+ void DamageTaken(Unit* /*attacker*/, uint32& damage)
+ {
+ damage = 0;
+ events.RescheduleEvent(EVENT_DUMMY_RESET, 10000);
+ }
+
+ void SpellHit(Unit* caster, SpellInfo const* spell)
+ {
+ switch (me->GetEntry())
+ {
+ case NPC_CHARGE_TARGET:
+ if (spell->Id == SPELL_PLAYER_CHARGE)
+ if (isVulnerable)
+ DoCast(caster, SPELL_CHARGE_CREDIT, true);
+ break;
+ case NPC_MELEE_TARGET:
+ if (spell->Id == SPELL_PLAYER_THRUST)
+ {
+ DoCast(caster, SPELL_MELEE_CREDIT, true);
+
+ if (Unit* target = caster->GetVehicleBase())
+ DoCast(target, SPELL_COUNTERATTACK, true);
+ }
+ break;
+ case NPC_RANGED_TARGET:
+ if (spell->Id == SPELL_PLAYER_BREAK_SHIELD)
+ if (isVulnerable)
+ DoCast(caster, SPELL_RANGED_CREDIT, true);
+ break;
+ }
+
+ if (spell->Id == SPELL_PLAYER_BREAK_SHIELD)
+ if (!me->HasAura(SPELL_CHARGE_DEFEND) && !me->HasAura(SPELL_RANGED_DEFEND))
+ isVulnerable = true;
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ events.Update(diff);
+
+ switch (events.ExecuteEvent())
+ {
+ case EVENT_DUMMY_RECAST_DEFEND:
+ switch (me->GetEntry())
+ {
+ case NPC_CHARGE_TARGET:
+ {
+ if (!me->HasAura(SPELL_CHARGE_DEFEND))
+ DoCast(SPELL_CHARGE_DEFEND);
+ break;
+ }
+ case NPC_RANGED_TARGET:
+ {
+ Aura* defend = me->GetAura(SPELL_RANGED_DEFEND);
+ if (!defend || defend->GetStackAmount() < 3 || defend->GetDuration() <= 8000)
+ DoCast(SPELL_RANGED_DEFEND);
+ break;
+ }
+ }
+ isVulnerable = false;
+ events.ScheduleEvent(EVENT_DUMMY_RECAST_DEFEND, 5000);
+ break;
+ case EVENT_DUMMY_RESET:
+ if (UpdateVictim())
+ {
+ EnterEvadeMode();
+ events.ScheduleEvent(EVENT_DUMMY_RESET, 10000);
+ }
+ break;
+ }
+
+ if (!UpdateVictim())
+ return;
+
+ if (!me->HasUnitState(UNIT_STATE_STUNNED))
+ me->SetControlled(true, UNIT_STATE_STUNNED);
+ }
+
+ void MoveInLineOfSight(Unit* /*who*/){}
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_tournament_training_dummyAI(creature);
+ }
+
+};
+
void AddSC_icecrown()
{
new npc_arete;
@@ -342,4 +498,5 @@ void AddSC_icecrown()
new npc_argent_valiant;
new npc_guardian_pavilion;
new npc_vereth_the_cunning;
+ new npc_tournament_training_dummy;
}
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index c7153eb4006..36dc6177f64 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -551,7 +551,7 @@ public:
return;
QuestStatusMap::const_iterator itr = caster->ToPlayer()->getQuestStatusMap().find(QUEST_ENTRY);
- if (itr->second.m_status != QUEST_STATUS_INCOMPLETE)
+ if (itr->second.Status != QUEST_STATUS_INCOMPLETE)
return;
for (uint8 i=0; i<3; i++)
@@ -575,7 +575,7 @@ public:
break;
}
- if (itr->second.m_creatureOrGOcount[i] != 0)
+ if (itr->second.CreatureOrGOCount[i] != 0)
continue;
caster->ToPlayer()->KilledMonsterCredit(me->GetEntry(), 0);
@@ -665,6 +665,86 @@ public:
}
};
+/*######
+## Quest The Lifewarden's Wrath
+######*/
+
+enum MiscLifewarden
+{
+ NPC_PRESENCE = 28563, // Freya's Presence
+ NPC_SABOTEUR = 28538, // Cultist Saboteur
+ NPC_SERVANT = 28320, // Servant of Freya
+
+ WHISPER_ACTIVATE = 0,
+
+ SPELL_FREYA_DUMMY = 51318,
+ SPELL_LIFEFORCE = 51395,
+ SPELL_FREYA_DUMMY_TRIGGER = 51335,
+ SPELL_LASHER_EMERGE = 48195,
+ SPELL_WILD_GROWTH = 52948,
+};
+
+class spell_q12620_the_lifewarden_wrath : public SpellScriptLoader
+{
+public:
+ spell_q12620_the_lifewarden_wrath() : SpellScriptLoader("spell_q12620_the_lifewarden_wrath") { }
+
+ class spell_q12620_the_lifewarden_wrath_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q12620_the_lifewarden_wrath_SpellScript);
+
+ void HandleSendEvent(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+
+ if (Unit* caster = GetCaster())
+ {
+ if (Creature* presence = caster->FindNearestCreature(NPC_PRESENCE, 50.0f))
+ {
+ presence->AI()->Talk(WHISPER_ACTIVATE, caster->GetGUID());
+ presence->CastSpell(presence, SPELL_FREYA_DUMMY, true); // will target plants
+ // Freya Dummy could be scripted with the following code
+
+ // Revive plants
+ std::list<Creature*> servants;
+ GetCaster()->GetCreatureListWithEntryInGrid(servants, NPC_SERVANT, 200.0f);
+ for (std::list<Creature*>::iterator itr = servants.begin(); itr != servants.end(); ++itr)
+ {
+ // Couldn't find a spell that does this
+ if ((*itr)->isDead())
+ (*itr)->Respawn(true);
+
+ (*itr)->CastSpell(*itr, SPELL_FREYA_DUMMY_TRIGGER, true);
+ (*itr)->CastSpell(*itr, SPELL_LASHER_EMERGE, false);
+ (*itr)->CastSpell(*itr, SPELL_WILD_GROWTH, false);
+
+ if (Unit* target = (*itr)->SelectNearestTarget(150.0f))
+ (*itr)->AI()->AttackStart(target);
+ }
+
+ // Kill nearby enemies
+ std::list<Creature*> saboteurs;
+ caster->GetCreatureListWithEntryInGrid(saboteurs, NPC_SABOTEUR, 200.0f);
+ for (std::list<Creature*>::iterator itr = saboteurs.begin(); itr != saboteurs.end(); ++itr)
+ if ((*itr)->isAlive())
+ // Lifeforce has a cast duration, it should be cast at all saboteurs one by one
+ presence->CastSpell((*itr), SPELL_LIFEFORCE, false);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_q12620_the_lifewarden_wrath_SpellScript::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q12620_the_lifewarden_wrath_SpellScript();
+ }
+};
+
void AddSC_sholazar_basin()
{
new npc_injured_rainspeaker_oracle();
@@ -674,4 +754,5 @@ void AddSC_sholazar_basin()
new npc_engineer_helice();
new npc_adventurous_dwarf();
new npc_jungle_punch_target();
+ new spell_q12620_the_lifewarden_wrath();
}
diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp
index 2b73d57365a..0af82345dce 100644
--- a/src/server/scripts/Northrend/zuldrak.cpp
+++ b/src/server/scripts/Northrend/zuldrak.cpp
@@ -586,7 +586,7 @@ public:
{
npc_orinoko_tuskbreakerAI(Creature* creature) : ScriptedAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
}
@@ -622,7 +622,7 @@ public:
if (uiType != POINT_MOTION_TYPE)
return;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_AGGRESSIVE);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
uiBattleShoutTimer = 7000;
@@ -734,7 +734,7 @@ public:
void Reset()
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
uiChargeTimer = 15000;
uiUppercutTimer = 12000;
@@ -747,7 +747,7 @@ public:
{
case 6:
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_AGGRESSIVE);
break;
}
@@ -914,7 +914,7 @@ public:
{
npc_stinkbeardAI(Creature* creature) : npc_escortAI(creature)
{
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
Start(true, true, 0, NULL);
SetDespawnAtEnd(false);
@@ -940,7 +940,7 @@ public:
switch (uiI)
{
case 7:
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_AGGRESSIVE);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
break;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index c17b6d5baf3..58f0e10c950 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -1865,7 +1865,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset()
TransformCount = 0;
me->SetDisplayId(21135);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 15c7cdb187d..278488eac9e 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -435,7 +435,7 @@ public:
float X = CalculateRandomLocation(target->GetPositionX(), 20);
float Y = CalculateRandomLocation(target->GetPositionY(), 20);
float Z = target->GetPositionZ();
- Z = me->GetMap()->GetHeight(X, Y, Z);
+ Z = me->GetMap()->GetHeight(me->GetPhaseMask(), X, Y, Z);
Creature* DoomBlossom = me->SummonCreature(CREATURE_DOOM_BLOSSOM, X, Y, Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000);
if (DoomBlossom)
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index 3c06efefb08..0ed9d8e7833 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -136,7 +136,7 @@ public:
DoCast(me, SPELL_SUBMERGE);//submerge anim
me->SetVisible(false);//we start invis under water, submerged
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void JustDied(Unit* /*Killer*/)
@@ -205,7 +205,7 @@ public:
{
WaitTimer = 3000;
CanStartEvent = true;//fresh fished from pool
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
else
@@ -325,7 +325,7 @@ public:
Submerged = false;
me->InterruptNonMeleeSpells(false);//shouldn't be any
me->RemoveAllAuras();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED);
DoCast(me, SPELL_EMERGE, true);
Spawned = false;
@@ -344,7 +344,7 @@ public:
if (!Spawned)
{
- me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
//spawn adds
for (uint8 i = 0; i < 9; ++i)
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 1f17e9e4802..c355079e0e8 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -252,7 +252,7 @@ class boss_magtheridon : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->AddUnitState(UNIT_STATE_STUNNED);
DoCast(me, SPELL_SHADOW_CAGE_C, true);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 218c5a122f1..05fad24f35e 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -23,7 +23,10 @@ SDComment:
SDCategory: Tempest Keep, The Eye
EndScriptData */
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "SpellScript.h"
+
#include "the_eye.h"
enum eEnums
@@ -40,6 +43,7 @@ enum eEnums
SPELL_ARCANE_MISSILES = 33031,
SPELL_WRATH_OF_THE_ASTROMANCER = 42783,
+ SPELL_WRATH_OF_THE_ASTROMANCER_DOT = 42784,
SPELL_BLINDING_LIGHT = 33009,
SPELL_FEAR = 34322,
SPELL_VOID_BOLT = 39329,
@@ -491,9 +495,74 @@ class mob_solarium_priest : public CreatureScript
return new mob_solarium_priestAI (Creature);
}
};
+
+class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
+{
+ public:
+ spell_astromancer_wrath_of_the_astromancer() : SpellScriptLoader("spell_astromancer_wrath_of_the_astromancer") { }
+
+ class spell_astromancer_wrath_of_the_astromancer_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_astromancer_wrath_of_the_astromancer_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_WRATH_OF_THE_ASTROMANCER_DOT))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ _targetCount = 0;
+ return true;
+ }
+
+ void CountTargets(std::list<Unit*>& targetList)
+ {
+ _targetCount = targetList.size();
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (Unit* caster = GetOriginalCaster())
+ if (Unit* target = GetHitUnit())
+ {
+ if (!target->isAlive() || !_targetCount)
+ return;
+
+ int32 damage = 10000 / _targetCount;
+
+ SpellNonMeleeDamage damageInfo(caster, target, GetSpellInfo()->Id, GetSpellInfo()->SchoolMask);
+ damageInfo.damage = damage;
+
+ caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &damageInfo.absorb, &damageInfo.resist, GetSpellInfo());
+ caster->DealDamageMods(target, damageInfo.damage, &damageInfo.absorb);
+ caster->SendSpellNonMeleeDamageLog(&damageInfo);
+ caster->DealSpellDamage(&damageInfo, false);
+ }
+ }
+
+ private:
+ int32 _targetCount;
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_astromancer_wrath_of_the_astromancer_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_astromancer_wrath_of_the_astromancer_SpellScript::CountTargets, EFFECT_0, TARGET_DEST_CASTER_RADIUS);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_astromancer_wrath_of_the_astromancer_SpellScript();
+ }
+};
+
void AddSC_boss_high_astromancer_solarian()
{
new boss_high_astromancer_solarian();
new mob_solarium_priest();
+ new spell_astromancer_wrath_of_the_astromancer();
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index ed818fb13be..3579a7d697b 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -22,20 +22,22 @@
enum Spells
{
- SPELL_POSITIVE_CHARGE = 39090,
+ SPELL_POSITIVE_POLARITY = 39088,
SPELL_POSITIVE_CHARGE_STACK = 39089,
+ SPELL_POSITIVE_CHARGE = 39090,
+ SPELL_NEGATIVE_POLARITY = 39091,
+ SPELL_NEGATIVE_CHARGE_STACK = 39092,
SPELL_NEGATIVE_CHARGE = 39093,
- SPELL_NEGATIVE_CHARGE_STACK = 39092
};
-class spell_capacitus_polarity_shift : public SpellScriptLoader
+class spell_capacitus_polarity_charge : public SpellScriptLoader
{
public:
- spell_capacitus_polarity_shift() : SpellScriptLoader("spell_capacitus_polarity_shift") { }
+ spell_capacitus_polarity_charge() : SpellScriptLoader("spell_capacitus_polarity_charge") { }
- class spell_capacitus_polarity_shift_SpellScript : public SpellScript
+ class spell_capacitus_polarity_charge_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_capacitus_polarity_shift_SpellScript);
+ PrepareSpellScript(spell_capacitus_polarity_charge_SpellScript);
bool Validate(SpellInfo const* /*spell*/)
{
@@ -85,8 +87,44 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
void Register()
{
- OnEffectHitTarget += SpellEffectFn(spell_capacitus_polarity_shift_SpellScript::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
- OnUnitTargetSelect += SpellUnitTargetFn(spell_capacitus_polarity_shift_SpellScript::HandleTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
+ OnEffectHitTarget += SpellEffectFn(spell_capacitus_polarity_charge_SpellScript::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_capacitus_polarity_charge_SpellScript::HandleTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_capacitus_polarity_charge_SpellScript();
+ }
+};
+
+class spell_capacitus_polarity_shift : public SpellScriptLoader
+{
+ public:
+ spell_capacitus_polarity_shift() : SpellScriptLoader("spell_capacitus_polarity_shift") { }
+
+ class spell_capacitus_polarity_shift_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_capacitus_polarity_shift_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_POLARITY) || !sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_POLARITY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* target = GetHitUnit();
+ Unit* caster = GetCaster();
+
+ target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, NULL, NULL, caster->GetGUID());
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_capacitus_polarity_shift_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -98,5 +136,6 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
void AddSC_boss_mechano_lord_capacitus()
{
+ new spell_capacitus_polarity_charge();
new spell_capacitus_polarity_shift();
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
index 327ca289553..de86ec8672c 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -89,7 +89,7 @@ class boss_harbinger_skyriss : public CreatureScript
void Reset()
{
if (!Intro)
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
IsImage33 = false;
IsImage66 = false;
@@ -184,7 +184,7 @@ class boss_harbinger_skyriss : public CreatureScript
Intro_Timer = 3000;
break;
case 3:
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
Intro = true;
break;
}
diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp
index 97ce9f45430..f99851f013e 100644
--- a/src/server/scripts/Outland/blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/blades_edge_mountains.cpp
@@ -739,7 +739,7 @@ class npc_simon_bunny : public CreatureScript
if (!listening)
return;
- uint8 pressedColor;
+ uint8 pressedColor = SIMON_MAX_COLORS;
if (type == clusterIds[SIMON_RED])
pressedColor = SIMON_RED;
@@ -974,10 +974,10 @@ class npc_simon_bunny : public CreatureScript
// Handles the spell rewards. The spells also have the QuestCompleteEffect, so quests credits are working.
void GiveRewardForLevel(uint8 level)
{
- uint32 rewSpell;
+ uint32 rewSpell = 0;
switch (level)
{
- case 6:
+ case 6:
if (large)
GivePunishment();
else
@@ -989,8 +989,6 @@ class npc_simon_bunny : public CreatureScript
case 10:
rewSpell = SPELL_REWARD_BUFF_3;
break;
- default:
- rewSpell = 0;
}
if (rewSpell)
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index 07de7fe4786..19c4754c4fd 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -117,7 +117,7 @@ public:
{
bIsEating = true;
EatTimer = 7000;
- me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED);
}
}
diff --git a/src/server/scripts/Spells/CMakeLists.txt b/src/server/scripts/Spells/CMakeLists.txt
index 0df7cf907b6..496324e4de9 100644
--- a/src/server/scripts/Spells/CMakeLists.txt
+++ b/src/server/scripts/Spells/CMakeLists.txt
@@ -23,6 +23,7 @@ set(scripts_STAT_SRCS
Spells/spell_mage.cpp
Spells/spell_paladin.cpp
Spells/spell_item.cpp
+ Spells/spell_holiday.cpp
)
message(" -> Prepared: Spells")
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index f62d62c671a..eb42b377128 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -21,16 +21,17 @@
* Scriptnames of files in this file should be prefixed with "spell_dk_".
*/
-#include "ScriptPCH.h"
-#include "Spell.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
enum DeathKnightSpells
{
DK_SPELL_RUNIC_POWER_ENERGIZE = 49088,
DK_SPELL_ANTI_MAGIC_SHELL_TALENT = 51052,
DK_SPELL_CORPSE_EXPLOSION_TRIGGERED = 43999,
+ DK_SPELL_CORPSE_EXPLOSION_VISUAL = 51270,
DK_SPELL_GHOUL_EXPLODE = 47496,
- DISPLAY_GHOUL_CORPSE = 25537,
DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890,
DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658,
DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189,
@@ -103,7 +104,9 @@ class spell_dk_anti_magic_shell_self : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- return sSpellMgr->GetSpellInfo(DK_SPELL_RUNIC_POWER_ENERGIZE);
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_RUNIC_POWER_ENERGIZE))
+ return false;
+ return true;
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
@@ -160,17 +163,16 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- return sSpellMgr->GetSpellInfo(DK_SPELL_ANTI_MAGIC_SHELL_TALENT);
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_ANTI_MAGIC_SHELL_TALENT))
+ return false;
+ return true;
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
{
SpellInfo const* talentSpell = sSpellMgr->GetSpellInfo(DK_SPELL_ANTI_MAGIC_SHELL_TALENT);
amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster());
- Unit* caster = GetCaster();
- if (!caster)
- return;
- if (Player* player = caster->ToPlayer())
+ if (Player* player = GetCaster()->ToPlayer())
amount += int32(2 * player->GetTotalAttackPowerValue(BASE_ATTACK));
}
@@ -204,9 +206,9 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED))
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED) || !sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE))
return false;
- if (!sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE))
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_VISUAL))
return false;
return true;
}
@@ -227,9 +229,9 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
GetCaster()->CastCustomSpell(unitTarget, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), &bp, NULL, NULL, true);
// Corpse Explosion (Suicide)
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
- // Set corpse look
- unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3));
}
+ // Set corpse look
+ GetCaster()->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_VISUAL, true);
}
}
@@ -255,14 +257,19 @@ class spell_dk_ghoul_explode : public SpellScriptLoader
{
PrepareSpellScript(spell_dk_ghoul_explode_SpellScript);
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED))
+ return false;
+ return true;
+ }
+
void Suicide(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
{
// Corpse Explosion (Suicide)
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
- // Set corpse look
- unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3));
}
}
@@ -301,9 +308,8 @@ class spell_dk_death_gate : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- if (!GetHitUnit())
- return;
- GetHitUnit()->CastSpell(GetHitUnit(), GetEffectValue(), false);
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(target, GetEffectValue(), false);
}
void Register()
@@ -567,12 +573,11 @@ public:
class spell_dk_improved_blood_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_improved_blood_presence_AuraScript)
+ PrepareAuraScript(spell_dk_improved_blood_presence_AuraScript);
+
bool Validate(SpellInfo const* /*entry*/)
{
- if (!sSpellMgr->GetSpellInfo(DK_SPELL_BLOOD_PRESENCE))
- return false;
- if (!sSpellMgr->GetSpellInfo(DK_SPELL_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_BLOOD_PRESENCE) || !sSpellMgr->GetSpellInfo(DK_SPELL_IMPROVED_BLOOD_PRESENCE_TRIGGERED))
return false;
return true;
}
@@ -615,12 +620,11 @@ public:
class spell_dk_improved_unholy_presence_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_dk_improved_unholy_presence_AuraScript)
+ PrepareAuraScript(spell_dk_improved_unholy_presence_AuraScript);
+
bool Validate(SpellInfo const* /*entry*/)
{
- if (!sSpellMgr->GetSpellInfo(DK_SPELL_UNHOLY_PRESENCE))
- return false;
- if (!sSpellMgr->GetSpellInfo(DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED))
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_UNHOLY_PRESENCE) || !sSpellMgr->GetSpellInfo(DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED))
return false;
return true;
}
@@ -656,6 +660,141 @@ public:
}
};
+enum DeathStrike
+{
+ ICON_ID_IMPROVED_DEATH_STRIKE = 2751,
+ SPELL_DEATH_STRIKE_HEAL = 45470,
+};
+
+class spell_dk_death_strike : public SpellScriptLoader
+{
+ public:
+ spell_dk_death_strike() : SpellScriptLoader("spell_dk_death_strike") { }
+
+ class spell_dk_death_strike_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dk_death_strike_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DEATH_STRIKE_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ {
+ uint32 count = target->GetDiseasesByCaster(caster->GetGUID());
+ int32 bp = int32(count * caster->CountPctFromMaxHealth(int32(GetSpellInfo()->Effects[EFFECT_0].DamageMultiplier)));
+ // Improved Death Strike
+ if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, ICON_ID_IMPROVED_DEATH_STRIKE, 0))
+ AddPctN(bp, caster->CalculateSpellDamage(caster, aurEff->GetSpellInfo(), 2));
+ caster->CastCustomSpell(caster, SPELL_DEATH_STRIKE_HEAL, &bp, NULL, NULL, false);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dk_death_strike_SpellScript::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY);
+ }
+
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_dk_death_strike_SpellScript();
+ }
+};
+
+enum DeathCoil
+{
+ SPELL_DEATH_COIL_DAMAGE = 47632,
+ SPELL_DEATH_COIL_HEAL = 47633,
+};
+
+class spell_dk_death_coil : public SpellScriptLoader
+{
+ public:
+ spell_dk_death_coil() : SpellScriptLoader("spell_dk_death_coil") { }
+
+ class spell_dk_death_coil_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dk_death_coil_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DEATH_COIL_DAMAGE) || !sSpellMgr->GetSpellInfo(SPELL_DEATH_COIL_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ {
+ if (caster->IsFriendlyTo(target))
+ {
+ int32 bp = int32(damage * 1.5f);
+ caster->CastCustomSpell(target, SPELL_DEATH_COIL_HEAL, &bp, NULL, NULL, true);
+ }
+ else
+ caster->CastCustomSpell(target, SPELL_DEATH_COIL_DAMAGE, &damage, NULL, NULL, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dk_death_coil_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_dk_death_coil_SpellScript();
+ }
+};
+
+class spell_dk_death_grip : public SpellScriptLoader
+{
+ public:
+ spell_dk_death_grip() : SpellScriptLoader("spell_dk_death_grip") { }
+
+ class spell_dk_death_grip_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dk_death_grip_SpellScript);
+
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ int32 damage = GetEffectValue();
+ Position pos;
+ if (Unit* target = GetHitUnit())
+ {
+ GetSummonPosition(effIndex, pos, 0.0f, 0);
+
+ if (!target->HasAuraType(SPELL_AURA_DEFLECT_SPELLS)) // Deterrence
+ target->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), damage, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dk_death_grip_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_dk_death_grip_SpellScript();
+ }
+};
+
void AddSC_deathknight_spell_scripts()
{
new spell_dk_anti_magic_shell_raid();
@@ -671,4 +810,7 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_will_of_the_necropolis();
new spell_dk_improved_blood_presence();
new spell_dk_improved_unholy_presence();
+ new spell_dk_death_strike();
+ new spell_dk_death_coil();
+ new spell_dk_death_grip();
}
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 130f61565f7..4c440f18bd9 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -21,7 +21,8 @@
* Scriptnames of files in this file should be prefixed with "spell_dru_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
enum DruidSpells
@@ -42,9 +43,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(DRUID_INCREASED_MOONFIRE_DURATION))
- return false;
- if (!sSpellMgr->GetSpellInfo(DRUID_NATURES_SPLENDOR))
+ if (!sSpellMgr->GetSpellInfo(DRUID_INCREASED_MOONFIRE_DURATION) || !sSpellMgr->GetSpellInfo(DRUID_NATURES_SPLENDOR))
return false;
return true;
}
@@ -305,14 +304,16 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader
{
PrepareAuraScript(spell_dru_swift_flight_passive_AuraScript);
- void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
+ bool Load()
{
- Unit* caster = GetCaster();
- if (!caster || !caster->ToPlayer())
- return;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- if (caster->ToPlayer()->Has310Flyer(false))
- amount = 310;
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
+ {
+ if (Player* caster = GetCaster()->ToPlayer())
+ if (caster->Has310Flyer(false))
+ amount = 310;
}
void Register()
@@ -327,6 +328,45 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader
}
};
+class spell_dru_starfall_dummy : public SpellScriptLoader
+{
+ public:
+ spell_dru_starfall_dummy() : SpellScriptLoader("spell_dru_starfall_dummy") { }
+
+ class spell_dru_starfall_dummy_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dru_starfall_dummy_SpellScript);
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ // Shapeshifting into an animal form or mounting cancels the effect
+ if (caster->GetCreatureType() == CREATURE_TYPE_BEAST || caster->IsMounted())
+ {
+ if (SpellInfo const* spellInfo = GetTriggeringSpell())
+ caster->RemoveAurasDueToSpell(spellInfo->Id);
+ return;
+ }
+
+ //Any effect which causes you to lose control of your character will supress the starfall effect.
+ if (caster->HasUnitState(UNIT_STATE_CONTROLLED))
+ return;
+
+ caster->CastSpell(GetHitUnit(), GetEffectValue(), true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dru_starfall_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_dru_starfall_dummy_SpellScript();
+ }
+};
+
void AddSC_druid_spell_scripts()
{
new spell_dru_glyph_of_starfire();
@@ -336,4 +376,5 @@ void AddSC_druid_spell_scripts()
new spell_dru_t10_restoration_4p_bonus();
new spell_dru_starfall_aoe();
new spell_dru_swift_flight_passive();
+ new spell_dru_starfall_dummy();
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 96d259817c0..886384a1c68 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -22,10 +22,15 @@
* Scriptnames of files in this file should be prefixed with "spell_gen_"
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "SkillDiscovery.h"
+#include "Cell.h"
+#include "CellImpl.h"
#include "GridNotifiers.h"
+#include "GridNotifiersImpl.h"
+#include "InstanceScript.h"
#include "Group.h"
#include "LFGMgr.h"
@@ -191,7 +196,7 @@ class spell_gen_cannibalize : public SpellScriptLoader
float max_range = GetSpellInfo()->GetMaxRange(false);
WorldObject* result = NULL;
// search for nearby enemy corpse in range
- Trinity::AnyDeadUnitSpellTargetInRangeCheck check(caster, max_range, GetSpellInfo(), TARGET_SELECT_CHECK_ENEMY);
+ Trinity::AnyDeadUnitSpellTargetInRangeCheck check(caster, max_range, GetSpellInfo(), TARGET_CHECK_ENEMY);
Trinity::WorldObjectSearcher<Trinity::AnyDeadUnitSpellTargetInRangeCheck> searcher(caster, result, check);
caster->GetMap()->VisitFirstFound(caster->m_positionX, caster->m_positionY, max_range, searcher);
if (!result)
@@ -236,9 +241,7 @@ class spell_gen_parachute : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_PARACHUTE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_PARACHUTE_BUFF))
+ if (!sSpellMgr->GetSpellInfo(SPELL_PARACHUTE) || !sSpellMgr->GetSpellInfo(SPELL_PARACHUTE_BUFF))
return false;
return true;
}
@@ -246,13 +249,11 @@ class spell_gen_parachute : public SpellScriptLoader
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
if (Player* target = GetTarget()->ToPlayer())
- {
if (target->IsFalling())
{
target->RemoveAurasDueToSpell(SPELL_PARACHUTE);
target->CastSpell(target, SPELL_PARACHUTE_BUFF, true);
}
- }
}
void Register()
@@ -283,13 +284,14 @@ class spell_gen_pet_summoned : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_pet_summoned_SpellScript);
- void HandleScript(SpellEffIndex /*effIndex*/)
+ bool Load()
{
- Unit* caster = GetCaster();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- Player* player = caster->ToPlayer();
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Player* player = GetCaster()->ToPlayer();
if (player->GetLastPetNumber())
{
PetType newPetType = (player->getClass() == CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET;
@@ -340,13 +342,14 @@ class spell_gen_remove_flight_auras : public SpellScriptLoader
class spell_gen_remove_flight_auras_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_remove_flight_auras_SpellScript);
+
void HandleScript(SpellEffIndex /*effIndex*/)
{
- Unit* target = GetHitUnit();
- if (!target)
- return;
- target->RemoveAurasByType(SPELL_AURA_FLY);
- target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED);
+ if (Unit* target = GetHitUnit())
+ {
+ target->RemoveAurasByType(SPELL_AURA_FLY);
+ target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED);
+ }
}
void Register()
@@ -379,22 +382,21 @@ class spell_gen_leeching_swarm : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
+ if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG) || !sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL))
return false;
return true;
}
void HandleEffectPeriodic(AuraEffect const* aurEff)
{
- if (Unit* caster = GetCaster())
+ Unit* caster = GetCaster();
+ if (Unit* target = GetTarget())
{
- int32 lifeLeeched = GetTarget()->CountPctFromCurHealth(aurEff->GetAmount());
+ int32 lifeLeeched = target->CountPctFromCurHealth(aurEff->GetAmount());
if (lifeLeeched < 250)
lifeLeeched = 250;
// Damage
- caster->CastCustomSpell(GetTarget(), SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
+ caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false);
// Heal
caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false);
}
@@ -448,25 +450,22 @@ class spell_gen_elune_candle : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
- if (Unit* target = GetHitUnit())
- {
- uint32 spellId = 0;
+ uint32 spellId = 0;
- if (target->GetEntry() == NPC_OMEN)
+ if (GetHitUnit()->GetEntry() == NPC_OMEN)
+ {
+ switch (urand(0, 3))
{
- switch (urand(0, 3))
- {
- case 0: spellId = SPELL_ELUNE_CANDLE_OMEN_HEAD; break;
- case 1: spellId = SPELL_ELUNE_CANDLE_OMEN_CHEST; break;
- case 2: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_R; break;
- case 3: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_L; break;
- }
+ case 0: spellId = SPELL_ELUNE_CANDLE_OMEN_HEAD; break;
+ case 1: spellId = SPELL_ELUNE_CANDLE_OMEN_CHEST; break;
+ case 2: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_R; break;
+ case 3: spellId = SPELL_ELUNE_CANDLE_OMEN_HAND_L; break;
}
- else
- spellId = SPELL_ELUNE_CANDLE_NORMAL;
-
- GetCaster()->CastSpell(target, spellId, true, NULL);
}
+ else
+ spellId = SPELL_ELUNE_CANDLE_NORMAL;
+
+ GetCaster()->CastSpell(GetHitUnit(), spellId, true, NULL);
}
void Register()
@@ -506,31 +505,16 @@ class spell_gen_trick : public SpellScriptLoader
PrepareSpellScript(spell_gen_trick_SpellScript);
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
+ if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)
+ || !sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE) || !sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF))
return false;
return true;
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
+ Unit* caster = GetCaster();
if (Player* target = GetHitPlayer())
{
uint8 gender = target->getGender();
@@ -556,7 +540,7 @@ class spell_gen_trick : public SpellScriptLoader
break;
}
- GetCaster()->CastSpell(target, spellId, true, NULL);
+ caster->CastSpell(target, spellId, true, NULL);
}
}
@@ -591,21 +575,18 @@ class spell_gen_trick_or_treat : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_TRICK))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_TREAT))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRICK) || !sSpellMgr->GetSpellInfo(SPELL_TREAT) || !sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED))
return false;
return true;
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
+ Unit* caster = GetCaster();
if (Player* target = GetHitPlayer())
{
- GetCaster()->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
- GetCaster()->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
+ caster->CastSpell(target, roll_chance_i(50) ? SPELL_TRICK : SPELL_TREAT, true, NULL);
+ caster->CastSpell(target, SPELL_TRICKED_OR_TREATED, true, NULL);
}
}
@@ -667,11 +648,14 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader
{
PrepareSpellScript(spell_pvp_trinket_wotf_shared_cd_SpellScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER_WOTF))
+ if (!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER) || !sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER_WOTF))
return false;
return true;
}
@@ -679,10 +663,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
- if (!caster)
- return;
SpellInfo const* spellInfo = GetSpellInfo();
-
caster->AddSpellCooldown(spellInfo->Id, 0, time(NULL) + sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER)->GetRecoveryTime() / IN_MILLISECONDS);
WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4);
data << uint64(caster->GetGUID());
@@ -735,8 +716,9 @@ class spell_gen_animal_blood : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (GetUnitOwner()->IsInWater())
- GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SPAWN_BLOOD_POOL, true);
+ if (Unit* owner = GetUnitOwner())
+ if (owner->IsInWater())
+ owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true);
}
void Register()
@@ -767,6 +749,11 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_divine_storm_cd_reset_SpellScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
if (!sSpellMgr->GetSpellInfo(SPELL_DIVINE_STORM))
@@ -776,9 +763,9 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
- if (Player* caster = GetCaster()->ToPlayer())
- if (caster->HasSpellCooldown(SPELL_DIVINE_STORM))
- caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true);
+ Player* caster = GetCaster()->ToPlayer();
+ if (caster->HasSpellCooldown(SPELL_DIVINE_STORM))
+ caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true);
}
void Register()
@@ -802,13 +789,15 @@ class spell_gen_gunship_portal : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_gunship_portal_SpellScript);
- void HandleScript(SpellEffIndex /*effIndex*/)
+ bool Load()
{
- Unit* caster = GetCaster();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- if (Battleground* bg = caster->ToPlayer()->GetBattleground())
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (Battleground* bg = caster->GetBattleground())
if (bg->GetTypeID(true) == BATTLEGROUND_IC)
bg->DoAction(1, caster->GetGUID());
}
@@ -827,7 +816,7 @@ class spell_gen_gunship_portal : public SpellScriptLoader
enum parachuteIC
{
- SPELL_PARACHUTE_IC = 66657
+ SPELL_PARACHUTE_IC = 66657,
};
class spell_gen_parachute_ic : public SpellScriptLoader
@@ -841,13 +830,9 @@ class spell_gen_parachute_ic : public SpellScriptLoader
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{
- Unit* target = GetTarget();
-
- if (!target->ToPlayer())
- return;
-
- if (target->ToPlayer()->m_movementInfo.fallTime > 2000)
- target->CastSpell(target, SPELL_PARACHUTE_IC, true);
+ if (Player* target = GetTarget()->ToPlayer())
+ if (target->m_movementInfo.fallTime > 2000)
+ target->CastSpell(target, SPELL_PARACHUTE_IC, true);
}
void Register()
@@ -874,7 +859,7 @@ class spell_gen_dungeon_credit : public SpellScriptLoader
bool Load()
{
_handled = false;
- return true;
+ return GetCaster()->GetTypeId() == TYPEID_UNIT;
}
void CreditEncounter()
@@ -884,9 +869,9 @@ class spell_gen_dungeon_credit : public SpellScriptLoader
return;
_handled = true;
- if (GetCaster()->GetTypeId() == TYPEID_UNIT)
- if (InstanceScript* instance = GetCaster()->GetInstanceScript())
- instance->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, GetSpellInfo()->Id, GetCaster());
+ Unit* caster = GetCaster();
+ if (InstanceScript* instance = caster->GetInstanceScript())
+ instance->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, GetSpellInfo()->Id, caster);
}
void Register()
@@ -912,9 +897,14 @@ class spell_gen_profession_research : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_profession_research_SpellScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
SpellCastResult CheckRequirement()
{
- if (GetCaster()->GetTypeId() == TYPEID_PLAYER && HasDiscoveredAllSpells(GetSpellInfo()->Id, GetCaster()->ToPlayer()))
+ if (HasDiscoveredAllSpells(GetSpellInfo()->Id, GetCaster()->ToPlayer()))
{
SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_NOTHING_TO_DISCOVER);
return SPELL_FAILED_CUSTOM_ERROR;
@@ -947,11 +937,8 @@ class spell_generic_clone : public SpellScriptLoader
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- Unit* caster = GetCaster();
uint32 spellId = uint32(GetSpellInfo()->Effects[effIndex].CalcValue());
-
- if (Unit* target = GetHitUnit())
- target->CastSpell(caster, spellId, true);
+ GetHitUnit()->CastSpell(GetCaster(), spellId, true);
}
void Register()
@@ -987,19 +974,11 @@ class spell_generic_clone_weapon : public SpellScriptLoader
class spell_generic_clone_weapon_SpellScript : public SpellScript
{
PrepareSpellScript(spell_generic_clone_weapon_SpellScript);
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_2))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_3))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND_2))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_COPY_RANGED))
+ if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON) || !sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_2) || !sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_3) || !sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND)
+ || !sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND_2) || !sSpellMgr->GetSpellInfo(SPELL_COPY_RANGED))
return false;
return true;
}
@@ -1008,57 +987,56 @@ class spell_generic_clone_weapon : public SpellScriptLoader
{
PreventHitDefaultEffect(effIndex);
Unit* caster = GetCaster();
- Unit* target = GetHitUnit();
-
- if (!target)
- return;
+ if (Unit* target = GetHitUnit())
+ {
- uint32 spellId = uint32(GetSpellInfo()->Effects[EFFECT_0].CalcValue());
- target->CastSpell(caster, spellId, true);
+ uint32 spellId = uint32(GetSpellInfo()->Effects[EFFECT_0].CalcValue());
+ target->CastSpell(caster, spellId, true);
- if (target->GetTypeId() == TYPEID_PLAYER)
- return;
+ if (target->GetTypeId() == TYPEID_PLAYER)
+ return;
- switch (GetSpellInfo()->Id)
- {
- case SPELL_COPY_WEAPON:
- case SPELL_COPY_WEAPON_2:
- case SPELL_COPY_WEAPON_3:
+ switch (GetSpellInfo()->Id)
{
- if (Player* player = caster->ToPlayer())
+ case SPELL_COPY_WEAPON:
+ case SPELL_COPY_WEAPON_2:
+ case SPELL_COPY_WEAPON_3:
{
- if (Item* mainItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
- target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, mainItem->GetEntry());
+ if (Player* player = caster->ToPlayer())
+ {
+ if (Item* mainItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
+ target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, mainItem->GetEntry());
+ }
+ else
+ target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID));
+ break;
}
- else
- target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID));
- break;
- }
- case SPELL_COPY_OFFHAND:
- case SPELL_COPY_OFFHAND_2:
- {
- if (Player* player = caster->ToPlayer())
+ case SPELL_COPY_OFFHAND:
+ case SPELL_COPY_OFFHAND_2:
{
- if (Item* offItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
- target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, offItem->GetEntry());
+ if (Player* player = caster->ToPlayer())
+ {
+ if (Item* offItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
+ target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, offItem->GetEntry());
+ }
+ else
+ target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1));
+ break;
}
- else
- target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1));
- break;
- }
- case SPELL_COPY_RANGED:
- {
- if (Player* player = caster->ToPlayer())
+ case SPELL_COPY_RANGED:
{
- if (Item* rangedItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED))
- target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, rangedItem->GetEntry());
+ if (Player* player = caster->ToPlayer())
+ {
+ if (Item* rangedItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED))
+ target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, rangedItem->GetEntry());
+ }
+ else
+ target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2));
+ break;
}
- else
- target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2));
- break;
+ default:
+ break;
}
- default:
- break;
}
}
@@ -1104,10 +1082,10 @@ class spell_gen_seaforium_blast : public SpellScriptLoader
void AchievementCredit(SpellEffIndex /*effIndex*/)
{
// but in effect handling OriginalCaster can become NULL
- if (!GetOriginalCaster() || !GetHitGObj() || GetHitGObj()->GetGOInfo()->type != GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING)
- return;
-
- GetOriginalCaster()->CastSpell(GetOriginalCaster(), SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT, true);
+ if (Unit* originalCaster = GetOriginalCaster())
+ if (GameObject* go = GetHitGObj())
+ if (go->GetGOInfo()->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING)
+ originalCaster->CastSpell(originalCaster, SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT, true);
}
void Register()
@@ -1140,10 +1118,11 @@ class spell_gen_turkey_marker : public SpellScriptLoader
{
// store stack apply times, so we can pop them while they expire
_applyTimes.push_back(getMSTime());
+ Unit* target = GetTarget();
// on stack 15 cast the achievement crediting spell
if (GetStackAmount() >= 15)
- GetTarget()->CastSpell(GetTarget(), SPELL_TURKEY_VENGEANCE, true, NULL, aurEff, GetCasterGUID());
+ target->CastSpell(target, SPELL_TURKEY_VENGEANCE, true, NULL, aurEff, GetCasterGUID());
}
void OnPeriodic(AuraEffect const* /*aurEff*/)
@@ -1217,29 +1196,28 @@ class spell_gen_magic_rooster : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- Player* target = GetHitPlayer();
- if (!target)
- return;
+ if (Player* target = GetHitPlayer())
+ {
+ // prevent client crashes from stacking mounts
+ target->RemoveAurasByType(SPELL_AURA_MOUNTED);
- // prevent client crashes from stacking mounts
- target->RemoveAurasByType(SPELL_AURA_MOUNTED);
+ uint32 spellId = SPELL_MAGIC_ROOSTER_NORMAL;
+ switch (target->getRace())
+ {
+ case RACE_DRAENEI:
+ if (target->getGender() == GENDER_MALE)
+ spellId = SPELL_MAGIC_ROOSTER_DRAENEI_MALE;
+ break;
+ case RACE_TAUREN:
+ if (target->getGender() == GENDER_MALE)
+ spellId = SPELL_MAGIC_ROOSTER_TAUREN_MALE;
+ break;
+ default:
+ break;
+ }
- uint32 spellId = SPELL_MAGIC_ROOSTER_NORMAL;
- switch (target->getRace())
- {
- case RACE_DRAENEI:
- if (target->getGender() == GENDER_MALE)
- spellId = SPELL_MAGIC_ROOSTER_DRAENEI_MALE;
- break;
- case RACE_TAUREN:
- if (target->getGender() == GENDER_MALE)
- spellId = SPELL_MAGIC_ROOSTER_TAUREN_MALE;
- break;
- default:
- break;
+ target->CastSpell(target, spellId, true);
}
-
- target->CastSpell(target, spellId, true);
}
void Register()
@@ -1267,7 +1245,6 @@ public:
{
if (!GetCastItem())
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
-
return SPELL_CAST_OK;
}
@@ -1344,12 +1321,14 @@ class spell_gen_vehicle_scaling : public SpellScriptLoader
{
PrepareAuraScript(spell_gen_vehicle_scaling_AuraScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
Unit* caster = GetCaster();
- if (!caster || !caster->ToPlayer())
- return;
-
float factor;
uint16 baseItemLevel;
@@ -1388,21 +1367,23 @@ class spell_gen_vehicle_scaling : public SpellScriptLoader
};
-class spell_gen_oracle_wolvar_reputation: public SpellScriptLoader
+class spell_gen_oracle_wolvar_reputation : public SpellScriptLoader
{
-public:
- spell_gen_oracle_wolvar_reputation() : SpellScriptLoader("spell_gen_oracle_wolvar_reputation") { }
-
- class spell_gen_oracle_wolvar_reputation_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_oracle_wolvar_reputation_SpellScript)
+ public:
+ spell_gen_oracle_wolvar_reputation() : SpellScriptLoader("spell_gen_oracle_wolvar_reputation") { }
- void HandleDummy(SpellEffIndex effIndex)
+ class spell_gen_oracle_wolvar_reputation_SpellScript : public SpellScript
{
+ PrepareSpellScript(spell_gen_oracle_wolvar_reputation_SpellScript);
- if (Player* player = GetCaster()->ToPlayer())
+ bool Load()
{
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ Player* player = GetCaster()->ToPlayer();
uint32 factionId = GetSpellInfo()->Effects[effIndex].CalcValue();
int32 repChange = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
@@ -1419,18 +1400,16 @@ public:
// EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation
}
- }
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_gen_oracle_wolvar_reputation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_gen_oracle_wolvar_reputation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_gen_oracle_wolvar_reputation_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_oracle_wolvar_reputation_SpellScript();
- }
};
enum DamageReductionAura
@@ -1444,53 +1423,48 @@ enum DamageReductionAura
class spell_gen_damage_reduction_aura : public SpellScriptLoader
{
-public:
- spell_gen_damage_reduction_aura() : SpellScriptLoader("spell_gen_damage_reduction_aura") { }
-
- class spell_gen_damage_reduction_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_gen_damage_reduction_AuraScript);
+ public:
+ spell_gen_damage_reduction_aura() : SpellScriptLoader("spell_gen_damage_reduction_aura") { }
- bool Validate(SpellInfo const* /*SpellEntry*/)
+ class spell_gen_damage_reduction_AuraScript : public AuraScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_DAMAGE_REDUCTION_AURA))
- return false;
- return true;
- }
+ PrepareAuraScript(spell_gen_damage_reduction_AuraScript);
- void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- Unit* target = GetTarget();
- target->CastSpell(target, SPELL_DAMAGE_REDUCTION_AURA, true);
- }
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DAMAGE_REDUCTION_AURA))
+ return false;
+ return true;
+ }
- void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- Unit* target = GetTarget();
- if (!target->HasAura(SPELL_DAMAGE_REDUCTION_AURA))
- return;
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->CastSpell(target, SPELL_DAMAGE_REDUCTION_AURA, true);
+ }
- if (target->HasAura(SPELL_BLESSING_OF_SANCTUARY) ||
- target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY) ||
- target->HasAura(SPELL_RENEWED_HOPE) ||
- target->HasAura(SPELL_VIGILANCE))
- return;
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ if (target->HasAura(SPELL_DAMAGE_REDUCTION_AURA) && !(target->HasAura(SPELL_BLESSING_OF_SANCTUARY) ||
+ target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY) ||
+ target->HasAura(SPELL_RENEWED_HOPE) ||
+ target->HasAura(SPELL_VIGILANCE)))
+ target->RemoveAurasDueToSpell(SPELL_DAMAGE_REDUCTION_AURA);
+ }
- target->RemoveAurasDueToSpell(SPELL_DAMAGE_REDUCTION_AURA);
- }
+ void Register()
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_gen_damage_reduction_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ OnEffectRemove += AuraEffectRemoveFn(spell_gen_damage_reduction_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ }
- void Register()
+ };
+
+ AuraScript* GetAuraScript() const
{
- OnEffectApply += AuraEffectApplyFn(spell_gen_damage_reduction_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- OnEffectRemove += AuraEffectRemoveFn(spell_gen_damage_reduction_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ return new spell_gen_damage_reduction_AuraScript();
}
-
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_gen_damage_reduction_AuraScript();
- }
};
class spell_gen_luck_of_the_draw : public SpellScriptLoader
@@ -1502,6 +1476,11 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
{
PrepareAuraScript(spell_gen_luck_of_the_draw_AuraScript);
+ bool Load()
+ {
+ return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
+ }
+
// cheap hax to make it have update calls
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
{
@@ -1511,30 +1490,30 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
void Update(AuraEffect* /*effect*/)
{
- if (GetUnitOwner()->GetTypeId() != TYPEID_PLAYER)
- return;
-
- const LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(GetUnitOwner()->GetGUID());
- LfgDungeonSet::const_iterator itr = dungeons.begin();
-
- if (itr == dungeons.end())
+ if (Player* owner = GetUnitOwner()->ToPlayer())
{
- Remove(AURA_REMOVE_BY_DEFAULT);
- return;
- }
+ const LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(owner->GetGUID());
+ LfgDungeonSet::const_iterator itr = dungeons.begin();
+
+ if (itr == dungeons.end())
+ {
+ Remove(AURA_REMOVE_BY_DEFAULT);
+ return;
+ }
- LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*itr);
- Group* group = GetUnitOwner()->ToPlayer()->GetGroup();
- Map const* map = GetUnitOwner()->GetMap();
- if (group && group->isLFGGroup())
- if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
- if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
- if (dungeon->map == map->GetId() && dungeon->difficulty == map->GetDifficulty())
- if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
- return; // in correct dungeon
+ LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*itr);
+ if (Group* group = owner->GetGroup())
+ if (Map const* map = owner->GetMap())
+ if (group->isLFGGroup())
+ if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
+ if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
+ if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
+ return; // in correct dungeon
- Remove(AURA_REMOVE_BY_DEFAULT);
+ Remove(AURA_REMOVE_BY_DEFAULT);
+ }
}
void Register()
@@ -1550,6 +1529,178 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
}
};
+enum DummyTrigger
+{
+ SPELL_PERSISTANT_SHIELD_TRIGGERED = 26470,
+ SPELL_PERSISTANT_SHIELD = 26467,
+};
+
+class spell_gen_dummy_trigger : public SpellScriptLoader
+{
+ public:
+ spell_gen_dummy_trigger() : SpellScriptLoader("spell_gen_dummy_trigger") { }
+
+ class spell_gen_dummy_trigger_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_dummy_trigger_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PERSISTANT_SHIELD_TRIGGERED) || !sSpellMgr->GetSpellInfo(SPELL_PERSISTANT_SHIELD))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ if (SpellInfo const* triggeredByAuraSpell = GetTriggeringSpell())
+ if (triggeredByAuraSpell->Id == SPELL_PERSISTANT_SHIELD_TRIGGERED)
+ caster->CastCustomSpell(target, SPELL_PERSISTANT_SHIELD_TRIGGERED, &damage, NULL, NULL, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_dummy_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_dummy_trigger_SpellScript();
+ }
+
+};
+
+class spell_gen_spirit_healer_res : public SpellScriptLoader
+{
+ public:
+ spell_gen_spirit_healer_res(): SpellScriptLoader("spell_gen_spirit_healer_res") { }
+
+ class spell_gen_spirit_healer_res_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_spirit_healer_res_SpellScript);
+
+ bool Load()
+ {
+ return GetOriginalCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (Player* originalCaster = GetOriginalCaster()->ToPlayer())
+ {
+ if (Unit* target = GetHitUnit())
+ {
+ WorldPacket data(SMSG_SPIRIT_HEALER_CONFIRM, 8);
+ data << uint64(target->GetGUID());
+ originalCaster->GetSession()->SendPacket(&data);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_spirit_healer_res_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_spirit_healer_res_SpellScript();
+ }
+};
+
+enum TransporterBackfires
+{
+ SPELL_TRANSPORTER_MALFUNCTION_POLYMORPH = 23444,
+ SPELL_TRANSPORTER_EVIL_TWIN = 23445,
+ SPELL_TRANSPORTER_MALFUNCTION_MISS = 36902,
+};
+
+class spell_gen_gadgetzan_transporter_backfire : public SpellScriptLoader
+{
+ public:
+ spell_gen_gadgetzan_transporter_backfire() : SpellScriptLoader("spell_gen_gadgetzan_transporter_backfire") { }
+
+ class spell_gen_gadgetzan_transporter_backfire_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_gadgetzan_transporter_backfire_SpellScript)
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_MALFUNCTION_POLYMORPH) || !sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_EVIL_TWIN)
+ || !sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_MALFUNCTION_MISS))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ int32 r = irand(0, 119);
+ if (r < 20) // Transporter Malfunction - 1/6 polymorph
+ caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_POLYMORPH, true);
+ else if (r < 100) // Evil Twin - 4/6 evil twin
+ caster->CastSpell(caster, SPELL_TRANSPORTER_EVIL_TWIN, true);
+ else // Transporter Malfunction - 1/6 miss the target
+ caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_MISS, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_gadgetzan_transporter_backfire_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_gadgetzan_transporter_backfire_SpellScript();
+ }
+};
+
+enum GnomishTransporter
+{
+ SPELL_TRANSPORTER_SUCCESS = 23441,
+ SPELL_TRANSPORTER_FAILURE = 23446,
+};
+
+class spell_gen_gnomish_transporter : public SpellScriptLoader
+{
+ public:
+ spell_gen_gnomish_transporter() : SpellScriptLoader("spell_gen_gnomish_transporter") { }
+
+ class spell_gen_gnomish_transporter_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_gnomish_transporter_SpellScript)
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_SUCCESS) || !sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_FAILURE))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, roll_chance_i(50) ? SPELL_TRANSPORTER_SUCCESS : SPELL_TRANSPORTER_FAILURE , true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_gnomish_transporter_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_gnomish_transporter_SpellScript();
+ }
+};
+
enum DalaranDisguiseSpells
{
SPELL_SUNREAVER_DISGUISE_TRIGGER = 69672,
@@ -1574,15 +1725,11 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
switch (spellEntry->Id)
{
case SPELL_SUNREAVER_DISGUISE_TRIGGER:
- if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_MALE))
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_MALE))
return false;
break;
case SPELL_SILVER_COVENANT_DISGUISE_TRIGGER:
- if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_MALE))
+ if (!sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_SILVER_COVENANT_DISGUISE_MALE))
return false;
break;
}
@@ -1591,7 +1738,6 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
-
if (Player* player = GetHitPlayer())
{
uint8 gender = player->getGender();
@@ -1609,7 +1755,6 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
default:
break;
}
-
GetCaster()->CastSpell(player, spellId, true);
}
}
@@ -1661,66 +1806,76 @@ enum BreakShieldSpells
class spell_gen_break_shield: public SpellScriptLoader
{
-public:
- spell_gen_break_shield() : SpellScriptLoader("spell_gen_break_shield") { }
-
- class spell_gen_break_shield_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_break_shield_SpellScript)
+ public:
+ spell_gen_break_shield(const char* name) : SpellScriptLoader(name) {}
- void HandleScriptEffect(SpellEffIndex effIndex)
+ class spell_gen_break_shield_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
-
- if (!caster || !target)
- return;
+ PrepareSpellScript(spell_gen_break_shield_SpellScript)
- switch (effIndex)
+ void HandleScriptEffect(SpellEffIndex effIndex)
{
- case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
- uint32 spellId;
- switch (GetSpellInfo()->Id)
+ Unit* target = GetHitUnit();
+
+ switch (effIndex)
+ {
+ case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
{
- case SPELL_BREAK_SHIELD_TRIGGER_UNK:
- case SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE:
- spellId = SPELL_BREAK_SHIELD_DAMAGE_10K;
- break;
- case SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS:
- spellId = SPELL_BREAK_SHIELD_DAMAGE_2K;
- break;
- default:
- return;
- }
+ uint32 spellId;
- if (Unit* rider = caster->GetCharmer())
- rider->CastSpell(target, spellId, false);
- else
- caster->CastSpell(target, spellId, false);
- break;
- case EFFECT_1: // On damaging spells, for removing the a defend layer
- Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
- for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_BREAK_SHIELD_TRIGGER_UNK:
+ case SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE:
+ spellId = SPELL_BREAK_SHIELD_DAMAGE_10K;
+ break;
+ case SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS:
+ spellId = SPELL_BREAK_SHIELD_DAMAGE_2K;
+ break;
+ default:
+ return;
+ }
+
+ if (Unit* rider = GetCaster()->GetCharmer())
+ rider->CastSpell(target, spellId, false);
+ else
+ GetCaster()->CastSpell(target, spellId, false);
+ break;
+ }
+ case EFFECT_1: // On damaging spells, for removing a defend layer
{
- Aura* aura = itr->second->GetBase();
- SpellInfo const* auraInfo = aura->GetSpellInfo();
- if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
- aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ {
+ Aura* aura = itr->second->GetBase();
+ SpellInfo const* auraInfo = aura->GetSpellInfo();
+ if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
+ {
+ aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ // Remove dummys from rider (Necessary for updating visual shields)
+ if (Unit* rider = target->GetCharmer())
+ if (Aura* defend = rider->GetAura(aura->GetId()))
+ defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ break;
+ }
+ }
+ break;
}
- break;
+ default:
+ break;
+ }
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_break_shield_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_gen_break_shield_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_gen_break_shield_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_break_shield_SpellScript();
- }
};
/* DOCUMENTATION: Charge spells
@@ -1775,109 +1930,111 @@ enum ChargeSpells
class spell_gen_mounted_charge: public SpellScriptLoader
{
-public:
- spell_gen_mounted_charge() : SpellScriptLoader("spell_gen_mounted_charge") { }
-
- class spell_gen_mounted_charge_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_gen_mounted_charge_SpellScript)
+ public:
+ spell_gen_mounted_charge() : SpellScriptLoader("spell_gen_mounted_charge") { }
- void HandleScriptEffect(SpellEffIndex effIndex)
+ class spell_gen_mounted_charge_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
-
- if (!caster || !target)
- return;
+ PrepareSpellScript(spell_gen_mounted_charge_SpellScript)
- switch (effIndex)
+ void HandleScriptEffect(SpellEffIndex effIndex)
{
- case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
- uint32 spellId;
+ Unit* target = GetHitUnit();
- switch (GetSpellInfo()->Id)
+ switch (effIndex)
+ {
+ case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
{
- case SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION:
- spellId = SPELL_CHARGE_CHARGING_EFFECT_20K_1;
- case SPELL_CHARGE_TRIGGER_FACTION_MOUNTS:
- spellId = SPELL_CHARGE_CHARGING_EFFECT_8K5;
- break;
- default:
- return;
- }
+ uint32 spellId;
- if (Unit* vehicle = caster->GetVehicleBase())
- vehicle->CastSpell(target, spellId, false);
- else
- caster->CastSpell(target, spellId, false);
- break;
- case EFFECT_1: // On damaging spells, for removing the a defend layer
- case EFFECT_2:
- Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
- for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION:
+ spellId = SPELL_CHARGE_CHARGING_EFFECT_20K_1;
+ break;
+ case SPELL_CHARGE_TRIGGER_FACTION_MOUNTS:
+ spellId = SPELL_CHARGE_CHARGING_EFFECT_8K5;
+ break;
+ default:
+ return;
+ }
+
+ // If target isn't a training dummy there's a chance of failing the charge
+ if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE) && roll_chance_f(12.5f))
+ spellId = SPELL_CHARGE_MISS_EFFECT;
+
+ if (Unit* vehicle = GetCaster()->GetVehicleBase())
+ vehicle->CastSpell(target, spellId, false);
+ else
+ GetCaster()->CastSpell(target, spellId, false);
+ break;
+ }
+ case EFFECT_1: // On damaging spells, for removing a defend layer
+ case EFFECT_2:
{
- Aura* aura = itr->second->GetBase();
- SpellInfo const* auraInfo = aura->GetSpellInfo();
- if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
- aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ {
+ Aura* aura = itr->second->GetBase();
+ SpellInfo const* auraInfo = aura->GetSpellInfo();
+ if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
+ {
+ aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ // Remove dummys from rider (Necessary for updating visual shields)
+ if (Unit* rider = target->GetCharmer())
+ if (Aura* defend = rider->GetAura(aura->GetId()))
+ defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
+ break;
+ }
+ }
+ break;
}
- break;
+ }
}
- }
- void HandleChargeEffect(SpellEffIndex effIndex)
- {
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
+ void HandleChargeEffect(SpellEffIndex /*effIndex*/)
+ {
+ uint32 spellId;
- if (!caster || !target)
- return;
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_CHARGE_CHARGING_EFFECT_8K5:
+ spellId = SPELL_CHARGE_DAMAGE_8K5;
+ break;
+ case SPELL_CHARGE_CHARGING_EFFECT_20K_1:
+ case SPELL_CHARGE_CHARGING_EFFECT_20K_2:
+ spellId = SPELL_CHARGE_DAMAGE_20K;
+ break;
+ case SPELL_CHARGE_CHARGING_EFFECT_45K_1:
+ case SPELL_CHARGE_CHARGING_EFFECT_45K_2:
+ spellId = SPELL_CHARGE_DAMAGE_45K;
+ break;
+ default:
+ return;
+ }
- uint32 spellId;
+ if (Unit* rider = GetCaster()->GetCharmer())
+ rider->CastSpell(GetHitUnit(), spellId, false);
+ else
+ GetCaster()->CastSpell(GetHitUnit(), spellId, false);
+ }
- switch (GetSpellInfo()->Id)
+ void Register()
{
- case SPELL_CHARGE_CHARGING_EFFECT_8K5:
- spellId = SPELL_CHARGE_DAMAGE_8K5;
- break;
- case SPELL_CHARGE_CHARGING_EFFECT_20K_1:
- case SPELL_CHARGE_CHARGING_EFFECT_20K_2:
- spellId = SPELL_CHARGE_DAMAGE_20K;
- break;
- case SPELL_CHARGE_CHARGING_EFFECT_45K_1:
- case SPELL_CHARGE_CHARGING_EFFECT_45K_2:
- spellId = SPELL_CHARGE_DAMAGE_45K;
- break;
- default:
- return;
- }
+ SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
- // If target isn't a training dummy there's a chance of failing the charge
- if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE) && urand(0,7) == 0)
- spellId = SPELL_CHARGE_MISS_EFFECT;
+ if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
+ OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
- if (Unit* rider = caster->GetCharmer())
- rider->CastSpell(target, spellId, false);
- else
- caster->CastSpell(target, spellId, false);
- }
+ if (spell->Effects[EFFECT_0].Effect == SPELL_EFFECT_CHARGE)
+ OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleChargeEffect, EFFECT_0, SPELL_EFFECT_CHARGE);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
-
- if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
- OnEffectHit += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
-
- if (spell->Effects[EFFECT_0].Effect == SPELL_EFFECT_CHARGE)
- OnEffectHit += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleChargeEffect, EFFECT_0, SPELL_EFFECT_CHARGE);
+ return new spell_gen_mounted_charge_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_gen_mounted_charge_SpellScript();
- }
};
enum DefendVisuals
@@ -1907,44 +2064,33 @@ class spell_gen_defend : public SpellScriptLoader
return true;
}
- void RefreshVisualShields(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ void RefreshVisualShields(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
- Unit* target = GetTarget();
-
- if(!target)
- return;
-
- if (!caster)
+ if (GetCaster())
{
- target->RemoveAurasDueToSpell(GetId());
- return;
- }
+ Unit* target = GetTarget();
- for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
- target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
+ for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
+ target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
- target->CastSpell(target, SPELL_VISUAL_SHIELD_1 + GetAura()->GetStackAmount() - 1);
+ target->CastSpell(target, SPELL_VISUAL_SHIELD_1 + GetAura()->GetStackAmount() - 1, true, NULL, aurEff);
+ }
+ else
+ GetTarget()->RemoveAurasDueToSpell(GetId());
}
void RemoveVisualShields(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
-
- if(!target)
- return;
-
for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
- target->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
+ GetTarget()->RemoveAurasDueToSpell(SPELL_VISUAL_SHIELD_1 + i);
}
void RemoveDummyFromDriver(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
-
- if (caster && caster->ToTempSummon())
- if (Unit* rider = caster->ToTempSummon()->GetSummoner())
- rider->RemoveAurasDueToSpell(GetId());
+ if (Unit* caster = GetCaster())
+ if (TempSummon* vehicle = caster->ToTempSummon())
+ if (Unit* rider = vehicle->GetSummoner())
+ rider->RemoveAurasDueToSpell(GetId());
}
void Register()
@@ -1955,7 +2101,7 @@ class spell_gen_defend : public SpellScriptLoader
if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
{
AfterEffectApply += AuraEffectApplyFn(spell_gen_defendAuraScript::RefreshVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
+ OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
}
// Remove Defend spell from player when he dismounts
@@ -1966,7 +2112,7 @@ class spell_gen_defend : public SpellScriptLoader
if (spell->Effects[EFFECT_1].ApplyAuraName == SPELL_AURA_DUMMY)
{
AfterEffectApply += AuraEffectApplyFn(spell_gen_defendAuraScript::RefreshVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ OnEffectRemove += AuraEffectRemoveFn(spell_gen_defendAuraScript::RemoveVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
}
}
};
@@ -2001,35 +2147,26 @@ class spell_gen_tournament_duel : public SpellScriptLoader
return true;
}
- void HandleScriptEffect(SpellEffIndex effIndex)
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
- Unit* caster = GetCaster();
- Unit* target = GetTargetUnit();
- Unit* player = GetCaster()->GetCharmer();
-
- if (!caster || !target || !player)
- return;
-
- if (target->GetTypeId() == TYPEID_PLAYER)
- {
-
- if (!target->HasAura(SPELL_ON_TOURNAMENT_MOUNT) || !target->GetVehicleBase())
- return;
-
- player->CastSpell(target, SPELL_MOUNTED_DUEL, true);
- }
- else if (target->GetTypeId() == TYPEID_UNIT)
+ if (Unit* rider = GetCaster()->GetCharmer())
{
- if (!target->GetCharmer() || target->GetCharmer()->GetTypeId() != TYPEID_PLAYER || !target->GetCharmer()->HasAura(SPELL_ON_TOURNAMENT_MOUNT))
- return;
-
- player->CastSpell(target->GetCharmer(), SPELL_MOUNTED_DUEL, true);
+ if (Player* plrTarget = GetHitPlayer())
+ {
+ if (plrTarget->HasAura(SPELL_ON_TOURNAMENT_MOUNT) && plrTarget->GetVehicleBase())
+ rider->CastSpell(plrTarget, SPELL_MOUNTED_DUEL, true);
+ }
+ else if (Unit* unitTarget = GetHitUnit())
+ {
+ if (unitTarget->GetCharmer() && unitTarget->GetCharmer()->GetTypeId() == TYPEID_PLAYER && unitTarget->GetCharmer()->HasAura(SPELL_ON_TOURNAMENT_MOUNT))
+ rider->CastSpell(unitTarget->GetCharmer(), SPELL_MOUNTED_DUEL, true);
+ }
}
}
void Register()
{
- OnEffectHit += SpellEffectFn(spell_gen_tournament_duel_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ OnEffectHitTarget += SpellEffectFn(spell_gen_tournament_duel_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -2062,9 +2199,10 @@ class spell_gen_summon_tournament_mount : public SpellScriptLoader
SpellCastResult CheckIfLanceEquiped()
{
- Unit* caster = GetCaster();
+ if (GetCaster()->IsInDisallowedMountForm())
+ GetCaster()->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
- if (!caster->HasAura(SPELL_LANCE_EQUIPPED))
+ if (!GetCaster()->HasAura(SPELL_LANCE_EQUIPPED))
{
SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED);
return SPELL_FAILED_CUSTOM_ERROR;
@@ -2194,25 +2332,24 @@ class spell_gen_on_tournament_mount : public SpellScriptLoader
bool Load()
{
_pennantSpellId = 0;
- return (GetCaster()->GetTypeId() == TYPEID_PLAYER);
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
-
- if (caster && caster->GetVehicleBase())
+ if (Unit* caster = GetCaster())
{
- _pennantSpellId = GetPennatSpellId(caster->ToPlayer(), caster->GetVehicleBase());
- caster->CastSpell(caster, _pennantSpellId,true);
+ if (Unit* vehicle = caster->GetVehicleBase())
+ {
+ _pennantSpellId = GetPennatSpellId(caster->ToPlayer(), vehicle);
+ caster->CastSpell(caster, _pennantSpellId, true);
+ }
}
}
void HandleRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* caster = GetCaster();
-
- if (caster)
+ if (Unit* caster = GetCaster())
caster->RemoveAurasDueToSpell(_pennantSpellId);
}
@@ -2348,12 +2485,16 @@ class spell_gen_tournament_pennant : public SpellScriptLoader
{
PrepareAuraScript(spell_gen_tournament_pennantAuraScript);
- void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ bool Load()
{
- Unit* caster = GetCaster();
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- if (caster && caster->GetTypeId() == TYPEID_PLAYER && !caster->GetVehicleBase())
- caster->RemoveAurasDueToSpell(GetId());
+ void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (!caster->GetVehicleBase())
+ caster->RemoveAurasDueToSpell(GetId());
}
void Register()
@@ -2368,6 +2509,47 @@ class spell_gen_tournament_pennant : public SpellScriptLoader
}
};
+enum ChaosBlast
+{
+ SPELL_CHAOS_BLAST = 37675,
+};
+
+class spell_gen_chaos_blast : public SpellScriptLoader
+{
+ public:
+ spell_gen_chaos_blast() : SpellScriptLoader("spell_gen_chaos_blast") { }
+
+ class spell_gen_chaos_blast_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_chaos_blast_SpellScript)
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CHAOS_BLAST))
+ return false;
+ return true;
+ }
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 basepoints0 = 100;
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ caster->CastCustomSpell(target, SPELL_CHAOS_BLAST, &basepoints0, NULL, NULL, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_chaos_blast_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_gen_chaos_blast_SpellScript();
+ }
+
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -2401,14 +2583,20 @@ void AddSC_generic_spell_scripts()
new spell_gen_oracle_wolvar_reputation();
new spell_gen_damage_reduction_aura();
new spell_gen_luck_of_the_draw();
+ new spell_gen_dummy_trigger();
+ new spell_gen_spirit_healer_res();
+ new spell_gen_gadgetzan_transporter_backfire();
+ new spell_gen_gnomish_transporter();
new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise");
new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise");
new spell_gen_elune_candle();
- new spell_gen_break_shield();
+ new spell_gen_break_shield("spell_gen_break_shield");
+ new spell_gen_break_shield("spell_gen_tournament_counterattack");
new spell_gen_mounted_charge();
new spell_gen_defend();
new spell_gen_tournament_duel();
new spell_gen_summon_tournament_mount();
new spell_gen_on_tournament_mount();
new spell_gen_tournament_pennant();
+ new spell_gen_chaos_blast();
}
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
new file mode 100644
index 00000000000..dabe978b58c
--- /dev/null
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Spells used in holidays/game events that do not fit any other category.
+ * Scriptnames in this file should be prefixed with "spell_#holidayname_".
+ */
+
+#include "ScriptPCH.h"
+
+// 45102 Romantic Picnic
+enum SpellsPicnic
+{
+ SPELL_BASKET_CHECK = 45119, // Holiday - Valentine - Romantic Picnic Near Basket Check
+ SPELL_MEAL_PERIODIC = 45103, // Holiday - Valentine - Romantic Picnic Meal Periodic - effect dummy
+ SPELL_MEAL_EAT_VISUAL = 45120, // Holiday - Valentine - Romantic Picnic Meal Eat Visual
+ //SPELL_MEAL_PARTICLE = 45114, // Holiday - Valentine - Romantic Picnic Meal Particle - unused
+ SPELL_DRINK_VISUAL = 45121, // Holiday - Valentine - Romantic Picnic Drink Visual
+ SPELL_ROMANTIC_PICNIC_ACHIEV = 45123, // Romantic Picnic periodic = 5000
+};
+
+class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader
+{
+ public:
+ spell_love_is_in_the_air_romantic_picnic() : SpellScriptLoader("spell_love_is_in_the_air_romantic_picnic") { }
+
+ class spell_love_is_in_the_air_romantic_picnic_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_love_is_in_the_air_romantic_picnic_AuraScript);
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->SetStandState(UNIT_STAND_STATE_SIT);
+ target->CastSpell(target, SPELL_MEAL_PERIODIC, false);
+ }
+
+ void OnPeriodic(AuraEffect const* /*aurEff*/)
+ {
+ // Every 5 seconds
+ Unit* target = GetTarget();
+ Unit* caster = GetCaster();
+
+ // If our player is no longer sit, remove all auras
+ if (target->getStandState() != UNIT_STAND_STATE_SIT)
+ {
+ target->RemoveAura(SPELL_ROMANTIC_PICNIC_ACHIEV);
+ target->RemoveAura(GetAura());
+ return;
+ }
+
+ target->CastSpell(target, SPELL_BASKET_CHECK, false); // unknown use, it targets Romantic Basket
+ target->CastSpell(target, RAND(SPELL_MEAL_EAT_VISUAL, SPELL_DRINK_VISUAL), false);
+
+ bool foundSomeone = false;
+ // For nearby players, check if they have the same aura. If so, cast Romantic Picnic (45123)
+ // required by achievement and "hearts" visual
+ std::list<Player*> playerList;
+ Trinity::AnyPlayerInObjectRangeCheck checker(target, INTERACTION_DISTANCE*2);
+ Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(target, playerList, checker);
+ target->VisitNearbyWorldObject(INTERACTION_DISTANCE*2, searcher);
+ for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
+ {
+ if ((*itr) != target && (*itr)->HasAura(GetId())) // && (*itr)->getStandState() == UNIT_STAND_STATE_SIT)
+ {
+ if (caster)
+ {
+ caster->CastSpell(*itr, SPELL_ROMANTIC_PICNIC_ACHIEV, true);
+ caster->CastSpell(target, SPELL_ROMANTIC_PICNIC_ACHIEV, true);
+ }
+ foundSomeone = true;
+ // break;
+ }
+ }
+
+ if (!foundSomeone && target->HasAura(SPELL_ROMANTIC_PICNIC_ACHIEV))
+ target->RemoveAura(SPELL_ROMANTIC_PICNIC_ACHIEV);
+ }
+
+ void Register()
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_love_is_in_the_air_romantic_picnic_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_love_is_in_the_air_romantic_picnic_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_love_is_in_the_air_romantic_picnic_AuraScript();
+ }
+};
+
+void AddSC_holiday_spell_scripts()
+{
+ new spell_love_is_in_the_air_romantic_picnic();
+}
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 8a3424ab1e7..855af75cd83 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -21,9 +21,13 @@
* Scriptnames of files in this file should be prefixed with "spell_hun_".
*/
-#include "ScriptPCH.h"
-#include "SpellAuraEffects.h"
+#include "ScriptMgr.h"
+#include "Cell.h"
+#include "CellImpl.h"
#include "GridNotifiers.h"
+#include "GridNotifiersImpl.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
enum HunterSpells
{
@@ -45,219 +49,215 @@ enum HunterSpells
// 13161 Aspect of the Beast
class spell_hun_aspect_of_the_beast : public SpellScriptLoader
{
-public:
- spell_hun_aspect_of_the_beast() : SpellScriptLoader("spell_hun_aspect_of_the_beast") { }
+ public:
+ spell_hun_aspect_of_the_beast() : SpellScriptLoader("spell_hun_aspect_of_the_beast") { }
- class spell_hun_aspect_of_the_beast_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_hun_aspect_of_the_beast_AuraScript)
- bool Validate(SpellInfo const* /*entry*/)
+ class spell_hun_aspect_of_the_beast_AuraScript : public AuraScript
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET))
- return false;
- return true;
- }
+ PrepareAuraScript(spell_hun_aspect_of_the_beast_AuraScript);
- void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- if (!GetCaster())
- return;
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- Unit* caster = GetCaster();
- if (caster->ToPlayer())
- if (Pet* pet = caster->ToPlayer()->GetPet())
- pet->RemoveAurasDueToSpell(HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET);
- }
+ bool Validate(SpellInfo const* /*entry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET))
+ return false;
+ return true;
+ }
- void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- if (!GetCaster())
- return;
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* caster = GetCaster()->ToPlayer())
+ if (Pet* pet = caster->GetPet())
+ pet->RemoveAurasDueToSpell(HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET);
+ }
- Unit* caster = GetCaster();
- if (caster->ToPlayer())
- if (caster->ToPlayer()->GetPet())
- caster->CastSpell(caster, HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET, true);
- }
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* caster = GetCaster()->ToPlayer())
+ if (caster->GetPet())
+ caster->CastSpell(caster, HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET, true);
+ }
- void Register()
+ void Register()
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_hun_aspect_of_the_beast_AuraScript::OnApply, EFFECT_0, SPELL_AURA_UNTRACKABLE, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_hun_aspect_of_the_beast_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_UNTRACKABLE, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
{
- AfterEffectApply += AuraEffectApplyFn(spell_hun_aspect_of_the_beast_AuraScript::OnApply, EFFECT_0, SPELL_AURA_UNTRACKABLE, AURA_EFFECT_HANDLE_REAL);
- AfterEffectRemove += AuraEffectRemoveFn(spell_hun_aspect_of_the_beast_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_UNTRACKABLE, AURA_EFFECT_HANDLE_REAL);
+ return new spell_hun_aspect_of_the_beast_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_hun_aspect_of_the_beast_AuraScript();
- }
};
// 53209 Chimera Shot
class spell_hun_chimera_shot : public SpellScriptLoader
{
-public:
- spell_hun_chimera_shot() : SpellScriptLoader("spell_hun_chimera_shot") { }
+ public:
+ spell_hun_chimera_shot() : SpellScriptLoader("spell_hun_chimera_shot") { }
- class spell_hun_chimera_shot_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_chimera_shot_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_hun_chimera_shot_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SERPENT))
- return false;
- if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_VIPER))
- return false;
- if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SCORPID))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_hun_chimera_shot_SpellScript);
- void HandleScriptEffect(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- Unit* unitTarget = GetHitUnit();
- if (!unitTarget)
- return;
-
- uint32 spellId = 0;
- int32 basePoint = 0;
- Unit::AuraApplicationMap& Auras = unitTarget->GetAppliedAuras();
- for (Unit::AuraApplicationMap::iterator i = Auras.begin(); i != Auras.end(); ++i)
- {
- Aura* aura = i->second->GetBase();
- if (aura->GetCasterGUID() != caster->GetGUID())
- continue;
-
- // Search only Serpent Sting, Viper Sting, Scorpid Sting auras
- flag96 familyFlag = aura->GetSpellInfo()->SpellFamilyFlags;
- if (!(familyFlag[1] & 0x00000080 || familyFlag[0] & 0x0000C000))
- continue;
- if (AuraEffect const* aurEff = aura->GetEffect(0))
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SERPENT) || !sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_VIPER) || !sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SCORPID))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* unitTarget = GetHitUnit())
{
- // Serpent Sting - Instantly deals 40% of the damage done by your Serpent Sting.
- if (familyFlag[0] & 0x4000)
- {
- int32 TickCount = aurEff->GetTotalTicks();
- spellId = HUNTER_SPELL_CHIMERA_SHOT_SERPENT;
- basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellInfo(), aurEff->GetAmount(), DOT, aura->GetStackAmount());
- ApplyPctN(basePoint, TickCount * 40);
- }
- // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting.
- else if (familyFlag[1] & 0x00000080)
+ uint32 spellId = 0;
+ int32 basePoint = 0;
+ Unit::AuraApplicationMap& Auras = unitTarget->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::iterator i = Auras.begin(); i != Auras.end(); ++i)
{
- int32 TickCount = aura->GetEffect(0)->GetTotalTicks();
- spellId = HUNTER_SPELL_CHIMERA_SHOT_VIPER;
-
- // Amount of one aura tick
- basePoint = int32(CalculatePctN(unitTarget->GetMaxPower(POWER_MANA), aurEff->GetAmount()));
- int32 casterBasePoint = aurEff->GetAmount() * unitTarget->GetMaxPower(POWER_MANA) / 50; // TODO: WTF? caster uses unitTarget?
- if (basePoint > casterBasePoint)
- basePoint = casterBasePoint;
- ApplyPctN(basePoint, TickCount * 60);
+ Aura* aura = i->second->GetBase();
+ if (aura->GetCasterGUID() != caster->GetGUID())
+ continue;
+
+ // Search only Serpent Sting, Viper Sting, Scorpid Sting auras
+ flag96 familyFlag = aura->GetSpellInfo()->SpellFamilyFlags;
+ if (!(familyFlag[1] & 0x00000080 || familyFlag[0] & 0x0000C000))
+ continue;
+ if (AuraEffect const* aurEff = aura->GetEffect(0))
+ {
+ // Serpent Sting - Instantly deals 40% of the damage done by your Serpent Sting.
+ if (familyFlag[0] & 0x4000)
+ {
+ int32 TickCount = aurEff->GetTotalTicks();
+ spellId = HUNTER_SPELL_CHIMERA_SHOT_SERPENT;
+ basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellInfo(), aurEff->GetAmount(), DOT, aura->GetStackAmount());
+ ApplyPctN(basePoint, TickCount * 40);
+ }
+ // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting.
+ else if (familyFlag[1] & 0x00000080)
+ {
+ int32 TickCount = aura->GetEffect(0)->GetTotalTicks();
+ spellId = HUNTER_SPELL_CHIMERA_SHOT_VIPER;
+
+ // Amount of one aura tick
+ basePoint = int32(CalculatePctN(unitTarget->GetMaxPower(POWER_MANA), aurEff->GetAmount()));
+ int32 casterBasePoint = aurEff->GetAmount() * unitTarget->GetMaxPower(POWER_MANA) / 50; // TODO: WTF? caster uses unitTarget?
+ if (basePoint > casterBasePoint)
+ basePoint = casterBasePoint;
+ ApplyPctN(basePoint, TickCount * 60);
+ }
+ // Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute.
+ else if (familyFlag[0] & 0x00008000)
+ spellId = HUNTER_SPELL_CHIMERA_SHOT_SCORPID;
+ // ?? nothing say in spell desc (possibly need addition check)
+ //if (familyFlag & 0x0000010000000000LL || // dot
+ // familyFlag & 0x0000100000000000LL) // stun
+ //{
+ // spellId = 53366; // 53366 Chimera Shot - Wyvern
+ //}
+
+ // Refresh aura duration
+ aura->RefreshDuration();
+ }
+ break;
}
- // Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute.
- else if (familyFlag[0] & 0x00008000)
- spellId = HUNTER_SPELL_CHIMERA_SHOT_SCORPID;
- // ?? nothing say in spell desc (possibly need addition check)
- //if (familyFlag & 0x0000010000000000LL || // dot
- // familyFlag & 0x0000100000000000LL) // stun
- //{
- // spellId = 53366; // 53366 Chimera Shot - Wyvern
- //}
-
- // Refresh aura duration
- aura->RefreshDuration();
+ if (spellId)
+ caster->CastCustomSpell(unitTarget, spellId, &basePoint, 0, 0, true);
+ if (spellId == HUNTER_SPELL_CHIMERA_SHOT_SCORPID && caster->ToPlayer()) // Scorpid Sting - Add 1 minute cooldown
+ caster->ToPlayer()->AddSpellCooldown(spellId, 0, uint32(time(NULL) + 60));
}
- break;
}
- if (spellId)
- caster->CastCustomSpell(unitTarget, spellId, &basePoint, 0, 0, true);
- if (spellId == HUNTER_SPELL_CHIMERA_SHOT_SCORPID && caster->ToPlayer()) // Scorpid Sting - Add 1 minute cooldown
- caster->ToPlayer()->AddSpellCooldown(spellId, 0, uint32(time(NULL) + 60));
- }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_hun_chimera_shot_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_chimera_shot_SpellScript();
- }
};
// 53412 Invigoration
class spell_hun_invigoration : public SpellScriptLoader
{
-public:
- spell_hun_invigoration() : SpellScriptLoader("spell_hun_invigoration") { }
+ public:
+ spell_hun_invigoration() : SpellScriptLoader("spell_hun_invigoration") { }
- class spell_hun_invigoration_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_invigoration_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_hun_invigoration_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_INVIGORATION_TRIGGERED))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_hun_invigoration_SpellScript);
- void HandleScriptEffect(SpellEffIndex /*effIndex*/)
- {
- if (Unit* unitTarget = GetHitUnit())
- if (AuraEffect* aurEff = unitTarget->GetDummyAuraEffect(SPELLFAMILY_HUNTER, 3487, 0))
- if (roll_chance_i(aurEff->GetAmount()))
- unitTarget->CastSpell(unitTarget, HUNTER_SPELL_INVIGORATION_TRIGGERED, true);
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_INVIGORATION_TRIGGERED))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* unitTarget = GetHitUnit())
+ if (AuraEffect* aurEff = unitTarget->GetDummyAuraEffect(SPELLFAMILY_HUNTER, 3487, 0))
+ if (roll_chance_i(aurEff->GetAmount()))
+ unitTarget->CastSpell(unitTarget, HUNTER_SPELL_INVIGORATION_TRIGGERED, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hun_invigoration_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_hun_invigoration_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_hun_invigoration_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_invigoration_SpellScript();
- }
};
class spell_hun_last_stand_pet : public SpellScriptLoader
{
-public:
- spell_hun_last_stand_pet() : SpellScriptLoader("spell_hun_last_stand_pet") { }
+ public:
+ spell_hun_last_stand_pet() : SpellScriptLoader("spell_hun_last_stand_pet") { }
- class spell_hun_last_stand_pet_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_last_stand_pet_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_hun_last_stand_pet_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_hun_last_stand_pet_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- int32 healthModSpellBasePoints0 = int32(caster->CountPctFromMaxHealth(30));
- caster->CastCustomSpell(caster, HUNTER_PET_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
+ return false;
+ return true;
+ }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ int32 healthModSpellBasePoints0 = int32(caster->CountPctFromMaxHealth(30));
+ caster->CastCustomSpell(caster, HUNTER_PET_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
+ }
+
+ void Register()
+ {
+ // add dummy effect spell handler to pet's Last Stand
+ OnEffectHitTarget += SpellEffectFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- // add dummy effect spell handler to pet's Last Stand
- OnEffectHitTarget += SpellEffectFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_hun_last_stand_pet_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_last_stand_pet_SpellScript();
- }
};
class spell_hun_masters_call : public SpellScriptLoader
@@ -267,14 +267,11 @@ class spell_hun_masters_call : public SpellScriptLoader
class spell_hun_masters_call_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_hun_masters_call_SpellScript)
+ PrepareSpellScript(spell_hun_masters_call_SpellScript);
+
bool Validate(SpellInfo const* spellEntry)
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_MASTERS_CALL_TRIGGERED))
- return false;
- if (!sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_0].CalcValue()))
- return false;
- if (!sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_1].CalcValue()))
+ if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_MASTERS_CALL_TRIGGERED) || !sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_0].CalcValue()) || !sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_1].CalcValue()))
return false;
return true;
}
@@ -312,80 +309,86 @@ class spell_hun_masters_call : public SpellScriptLoader
class spell_hun_readiness : public SpellScriptLoader
{
-public:
- spell_hun_readiness() : SpellScriptLoader("spell_hun_readiness") { }
+ public:
+ spell_hun_readiness() : SpellScriptLoader("spell_hun_readiness") { }
- class spell_hun_readiness_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_readiness_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_hun_readiness_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- // immediately finishes the cooldown on your other Hunter abilities except Bestial Wrath
- const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap();
- for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
- {
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
-
- ///! If spellId in cooldown map isn't valid, the above will return a null pointer.
- if (spellInfo &&
- spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
- spellInfo->Id != HUNTER_SPELL_READINESS &&
- spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH &&
- spellInfo->GetRecoveryTime() > 0)
- caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true);
- else
- ++itr;
+ PrepareSpellScript(spell_hun_readiness_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ // immediately finishes the cooldown on your other Hunter abilities except Bestial Wrath
+ const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap();
+ for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
+ {
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
+
+ ///! If spellId in cooldown map isn't valid, the above will return a null pointer.
+ if (spellInfo &&
+ spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
+ spellInfo->Id != HUNTER_SPELL_READINESS &&
+ spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH &&
+ spellInfo->GetRecoveryTime() > 0)
+ caster->RemoveSpellCooldown((itr++)->first, true);
+ else
+ ++itr;
+ }
+ }
+
+ void Register()
+ {
+ // add dummy effect spell handler to Readiness
+ OnEffectHitTarget += SpellEffectFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- // add dummy effect spell handler to Readiness
- OnEffectHitTarget += SpellEffectFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_hun_readiness_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_readiness_SpellScript();
- }
};
// 37506 Scatter Shot
class spell_hun_scatter_shot : public SpellScriptLoader
{
-public:
- spell_hun_scatter_shot() : SpellScriptLoader("spell_hun_scatter_shot") { }
+ public:
+ spell_hun_scatter_shot() : SpellScriptLoader("spell_hun_scatter_shot") { }
- class spell_hun_scatter_shot_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_scatter_shot_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_hun_scatter_shot_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- // break Auto Shot and autohit
- caster->InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
- caster->AttackStop();
- caster->ToPlayer()->SendAttackSwingCancelAttack();
- }
+ PrepareSpellScript(spell_hun_scatter_shot_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ // break Auto Shot and autohit
+ caster->InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
+ caster->AttackStop();
+ caster->SendAttackSwingCancelAttack();
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_hun_scatter_shot_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_scatter_shot_SpellScript();
- }
};
// 53302, 53303, 53304 Sniper Training
@@ -397,169 +400,164 @@ enum eSniperTrainingSpells
class spell_hun_sniper_training : public SpellScriptLoader
{
-public:
- spell_hun_sniper_training() : SpellScriptLoader("spell_hun_sniper_training") { }
-
- class spell_hun_sniper_training_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_hun_sniper_training_AuraScript)
- bool Validate(SpellInfo const* /*entry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_R1))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_BUFF_R1))
- return false;
- return true;
- }
+ public:
+ spell_hun_sniper_training() : SpellScriptLoader("spell_hun_sniper_training") { }
- void HandlePeriodic(AuraEffect const* aurEff)
+ class spell_hun_sniper_training_AuraScript : public AuraScript
{
- PreventDefaultAction();
- if (aurEff->GetAmount() > 0)
- return;
+ PrepareAuraScript(spell_hun_sniper_training_AuraScript);
- Unit* caster = GetCaster();
+ bool Validate(SpellInfo const* /*entry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_R1) || !sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_BUFF_R1))
+ return false;
+ return true;
+ }
- if (!caster)
- return;
+ void HandlePeriodic(AuraEffect const* aurEff)
+ {
+ PreventDefaultAction();
+ if (aurEff->GetAmount() <= 0)
+ {
+ Unit* caster = GetCaster();
+ uint32 spellId = SPELL_SNIPER_TRAINING_BUFF_R1 + GetId() - SPELL_SNIPER_TRAINING_R1;
+ if (Unit* target = GetTarget())
+ if (!target->HasAura(spellId))
+ {
+ SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(spellId);
+ Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? caster : target;
+ triggerCaster->CastSpell(target, triggeredSpellInfo, true, 0, aurEff);
+ }
+ }
+ }
- uint32 spellId = SPELL_SNIPER_TRAINING_BUFF_R1 + GetId() - SPELL_SNIPER_TRAINING_R1;
- Unit* target = GetTarget();
- if (!target->HasAura(spellId))
+ void HandleUpdatePeriodic(AuraEffect* aurEff)
{
- SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(spellId);
- Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster() ? caster : target;
- triggerCaster->CastSpell(target, triggeredSpellInfo, true, 0, aurEff);
+ if (Player* playerTarget = GetUnitOwner()->ToPlayer())
+ {
+ int32 baseAmount = aurEff->GetBaseAmount();
+ int32 amount = playerTarget->isMoving() ?
+ playerTarget->CalculateSpellDamage(playerTarget, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount) :
+ aurEff->GetAmount() - 1;
+ aurEff->SetAmount(amount);
+ }
}
- }
- void HandleUpdatePeriodic(AuraEffect* aurEff)
- {
- Unit* target = GetUnitOwner();
- if (Player* playerTarget = target->ToPlayer())
+ void Register()
{
- int32 baseAmount = aurEff->GetBaseAmount();
- int32 amount = playerTarget->isMoving() ?
- target->CalculateSpellDamage(target, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount) :
- aurEff->GetAmount() - 1;
- aurEff->SetAmount(amount);
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_sniper_training_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_hun_sniper_training_AuraScript::HandleUpdatePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
- }
+ };
- void Register()
+ AuraScript* GetAuraScript() const
{
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_sniper_training_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
- OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_hun_sniper_training_AuraScript::HandleUpdatePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ return new spell_hun_sniper_training_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_hun_sniper_training_AuraScript();
- }
};
class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
{
-public:
- spell_hun_pet_heart_of_the_phoenix() : SpellScriptLoader("spell_hun_pet_heart_of_the_phoenix") { }
+ public:
+ spell_hun_pet_heart_of_the_phoenix() : SpellScriptLoader("spell_hun_pet_heart_of_the_phoenix") { }
- class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED))
- return false;
- if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript);
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- Unit* owner = caster->GetOwner();
- if (!owner || caster->HasAura(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
- return;
- owner->CastCustomSpell(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED, SPELLVALUE_BASE_POINT0, 100, caster, true);
- caster->CastSpell(caster, HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF, true);
- }
+ bool Load()
+ {
+ if (!GetCaster()->isPet())
+ return false;
+ return true;
+ }
- void Register()
- {
- // add dummy effect spell handler to pet's Last Stand
- OnEffectHitTarget += SpellEffectFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED) || !sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
+ return false;
+ return true;
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* owner = caster->GetOwner())
+ if (!caster->HasAura(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
+ {
+ owner->CastCustomSpell(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED, SPELLVALUE_BASE_POINT0, 100, caster, true);
+ caster->CastSpell(caster, HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF, true);
+ }
+ }
- bool Load()
+ void Register()
+ {
+ // add dummy effect spell handler to pet's Last Stand
+ OnEffectHitTarget += SpellEffectFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- if (!GetCaster()->isPet())
- return false;
- return true;
+ return new spell_hun_pet_heart_of_the_phoenix_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_pet_heart_of_the_phoenix_SpellScript();
- }
};
class spell_hun_pet_carrion_feeder : public SpellScriptLoader
{
-public:
- spell_hun_pet_carrion_feeder() : SpellScriptLoader("spell_hun_pet_carrion_feeder") { }
+ public:
+ spell_hun_pet_carrion_feeder() : SpellScriptLoader("spell_hun_pet_carrion_feeder") { }
- class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript);
- SpellCastResult CheckIfCorpseNear()
- {
- Unit* caster = GetCaster();
- float max_range = GetSpellInfo()->GetMaxRange(false);
- WorldObject* result = NULL;
- // search for nearby enemy corpse in range
- Trinity::AnyDeadUnitSpellTargetInRangeCheck check(caster, max_range, GetSpellInfo(), TARGET_SELECT_CHECK_ENEMY);
- Trinity::WorldObjectSearcher<Trinity::AnyDeadUnitSpellTargetInRangeCheck> searcher(caster, result, check);
- caster->GetMap()->VisitFirstFound(caster->m_positionX, caster->m_positionY, max_range, searcher);
- if (!result)
- return SPELL_FAILED_NO_EDIBLE_CORPSES;
- return SPELL_CAST_OK;
- }
+ bool Load()
+ {
+ if (!GetCaster()->isPet())
+ return false;
+ return true;
+ }
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- caster->CastSpell(caster, HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED, false);
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
+ return false;
+ return true;
+ }
- void Register()
- {
- // add dummy effect spell handler to pet's Last Stand
- OnEffectHit += SpellEffectFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- OnCheckCast += SpellCheckCastFn(spell_hun_pet_carrion_feeder_SpellScript::CheckIfCorpseNear);
- }
+ SpellCastResult CheckIfCorpseNear()
+ {
+ Unit* caster = GetCaster();
+ float max_range = GetSpellInfo()->GetMaxRange(false);
+ WorldObject* result = NULL;
+ // search for nearby enemy corpse in range
+ Trinity::AnyDeadUnitSpellTargetInRangeCheck check(caster, max_range, GetSpellInfo(), TARGET_CHECK_ENEMY);
+ Trinity::WorldObjectSearcher<Trinity::AnyDeadUnitSpellTargetInRangeCheck> searcher(caster, result, check);
+ caster->GetMap()->VisitFirstFound(caster->m_positionX, caster->m_positionY, max_range, searcher);
+ if (!result)
+ return SPELL_FAILED_NO_EDIBLE_CORPSES;
+ return SPELL_CAST_OK;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED, false);
+ }
- bool Load()
+ void Register()
+ {
+ // add dummy effect spell handler to pet's Last Stand
+ OnEffectHit += SpellEffectFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ OnCheckCast += SpellCheckCastFn(spell_hun_pet_carrion_feeder_SpellScript::CheckIfCorpseNear);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- if (!GetCaster()->isPet())
- return false;
- return true;
+ return new spell_hun_pet_carrion_feeder_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_hun_pet_carrion_feeder_SpellScript();
- }
};
void AddSC_hunter_spell_scripts()
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index b40879d500e..416869d98ce 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -21,55 +21,59 @@
* Scriptnames of files in this file should be prefixed with "spell_item_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include "SkillDiscovery.h"
// Generic script for handling item dummy effects which trigger another spell.
class spell_item_trigger_spell : public SpellScriptLoader
{
-private:
- uint32 _triggeredSpellId;
-
-public:
- spell_item_trigger_spell(const char* name, uint32 triggeredSpellId) : SpellScriptLoader(name), _triggeredSpellId(triggeredSpellId) { }
-
- class spell_item_trigger_spell_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_item_trigger_spell_SpellScript)
private:
uint32 _triggeredSpellId;
public:
- spell_item_trigger_spell_SpellScript(uint32 triggeredSpellId) : SpellScript(), _triggeredSpellId(triggeredSpellId) { }
+ spell_item_trigger_spell(const char* name, uint32 triggeredSpellId) : SpellScriptLoader(name), _triggeredSpellId(triggeredSpellId) { }
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_item_trigger_spell_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(_triggeredSpellId))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_item_trigger_spell_SpellScript);
+ private:
+ uint32 _triggeredSpellId;
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- if (Item* pItem = GetCastItem())
- GetCaster()->CastSpell(GetCaster(), _triggeredSpellId, true, pItem);
- }
+ public:
+ spell_item_trigger_spell_SpellScript(uint32 triggeredSpellId) : SpellScript(), _triggeredSpellId(triggeredSpellId) { }
- void Register()
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(_triggeredSpellId))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Item* pItem = GetCastItem())
+ caster->CastSpell(caster, _triggeredSpellId, true, pItem);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_trigger_spell_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_trigger_spell_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_trigger_spell_SpellScript(_triggeredSpellId);
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_trigger_spell_SpellScript(_triggeredSpellId);
- }
};
// http://www.wowhead.com/item=6522 Deviate Fish
// 8063 Deviate Fish
-enum eDeviateFishSpells
+enum DeviateFishSpells
{
SPELL_SLEEPY = 8064,
SPELL_INVIGORATE = 8065,
@@ -80,46 +84,48 @@ enum eDeviateFishSpells
class spell_item_deviate_fish : public SpellScriptLoader
{
-public:
- spell_item_deviate_fish() : SpellScriptLoader("spell_item_deviate_fish") { }
-
- class spell_item_deviate_fish_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_item_deviate_fish_SpellScript)
public:
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- for (uint32 spellId = SPELL_SLEEPY; spellId <= SPELL_HEALTHY_SPIRIT; ++spellId)
- if (!sSpellMgr->GetSpellInfo(spellId))
- return false;
- return true;
- }
+ spell_item_deviate_fish() : SpellScriptLoader("spell_item_deviate_fish") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_deviate_fish_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ PrepareSpellScript(spell_item_deviate_fish_SpellScript);
- uint32 spellId = urand(SPELL_SLEEPY, SPELL_HEALTHY_SPIRIT);
- pCaster->CastSpell(pCaster, spellId, true, NULL);
- }
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- void Register()
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ for (uint32 spellId = SPELL_SLEEPY; spellId <= SPELL_HEALTHY_SPIRIT; ++spellId)
+ if (!sSpellMgr->GetSpellInfo(spellId))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ uint32 spellId = urand(SPELL_SLEEPY, SPELL_HEALTHY_SPIRIT);
+ caster->CastSpell(caster, spellId, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_deviate_fish_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_deviate_fish_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_deviate_fish_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_deviate_fish_SpellScript();
- }
};
// http://www.wowhead.com/item=47499 Flask of the North
// 67019 Flask of the North
-enum eFlaskOfTheNorthSpells
+enum FlaskOfTheNorthSpells
{
SPELL_FLASK_OF_THE_NORTH_SP = 67016,
SPELL_FLASK_OF_THE_NORTH_AP = 67017,
@@ -128,75 +134,68 @@ enum eFlaskOfTheNorthSpells
class spell_item_flask_of_the_north : public SpellScriptLoader
{
-public:
- spell_item_flask_of_the_north() : SpellScriptLoader("spell_item_flask_of_the_north") { }
-
- class spell_item_flask_of_the_north_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_flask_of_the_north_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_SP))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_AP))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_STR))
- return false;
- return true;
- }
+ spell_item_flask_of_the_north() : SpellScriptLoader("spell_item_flask_of_the_north") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_flask_of_the_north_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ PrepareSpellScript(spell_item_flask_of_the_north_SpellScript);
- std::vector<uint32> possibleSpells;
- switch (pCaster->getClass())
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- case CLASS_WARLOCK:
- case CLASS_MAGE:
- case CLASS_PRIEST:
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
- break;
- case CLASS_DEATH_KNIGHT:
- case CLASS_WARRIOR:
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
- break;
- case CLASS_ROGUE:
- case CLASS_HUNTER:
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
- break;
- case CLASS_DRUID:
- case CLASS_PALADIN:
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
- break;
- case CLASS_SHAMAN:
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
- possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
- break;
+ if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_SP) || !sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_AP) || !sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_STR))
+ return false;
+ return true;
}
- pCaster->CastSpell(pCaster, possibleSpells[irand(0, (possibleSpells.size() - 1))], true, NULL);
- }
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ std::vector<uint32> possibleSpells;
+ switch (caster->getClass())
+ {
+ case CLASS_WARLOCK:
+ case CLASS_MAGE:
+ case CLASS_PRIEST:
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
+ break;
+ case CLASS_DEATH_KNIGHT:
+ case CLASS_WARRIOR:
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
+ break;
+ case CLASS_ROGUE:
+ case CLASS_HUNTER:
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
+ break;
+ case CLASS_DRUID:
+ case CLASS_PALADIN:
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
+ break;
+ case CLASS_SHAMAN:
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
+ possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
+ break;
+ }
- void Register()
+ caster->CastSpell(caster, possibleSpells[irand(0, (possibleSpells.size() - 1))], true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_flask_of_the_north_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_flask_of_the_north_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_flask_of_the_north_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_flask_of_the_north_SpellScript();
- }
};
// http://www.wowhead.com/item=10645 Gnomish Death Ray
// 13280 Gnomish Death Ray
-enum eGnomishDeathRay
+enum GnomishDeathRay
{
SPELL_GNOMISH_DEATH_RAY_SELF = 13493,
SPELL_GNOMISH_DEATH_RAY_TARGET = 13279,
@@ -204,49 +203,47 @@ enum eGnomishDeathRay
class spell_item_gnomish_death_ray : public SpellScriptLoader
{
-public:
- spell_item_gnomish_death_ray() : SpellScriptLoader("spell_item_gnomish_death_ray") { }
-
- class spell_item_gnomish_death_ray_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_gnomish_death_ray_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_SELF))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_TARGET))
- return false;
- return true;
- }
+ spell_item_gnomish_death_ray() : SpellScriptLoader("spell_item_gnomish_death_ray") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_gnomish_death_ray_SpellScript : public SpellScript
{
- if (Unit* target = GetHitUnit())
+ PrepareSpellScript(spell_item_gnomish_death_ray_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- Unit* pCaster = GetCaster();
- if (urand(0, 99) < 15)
- pCaster->CastSpell(pCaster, SPELL_GNOMISH_DEATH_RAY_SELF, true, NULL); // failure
- else
- pCaster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true, NULL);
+ if (!sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_SELF) || !sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_TARGET))
+ return false;
+ return true;
}
- }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ {
+ if (urand(0, 99) < 15)
+ caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true, NULL); // failure
+ else
+ caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_gnomish_death_ray_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_item_gnomish_death_ray_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_gnomish_death_ray_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_gnomish_death_ray_SpellScript();
- }
};
// http://www.wowhead.com/item=27388 Mr. Pinchy
// 33060 Make a Wish
-enum eMakeAWish
+enum MakeAWish
{
SPELL_MR_PINCHYS_BLESSING = 33053,
SPELL_SUMMON_MIGHTY_MR_PINCHY = 33057,
@@ -257,115 +254,110 @@ enum eMakeAWish
class spell_item_make_a_wish : public SpellScriptLoader
{
-public:
- spell_item_make_a_wish() : SpellScriptLoader("spell_item_make_a_wish") { }
-
- class spell_item_make_a_wish_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_make_a_wish_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_BLESSING))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_MIGHTY_MR_PINCHY))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FURIOUS_MR_PINCHY))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_TINY_MAGICAL_CRAWDAD))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_GIFT))
- return false;
- return true;
- }
+ spell_item_make_a_wish() : SpellScriptLoader("spell_item_make_a_wish") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_make_a_wish_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ PrepareSpellScript(spell_item_make_a_wish_SpellScript);
- uint32 spellId = SPELL_MR_PINCHYS_GIFT;
- switch (urand(1, 5))
+ bool Load()
{
- case 1: spellId = SPELL_MR_PINCHYS_BLESSING; break;
- case 2: spellId = SPELL_SUMMON_MIGHTY_MR_PINCHY; break;
- case 3: spellId = SPELL_SUMMON_FURIOUS_MR_PINCHY; break;
- case 4: spellId = SPELL_TINY_MAGICAL_CRAWDAD; break;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- pCaster->CastSpell(pCaster, spellId, true, NULL);
- }
- void Register()
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_BLESSING) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_MIGHTY_MR_PINCHY) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_FURIOUS_MR_PINCHY) || !sSpellMgr->GetSpellInfo(SPELL_TINY_MAGICAL_CRAWDAD) || !sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_GIFT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ uint32 spellId = SPELL_MR_PINCHYS_GIFT;
+ switch (urand(1, 5))
+ {
+ case 1: spellId = SPELL_MR_PINCHYS_BLESSING; break;
+ case 2: spellId = SPELL_SUMMON_MIGHTY_MR_PINCHY; break;
+ case 3: spellId = SPELL_SUMMON_FURIOUS_MR_PINCHY; break;
+ case 4: spellId = SPELL_TINY_MAGICAL_CRAWDAD; break;
+ }
+ caster->CastSpell(caster, spellId, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_make_a_wish_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_make_a_wish_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_make_a_wish_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_make_a_wish_SpellScript();
- }
};
// http://www.wowhead.com/item=32686 Mingo's Fortune Giblets
// 40802 Mingo's Fortune Generator
class spell_item_mingos_fortune_generator : public SpellScriptLoader
{
-public:
- spell_item_mingos_fortune_generator() : SpellScriptLoader("spell_item_mingos_fortune_generator") { }
+ public:
+ spell_item_mingos_fortune_generator() : SpellScriptLoader("spell_item_mingos_fortune_generator") { }
- class spell_item_mingos_fortune_generator_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_item_mingos_fortune_generator_SpellScript)
- void HandleDummy(SpellEffIndex effIndex)
- {
- // Selecting one from Bloodstained Fortune item
- uint32 newitemid;
- switch (urand(1, 20))
- {
- case 1: newitemid = 32688; break;
- case 2: newitemid = 32689; break;
- case 3: newitemid = 32690; break;
- case 4: newitemid = 32691; break;
- case 5: newitemid = 32692; break;
- case 6: newitemid = 32693; break;
- case 7: newitemid = 32700; break;
- case 8: newitemid = 32701; break;
- case 9: newitemid = 32702; break;
- case 10: newitemid = 32703; break;
- case 11: newitemid = 32704; break;
- case 12: newitemid = 32705; break;
- case 13: newitemid = 32706; break;
- case 14: newitemid = 32707; break;
- case 15: newitemid = 32708; break;
- case 16: newitemid = 32709; break;
- case 17: newitemid = 32710; break;
- case 18: newitemid = 32711; break;
- case 19: newitemid = 32712; break;
- case 20: newitemid = 32713; break;
- default:
- return;
+ class spell_item_mingos_fortune_generator_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_mingos_fortune_generator_SpellScript);
+
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ // Selecting one from Bloodstained Fortune item
+ uint32 newitemid;
+ switch (urand(1, 20))
+ {
+ case 1: newitemid = 32688; break;
+ case 2: newitemid = 32689; break;
+ case 3: newitemid = 32690; break;
+ case 4: newitemid = 32691; break;
+ case 5: newitemid = 32692; break;
+ case 6: newitemid = 32693; break;
+ case 7: newitemid = 32700; break;
+ case 8: newitemid = 32701; break;
+ case 9: newitemid = 32702; break;
+ case 10: newitemid = 32703; break;
+ case 11: newitemid = 32704; break;
+ case 12: newitemid = 32705; break;
+ case 13: newitemid = 32706; break;
+ case 14: newitemid = 32707; break;
+ case 15: newitemid = 32708; break;
+ case 16: newitemid = 32709; break;
+ case 17: newitemid = 32710; break;
+ case 18: newitemid = 32711; break;
+ case 19: newitemid = 32712; break;
+ case 20: newitemid = 32713; break;
+ default:
+ return;
+ }
+
+ CreateItem(effIndex, newitemid);
}
- CreateItem(effIndex, newitemid);
- }
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_mingos_fortune_generator_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_mingos_fortune_generator_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_mingos_fortune_generator_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_mingos_fortune_generator_SpellScript();
- }
};
// http://www.wowhead.com/item=10720 Gnomish Net-o-Matic Projector
// 13120 Net-o-Matic
-enum eNetOMaticSpells
+enum NetOMaticSpells
{
SPELL_NET_O_MATIC_TRIGGERED1 = 16566,
SPELL_NET_O_MATIC_TRIGGERED2 = 13119,
@@ -374,54 +366,50 @@ enum eNetOMaticSpells
class spell_item_net_o_matic : public SpellScriptLoader
{
-public:
- spell_item_net_o_matic() : SpellScriptLoader("spell_item_net_o_matic") { }
-
- class spell_item_net_o_matic_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_net_o_matic_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED1))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED2))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED3))
- return false;
- return true;
- }
+ spell_item_net_o_matic() : SpellScriptLoader("spell_item_net_o_matic") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_net_o_matic_SpellScript : public SpellScript
{
- if (Unit* target = GetHitUnit())
+ PrepareSpellScript(spell_item_net_o_matic_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- uint32 spellId = SPELL_NET_O_MATIC_TRIGGERED3;
- uint32 roll = urand(0, 99);
- if (roll < 2) // 2% for 30 sec self root (off-like chance unknown)
- spellId = SPELL_NET_O_MATIC_TRIGGERED1;
- else if (roll < 4) // 2% for 20 sec root, charge to target (off-like chance unknown)
- spellId = SPELL_NET_O_MATIC_TRIGGERED2;
+ if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED1) || !sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED2) || !sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED3))
+ return false;
+ return true;
+ }
- GetCaster()->CastSpell(target, spellId, true, NULL);
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ {
+ uint32 spellId = SPELL_NET_O_MATIC_TRIGGERED3;
+ uint32 roll = urand(0, 99);
+ if (roll < 2) // 2% for 30 sec self root (off-like chance unknown)
+ spellId = SPELL_NET_O_MATIC_TRIGGERED1;
+ else if (roll < 4) // 2% for 20 sec root, charge to target (off-like chance unknown)
+ spellId = SPELL_NET_O_MATIC_TRIGGERED2;
+
+ GetCaster()->CastSpell(target, spellId, true, NULL);
+ }
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_net_o_matic_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_item_net_o_matic_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_net_o_matic_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_net_o_matic_SpellScript();
- }
};
// http://www.wowhead.com/item=8529 Noggenfogger Elixir
// 16589 Noggenfogger Elixir
-enum eNoggenfoggerElixirSpells
+enum NoggenfoggerElixirSpells
{
SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1 = 16595,
SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2 = 16593,
@@ -430,55 +418,53 @@ enum eNoggenfoggerElixirSpells
class spell_item_noggenfogger_elixir : public SpellScriptLoader
{
-public:
- spell_item_noggenfogger_elixir() : SpellScriptLoader("spell_item_noggenfogger_elixir") { }
-
- class spell_item_noggenfogger_elixir_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_noggenfogger_elixir_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3))
- return false;
- return true;
- }
+ spell_item_noggenfogger_elixir() : SpellScriptLoader("spell_item_noggenfogger_elixir") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_noggenfogger_elixir_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ PrepareSpellScript(spell_item_noggenfogger_elixir_SpellScript);
- uint32 spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3;
- switch (urand(1, 3))
+ bool Load()
{
- case 1: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1; break;
- case 2: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2; break;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- pCaster->CastSpell(pCaster, spellId, true, NULL);
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1) || !sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2) || !sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3))
+ return false;
+ return true;
+ }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ uint32 spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3;
+ switch (urand(1, 3))
+ {
+ case 1: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1; break;
+ case 2: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2; break;
+ }
+
+ caster->CastSpell(caster, spellId, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_noggenfogger_elixir_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_noggenfogger_elixir_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_noggenfogger_elixir_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_noggenfogger_elixir_SpellScript();
- }
};
// http://www.wowhead.com/item=6657 Savory Deviate Delight
// 8213 Savory Deviate Delight
-enum eSavoryDeviateDelight
+enum SavoryDeviateDelight
{
SPELL_FLIP_OUT_MALE = 8219,
SPELL_FLIP_OUT_FEMALE = 8220,
@@ -488,53 +474,55 @@ enum eSavoryDeviateDelight
class spell_item_savory_deviate_delight : public SpellScriptLoader
{
-public:
- spell_item_savory_deviate_delight() : SpellScriptLoader("spell_item_savory_deviate_delight") { }
-
- class spell_item_savory_deviate_delight_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_savory_deviate_delight_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- for (uint32 spellId = SPELL_FLIP_OUT_MALE; spellId <= SPELL_YAAARRRR_FEMALE; ++spellId)
- if (!sSpellMgr->GetSpellInfo(spellId))
- return false;
- return true;
- }
+ spell_item_savory_deviate_delight() : SpellScriptLoader("spell_item_savory_deviate_delight") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_savory_deviate_delight_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ PrepareSpellScript(spell_item_savory_deviate_delight_SpellScript);
- uint32 spellId = 0;
- switch (urand(1, 2))
+ bool Load()
{
- // Flip Out - ninja
- case 1: spellId = (pCaster->getGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break;
- // Yaaarrrr - pirate
- case 2: spellId = (pCaster->getGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- pCaster->CastSpell(pCaster, spellId, true, NULL);
- }
- void Register()
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ for (uint32 spellId = SPELL_FLIP_OUT_MALE; spellId <= SPELL_YAAARRRR_FEMALE; ++spellId)
+ if (!sSpellMgr->GetSpellInfo(spellId))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ uint32 spellId = 0;
+ switch (urand(1, 2))
+ {
+ // Flip Out - ninja
+ case 1: spellId = (caster->getGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break;
+ // Yaaarrrr - pirate
+ case 2: spellId = (caster->getGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break;
+ }
+ caster->CastSpell(caster, spellId, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_savory_deviate_delight_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_savory_deviate_delight_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_savory_deviate_delight_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_savory_deviate_delight_SpellScript();
- }
};
// http://www.wowhead.com/item=7734 Six Demon Bag
// 14537 Six Demon Bag
-enum eSixDemonBagSpells
+enum SixDemonBagSpells
{
SPELL_FROSTBOLT = 11538,
SPELL_POLYMORPH = 14621,
@@ -546,77 +534,66 @@ enum eSixDemonBagSpells
class spell_item_six_demon_bag : public SpellScriptLoader
{
-public:
- spell_item_six_demon_bag() : SpellScriptLoader("spell_item_six_demon_bag") { }
-
- class spell_item_six_demon_bag_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_six_demon_bag_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_FROSTBOLT))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_POLYMORPH))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FELHOUND_MINION))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_FIREBALL))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_CHAIN_LIGHTNING))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_ENVELOPING_WINDS))
- return false;
- return true;
- }
+ spell_item_six_demon_bag() : SpellScriptLoader("spell_item_six_demon_bag") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_six_demon_bag_SpellScript : public SpellScript
{
- if (Unit* target = GetHitUnit())
+ PrepareSpellScript(spell_item_six_demon_bag_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- Unit* pCaster = GetCaster();
+ if (!sSpellMgr->GetSpellInfo(SPELL_FROSTBOLT) || !sSpellMgr->GetSpellInfo(SPELL_POLYMORPH) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_FELHOUND_MINION) || !sSpellMgr->GetSpellInfo(SPELL_FIREBALL) || !sSpellMgr->GetSpellInfo(SPELL_CHAIN_LIGHTNING) || !sSpellMgr->GetSpellInfo(SPELL_ENVELOPING_WINDS))
+ return false;
+ return true;
+ }
- uint32 spellId = 0;
- uint32 rand = urand(0, 99);
- if (rand < 25) // Fireball (25% chance)
- spellId = SPELL_FIREBALL;
- else if (rand < 50) // Frostball (25% chance)
- spellId = SPELL_FROSTBOLT;
- else if (rand < 70) // Chain Lighting (20% chance)
- spellId = SPELL_CHAIN_LIGHTNING;
- else if (rand < 80) // Polymorph (10% chance)
- {
- spellId = SPELL_POLYMORPH;
- if (urand(0, 100) <= 30) // 30% chance to self-cast
- target = pCaster;
- }
- else if (rand < 95) // Enveloping Winds (15% chance)
- spellId = SPELL_ENVELOPING_WINDS;
- else // Summon Felhund minion (5% chance)
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
{
- spellId = SPELL_SUMMON_FELHOUND_MINION;
- target = pCaster;
+ uint32 spellId = 0;
+ uint32 rand = urand(0, 99);
+ if (rand < 25) // Fireball (25% chance)
+ spellId = SPELL_FIREBALL;
+ else if (rand < 50) // Frostball (25% chance)
+ spellId = SPELL_FROSTBOLT;
+ else if (rand < 70) // Chain Lighting (20% chance)
+ spellId = SPELL_CHAIN_LIGHTNING;
+ else if (rand < 80) // Polymorph (10% chance)
+ {
+ spellId = SPELL_POLYMORPH;
+ if (urand(0, 100) <= 30) // 30% chance to self-cast
+ target = caster;
+ }
+ else if (rand < 95) // Enveloping Winds (15% chance)
+ spellId = SPELL_ENVELOPING_WINDS;
+ else // Summon Felhund minion (5% chance)
+ {
+ spellId = SPELL_SUMMON_FELHOUND_MINION;
+ target = caster;
+ }
+
+ caster->CastSpell(target, spellId, true, GetCastItem());
}
+ }
- pCaster->CastSpell(target, spellId, true, GetCastItem());
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_six_demon_bag_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
- }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_item_six_demon_bag_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_six_demon_bag_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_six_demon_bag_SpellScript();
- }
};
// http://www.wowhead.com/item=44012 Underbelly Elixir
// 59640 Underbelly Elixir
-enum eUnderbellyElixirSpells
+enum UnderbellyElixirSpells
{
SPELL_UNDERBELLY_ELIXIR_TRIGGERED1 = 59645,
SPELL_UNDERBELLY_ELIXIR_TRIGGERED2 = 59831,
@@ -625,49 +602,46 @@ enum eUnderbellyElixirSpells
class spell_item_underbelly_elixir : public SpellScriptLoader
{
-public:
- spell_item_underbelly_elixir() : SpellScriptLoader("spell_item_underbelly_elixir") { }
-
- class spell_item_underbelly_elixir_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_item_underbelly_elixir_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED1))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED2))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED3))
- return false;
- return true;
- }
+ spell_item_underbelly_elixir() : SpellScriptLoader("spell_item_underbelly_elixir") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_item_underbelly_elixir_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ PrepareSpellScript(spell_item_underbelly_elixir_SpellScript);
- uint32 spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED3;
- switch (urand(1, 3))
+ bool Load()
{
- case 1: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED1; break;
- case 2: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED2; break;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED1) || !sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED2) || !sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED3))
+ return false;
+ return true;
}
- pCaster->CastSpell(pCaster, spellId, true, NULL);
- }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ uint32 spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED3;
+ switch (urand(1, 3))
+ {
+ case 1: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED1; break;
+ case 2: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED2; break;
+ }
+ caster->CastSpell(caster, spellId, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_item_underbelly_elixir_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_item_underbelly_elixir_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_item_underbelly_elixir_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_item_underbelly_elixir_SpellScript();
- }
};
enum eShadowmourneVisuals
@@ -684,17 +658,11 @@ public:
class spell_item_shadowmourne_AuraScript : public AuraScript
{
- public:
- PrepareAuraScript(spell_item_shadowmourne_AuraScript)
- spell_item_shadowmourne_AuraScript() : AuraScript() { }
+ PrepareAuraScript(spell_item_shadowmourne_AuraScript);
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_VISUAL_LOW))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_VISUAL_HIGH))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF))
+ if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_VISUAL_LOW) || !sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_VISUAL_HIGH) || !sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF))
return false;
return true;
}
@@ -702,7 +670,6 @@ public:
void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
-
switch (GetStackAmount())
{
case 1:
@@ -716,6 +683,8 @@ public:
target->RemoveAurasDueToSpell(SPELL_SHADOWMOURNE_VISUAL_HIGH);
target->CastSpell(target, SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF, true);
break;
+ default:
+ break;
}
}
@@ -757,11 +726,7 @@ class spell_item_red_rider_air_rifle : public SpellScriptLoader
bool Validate(SpellInfo const* /*spell*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_HOLD_VISUAL))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_SHOOT))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_SHOOT_SELF))
+ if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_HOLD_VISUAL) || !sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_SHOOT) || !sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_SHOOT_SELF))
return false;
return true;
}
@@ -769,17 +734,18 @@ class spell_item_red_rider_air_rifle : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- if (!GetHitUnit())
- return;
-
- GetCaster()->CastSpell(GetCaster(), SPELL_AIR_RIFLE_HOLD_VISUAL, true);
- // needed because this spell shares GCD with its triggered spells (which must not be cast with triggered flag)
- if (Player* player = GetCaster()->ToPlayer())
- player->GetGlobalCooldownMgr().CancelGlobalCooldown(GetSpellInfo());
- if (urand(0, 4))
- GetCaster()->CastSpell(GetHitUnit(), SPELL_AIR_RIFLE_SHOOT, false);
- else
- GetCaster()->CastSpell(GetCaster(), SPELL_AIR_RIFLE_SHOOT_SELF, false);
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ {
+ caster->CastSpell(caster, SPELL_AIR_RIFLE_HOLD_VISUAL, true);
+ // needed because this spell shares GCD with its triggered spells (which must not be cast with triggered flag)
+ if (Player* player = caster->ToPlayer())
+ player->GetGlobalCooldownMgr().CancelGlobalCooldown(GetSpellInfo());
+ if (urand(0, 4))
+ caster->CastSpell(target, SPELL_AIR_RIFLE_SHOOT, false);
+ else
+ caster->CastSpell(caster, SPELL_AIR_RIFLE_SHOOT_SELF, false);
+ }
}
void Register()
@@ -794,7 +760,7 @@ class spell_item_red_rider_air_rifle : public SpellScriptLoader
}
};
-enum eGenericData
+enum GenericData
{
SPELL_ARCANITE_DRAGONLING = 19804,
SPELL_BATTLE_CHICKEN = 13166,
@@ -826,14 +792,11 @@ class spell_item_create_heart_candy : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- if (!GetHitUnit() || !GetHitUnit()->ToPlayer())
- return;
-
- Player* target = GetHitUnit()->ToPlayer();
-
- static const uint32 items[] = {ITEM_HEART_CANDY_1, ITEM_HEART_CANDY_2, ITEM_HEART_CANDY_3, ITEM_HEART_CANDY_4, ITEM_HEART_CANDY_5, ITEM_HEART_CANDY_6, ITEM_HEART_CANDY_7, ITEM_HEART_CANDY_8};
-
- target->AddItem(items[urand(0, 7)], 1);
+ if (Player* target = GetHitPlayer())
+ {
+ static const uint32 items[] = {ITEM_HEART_CANDY_1, ITEM_HEART_CANDY_2, ITEM_HEART_CANDY_3, ITEM_HEART_CANDY_4, ITEM_HEART_CANDY_5, ITEM_HEART_CANDY_6, ITEM_HEART_CANDY_7, ITEM_HEART_CANDY_8};
+ target->AddItem(items[urand(0, 7)], 1);
+ }
}
void Register()
@@ -857,9 +820,14 @@ class spell_item_book_of_glyph_mastery : public SpellScriptLoader
{
PrepareSpellScript(spell_item_book_of_glyph_mastery_SpellScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
SpellCastResult CheckRequirement()
{
- if (GetCaster()->GetTypeId() == TYPEID_PLAYER && HasDiscoveredAllSpells(GetSpellInfo()->Id, GetCaster()->ToPlayer()))
+ if (HasDiscoveredAllSpells(GetSpellInfo()->Id, GetCaster()->ToPlayer()))
{
SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_LEARNED_EVERYTHING);
return SPELL_FAILED_CUSTOM_ERROR;
@@ -939,7 +907,7 @@ class spell_item_map_of_the_geyser_fields : public SpellScriptLoader
SpellCastResult CheckSinkholes()
{
Unit* caster = GetCaster();
- if (caster->FindNearestCreature(NPC_SOUTH_SINKHOLE, 30.0f, true) ||
+ if (caster->FindNearestCreature(NPC_SOUTH_SINKHOLE, 30.0f, true) ||
caster->FindNearestCreature(NPC_NORTHEAST_SINKHOLE, 30.0f, true) ||
caster->FindNearestCreature(NPC_NORTHWEST_SINKHOLE, 30.0f, true))
return SPELL_CAST_OK;
@@ -978,11 +946,7 @@ class spell_item_vanquished_clutches : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_CRUSHER))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_CONSTRICTOR))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_CORRUPTOR))
+ if (!sSpellMgr->GetSpellInfo(SPELL_CRUSHER) || !sSpellMgr->GetSpellInfo(SPELL_CONSTRICTOR) || !sSpellMgr->GetSpellInfo(SPELL_CORRUPTOR))
return false;
return true;
}
@@ -990,7 +954,8 @@ class spell_item_vanquished_clutches : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
uint32 spellId = RAND(SPELL_CRUSHER, SPELL_CONSTRICTOR, SPELL_CORRUPTOR);
- GetCaster()->CastSpell(GetCaster(), spellId, true);
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, spellId, true);
}
void Register()
@@ -1019,9 +984,6 @@ enum AshbringerSounds
SOUND_ASHBRINGER_10 = 8926, // "Scarlet Crusade is pure no longer"
SOUND_ASHBRINGER_11 = 8927, // "Balnazzar's crusade corrupted my son"
SOUND_ASHBRINGER_12 = 8928, // "Kill them all!"
-
- SPELL_ASHBRINGER = 28282, // Ashbringer - Inflicts the will of the Ashbringer upon the wielder
- SPELL_ASHBRINGER_TR = 28441 // AB Effect 000
};
class spell_item_ashbringer : public SpellScriptLoader
@@ -1031,28 +993,24 @@ class spell_item_ashbringer : public SpellScriptLoader
class spell_item_ashbringer_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_item_ashbringer_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ PrepareSpellScript(spell_item_ashbringer_SpellScript);
+
+ bool Load()
{
- if (!sSpellMgr->GetSpellInfo(SPELL_ASHBRINGER))
- return false;
- return true;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
void OnDummyEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- Unit* caster = GetCaster();
- if (Player* player = caster->ToPlayer())
- {
- uint32 sound_id = RAND( SOUND_ASHBRINGER_1, SOUND_ASHBRINGER_2, SOUND_ASHBRINGER_3, SOUND_ASHBRINGER_4, SOUND_ASHBRINGER_5, SOUND_ASHBRINGER_6,
- SOUND_ASHBRINGER_7, SOUND_ASHBRINGER_8, SOUND_ASHBRINGER_9, SOUND_ASHBRINGER_10, SOUND_ASHBRINGER_11, SOUND_ASHBRINGER_12 );
+ Player* player = GetCaster()->ToPlayer();
+ uint32 sound_id = RAND( SOUND_ASHBRINGER_1, SOUND_ASHBRINGER_2, SOUND_ASHBRINGER_3, SOUND_ASHBRINGER_4, SOUND_ASHBRINGER_5, SOUND_ASHBRINGER_6,
+ SOUND_ASHBRINGER_7, SOUND_ASHBRINGER_8, SOUND_ASHBRINGER_9, SOUND_ASHBRINGER_10, SOUND_ASHBRINGER_11, SOUND_ASHBRINGER_12 );
- // Ashbringers effect (spellID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
- if (urand(0, 60) < 1)
- player->PlayDirectSound(sound_id, player);
- }
+ // Ashbringers effect (spellID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
+ if (urand(0, 60) < 1)
+ player->PlayDirectSound(sound_id, player);
}
void Register()
@@ -1080,9 +1038,7 @@ enum MagicEater
class spell_magic_eater_food : public SpellScriptLoader
{
public:
- spell_magic_eater_food() : SpellScriptLoader("spell_magic_eater_food")
- {
- }
+ spell_magic_eater_food() : SpellScriptLoader("spell_magic_eater_food") {}
class spell_magic_eater_food_AuraScript : public AuraScript
{
@@ -1092,7 +1048,6 @@ class spell_magic_eater_food : public SpellScriptLoader
{
PreventDefaultAction();
Unit* target = GetTarget();
-
switch (urand(0, 5))
{
case 0:
@@ -1113,7 +1068,7 @@ class spell_magic_eater_food : public SpellScriptLoader
case 5:
target->CastSpell(target, SPELL_WELL_FED_5, true);
break;
- }
+ }
}
void Register()
@@ -1128,6 +1083,872 @@ class spell_magic_eater_food : public SpellScriptLoader
}
};
+class spell_item_shimmering_vessel : public SpellScriptLoader
+{
+ public:
+ spell_item_shimmering_vessel() : SpellScriptLoader("spell_item_shimmering_vessel") { }
+
+ class spell_item_shimmering_vessel_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_shimmering_vessel_SpellScript);
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (Creature* target = GetHitCreature())
+ target->setDeathState(JUST_ALIVED);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_shimmering_vessel_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_shimmering_vessel_SpellScript();
+ }
+};
+
+enum PurifyHelboarMeat
+{
+ SPELL_SUMMON_PURIFIED_HELBOAR_MEAT = 29277,
+ SPELL_SUMMON_TOXIC_HELBOAR_MEAT = 29278,
+};
+
+class spell_item_purify_helboar_meat : public SpellScriptLoader
+{
+ public:
+ spell_item_purify_helboar_meat() : SpellScriptLoader("spell_item_purify_helboar_meat") { }
+
+ class spell_item_purify_helboar_meat_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_purify_helboar_meat_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_PURIFIED_HELBOAR_MEAT) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_TOXIC_HELBOAR_MEAT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, roll_chance_i(50) ? SPELL_SUMMON_PURIFIED_HELBOAR_MEAT : SPELL_SUMMON_TOXIC_HELBOAR_MEAT, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_purify_helboar_meat_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_purify_helboar_meat_SpellScript();
+ }
+};
+
+enum CrystalPrison
+{
+ OBJECT_IMPRISONED_DOOMGUARD = 179644,
+};
+
+class spell_item_crystal_prison_dummy_dnd : public SpellScriptLoader
+{
+ public:
+ spell_item_crystal_prison_dummy_dnd() : SpellScriptLoader("spell_item_crystal_prison_dummy_dnd") { }
+
+ class spell_item_crystal_prison_dummy_dnd_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_crystal_prison_dummy_dnd_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sObjectMgr->GetGameObjectTemplate(OBJECT_IMPRISONED_DOOMGUARD))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (Creature* target = GetHitCreature())
+ if (target->isDead() && !target->isPet())
+ {
+ GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0, 0, 0, 0, uint32(target->GetRespawnTime()-time(NULL)));
+ target->DespawnOrUnsummon();
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_crystal_prison_dummy_dnd_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_crystal_prison_dummy_dnd_SpellScript();
+ }
+};
+
+enum ReindeerTransformation
+{
+ SPELL_FLYING_REINDEER_310 = 44827,
+ SPELL_FLYING_REINDEER_280 = 44825,
+ SPELL_FLYING_REINDEER_60 = 44824,
+ SPELL_REINDEER_100 = 25859,
+ SPELL_REINDEER_60 = 25858,
+};
+
+class spell_item_reindeer_transformation : public SpellScriptLoader
+{
+ public:
+ spell_item_reindeer_transformation() : SpellScriptLoader("spell_item_reindeer_transformation") { }
+
+ class spell_item_reindeer_transformation_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_reindeer_transformation_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_FLYING_REINDEER_310) || !sSpellMgr->GetSpellInfo(SPELL_FLYING_REINDEER_280)
+ || !sSpellMgr->GetSpellInfo(SPELL_FLYING_REINDEER_60) || !sSpellMgr->GetSpellInfo(SPELL_REINDEER_100)
+ || !sSpellMgr->GetSpellInfo(SPELL_REINDEER_60))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ if (caster->HasAuraType(SPELL_AURA_MOUNTED))
+ {
+ float flyspeed = caster->GetSpeedRate(MOVE_FLIGHT);
+ float speed = caster->GetSpeedRate(MOVE_RUN);
+
+ caster->RemoveAurasByType(SPELL_AURA_MOUNTED);
+ //5 different spells used depending on mounted speed and if mount can fly or not
+
+ if (flyspeed >= 4.1f)
+ // Flying Reindeer
+ caster->CastSpell(caster, SPELL_FLYING_REINDEER_310, true); //310% flying Reindeer
+ else if (flyspeed >= 3.8f)
+ // Flying Reindeer
+ caster->CastSpell(caster, SPELL_FLYING_REINDEER_280, true); //280% flying Reindeer
+ else if (flyspeed >= 1.6f)
+ // Flying Reindeer
+ caster->CastSpell(caster, SPELL_FLYING_REINDEER_60, true); //60% flying Reindeer
+ else if (speed >= 2.0f)
+ // Reindeer
+ caster->CastSpell(caster, SPELL_REINDEER_100, true); //100% ground Reindeer
+ else
+ // Reindeer
+ caster->CastSpell(caster, SPELL_REINDEER_60, true); //60% ground Reindeer
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_reindeer_transformation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_reindeer_transformation_SpellScript();
+ }
+};
+
+enum NighInvulnerability
+{
+ SPELL_NIGH_INVULNERABILITY = 30456,
+ SPELL_COMPLETE_VULNERABILITY = 30457,
+};
+
+class spell_item_nigh_invulnerability : public SpellScriptLoader
+{
+ public:
+ spell_item_nigh_invulnerability() : SpellScriptLoader("spell_item_nigh_invulnerability") { }
+
+ class spell_item_nigh_invulnerability_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_nigh_invulnerability_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_NIGH_INVULNERABILITY) || !sSpellMgr->GetSpellInfo(SPELL_COMPLETE_VULNERABILITY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ if (Item* castItem = GetCastItem())
+ {
+ if (roll_chance_i(86)) // Nigh-Invulnerability - success
+ caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, true, castItem);
+ else // Complete Vulnerability - backfire in 14% casts
+ caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, true, castItem);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_nigh_invulnerability_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_nigh_invulnerability_SpellScript();
+ }
+};
+
+enum Poultryzer
+{
+ SPELL_POULTRYIZER_SUCCESS = 30501,
+ SPELL_POULTRYIZER_BACKFIRE = 30504,
+};
+
+class spell_item_poultryizer : public SpellScriptLoader
+{
+ public:
+ spell_item_poultryizer() : SpellScriptLoader("spell_item_poultryizer") { }
+
+ class spell_item_poultryizer_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_poultryizer_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_POULTRYIZER_SUCCESS) || !sSpellMgr->GetSpellInfo(SPELL_POULTRYIZER_BACKFIRE))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (GetCastItem() && GetHitUnit())
+ GetCaster()->CastSpell(GetHitUnit(), roll_chance_i(80) ? SPELL_POULTRYIZER_SUCCESS : SPELL_POULTRYIZER_BACKFIRE , true, GetCastItem());
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_poultryizer_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_poultryizer_SpellScript();
+ }
+};
+
+enum SocretharsStone
+{
+ SPELL_SOCRETHAR_TO_SEAT = 35743,
+ SPELL_SOCRETHAR_FROM_SEAT = 35744,
+};
+
+class spell_item_socrethars_stone : public SpellScriptLoader
+{
+ public:
+ spell_item_socrethars_stone() : SpellScriptLoader("spell_item_socrethars_stone") { }
+
+ class spell_item_socrethars_stone_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_socrethars_stone_SpellScript);
+
+ bool Load()
+ {
+ return (GetCaster()->GetAreaId() == 3900 || GetCaster()->GetAreaId() == 3742);
+ }
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SOCRETHAR_TO_SEAT) || !sSpellMgr->GetSpellInfo(SPELL_SOCRETHAR_FROM_SEAT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ switch (caster->GetAreaId())
+ {
+ case 3900:
+ caster->CastSpell(caster, SPELL_SOCRETHAR_TO_SEAT, true);
+ break;
+ case 3742:
+ caster->CastSpell(caster, SPELL_SOCRETHAR_FROM_SEAT, true);
+ break;
+ default:
+ return;
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_socrethars_stone_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_socrethars_stone_SpellScript();
+ }
+};
+
+enum DemonBroiledSurprise
+{
+ QUEST_SUPER_HOT_STEW = 11379,
+ SPELL_CREATE_DEMON_BROILED_SURPRISE = 43753,
+ NPC_ABYSSAL_FLAMEBRINGER = 19973,
+};
+
+class spell_item_demon_broiled_surprise : public SpellScriptLoader
+{
+ public:
+ spell_item_demon_broiled_surprise() : SpellScriptLoader("spell_item_demon_broiled_surprise") { }
+
+ class spell_item_demon_broiled_surprise_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_demon_broiled_surprise_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_DEMON_BROILED_SURPRISE) || !sObjectMgr->GetCreatureTemplate(NPC_ABYSSAL_FLAMEBRINGER) || !sObjectMgr->GetQuestTemplate(QUEST_SUPER_HOT_STEW))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* player = GetCaster();
+ player->CastSpell(player, SPELL_CREATE_DEMON_BROILED_SURPRISE, false);
+ }
+
+ SpellCastResult CheckRequirement()
+ {
+ Player* player = GetCaster()->ToPlayer();
+ if (player->GetQuestStatus(QUEST_SUPER_HOT_STEW) != QUEST_STATUS_INCOMPLETE)
+ return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
+
+ if (Creature* creature = player->FindNearestCreature(NPC_ABYSSAL_FLAMEBRINGER, 10, false))
+ if (creature->isDead())
+ return SPELL_CAST_OK;
+ return SPELL_FAILED_NOT_HERE;
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_demon_broiled_surprise_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
+ OnCheckCast += SpellCheckCastFn(spell_item_demon_broiled_surprise_SpellScript::CheckRequirement);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_demon_broiled_surprise_SpellScript();
+ }
+};
+
+enum CompleteRaptorCapture
+{
+ SPELL_RAPTOR_CAPTURE_CREDIT = 42337,
+};
+
+class spell_item_complete_raptor_capture : public SpellScriptLoader
+{
+ public:
+ spell_item_complete_raptor_capture() : SpellScriptLoader("spell_item_complete_raptor_capture") { }
+
+ class spell_item_complete_raptor_capture_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_complete_raptor_capture_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_RAPTOR_CAPTURE_CREDIT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ if (GetHitCreature())
+ {
+ GetHitCreature()->DespawnOrUnsummon();
+
+ //cast spell Raptor Capture Credit
+ caster->CastSpell(caster, SPELL_RAPTOR_CAPTURE_CREDIT, true, NULL);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_complete_raptor_capture_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_complete_raptor_capture_SpellScript();
+ }
+};
+
+enum ImpaleLeviroth
+{
+ NPC_LEVIROTH = 26452,
+ SPELL_LEVIROTH_SELF_IMPALE = 49882
+};
+
+class spell_item_impale_leviroth : public SpellScriptLoader
+{
+ public:
+ spell_item_impale_leviroth() : SpellScriptLoader("spell_item_impale_leviroth") { }
+
+ class spell_item_impale_leviroth_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_impale_leviroth_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sObjectMgr->GetCreatureTemplate(NPC_LEVIROTH))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* target = GetHitCreature();
+ if (!target || target->GetEntry() != NPC_LEVIROTH || !target->HealthBelowPct(95))
+ return;
+
+ target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_impale_leviroth_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_impale_leviroth_SpellScript();
+ }
+};
+
+enum BrewfestMountTransformation
+{
+ SPELL_MOUNT_RAM_100 = 43900,
+ SPELL_MOUNT_RAM_60 = 43899,
+ SPELL_MOUNT_KODO_100 = 49379,
+ SPELL_MOUNT_KODO_60 = 49378,
+ SPELL_BREWFEST_MOUNT_TRANSFORM = 49357,
+ SPELL_BREWFEST_MOUNT_TRANSFORM_REVERSE = 52845,
+};
+
+class spell_item_brewfest_mount_transformation : public SpellScriptLoader
+{
+ public:
+ spell_item_brewfest_mount_transformation() : SpellScriptLoader("spell_item_brewfest_mount_transformation") { }
+
+ class spell_item_brewfest_mount_transformation_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_brewfest_mount_transformation_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MOUNT_RAM_100) || !sSpellMgr->GetSpellInfo(SPELL_MOUNT_RAM_60) || !sSpellMgr->GetSpellInfo(SPELL_MOUNT_KODO_100) || !sSpellMgr->GetSpellInfo(SPELL_MOUNT_KODO_60))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (caster->HasAuraType(SPELL_AURA_MOUNTED))
+ {
+ caster->RemoveAurasByType(SPELL_AURA_MOUNTED);
+ uint32 spell_id;
+
+ switch (GetSpellInfo()->Id)
+ {
+ case SPELL_BREWFEST_MOUNT_TRANSFORM:
+ if (caster->GetSpeedRate(MOVE_RUN) >= 2.0f)
+ spell_id = caster->GetTeam() == ALLIANCE ? SPELL_MOUNT_RAM_100 : SPELL_MOUNT_KODO_100 ;
+ else
+ spell_id = caster->GetTeam() == ALLIANCE ? SPELL_MOUNT_RAM_60 : SPELL_MOUNT_KODO_60 ;
+ break;
+ case SPELL_BREWFEST_MOUNT_TRANSFORM_REVERSE:
+ if (caster->GetSpeedRate(MOVE_RUN) >= 2.0f)
+ spell_id = caster->GetTeam() == HORDE ? SPELL_MOUNT_RAM_100 : SPELL_MOUNT_KODO_100 ;
+ else
+ spell_id = caster->GetTeam() == HORDE ? SPELL_MOUNT_RAM_60 : SPELL_MOUNT_KODO_60 ;
+ break;
+ default:
+ return;
+ }
+ caster->CastSpell(caster, spell_id, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_brewfest_mount_transformation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_brewfest_mount_transformation_SpellScript();
+ }
+};
+
+enum NitroBoots
+{
+ SPELL_NITRO_BOOTS_SUCCESS = 54861,
+ SPELL_NITRO_BOOTS_BACKFIRE = 46014,
+};
+
+class spell_item_nitro_boots : public SpellScriptLoader
+{
+ public:
+ spell_item_nitro_boots() : SpellScriptLoader("spell_item_nitro_boots") { }
+
+ class spell_item_nitro_boots_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_nitro_boots_SpellScript);
+
+ bool Load()
+ {
+ if (!GetCastItem())
+ return false;
+ return true;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_NITRO_BOOTS_SUCCESS) || !sSpellMgr->GetSpellInfo(SPELL_NITRO_BOOTS_BACKFIRE))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, roll_chance_i(95) ? SPELL_NITRO_BOOTS_SUCCESS : SPELL_NITRO_BOOTS_BACKFIRE, true, GetCastItem());
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_nitro_boots_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_nitro_boots_SpellScript();
+ }
+};
+
+enum TeachLanguage
+{
+ SPELL_LEARN_GNOMISH_BINARY = 50242,
+ SPELL_LEARN_GOBLIN_BINARY = 50246,
+};
+
+class spell_item_teach_language : public SpellScriptLoader
+{
+ public:
+ spell_item_teach_language() : SpellScriptLoader("spell_item_teach_language") { }
+
+ class spell_item_teach_language_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_teach_language_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_LEARN_GNOMISH_BINARY) || !sSpellMgr->GetSpellInfo(SPELL_LEARN_GOBLIN_BINARY))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+
+ if (roll_chance_i(34))
+ caster->CastSpell(caster,caster->GetTeam() == ALLIANCE ? SPELL_LEARN_GNOMISH_BINARY : SPELL_LEARN_GOBLIN_BINARY, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_teach_language_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_teach_language_SpellScript();
+ }
+};
+
+enum RocketBoots
+{
+ SPELL_ROCKET_BOOTS_PROC = 30452,
+};
+
+class spell_item_rocket_boots : public SpellScriptLoader
+{
+ public:
+ spell_item_rocket_boots() : SpellScriptLoader("spell_item_rocket_boots") { }
+
+ class spell_item_rocket_boots_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_rocket_boots_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ROCKET_BOOTS_PROC))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (Battleground* bg = caster->GetBattleground())
+ bg->EventPlayerDroppedFlag(caster);
+
+ caster->CastSpell(caster, SPELL_ROCKET_BOOTS_PROC, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_rocket_boots_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_rocket_boots_SpellScript();
+ }
+};
+
+enum PygmyOil
+{
+ SPELL_PYGMY_OIL_PYGMY_AURA = 53806,
+ SPELL_PYGMY_OIL_SMALLER_AURA = 53805,
+};
+
+class spell_item_pygmy_oil : public SpellScriptLoader
+{
+ public:
+ spell_item_pygmy_oil() : SpellScriptLoader("spell_item_pygmy_oil") { }
+
+ class spell_item_pygmy_oil_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_pygmy_oil_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PYGMY_OIL_PYGMY_AURA) || !sSpellMgr->GetSpellInfo(SPELL_PYGMY_OIL_SMALLER_AURA))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ if (Aura* aura = caster->GetAura(SPELL_PYGMY_OIL_PYGMY_AURA))
+ aura->RefreshDuration();
+ else
+ {
+ aura = caster->GetAura(SPELL_PYGMY_OIL_SMALLER_AURA);
+ if (!aura || aura->GetStackAmount() < 5 || !roll_chance_i(50))
+ caster->CastSpell(caster, SPELL_PYGMY_OIL_SMALLER_AURA, true);
+ else
+ {
+ aura->Remove();
+ caster->CastSpell(caster, SPELL_PYGMY_OIL_PYGMY_AURA, true);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_pygmy_oil_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_pygmy_oil_SpellScript();
+ }
+};
+
+class spell_item_unusual_compass : public SpellScriptLoader
+{
+ public:
+ spell_item_unusual_compass() : SpellScriptLoader("spell_item_unusual_compass") { }
+
+ class spell_item_unusual_compass_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_unusual_compass_SpellScript);
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ caster->SetOrientation(frand(0.0f, 62832.0f) / 10000.0f);
+ caster->SendMovementFlagUpdate();
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_unusual_compass_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_unusual_compass_SpellScript();
+ }
+};
+
+enum UDED
+{
+ NPC_IRONWOOL_MAMMOTH = 53806,
+ SPELL_MAMMOTH_CARCASS = 57444,
+ SPELL_MAMMOTH_MEAT = 54625,
+};
+
+class spell_item_uded : public SpellScriptLoader
+{
+ public:
+ spell_item_uded() : SpellScriptLoader("spell_item_uded") { }
+
+ class spell_item_uded_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_uded_SpellScript);
+
+ bool Load()
+ {
+ if (GetHitCreature() && GetHitCreature()->GetEntry() == NPC_IRONWOOL_MAMMOTH)
+ return true;
+ return false;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MAMMOTH_CARCASS) || !sSpellMgr->GetSpellInfo(SPELL_MAMMOTH_MEAT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ Creature* creature = GetHitCreature();
+ caster->CastSpell(caster,SPELL_MAMMOTH_CARCASS,true);
+
+ for (uint8 i = 0; i < 4; ++i)
+ caster->CastSpell(caster,SPELL_MAMMOTH_MEAT,true);
+
+ creature->Kill(creature);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_uded_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_uded_SpellScript();
+ }
+};
+
+enum ChickenCover
+{
+ SPELL_CHICKEN_NET = 51959,
+ SPELL_CAPTURE_CHICKEN_ESCAPE = 51037,
+ QUEST_CHICKEN_PARTY = 12702,
+ QUEST_FLOWN_THE_COOP = 12532,
+};
+
+class spell_item_chicken_cover : public SpellScriptLoader
+{
+ public:
+ spell_item_chicken_cover() : SpellScriptLoader("spell_item_chicken_cover") { }
+
+ class spell_item_chicken_cover_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_item_chicken_cover_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CHICKEN_NET) || !sSpellMgr->GetSpellInfo(SPELL_CAPTURE_CHICKEN_ESCAPE) || !sObjectMgr->GetQuestTemplate(QUEST_CHICKEN_PARTY) || !sObjectMgr->GetQuestTemplate(QUEST_FLOWN_THE_COOP))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (Unit* target = GetHitUnit())
+ {
+ if (!target->HasAura(SPELL_CHICKEN_NET) && (caster->GetQuestStatus(QUEST_CHICKEN_PARTY) == QUEST_STATUS_INCOMPLETE || caster->GetQuestStatus(QUEST_FLOWN_THE_COOP) == QUEST_STATUS_INCOMPLETE))
+ {
+ caster->CastSpell(caster, SPELL_CAPTURE_CHICKEN_ESCAPE, true);
+ target->Kill(target);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_item_chicken_cover_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_item_chicken_cover_SpellScript();
+ }
+};
+
enum Refocus
{
SPELL_AIMED_SHOT = 19434,
@@ -1206,4 +2027,22 @@ void AddSC_item_spell_scripts()
new spell_item_ashbringer();
new spell_magic_eater_food();
new spell_item_refocus();
+ new spell_item_shimmering_vessel();
+ new spell_item_purify_helboar_meat();
+ new spell_item_crystal_prison_dummy_dnd();
+ new spell_item_reindeer_transformation();
+ new spell_item_nigh_invulnerability();
+ new spell_item_poultryizer();
+ new spell_item_socrethars_stone();
+ new spell_item_demon_broiled_surprise();
+ new spell_item_complete_raptor_capture();
+ new spell_item_impale_leviroth();
+ new spell_item_brewfest_mount_transformation();
+ new spell_item_nitro_boots();
+ new spell_item_teach_language();
+ new spell_item_rocket_boots();
+ new spell_item_pygmy_oil();
+ new spell_item_unusual_compass();
+ new spell_item_uded();
+ new spell_item_chicken_cover();
}
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index b0b619c8b08..ea1af10816b 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -21,7 +21,10 @@
* Scriptnames of files in this file should be prefixed with "spell_mage_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
+
enum MageSpells
{
@@ -45,7 +48,8 @@ class spell_mage_blast_wave : public SpellScriptLoader
class spell_mage_blast_wave_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_blast_wave_SpellScript)
+ PrepareSpellScript(spell_mage_blast_wave_SpellScript);
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_BLAST_WAVE))
@@ -78,16 +82,19 @@ class spell_mage_cold_snap : public SpellScriptLoader
class spell_mage_cold_snap_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_cold_snap_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ PrepareSpellScript(spell_mage_cold_snap_SpellScript);
+
+ bool Load()
{
- Unit* caster = GetCaster();
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
// immediately finishes the cooldown on Frost spells
- const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap();
+ const SpellCooldowns& cm = caster->GetSpellCooldownMap();
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
@@ -96,7 +103,7 @@ class spell_mage_cold_snap : public SpellScriptLoader
(spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) &&
spellInfo->Id != SPELL_MAGE_COLD_SNAP && spellInfo->GetRecoveryTime() > 0)
{
- caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true);
+ caster->RemoveSpellCooldown((itr++)->first, true);
}
else
++itr;
@@ -123,7 +130,8 @@ class spell_mage_polymorph_cast_visual : public SpellScriptLoader
class spell_mage_polymorph_cast_visual_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_polymorph_cast_visual_SpellScript)
+ PrepareSpellScript(spell_mage_polymorph_cast_visual_SpellScript);
+
static const uint32 spell_list[6];
bool Validate(SpellInfo const* /*spellEntry*/)
@@ -172,14 +180,11 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader
class spell_mage_summon_water_elemental_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_mage_summon_water_elemental_SpellScript)
+ PrepareSpellScript(spell_mage_summon_water_elemental_SpellScript);
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT))
+ if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT))
return false;
return true;
}
@@ -210,78 +215,79 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader
// Frost Warding
class spell_mage_frost_warding_trigger : public SpellScriptLoader
{
-public:
- spell_mage_frost_warding_trigger() : SpellScriptLoader("spell_mage_frost_warding_trigger") { }
-
- class spell_mage_frost_warding_trigger_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_mage_frost_warding_trigger_AuraScript);
+ public:
+ spell_mage_frost_warding_trigger() : SpellScriptLoader("spell_mage_frost_warding_trigger") { }
- enum Spells
+ class spell_mage_frost_warding_trigger_AuraScript : public AuraScript
{
- SPELL_MAGE_FROST_WARDING_TRIGGERED = 57776,
- SPELL_MAGE_FROST_WARDING_R1 = 28332,
- };
+ PrepareAuraScript(spell_mage_frost_warding_trigger_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- return sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_TRIGGERED)
- && sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_R1);
- }
+ enum Spells
+ {
+ SPELL_MAGE_FROST_WARDING_TRIGGERED = 57776,
+ SPELL_MAGE_FROST_WARDING_R1 = 28332,
+ };
- void Absorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount)
- {
- Unit* target = GetTarget();
- if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_FROST_WARDING_R1, EFFECT_0))
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- int32 chance = talentAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue();
+ if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_TRIGGERED) || !sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_R1))
+ return false;
+ return true;
+ }
- if (roll_chance_i(chance))
+ void Absorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount)
+ {
+ Unit* target = GetTarget();
+ if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_FROST_WARDING_R1, EFFECT_0))
{
- absorbAmount = dmgInfo.GetDamage();
- int32 bp = absorbAmount;
- target->CastCustomSpell(target, SPELL_MAGE_FROST_WARDING_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
+ int32 chance = talentAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue();
+
+ if (roll_chance_i(chance))
+ {
+ absorbAmount = dmgInfo.GetDamage();
+ int32 bp = absorbAmount;
+ target->CastCustomSpell(target, SPELL_MAGE_FROST_WARDING_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
+ }
}
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectAbsorb += AuraEffectAbsorbFn(spell_mage_frost_warding_trigger_AuraScript::Absorb, EFFECT_0);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
{
- OnEffectAbsorb += AuraEffectAbsorbFn(spell_mage_frost_warding_trigger_AuraScript::Absorb, EFFECT_0);
+ return new spell_mage_frost_warding_trigger_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_mage_frost_warding_trigger_AuraScript();
- }
};
class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
{
-public:
- enum Spells
- {
- SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED = 44413,
- SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394,
- };
-
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- return sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED)
- && sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_R1);
- }
+ public:
+ enum Spells
+ {
+ SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED = 44413,
+ SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394,
+ };
- void Trigger(AuraEffect* aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount)
- {
- Unit* target = GetTarget();
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ return sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED)
+ && sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_R1);
+ }
- if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_INCANTERS_ABSORBTION_R1, EFFECT_0))
+ void Trigger(AuraEffect* aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount)
{
- int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount());
- target->CastCustomSpell(target, SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
+ Unit* target = GetTarget();
+
+ if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_INCANTERS_ABSORBTION_R1, EFFECT_0))
+ {
+ int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount());
+ target->CastCustomSpell(target, SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
+ }
}
- }
};
// Incanter's Absorption
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 39360e04aa1..d823c629d4b 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -21,9 +21,11 @@
* Scriptnames of files in this file should be prefixed with "spell_pal_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
+
enum PaladinSpells
{
PALADIN_SPELL_DIVINE_PLEA = 54428,
@@ -46,323 +48,369 @@ enum PaladinSpells
// 31850 - Ardent Defender
class spell_pal_ardent_defender : public SpellScriptLoader
{
-public:
- spell_pal_ardent_defender() : SpellScriptLoader("spell_pal_ardent_defender") { }
+ public:
+ spell_pal_ardent_defender() : SpellScriptLoader("spell_pal_ardent_defender") { }
- class spell_pal_ardent_defender_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_pal_ardent_defender_AuraScript);
+ class spell_pal_ardent_defender_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_pal_ardent_defender_AuraScript);
- uint32 absorbPct, healPct;
+ uint32 absorbPct, healPct;
- enum Spell
- {
- PAL_SPELL_ARDENT_DEFENDER_HEAL = 66235,
- };
+ enum Spell
+ {
+ PAL_SPELL_ARDENT_DEFENDER_HEAL = 66235,
+ };
- bool Load()
- {
- healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
- absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
- return GetUnitOwner()->ToPlayer();
- }
+ bool Load()
+ {
+ healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
+ absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
+ return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
+ }
- void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
- {
- // Set absorbtion amount to unlimited
- amount = -1;
- }
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
+ {
+ // Set absorbtion amount to unlimited
+ amount = -1;
+ }
- void Absorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount)
- {
- Unit* victim = GetTarget();
- int32 remainingHealth = victim->GetHealth() - dmgInfo.GetDamage();
- uint32 allowedHealth = victim->CountPctFromMaxHealth(35);
- // If damage kills us
- if (remainingHealth <= 0 && !victim->ToPlayer()->HasSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL))
+ void Absorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount)
{
- // Cast healing spell, completely avoid damage
- absorbAmount = dmgInfo.GetDamage();
-
- uint32 defenseSkillValue = victim->GetDefenseSkillValue();
- // Max heal when defense skill denies critical hits from raid bosses
- // Formula: max defense at level + 140 (raiting from gear)
- uint32 reqDefForMaxHeal = victim->getLevel() * 5 + 140;
- float pctFromDefense = (defenseSkillValue >= reqDefForMaxHeal)
- ? 1.0f
- : float(defenseSkillValue) / float(reqDefForMaxHeal);
-
- int32 healAmount = int32(victim->CountPctFromMaxHealth(uint32(healPct * pctFromDefense)));
- victim->CastCustomSpell(victim, PAL_SPELL_ARDENT_DEFENDER_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff);
- victim->ToPlayer()->AddSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, time(NULL) + 120);
+ Unit* victim = GetTarget();
+ int32 remainingHealth = victim->GetHealth() - dmgInfo.GetDamage();
+ uint32 allowedHealth = victim->CountPctFromMaxHealth(35);
+ // If damage kills us
+ if (remainingHealth <= 0 && !victim->ToPlayer()->HasSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL))
+ {
+ // Cast healing spell, completely avoid damage
+ absorbAmount = dmgInfo.GetDamage();
+
+ uint32 defenseSkillValue = victim->GetDefenseSkillValue();
+ // Max heal when defense skill denies critical hits from raid bosses
+ // Formula: max defense at level + 140 (raiting from gear)
+ uint32 reqDefForMaxHeal = victim->getLevel() * 5 + 140;
+ float pctFromDefense = (defenseSkillValue >= reqDefForMaxHeal)
+ ? 1.0f
+ : float(defenseSkillValue) / float(reqDefForMaxHeal);
+
+ int32 healAmount = int32(victim->CountPctFromMaxHealth(uint32(healPct * pctFromDefense)));
+ victim->CastCustomSpell(victim, PAL_SPELL_ARDENT_DEFENDER_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff);
+ victim->ToPlayer()->AddSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, time(NULL) + 120);
+ }
+ else if (remainingHealth < int32(allowedHealth))
+ {
+ // Reduce damage that brings us under 35% (or full damage if we are already under 35%) by x%
+ uint32 damageToReduce = (victim->GetHealth() < allowedHealth)
+ ? dmgInfo.GetDamage()
+ : allowedHealth - remainingHealth;
+ absorbAmount = CalculatePctN(damageToReduce, absorbPct);
+ }
}
- else if (remainingHealth < int32(allowedHealth))
+
+ void Register()
{
- // Reduce damage that brings us under 35% (or full damage if we are already under 35%) by x%
- uint32 damageToReduce = (victim->GetHealth() < allowedHealth)
- ? dmgInfo.GetDamage()
- : allowedHealth - remainingHealth;
- absorbAmount = CalculatePctN(damageToReduce, absorbPct);
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pal_ardent_defender_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
+ OnEffectAbsorb += AuraEffectAbsorbFn(spell_pal_ardent_defender_AuraScript::Absorb, EFFECT_0);
}
- }
+ };
- void Register()
+ AuraScript* GetAuraScript() const
{
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pal_ardent_defender_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
- OnEffectAbsorb += AuraEffectAbsorbFn(spell_pal_ardent_defender_AuraScript::Absorb, EFFECT_0);
+ return new spell_pal_ardent_defender_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_pal_ardent_defender_AuraScript();
- }
};
class spell_pal_blessing_of_faith : public SpellScriptLoader
{
-public:
- spell_pal_blessing_of_faith() : SpellScriptLoader("spell_pal_blessing_of_faith") { }
+ public:
+ spell_pal_blessing_of_faith() : SpellScriptLoader("spell_pal_blessing_of_faith") { }
- class spell_pal_blessing_of_faith_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_pal_blessing_of_faith_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_pal_blessing_of_faith_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_DRUID))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_PALADIN))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_PRIEST))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_SHAMAN))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_pal_blessing_of_faith_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- if (Unit* unitTarget = GetHitUnit())
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- uint32 spell_id = 0;
- switch (unitTarget->getClass())
+ if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_DRUID) || !sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_PALADIN) || !sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_PRIEST) || !sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_SHAMAN))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* unitTarget = GetHitUnit())
{
- case CLASS_DRUID: spell_id = SPELL_BLESSING_OF_LOWER_CITY_DRUID; break;
- case CLASS_PALADIN: spell_id = SPELL_BLESSING_OF_LOWER_CITY_PALADIN; break;
- case CLASS_PRIEST: spell_id = SPELL_BLESSING_OF_LOWER_CITY_PRIEST; break;
- case CLASS_SHAMAN: spell_id = SPELL_BLESSING_OF_LOWER_CITY_SHAMAN; break;
- default: return; // ignore for non-healing classes
+ uint32 spell_id = 0;
+ switch (unitTarget->getClass())
+ {
+ case CLASS_DRUID: spell_id = SPELL_BLESSING_OF_LOWER_CITY_DRUID; break;
+ case CLASS_PALADIN: spell_id = SPELL_BLESSING_OF_LOWER_CITY_PALADIN; break;
+ case CLASS_PRIEST: spell_id = SPELL_BLESSING_OF_LOWER_CITY_PRIEST; break;
+ case CLASS_SHAMAN: spell_id = SPELL_BLESSING_OF_LOWER_CITY_SHAMAN; break;
+ default: return; // ignore for non-healing classes
+ }
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, spell_id, true);
}
+ }
- GetCaster()->CastSpell(GetCaster(), spell_id, true);
+ void Register()
+ {
+ // add dummy effect spell handler to Blessing of Faith
+ OnEffectHitTarget += SpellEffectFn(spell_pal_blessing_of_faith_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
- }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- // add dummy effect spell handler to Blessing of Faith
- OnEffectHitTarget += SpellEffectFn(spell_pal_blessing_of_faith_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_pal_blessing_of_faith_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_pal_blessing_of_faith_SpellScript();
- }
};
// 20911 Blessing of Sanctuary
// 25899 Greater Blessing of Sanctuary
class spell_pal_blessing_of_sanctuary : public SpellScriptLoader
{
-public:
- spell_pal_blessing_of_sanctuary() : SpellScriptLoader("spell_pal_blessing_of_sanctuary") { }
+ public:
+ spell_pal_blessing_of_sanctuary() : SpellScriptLoader("spell_pal_blessing_of_sanctuary") { }
- class spell_pal_blessing_of_sanctuary_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_pal_blessing_of_sanctuary_AuraScript)
- bool Validate(SpellInfo const* /*entry*/)
+ class spell_pal_blessing_of_sanctuary_AuraScript : public AuraScript
{
- if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF))
- return false;
- return true;
- }
+ PrepareAuraScript(spell_pal_blessing_of_sanctuary_AuraScript);
- void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- Unit* target = GetTarget();
- if (Unit* pCaster = GetCaster())
- pCaster->CastSpell(target, PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF, true);
- }
+ bool Validate(SpellInfo const* /*entry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF))
+ return false;
+ return true;
+ }
- void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- Unit* target = GetTarget();
- target->RemoveAura(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF, GetCasterGUID());
- }
+ void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(target, PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF, true);
+ }
+
+ void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->RemoveAura(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF, GetCasterGUID());
+ }
- void Register()
+ void Register()
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_pal_blessing_of_sanctuary_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_pal_blessing_of_sanctuary_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
{
- AfterEffectApply += AuraEffectApplyFn(spell_pal_blessing_of_sanctuary_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- AfterEffectRemove += AuraEffectRemoveFn(spell_pal_blessing_of_sanctuary_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ return new spell_pal_blessing_of_sanctuary_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_pal_blessing_of_sanctuary_AuraScript();
- }
};
// 63521 Guarded by The Light
class spell_pal_guarded_by_the_light : public SpellScriptLoader
{
-public:
- spell_pal_guarded_by_the_light() : SpellScriptLoader("spell_pal_guarded_by_the_light") { }
+ public:
+ spell_pal_guarded_by_the_light() : SpellScriptLoader("spell_pal_guarded_by_the_light") { }
- class spell_pal_guarded_by_the_light_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_pal_guarded_by_the_light_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_pal_guarded_by_the_light_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_DIVINE_PLEA))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_pal_guarded_by_the_light_SpellScript);
- void HandleScriptEffect(SpellEffIndex /*effIndex*/)
- {
- // Divine Plea
- if (Aura* aura = GetCaster()->GetAura(PALADIN_SPELL_DIVINE_PLEA))
- aura->RefreshDuration();
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_DIVINE_PLEA))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ // Divine Plea
+ if (Aura* aura = GetCaster()->GetAura(PALADIN_SPELL_DIVINE_PLEA))
+ aura->RefreshDuration();
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_pal_guarded_by_the_light_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_pal_guarded_by_the_light_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_pal_guarded_by_the_light_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_pal_guarded_by_the_light_SpellScript();
- }
};
class spell_pal_holy_shock : public SpellScriptLoader
{
-public:
- spell_pal_holy_shock() : SpellScriptLoader("spell_pal_holy_shock") { }
+ public:
+ spell_pal_holy_shock() : SpellScriptLoader("spell_pal_holy_shock") { }
- class spell_pal_holy_shock_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_pal_holy_shock_SpellScript)
- bool Validate(SpellInfo const* spellEntry)
+ class spell_pal_holy_shock_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_HOLY_SHOCK_R1))
- return false;
+ PrepareSpellScript(spell_pal_holy_shock_SpellScript)
+ bool Validate(SpellInfo const* spellEntry)
+ {
+ if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_HOLY_SHOCK_R1))
+ return false;
- // can't use other spell than holy shock due to spell_ranks dependency
- if (sSpellMgr->GetFirstSpellInChain(PALADIN_SPELL_HOLY_SHOCK_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id))
- return false;
+ // can't use other spell than holy shock due to spell_ranks dependency
+ if (sSpellMgr->GetFirstSpellInChain(PALADIN_SPELL_HOLY_SHOCK_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id))
+ return false;
- uint8 rank = sSpellMgr->GetSpellRank(spellEntry->Id);
- if (!sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_DAMAGE, rank, true))
- return false;
- if (!sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_HEALING, rank, true))
- return false;
+ uint8 rank = sSpellMgr->GetSpellRank(spellEntry->Id);
+ if (!sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_DAMAGE, rank, true) || !sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_HEALING, rank, true))
+ return false;
- return true;
- }
+ return true;
+ }
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- if (Unit* unitTarget = GetHitUnit())
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
+ if (Unit* unitTarget = GetHitUnit())
+ {
+ uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
+ if (caster->IsFriendlyTo(unitTarget))
+ caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_HEALING, rank), true, 0);
+ else
+ caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_DAMAGE, rank), true, 0);
+ }
+ }
- uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
-
- if (caster->IsFriendlyTo(unitTarget))
- caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_HEALING, rank), true, 0);
- else
- caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PALADIN_SPELL_HOLY_SHOCK_R1_DAMAGE, rank), true, 0);
+ void Register()
+ {
+ // add dummy effect spell handler to Holy Shock
+ OnEffectHitTarget += SpellEffectFn(spell_pal_holy_shock_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
- }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- // add dummy effect spell handler to Holy Shock
- OnEffectHitTarget += SpellEffectFn(spell_pal_holy_shock_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_pal_holy_shock_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_pal_holy_shock_SpellScript();
- }
};
class spell_pal_judgement_of_command : public SpellScriptLoader
{
-public:
- spell_pal_judgement_of_command() : SpellScriptLoader("spell_pal_judgement_of_command") { }
+ public:
+ spell_pal_judgement_of_command() : SpellScriptLoader("spell_pal_judgement_of_command") { }
- class spell_pal_judgement_of_command_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_pal_judgement_of_command_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_pal_judgement_of_command_SpellScript : public SpellScript
{
- if (Unit* unitTarget = GetHitUnit())
- if (SpellInfo const* spell_proto = sSpellMgr->GetSpellInfo(GetEffectValue()))
- GetCaster()->CastSpell(unitTarget, spell_proto, true, NULL);
- }
+ PrepareSpellScript(spell_pal_judgement_of_command_SpellScript)
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* unitTarget = GetHitUnit())
+ if (SpellInfo const* spell_proto = sSpellMgr->GetSpellInfo(GetEffectValue()))
+ GetCaster()->CastSpell(unitTarget, spell_proto, true, NULL);
+ }
+
+ void Register()
+ {
+ // add dummy effect spell handler to Judgement of Command
+ OnEffectHitTarget += SpellEffectFn(spell_pal_judgement_of_command_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- // add dummy effect spell handler to Judgement of Command
- OnEffectHitTarget += SpellEffectFn(spell_pal_judgement_of_command_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_pal_judgement_of_command_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_pal_judgement_of_command_SpellScript();
- }
};
class spell_pal_divine_storm : public SpellScriptLoader
{
-public:
- spell_pal_divine_storm() : SpellScriptLoader("spell_pal_divine_storm") { }
+ public:
+ spell_pal_divine_storm() : SpellScriptLoader("spell_pal_divine_storm") { }
+
+ class spell_pal_divine_storm_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_pal_divine_storm_SpellScript);
+
+ uint32 healPct;
+
+ bool Validate(SpellInfo const* /* spell */)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DIVINE_STORM_DUMMY))
+ return false;
+ return true;
+ }
- class spell_pal_divine_storm_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_pal_divine_storm_SpellScript);
+ bool Load()
+ {
+ healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster());
+ return true;
+ }
- uint32 healPct;
+ void TriggerHeal()
+ {
+ Unit* caster = GetCaster();
+ caster->CastCustomSpell(SPELL_DIVINE_STORM_DUMMY, SPELLVALUE_BASE_POINT0, (GetHitDamage() * healPct) / 100, caster, true);
+ }
- bool Load()
+ void Register()
+ {
+ AfterHit += SpellHitFn(spell_pal_divine_storm_SpellScript::TriggerHeal);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster());
- return true;
+ return new spell_pal_divine_storm_SpellScript();
}
+};
- void TriggerHeal()
+class spell_pal_divine_storm_dummy : public SpellScriptLoader
+{
+ public:
+ spell_pal_divine_storm_dummy() : SpellScriptLoader("spell_pal_divine_storm_dummy") { }
+
+ class spell_pal_divine_storm_dummy_SpellScript : public SpellScript
{
- GetCaster()->CastCustomSpell(SPELL_DIVINE_STORM_DUMMY, SPELLVALUE_BASE_POINT0, (GetHitDamage() * healPct) / 100, GetCaster(), true);
- }
+ PrepareSpellScript(spell_pal_divine_storm_dummy_SpellScript);
- void Register()
+ bool Validate(SpellInfo const* /* spell */)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DIVINE_STORM_HEAL))
+ return false;
+ return true;
+ }
+
+ void CountTargets(std::list<Unit*>& targetList)
+ {
+ _targetCount = targetList.size();
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (!_targetCount || ! GetHitUnit())
+ return;
+
+ int32 heal = GetEffectValue() / _targetCount;
+ GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_DIVINE_STORM_HEAL, &heal, NULL, NULL, true);
+ }
+ private:
+ uint32 _targetCount;
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_pal_divine_storm_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ OnUnitTargetSelect += SpellUnitTargetFn(spell_pal_divine_storm_dummy_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- AfterHit += SpellHitFn(spell_pal_divine_storm_SpellScript::TriggerHeal);
+ return new spell_pal_divine_storm_dummy_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_pal_divine_storm_SpellScript();
- }
};
void AddSC_paladin_spell_scripts()
@@ -374,4 +422,5 @@ void AddSC_paladin_spell_scripts()
new spell_pal_holy_shock();
new spell_pal_judgement_of_command();
new spell_pal_divine_storm();
+ new spell_pal_divine_storm_dummy();
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index ee5f6a6d772..b012fe5f183 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -21,7 +21,8 @@
* Scriptnames of files in this file should be prefixed with "spell_pri_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "GridNotifiers.h"
@@ -49,7 +50,9 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- return sSpellMgr->GetSpellInfo(PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL) != NULL;
+ if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL))
+ return false;
+ return true;
}
bool Load()
@@ -101,11 +104,8 @@ class spell_pri_mana_burn : public SpellScriptLoader
void HandleAfterHit()
{
- Unit* unitTarget = GetHitUnit();
- if (!unitTarget)
- return;
-
- unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
+ if (Unit* unitTarget = GetHitUnit())
+ unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
}
void Register()
@@ -204,18 +204,19 @@ class spell_pri_penance : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- Unit* unitTarget = GetHitUnit();
- if (!unitTarget || !unitTarget->isAlive())
- return;
-
Unit* caster = GetCaster();
+ if (Unit* unitTarget = GetHitUnit())
+ {
+ if(!unitTarget->isAlive())
+ return;
- uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
+ uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
- if (caster->IsFriendlyTo(unitTarget))
- caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_HEAL, rank), false, 0);
- else
- caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_DAMAGE, rank), false, 0);
+ if (caster->IsFriendlyTo(unitTarget))
+ caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_HEAL, rank), false, 0);
+ else
+ caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_DAMAGE, rank), false, 0);
+ }
}
void Register()
@@ -243,7 +244,9 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- return sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED) && sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_R1);
+ if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED) || !sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_R1))
+ return false;
+ return true;
}
void Trigger(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount)
@@ -251,14 +254,13 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
Unit* target = GetTarget();
if (dmgInfo.GetAttacker() == target)
return;
- Unit* caster = GetCaster();
- if (!caster)
- return;
- if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0))
- {
- int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount());
- target->CastCustomSpell(dmgInfo.GetAttacker(), PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
- }
+
+ if (GetCaster())
+ if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0))
+ {
+ int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount());
+ target->CastCustomSpell(dmgInfo.GetAttacker(), PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
+ }
}
void Register()
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index d3e484d80ab..09c34e3499d 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -21,48 +21,50 @@
* Scriptnames of files in this file should be prefixed with "spell_q#questID_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "SpellScript.h"
#include "Vehicle.h"
class spell_generic_quest_update_entry_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_generic_quest_update_entry_SpellScript)
-private:
- uint16 _spellEffect;
- uint8 _effIndex;
- uint32 _originalEntry;
- uint32 _newEntry;
- bool _shouldAttack;
- uint32 _despawnTime;
+ PrepareSpellScript(spell_generic_quest_update_entry_SpellScript);
+ private:
+ uint16 _spellEffect;
+ uint8 _effIndex;
+ uint32 _originalEntry;
+ uint32 _newEntry;
+ bool _shouldAttack;
+ uint32 _despawnTime;
-public:
- spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, uint32 despawnTime = 0) :
- SpellScript(), _spellEffect(spellEffect), _effIndex(effIndex), _originalEntry(originalEntry),
- _newEntry(newEntry), _shouldAttack(shouldAttack), _despawnTime(despawnTime) { }
+ public:
+ spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, uint32 despawnTime = 0) :
+ SpellScript(), _spellEffect(spellEffect), _effIndex(effIndex), _originalEntry(originalEntry),
+ _newEntry(newEntry), _shouldAttack(shouldAttack), _despawnTime(despawnTime) { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- if (Creature* creatureTarget = GetHitCreature())
- if (!creatureTarget->isPet() && creatureTarget->GetEntry() == _originalEntry)
- {
- creatureTarget->UpdateEntry(_newEntry);
- if (_shouldAttack && creatureTarget->IsAIEnabled)
- creatureTarget->AI()->AttackStart(GetCaster());
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Creature* creatureTarget = GetHitCreature())
+ if (!creatureTarget->isPet() && creatureTarget->GetEntry() == _originalEntry)
+ {
+ creatureTarget->UpdateEntry(_newEntry);
+ if (_shouldAttack && creatureTarget->IsAIEnabled)
+ creatureTarget->AI()->AttackStart(GetCaster());
- if (_despawnTime)
- creatureTarget->DespawnOrUnsummon(_despawnTime);
- }
- }
+ if (_despawnTime)
+ creatureTarget->DespawnOrUnsummon(_despawnTime);
+ }
+ }
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_generic_quest_update_entry_SpellScript::HandleDummy, _effIndex, _spellEffect);
- }
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_generic_quest_update_entry_SpellScript::HandleDummy, _effIndex, _spellEffect);
+ }
};
// http://www.wowhead.com/quest=55 Morbent Fel
// 8913 Sacred Cleansing
-enum eQuest55Data
+enum Quest55Data
{
NPC_MORBENT = 1200,
NPC_WEAKENED_MORBENT = 24782,
@@ -70,18 +72,18 @@ enum eQuest55Data
class spell_q55_sacred_cleansing : public SpellScriptLoader
{
-public:
- spell_q55_sacred_cleansing() : SpellScriptLoader("spell_q55_sacred_cleansing") { }
+ public:
+ spell_q55_sacred_cleansing() : SpellScriptLoader("spell_q55_sacred_cleansing") { }
- SpellScript* GetSpellScript() const
- {
- return new spell_generic_quest_update_entry_SpellScript(SPELL_EFFECT_DUMMY, EFFECT_1, NPC_MORBENT, NPC_WEAKENED_MORBENT, true);
- }
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_generic_quest_update_entry_SpellScript(SPELL_EFFECT_DUMMY, EFFECT_1, NPC_MORBENT, NPC_WEAKENED_MORBENT, true);
+ }
};
// http://www.wowhead.com/quest=5206 Marauders of Darrowshire
// 17271 Test Fetid Skull
-enum eQuest5206Data
+enum Quest5206Data
{
SPELL_CREATE_RESONATING_SKULL = 17269,
SPELL_CREATE_BONE_DUST = 17270
@@ -89,47 +91,48 @@ enum eQuest5206Data
class spell_q5206_test_fetid_skull : public SpellScriptLoader
{
-public:
- spell_q5206_test_fetid_skull() : SpellScriptLoader("spell_q5206_test_fetid_skull") { }
+ public:
+ spell_q5206_test_fetid_skull() : SpellScriptLoader("spell_q5206_test_fetid_skull") { }
- class spell_q5206_test_fetid_skull_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q5206_test_fetid_skull_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_q5206_test_fetid_skull_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_RESONATING_SKULL))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_BONE_DUST))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_q5206_test_fetid_skull_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() == TYPEID_PLAYER)
+ bool Load()
{
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_RESONATING_SKULL) || !sSpellMgr->GetSpellInfo(SPELL_CREATE_BONE_DUST))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
uint32 spellId = roll_chance_i(50) ? SPELL_CREATE_RESONATING_SKULL : SPELL_CREATE_BONE_DUST;
- pCaster->CastSpell(pCaster, spellId, true, NULL);
+ caster->CastSpell(caster, spellId, true, NULL);
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_q5206_test_fetid_skull_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_q5206_test_fetid_skull_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q5206_test_fetid_skull_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q5206_test_fetid_skull_SpellScript();
- }
};
// http://www.wowhead.com/quest=6124 Curing the Sick (A)
// http://www.wowhead.com/quest=6129 Curing the Sick (H)
// 19512 Apply Salve
-enum eQuests6124_6129Data
+enum Quests6124_6129Data
{
NPC_SICKLY_GAZELLE = 12296,
NPC_CURED_GAZELLE = 12297,
@@ -140,20 +143,26 @@ enum eQuests6124_6129Data
class spell_q6124_6129_apply_salve : public SpellScriptLoader
{
-public:
- spell_q6124_6129_apply_salve() : SpellScriptLoader("spell_q6124_6129_apply_salve") { }
+ public:
+ spell_q6124_6129_apply_salve() : SpellScriptLoader("spell_q6124_6129_apply_salve") { }
- class spell_q6124_6129_apply_salve_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q6124_6129_apply_salve_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_q6124_6129_apply_salve_SpellScript : public SpellScript
{
- if (GetCastItem())
- if (Player* pCaster = GetCaster()->ToPlayer())
+ PrepareSpellScript(spell_q6124_6129_apply_salve_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (GetCastItem())
if (Creature* creatureTarget = GetHitCreature())
{
uint32 uiNewEntry = 0;
- switch (pCaster->GetTeam())
+ switch (caster->GetTeam())
{
case HORDE:
if (creatureTarget->GetEntry() == NPC_SICKLY_GAZELLE)
@@ -170,23 +179,23 @@ public:
creatureTarget->DespawnOrUnsummon(DESPAWN_TIME);
}
}
- }
+ }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q6124_6129_apply_salve_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_q6124_6129_apply_salve_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q6124_6129_apply_salve_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q6124_6129_apply_salve_SpellScript();
- }
};
// http://www.wowhead.com/quest=10255 Testing the Antidote
// 34665 Administer Antidote
-enum eQuest10255Data
+enum Quest10255Data
{
NPC_HELBOAR = 16880,
NPC_DREADTUSK = 16992,
@@ -194,18 +203,18 @@ enum eQuest10255Data
class spell_q10255_administer_antidote : public SpellScriptLoader
{
-public:
- spell_q10255_administer_antidote() : SpellScriptLoader("spell_q10255_administer_antidote") { }
+ public:
+ spell_q10255_administer_antidote() : SpellScriptLoader("spell_q10255_administer_antidote") { }
- SpellScript* GetSpellScript() const
- {
- return new spell_generic_quest_update_entry_SpellScript(SPELL_EFFECT_DUMMY, EFFECT_0, NPC_HELBOAR, NPC_DREADTUSK, true);
- }
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_generic_quest_update_entry_SpellScript(SPELL_EFFECT_DUMMY, EFFECT_0, NPC_HELBOAR, NPC_DREADTUSK, true);
+ }
};
// http://www.wowhead.com/quest=11396 Bring Down Those Shields (A)
// http://www.wowhead.com/quest=11399 Bring Down Those Shields (H)
-enum eQuest11396_11399Data
+enum Quest11396_11399Data
{
SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3 = 43874,
SPELL_SCOURGING_CRYSTAL_CONTROLLER = 43878
@@ -214,115 +223,116 @@ enum eQuest11396_11399Data
// 43874 Scourge Mur'gul Camp: Force Shield Arcane Purple x3
class spell_q11396_11399_force_shield_arcane_purple_x3 : public SpellScriptLoader
{
-public:
- spell_q11396_11399_force_shield_arcane_purple_x3() : SpellScriptLoader("spell_q11396_11399_force_shield_arcane_purple_x3") { }
+ public:
+ spell_q11396_11399_force_shield_arcane_purple_x3() : SpellScriptLoader("spell_q11396_11399_force_shield_arcane_purple_x3") { }
- class spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript)
- void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ class spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript : public AuraScript
{
- Unit* target = GetTarget();
- target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ PrepareAuraScript(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript);
+
+ void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
target->AddUnitState(UNIT_STATE_ROOT);
- }
+ }
- void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
- }
+ void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ }
- void Register()
- {
- OnEffectApply += AuraEffectApplyFn(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- OnEffectRemove += AuraEffectRemoveFn(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
- }
+ void Register()
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ OnEffectRemove += AuraEffectRemoveFn(spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
- };
+ };
- AuraScript* GetAuraScript() const
- {
- return new spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript();
- }
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_q11396_11399_force_shield_arcane_purple_x3_AuraScript();
+ }
};
// 50133 Scourging Crystal Controller
class spell_q11396_11399_scourging_crystal_controller : public SpellScriptLoader
{
-public:
- spell_q11396_11399_scourging_crystal_controller() : SpellScriptLoader("spell_q11396_11399_scourging_crystal_controller") { }
+ public:
+ spell_q11396_11399_scourging_crystal_controller() : SpellScriptLoader("spell_q11396_11399_scourging_crystal_controller") { }
- class spell_q11396_11399_scourging_crystal_controller_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_q11396_11399_scourging_crystal_controller_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- if (Unit* target = GetTargetUnit())
- if (target->GetTypeId() == TYPEID_UNIT && target->HasAura(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
- // Make sure nobody else is channeling the same target
- if (!target->HasAura(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
- GetCaster()->CastSpell(target, SPELL_SCOURGING_CRYSTAL_CONTROLLER, true, GetCastItem());
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3) || !sSpellMgr->GetSpellInfo(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
+ return false;
+ return true;
+ }
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_q11396_11399_scourging_crystal_controller_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetTargetUnit())
+ if (target->GetTypeId() == TYPEID_UNIT && target->HasAura(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
+ // Make sure nobody else is channeling the same target
+ if (!target->HasAura(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
+ GetCaster()->CastSpell(target, SPELL_SCOURGING_CRYSTAL_CONTROLLER, true, GetCastItem());
+ }
- SpellScript* GetSpellScript() const
- {
- return new spell_q11396_11399_scourging_crystal_controller_SpellScript();
- };
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q11396_11399_scourging_crystal_controller_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q11396_11399_scourging_crystal_controller_SpellScript();
+ };
};
// 43882 Scourging Crystal Controller Dummy
class spell_q11396_11399_scourging_crystal_controller_dummy : public SpellScriptLoader
{
-public:
- spell_q11396_11399_scourging_crystal_controller_dummy() : SpellScriptLoader("spell_q11396_11399_scourging_crystal_controller_dummy") { }
+ public:
+ spell_q11396_11399_scourging_crystal_controller_dummy() : SpellScriptLoader("spell_q11396_11399_scourging_crystal_controller_dummy") { }
- class spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- if (Unit* target = GetTargetUnit())
- if (target->GetTypeId() == TYPEID_UNIT)
- target->RemoveAurasDueToSpell(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3);
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
+ return false;
+ return true;
+ }
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ if (target->GetTypeId() == TYPEID_UNIT)
+ target->RemoveAurasDueToSpell(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3);
+ }
- SpellScript* GetSpellScript() const
- {
- return new spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript();
- };
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript();
+ };
};
// http://www.wowhead.com/quest=11515 Blood for Blood
// 44936 Quest - Fel Siphon Dummy
-enum eQuest11515Data
+enum Quest11515Data
{
NPC_FELBLOOD_INITIATE = 24918,
NPC_EMACIATED_FELBLOOD = 24955
@@ -330,18 +340,18 @@ enum eQuest11515Data
class spell_q11515_fel_siphon_dummy : public SpellScriptLoader
{
-public:
- spell_q11515_fel_siphon_dummy() : SpellScriptLoader("spell_q11515_fel_siphon_dummy") { }
+ public:
+ spell_q11515_fel_siphon_dummy() : SpellScriptLoader("spell_q11515_fel_siphon_dummy") { }
- SpellScript* GetSpellScript() const
- {
- return new spell_generic_quest_update_entry_SpellScript(SPELL_EFFECT_DUMMY, EFFECT_0, NPC_FELBLOOD_INITIATE, NPC_EMACIATED_FELBLOOD, true);
- }
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_generic_quest_update_entry_SpellScript(SPELL_EFFECT_DUMMY, EFFECT_0, NPC_FELBLOOD_INITIATE, NPC_EMACIATED_FELBLOOD, true);
+ }
};
// http://www.wowhead.com/quest=11587 Prison Break
// 45449 Arcane Prisoner Rescue
-enum eQuest11587Data
+enum Quest11587Data
{
SPELL_SUMMON_ARCANE_PRISONER_MALE = 45446, // Summon Arcane Prisoner - Male
SPELL_SUMMON_ARCANE_PRISONER_FEMALE = 45448, // Summon Arcane Prisoner - Female
@@ -350,51 +360,48 @@ enum eQuest11587Data
class spell_q11587_arcane_prisoner_rescue : public SpellScriptLoader
{
-public:
- spell_q11587_arcane_prisoner_rescue() : SpellScriptLoader("spell_q11587_arcane_prisoner_rescue") { }
+ public:
+ spell_q11587_arcane_prisoner_rescue() : SpellScriptLoader("spell_q11587_arcane_prisoner_rescue") { }
- class spell_q11587_arcane_prisoner_rescue_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q11587_arcane_prisoner_rescue_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_q11587_arcane_prisoner_rescue_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ARCANE_PRISONER_MALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ARCANE_PRISONER_FEMALE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_ARCANE_PRISONER_KILL_CREDIT))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_q11587_arcane_prisoner_rescue_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- Unit* caster = GetCaster();
- if (Unit* unitTarget = GetHitUnit())
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- uint32 spellId = SPELL_SUMMON_ARCANE_PRISONER_MALE;
- if (rand() % 2)
- spellId = SPELL_SUMMON_ARCANE_PRISONER_FEMALE;
- caster->CastSpell(caster, spellId, true);
- unitTarget->CastSpell(caster, SPELL_ARCANE_PRISONER_KILL_CREDIT, true);
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ARCANE_PRISONER_MALE) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_ARCANE_PRISONER_FEMALE) || !sSpellMgr->GetSpellInfo(SPELL_ARCANE_PRISONER_KILL_CREDIT))
+ return false;
+ return true;
}
- }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* unitTarget = GetHitUnit())
+ {
+ uint32 spellId = SPELL_SUMMON_ARCANE_PRISONER_MALE;
+ if (rand() % 2)
+ spellId = SPELL_SUMMON_ARCANE_PRISONER_FEMALE;
+ caster->CastSpell(caster, spellId, true);
+ unitTarget->CastSpell(caster, SPELL_ARCANE_PRISONER_KILL_CREDIT, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q11587_arcane_prisoner_rescue_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_q11587_arcane_prisoner_rescue_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q11587_arcane_prisoner_rescue_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q11587_arcane_prisoner_rescue_SpellScript();
- }
};
// http://www.wowhead.com/quest=11730 Master and Servant
// 46023 The Ultrasonic Screwdriver
-enum eQuest11730Data
+enum Quest11730Data
{
SPELL_SUMMON_SCAVENGEBOT_004A8 = 46063,
SPELL_SUMMON_SENTRYBOT_57K = 46068,
@@ -411,74 +418,63 @@ enum eQuest11730Data
class spell_q11730_ultrasonic_screwdriver : public SpellScriptLoader
{
-public:
- spell_q11730_ultrasonic_screwdriver() : SpellScriptLoader("spell_q11730_ultrasonic_screwdriver") { }
+ public:
+ spell_q11730_ultrasonic_screwdriver() : SpellScriptLoader("spell_q11730_ultrasonic_screwdriver") { }
- class spell_q11730_ultrasonic_screwdriver_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q11730_ultrasonic_screwdriver_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
+ class spell_q11730_ultrasonic_screwdriver_SpellScript : public SpellScript
{
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SCAVENGEBOT_004A8))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SENTRYBOT_57K))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_DEFENDOTANK_66D))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SCAVENGEBOT_005B6))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_55D_COLLECTATRON))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_ROBOT_KILL_CREDIT))
- return false;
- return true;
- }
+ PrepareSpellScript(spell_q11730_ultrasonic_screwdriver_SpellScript);
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- Item* castItem = GetCastItem();
- if (!castItem)
- return;
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
+ }
- Unit* pCaster = GetCaster();
- if (pCaster->GetTypeId() != TYPEID_PLAYER)
- return;
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SCAVENGEBOT_004A8) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_SENTRYBOT_57K) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_DEFENDOTANK_66D) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_SCAVENGEBOT_005B6) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_55D_COLLECTATRON) || !sSpellMgr->GetSpellInfo(SPELL_ROBOT_KILL_CREDIT))
+ return false;
+ return true;
+ }
- Creature* target = GetHitCreature();
- if (!target)
- return;
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Item* castItem = GetCastItem();
+ Unit* caster = GetCaster();
+ if (Creature* target = GetHitCreature())
+ {
+ uint32 spellId = 0;
+ switch (target->GetEntry())
+ {
+ case NPC_SCAVENGEBOT_004A8: spellId = SPELL_SUMMON_SCAVENGEBOT_004A8; break;
+ case NPC_SENTRYBOT_57K: spellId = SPELL_SUMMON_SENTRYBOT_57K; break;
+ case NPC_DEFENDOTANK_66D: spellId = SPELL_SUMMON_DEFENDOTANK_66D; break;
+ case NPC_SCAVENGEBOT_005B6: spellId = SPELL_SUMMON_SCAVENGEBOT_005B6; break;
+ case NPC_55D_COLLECTATRON: spellId = SPELL_SUMMON_55D_COLLECTATRON; break;
+ default:
+ return;
+ }
+ caster->CastSpell(caster, spellId, true, castItem);
+ caster->CastSpell(caster, SPELL_ROBOT_KILL_CREDIT, true);
+ target->DespawnOrUnsummon();
+ }
+ }
- uint32 spellId = 0;
- switch (target->GetEntry())
+ void Register()
{
- case NPC_SCAVENGEBOT_004A8: spellId = SPELL_SUMMON_SCAVENGEBOT_004A8; break;
- case NPC_SENTRYBOT_57K: spellId = SPELL_SUMMON_SENTRYBOT_57K; break;
- case NPC_DEFENDOTANK_66D: spellId = SPELL_SUMMON_DEFENDOTANK_66D; break;
- case NPC_SCAVENGEBOT_005B6: spellId = SPELL_SUMMON_SCAVENGEBOT_005B6; break;
- case NPC_55D_COLLECTATRON: spellId = SPELL_SUMMON_55D_COLLECTATRON; break;
- default:
- return;
+ OnEffectHitTarget += SpellEffectFn(spell_q11730_ultrasonic_screwdriver_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
- pCaster->CastSpell(pCaster, spellId, true, castItem);
- pCaster->CastSpell(pCaster, SPELL_ROBOT_KILL_CREDIT, true);
- target->DespawnOrUnsummon();
- }
+ };
- void Register()
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_q11730_ultrasonic_screwdriver_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q11730_ultrasonic_screwdriver_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q11730_ultrasonic_screwdriver_SpellScript();
- }
};
// http://www.wowhead.com/quest=12459 That Which Creates Can Also Destroy
// 49587 Seeds of Nature's Wrath
-enum eQuest12459Data
+enum Quest12459Data
{
NPC_REANIMATED_FROSTWYRM = 26841,
NPC_WEAK_REANIMATED_FROSTWYRM = 27821,
@@ -492,44 +488,44 @@ enum eQuest12459Data
class spell_q12459_seeds_of_natures_wrath : public SpellScriptLoader
{
-public:
- spell_q12459_seeds_of_natures_wrath() : SpellScriptLoader("spell_q12459_seeds_of_natures_wrath") { }
-
- class spell_q12459_seeds_of_natures_wrath_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_q12459_seeds_of_natures_wrath_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ spell_q12459_seeds_of_natures_wrath() : SpellScriptLoader("spell_q12459_seeds_of_natures_wrath") { }
+
+ class spell_q12459_seeds_of_natures_wrath_SpellScript : public SpellScript
{
- if (Creature* creatureTarget = GetHitCreature())
+ PrepareSpellScript(spell_q12459_seeds_of_natures_wrath_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
- uint32 uiNewEntry = 0;
- switch (creatureTarget->GetEntry())
+ if (Creature* creatureTarget = GetHitCreature())
{
- case NPC_REANIMATED_FROSTWYRM: uiNewEntry = NPC_WEAK_REANIMATED_FROSTWYRM; break;
- case NPC_TURGID: uiNewEntry = NPC_WEAK_TURGID; break;
- case NPC_DEATHGAZE: uiNewEntry = NPC_WEAK_DEATHGAZE; break;
+ uint32 uiNewEntry = 0;
+ switch (creatureTarget->GetEntry())
+ {
+ case NPC_REANIMATED_FROSTWYRM: uiNewEntry = NPC_WEAK_REANIMATED_FROSTWYRM; break;
+ case NPC_TURGID: uiNewEntry = NPC_WEAK_TURGID; break;
+ case NPC_DEATHGAZE: uiNewEntry = NPC_WEAK_DEATHGAZE; break;
+ }
+ if (uiNewEntry)
+ creatureTarget->UpdateEntry(uiNewEntry);
}
- if (uiNewEntry)
- creatureTarget->UpdateEntry(uiNewEntry);
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q12459_seeds_of_natures_wrath_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_q12459_seeds_of_natures_wrath_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q12459_seeds_of_natures_wrath_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q12459_seeds_of_natures_wrath_SpellScript();
- }
};
// http://www.wowhead.com/quest=12634 Some Make Lemonade, Some Make Liquor
// 51840 Despawn Fruit Tosser
-enum eQuest12634Data
+enum Quest12634Data
{
SPELL_BANANAS_FALL_TO_GROUND = 51836,
SPELL_ORANGE_FALLS_TO_GROUND = 51837,
@@ -539,90 +535,84 @@ enum eQuest12634Data
class spell_q12634_despawn_fruit_tosser : public SpellScriptLoader
{
-public:
- spell_q12634_despawn_fruit_tosser() : SpellScriptLoader("spell_q12634_despawn_fruit_tosser") { }
-
- class spell_q12634_despawn_fruit_tosser_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_q12634_despawn_fruit_tosser_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_BANANAS_FALL_TO_GROUND))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_ORANGE_FALLS_TO_GROUND))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_PAPAYA_FALLS_TO_GROUND))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ADVENTUROUS_DWARF))
- return false;
- return true;
- }
+ spell_q12634_despawn_fruit_tosser() : SpellScriptLoader("spell_q12634_despawn_fruit_tosser") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_q12634_despawn_fruit_tosser_SpellScript : public SpellScript
{
- uint32 spellId = SPELL_BANANAS_FALL_TO_GROUND;
- switch (urand(0, 3))
+ PrepareSpellScript(spell_q12634_despawn_fruit_tosser_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
{
- case 1: spellId = SPELL_ORANGE_FALLS_TO_GROUND; break;
- case 2: spellId = SPELL_PAPAYA_FALLS_TO_GROUND; break;
+ if (!sSpellMgr->GetSpellInfo(SPELL_BANANAS_FALL_TO_GROUND) || !sSpellMgr->GetSpellInfo(SPELL_ORANGE_FALLS_TO_GROUND) || !sSpellMgr->GetSpellInfo(SPELL_PAPAYA_FALLS_TO_GROUND) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_ADVENTUROUS_DWARF))
+ return false;
+ return true;
}
- // sometimes, if you're lucky, you get a dwarf
- if (roll_chance_i(5))
- spellId = SPELL_SUMMON_ADVENTUROUS_DWARF;
- GetCaster()->CastSpell(GetCaster(), spellId, true, NULL);
- }
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ uint32 spellId = SPELL_BANANAS_FALL_TO_GROUND;
+ switch (urand(0, 3))
+ {
+ case 1: spellId = SPELL_ORANGE_FALLS_TO_GROUND; break;
+ case 2: spellId = SPELL_PAPAYA_FALLS_TO_GROUND; break;
+ }
+ // sometimes, if you're lucky, you get a dwarf
+ if (roll_chance_i(5))
+ spellId = SPELL_SUMMON_ADVENTUROUS_DWARF;
+ GetCaster()->CastSpell(GetCaster(), spellId, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_q12634_despawn_fruit_tosser_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_q12634_despawn_fruit_tosser_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q12634_despawn_fruit_tosser_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q12634_despawn_fruit_tosser_SpellScript();
- }
};
// http://www.wowhead.com/quest=12683 Burning to Help
// 52308 Take Sputum Sample
class spell_q12683_take_sputum_sample : public SpellScriptLoader
{
-public:
- spell_q12683_take_sputum_sample() : SpellScriptLoader("spell_q12683_take_sputum_sample") { }
-
- class spell_q12683_take_sputum_sample_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_q12683_take_sputum_sample_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ spell_q12683_take_sputum_sample() : SpellScriptLoader("spell_q12683_take_sputum_sample") { }
+
+ class spell_q12683_take_sputum_sample_SpellScript : public SpellScript
{
- uint32 reqAuraId = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
+ PrepareSpellScript(spell_q12683_take_sputum_sample_SpellScript);
- Unit* pCaster = GetCaster();
- if (pCaster->HasAuraEffect(reqAuraId, 0))
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
- uint32 spellId = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
- pCaster->CastSpell(pCaster, spellId, true, NULL);
+ uint32 reqAuraId = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
+
+ Unit* caster = GetCaster();
+ if (caster->HasAuraEffect(reqAuraId, 0))
+ {
+ uint32 spellId = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
+ caster->CastSpell(caster, spellId, true, NULL);
+ }
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_q12683_take_sputum_sample_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_q12683_take_sputum_sample_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q12683_take_sputum_sample_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q12683_take_sputum_sample_SpellScript();
- }
};
// http://www.wowhead.com/quest=12851 Going Bearback
// 54798 FLAMING Arrow Triggered Effect
-enum eQuest12851Data
+enum Quest12851Data
{
NPC_FROSTGIANT = 29351,
NPC_FROSTWORG = 29358,
@@ -634,53 +624,53 @@ enum eQuest12851Data
class spell_q12851_going_bearback : public SpellScriptLoader
{
-public:
- spell_q12851_going_bearback() : SpellScriptLoader("spell_q12851_going_bearback") { }
-
- class spell_q12851_going_bearback_AuraScript : public AuraScript
- {
public:
- PrepareAuraScript(spell_q12851_going_bearback_AuraScript)
- void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ spell_q12851_going_bearback() : SpellScriptLoader("spell_q12851_going_bearback") { }
+
+ class spell_q12851_going_bearback_AuraScript : public AuraScript
{
- if (Unit* caster = GetCaster())
+ PrepareAuraScript(spell_q12851_going_bearback_AuraScript);
+
+ void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
- if (Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself())
+ if (Unit* caster = GetCaster())
{
- switch (target->GetEntry())
+ Unit* target = GetTarget();
+ if (Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself())
{
- case NPC_FROSTWORG:
- target->CastSpell(player, SPELL_FROSTWORG_CREDIT, true);
- target->CastSpell(target, SPELL_IMMOLATION, true);
- target->CastSpell(target, SPELL_ABLAZE, true);
- break;
- case NPC_FROSTGIANT:
- target->CastSpell(player, SPELL_FROSTGIANT_CREDIT, true);
- target->CastSpell(target, SPELL_IMMOLATION, true);
- target->CastSpell(target, SPELL_ABLAZE, true);
- break;
+ switch (target->GetEntry())
+ {
+ case NPC_FROSTWORG:
+ target->CastSpell(player, SPELL_FROSTWORG_CREDIT, true);
+ target->CastSpell(target, SPELL_IMMOLATION, true);
+ target->CastSpell(target, SPELL_ABLAZE, true);
+ break;
+ case NPC_FROSTGIANT:
+ target->CastSpell(player, SPELL_FROSTGIANT_CREDIT, true);
+ target->CastSpell(target, SPELL_IMMOLATION, true);
+ target->CastSpell(target, SPELL_ABLAZE, true);
+ break;
+ }
}
}
}
- }
- void Register()
- {
- AfterEffectApply += AuraEffectApplyFn(spell_q12851_going_bearback_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- }
+ void Register()
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_q12851_going_bearback_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ }
- };
+ };
- AuraScript* GetAuraScript() const
- {
- return new spell_q12851_going_bearback_AuraScript();
- }
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_q12851_going_bearback_AuraScript();
+ }
};
// http://www.wowhead.com/quest=12937 Relief for the Fallen
// 55804 Healing Finished
-enum eQuest12937Data
+enum Quest12937Data
{
SPELL_TRIGGER_AID_OF_THE_EARTHEN = 55809,
NPC_FALLEN_EARTHEN_DEFENDER = 30035,
@@ -688,50 +678,50 @@ enum eQuest12937Data
class spell_q12937_relief_for_the_fallen : public SpellScriptLoader
{
-public:
- spell_q12937_relief_for_the_fallen() : SpellScriptLoader("spell_q12937_relief_for_the_fallen") { }
-
- class spell_q12937_relief_for_the_fallen_SpellScript : public SpellScript
- {
public:
- PrepareSpellScript(spell_q12937_relief_for_the_fallen_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGER_AID_OF_THE_EARTHEN))
- return false;
- return true;
- }
+ spell_q12937_relief_for_the_fallen() : SpellScriptLoader("spell_q12937_relief_for_the_fallen") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_q12937_relief_for_the_fallen_SpellScript : public SpellScript
{
- Unit* pCaster = GetCaster();
- if (Player* player = pCaster->ToPlayer())
+ PrepareSpellScript(spell_q12937_relief_for_the_fallen_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGER_AID_OF_THE_EARTHEN))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
+ Player* caster = GetCaster()->ToPlayer();
if (Creature* target = GetHitCreature())
{
- player->CastSpell(player, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true, NULL);
- player->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER, 0);
+ caster->CastSpell(caster, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true, NULL);
+ caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER, 0);
target->DespawnOrUnsummon();
}
}
- }
- void Register()
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q12937_relief_for_the_fallen_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHitTarget += SpellEffectFn(spell_q12937_relief_for_the_fallen_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q12937_relief_for_the_fallen_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q12937_relief_for_the_fallen_SpellScript();
- }
};
-enum eWhoarethey
+enum Whoarethey
{
- SPELL_QUESTGIVER = 48917,
-
SPELL_MALE_DISGUISE = 38080,
SPELL_FEMALE_DISGUISE = 38081,
SPELL_GENERIC_DISGUISE = 32756
@@ -748,7 +738,7 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SPELL_QUESTGIVER))
+ if (!sSpellMgr->GetSpellInfo(SPELL_MALE_DISGUISE) || !sSpellMgr->GetSpellInfo(SPELL_FEMALE_DISGUISE) || !sSpellMgr->GetSpellInfo(SPELL_GENERIC_DISGUISE))
return false;
return true;
}
@@ -756,11 +746,11 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
- if (!GetHitUnit() || !GetHitUnit()->ToPlayer())
- return;
-
- GetHitUnit()->CastSpell(GetHitUnit(), GetHitUnit()->getGender() == GENDER_MALE ? SPELL_MALE_DISGUISE : SPELL_FEMALE_DISGUISE, true);
- GetHitUnit()->CastSpell(GetHitUnit(), SPELL_GENERIC_DISGUISE, true);
+ if (Player* target = GetHitPlayer())
+ {
+ target->CastSpell(target, target->getGender() == GENDER_MALE ? SPELL_MALE_DISGUISE : SPELL_FEMALE_DISGUISE, true);
+ target->CastSpell(target, SPELL_GENERIC_DISGUISE, true);
+ }
}
void Register()
@@ -783,79 +773,81 @@ enum symboloflife
// 8593 Symbol of life dummy
class spell_symbol_of_life_dummy : public SpellScriptLoader
{
-public:
- spell_symbol_of_life_dummy() : SpellScriptLoader("spell_symbol_of_life_dummy") { }
-
- class spell_symbol_of_life_dummy_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_symbol_of_life_dummy_SpellScript);
+ public:
+ spell_symbol_of_life_dummy() : SpellScriptLoader("spell_symbol_of_life_dummy") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_symbol_of_life_dummy_SpellScript : public SpellScript
{
- if (Creature* target = GetHitCreature())
+ PrepareSpellScript(spell_symbol_of_life_dummy_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
- if (target->HasAura(SPELL_PERMANENT_FEIGN_DEATH))
+ if (Creature* target = GetHitCreature())
{
- target->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH);
- target->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
- target->SetUInt32Value(UNIT_FIELD_FLAGS_2, 0);
- target->SetHealth(target->GetMaxHealth() / 2);
- target->SetPower(POWER_MANA, uint32(target->GetMaxPower(POWER_MANA) * 0.75f));
+ if (target->HasAura(SPELL_PERMANENT_FEIGN_DEATH))
+ {
+ target->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH);
+ target->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
+ target->SetUInt32Value(UNIT_FIELD_FLAGS_2, 0);
+ target->SetHealth(target->GetMaxHealth() / 2);
+ target->SetPower(POWER_MANA, uint32(target->GetMaxPower(POWER_MANA) * 0.75f));
+ }
}
}
- }
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_symbol_of_life_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_symbol_of_life_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
- SpellScript* GetSpellScript() const
- {
- return new spell_symbol_of_life_dummy_SpellScript();
- };
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_symbol_of_life_dummy_SpellScript();
+ };
};
// http://www.wowhead.com/quest=12659 Scalps!
// 52090 Ahunae's Knife
-enum eQuest12659Data
+enum Quest12659Data
{
NPC_SCALPS_KC_BUNNY = 28622,
};
class spell_q12659_ahunaes_knife : public SpellScriptLoader
{
-public:
- spell_q12659_ahunaes_knife() : SpellScriptLoader("spell_q12659_ahunaes_knife") { }
-
- class spell_q12659_ahunaes_knife_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript);
+ public:
+ spell_q12659_ahunaes_knife() : SpellScriptLoader("spell_q12659_ahunaes_knife") { }
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_q12659_ahunaes_knife_SpellScript : public SpellScript
{
- Player* caster = GetCaster()->ToPlayer();
- if (!caster)
- return;
+ PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript);
- if (Creature* target = GetTargetUnit()->ToCreature())
+ bool Load()
{
- target->ForcedDespawn();
- caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY, 0);
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- }
- void Register()
- {
- OnEffectHitTarget += SpellEffectFn(spell_q12659_ahunaes_knife_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (Creature* target = GetHitCreature())
+ {
+ target->ForcedDespawn();
+ caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY, 0);
+ }
+ }
- SpellScript* GetSpellScript() const
- {
- return new spell_q12659_ahunaes_knife_SpellScript();
- };
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q12659_ahunaes_knife_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q12659_ahunaes_knife_SpellScript();
+ };
};
enum StoppingTheSpread
@@ -875,16 +867,21 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
{
PrepareSpellScript(spell_q9874_liquid_fire_SpellScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
- Creature* target = GetHitUnit()->ToCreature();
- if (!caster || !target || (target && target->HasAura(SPELL_FLAMES)))
- return;
-
- caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0);
- target->CastSpell(target, SPELL_FLAMES, true);
- target->DespawnOrUnsummon(60000);
+ if (Creature* target = GetHitCreature())
+ if (target && target->HasAura(SPELL_FLAMES))
+ {
+ caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0);
+ target->CastSpell(target, SPELL_FLAMES, true);
+ target->DespawnOrUnsummon(60000);
+ }
}
void Register()
@@ -915,16 +912,20 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader
{
PrepareSpellScript(spell_q12805_lifeblood_dummy_SpellScript);
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
void HandleScript(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
- Creature* target = GetHitUnit()->ToCreature();
- if (!caster || !target)
- return;
-
- caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT, 0);
- target->CastSpell(target, uint32(GetEffectValue()), true);
- target->DespawnOrUnsummon(2000);
+ if (Creature* target = GetHitCreature())
+ {
+ caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT, 0);
+ target->CastSpell(target, uint32(GetEffectValue()), true);
+ target->DespawnOrUnsummon(2000);
+ }
}
void Register()
@@ -945,37 +946,38 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader
59643 Plant Horde Battle Standard
4338 Plant Alliance Battle Standard
*/
-enum eBattleStandard
+enum BattleStandard
{
NPC_KING_OF_THE_MOUNTAINT_KC = 31766,
};
class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
{
-public:
- spell_q13280_13283_plant_battle_standard() : SpellScriptLoader("spell_q13280_13283_plant_battle_standard") { }
+ public:
+ spell_q13280_13283_plant_battle_standard() : SpellScriptLoader("spell_q13280_13283_plant_battle_standard") { }
- class spell_q13280_13283_plant_battle_standard_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript)
- void HandleDummy(SpellEffIndex /*effIndex*/)
+ class spell_q13280_13283_plant_battle_standard_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- if (caster->IsVehicle())
- if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
- player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC, 0);
- }
+ PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript);
- void Register()
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
+ player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC, 0);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_q13280_13283_plant_battle_standard_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
{
- OnEffectHit += SpellEffectFn(spell_q13280_13283_plant_battle_standard_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ return new spell_q13280_13283_plant_battle_standard_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q13280_13283_plant_battle_standard_SpellScript();
- }
};
enum ChumTheWaterSummons
@@ -988,42 +990,36 @@ enum ChumTheWaterSummons
class spell_q14112_14145_chum_the_water: public SpellScriptLoader
{
-public:
- spell_q14112_14145_chum_the_water() : SpellScriptLoader("spell_q14112_14145_chum_the_water") { }
+ 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*/)
+ class spell_q14112_14145_chum_the_water_SpellScript : public SpellScript
{
- 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;
- }
+ PrepareSpellScript(spell_q14112_14145_chum_the_water_SpellScript);
- 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));
- }
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SUMMON_ANGRY_KVALDIR) || !sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_MAKO) || !sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_THRESHER) || !sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_BLUE_SHARK))
+ return false;
+ return true;
+ }
- void Register()
+ 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
{
- OnEffectHitTarget += SpellEffectFn(spell_q14112_14145_chum_the_water_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_q14112_14145_chum_the_water_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const
- {
- return new spell_q14112_14145_chum_the_water_SpellScript();
- }
};
// http://old01.wowhead.com/quest=9452 - Red Snapper - Very Tasty!
@@ -1041,15 +1037,16 @@ class spell_q9452_cast_net: public SpellScriptLoader
class spell_q9452_cast_net_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_q9452_cast_net_SpellScript)
+ PrepareSpellScript(spell_q9452_cast_net_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
-
- if (!caster)
- return;
-
switch (urand(0, 2))
{
case 0: case 1:
@@ -1074,6 +1071,42 @@ class spell_q9452_cast_net: public SpellScriptLoader
}
};
+#define SAY_1 "Sons of Hodir! I humbly present to you..."
+#define SAY_2 "The Helm of Hodir!"
+#define NPC_KILLCREDIT 30210 // Hodir's Helm KC Bunny
+
+class spell_q12987_read_pronouncement : public SpellScriptLoader
+{
+public:
+ spell_q12987_read_pronouncement() : SpellScriptLoader("spell_q12987_read_pronouncement") { }
+
+ class spell_q12987_read_pronouncement_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_q12987_read_pronouncement_AuraScript);
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ // player must cast kill credit and do emote text, according to sniff
+ if (Player* target = GetTarget()->ToPlayer())
+ {
+ target->MonsterWhisper(SAY_1, target->GetGUID(), true);
+ target->KilledMonsterCredit(NPC_KILLCREDIT, 0);
+ target->MonsterWhisper(SAY_2, target->GetGUID(), true);
+ }
+ }
+
+ void Register()
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_q12987_read_pronouncement_AuraScript::OnApply, EFFECT_0, SPELL_AURA_NONE, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_q12987_read_pronouncement_AuraScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -1099,4 +1132,5 @@ void AddSC_quest_spell_scripts()
new spell_q13280_13283_plant_battle_standard();
new spell_q14112_14145_chum_the_water();
new spell_q9452_cast_net();
+ new spell_q12987_read_pronouncement();
}
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index c88d7b891d6..3a4132f62fe 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -21,7 +21,8 @@
* Scriptnames of files in this file should be prefixed with "spell_rog_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
enum RogueSpells
@@ -29,120 +30,114 @@ enum RogueSpells
ROGUE_SPELL_SHIV_TRIGGERED = 5940,
ROGUE_SPELL_GLYPH_OF_PREPARATION = 56819,
ROGUE_SPELL_PREY_ON_THE_WEAK = 58670,
+ ROGUE_SPELL_CHEAT_DEATH_COOLDOWN = 31231,
};
// Cheat Death
class spell_rog_cheat_death : public SpellScriptLoader
{
-public:
- spell_rog_cheat_death() : SpellScriptLoader("spell_rog_cheat_death") { }
+ public:
+ spell_rog_cheat_death() : SpellScriptLoader("spell_rog_cheat_death") { }
- class spell_rog_cheat_death_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_rog_cheat_death_AuraScript);
+ class spell_rog_cheat_death_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_rog_cheat_death_AuraScript);
- uint32 absorbChance;
+ uint32 absorbChance;
- enum Spell
- {
- ROG_SPELL_CHEAT_DEATH_COOLDOWN = 31231,
- };
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_CHEAT_DEATH_COOLDOWN))
+ return false;
+ return true;
+ }
- bool Validate(SpellInfo const* /*spellEntry*/)
- {
- return sSpellMgr->GetSpellInfo(ROG_SPELL_CHEAT_DEATH_COOLDOWN);
- }
+ bool Load()
+ {
+ absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
+ return GetUnitOwner()->ToPlayer();
+ }
- bool Load()
- {
- absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
- return GetUnitOwner()->ToPlayer();
- }
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
+ {
+ // Set absorbtion amount to unlimited
+ amount = -1;
+ }
- void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
- {
- // Set absorbtion amount to unlimited
- amount = -1;
- }
+ void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
+ {
+ Player* target = GetTarget()->ToPlayer();
+ if (dmgInfo.GetDamage() < target->GetHealth() || target->HasSpellCooldown(ROGUE_SPELL_CHEAT_DEATH_COOLDOWN) || !roll_chance_i(absorbChance))
+ return;
- void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
- {
- Unit* target = GetTarget();
- if (dmgInfo.GetDamage() < target->GetHealth())
- return;
- if (target->ToPlayer()->HasSpellCooldown(ROG_SPELL_CHEAT_DEATH_COOLDOWN))
- return;
- if (!roll_chance_i(absorbChance))
- return;
-
- target->CastSpell(target, ROG_SPELL_CHEAT_DEATH_COOLDOWN, true);
- target->ToPlayer()->AddSpellCooldown(ROG_SPELL_CHEAT_DEATH_COOLDOWN, 0, time(NULL) + 60);
-
- uint32 health10 = target->CountPctFromMaxHealth(10);
-
- // hp > 10% - absorb hp till 10%
- if (target->GetHealth() > health10)
- absorbAmount = dmgInfo.GetDamage() - target->GetHealth() + health10;
- // hp lower than 10% - absorb everything
- else
- absorbAmount = dmgInfo.GetDamage();
- }
+ target->CastSpell(target, ROGUE_SPELL_CHEAT_DEATH_COOLDOWN, true);
+ target->AddSpellCooldown(ROGUE_SPELL_CHEAT_DEATH_COOLDOWN, 0, time(NULL) + 60);
- void Register()
+ uint32 health10 = target->CountPctFromMaxHealth(10);
+
+ // hp > 10% - absorb hp till 10%
+ if (target->GetHealth() > health10)
+ absorbAmount = dmgInfo.GetDamage() - target->GetHealth() + health10;
+ // hp lower than 10% - absorb everything
+ else
+ absorbAmount = dmgInfo.GetDamage();
+ }
+
+ void Register()
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_cheat_death_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
+ OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_cheat_death_AuraScript::Absorb, EFFECT_0);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
{
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_cheat_death_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
- OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_cheat_death_AuraScript::Absorb, EFFECT_0);
+ return new spell_rog_cheat_death_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_rog_cheat_death_AuraScript();
- }
};
// 31130 - Nerves of Steel
class spell_rog_nerves_of_steel : public SpellScriptLoader
{
-public:
- spell_rog_nerves_of_steel() : SpellScriptLoader("spell_rog_nerves_of_steel") { }
+ public:
+ spell_rog_nerves_of_steel() : SpellScriptLoader("spell_rog_nerves_of_steel") { }
- class spell_rog_nerves_of_steel_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_rog_nerves_of_steel_AuraScript);
+ class spell_rog_nerves_of_steel_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_rog_nerves_of_steel_AuraScript);
- uint32 absorbPct;
+ uint32 absorbPct;
- bool Load()
- {
- absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster());
- return true;
- }
+ bool Load()
+ {
+ absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster());
+ return true;
+ }
- void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
- {
- // Set absorbtion amount to unlimited
- amount = -1;
- }
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
+ {
+ // Set absorbtion amount to unlimited
+ amount = -1;
+ }
- void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
- {
- // reduces all damage taken while stun or fear
- if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_FLEEING) || (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN)))
- absorbAmount = CalculatePctN(dmgInfo.GetDamage(), absorbPct);
- }
+ void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
+ {
+ // reduces all damage taken while stun or fear
+ if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_FLEEING) || (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN)))
+ absorbAmount = CalculatePctN(dmgInfo.GetDamage(), absorbPct);
+ }
- void Register()
+ void Register()
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_nerves_of_steel_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
+ OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_nerves_of_steel_AuraScript::Absorb, EFFECT_0);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
{
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_nerves_of_steel_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
- OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_nerves_of_steel_AuraScript::Absorb, EFFECT_0);
+ return new spell_rog_nerves_of_steel_AuraScript();
}
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_rog_nerves_of_steel_AuraScript();
- }
};
class spell_rog_preparation : public SpellScriptLoader
@@ -152,7 +147,13 @@ class spell_rog_preparation : public SpellScriptLoader
class spell_rog_preparation_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_preparation_SpellScript)
+ PrepareSpellScript(spell_rog_preparation_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_GLYPH_OF_PREPARATION))
@@ -162,12 +163,10 @@ class spell_rog_preparation : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- Unit* caster = GetCaster();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
+ Player* caster = GetCaster()->ToPlayer();
//immediately finishes the cooldown on certain Rogue abilities
- const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap();
+ const SpellCooldowns& cm = caster->GetSpellCooldownMap();
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
@@ -176,14 +175,14 @@ class spell_rog_preparation : public SpellScriptLoader
{
if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) // Vanish, Evasion, Sprint
- caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true);
+ caster->RemoveSpellCooldown((itr++)->first, true);
else if (caster->HasAura(ROGUE_SPELL_GLYPH_OF_PREPARATION))
{
if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick
(spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry
spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY))
- caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true);
+ caster->RemoveSpellCooldown((itr++)->first, true);
else
++itr;
}
@@ -216,7 +215,8 @@ public:
class spell_rog_prey_on_the_weak_AuraScript : public AuraScript
{
- PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript)
+ PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript);
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_PREY_ON_THE_WEAK))
@@ -259,7 +259,13 @@ class spell_rog_shiv : public SpellScriptLoader
class spell_rog_shiv_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_shiv_SpellScript)
+ PrepareSpellScript(spell_rog_shiv_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
bool Validate(SpellInfo const* /*spellEntry*/)
{
if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_SHIV_TRIGGERED))
@@ -270,9 +276,6 @@ class spell_rog_shiv : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
if (Unit* unitTarget = GetHitUnit())
caster->CastSpell(unitTarget, ROGUE_SPELL_SHIV_TRIGGERED, true);
}
@@ -297,8 +300,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
class spell_rog_deadly_poison_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_rog_deadly_poison_SpellScript)
-
+ PrepareSpellScript(spell_rog_deadly_poison_SpellScript);
bool Load()
{
@@ -309,13 +311,10 @@ class spell_rog_deadly_poison : public SpellScriptLoader
void HandleBeforeHit()
{
- Unit* target = GetHitUnit();
- if (!target)
- return;
-
- // Deadly Poison
- if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0x80000, 0, GetCaster()->GetGUID()))
- _stackAmount = aurEff->GetBase()->GetStackAmount();
+ if (Unit* target = GetHitUnit())
+ // Deadly Poison
+ if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x10000, 0x80000, 0, GetCaster()->GetGUID()))
+ _stackAmount = aurEff->GetBase()->GetStackAmount();
}
void HandleAfterHit()
@@ -324,49 +323,50 @@ class spell_rog_deadly_poison : public SpellScriptLoader
return;
Player* player = GetCaster()->ToPlayer();
- Unit* target = GetHitUnit();
- if (!target)
- return;
- Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
+ if (Unit* target = GetHitUnit())
+ {
- if (item == GetCastItem())
- item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
+ Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
- if (!item)
- return;
+ if (item == GetCastItem())
+ item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
- // item combat enchantments
- for (uint8 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot)
- {
- SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(EnchantmentSlot(slot)));
- if (!enchant)
- continue;
+ if (!item)
+ return;
- for (uint8 s = 0; s < 3; ++s)
+ // item combat enchantments
+ for (uint8 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot)
{
- if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
+ SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(EnchantmentSlot(slot)));
+ if (!enchant)
continue;
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
- if (!spellInfo)
+ for (uint8 s = 0; s < 3; ++s)
{
- sLog->outError("Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName(), player->GetGUIDLow(), enchant->spellid[s]);
- continue;
+ if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
+ continue;
+
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
+ if (!spellInfo)
+ {
+ sLog->outError("Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName(), player->GetGUIDLow(), enchant->spellid[s]);
+ continue;
+ }
+
+ // Proc only rogue poisons
+ if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE || spellInfo->Dispel != DISPEL_POISON)
+ continue;
+
+ // Do not reproc deadly
+ if (spellInfo->SpellFamilyFlags.IsEqual(0x10000, 0x80000, 0))
+ continue;
+
+ if (spellInfo->IsPositive())
+ player->CastSpell(player, enchant->spellid[s], true, item);
+ else
+ player->CastSpell(target, enchant->spellid[s], true, item);
}
-
- // Proc only rogue poisons
- if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE || spellInfo->Dispel != DISPEL_POISON)
- continue;
-
- // Do not reproc deadly
- if (spellInfo->SpellFamilyFlags.IsEqual(0x10000, 0x80000, 0))
- continue;
-
- if (spellInfo->IsPositive())
- player->CastSpell(player, enchant->spellid[s], true, item);
- else
- player->CastSpell(target, enchant->spellid[s], true, item);
}
}
}
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index b0116d6d33d..96ee7a18429 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -21,7 +21,10 @@
* Scriptnames of files in this file should be prefixed with "spell_sha_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "GridNotifiers.h"
+#include "Unit.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
enum ShamanSpells
@@ -94,9 +97,7 @@ class spell_sha_fire_nova : public SpellScriptLoader
bool Validate(SpellInfo const* spellEntry)
{
- if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_FIRE_NOVA_R1))
- return false;
- if (sSpellMgr->GetFirstSpellInChain(SHAMAN_SPELL_FIRE_NOVA_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id))
+ if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_FIRE_NOVA_R1) || sSpellMgr->GetFirstSpellInChain(SHAMAN_SPELL_FIRE_NOVA_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id))
return false;
uint8 rank = sSpellMgr->GetSpellRank(spellEntry->Id);
@@ -119,13 +120,15 @@ class spell_sha_fire_nova : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- Unit* caster = GetCaster();
- uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
- if (uint32 spellId = sSpellMgr->GetSpellWithRank(SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1, rank))
+ if (Unit* caster = GetCaster())
{
- Creature* totem = caster->GetMap()->GetCreature(caster->m_SummonSlot[1]);
- if (totem && totem->isTotem())
- caster->CastSpell(totem, spellId, true);
+ uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
+ if (uint32 spellId = sSpellMgr->GetSpellWithRank(SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1, rank))
+ {
+ Creature* totem = caster->GetMap()->GetCreature(caster->m_SummonSlot[1]);
+ if (totem && totem->isTotem())
+ caster->CastSpell(totem, spellId, true);
+ }
}
}
@@ -154,30 +157,28 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_MANA_TIDE_TOTEM))
+ if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE) || !sSpellMgr->GetSpellInfo(SHAMAN_SPELL_MANA_TIDE_TOTEM))
return false;
return true;
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- Unit* caster = GetCaster();
- if (Unit* unitTarget = GetHitUnit())
- {
- if (unitTarget->getPowerType() == POWER_MANA)
+ if (Unit* caster = GetCaster())
+ if (Unit* unitTarget = GetHitUnit())
{
- int32 effValue = GetEffectValue();
- // Glyph of Mana Tide
- if (Unit* owner = caster->GetOwner())
- if (AuraEffect* dummy = owner->GetAuraEffect(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE, 0))
- effValue += dummy->GetAmount();
- // Regenerate 6% of Total Mana Every 3 secs
- int32 effBasePoints0 = int32(CalculatePctN(unitTarget->GetMaxPower(POWER_MANA), effValue));
- caster->CastCustomSpell(unitTarget, SHAMAN_SPELL_MANA_TIDE_TOTEM, &effBasePoints0, NULL, NULL, true, NULL, NULL, GetOriginalCaster()->GetGUID());
+ if (unitTarget->getPowerType() == POWER_MANA)
+ {
+ int32 effValue = GetEffectValue();
+ // Glyph of Mana Tide
+ if (Unit* owner = caster->GetOwner())
+ if (AuraEffect* dummy = owner->GetAuraEffect(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE, 0))
+ effValue += dummy->GetAmount();
+ // Regenerate 6% of Total Mana Every 3 secs
+ int32 effBasePoints0 = int32(CalculatePctN(unitTarget->GetMaxPower(POWER_MANA), effValue));
+ caster->CastCustomSpell(unitTarget, SHAMAN_SPELL_MANA_TIDE_TOTEM, &effBasePoints0, NULL, NULL, true, NULL, NULL, GetOriginalCaster()->GetGUID());
+ }
}
- }
}
void Register()
@@ -204,22 +205,20 @@ class spell_sha_earthbind_totem : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM))
- return false;
- if (!sSpellMgr->GetSpellInfo(SHAMAN_TOTEM_SPELL_EARTHEN_POWER))
+ if (!sSpellMgr->GetSpellInfo(SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM) || !sSpellMgr->GetSpellInfo(SHAMAN_TOTEM_SPELL_EARTHEN_POWER))
return false;
return true;
}
void HandleEffectPeriodic(AuraEffect const* aurEff)
{
- Unit* target = GetTarget();
- if (Unit* caster = aurEff->GetBase()->GetCaster())
- if (TempSummon* summon = caster->ToTempSummon())
- if (Unit* owner = summon->GetOwner())
- if (AuraEffect* aur = owner->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 2289, 0))
- if (roll_chance_i(aur->GetBaseAmount()) && target->HasAuraWithMechanic(1 << MECHANIC_SNARE))
- caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff);
+ if (Unit* target = GetTarget())
+ if (Unit* caster = aurEff->GetBase()->GetCaster())
+ if (TempSummon* summon = caster->ToTempSummon())
+ if (Unit* owner = summon->GetOwner())
+ if (AuraEffect* aur = owner->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 2289, 0))
+ if (roll_chance_i(aur->GetBaseAmount()) && target->HasAuraWithMechanic(1 << MECHANIC_SNARE))
+ caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff);
}
void Register()
@@ -257,7 +256,8 @@ class spell_sha_bloodlust : public SpellScriptLoader
void ApplyDebuff()
{
- GetHitUnit()->CastSpell(GetHitUnit(), SHAMAN_SPELL_SATED, true);
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(target, SHAMAN_SPELL_SATED, true);
}
void Register()
@@ -298,7 +298,8 @@ class spell_sha_heroism : public SpellScriptLoader
void ApplyDebuff()
{
- GetHitUnit()->CastSpell(GetHitUnit(), SHAMAN_SPELL_EXHAUSTION, true);
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(target, SHAMAN_SPELL_EXHAUSTION, true);
}
void Register()
@@ -316,6 +317,232 @@ class spell_sha_heroism : public SpellScriptLoader
}
};
+enum AncestralAwakeningProc
+{
+ SPELL_ANCESTRAL_AWAKENING_PROC = 52752,
+};
+
+class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
+{
+ public:
+ spell_sha_ancestral_awakening_proc() : SpellScriptLoader("spell_sha_ancestral_awakening_proc") { }
+
+ class spell_sha_ancestral_awakening_proc_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sha_ancestral_awakening_proc_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ANCESTRAL_AWAKENING_PROC))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ if (GetCaster() && GetHitUnit())
+ GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_ancestral_awakening_proc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sha_ancestral_awakening_proc_SpellScript();
+ }
+};
+
+enum CleansingTotemPulse
+{
+ SPELL_CLEANSING_TOTEM_EFFECT = 52025,
+};
+
+class spell_sha_cleansing_totem_pulse : public SpellScriptLoader
+{
+ public:
+ spell_sha_cleansing_totem_pulse() : SpellScriptLoader("spell_sha_cleansing_totem_pulse") { }
+
+ class spell_sha_cleansing_totem_pulse_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sha_cleansing_totem_pulse_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_CLEANSING_TOTEM_EFFECT))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 bp = 1;
+ if (GetCaster() && GetHitUnit() && GetOriginalCaster())
+ GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_CLEANSING_TOTEM_EFFECT, NULL, &bp, NULL, true, NULL, NULL, GetOriginalCaster()->GetGUID());
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_cleansing_totem_pulse_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sha_cleansing_totem_pulse_SpellScript();
+ }
+};
+
+enum HealingStreamTotem
+{
+ SPELL_GLYPH_OF_HEALING_STREAM_TOTEM = 55456,
+ ICON_ID_RESTORATIVE_TOTEMS = 338,
+ SPELL_HEALING_STREAM_TOTEM_HEAL = 52042,
+};
+
+class spell_sha_healing_stream_totem : public SpellScriptLoader
+{
+ public:
+ spell_sha_healing_stream_totem() : SpellScriptLoader("spell_sha_healing_stream_totem") { }
+
+ class spell_sha_healing_stream_totem_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sha_healing_stream_totem_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_GLYPH_OF_HEALING_STREAM_TOTEM) || !sSpellMgr->GetSpellInfo(SPELL_HEALING_STREAM_TOTEM_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ SpellInfo const* triggeringSpell = GetTriggeringSpell();
+ if (Unit* target = GetHitUnit())
+ if (Unit* caster = GetCaster())
+ {
+ if (Unit* owner = caster->GetOwner())
+ {
+ if (triggeringSpell)
+ damage = int32(owner->SpellHealingBonus(target, triggeringSpell, damage, HEAL));
+
+ // Restorative Totems
+ if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, ICON_ID_RESTORATIVE_TOTEMS, 1))
+ AddPctN(damage, dummy->GetAmount());
+
+ // Glyph of Healing Stream Totem
+ if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_GLYPH_OF_HEALING_STREAM_TOTEM, EFFECT_0))
+ AddPctN(damage, aurEff->GetAmount());
+ }
+ caster->CastCustomSpell(target, SPELL_HEALING_STREAM_TOTEM_HEAL, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID());
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_healing_stream_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sha_healing_stream_totem_SpellScript();
+ }
+};
+
+enum ManaSpringTotem
+{
+ SPELL_MANA_SPRING_TOTEM_ENERGIZE = 52032,
+};
+
+class spell_sha_mana_spring_totem : public SpellScriptLoader
+{
+ public:
+ spell_sha_mana_spring_totem() : SpellScriptLoader("spell_sha_mana_spring_totem") { }
+
+ class spell_sha_mana_spring_totem_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sha_mana_spring_totem_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MANA_SPRING_TOTEM_ENERGIZE))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ if (Unit* target = GetHitUnit())
+ if (Unit* caster = GetCaster())
+ if (target->getPowerType() == POWER_MANA)
+ caster->CastCustomSpell(target, SPELL_MANA_SPRING_TOTEM_ENERGIZE, &damage, 0, 0, true, 0, 0, GetOriginalCaster()->GetGUID());
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_mana_spring_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sha_mana_spring_totem_SpellScript();
+ }
+};
+
+class spell_sha_lava_lash : public SpellScriptLoader
+{
+ public:
+ spell_sha_lava_lash() : SpellScriptLoader("spell_sha_lava_lash") { }
+
+ class spell_sha_lava_lash_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_sha_lava_lash_SpellScript)
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ if (Player* caster = GetCaster()->ToPlayer())
+ {
+ int32 damage = GetEffectValue();
+ int32 hitDamage = GetHitDamage();
+ if (caster->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
+ {
+ // Damage is increased by 25% if your off-hand weapon is enchanted with Flametongue.
+ if (caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x200000, 0, 0))
+ AddPctN(hitDamage, damage);
+ SetHitDamage(hitDamage);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sha_lava_lash_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
+ }
+
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_sha_lava_lash_SpellScript();
+ }
+};
+
+
void AddSC_shaman_spell_scripts()
{
new spell_sha_astral_shift();
@@ -324,4 +551,9 @@ void AddSC_shaman_spell_scripts()
new spell_sha_earthbind_totem();
new spell_sha_bloodlust();
new spell_sha_heroism();
+ new spell_sha_ancestral_awakening_proc();
+ new spell_sha_cleansing_totem_pulse();
+ new spell_sha_healing_stream_totem();
+ new spell_sha_mana_spring_totem();
+ new spell_sha_lava_lash();
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 51b2de5d0f3..b1aff706db0 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -21,8 +21,8 @@
* Scriptnames of files in this file should be prefixed with "spell_warl_".
*/
-#include "ScriptPCH.h"
-#include "Spell.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
#include "SpellAuraEffects.h"
enum WarlockSpells
@@ -99,15 +99,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS))
- return false;
- if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER))
- return false;
- if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_FELGUARD))
- return false;
- if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_FELHUNTER))
- return false;
- if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_IMP))
+ if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS) || !sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER) || !sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_FELGUARD) || !sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_FELHUNTER) || !sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_IMP))
return false;
return true;
}
@@ -172,9 +164,7 @@ class spell_warl_create_healthstone : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellEntry*/)
{
- if (!sSpellMgr->GetSpellInfo(WARLOCK_IMPROVED_HEALTHSTONE_R1))
- return false;
- if (!sSpellMgr->GetSpellInfo(WARLOCK_IMPROVED_HEALTHSTONE_R2))
+ if (!sSpellMgr->GetSpellInfo(WARLOCK_IMPROVED_HEALTHSTONE_R1) || !sSpellMgr->GetSpellInfo(WARLOCK_IMPROVED_HEALTHSTONE_R2))
return false;
return true;
}
@@ -267,7 +257,8 @@ public:
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- GetCaster()->CastSpell(GetCaster(), GetEffectValue(), true);
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, GetEffectValue(), true);
}
void Register()
@@ -293,7 +284,8 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
void FilterTargets(std::list<Unit*>& unitList)
{
- unitList.remove(GetTargetUnit());
+ if (GetTargetUnit())
+ unitList.remove(GetTargetUnit());
}
void Register()
@@ -308,6 +300,149 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
}
};
+enum Soulshatter
+{
+ SPELL_SOULSHATTER = 32835,
+};
+
+class spell_warl_soulshatter : public SpellScriptLoader
+{
+ public:
+ spell_warl_soulshatter() : SpellScriptLoader("spell_warl_soulshatter") { }
+
+ class spell_warl_soulshatter_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warl_soulshatter_SpellScript);
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SOULSHATTER))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ {
+ if (target->CanHaveThreatList() && target->getThreatManager().getThreat(caster) > 0.0f)
+ {
+ sLog->outString("THREATREDUCTION");
+ caster->CastSpell(target, SPELL_SOULSHATTER, true);
+ } else
+ sLog->outString("can have threat? %u . threat number? %f ",target->CanHaveThreatList(),target->getThreatManager().getThreat(caster));
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warl_soulshatter_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warl_soulshatter_SpellScript();
+ }
+};
+
+enum LifeTap
+{
+ SPELL_LIFE_TAP_RANK_6 = 11689,
+ SPELL_LIFE_TAP_RANK_7 = 27222,
+ SPELL_LIFE_TAP_RANK_8 = 57946,
+ SPELL_LIFE_TAP_ENERGIZE = 31818,
+ SPELL_LIFE_TAP_ENERGIZE_2 = 32553,
+ ICON_ID_IMPROVED_LIFE_TAP = 208,
+ ICON_ID_MANA_FEED = 1982,
+};
+
+class spell_warl_life_tap : public SpellScriptLoader
+{
+ public:
+ spell_warl_life_tap() : SpellScriptLoader("spell_warl_life_tap") { }
+
+ class spell_warl_life_tap_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warl_life_tap_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ bool Validate(SpellInfo const* /*spell*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_RANK_6) || !sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_RANK_7)
+ || !sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_RANK_8) || !sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_ENERGIZE)
+ || !sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_ENERGIZE_2))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (Unit* target = GetHitUnit())
+ {
+ SpellInfo const* spellInfo = GetSpellInfo();
+ float spFactor = 0.0f;
+ int32 damage = int32(GetEffectValue() + (6.3875 * spellInfo->BaseLevel));
+ switch (spellInfo->Id)
+ {
+ case SPELL_LIFE_TAP_RANK_6: spFactor = 0.2f; break;
+ case SPELL_LIFE_TAP_RANK_7:
+ case SPELL_LIFE_TAP_RANK_8: spFactor = 0.5f; break;
+ default: break;
+ }
+
+ int32 mana = int32(damage + (caster->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+SPELL_SCHOOL_SHADOW) * spFactor));
+
+ // Shouldn't Appear in Combat Log
+ target->ModifyHealth(-damage);
+
+ // Improved Life Tap mod
+ if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, ICON_ID_IMPROVED_LIFE_TAP, 0))
+ AddPctN(mana, aurEff->GetAmount());
+
+ caster->CastCustomSpell(target, SPELL_LIFE_TAP_ENERGIZE, &mana, NULL, NULL, false);
+
+ // Mana Feed
+ int32 manaFeedVal = 0;
+ if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, ICON_ID_MANA_FEED, 0))
+ manaFeedVal = aurEff->GetAmount();
+
+ if (manaFeedVal > 0)
+ {
+ ApplyPctN(manaFeedVal, mana);
+ caster->CastCustomSpell(caster, SPELL_LIFE_TAP_ENERGIZE_2, &manaFeedVal, NULL, NULL, true, NULL);
+ }
+ }
+ }
+
+ SpellCastResult CheckCast()
+ {
+ if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue() + (6.3875 * GetSpellInfo()->BaseLevel))))
+ {
+ return SPELL_CAST_OK;
+ }
+ return SPELL_FAILED_FIZZLE;
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warl_life_tap_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ OnCheckCast += SpellCheckCastFn(spell_warl_life_tap_SpellScript::CheckCast);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warl_life_tap_SpellScript();
+ }
+};
+
void AddSC_warlock_spell_scripts()
{
new spell_warl_banish();
@@ -316,4 +451,6 @@ void AddSC_warlock_spell_scripts()
new spell_warl_everlasting_affliction();
new spell_warl_ritual_of_doom_effect();
new spell_warl_seed_of_corruption();
+ new spell_warl_soulshatter();
+ new spell_warl_life_tap();
}
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index f39ad3d1426..1084398c37d 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -21,7 +21,9 @@
* Scriptnames of files in this file should be prefixed with "spell_warr_".
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
enum WarriorSpells
{
@@ -46,8 +48,11 @@ class spell_warr_last_stand : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- int32 healthModSpellBasePoints0 = int32(GetCaster()->CountPctFromMaxHealth(30));
- GetCaster()->CastCustomSpell(GetCaster(), WARRIOR_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
+ if (Unit* caster = GetCaster())
+ {
+ int32 healthModSpellBasePoints0 = int32(caster->CountPctFromMaxHealth(30));
+ caster->CastCustomSpell(caster, WARRIOR_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
+ }
}
void Register()
@@ -74,7 +79,8 @@ class spell_warr_improved_spell_reflection : public SpellScriptLoader
void FilterTargets(std::list<Unit*>& unitList)
{
- unitList.remove(GetCaster());
+ if (GetCaster())
+ unitList.remove(GetCaster());
}
void Register()
@@ -115,23 +121,19 @@ public:
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
- target->CastSpell(target, SPELL_DAMAGE_REDUCTION_AURA, true);
+ if (Unit* target = GetTarget())
+ target->CastSpell(target, SPELL_DAMAGE_REDUCTION_AURA, true);
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
-
- if (!target->HasAura(SPELL_DAMAGE_REDUCTION_AURA))
- return;
-
- if (target->HasAura(SPELL_BLESSING_OF_SANCTUARY) ||
- target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY) ||
- target->HasAura(SPELL_RENEWED_HOPE))
- return;
-
- target->RemoveAurasDueToSpell(SPELL_DAMAGE_REDUCTION_AURA);
+ if (Unit* target = GetTarget())
+ {
+ if (target->HasAura(SPELL_DAMAGE_REDUCTION_AURA) && !(target->HasAura(SPELL_BLESSING_OF_SANCTUARY) ||
+ target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY) ||
+ target->HasAura(SPELL_RENEWED_HOPE)))
+ target->RemoveAurasDueToSpell(SPELL_DAMAGE_REDUCTION_AURA);
+ }
}
void Register()
@@ -148,9 +150,278 @@ public:
}
};
+enum DeepWounds
+{
+ SPELL_DEEP_WOUNDS_RANK_1 = 12162,
+ SPELL_DEEP_WOUNDS_RANK_2 = 12850,
+ SPELL_DEEP_WOUNDS_RANK_3 = 12868,
+ SPELL_DEEP_WOUNDS_RANK_PERIODIC = 12721,
+};
+
+class spell_warr_deep_wounds : public SpellScriptLoader
+{
+ public:
+ spell_warr_deep_wounds() : SpellScriptLoader("spell_warr_deep_wounds") { }
+
+ class spell_warr_deep_wounds_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_deep_wounds_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_1) || !sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_2) || !sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_3))
+ return false;
+ return true;
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ if (Unit* target = GetHitUnit())
+ if (Unit* caster = GetCaster())
+ {
+ // apply percent damage mods
+ damage = caster->SpellDamageBonus(target, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE);
+
+ ApplyPctN(damage, 16 * sSpellMgr->GetSpellRank(GetSpellInfo()->Id));
+
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_PERIODIC);
+ uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude;
+
+ // Add remaining ticks to damage done
+ if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_DEEP_WOUNDS_RANK_PERIODIC, EFFECT_0, caster->GetGUID()))
+ damage += aurEff->GetAmount() * (ticks - aurEff->GetTickNumber());
+
+ damage = damage / ticks;
+ caster->CastCustomSpell(target, SPELL_DEEP_WOUNDS_RANK_PERIODIC, &damage, NULL, NULL, true);
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_deep_wounds_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_deep_wounds_SpellScript();
+ }
+};
+
+enum Charge
+{
+ SPELL_JUGGERNAUT_CRIT_BONUS_TALENT = 64976,
+ SPELL_JUGGERNAUT_CRIT_BONUS_BUFF = 65156,
+ SPELL_CHARGE = 34846,
+};
+
+class spell_warr_charge : public SpellScriptLoader
+{
+ public:
+ spell_warr_charge() : SpellScriptLoader("spell_warr_charge") { }
+
+ class spell_warr_charge_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_charge_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_JUGGERNAUT_CRIT_BONUS_TALENT) || !sSpellMgr->GetSpellInfo(SPELL_JUGGERNAUT_CRIT_BONUS_BUFF) || !sSpellMgr->GetSpellInfo(SPELL_CHARGE))
+ return false;
+ return true;
+ }
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 chargeBasePoints0 = GetEffectValue();
+ Unit* caster = GetCaster();
+ caster->CastCustomSpell(caster, SPELL_CHARGE, &chargeBasePoints0, NULL, NULL, true);
+
+ //Juggernaut crit bonus
+ if (caster->HasAura(SPELL_JUGGERNAUT_CRIT_BONUS_TALENT))
+ caster->CastSpell(caster, SPELL_JUGGERNAUT_CRIT_BONUS_BUFF, true);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_charge_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_charge_SpellScript();
+ }
+};
+
+enum Slam
+{
+ SPELL_SLAM = 50783,
+};
+
+class spell_warr_slam : public SpellScriptLoader
+{
+ public:
+ spell_warr_slam() : SpellScriptLoader("spell_warr_slam") { }
+
+ class spell_warr_slam_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_slam_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SLAM))
+ return false;
+ return true;
+ }
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 bp0 = GetEffectValue();
+ if (GetHitUnit())
+ GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_SLAM, &bp0, NULL, NULL, true, 0);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_slam_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_slam_SpellScript();
+ }
+};
+
+enum Execute
+{
+ SPELL_EXECUTE = 20647,
+ SPELL_GLYPH_OF_EXECUTION = 58367,
+ ICON_ID_SUDDEN_DEATH = 1989,
+};
+
+class spell_warr_execute : public SpellScriptLoader
+{
+ public:
+ spell_warr_execute() : SpellScriptLoader("spell_warr_execute") { }
+
+ class spell_warr_execute_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_execute_SpellScript);
+
+ bool Validate(SpellInfo const* /*SpellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_EXECUTE) || !sSpellMgr->GetSpellInfo(SPELL_GLYPH_OF_EXECUTION))
+ return false;
+ return true;
+ }
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ Unit* caster = GetCaster();
+ if (Unit* target = GetHitUnit())
+ {
+ SpellInfo const* spellInfo = GetSpellInfo();
+ int32 rageUsed = std::min<int32>(300 - spellInfo->CalcPowerCost(caster, SpellSchoolMask(spellInfo->SchoolMask)), caster->GetPower(POWER_RAGE));
+ int32 newRage = std::max<int32>(0, caster->GetPower(POWER_RAGE) - rageUsed);
+
+ // Sudden Death rage save
+ if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_GENERIC, ICON_ID_SUDDEN_DEATH, EFFECT_0))
+ {
+ int32 ragesave = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue() * 10;
+ newRage = std::max(newRage, ragesave);
+ }
+
+ caster->SetPower(POWER_RAGE, uint32(newRage));
+ // Glyph of Execution bonus
+ if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_GLYPH_OF_EXECUTION, EFFECT_0))
+ rageUsed += aurEff->GetAmount() * 10;
+
+
+ int32 bp = GetEffectValue() + int32(rageUsed * spellInfo->Effects[effIndex].DamageMultiplier + caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.2f);
+ caster->CastCustomSpell(target,SPELL_EXECUTE,&bp,0,0,true,0,0,GetOriginalCaster()->GetGUID());
+ }
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_execute_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_execute_SpellScript();
+ }
+};
+
+class spell_warr_concussion_blow : public SpellScriptLoader
+{
+ public:
+ spell_warr_concussion_blow() : SpellScriptLoader("spell_warr_concussion_blow") { }
+
+ class spell_warr_concussion_blow_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_concussion_blow_SpellScript);
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ SetHitDamage(GetHitDamage() + CalculatePctF(GetHitDamage(),GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK)));
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_concussion_blow_SpellScript::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_concussion_blow_SpellScript();
+ }
+};
+
+enum Bloodthirst
+{
+ SPELL_BLOODTHIRST = 23885,
+};
+
+class spell_warr_bloodthirst : public SpellScriptLoader
+{
+ public:
+ spell_warr_bloodthirst() : SpellScriptLoader("spell_warr_bloodthirst") { }
+
+ class spell_warr_bloodthirst_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_bloodthirst_SpellScript);
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ int32 damage = GetEffectValue();
+ if (GetHitUnit())
+ GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_BLOODTHIRST, &damage, NULL, NULL, true, NULL);
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_bloodthirst_SpellScript();
+ }
+};
+
void AddSC_warrior_spell_scripts()
{
new spell_warr_last_stand();
new spell_warr_improved_spell_reflection();
new spell_warr_vigilance();
+ new spell_warr_deep_wounds();
+ new spell_warr_charge();
+ new spell_warr_slam();
+ new spell_warr_execute();
+ new spell_warr_concussion_blow();
+ new spell_warr_bloodthirst();
}
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 135f22e0a01..9bcf450b3aa 100755
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -285,6 +285,16 @@ class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript
}
};
+enum ArgentTournamentAreas
+{
+ AREA_ARGENT_TOURNAMENT_FIELDS = 4658,
+ AREA_RING_OF_ASPIRANTS = 4670,
+ AREA_RING_OF_ARGENT_VALIANTS = 4671,
+ AREA_RING_OF_ALLIANCE_VALIANTS = 4672,
+ AREA_RING_OF_HORDE_VALIANTS = 4673,
+ AREA_RING_OF_CHAMPIONS = 4669,
+};
+
class achievement_tilted : public AchievementCriteriaScript
{
public:
@@ -292,7 +302,14 @@ class achievement_tilted : public AchievementCriteriaScript
bool OnCheck(Player* player, Unit* /*target*/)
{
- return player && player->duel && player->duel->isMounted;
+ bool checkArea = player->GetAreaId() == AREA_ARGENT_TOURNAMENT_FIELDS ||
+ player->GetAreaId() == AREA_RING_OF_ASPIRANTS ||
+ player->GetAreaId() == AREA_RING_OF_ARGENT_VALIANTS ||
+ player->GetAreaId() == AREA_RING_OF_ALLIANCE_VALIANTS ||
+ player->GetAreaId() == AREA_RING_OF_HORDE_VALIANTS ||
+ player->GetAreaId() == AREA_RING_OF_CHAMPIONS;
+
+ return player && checkArea && player->duel && player->duel->isMounted;
}
};
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index fff01c83d07..3dfc85d7eb4 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -1312,7 +1312,7 @@ class go_veil_skith_cage : public GameObjectScript
(*itr)->AI()->Talk(SAY_FREE_0);
(*itr)->GetMotionMaster()->Clear();
}
- }
+ }
return false;
}
};
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 521e38a7061..165ef9f18b1 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -242,7 +242,7 @@ public:
{
summon->SetVisible(false);
summon->SetReactState(REACT_PASSIVE);
- summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
return false;
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index fcf5f56c539..1e1e34431a2 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -33,7 +33,6 @@ npc_guardian 100% guardianAI used to prevent players from accessin
npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 565
npc_injured_patient 100% patients for triage-quests (6622 and 6624)
npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage)
-npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796
npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy
npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681
npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given
@@ -1137,50 +1136,6 @@ public:
};
/*######
-## npc_kingdom_of_dalaran_quests
-######*/
-
-enum eKingdomDalaran
-{
- SPELL_TELEPORT_DALARAN = 53360,
- ITEM_KT_SIGNET = 39740,
- QUEST_MAGICAL_KINGDOM_A = 12794,
- QUEST_MAGICAL_KINGDOM_H = 12791,
- QUEST_MAGICAL_KINGDOM_N = 12796
-};
-
-#define GOSSIP_ITEM_TELEPORT_TO "I am ready to be teleported to Dalaran."
-
-class npc_kingdom_of_dalaran_quests : public CreatureScript
-{
-public:
- npc_kingdom_of_dalaran_quests() : CreatureScript("npc_kingdom_of_dalaran_quests") { }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->HasItemCount(ITEM_KT_SIGNET, 1) && (!player->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_A) ||
- !player->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_H) || !player->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_N)))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT_TO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF + 1)
- {
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, SPELL_TELEPORT_DALARAN, false);
- }
- return true;
- }
-};
-
-/*######
## npc_mount_vendor
######*/
@@ -1738,6 +1693,12 @@ public:
if (!UpdateVictim())
return;
+ if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me))
+ {
+ me->InterruptNonMeleeSpells(false);
+ return;
+ }
+
if (SpellTimer <= diff)
{
if (IsViper) //Viper
@@ -3044,6 +3005,100 @@ public:
}
};
+/*#####
+# npc_spring_rabbit
+#####*/
+
+enum rabbitSpells
+{
+ SPELL_SPRING_FLING = 61875,
+ SPELL_SPRING_RABBIT_JUMP = 61724,
+ SPELL_SPRING_RABBIT_WANDER = 61726,
+ SPELL_SUMMON_BABY_BUNNY = 61727,
+ SPELL_SPRING_RABBIT_IN_LOVE = 61728,
+ NPC_SPRING_RABBIT = 32791
+};
+
+class npc_spring_rabbit : public CreatureScript
+{
+public:
+ npc_spring_rabbit() : CreatureScript("npc_spring_rabbit") { }
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_spring_rabbitAI(creature);
+ }
+
+ struct npc_spring_rabbitAI : public ScriptedAI
+ {
+ npc_spring_rabbitAI(Creature* c) : ScriptedAI(c) { }
+
+ bool inLove;
+ uint32 jumpTimer;
+ uint32 bunnyTimer;
+ uint32 searchTimer;
+ uint64 rabbitGUID;
+
+ void Reset()
+ {
+ inLove = false;
+ rabbitGUID = 0;
+ jumpTimer = urand(5000, 10000);
+ bunnyTimer = urand(10000, 20000);
+ searchTimer = urand(5000, 10000);
+ if (Unit* owner = me->GetOwner())
+ me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ }
+
+ void EnterCombat(Unit * /*who*/) { }
+
+ void DoAction(const int32 /*param*/)
+ {
+ inLove = true;
+ if (Unit* owner = me->GetOwner())
+ owner->CastSpell(owner, SPELL_SPRING_FLING, true);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (inLove)
+ {
+ if (jumpTimer <= diff)
+ {
+ if (Unit* rabbit = Unit::GetUnit(*me, rabbitGUID))
+ DoCast(rabbit, SPELL_SPRING_RABBIT_JUMP);
+ jumpTimer = urand(5000, 10000);
+ } else jumpTimer -= diff;
+
+ if (bunnyTimer <= diff)
+ {
+ DoCast(SPELL_SUMMON_BABY_BUNNY);
+ bunnyTimer = urand(20000, 40000);
+ } else bunnyTimer -= diff;
+ }
+ else
+ {
+ if (searchTimer <= diff)
+ {
+ if (Creature* rabbit = me->FindNearestCreature(NPC_SPRING_RABBIT, 10.0f))
+ {
+ if (rabbit == me || rabbit->HasAura(SPELL_SPRING_RABBIT_IN_LOVE))
+ return;
+
+ me->AddAura(SPELL_SPRING_RABBIT_IN_LOVE, me);
+ DoAction(1);
+ rabbit->AddAura(SPELL_SPRING_RABBIT_IN_LOVE, rabbit);
+ rabbit->AI()->DoAction(1);
+ rabbit->CastSpell(rabbit, SPELL_SPRING_RABBIT_JUMP, true);
+ rabbitGUID = rabbit->GetGUID();
+ }
+ searchTimer = urand(5000, 10000);
+ } else searchTimer -= diff;
+ }
+ }
+ };
+};
+
void AddSC_npcs_special()
{
new npc_air_force_bots;
@@ -3054,7 +3109,6 @@ void AddSC_npcs_special()
new npc_injured_patient;
new npc_garments_of_quests;
new npc_guardian;
- new npc_kingdom_of_dalaran_quests;
new npc_mount_vendor;
new npc_rogue_trainer;
new npc_sayge;
@@ -3077,5 +3131,5 @@ void AddSC_npcs_special()
new npc_fire_elemental;
new npc_earth_elemental;
new npc_firework;
+ new npc_spring_rabbit();
}
-
diff --git a/src/server/shared/Cryptography/WardenKeyGeneration.h b/src/server/shared/Cryptography/WardenKeyGeneration.h
new file mode 100644
index 00000000000..9b44ab1832e
--- /dev/null
+++ b/src/server/shared/Cryptography/WardenKeyGeneration.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "SHA1.h"
+
+#ifndef _WARDEN_KEY_GENERATION_H
+#define _WARDEN_KEY_GENERATION_H
+
+class SHA1Randx {
+public:
+ SHA1Randx(uint8 *buff, uint32 size) {
+ uint32 taken = size/2;
+
+ sh.Initialize();
+ sh.UpdateData(buff,taken);
+ sh.Finalize();
+
+ memcpy(o1,sh.GetDigest(),20);
+
+ sh.Initialize();
+ sh.UpdateData(buff+taken,size-taken);
+ sh.Finalize();
+
+ memcpy(o2,sh.GetDigest(),20);
+
+ memset(o0,0x00,20);
+
+ fillUp();
+ }
+
+ void generate(uint8 *buf, uint32 sz) {
+ for(uint32 i=0;i<sz;i++) {
+ if(taken == 20) {
+ fillUp();
+ }
+
+ buf[i] = o0[taken];
+ taken++;
+ }
+ }
+private:
+ void fillUp() {
+ sh.Initialize();
+ sh.UpdateData(o1,20);
+ sh.UpdateData(o0,20);
+ sh.UpdateData(o2,20);
+ sh.Finalize();
+
+ memcpy(o0,sh.GetDigest(),20);
+
+ taken = 0;
+ }
+ SHA1Hash sh;
+ uint32 taken;
+ uint8 o0[20],o1[20],o2[20];
+};
+
+#endif
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index c510f6d03a6..fa3654dc0c9 100755
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -353,7 +353,7 @@ enum CharacterDatabaseStatements
CHAR_DEL_CHARACTER_SOCIAL,
CHAR_UPD_CHARACTER_SOCIAL_NOTE,
CHAR_UPD_CHARACTER_POSITION,
-
+
CHAR_INS_LFG_DATA,
CHAR_DEL_LFG_DATA,
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp
index 7e497c4437b..8ef8d3b48cf 100755
--- a/src/server/shared/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp
@@ -31,7 +31,7 @@ void LoginDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(LOGIN_INS_ACCOUNT_AUTO_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban', 1)", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_SEL_SESSIONKEY, "SELECT a.sessionkey, a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = ?", CONNECTION_SYNCH)
PREPARE_STATEMENT(LOGIN_UPD_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?", CONNECTION_ASYNC)
- PREPARE_STATEMENT(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0 WHERE username = ?", CONNECTION_ASYNC)
+ PREPARE_STATEMENT(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE username = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_SEL_LOGONCHALLENGE, "SELECT a.sha_pass_hash, a.id, a.locked, a.last_ip, aa.gmlevel, a.v, a.s FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = ?", CONNECTION_SYNCH)
PREPARE_STATEMENT(LOGIN_UPD_FAILEDLOGINS, "UPDATE account SET failed_logins = failed_logins + 1 WHERE username = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(LOGIN_SEL_FAILEDLOGINS, "SELECT id, failed_logins FROM account WHERE username = ?", CONNECTION_SYNCH)
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h
index 46e14d81a5e..c05c4e62c96 100755
--- a/src/server/shared/Database/MySQLConnection.h
+++ b/src/server/shared/Database/MySQLConnection.h
@@ -62,13 +62,6 @@ struct MySQLConnectionInfo
std::string port_or_socket;
};
-struct PreparedStatementTable
-{
- uint32 index;
- const char* query;
- ConnectionFlags type;
-};
-
typedef std::map<uint32 /*index*/, std::pair<const char* /*query*/, ConnectionFlags /*sync/async*/> > PreparedStatementMap;
#define PREPARE_STATEMENT(a, b, c) m_queries[a] = std::make_pair(strdup(b), c);
diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp
index dff055b8d3d..95034387089 100755
--- a/src/server/shared/Database/QueryResult.cpp
+++ b/src/server/shared/Database/QueryResult.cpp
@@ -20,13 +20,13 @@
#include "Log.h"
ResultSet::ResultSet(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount) :
-m_rowCount(rowCount),
-m_fieldCount(fieldCount),
-m_result(result),
-m_fields(fields)
+_rowCount(rowCount),
+_fieldCount(fieldCount),
+_result(result),
+_fields(fields)
{
- m_currentRow = new Field[m_fieldCount];
- ASSERT(m_currentRow);
+ _currentRow = new Field[_fieldCount];
+ ASSERT(_currentRow);
}
PreparedResultSet::PreparedResultSet(MYSQL_STMT* stmt, MYSQL_RES *result, uint64 rowCount, uint32 fieldCount) :
@@ -150,18 +150,18 @@ bool ResultSet::NextRow()
{
MYSQL_ROW row;
- if (!m_result)
+ if (!_result)
return false;
- row = mysql_fetch_row(m_result);
+ row = mysql_fetch_row(_result);
if (!row)
{
CleanUp();
return false;
}
- for (uint32 i = 0; i < m_fieldCount; i++)
- m_currentRow[i].SetStructuredValue(row[i], m_fields[i].type);
+ for (uint32 i = 0; i < _fieldCount; i++)
+ _currentRow[i].SetStructuredValue(row[i], _fields[i].type);
return true;
}
@@ -196,16 +196,16 @@ bool PreparedResultSet::_NextRow()
void ResultSet::CleanUp()
{
- if (m_currentRow)
+ if (_currentRow)
{
- delete [] m_currentRow;
- m_currentRow = NULL;
+ delete [] _currentRow;
+ _currentRow = NULL;
}
- if (m_result)
+ if (_result)
{
- mysql_free_result(m_result);
- m_result = NULL;
+ mysql_free_result(_result);
+ _result = NULL;
}
}
diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h
index c165a9456f5..524532f30ec 100755
--- a/src/server/shared/Database/QueryResult.h
+++ b/src/server/shared/Database/QueryResult.h
@@ -33,29 +33,29 @@
class ResultSet
{
public:
- ResultSet(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount);
+ ResultSet(MYSQL_RES* result, MYSQL_FIELD* fields, uint64 rowCount, uint32 fieldCount);
~ResultSet();
bool NextRow();
- uint64 GetRowCount() const { return m_rowCount; }
- uint32 GetFieldCount() const { return m_fieldCount; }
+ uint64 GetRowCount() const { return _rowCount; }
+ uint32 GetFieldCount() const { return _fieldCount; }
- Field* Fetch() const { return m_currentRow; }
+ Field* Fetch() const { return _currentRow; }
const Field & operator [] (uint32 index) const
{
- ASSERT(index < m_fieldCount);
- return m_currentRow[index];
+ ASSERT(index < _fieldCount);
+ return _currentRow[index];
}
protected:
- Field* m_currentRow;
- uint64 m_rowCount;
- uint32 m_fieldCount;
+ uint64 _rowCount;
+ Field* _currentRow;
+ uint32 _fieldCount;
private:
void CleanUp();
- MYSQL_RES *m_result;
- MYSQL_FIELD *m_fields;
+ MYSQL_RES* _result;
+ MYSQL_FIELD* _fields;
};
typedef ACE_Refcounted_Auto_Ptr<ResultSet, ACE_Null_Mutex> QueryResult;
@@ -63,7 +63,7 @@ typedef ACE_Refcounted_Auto_Ptr<ResultSet, ACE_Null_Mutex> QueryResult;
class PreparedResultSet
{
public:
- PreparedResultSet(MYSQL_STMT* stmt, MYSQL_RES *result, uint64 rowCount, uint32 fieldCount);
+ PreparedResultSet(MYSQL_STMT* stmt, MYSQL_RES* result, uint64 rowCount, uint32 fieldCount);
~PreparedResultSet();
bool NextRow();
@@ -84,9 +84,9 @@ class PreparedResultSet
}
protected:
+ std::vector<Field*> m_rows;
uint64 m_rowCount;
uint64 m_rowPosition;
- std::vector<Field*> m_rows;
uint32 m_fieldCount;
private:
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index e04225a94e1..b583d742748 100755
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -29,7 +29,7 @@ extern LoginDatabaseWorkerPool LoginDatabase;
Log::Log() :
raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL),
- dberLogfile(NULL), chatLogfile(NULL), arenaLogFile(NULL), sqlLogFile(NULL), sqlDevLogFile(NULL),
+ dberLogfile(NULL), chatLogfile(NULL), arenaLogFile(NULL), sqlLogFile(NULL), sqlDevLogFile(NULL), wardenLogFile(NULL),
m_gmlog_per_account(false), m_enableLogDBLater(false),
m_enableLogDB(false), m_colored(false)
{
@@ -73,6 +73,10 @@ Log::~Log()
if (sqlDevLogFile != NULL)
fclose(sqlDevLogFile);
sqlDevLogFile = NULL;
+
+ if (wardenLogFile != NULL)
+ fclose(wardenLogFile);
+ wardenLogFile = NULL;
}
void Log::SetLogLevel(char *Level)
@@ -166,6 +170,7 @@ void Log::Initialize()
arenaLogFile = openLogFile("ArenaLogFile", NULL, "a");
sqlLogFile = openLogFile("SQLDriverLogFile", NULL, "a");
sqlDevLogFile = openLogFile("SQLDeveloperLogFile", NULL, "a");
+ wardenLogFile = openLogFile("Warden.LogFile",NULL,"a");
// Main log file settings
m_logLevel = ConfigMgr::GetIntDefault("LogLevel", LOGL_NORMAL);
@@ -1062,3 +1067,20 @@ void Log::outErrorST(const char * str, ...)
ACE_Stack_Trace st;
outError("%s [Stacktrace: %s]", nnew_str, st.c_str());
}
+
+void Log::outWarden(const char * str, ...)
+{
+ if (!str)
+ return;
+
+ if (wardenLogFile)
+ {
+ outTimestamp(wardenLogFile);
+ va_list ap;
+ va_start(ap, str);
+ vfprintf(wardenLogFile, str, ap);
+ fprintf(wardenLogFile, "\n" );
+ fflush(wardenLogFile);
+ va_end(ap);
+ }
+}
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index 0489b84f7fe..cbaa2d80451 100755
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -50,7 +50,8 @@ enum DebugLogFilters
LOG_FILTER_LOOT = 0x00100000, // Loot related
LOG_FILTER_GUILD = 0x00200000, // Guild related
LOG_FILTER_TRANSPORTS = 0x00400000, // Transport related
- LOG_FILTER_OPCODES = 0x00800000, // OpCodes
+ LOG_FILTER_WARDEN = 0x00800000, // Warden related
+ LOG_FILTER_OPCODES = 0x01000000, // OpCodes
};
enum LogTypes
@@ -137,6 +138,7 @@ class Log
void outChat( const char * str, ... ) ATTR_PRINTF(2, 3);
void outArena( const char * str, ... ) ATTR_PRINTF(2, 3);
void outSQLDriver( const char* str, ... ) ATTR_PRINTF(2, 3);
+ void outWarden( const char * str, ... ) ATTR_PRINTF(2, 3);
void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name );
void outOpCode(uint32 op, const char * name, bool smsg = true);
@@ -170,6 +172,7 @@ class Log
FILE* arenaLogFile;
FILE* sqlLogFile;
FILE* sqlDevLogFile;
+ FILE* wardenLogFile;
// cache values for after initilization use (like gm log per account case)
std::string m_logsDir;
diff --git a/src/server/shared/Threading/Callback.h b/src/server/shared/Threading/Callback.h
index fd7a1130fb4..3e1e7ac692f 100755
--- a/src/server/shared/Threading/Callback.h
+++ b/src/server/shared/Threading/Callback.h
@@ -96,7 +96,7 @@ class QueryCallback
{
return _stage;
}
-
+
//! Resets all underlying variables (param, result and stage)
void Reset()
{
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp
index 6ae43bc6840..52ce74be8f8 100755
--- a/src/server/shared/Utilities/Util.cpp
+++ b/src/server/shared/Utilities/Util.cpp
@@ -16,6 +16,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <iostream>
#include "Util.h"
#include "utf8.h"
#ifdef USE_SFMT_FOR_RNG
@@ -529,3 +530,15 @@ void hexEncodeByteArray(uint8* bytes, uint32 arrayLen, std::string& result)
result = ss.str();
}
+std::string ByteArrayToHexStr(uint8* bytes, uint32 length)
+{
+ std::ostringstream ss;
+ for (uint32 i = 0; i < length; ++i)
+ {
+ char buffer[4];
+ sprintf(buffer, "%02X ", bytes[i]);
+ ss << buffer;
+ }
+
+ return ss.str();
+}
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h
index 684b26eea63..4c2c1936993 100755
--- a/src/server/shared/Utilities/Util.h
+++ b/src/server/shared/Utilities/Util.h
@@ -378,6 +378,7 @@ bool IsIPAddress(char const* ipaddress);
uint32 CreatePIDFile(const std::string& filename);
void hexEncodeByteArray(uint8* bytes, uint32 arrayLen, std::string& result);
+std::string ByteArrayToHexStr(uint8* bytes, uint32 length);
#endif
//handler for operations on large flags
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index 191bbbf35b4..b75dfcfc064 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -44,12 +44,14 @@ endif()
include_directories(
${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/dep/g3dlite/include
${CMAKE_SOURCE_DIR}/dep/gsoap
${CMAKE_SOURCE_DIR}/dep/sockets/include
${CMAKE_SOURCE_DIR}/dep/SFMT
${CMAKE_SOURCE_DIR}/dep/mersennetwister
${CMAKE_SOURCE_DIR}/src/server/collision
${CMAKE_SOURCE_DIR}/src/server/collision/Management
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
@@ -127,6 +129,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Spells
${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
${CMAKE_SOURCE_DIR}/src/server/game/Tools
+ ${CMAKE_SOURCE_DIR}/src/server/game/Warden
+ ${CMAKE_SOURCE_DIR}/src/server/game/Warden/Modules
${CMAKE_SOURCE_DIR}/src/server/game/Weather
${CMAKE_SOURCE_DIR}/src/server/game/World
${CMAKE_SOURCE_DIR}/src/server/authserver/Server
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index 8b7d8c19071..26b28b25fbb 100755
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
@@ -30,7 +30,7 @@ void TCSoapRunnable::run()
soap.accept_timeout = 3;
soap.recv_timeout = 5;
soap.send_timeout = 5;
- if (soap_bind(&soap, m_host.c_str(), m_port, 100) < 0)
+ if (!soap_valid_socket(soap_bind(&soap, m_host.c_str(), m_port, 100)))
{
sLog->outError("TCSoap: couldn't bind to %s:%d", m_host.c_str(), m_port);
exit(-1);
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 57fde5b8ea7..ac4d3fb1bc0 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -11,6 +11,7 @@
# PERFORMANCE SETTINGS
# SERVER LOGGING
# SERVER SETTINGS
+# WARDEN SETTINGS
# PLAYER INTERACTION
# CREATURE SETTINGS
# CHAT SETTINGS
@@ -472,7 +473,8 @@ LogFileLevel = 0
# 1048576 - Anything related to loot
# 2097152 - Anything related to guilds
# 4194304 - Anything related to transports
-# 8388608 - Incoming/outgoing Opcodes
+# 8388608 - Anything related to Warden anti cheat
+# 16777216 - Incoming/outgoing Opcodes
#
# Simply add the values together to create a bitmask.
# For more info see enum DebugLogFilters in Log.h
@@ -1250,6 +1252,22 @@ Quests.HighLevelHideDiff = 7
Quests.IgnoreRaid = 0
#
+# Quests.IgnoreAutoAccept
+# Description: Ignore auto accept flag. Clients will have to manually accept all quests.
+# Default: 0 - (Disabled, DB values determine if quest is marked auto accept or not.)
+# 1 - (Enabled, clients will not be told to automatically accept any quest.)
+
+Quests.IgnoreAutoAccept = 0
+
+#
+# Quests.IgnoreAutoComplete
+# Description: Ignore auto complete flag. Clients will have to manually complete all quests.
+# Default: 0 - (Disabled, DB values determine if quest is marked auto complete or not.)
+# 1 - (Enabled, clients will not be told to automatically complete any quest.)
+
+Quests.IgnoreAutoComplete = 0
+
+#
# Guild.EventLogRecordsCount
# Description: Number of log entries for guild events that are stored per guild. Old entries
# will be overwritten if the number of log entries exceed the configured value.
@@ -1416,6 +1434,82 @@ AccountInstancesPerHour = 5
###################################################################################################
###################################################################################################
+# WARDEN SETTINGS
+#
+# Warden.Enabled
+# Description: Enable Warden anticheat system.
+# Default: 0 - (Disabled)
+# 1 - (Enabled)
+
+Warden.Enabled = 0
+
+#
+# Warden.NumMemChecks
+# Description: Number of Warden memory checks that are sent to the client each cycle.
+# Default: 3 - (Enabled)
+# 0 - (Disabled)
+
+Warden.NumMemChecks = 3
+
+#
+# Warden.NumOtherChecks
+# Description: Number of Warden checks other than memory checks that are added to request
+# each checking cycle.
+# Default: 7 - (Enabled)
+# 0 - (Disabled)
+
+Warden.NumOtherChecks = 7
+
+#
+# Warden.LogFile
+# Description: Client check fails will be logged here.
+# Default: "" - (Disabled)
+# "Warden.log" - (Enabled)
+#
+
+Warden.LogFile = ""
+
+#
+# Warden.ClientResponseDelay
+# Description: Time (in seconds) before client is getting disconnecting for not responding.
+# Default: 600 - (10 Minutes)
+# 0 - (Disabled, client won't be kicked)
+
+Warden.ClientResponseDelay = 600
+
+#
+# Warden.ClientCheckHoldOff
+# Description: Time (in seconds) to wait before sending the next check request to the client.
+# A low number increases traffic and load on client and server side.
+# Default: 30 - (30 Seconds)
+# 0 - (Send check as soon as possible)
+
+Warden.ClientCheckHoldOff = 30
+
+#
+# Warden.ClientCheckFailAction
+# Description: Default action being taken if a client check failed. Actions can be
+# overwritten for each single check via warden_action table in characters
+# database.
+# Default: 0 - (Disabled, Logging only)
+# 1 - (Kick)
+# 2 - (Ban)
+
+Warden.ClientCheckFailAction = 0
+
+#
+# Warden.BanDuration
+# Description: Time (in seconds) an account will be banned if ClientCheckFailAction is set
+# to ban.
+# Default: 86400 - (24 hours)
+# 0 - (Permanent ban)
+
+Warden.BanDuration = 86400
+
+#
+###################################################################################################
+
+###################################################################################################
# PLAYER INTERACTION
#
# AllowTwoSide.Accounts
@@ -2446,14 +2540,14 @@ Arena.QueueAnnouncer.Enable = 0
#
# Arena.ArenaSeason.ID
-# Description: Current area season id shown in clients.
+# Description: Current arena season id shown in clients.
# Default: 8
Arena.ArenaSeason.ID = 8
#
# Arena.ArenaSeason.InProgress
-# Description: State of current area season.
+# Description: State of current arena season.
# Default: 1 - (Active)
# 0 - (Finished)
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 82f71aed030..a956655ffaa 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -9,5 +9,5 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
add_subdirectory(map_extractor)
-add_subdirectory(vmap3_assembler)
-add_subdirectory(vmap3_extractor)
+add_subdirectory(vmap4_assembler)
+add_subdirectory(vmap4_extractor)
diff --git a/src/tools/vmap3_extractor/model.h b/src/tools/vmap3_extractor/model.h
deleted file mode 100644
index f16396bdd40..00000000000
--- a/src/tools/vmap3_extractor/model.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef MODEL_H
-#define MODEL_H
-
-#include "vec3d.h"
-//#include "mpq.h"
-#include "modelheaders.h"
-#include <vector>
-
-class Model;
-class WMOInstance;
-class MPQFile;
-
-Vec3D fixCoordSystem(Vec3D v);
-
-class Model
-{
-public:
- ModelHeader header;
- uint32 offsBB_vertices, offsBB_indices;
- Vec3D *BB_vertices, *vertices;
- uint16 *BB_indices, *indices;
- size_t nIndices;
-
- bool open();
- bool ConvertToVMAPModel(char * outfilename);
-
- bool ok;
-
- Model(std::string &filename);
- ~Model();
-
-private:
- std::string filename;
- char outfilename;
-};
-
-class ModelInstance
-{
-public:
- Model *model;
-
- uint32 id;
- Vec3D pos, rot;
- unsigned int d1, scale;
- float w,sc;
-
- ModelInstance() {}
- ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile);
-
-};
-
-#endif
diff --git a/src/tools/vmap3_extractor/vmapexport.h b/src/tools/vmap3_extractor/vmapexport.h
deleted file mode 100644
index e8a55fb898e..00000000000
--- a/src/tools/vmap3_extractor/vmapexport.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef VMAPEXPORT_H
-#define VMAPEXPORT_H
-
-enum ModelFlags
-{
- MOD_M2 = 1,
- MOD_WORLDSPAWN = 1<<1,
- MOD_HAS_BOUND = 1<<2
-};
-
-extern const char * szWorkDirWmo;
-
-#endif
diff --git a/src/tools/vmap3_assembler/CMakeLists.txt b/src/tools/vmap4_assembler/CMakeLists.txt
index ba5d1649d38..e4f57646c49 100644
--- a/src/tools/vmap3_assembler/CMakeLists.txt
+++ b/src/tools/vmap4_assembler/CMakeLists.txt
@@ -13,6 +13,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/dep/g3dlite/include
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/collision
${CMAKE_SOURCE_DIR}/src/server/collision/Maps
${CMAKE_SOURCE_DIR}/src/server/collision/Models
${ACE_INCLUDE_DIR}
@@ -20,21 +21,21 @@ include_directories(
)
add_definitions(-DNO_CORE_FUNCS)
-add_executable(vmap3assembler VMapAssembler.cpp)
-add_dependencies(vmap3assembler mpq)
+add_executable(vmap4assembler VMapAssembler.cpp)
+add_dependencies(vmap4assembler mpq)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
- set_target_properties(vmap3assembler PROPERTIES LINK_FLAGS "-framework Carbon")
+ set_target_properties(vmap4assembler PROPERTIES LINK_FLAGS "-framework Carbon")
endif()
-target_link_libraries(vmap3assembler
+target_link_libraries(vmap4assembler
collision
g3dlib
${ZLIB_LIBRARIES}
)
if( UNIX )
- install(TARGETS vmap3assembler DESTINATION bin)
+ install(TARGETS vmap4assembler DESTINATION bin)
elseif( WIN32 )
- install(TARGETS vmap3assembler DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ install(TARGETS vmap4assembler DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
diff --git a/src/tools/vmap3_assembler/VMapAssembler.cpp b/src/tools/vmap4_assembler/VMapAssembler.cpp
index bb8e324bc75..bb8e324bc75 100644
--- a/src/tools/vmap3_assembler/VMapAssembler.cpp
+++ b/src/tools/vmap4_assembler/VMapAssembler.cpp
diff --git a/src/tools/vmap3_extractor/CMakeLists.txt b/src/tools/vmap4_extractor/CMakeLists.txt
index 2763487cea4..c1ef3125a20 100644
--- a/src/tools/vmap3_extractor/CMakeLists.txt
+++ b/src/tools/vmap4_extractor/CMakeLists.txt
@@ -23,18 +23,18 @@ include_directories(
${CMAKE_SOURCE_DIR}/dep/StormLib/src
)
-add_executable(vmap3extractor ${sources})
+add_executable(vmap4extractor ${sources})
-target_link_libraries(vmap3extractor
+target_link_libraries(vmap4extractor
${BZIP2_LIBRARIES}
${ZLIB_LIBRARIES}
storm
)
-add_dependencies(vmap3extractor storm)
+add_dependencies(vmap4extractor mpq)
if( UNIX )
- install(TARGETS vmap3extractor DESTINATION bin)
+ install(TARGETS vmap4extractor DESTINATION bin)
elseif( WIN32 )
- install(TARGETS vmap3extractor DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ install(TARGETS vmap4extractor DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
diff --git a/src/tools/vmap3_extractor/adtfile.cpp b/src/tools/vmap4_extractor/adtfile.cpp
index 58c1bb94b1c..a966172a3be 100644
--- a/src/tools/vmap3_extractor/adtfile.cpp
+++ b/src/tools/vmap4_extractor/adtfile.cpp
@@ -1,13 +1,40 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "vmapexport.h"
#include "adtfile.h"
#include <algorithm>
#include <cstdio>
-#ifdef _WIN32
+#ifdef WIN32
#define snprintf _snprintf
#endif
+const char * GetPlainName(const char * FileName)
+{
+ const char * szTemp;
+
+ if((szTemp = strrchr(FileName, '\\')) != NULL)
+ FileName = szTemp + 1;
+ return FileName;
+}
+
char * GetPlainName(char * FileName)
{
char * szTemp;
@@ -43,6 +70,14 @@ void fixname2(char *name, size_t len)
}
}
+char * GetExtension(char * FileName)
+{
+ char * szTemp;
+ if((szTemp = strrchr(FileName, '.')) != NULL)
+ return szTemp;
+ return NULL;
+}
+
ADTFile::ADTFile(char* filename): ADT(filename)
{
Adtfilename.append(filename);
@@ -107,35 +142,15 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY)
while (p<buf+size)
{
fixnamen(p,strlen(p));
- string path(p);
- char* s=GetPlainName(p);
+ char* s = GetPlainName(p);
fixname2(s,strlen(s));
- p=p+strlen(p)+1;
+
ModelInstansName[t++] = s;
- // < 3.1.0 ADT MMDX section store filename.mdx filenames for corresponded .m2 file
- std::string ext3 = path.size() >= 4 ? path.substr(path.size()-4,4) : "";
- std::transform( ext3.begin(), ext3.end(), ext3.begin(), ::tolower );
- if(ext3 == ".mdx")
- {
- // replace .mdx -> .m2
- path.erase(path.length()-2,2);
- path.append("2");
- }
- // >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file
- // nothing do
-
- char szLocalFile[1024];
- snprintf(szLocalFile, 1024, "%s/%s", szWorkDirWmo, s);
- FILE * output = fopen(szLocalFile,"rb");
- if(!output)
- {
- Model m2(path);
- if(m2.open())
- m2.ConvertToVMAPModel(szLocalFile);
- }
- else
- fclose(output);
+ string path(p);
+ ExtractSingleModel(path);
+
+ p = p+strlen(p)+1;
}
delete[] buf;
}
diff --git a/src/tools/vmap3_extractor/adtfile.h b/src/tools/vmap4_extractor/adtfile.h
index eaf09a9243d..08814996f68 100644
--- a/src/tools/vmap3_extractor/adtfile.h
+++ b/src/tools/vmap4_extractor/adtfile.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef ADT_H
#define ADT_H
@@ -115,7 +133,11 @@ private:
string Adtfilename;
};
+const char * GetPlainName(const char * FileName);
+char * GetPlainName(char * FileName);
+char * GetExtension(char * FileName);
void fixnamen(char *name, size_t len);
+void fixname2(char *name, size_t len);
//void fixMapNamen(char *name, size_t len);
#endif
diff --git a/src/tools/vmap3_extractor/dbcfile.cpp b/src/tools/vmap4_extractor/dbcfile.cpp
index 021dc6f6e33..5b5fe314799 100644
--- a/src/tools/vmap3_extractor/dbcfile.cpp
+++ b/src/tools/vmap4_extractor/dbcfile.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include "dbcfile.h"
diff --git a/src/tools/vmap3_extractor/dbcfile.h b/src/tools/vmap4_extractor/dbcfile.h
index ce7d8e85ed3..9fdb7a9e268 100644
--- a/src/tools/vmap3_extractor/dbcfile.h
+++ b/src/tools/vmap4_extractor/dbcfile.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef DBCFILE_H
#define DBCFILE_H
#include <cassert>
diff --git a/src/tools/vmap4_extractor/gameobject_extract.cpp b/src/tools/vmap4_extractor/gameobject_extract.cpp
new file mode 100644
index 00000000000..8a1f67cd2c2
--- /dev/null
+++ b/src/tools/vmap4_extractor/gameobject_extract.cpp
@@ -0,0 +1,99 @@
+#include "model.h"
+#include "dbcfile.h"
+#include "adtfile.h"
+#include "vmapexport.h"
+
+#include <algorithm>
+#include <stdio.h>
+
+bool ExtractSingleModel(std::string& fname)
+{
+ char * name = GetPlainName((char*)fname.c_str());
+ char * ext = GetExtension(name);
+
+ // < 3.1.0 ADT MMDX section store filename.mdx filenames for corresponded .m2 file
+ if (!strcmp(ext, ".mdx"))
+ {
+ // replace .mdx -> .m2
+ fname.erase(fname.length()-2,2);
+ fname.append("2");
+ }
+ // >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file
+ // nothing do
+
+ std::string output(szWorkDirWmo);
+ output += "/";
+ output += name;
+
+ if (FileExists(output.c_str()))
+ return true;
+
+ Model mdl(fname);
+ if (!mdl.open())
+ return false;
+
+ return mdl.ConvertToVMAPModel(output.c_str());
+}
+
+void ExtractGameobjectModels()
+{
+ printf("Extracting GameObject models...");
+ DBCFile dbc("DBFilesClient\\GameObjectDisplayInfo.dbc");
+ if(!dbc.open())
+ {
+ printf("Fatal error: Invalid GameObjectDisplayInfo.dbc file format!\n");
+ exit(1);
+ }
+
+ std::string basepath = szWorkDirWmo;
+ basepath += "/";
+ std::string path;
+
+ FILE * model_list = fopen((basepath + "temp_gameobject_models").c_str(), "wb");
+
+ for (DBCFile::Iterator it = dbc.begin(); it != dbc.end(); ++it)
+ {
+ path = it->getString(1);
+
+ if (path.length() < 4)
+ continue;
+
+ fixnamen((char*)path.c_str(), path.size());
+ char * name = GetPlainName((char*)path.c_str());
+ fixname2(name, strlen(name));
+
+ char * ch_ext = GetExtension(name);
+ if (!ch_ext)
+ continue;
+
+ strToLower(ch_ext);
+
+ bool result = false;
+ if (!strcmp(ch_ext, ".wmo"))
+ {
+ result = ExtractSingleWmo(path);
+ }
+ else if (!strcmp(ch_ext, ".mdl"))
+ {
+ // TODO: extract .mdl files, if needed
+ continue;
+ }
+ else //if (!strcmp(ch_ext, ".mdx") || !strcmp(ch_ext, ".m2"))
+ {
+ result = ExtractSingleModel(path);
+ }
+
+ if (result)
+ {
+ uint32 displayId = it->getUInt(0);
+ uint32 path_length = strlen(name);
+ fwrite(&displayId, sizeof(uint32), 1, model_list);
+ fwrite(&path_length, sizeof(uint32), 1, model_list);
+ fwrite(name, sizeof(char), path_length, model_list);
+ }
+ }
+
+ fclose(model_list);
+
+ printf("Done!\n");
+}
diff --git a/src/tools/vmap3_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp
index 81e27621956..ac28e1ff086 100644
--- a/src/tools/vmap3_extractor/model.cpp
+++ b/src/tools/vmap4_extractor/model.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "vmapexport.h"
#include "model.h"
#include "wmo.h"
@@ -6,7 +24,7 @@
#include <algorithm>
#include <cstdio>
-Model::Model(std::string &filename) : filename(filename)
+Model::Model(std::string &filename) : filename(filename), vertices(0), indices(0)
{
}
@@ -19,10 +37,13 @@ bool Model::open()
if (!ok)
{
f.close();
- printf("Error loading model %s\n", filename.c_str());
+ // Do not show this error on console to avoid confusion, the extractor can continue working even if some models fail to load
+ //printf("Error loading model %s\n", filename.c_str());
return false;
}
+ _unload();
+
memcpy(&header, f.getBuffer(), sizeof(ModelHeader));
if(header.nBoundingTriangles > 0)
{
@@ -49,7 +70,7 @@ bool Model::open()
return true;
}
-bool Model::ConvertToVMAPModel(char * outfilename)
+bool Model::ConvertToVMAPModel(const char * outfilename)
{
int N[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
FILE * output=fopen(outfilename,"wb");
@@ -58,7 +79,7 @@ bool Model::ConvertToVMAPModel(char * outfilename)
printf("Can't create the output file '%s'\n",outfilename);
return false;
}
- fwrite("VMAP003",8,1,output);
+ fwrite(szRawVMAPMagic,8,1,output);
uint32 nVertices = 0;
nVertices = header.nBoundingVertices;
fwrite(&nVertices, sizeof(int), 1, output);
@@ -92,24 +113,16 @@ bool Model::ConvertToVMAPModel(char * outfilename)
{
for(uint32 vpos=0; vpos <nVertices; ++vpos)
{
- float sy = vertices[vpos].y;
- vertices[vpos].y = vertices[vpos].z;
- vertices[vpos].z = sy;
+ std::swap(vertices[vpos].y, vertices[vpos].z);
}
fwrite(vertices, sizeof(float)*3, nVertices, output);
}
- delete[] vertices;
- delete[] indices;
-
fclose(output);
return true;
}
-Model::~Model()
-{
-}
Vec3D fixCoordSystem(Vec3D v)
{
@@ -154,7 +167,7 @@ ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID,
uint16 adtId = 0;// not used for models
uint32 flags = MOD_M2;
- if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN;
+ if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN;
//write mapID, tileX, tileY, Flags, ID, Pos, Rot, Scale, name
fwrite(&mapID, sizeof(uint32), 1, pDirfile);
fwrite(&tileX, sizeof(uint32), 1, pDirfile);
diff --git a/src/tools/vmap4_extractor/model.h b/src/tools/vmap4_extractor/model.h
new file mode 100644
index 00000000000..9000d7e4822
--- /dev/null
+++ b/src/tools/vmap4_extractor/model.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include "vec3d.h"
+//#include "mpq.h"
+#include "modelheaders.h"
+#include <vector>
+
+class Model;
+class WMOInstance;
+class MPQFile;
+
+Vec3D fixCoordSystem(Vec3D v);
+
+class Model
+{
+public:
+ ModelHeader header;
+ uint32 offsBB_vertices, offsBB_indices;
+ Vec3D *BB_vertices, *vertices;
+ uint16 *BB_indices, *indices;
+ size_t nIndices;
+
+ bool open();
+ bool ConvertToVMAPModel(const char * outfilename);
+
+ bool ok;
+
+ Model(std::string &filename);
+ ~Model() {_unload();}
+
+private:
+ void _unload()
+ {
+ delete[] vertices;
+ delete[] indices;
+ vertices = NULL;
+ indices = NULL;
+ }
+ std::string filename;
+ char outfilename;
+};
+
+class ModelInstance
+{
+public:
+ Model *model;
+
+ uint32 id;
+ Vec3D pos, rot;
+ unsigned int d1, scale;
+ float w,sc;
+
+ ModelInstance() {}
+ ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile);
+
+};
+
+#endif
diff --git a/src/tools/vmap3_extractor/modelheaders.h b/src/tools/vmap4_extractor/modelheaders.h
index 776a981ebd8..d859fd3511e 100644
--- a/src/tools/vmap3_extractor/modelheaders.h
+++ b/src/tools/vmap4_extractor/modelheaders.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef MODELHEADERS_H
#define MODELHEADERS_H
diff --git a/src/tools/vmap3_extractor/mpq_libmpq.cpp b/src/tools/vmap4_extractor/mpq_libmpq.cpp
index 528b9679a58..528b9679a58 100644
--- a/src/tools/vmap3_extractor/mpq_libmpq.cpp
+++ b/src/tools/vmap4_extractor/mpq_libmpq.cpp
diff --git a/src/tools/vmap3_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h
index e0c42ba0bfd..56a6b787dcd 100644
--- a/src/tools/vmap3_extractor/mpq_libmpq04.h
+++ b/src/tools/vmap4_extractor/mpq_libmpq04.h
@@ -1,3 +1,6 @@
+#define _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_WARNINGS
+
#ifndef MPQ_H
#define MPQ_H
@@ -20,14 +23,14 @@ public:
void close();
void GetFileListTo(vector<string>& filelist) {
- uint32 filenum;
- if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
- libmpq__off_t size, transferred;
- libmpq__file_unpacked_size(mpq_a, filenum, &size);
+ uint32 filenum;
+ if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
+ libmpq__off_t size, transferred;
+ libmpq__file_unpacked_size(mpq_a, filenum, &size);
char *buffer = new char[size];
- libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
+ libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
char seps[] = "\n";
char *token;
diff --git a/src/tools/vmap3_extractor/vec3d.h b/src/tools/vmap4_extractor/vec3d.h
index 06a5b730f16..06a5b730f16 100644
--- a/src/tools/vmap3_extractor/vec3d.h
+++ b/src/tools/vmap4_extractor/vec3d.h
diff --git a/src/tools/vmap3_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index 689691e1d91..599290a9254 100644
--- a/src/tools/vmap3_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include <cstdio>
#include <iostream>
@@ -5,7 +23,7 @@
#include <list>
#include <errno.h>
-#ifdef _WIN32
+#ifdef WIN32
#include <Windows.h>
#include <sys/stat.h>
#include <direct.h>
@@ -29,6 +47,8 @@
#include "wmo.h"
#include "mpq_libmpq04.h"
+#include "vmapexport.h"
+
//------------------------------------------------------------------------------
// Defines
@@ -55,13 +75,19 @@ bool preciseVectorData = false;
// Constants
//static const char * szWorkDirMaps = ".\\Maps";
-const char * szWorkDirWmo = "./Buildings";
+const char* szWorkDirWmo = "./Buildings";
+const char* szRawVMAPMagic = "VMAP004";
// Local testing functions
-static void clreol()
+bool FileExists(const char* file)
{
- printf("\r \r");
+ if (FILE* n = fopen(file, "rb"))
+ {
+ fclose(n);
+ return true;
+ }
+ return false;
}
void strToLower(char* str)
@@ -73,15 +99,6 @@ void strToLower(char* str)
}
}
-static const char * GetPlainName(const char * szFileName)
-{
- const char * szTemp;
-
- if((szTemp = strrchr(szFileName, '\\')) != NULL)
- szFileName = szTemp + 1;
- return szFileName;
-}
-
// copied from contrib/extractor/System.cpp
void ReadLiquidTypeTableDBC()
{
@@ -104,10 +121,9 @@ void ReadLiquidTypeTableDBC()
printf("Done! (%u LiqTypes loaded)\n", (unsigned int)LiqType_count);
}
-int ExtractWmo()
+bool ExtractWmo()
{
- char szLocalFile[1024] = "";
- bool success=true;
+ bool success = true;
//const char* ParsArchiveNames[] = {"patch-2.MPQ", "patch.MPQ", "common.MPQ", "expansion.MPQ"};
@@ -116,99 +132,98 @@ int ExtractWmo()
vector<string> filelist;
(*ar_itr)->GetFileListTo(filelist);
- for (vector<string>::iterator fname=filelist.begin(); fname != filelist.end() && success; ++fname)
+ for (vector<string>::iterator fname = filelist.begin(); fname != filelist.end() && success; ++fname)
{
- bool file_ok=true;
if (fname->find(".wmo") != string::npos)
- {
- // Copy files from archive
- //std::cout << "found *.wmo file " << *fname << std::endl;
- sprintf(szLocalFile, "%s/%s", szWorkDirWmo, GetPlainName(fname->c_str()));
- fixnamen(szLocalFile,strlen(szLocalFile));
- FILE * n;
- if ((n = fopen(szLocalFile, "rb"))== NULL)
- {
- int p = 0;
- //Select root wmo files
- const char * rchr = strrchr(GetPlainName(fname->c_str()),0x5f);
- if(rchr != NULL)
- {
- char cpy[4];
- strncpy((char*)cpy,rchr,4);
- for (int i=0;i<4; ++i)
- {
- int m = cpy[i];
- if(isdigit(m))
- p++;
- }
- }
- if(p != 3)
- {
- std::cout << "Extracting " << *fname << std::endl;
- WMORoot * froot = new WMORoot(*fname);
- if(!froot->open())
- {
- printf("Couldn't open RootWmo!!!\n");
- delete froot;
- continue;
- }
- FILE *output=fopen(szLocalFile,"wb");
- if(!output)
- {
- printf("couldn't open %s for writing!\n", szLocalFile);
- success=false;
- }
- froot->ConvertToVMAPRootWmo(output);
- int Wmo_nVertices = 0;
- //printf("root has %d groups\n", froot->nGroups);
- if(froot->nGroups !=0)
- {
- for (uint32 i=0; i<froot->nGroups; ++i)
- {
- char temp[1024];
- strcpy(temp, fname->c_str());
- temp[fname->length()-4] = 0;
- char groupFileName[1024];
- sprintf(groupFileName,"%s_%03d.wmo",temp, i);
- //printf("Trying to open groupfile %s\n",groupFileName);
- string s = groupFileName;
- WMOGroup * fgroup = new WMOGroup(s);
- if(!fgroup->open())
- {
- printf("Could not open all Group file for: %s\n",GetPlainName(fname->c_str()));
- file_ok=false;
- break;
- }
-
- Wmo_nVertices += fgroup->ConvertToVMAPGroupWmo(output, froot, preciseVectorData);
- delete fgroup;
- }
- }
- fseek(output, 8, SEEK_SET); // store the correct no of vertices
- fwrite(&Wmo_nVertices,sizeof(int),1,output);
- fclose(output);
- delete froot;
- }
- }
- else
- {
- fclose(n);
- }
- }
- // Delete the extracted file in the case of an error
- if(!file_ok)
- remove(szLocalFile);
+ success = ExtractSingleWmo(*fname);
}
}
- if(success)
+ if (success)
printf("\nExtract wmo complete (No (fatal) errors)\n");
return success;
}
-void ExtractMapsFromMpq()
+bool ExtractSingleWmo(std::string& fname)
{
+ // Copy files from archive
+
+ char szLocalFile[1024];
+ const char * plain_name = GetPlainName(fname.c_str());
+ sprintf(szLocalFile, "%s/%s", szWorkDirWmo, plain_name);
+ fixnamen(szLocalFile,strlen(szLocalFile));
+
+ if (FileExists(szLocalFile))
+ return true;
+
+ int p = 0;
+ //Select root wmo files
+ const char * rchr = strrchr(plain_name, '_');
+ if(rchr != NULL)
+ {
+ char cpy[4];
+ strncpy((char*)cpy,rchr,4);
+ for (int i=0;i < 4; ++i)
+ {
+ int m = cpy[i];
+ if(isdigit(m))
+ p++;
+ }
+ }
+
+ if (p == 3)
+ return true;
+
+ bool file_ok = true;
+ std::cout << "Extracting " << fname << std::endl;
+ WMORoot froot(fname);
+ if(!froot.open())
+ {
+ printf("Couldn't open RootWmo!!!\n");
+ return true;
+ }
+ FILE *output = fopen(szLocalFile,"wb");
+ if(!output)
+ {
+ printf("couldn't open %s for writing!\n", szLocalFile);
+ return false;
+ }
+ froot.ConvertToVMAPRootWmo(output);
+ int Wmo_nVertices = 0;
+ //printf("root has %d groups\n", froot->nGroups);
+ if (froot.nGroups !=0)
+ {
+ for (uint32 i = 0; i < froot.nGroups; ++i)
+ {
+ char temp[1024];
+ strcpy(temp, fname.c_str());
+ temp[fname.length()-4] = 0;
+ char groupFileName[1024];
+ sprintf(groupFileName,"%s_%03d.wmo",temp, i);
+ //printf("Trying to open groupfile %s\n",groupFileName);
+
+ string s = groupFileName;
+ WMOGroup fgroup(s);
+ if(!fgroup.open())
+ {
+ printf("Could not open all Group file for: %s\n", plain_name);
+ file_ok = false;
+ break;
+ }
+
+ Wmo_nVertices += fgroup.ConvertToVMAPGroupWmo(output, &froot, preciseVectorData);
+ }
+ }
+
+ fseek(output, 8, SEEK_SET); // store the correct no of vertices
+ fwrite(&Wmo_nVertices,sizeof(int),1,output);
+ fclose(output);
+
+ // Delete the extracted file in the case of an error
+ if (!file_ok)
+ remove(szLocalFile);
+ return true;
}
void ParsMapFiles()
@@ -251,8 +266,9 @@ void getGamePath()
LONG l;
s = sizeof(input_path);
memset(input_path,0,s);
- l = RegOpenKeyExA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Blizzard Entertainment\\World of Warcraft",0,KEY_QUERY_VALUE,&key);
- l = RegQueryValueExA(key,"InstallPath",0,&t,(LPBYTE)input_path,&s);
+ l = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Blizzard Entertainment\\World of Warcraft",0,KEY_QUERY_VALUE,&key);
+ //l = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Blizzard Entertainment\\Burning Crusade Closed Beta",0,KEY_QUERY_VALUE,&key);
+ l = RegQueryValueEx(key,"InstallPath",0,&t,(LPBYTE)input_path,&s);
RegCloseKey(key);
if (strlen(input_path) > 0)
{
@@ -379,16 +395,17 @@ bool processArgv(int argc, char ** argv, const char *versionString)
{
bool result = true;
hasInputPathParam = false;
+ bool preciseVectorData = false;
- for (int i=1; i < argc; ++i)
+ for(int i=1; i< argc; ++i)
{
- if (strcmp("-s", argv[i]) == 0)
+ if(strcmp("-s",argv[i]) == 0)
{
preciseVectorData = false;
}
- else if (strcmp("-d", argv[i]) == 0)
+ else if(strcmp("-d",argv[i]) == 0)
{
- if ((i + 1) < argc)
+ if((i+1)<argc)
{
hasInputPathParam = true;
strcpy(input_path, argv[i+1]);
@@ -401,11 +418,11 @@ bool processArgv(int argc, char ** argv, const char *versionString)
result = false;
}
}
- else if (strcmp("-?", argv[1]) == 0)
+ else if(strcmp("-?",argv[1]) == 0)
{
result = false;
}
- else if (strcmp("-l", argv[i]) == 0)
+ else if(strcmp("-l",argv[i]) == 0)
{
preciseVectorData = true;
}
@@ -427,6 +444,7 @@ bool processArgv(int argc, char ** argv, const char *versionString)
return result;
}
+
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Main
//
@@ -439,7 +457,7 @@ bool processArgv(int argc, char ** argv, const char *versionString)
int main(int argc, char ** argv)
{
bool success=true;
- const char *versionString = "V3.00 2010_07";
+ const char *versionString = "V4.00 2012_02";
// Use command line arguments, when some
if(!processArgv(argc, argv, versionString))
@@ -465,7 +483,7 @@ int main(int argc, char ** argv)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Create the working directory
if(mkdir(szWorkDirWmo
-#ifdef _XOPEN_UNIX
+#ifdef __linux__
, 0711
#endif
))
@@ -517,9 +535,11 @@ int main(int argc, char ** argv)
ParsMapFiles();
delete [] map_ids;
//nError = ERROR_SUCCESS;
+ // Extract models, listed in DameObjectDisplayInfo.dbc
+ ExtractGameobjectModels();
}
- clreol();
+ printf("\n");
if(!success)
{
printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData);
diff --git a/src/tools/vmap4_extractor/vmapexport.h b/src/tools/vmap4_extractor/vmapexport.h
new file mode 100644
index 00000000000..b407e7a106e
--- /dev/null
+++ b/src/tools/vmap4_extractor/vmapexport.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef VMAPEXPORT_H
+#define VMAPEXPORT_H
+
+#include <string>
+
+enum ModelFlags
+{
+ MOD_M2 = 1,
+ MOD_WORLDSPAWN = 1<<1,
+ MOD_HAS_BOUND = 1<<2
+};
+
+extern const char * szWorkDirWmo;
+extern const char * szRawVMAPMagic; // vmap magic string for extracted raw vmap data
+
+bool FileExists(const char * file);
+void strToLower(char* str);
+
+bool ExtractSingleWmo(std::string& fname);
+bool ExtractSingleModel(std::string& fname);
+
+void ExtractGameobjectModels();
+
+#endif
diff --git a/src/tools/vmap3_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp
index cd24ef0346c..e3ee545db19 100644
--- a/src/tools/vmap3_extractor/wdtfile.cpp
+++ b/src/tools/vmap4_extractor/wdtfile.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "vmapexport.h"
#include "wdtfile.h"
#include "adtfile.h"
diff --git a/src/tools/vmap3_extractor/wdtfile.h b/src/tools/vmap4_extractor/wdtfile.h
index f3d71c41791..f3d71c41791 100644
--- a/src/tools/vmap3_extractor/wdtfile.h
+++ b/src/tools/vmap4_extractor/wdtfile.h
diff --git a/src/tools/vmap3_extractor/wmo.cpp b/src/tools/vmap4_extractor/wmo.cpp
index 216a2248953..58957e007c1 100644
--- a/src/tools/vmap3_extractor/wmo.cpp
+++ b/src/tools/vmap4_extractor/wmo.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "vmapexport.h"
#include "wmo.h"
#include "vec3d.h"
@@ -106,7 +124,7 @@ bool WMORoot::ConvertToVMAPRootWmo(FILE *pOutfile)
{
//printf("Convert RootWmo...\n");
- fwrite("VMAP003",1,8,pOutfile);
+ fwrite(szRawVMAPMagic,1,8,pOutfile);
unsigned int nVectors = 0;
fwrite(&nVectors,sizeof(nVectors),1,pOutfile); // will be filled later
fwrite(&nGroups,4,1,pOutfile);
diff --git a/src/tools/vmap3_extractor/wmo.h b/src/tools/vmap4_extractor/wmo.h
index 1632b6c5893..8c5993d91d5 100644
--- a/src/tools/vmap3_extractor/wmo.h
+++ b/src/tools/vmap4_extractor/wmo.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef WMO_H
#define WMO_H
#define TILESIZE (533.33333f)