aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/characters_database.sql39
-rw-r--r--sql/old/3.3.5a/2012_05_19_03_world_version.sql (renamed from sql/updates/world/2012_05_19_03_world_version.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_19_04_world_creature_loot_template.sql (renamed from sql/updates/world/2012_05_19_04_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_19_05_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_05_19_05_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_19_06_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_05_19_06_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_20_00_world_misc.sql (renamed from sql/updates/world/2012_05_20_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_22_00_world_spell_proc_event.sql (renamed from sql/updates/world/2012_05_22_00_world_spell_proc_event.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_22_01_world_creature_loot_template.sql (renamed from sql/updates/world/2012_05_22_01_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_23_00_world_creature.sql (renamed from sql/updates/world/2012_05_23_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_23_01_world_sai.sql (renamed from sql/updates/world/2012_05_23_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_23_02_world_sai.sql (renamed from sql/updates/world/2012_05_23_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_23_04_world_gameobject.sql (renamed from sql/updates/world/2012_05_23_04_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_23_05_world_creature.sql (renamed from sql/updates/world/2012_05_23_05_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_24_00_world_creature_misc.sql (renamed from sql/updates/world/2012_05_24_00_world_creature_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_24_01_world_gameobject.sql (renamed from sql/updates/world/2012_05_24_01_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_25_00_world_sai.sql (renamed from sql/updates/world/2012_05_25_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_25_01_world_waypoints.sql (renamed from sql/updates/world/2012_05_25_01_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_25_02_world_creature_template.sql (renamed from sql/updates/world/2012_05_25_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_25_03_world_template.sql (renamed from sql/updates/world/2012_05_25_03_world_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_00_world_scripts.sql (renamed from sql/updates/world/2012_05_26_00_world_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql (renamed from sql/updates/world/2012_05_26_01_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_02_world_creature_template.sql (renamed from sql/updates/world/2012_05_26_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_03_world_page_text.sql (renamed from sql/updates/world/2012_05_26_03_world_page_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_04_world_creature_template.sql (renamed from sql/updates/world/2012_05_26_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_05_world_creature_template.sql (renamed from sql/updates/world/2012_05_26_05_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql (renamed from sql/updates/world/2012_05_26_06_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_00_world_gameobject_template.sql (renamed from sql/updates/world/2012_05_27_00_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_01_world_waypoints.sql (renamed from sql/updates/world/2012_05_27_01_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_02_world_creature.sql (renamed from sql/updates/world/2012_05_27_02_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_03_world_creature.sql (renamed from sql/updates/world/2012_05_27_03_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql (renamed from sql/updates/world/2012_05_27_04_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_05_world_gameobject.sql (renamed from sql/updates/world/2012_05_27_05_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_06_world_creature.sql (renamed from sql/updates/world/2012_05_27_06_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_07_world_game_event.sql (renamed from sql/updates/world/2012_05_27_07_world_game_event.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_27_07_world_waypoints.sql (renamed from sql/updates/world/2012_05_27_07_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_00_world_creature_ai_scripts.sql (renamed from sql/updates/world/2012_05_28_00_world_creature_ai_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_01_world_creature.sql (renamed from sql/updates/world/2012_05_28_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_02_world_creature.sql (renamed from sql/updates/world/2012_05_28_02_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_03_world_waypoint_data.sql (renamed from sql/updates/world/2012_05_28_03_world_waypoint_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_04_world_creature_template.sql (renamed from sql/updates/world/2012_05_28_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_05_world_creature.sql (renamed from sql/updates/world/2012_05_28_05_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_06_world_creature_addon.sql (renamed from sql/updates/world/2012_05_28_06_world_creature_addon.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_06_world_waypoint_data.sql (renamed from sql/updates/world/2012_05_28_06_world_waypoint_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_28_07_world_quest_template.sql (renamed from sql/updates/world/2012_05_28_07_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql (renamed from sql/updates/world/2012_05_30_00_world_reference_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_30_01_world_creature_template.sql (renamed from sql/updates/world/2012_05_30_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_30_02_world_quest_template.sql (renamed from sql/updates/world/2012_05_30_02_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_30_03_world_creature_formation.sql (renamed from sql/updates/world/2012_05_30_03_world_creature_formation.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_30_04_world_gossip.sql (renamed from sql/updates/world/2012_05_30_04_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_30_05_world_gossip.sql (renamed from sql/updates/world/2012_05_30_05_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_00_world_reference_loot_template.sql (renamed from sql/updates/world/2012_05_31_00_world_reference_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_01_world_item_template.sql (renamed from sql/updates/world/2012_05_31_01_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_01_world_sai.sql (renamed from sql/updates/world/2012_05_31_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_02_world_creature_model_info.sql (renamed from sql/updates/world/2012_05_31_02_world_creature_model_info.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_03_world_gameobject_loot_template.sql (renamed from sql/updates/world/2012_05_31_03_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_05_world_sai.sql (renamed from sql/updates/world/2012_05_31_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql (renamed from sql/updates/world/2012_05_31_06_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_07_world_gossip.sql (renamed from sql/updates/world/2012_05_31_07_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_08_world_gameobject_template.sql (renamed from sql/updates/world/2012_05_31_08_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_09_world_sai.sql (renamed from sql/updates/world/2012_05_31_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_10_world_creature_template.sql (renamed from sql/updates/world/2012_05_31_10_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_11_world_creature.sql (renamed from sql/updates/world/2012_05_31_11_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_05_31_12_world_creature.sql (renamed from sql/updates/world/2012_05_31_12_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_01_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_01_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_01_01_world_creature_script.sql (renamed from sql/updates/world/2012_06_01_01_world_creature_script.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_01_02_world_misc.sql (renamed from sql/updates/world/2012_06_01_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_01_03_world_creature_template.sql (renamed from sql/updates/world/2012_06_01_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_01_04_world_misc.sql (renamed from sql/updates/world/2012_06_01_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_00_world_sai.sql (renamed from sql/updates/world/2012_06_02_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_01_world_waypoints.sql (renamed from sql/updates/world/2012_06_02_01_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_02_world_creature_text.sql (renamed from sql/updates/world/2012_06_02_02_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql (renamed from sql/updates/world/2012_06_02_03_world_creature_loot_template_hp.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql (renamed from sql/updates/world/2012_06_02_03_world_creature_loot_template_zm.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql (renamed from sql/updates/world/2012_06_02_03_world_reference_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql (renamed from sql/updates/world/2012_06_02_04_world_reference_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_05_world_reference_loot_template.sql (renamed from sql/updates/world/2012_06_02_05_world_reference_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql (renamed from sql/updates/world/2012_06_02_06_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_07_world_Misc.sql (renamed from sql/updates/world/2012_06_02_07_world_Misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql (renamed from sql/updates/world/2012_06_02_08_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_02_09_world_creature_transport.sql (renamed from sql/updates/world/2012_06_02_09_world_creature_transport.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_00_world_sai.sql (renamed from sql/updates/world/2012_06_03_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_01_world_creature.sql (renamed from sql/updates/world/2012_06_03_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_02_world_misc.sql (renamed from sql/updates/world/2012_06_03_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql (renamed from sql/updates/world/2012_06_03_03_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_04_world_misc.sql (renamed from sql/updates/world/2012_06_03_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_05_world_creature.sql (renamed from sql/updates/world/2012_06_03_05_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_03_06_world_sai.sql (renamed from sql/updates/world/2012_06_03_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_00_world_sai.sql (renamed from sql/updates/world/2012_06_04_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_01_world_gossip.sql (renamed from sql/updates/world/2012_06_04_01_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_02_world_gossip.sql (renamed from sql/updates/world/2012_06_04_02_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_03_world_conditions.sql (renamed from sql/updates/world/2012_06_04_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_04_world_sai.sql (renamed from sql/updates/world/2012_06_04_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_05_world_sai.sql (renamed from sql/updates/world/2012_06_04_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_06_world_sai.sql (renamed from sql/updates/world/2012_06_04_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_04_07_world_misc.sql (renamed from sql/updates/world/2012_06_04_07_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_05_00_world_sai.sql (renamed from sql/updates/world/2012_06_05_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_05_01_world_gossip.sql (renamed from sql/updates/world/2012_06_05_01_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql (renamed from sql/updates/world/2012_06_05_01_world_gossip_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_05_03_world_script.sql (renamed from sql/updates/world/2012_06_05_03_world_script.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_06_00_world_script.sql (renamed from sql/updates/world/2012_06_06_00_world_script.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_06_01_world_sai.sql (renamed from sql/updates/world/2012_06_06_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_06_02_world_sai.sql (renamed from sql/updates/world/2012_06_06_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_06_03_world_conditions.sql (renamed from sql/updates/world/2012_06_06_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_06_04_world_sai.sql (renamed from sql/updates/world/2012_06_06_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_00_characters_respawn.sql (renamed from sql/updates/characters/2012_06_07_00_characters_respawn.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_00_world_gossip.sql (renamed from sql/updates/world/2012_06_07_00_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_01_world_gossip.sql (renamed from sql/updates/world/2012_06_07_01_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_02_world_item_template.sql (renamed from sql/updates/world/2012_06_07_02_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_03_world_item_template.sql (renamed from sql/updates/world/2012_06_07_03_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_04_world_spell_dbc.sql (renamed from sql/updates/world/2012_06_07_04_world_spell_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_07_05_world_misc.sql (renamed from sql/updates/world/2012_06_07_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_08_00_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_06_08_00_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_09_00_world_creature.sql (renamed from sql/updates/world/2012_06_09_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_12_00_world_transport.sql (renamed from sql/updates/world/2012_06_12_00_world_transport.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_13_00_world_creature.sql (renamed from sql/updates/world/2012_06_13_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_13_01_world_creature.sql (renamed from sql/updates/world/2012_06_13_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_13_02_world_gossip.sql (renamed from sql/updates/world/2012_06_13_02_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_13_03_world_sai.sql (renamed from sql/updates/world/2012_06_13_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_00_world_spell_linked_spell.sql (renamed from sql/updates/world/2012_06_14_00_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_01_world_spell_linked_spell.sql (renamed from sql/updates/world/2012_06_14_01_world_spell_linked_spell.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_06_14_02_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_06_14_03_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_03_world_spell_ranks.sql (renamed from sql/updates/world/2012_06_14_03_world_spell_ranks.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_04_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_14_04_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_05_world_spelldifficulty_dbc.sql (renamed from sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_06_world_conditions.sql (renamed from sql/updates/world/2012_06_14_06_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_07_world_spell_bonus_data.sql (renamed from sql/updates/world/2012_06_14_07_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_08_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_14_08_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_09_world_sai.sql (renamed from sql/updates/world/2012_06_14_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_10_world_eai.sql (renamed from sql/updates/world/2012_06_14_10_world_eai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_14_11_world_sai.sql (renamed from sql/updates/world/2012_06_14_11_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_15_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_15_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_15_01_world_sai.sql (renamed from sql/updates/world/2012_06_15_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_15_02_world_sai.sql (renamed from sql/updates/world/2012_06_15_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_16_00_world_sai.sql (renamed from sql/updates/world/2012_06_16_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_16_01_world_creature.sql (renamed from sql/updates/world/2012_06_16_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_17_00_world_creature.sql (renamed from sql/updates/world/2012_06_17_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_17_01_world_creature.sql (renamed from sql/updates/world/2012_06_17_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_17_02_world_creature.sql (renamed from sql/updates/world/2012_06_17_02_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_18_00_world_creature.sql (renamed from sql/updates/world/2012_06_18_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_18_01_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_18_01_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_18_02_world_sai.sql (renamed from sql/updates/world/2012_06_18_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_18_03_world_sai.sql (renamed from sql/updates/world/2012_06_18_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_19_00_world_sai.sql (renamed from sql/updates/world/2012_06_19_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_19_01_world_gossip.sql (renamed from sql/updates/world/2012_06_19_01_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_19_02_world_misc.sql (renamed from sql/updates/world/2012_06_19_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_20_00_world_gossip.sql (renamed from sql/updates/world/2012_06_20_00_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_20_01_world_sai.sql (renamed from sql/updates/world/2012_06_20_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_20_02_world_gossip.sql (renamed from sql/updates/world/2012_06_20_02_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_24_00_world_gossip.sql (renamed from sql/updates/world/2012_06_24_00_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_24_01_world_quest.sql (renamed from sql/updates/world/2012_06_24_01_world_quest.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_24_02_world_gameobject.sql (renamed from sql/updates/world/2012_06_24_02_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_24_03_world_gameobject.sql (renamed from sql/updates/world/2012_06_24_03_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_24_04_world_gameobject.sql (renamed from sql/updates/world/2012_06_24_04_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_25_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_25_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_25_01_world_gameobject.sql (renamed from sql/updates/world/2012_06_25_01_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_25_02_world_gameobject.sql (renamed from sql/updates/world/2012_06_25_02_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_26_00_world_sai.sql (renamed from sql/updates/world/2012_06_26_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_26_01_world_creature.sql (renamed from sql/updates/world/2012_06_26_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_26_02_world_creature_loot_template.sql (renamed from sql/updates/world/2012_06_26_02_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_27_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_06_27_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_06_27_01_world_game_graveyard_zone.sql (renamed from sql/updates/world/2012_06_27_01_world_game_graveyard_zone.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_01_00_world_creature_text.sql (renamed from sql/updates/world/2012_07_01_00_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_01_01_achievement_criteria_data.sql (renamed from sql/updates/world/2012_05_09_02_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql (renamed from sql/updates/world/2012_07_02_00_world_creature_onkill_reputation.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_02_01_world_sai.sql (renamed from sql/updates/world/2012_07_02_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_02_02_world_sai.sql (renamed from sql/updates/world/2012_07_02_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_02_03_world_gossip.sql (renamed from sql/updates/world/2012_07_02_03_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_02_04_world_spell_script_names.sql (renamed from sql/updates/world/2012_07_02_04_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_04_00_world_spell_script_names.sql (renamed from sql/updates/world/2012_07_04_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/2012_07_05_00_world_item_template.sql1
-rw-r--r--sql/old/3.3.5a/2012_07_06_00_world_spell_script_names.sql1
-rw-r--r--sql/old/3.3.5a/2012_07_09_00_world_spell_script_names.sql3
-rw-r--r--sql/updates/characters/2012_06_13_00_characters_character_equipmentsets.sql22
-rw-r--r--sql/updates/world/2012_05_19_04_creature_loot_template.sql1
-rw-r--r--sql/updates/world/2012_05_19_05_gameobject_loot_template.sql93
-rw-r--r--sql/updates/world/2012_05_19_06_gameobject_loot_template.sql13
-rw-r--r--sql/updates/world/2012_05_28_03_waypoint_data.sql3
-rw-r--r--sql/updates/world/2012_07_12_00_world_version.sql1
-rw-r--r--sql/updates/world/2012_07_13_00_world_spell_proc_event.sql1
-rw-r--r--sql/updates/world/2012_07_13_00_world_spell_script_names.sql3
-rw-r--r--sql/updates/world/2012_07_14_00_world_creature_loot_template.sql6
-rw-r--r--sql/updates/world/2012_07_14_00_world_item_template_434.sql4
-rw-r--r--sql/updates/world/2012_07_14_01_world_creature_loot_template.sql33
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp10
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.h1
-rwxr-xr-xsrc/server/game/Chat/Chat.cpp40
-rwxr-xr-xsrc/server/game/Chat/Chat.h24
-rwxr-xr-xsrc/server/game/Chat/Commands/Level1.cpp134
-rwxr-xr-xsrc/server/game/Chat/Commands/Level2.cpp260
-rwxr-xr-xsrc/server/game/Chat/Commands/Level3.cpp1054
-rwxr-xr-xsrc/server/game/Entities/Item/ItemPrototype.h5
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp59
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h3
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp8
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp177
-rwxr-xr-xsrc/server/game/Groups/Group.cpp124
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp12
-rwxr-xr-xsrc/server/game/Handlers/ItemHandler.cpp4
-rwxr-xr-xsrc/server/game/Handlers/LootHandler.cpp6
-rwxr-xr-xsrc/server/game/Loot/LootMgr.cpp71
-rwxr-xr-xsrc/server/game/Loot/LootMgr.h3
-rwxr-xr-xsrc/server/game/Scripting/ScriptLoader.cpp4
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp5
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp8
-rw-r--r--src/server/scripts/Commands/CMakeLists.txt4
-rw-r--r--src/server/scripts/Commands/cs_guild.cpp199
-rw-r--r--src/server/scripts/Commands/cs_list.cpp6
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp1263
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp6
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp9
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp48
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp4
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp32
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp23
-rwxr-xr-xsrc/server/shared/Cryptography/ARC4.cpp4
-rwxr-xr-xsrc/server/shared/Database/Implementation/CharacterDatabase.cpp6
219 files changed, 2003 insertions, 1837 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 93c5ee59cf1..a45af500f88 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -547,25 +547,26 @@ CREATE TABLE `character_equipmentsets` (
`setindex` tinyint(3) unsigned NOT NULL DEFAULT '0',
`name` varchar(31) NOT NULL,
`iconname` varchar(100) NOT NULL,
- `item0` int(10) unsigned NOT NULL DEFAULT '0',
- `item1` int(10) unsigned NOT NULL DEFAULT '0',
- `item2` int(10) unsigned NOT NULL DEFAULT '0',
- `item3` int(10) unsigned NOT NULL DEFAULT '0',
- `item4` int(10) unsigned NOT NULL DEFAULT '0',
- `item5` int(10) unsigned NOT NULL DEFAULT '0',
- `item6` int(10) unsigned NOT NULL DEFAULT '0',
- `item7` int(10) unsigned NOT NULL DEFAULT '0',
- `item8` int(10) unsigned NOT NULL DEFAULT '0',
- `item9` int(10) unsigned NOT NULL DEFAULT '0',
- `item10` int(10) unsigned NOT NULL DEFAULT '0',
- `item11` int(10) unsigned NOT NULL DEFAULT '0',
- `item12` int(10) unsigned NOT NULL DEFAULT '0',
- `item13` int(10) unsigned NOT NULL DEFAULT '0',
- `item14` int(10) unsigned NOT NULL DEFAULT '0',
- `item15` int(10) unsigned NOT NULL DEFAULT '0',
- `item16` int(10) unsigned NOT NULL DEFAULT '0',
- `item17` int(10) unsigned NOT NULL DEFAULT '0',
- `item18` int(10) unsigned NOT NULL DEFAULT '0',
+ `ignore_mask` int(11) unsigned NOT NULL DEFAULT '0',
+ `item0` int(11) unsigned NOT NULL DEFAULT '0',
+ `item1` int(11) unsigned NOT NULL DEFAULT '0',
+ `item2` int(11) unsigned NOT NULL DEFAULT '0',
+ `item3` int(11) unsigned NOT NULL DEFAULT '0',
+ `item4` int(11) unsigned NOT NULL DEFAULT '0',
+ `item5` int(11) unsigned NOT NULL DEFAULT '0',
+ `item6` int(11) unsigned NOT NULL DEFAULT '0',
+ `item7` int(11) unsigned NOT NULL DEFAULT '0',
+ `item8` int(11) unsigned NOT NULL DEFAULT '0',
+ `item9` int(11) unsigned NOT NULL DEFAULT '0',
+ `item10` int(11) unsigned NOT NULL DEFAULT '0',
+ `item11` int(11) unsigned NOT NULL DEFAULT '0',
+ `item12` int(11) unsigned NOT NULL DEFAULT '0',
+ `item13` int(11) unsigned NOT NULL DEFAULT '0',
+ `item14` int(11) unsigned NOT NULL DEFAULT '0',
+ `item15` int(11) unsigned NOT NULL DEFAULT '0',
+ `item16` int(11) unsigned NOT NULL DEFAULT '0',
+ `item17` int(11) unsigned NOT NULL DEFAULT '0',
+ `item18` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`setguid`),
UNIQUE KEY `idx_set` (`guid`,`setguid`,`setindex`),
KEY `Idx_setindex` (`setindex`)
diff --git a/sql/updates/world/2012_05_19_03_world_version.sql b/sql/old/3.3.5a/2012_05_19_03_world_version.sql
index 53c6821be69..53c6821be69 100644
--- a/sql/updates/world/2012_05_19_03_world_version.sql
+++ b/sql/old/3.3.5a/2012_05_19_03_world_version.sql
diff --git a/sql/updates/world/2012_05_19_04_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_05_19_04_world_creature_loot_template.sql
index ae996e01956..ae996e01956 100644
--- a/sql/updates/world/2012_05_19_04_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_19_04_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_05_19_05_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_19_05_world_gameobject_loot_template.sql
index f95cb45efe4..f95cb45efe4 100644
--- a/sql/updates/world/2012_05_19_05_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_19_05_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_05_19_06_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_19_06_world_gameobject_loot_template.sql
index 9b2dcbb9363..9b2dcbb9363 100644
--- a/sql/updates/world/2012_05_19_06_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_19_06_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_05_20_00_world_misc.sql b/sql/old/3.3.5a/2012_05_20_00_world_misc.sql
index 5b96f9881d6..5b96f9881d6 100644
--- a/sql/updates/world/2012_05_20_00_world_misc.sql
+++ b/sql/old/3.3.5a/2012_05_20_00_world_misc.sql
diff --git a/sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql
index 7603f7dd938..7603f7dd938 100644
--- a/sql/updates/world/2012_05_20_01_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_05_20_01_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql b/sql/old/3.3.5a/2012_05_22_00_world_spell_proc_event.sql
index ba2ea83f643..ba2ea83f643 100644
--- a/sql/updates/world/2012_05_22_00_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/2012_05_22_00_world_spell_proc_event.sql
diff --git a/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_05_22_01_world_creature_loot_template.sql
index bcae5be9ae1..bcae5be9ae1 100644
--- a/sql/updates/world/2012_05_22_01_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_22_01_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_05_23_00_world_creature.sql b/sql/old/3.3.5a/2012_05_23_00_world_creature.sql
index 8a965b7fdfe..8a965b7fdfe 100644
--- a/sql/updates/world/2012_05_23_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_23_00_world_creature.sql
diff --git a/sql/updates/world/2012_05_23_01_world_sai.sql b/sql/old/3.3.5a/2012_05_23_01_world_sai.sql
index af2fd5409d1..af2fd5409d1 100644
--- a/sql/updates/world/2012_05_23_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_23_01_world_sai.sql
diff --git a/sql/updates/world/2012_05_23_02_world_sai.sql b/sql/old/3.3.5a/2012_05_23_02_world_sai.sql
index 588f25f1568..588f25f1568 100644
--- a/sql/updates/world/2012_05_23_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_23_02_world_sai.sql
diff --git a/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql
index 22ecebcae31..22ecebcae31 100644
--- a/sql/updates/world/2012_05_23_03_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_23_03_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_05_23_04_world_gameobject.sql b/sql/old/3.3.5a/2012_05_23_04_world_gameobject.sql
index afcb1e89317..afcb1e89317 100644
--- a/sql/updates/world/2012_05_23_04_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_23_04_world_gameobject.sql
diff --git a/sql/updates/world/2012_05_23_05_world_creature.sql b/sql/old/3.3.5a/2012_05_23_05_world_creature.sql
index bb162f927bd..bb162f927bd 100644
--- a/sql/updates/world/2012_05_23_05_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_23_05_world_creature.sql
diff --git a/sql/updates/world/2012_05_24_00_world_creature_misc.sql b/sql/old/3.3.5a/2012_05_24_00_world_creature_misc.sql
index ae35b3fba5d..ae35b3fba5d 100644
--- a/sql/updates/world/2012_05_24_00_world_creature_misc.sql
+++ b/sql/old/3.3.5a/2012_05_24_00_world_creature_misc.sql
diff --git a/sql/updates/world/2012_05_24_01_world_gameobject.sql b/sql/old/3.3.5a/2012_05_24_01_world_gameobject.sql
index 32bbc15494f..32bbc15494f 100644
--- a/sql/updates/world/2012_05_24_01_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_24_01_world_gameobject.sql
diff --git a/sql/updates/world/2012_05_25_00_world_sai.sql b/sql/old/3.3.5a/2012_05_25_00_world_sai.sql
index fa5682db02f..fa5682db02f 100644
--- a/sql/updates/world/2012_05_25_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_25_00_world_sai.sql
diff --git a/sql/updates/world/2012_05_25_01_world_waypoints.sql b/sql/old/3.3.5a/2012_05_25_01_world_waypoints.sql
index 0d2c04bc6bc..0d2c04bc6bc 100644
--- a/sql/updates/world/2012_05_25_01_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_05_25_01_world_waypoints.sql
diff --git a/sql/updates/world/2012_05_25_02_world_creature_template.sql b/sql/old/3.3.5a/2012_05_25_02_world_creature_template.sql
index fd4c1743f07..fd4c1743f07 100644
--- a/sql/updates/world/2012_05_25_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_25_02_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_25_03_world_template.sql b/sql/old/3.3.5a/2012_05_25_03_world_template.sql
index 6ef112f342f..6ef112f342f 100644
--- a/sql/updates/world/2012_05_25_03_world_template.sql
+++ b/sql/old/3.3.5a/2012_05_25_03_world_template.sql
diff --git a/sql/updates/world/2012_05_26_00_world_scripts.sql b/sql/old/3.3.5a/2012_05_26_00_world_scripts.sql
index 18b0fa2f6b2..18b0fa2f6b2 100644
--- a/sql/updates/world/2012_05_26_00_world_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_26_00_world_scripts.sql
diff --git a/sql/updates/world/2012_05_26_01_world_spell_dbc.sql b/sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql
index 7efebc37489..7efebc37489 100644
--- a/sql/updates/world/2012_05_26_01_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2012_05_26_01_world_spell_dbc.sql
diff --git a/sql/updates/world/2012_05_26_02_world_creature_template.sql b/sql/old/3.3.5a/2012_05_26_02_world_creature_template.sql
index e51567390b7..e51567390b7 100644
--- a/sql/updates/world/2012_05_26_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_26_02_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_26_03_world_page_text.sql b/sql/old/3.3.5a/2012_05_26_03_world_page_text.sql
index 9dc285cd99d..9dc285cd99d 100644
--- a/sql/updates/world/2012_05_26_03_world_page_text.sql
+++ b/sql/old/3.3.5a/2012_05_26_03_world_page_text.sql
diff --git a/sql/updates/world/2012_05_26_04_world_creature_template.sql b/sql/old/3.3.5a/2012_05_26_04_world_creature_template.sql
index 911cd45ef8c..911cd45ef8c 100644
--- a/sql/updates/world/2012_05_26_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_26_04_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_26_05_world_creature_template.sql b/sql/old/3.3.5a/2012_05_26_05_world_creature_template.sql
index 59d69b3fbe1..59d69b3fbe1 100644
--- a/sql/updates/world/2012_05_26_05_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_26_05_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_26_06_world_smart_scripts.sql b/sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql
index 397a5ad517a..397a5ad517a 100644
--- a/sql/updates/world/2012_05_26_06_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_26_06_world_smart_scripts.sql
diff --git a/sql/updates/world/2012_05_27_00_world_gameobject_template.sql b/sql/old/3.3.5a/2012_05_27_00_world_gameobject_template.sql
index 5fa3c15a505..5fa3c15a505 100644
--- a/sql/updates/world/2012_05_27_00_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/2012_05_27_00_world_gameobject_template.sql
diff --git a/sql/updates/world/2012_05_27_01_world_waypoints.sql b/sql/old/3.3.5a/2012_05_27_01_world_waypoints.sql
index 3685b58a629..3685b58a629 100644
--- a/sql/updates/world/2012_05_27_01_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_05_27_01_world_waypoints.sql
diff --git a/sql/updates/world/2012_05_27_02_world_creature.sql b/sql/old/3.3.5a/2012_05_27_02_world_creature.sql
index 8ca3ee75c94..8ca3ee75c94 100644
--- a/sql/updates/world/2012_05_27_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_27_02_world_creature.sql
diff --git a/sql/updates/world/2012_05_27_03_world_creature.sql b/sql/old/3.3.5a/2012_05_27_03_world_creature.sql
index 097f40581a7..097f40581a7 100644
--- a/sql/updates/world/2012_05_27_03_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_27_03_world_creature.sql
diff --git a/sql/updates/world/2012_05_27_04_world_smart_scripts.sql b/sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql
index 1f7cfa3d19c..1f7cfa3d19c 100644
--- a/sql/updates/world/2012_05_27_04_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_27_04_world_smart_scripts.sql
diff --git a/sql/updates/world/2012_05_27_05_world_gameobject.sql b/sql/old/3.3.5a/2012_05_27_05_world_gameobject.sql
index 66fbfd0afca..66fbfd0afca 100644
--- a/sql/updates/world/2012_05_27_05_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_27_05_world_gameobject.sql
diff --git a/sql/updates/world/2012_05_27_06_world_creature.sql b/sql/old/3.3.5a/2012_05_27_06_world_creature.sql
index 1074465a0be..1074465a0be 100644
--- a/sql/updates/world/2012_05_27_06_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_27_06_world_creature.sql
diff --git a/sql/updates/world/2012_05_27_07_world_game_event.sql b/sql/old/3.3.5a/2012_05_27_07_world_game_event.sql
index eff4a9e7652..eff4a9e7652 100644
--- a/sql/updates/world/2012_05_27_07_world_game_event.sql
+++ b/sql/old/3.3.5a/2012_05_27_07_world_game_event.sql
diff --git a/sql/updates/world/2012_05_27_07_world_waypoints.sql b/sql/old/3.3.5a/2012_05_27_07_world_waypoints.sql
index bd6aa2d0fc1..bd6aa2d0fc1 100644
--- a/sql/updates/world/2012_05_27_07_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_05_27_07_world_waypoints.sql
diff --git a/sql/updates/world/2012_05_28_00_world_creature_ai_scripts.sql b/sql/old/3.3.5a/2012_05_28_00_world_creature_ai_scripts.sql
index aef4e4c6f67..aef4e4c6f67 100644
--- a/sql/updates/world/2012_05_28_00_world_creature_ai_scripts.sql
+++ b/sql/old/3.3.5a/2012_05_28_00_world_creature_ai_scripts.sql
diff --git a/sql/updates/world/2012_05_28_01_world_creature.sql b/sql/old/3.3.5a/2012_05_28_01_world_creature.sql
index d39aa7230b5..d39aa7230b5 100644
--- a/sql/updates/world/2012_05_28_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_28_01_world_creature.sql
diff --git a/sql/updates/world/2012_05_28_02_world_creature.sql b/sql/old/3.3.5a/2012_05_28_02_world_creature.sql
index 77da626d89e..77da626d89e 100644
--- a/sql/updates/world/2012_05_28_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_28_02_world_creature.sql
diff --git a/sql/updates/world/2012_05_28_03_world_waypoint_data.sql b/sql/old/3.3.5a/2012_05_28_03_world_waypoint_data.sql
index aa0e0ddd5ef..aa0e0ddd5ef 100644
--- a/sql/updates/world/2012_05_28_03_world_waypoint_data.sql
+++ b/sql/old/3.3.5a/2012_05_28_03_world_waypoint_data.sql
diff --git a/sql/updates/world/2012_05_28_04_world_creature_template.sql b/sql/old/3.3.5a/2012_05_28_04_world_creature_template.sql
index d8c9a15e412..d8c9a15e412 100644
--- a/sql/updates/world/2012_05_28_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_28_04_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_28_05_world_creature.sql b/sql/old/3.3.5a/2012_05_28_05_world_creature.sql
index c7d4af5b494..c7d4af5b494 100644
--- a/sql/updates/world/2012_05_28_05_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_28_05_world_creature.sql
diff --git a/sql/updates/world/2012_05_28_06_world_creature_addon.sql b/sql/old/3.3.5a/2012_05_28_06_world_creature_addon.sql
index a2b573da10a..a2b573da10a 100644
--- a/sql/updates/world/2012_05_28_06_world_creature_addon.sql
+++ b/sql/old/3.3.5a/2012_05_28_06_world_creature_addon.sql
diff --git a/sql/updates/world/2012_05_28_06_world_waypoint_data.sql b/sql/old/3.3.5a/2012_05_28_06_world_waypoint_data.sql
index 1c738cacdc9..1c738cacdc9 100644
--- a/sql/updates/world/2012_05_28_06_world_waypoint_data.sql
+++ b/sql/old/3.3.5a/2012_05_28_06_world_waypoint_data.sql
diff --git a/sql/updates/world/2012_05_28_07_world_quest_template.sql b/sql/old/3.3.5a/2012_05_28_07_world_quest_template.sql
index 3cdf1895a9d..3cdf1895a9d 100644
--- a/sql/updates/world/2012_05_28_07_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_05_28_07_world_quest_template.sql
diff --git a/sql/updates/world/2012_05_30_00_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql
index c2cab663d4a..c2cab663d4a 100644
--- a/sql/updates/world/2012_05_30_00_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_30_00_world_reference_loot_template.sql
diff --git a/sql/updates/world/2012_05_30_01_world_creature_template.sql b/sql/old/3.3.5a/2012_05_30_01_world_creature_template.sql
index 4b469a13891..4b469a13891 100644
--- a/sql/updates/world/2012_05_30_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_30_01_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_30_02_world_quest_template.sql b/sql/old/3.3.5a/2012_05_30_02_world_quest_template.sql
index 2b829aa0875..2b829aa0875 100644
--- a/sql/updates/world/2012_05_30_02_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_05_30_02_world_quest_template.sql
diff --git a/sql/updates/world/2012_05_30_03_world_creature_formation.sql b/sql/old/3.3.5a/2012_05_30_03_world_creature_formation.sql
index 2964415e85b..2964415e85b 100644
--- a/sql/updates/world/2012_05_30_03_world_creature_formation.sql
+++ b/sql/old/3.3.5a/2012_05_30_03_world_creature_formation.sql
diff --git a/sql/updates/world/2012_05_30_04_world_gossip.sql b/sql/old/3.3.5a/2012_05_30_04_world_gossip.sql
index 0abbea7b964..0abbea7b964 100644
--- a/sql/updates/world/2012_05_30_04_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_05_30_04_world_gossip.sql
diff --git a/sql/updates/world/2012_05_30_05_world_gossip.sql b/sql/old/3.3.5a/2012_05_30_05_world_gossip.sql
index 5e7f1375320..5e7f1375320 100644
--- a/sql/updates/world/2012_05_30_05_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_05_30_05_world_gossip.sql
diff --git a/sql/updates/world/2012_05_31_00_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_05_31_00_world_reference_loot_template.sql
index 03723c82536..03723c82536 100644
--- a/sql/updates/world/2012_05_31_00_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_31_00_world_reference_loot_template.sql
diff --git a/sql/updates/world/2012_05_31_01_world_item_template.sql b/sql/old/3.3.5a/2012_05_31_01_world_item_template.sql
index 144ee6715a9..144ee6715a9 100644
--- a/sql/updates/world/2012_05_31_01_world_item_template.sql
+++ b/sql/old/3.3.5a/2012_05_31_01_world_item_template.sql
diff --git a/sql/updates/world/2012_05_31_01_world_sai.sql b/sql/old/3.3.5a/2012_05_31_01_world_sai.sql
index 3055e98f167..3055e98f167 100644
--- a/sql/updates/world/2012_05_31_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_31_01_world_sai.sql
diff --git a/sql/updates/world/2012_05_31_02_world_creature_model_info.sql b/sql/old/3.3.5a/2012_05_31_02_world_creature_model_info.sql
index a1aa1155aa6..a1aa1155aa6 100644
--- a/sql/updates/world/2012_05_31_02_world_creature_model_info.sql
+++ b/sql/old/3.3.5a/2012_05_31_02_world_creature_model_info.sql
diff --git a/sql/updates/world/2012_05_31_03_world_gameobject_loot_template.sql b/sql/old/3.3.5a/2012_05_31_03_world_gameobject_loot_template.sql
index 5dcedaaf342..5dcedaaf342 100644
--- a/sql/updates/world/2012_05_31_03_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/2012_05_31_03_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2012_05_31_05_world_sai.sql b/sql/old/3.3.5a/2012_05_31_05_world_sai.sql
index aa95c93aae1..aa95c93aae1 100644
--- a/sql/updates/world/2012_05_31_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_31_05_world_sai.sql
diff --git a/sql/updates/world/2012_05_31_06_world_gameobject.sql b/sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql
index 1db1d6fbd76..1db1d6fbd76 100644
--- a/sql/updates/world/2012_05_31_06_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_05_31_06_world_gameobject.sql
diff --git a/sql/updates/world/2012_05_31_07_world_gossip.sql b/sql/old/3.3.5a/2012_05_31_07_world_gossip.sql
index 9b82f333a4c..9b82f333a4c 100644
--- a/sql/updates/world/2012_05_31_07_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_05_31_07_world_gossip.sql
diff --git a/sql/updates/world/2012_05_31_08_world_gameobject_template.sql b/sql/old/3.3.5a/2012_05_31_08_world_gameobject_template.sql
index 41527e22919..41527e22919 100644
--- a/sql/updates/world/2012_05_31_08_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/2012_05_31_08_world_gameobject_template.sql
diff --git a/sql/updates/world/2012_05_31_09_world_sai.sql b/sql/old/3.3.5a/2012_05_31_09_world_sai.sql
index a7eb1248905..a7eb1248905 100644
--- a/sql/updates/world/2012_05_31_09_world_sai.sql
+++ b/sql/old/3.3.5a/2012_05_31_09_world_sai.sql
diff --git a/sql/updates/world/2012_05_31_10_world_creature_template.sql b/sql/old/3.3.5a/2012_05_31_10_world_creature_template.sql
index 5499d26b0e3..5499d26b0e3 100644
--- a/sql/updates/world/2012_05_31_10_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_05_31_10_world_creature_template.sql
diff --git a/sql/updates/world/2012_05_31_11_world_creature.sql b/sql/old/3.3.5a/2012_05_31_11_world_creature.sql
index 177c6230964..177c6230964 100644
--- a/sql/updates/world/2012_05_31_11_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_31_11_world_creature.sql
diff --git a/sql/updates/world/2012_05_31_12_world_creature.sql b/sql/old/3.3.5a/2012_05_31_12_world_creature.sql
index cad0364d021..cad0364d021 100644
--- a/sql/updates/world/2012_05_31_12_world_creature.sql
+++ b/sql/old/3.3.5a/2012_05_31_12_world_creature.sql
diff --git a/sql/updates/world/2012_06_01_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_01_00_world_spell_script_names.sql
index cc024fe71cb..cc024fe71cb 100644
--- a/sql/updates/world/2012_06_01_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_01_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_01_01_world_creature_script.sql b/sql/old/3.3.5a/2012_06_01_01_world_creature_script.sql
index d90800bd1af..d90800bd1af 100644
--- a/sql/updates/world/2012_06_01_01_world_creature_script.sql
+++ b/sql/old/3.3.5a/2012_06_01_01_world_creature_script.sql
diff --git a/sql/updates/world/2012_06_01_02_world_misc.sql b/sql/old/3.3.5a/2012_06_01_02_world_misc.sql
index 23663ef9270..23663ef9270 100644
--- a/sql/updates/world/2012_06_01_02_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_01_02_world_misc.sql
diff --git a/sql/updates/world/2012_06_01_03_world_creature_template.sql b/sql/old/3.3.5a/2012_06_01_03_world_creature_template.sql
index fb20691ad69..fb20691ad69 100644
--- a/sql/updates/world/2012_06_01_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/2012_06_01_03_world_creature_template.sql
diff --git a/sql/updates/world/2012_06_01_04_world_misc.sql b/sql/old/3.3.5a/2012_06_01_04_world_misc.sql
index d5273cec233..d5273cec233 100644
--- a/sql/updates/world/2012_06_01_04_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_01_04_world_misc.sql
diff --git a/sql/updates/world/2012_06_02_00_world_sai.sql b/sql/old/3.3.5a/2012_06_02_00_world_sai.sql
index af0b12be244..af0b12be244 100644
--- a/sql/updates/world/2012_06_02_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_02_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_02_01_world_waypoints.sql b/sql/old/3.3.5a/2012_06_02_01_world_waypoints.sql
index c50436bba8d..c50436bba8d 100644
--- a/sql/updates/world/2012_06_02_01_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_06_02_01_world_waypoints.sql
diff --git a/sql/updates/world/2012_06_02_02_world_creature_text.sql b/sql/old/3.3.5a/2012_06_02_02_world_creature_text.sql
index c38e413617d..c38e413617d 100644
--- a/sql/updates/world/2012_06_02_02_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_06_02_02_world_creature_text.sql
diff --git a/sql/updates/world/2012_06_02_03_world_creature_loot_template_hp.sql b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql
index cd6015929b1..cd6015929b1 100644
--- a/sql/updates/world/2012_06_02_03_world_creature_loot_template_hp.sql
+++ b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_hp.sql
diff --git a/sql/updates/world/2012_06_02_03_world_creature_loot_template_zm.sql b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql
index e739f81407b..e739f81407b 100644
--- a/sql/updates/world/2012_06_02_03_world_creature_loot_template_zm.sql
+++ b/sql/old/3.3.5a/2012_06_02_03_world_creature_loot_template_zm.sql
diff --git a/sql/updates/world/2012_06_02_03_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql
index c712cbe18bd..c712cbe18bd 100644
--- a/sql/updates/world/2012_06_02_03_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_06_02_03_world_reference_loot_template.sql
diff --git a/sql/updates/world/2012_06_02_04_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql
index 57be9083048..57be9083048 100644
--- a/sql/updates/world/2012_06_02_04_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_06_02_04_world_reference_loot_template.sql
diff --git a/sql/updates/world/2012_06_02_05_world_reference_loot_template.sql b/sql/old/3.3.5a/2012_06_02_05_world_reference_loot_template.sql
index 51dee84ad9b..51dee84ad9b 100644
--- a/sql/updates/world/2012_06_02_05_world_reference_loot_template.sql
+++ b/sql/old/3.3.5a/2012_06_02_05_world_reference_loot_template.sql
diff --git a/sql/updates/world/2012_06_02_06_world_waypoints.sql b/sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql
index 65d5d43bad2..65d5d43bad2 100644
--- a/sql/updates/world/2012_06_02_06_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_06_02_06_world_waypoints.sql
diff --git a/sql/updates/world/2012_06_02_07_world_Misc.sql b/sql/old/3.3.5a/2012_06_02_07_world_Misc.sql
index c541819841c..c541819841c 100644
--- a/sql/updates/world/2012_06_02_07_world_Misc.sql
+++ b/sql/old/3.3.5a/2012_06_02_07_world_Misc.sql
diff --git a/sql/updates/world/2012_06_02_08_world_waypoints.sql b/sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql
index 60b936a7f72..60b936a7f72 100644
--- a/sql/updates/world/2012_06_02_08_world_waypoints.sql
+++ b/sql/old/3.3.5a/2012_06_02_08_world_waypoints.sql
diff --git a/sql/updates/world/2012_06_02_09_world_creature_transport.sql b/sql/old/3.3.5a/2012_06_02_09_world_creature_transport.sql
index 9a0b062f9ea..9a0b062f9ea 100644
--- a/sql/updates/world/2012_06_02_09_world_creature_transport.sql
+++ b/sql/old/3.3.5a/2012_06_02_09_world_creature_transport.sql
diff --git a/sql/updates/world/2012_06_03_00_world_sai.sql b/sql/old/3.3.5a/2012_06_03_00_world_sai.sql
index 7a5932e61fc..7a5932e61fc 100644
--- a/sql/updates/world/2012_06_03_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_03_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_03_01_world_creature.sql b/sql/old/3.3.5a/2012_06_03_01_world_creature.sql
index 68448b31591..68448b31591 100644
--- a/sql/updates/world/2012_06_03_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_03_01_world_creature.sql
diff --git a/sql/updates/world/2012_06_03_02_world_misc.sql b/sql/old/3.3.5a/2012_06_03_02_world_misc.sql
index 69de8eacdf3..69de8eacdf3 100644
--- a/sql/updates/world/2012_06_03_02_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_03_02_world_misc.sql
diff --git a/sql/updates/world/2012_06_03_03_world_quest_template.sql b/sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql
index 023182aaf1b..023182aaf1b 100644
--- a/sql/updates/world/2012_06_03_03_world_quest_template.sql
+++ b/sql/old/3.3.5a/2012_06_03_03_world_quest_template.sql
diff --git a/sql/updates/world/2012_06_03_04_world_misc.sql b/sql/old/3.3.5a/2012_06_03_04_world_misc.sql
index 22621d92cbd..22621d92cbd 100644
--- a/sql/updates/world/2012_06_03_04_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_03_04_world_misc.sql
diff --git a/sql/updates/world/2012_06_03_05_world_creature.sql b/sql/old/3.3.5a/2012_06_03_05_world_creature.sql
index c5bccdbf33c..c5bccdbf33c 100644
--- a/sql/updates/world/2012_06_03_05_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_03_05_world_creature.sql
diff --git a/sql/updates/world/2012_06_03_06_world_sai.sql b/sql/old/3.3.5a/2012_06_03_06_world_sai.sql
index 32d1995a092..32d1995a092 100644
--- a/sql/updates/world/2012_06_03_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_03_06_world_sai.sql
diff --git a/sql/updates/world/2012_06_04_00_world_sai.sql b/sql/old/3.3.5a/2012_06_04_00_world_sai.sql
index 9497f73041c..9497f73041c 100644
--- a/sql/updates/world/2012_06_04_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_04_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_04_01_world_gossip.sql b/sql/old/3.3.5a/2012_06_04_01_world_gossip.sql
index f6246967452..f6246967452 100644
--- a/sql/updates/world/2012_06_04_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_04_01_world_gossip.sql
diff --git a/sql/updates/world/2012_06_04_02_world_gossip.sql b/sql/old/3.3.5a/2012_06_04_02_world_gossip.sql
index 0122e9b736e..0122e9b736e 100644
--- a/sql/updates/world/2012_06_04_02_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_04_02_world_gossip.sql
diff --git a/sql/updates/world/2012_06_04_03_world_conditions.sql b/sql/old/3.3.5a/2012_06_04_03_world_conditions.sql
index 0eadeb8542e..0eadeb8542e 100644
--- a/sql/updates/world/2012_06_04_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_06_04_03_world_conditions.sql
diff --git a/sql/updates/world/2012_06_04_04_world_sai.sql b/sql/old/3.3.5a/2012_06_04_04_world_sai.sql
index f38cd1fe63f..f38cd1fe63f 100644
--- a/sql/updates/world/2012_06_04_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_04_04_world_sai.sql
diff --git a/sql/updates/world/2012_06_04_05_world_sai.sql b/sql/old/3.3.5a/2012_06_04_05_world_sai.sql
index 51d998c15ab..51d998c15ab 100644
--- a/sql/updates/world/2012_06_04_05_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_04_05_world_sai.sql
diff --git a/sql/updates/world/2012_06_04_06_world_sai.sql b/sql/old/3.3.5a/2012_06_04_06_world_sai.sql
index 455246d82b7..455246d82b7 100644
--- a/sql/updates/world/2012_06_04_06_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_04_06_world_sai.sql
diff --git a/sql/updates/world/2012_06_04_07_world_misc.sql b/sql/old/3.3.5a/2012_06_04_07_world_misc.sql
index 947ba3b31ee..947ba3b31ee 100644
--- a/sql/updates/world/2012_06_04_07_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_04_07_world_misc.sql
diff --git a/sql/updates/world/2012_06_05_00_world_sai.sql b/sql/old/3.3.5a/2012_06_05_00_world_sai.sql
index c43998b7459..c43998b7459 100644
--- a/sql/updates/world/2012_06_05_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_05_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_05_01_world_gossip.sql b/sql/old/3.3.5a/2012_06_05_01_world_gossip.sql
index 11697eeffd4..11697eeffd4 100644
--- a/sql/updates/world/2012_06_05_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_05_01_world_gossip.sql
diff --git a/sql/updates/world/2012_06_05_01_world_gossip_sai.sql b/sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql
index 84893613c75..84893613c75 100644
--- a/sql/updates/world/2012_06_05_01_world_gossip_sai.sql
+++ b/sql/old/3.3.5a/2012_06_05_01_world_gossip_sai.sql
diff --git a/sql/updates/world/2012_06_05_03_world_script.sql b/sql/old/3.3.5a/2012_06_05_03_world_script.sql
index d10247979d9..d10247979d9 100644
--- a/sql/updates/world/2012_06_05_03_world_script.sql
+++ b/sql/old/3.3.5a/2012_06_05_03_world_script.sql
diff --git a/sql/updates/world/2012_06_06_00_world_script.sql b/sql/old/3.3.5a/2012_06_06_00_world_script.sql
index 727d28e8ea9..727d28e8ea9 100644
--- a/sql/updates/world/2012_06_06_00_world_script.sql
+++ b/sql/old/3.3.5a/2012_06_06_00_world_script.sql
diff --git a/sql/updates/world/2012_06_06_01_world_sai.sql b/sql/old/3.3.5a/2012_06_06_01_world_sai.sql
index 97e175652d2..97e175652d2 100644
--- a/sql/updates/world/2012_06_06_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_06_01_world_sai.sql
diff --git a/sql/updates/world/2012_06_06_02_world_sai.sql b/sql/old/3.3.5a/2012_06_06_02_world_sai.sql
index 297409ed776..297409ed776 100644
--- a/sql/updates/world/2012_06_06_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_06_02_world_sai.sql
diff --git a/sql/updates/world/2012_06_06_03_world_conditions.sql b/sql/old/3.3.5a/2012_06_06_03_world_conditions.sql
index c9af2a1bcbc..c9af2a1bcbc 100644
--- a/sql/updates/world/2012_06_06_03_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_06_06_03_world_conditions.sql
diff --git a/sql/updates/world/2012_06_06_04_world_sai.sql b/sql/old/3.3.5a/2012_06_06_04_world_sai.sql
index af820f418be..af820f418be 100644
--- a/sql/updates/world/2012_06_06_04_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_06_04_world_sai.sql
diff --git a/sql/updates/characters/2012_06_07_00_characters_respawn.sql b/sql/old/3.3.5a/2012_06_07_00_characters_respawn.sql
index 168aa312713..168aa312713 100644
--- a/sql/updates/characters/2012_06_07_00_characters_respawn.sql
+++ b/sql/old/3.3.5a/2012_06_07_00_characters_respawn.sql
diff --git a/sql/updates/world/2012_06_07_00_world_gossip.sql b/sql/old/3.3.5a/2012_06_07_00_world_gossip.sql
index aac3ac53e74..aac3ac53e74 100644
--- a/sql/updates/world/2012_06_07_00_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_07_00_world_gossip.sql
diff --git a/sql/updates/world/2012_06_07_01_world_gossip.sql b/sql/old/3.3.5a/2012_06_07_01_world_gossip.sql
index d77d41fa523..d77d41fa523 100644
--- a/sql/updates/world/2012_06_07_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_07_01_world_gossip.sql
diff --git a/sql/updates/world/2012_06_07_02_world_item_template.sql b/sql/old/3.3.5a/2012_06_07_02_world_item_template.sql
index fdf3cce7c24..fdf3cce7c24 100644
--- a/sql/updates/world/2012_06_07_02_world_item_template.sql
+++ b/sql/old/3.3.5a/2012_06_07_02_world_item_template.sql
diff --git a/sql/updates/world/2012_06_07_03_world_item_template.sql b/sql/old/3.3.5a/2012_06_07_03_world_item_template.sql
index a6caa15632e..a6caa15632e 100644
--- a/sql/updates/world/2012_06_07_03_world_item_template.sql
+++ b/sql/old/3.3.5a/2012_06_07_03_world_item_template.sql
diff --git a/sql/updates/world/2012_06_07_04_world_spell_dbc.sql b/sql/old/3.3.5a/2012_06_07_04_world_spell_dbc.sql
index de5753fc7a6..de5753fc7a6 100644
--- a/sql/updates/world/2012_06_07_04_world_spell_dbc.sql
+++ b/sql/old/3.3.5a/2012_06_07_04_world_spell_dbc.sql
diff --git a/sql/updates/world/2012_06_07_05_world_misc.sql b/sql/old/3.3.5a/2012_06_07_05_world_misc.sql
index d45384dd3ef..d45384dd3ef 100644
--- a/sql/updates/world/2012_06_07_05_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_07_05_world_misc.sql
diff --git a/sql/updates/world/2012_06_08_00_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_06_08_00_world_spell_bonus_data.sql
index bf899421605..bf899421605 100644
--- a/sql/updates/world/2012_06_08_00_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_06_08_00_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_06_09_00_world_creature.sql b/sql/old/3.3.5a/2012_06_09_00_world_creature.sql
index b2454b54163..b2454b54163 100644
--- a/sql/updates/world/2012_06_09_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_09_00_world_creature.sql
diff --git a/sql/updates/world/2012_06_12_00_world_transport.sql b/sql/old/3.3.5a/2012_06_12_00_world_transport.sql
index d3a35c254d9..d3a35c254d9 100644
--- a/sql/updates/world/2012_06_12_00_world_transport.sql
+++ b/sql/old/3.3.5a/2012_06_12_00_world_transport.sql
diff --git a/sql/updates/world/2012_06_13_00_world_creature.sql b/sql/old/3.3.5a/2012_06_13_00_world_creature.sql
index 0d2aa74c9c7..0d2aa74c9c7 100644
--- a/sql/updates/world/2012_06_13_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_13_00_world_creature.sql
diff --git a/sql/updates/world/2012_06_13_01_world_creature.sql b/sql/old/3.3.5a/2012_06_13_01_world_creature.sql
index 5ba3e0d34a2..5ba3e0d34a2 100644
--- a/sql/updates/world/2012_06_13_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_13_01_world_creature.sql
diff --git a/sql/updates/world/2012_06_13_02_world_gossip.sql b/sql/old/3.3.5a/2012_06_13_02_world_gossip.sql
index 2cac9fe2a0a..2cac9fe2a0a 100644
--- a/sql/updates/world/2012_06_13_02_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_13_02_world_gossip.sql
diff --git a/sql/updates/world/2012_06_13_03_world_sai.sql b/sql/old/3.3.5a/2012_06_13_03_world_sai.sql
index ad9642447c0..ad9642447c0 100644
--- a/sql/updates/world/2012_06_13_03_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_13_03_world_sai.sql
diff --git a/sql/updates/world/2012_06_14_00_world_spell_linked_spell.sql b/sql/old/3.3.5a/2012_06_14_00_world_spell_linked_spell.sql
index 85cae64c21d..85cae64c21d 100644
--- a/sql/updates/world/2012_06_14_00_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2012_06_14_00_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2012_06_14_01_world_spell_linked_spell.sql b/sql/old/3.3.5a/2012_06_14_01_world_spell_linked_spell.sql
index 6109c8db068..6109c8db068 100644
--- a/sql/updates/world/2012_06_14_01_world_spell_linked_spell.sql
+++ b/sql/old/3.3.5a/2012_06_14_01_world_spell_linked_spell.sql
diff --git a/sql/updates/world/2012_06_14_02_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql
index b7f61f407b4..b7f61f407b4 100644
--- a/sql/updates/world/2012_06_14_02_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_06_14_02_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_06_14_03_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql
index dc59f152e33..dc59f152e33 100644
--- a/sql/updates/world/2012_06_14_03_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_06_14_03_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_06_14_03_world_spell_ranks.sql b/sql/old/3.3.5a/2012_06_14_03_world_spell_ranks.sql
index f6641f2f095..f6641f2f095 100644
--- a/sql/updates/world/2012_06_14_03_world_spell_ranks.sql
+++ b/sql/old/3.3.5a/2012_06_14_03_world_spell_ranks.sql
diff --git a/sql/updates/world/2012_06_14_04_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_14_04_world_spell_script_names.sql
index 00ceb1df9e9..00ceb1df9e9 100644
--- a/sql/updates/world/2012_06_14_04_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_14_04_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql b/sql/old/3.3.5a/2012_06_14_05_world_spelldifficulty_dbc.sql
index 1f218027f91..1f218027f91 100644
--- a/sql/updates/world/2012_06_14_05_world_spelldifficulty_dbc.sql
+++ b/sql/old/3.3.5a/2012_06_14_05_world_spelldifficulty_dbc.sql
diff --git a/sql/updates/world/2012_06_14_06_world_conditions.sql b/sql/old/3.3.5a/2012_06_14_06_world_conditions.sql
index 43d422e9239..43d422e9239 100644
--- a/sql/updates/world/2012_06_14_06_world_conditions.sql
+++ b/sql/old/3.3.5a/2012_06_14_06_world_conditions.sql
diff --git a/sql/updates/world/2012_06_14_07_world_spell_bonus_data.sql b/sql/old/3.3.5a/2012_06_14_07_world_spell_bonus_data.sql
index aa9c1b732c4..aa9c1b732c4 100644
--- a/sql/updates/world/2012_06_14_07_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/2012_06_14_07_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2012_06_14_08_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_14_08_world_spell_script_names.sql
index a9faa529143..a9faa529143 100644
--- a/sql/updates/world/2012_06_14_08_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_14_08_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_14_09_world_sai.sql b/sql/old/3.3.5a/2012_06_14_09_world_sai.sql
index 3beb7c06326..3beb7c06326 100644
--- a/sql/updates/world/2012_06_14_09_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_14_09_world_sai.sql
diff --git a/sql/updates/world/2012_06_14_10_world_eai.sql b/sql/old/3.3.5a/2012_06_14_10_world_eai.sql
index 355646fbd69..355646fbd69 100644
--- a/sql/updates/world/2012_06_14_10_world_eai.sql
+++ b/sql/old/3.3.5a/2012_06_14_10_world_eai.sql
diff --git a/sql/updates/world/2012_06_14_11_world_sai.sql b/sql/old/3.3.5a/2012_06_14_11_world_sai.sql
index 1d01b02f86b..1d01b02f86b 100644
--- a/sql/updates/world/2012_06_14_11_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_14_11_world_sai.sql
diff --git a/sql/updates/world/2012_06_15_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_15_00_world_spell_script_names.sql
index 040ad3c87ba..040ad3c87ba 100644
--- a/sql/updates/world/2012_06_15_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_15_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_15_01_world_sai.sql b/sql/old/3.3.5a/2012_06_15_01_world_sai.sql
index 501c3aa1c40..501c3aa1c40 100644
--- a/sql/updates/world/2012_06_15_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_15_01_world_sai.sql
diff --git a/sql/updates/world/2012_06_15_02_world_sai.sql b/sql/old/3.3.5a/2012_06_15_02_world_sai.sql
index f813ae2996b..f813ae2996b 100644
--- a/sql/updates/world/2012_06_15_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_15_02_world_sai.sql
diff --git a/sql/updates/world/2012_06_16_00_world_sai.sql b/sql/old/3.3.5a/2012_06_16_00_world_sai.sql
index a714e498bc9..a714e498bc9 100644
--- a/sql/updates/world/2012_06_16_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_16_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_16_01_world_creature.sql b/sql/old/3.3.5a/2012_06_16_01_world_creature.sql
index d44b568f79b..d44b568f79b 100644
--- a/sql/updates/world/2012_06_16_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_16_01_world_creature.sql
diff --git a/sql/updates/world/2012_06_17_00_world_creature.sql b/sql/old/3.3.5a/2012_06_17_00_world_creature.sql
index 53e101c5d60..53e101c5d60 100644
--- a/sql/updates/world/2012_06_17_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_17_00_world_creature.sql
diff --git a/sql/updates/world/2012_06_17_01_world_creature.sql b/sql/old/3.3.5a/2012_06_17_01_world_creature.sql
index c5d50fdde1e..c5d50fdde1e 100644
--- a/sql/updates/world/2012_06_17_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_17_01_world_creature.sql
diff --git a/sql/updates/world/2012_06_17_02_world_creature.sql b/sql/old/3.3.5a/2012_06_17_02_world_creature.sql
index a309ada3498..a309ada3498 100644
--- a/sql/updates/world/2012_06_17_02_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_17_02_world_creature.sql
diff --git a/sql/updates/world/2012_06_18_00_world_creature.sql b/sql/old/3.3.5a/2012_06_18_00_world_creature.sql
index 23538c33f73..23538c33f73 100644
--- a/sql/updates/world/2012_06_18_00_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_18_00_world_creature.sql
diff --git a/sql/updates/world/2012_06_18_01_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_18_01_world_spell_script_names.sql
index 5f227a887d7..5f227a887d7 100644
--- a/sql/updates/world/2012_06_18_01_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_18_01_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_18_02_world_sai.sql b/sql/old/3.3.5a/2012_06_18_02_world_sai.sql
index 0c036d3d5f0..0c036d3d5f0 100644
--- a/sql/updates/world/2012_06_18_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_18_02_world_sai.sql
diff --git a/sql/updates/world/2012_06_18_03_world_sai.sql b/sql/old/3.3.5a/2012_06_18_03_world_sai.sql
index 833c64c8d9d..833c64c8d9d 100644
--- a/sql/updates/world/2012_06_18_03_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_18_03_world_sai.sql
diff --git a/sql/updates/world/2012_06_19_00_world_sai.sql b/sql/old/3.3.5a/2012_06_19_00_world_sai.sql
index fdfc5aec5f8..fdfc5aec5f8 100644
--- a/sql/updates/world/2012_06_19_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_19_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_19_01_world_gossip.sql b/sql/old/3.3.5a/2012_06_19_01_world_gossip.sql
index 7800d2a9740..7800d2a9740 100644
--- a/sql/updates/world/2012_06_19_01_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_19_01_world_gossip.sql
diff --git a/sql/updates/world/2012_06_19_02_world_misc.sql b/sql/old/3.3.5a/2012_06_19_02_world_misc.sql
index 32aa493f4f7..32aa493f4f7 100644
--- a/sql/updates/world/2012_06_19_02_world_misc.sql
+++ b/sql/old/3.3.5a/2012_06_19_02_world_misc.sql
diff --git a/sql/updates/world/2012_06_20_00_world_gossip.sql b/sql/old/3.3.5a/2012_06_20_00_world_gossip.sql
index b4d61887223..b4d61887223 100644
--- a/sql/updates/world/2012_06_20_00_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_20_00_world_gossip.sql
diff --git a/sql/updates/world/2012_06_20_01_world_sai.sql b/sql/old/3.3.5a/2012_06_20_01_world_sai.sql
index 989550de185..989550de185 100644
--- a/sql/updates/world/2012_06_20_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_20_01_world_sai.sql
diff --git a/sql/updates/world/2012_06_20_02_world_gossip.sql b/sql/old/3.3.5a/2012_06_20_02_world_gossip.sql
index c20cb99aa4a..c20cb99aa4a 100644
--- a/sql/updates/world/2012_06_20_02_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_20_02_world_gossip.sql
diff --git a/sql/updates/world/2012_06_24_00_world_gossip.sql b/sql/old/3.3.5a/2012_06_24_00_world_gossip.sql
index f8aa5213bf4..f8aa5213bf4 100644
--- a/sql/updates/world/2012_06_24_00_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_06_24_00_world_gossip.sql
diff --git a/sql/updates/world/2012_06_24_01_world_quest.sql b/sql/old/3.3.5a/2012_06_24_01_world_quest.sql
index ec0d39b0c62..ec0d39b0c62 100644
--- a/sql/updates/world/2012_06_24_01_world_quest.sql
+++ b/sql/old/3.3.5a/2012_06_24_01_world_quest.sql
diff --git a/sql/updates/world/2012_06_24_02_world_gameobject.sql b/sql/old/3.3.5a/2012_06_24_02_world_gameobject.sql
index 4894365462e..4894365462e 100644
--- a/sql/updates/world/2012_06_24_02_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_06_24_02_world_gameobject.sql
diff --git a/sql/updates/world/2012_06_24_03_world_gameobject.sql b/sql/old/3.3.5a/2012_06_24_03_world_gameobject.sql
index b98ef4b6dbe..b98ef4b6dbe 100644
--- a/sql/updates/world/2012_06_24_03_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_06_24_03_world_gameobject.sql
diff --git a/sql/updates/world/2012_06_24_04_world_gameobject.sql b/sql/old/3.3.5a/2012_06_24_04_world_gameobject.sql
index 2fa34ee18c3..2fa34ee18c3 100644
--- a/sql/updates/world/2012_06_24_04_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_06_24_04_world_gameobject.sql
diff --git a/sql/updates/world/2012_06_25_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_25_00_world_spell_script_names.sql
index 51f3e19f5bc..51f3e19f5bc 100644
--- a/sql/updates/world/2012_06_25_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_25_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_25_01_world_gameobject.sql b/sql/old/3.3.5a/2012_06_25_01_world_gameobject.sql
index 5cadd915990..5cadd915990 100644
--- a/sql/updates/world/2012_06_25_01_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_06_25_01_world_gameobject.sql
diff --git a/sql/updates/world/2012_06_25_02_world_gameobject.sql b/sql/old/3.3.5a/2012_06_25_02_world_gameobject.sql
index f526f071bac..f526f071bac 100644
--- a/sql/updates/world/2012_06_25_02_world_gameobject.sql
+++ b/sql/old/3.3.5a/2012_06_25_02_world_gameobject.sql
diff --git a/sql/updates/world/2012_06_26_00_world_sai.sql b/sql/old/3.3.5a/2012_06_26_00_world_sai.sql
index c6fe75be1e5..c6fe75be1e5 100644
--- a/sql/updates/world/2012_06_26_00_world_sai.sql
+++ b/sql/old/3.3.5a/2012_06_26_00_world_sai.sql
diff --git a/sql/updates/world/2012_06_26_01_world_creature.sql b/sql/old/3.3.5a/2012_06_26_01_world_creature.sql
index 1f0dfff0b04..1f0dfff0b04 100644
--- a/sql/updates/world/2012_06_26_01_world_creature.sql
+++ b/sql/old/3.3.5a/2012_06_26_01_world_creature.sql
diff --git a/sql/updates/world/2012_06_26_02_world_creature_loot_template.sql b/sql/old/3.3.5a/2012_06_26_02_world_creature_loot_template.sql
index 3a704e61bcf..3a704e61bcf 100644
--- a/sql/updates/world/2012_06_26_02_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/2012_06_26_02_world_creature_loot_template.sql
diff --git a/sql/updates/world/2012_06_27_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_06_27_00_world_spell_script_names.sql
index 8210225de6e..8210225de6e 100644
--- a/sql/updates/world/2012_06_27_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_06_27_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_06_27_01_world_game_graveyard_zone.sql b/sql/old/3.3.5a/2012_06_27_01_world_game_graveyard_zone.sql
index 973a1dc5296..973a1dc5296 100644
--- a/sql/updates/world/2012_06_27_01_world_game_graveyard_zone.sql
+++ b/sql/old/3.3.5a/2012_06_27_01_world_game_graveyard_zone.sql
diff --git a/sql/updates/world/2012_07_01_00_world_creature_text.sql b/sql/old/3.3.5a/2012_07_01_00_world_creature_text.sql
index f59663ceab5..f59663ceab5 100644
--- a/sql/updates/world/2012_07_01_00_world_creature_text.sql
+++ b/sql/old/3.3.5a/2012_07_01_00_world_creature_text.sql
diff --git a/sql/updates/world/2012_05_09_02_achievement_criteria_data.sql b/sql/old/3.3.5a/2012_07_01_01_achievement_criteria_data.sql
index e1c0529fffe..e1c0529fffe 100644
--- a/sql/updates/world/2012_05_09_02_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/2012_07_01_01_achievement_criteria_data.sql
diff --git a/sql/updates/world/2012_07_02_00_world_creature_onkill_reputation.sql b/sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql
index a9565d36934..a9565d36934 100644
--- a/sql/updates/world/2012_07_02_00_world_creature_onkill_reputation.sql
+++ b/sql/old/3.3.5a/2012_07_02_00_world_creature_onkill_reputation.sql
diff --git a/sql/updates/world/2012_07_02_01_world_sai.sql b/sql/old/3.3.5a/2012_07_02_01_world_sai.sql
index 323d9bddcb2..323d9bddcb2 100644
--- a/sql/updates/world/2012_07_02_01_world_sai.sql
+++ b/sql/old/3.3.5a/2012_07_02_01_world_sai.sql
diff --git a/sql/updates/world/2012_07_02_02_world_sai.sql b/sql/old/3.3.5a/2012_07_02_02_world_sai.sql
index 6b6b0eb587c..6b6b0eb587c 100644
--- a/sql/updates/world/2012_07_02_02_world_sai.sql
+++ b/sql/old/3.3.5a/2012_07_02_02_world_sai.sql
diff --git a/sql/updates/world/2012_07_02_03_world_gossip.sql b/sql/old/3.3.5a/2012_07_02_03_world_gossip.sql
index 0c158aa7511..0c158aa7511 100644
--- a/sql/updates/world/2012_07_02_03_world_gossip.sql
+++ b/sql/old/3.3.5a/2012_07_02_03_world_gossip.sql
diff --git a/sql/updates/world/2012_07_02_04_world_spell_script_names.sql b/sql/old/3.3.5a/2012_07_02_04_world_spell_script_names.sql
index 9054ea7ba82..9054ea7ba82 100644
--- a/sql/updates/world/2012_07_02_04_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_07_02_04_world_spell_script_names.sql
diff --git a/sql/updates/world/2012_07_04_world_spell_script_names.sql b/sql/old/3.3.5a/2012_07_04_00_world_spell_script_names.sql
index 9e157261409..9e157261409 100644
--- a/sql/updates/world/2012_07_04_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/2012_07_04_00_world_spell_script_names.sql
diff --git a/sql/old/3.3.5a/2012_07_05_00_world_item_template.sql b/sql/old/3.3.5a/2012_07_05_00_world_item_template.sql
new file mode 100644
index 00000000000..d4240ca65a7
--- /dev/null
+++ b/sql/old/3.3.5a/2012_07_05_00_world_item_template.sql
@@ -0,0 +1 @@
+UPDATE `item_template` SET `flagsCustom` = `flagsCustom` | 4 WHERE `entry` IN (50226,50231,50274);
diff --git a/sql/old/3.3.5a/2012_07_06_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_07_06_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..676ac430a9d
--- /dev/null
+++ b/sql/old/3.3.5a/2012_07_06_00_world_spell_script_names.sql
@@ -0,0 +1 @@
+UPDATE `spell_script_names` SET `spell_id` = 42787 WHERE `spell_id` = 42784;
diff --git a/sql/old/3.3.5a/2012_07_09_00_world_spell_script_names.sql b/sql/old/3.3.5a/2012_07_09_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..c97695498b8
--- /dev/null
+++ b/sql/old/3.3.5a/2012_07_09_00_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (42787,42784);
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(42783, 'spell_astromancer_wrath_of_the_astromancer');
diff --git a/sql/updates/characters/2012_06_13_00_characters_character_equipmentsets.sql b/sql/updates/characters/2012_06_13_00_characters_character_equipmentsets.sql
new file mode 100644
index 00000000000..ebf12062be3
--- /dev/null
+++ b/sql/updates/characters/2012_06_13_00_characters_character_equipmentsets.sql
@@ -0,0 +1,22 @@
+ALTER TABLE `character_equipmentsets`
+MODIFY COLUMN `item0` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item1` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item2` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item3` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item4` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item5` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item6` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item7` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item8` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item9` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item10` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item11` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item12` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item13` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item14` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item15` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item16` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item17` int(11) unsigned NOT NULL DEFAULT 0,
+MODIFY COLUMN `item18` int(11) unsigned NOT NULL DEFAULT 0;
+
+ALTER TABLE `character_equipmentsets` ADD COLUMN `ignore_mask` int(11) unsigned NOT NULL DEFAULT 0 AFTER `iconname`;
diff --git a/sql/updates/world/2012_05_19_04_creature_loot_template.sql b/sql/updates/world/2012_05_19_04_creature_loot_template.sql
deleted file mode 100644
index ae996e01956..00000000000
--- a/sql/updates/world/2012_05_19_04_creature_loot_template.sql
+++ /dev/null
@@ -1 +0,0 @@
-DELETE FROM `creature_loot_template` WHERE `entry`=31813 AND `item`=36912; -- Saronite Ore
diff --git a/sql/updates/world/2012_05_19_05_gameobject_loot_template.sql b/sql/updates/world/2012_05_19_05_gameobject_loot_template.sql
deleted file mode 100644
index f95cb45efe4..00000000000
--- a/sql/updates/world/2012_05_19_05_gameobject_loot_template.sql
+++ /dev/null
@@ -1,93 +0,0 @@
--- Set Variables
-SET @Gunship10N := 28057; -- Data1 for 201872 & 202177
-SET @Gunship10H := 28045; -- Data1 for 201873 & 202178
-SET @Gunship25N := 28072; -- Data1 for 201874 & 202179
-SET @Gunship25H := 28090; -- Data1 for 201875 & 202180
-SET @emblem := 49426; -- Emblem of Frost
-SET @SfShard := 50274; -- Shadowfrost Shard
-SET @PriSar := 49908; -- Primordial Saronite
--- Dug up the old references i created for UP34:
-SET @Ref10J := 34329;
-SET @Ref25J := 34251;
-SET @RefJ10H := 34263;
-SET @RefJ25H := 34275;
--- Gunship_Armory10N_reference
-DELETE FROM `reference_loot_template` WHERE `entry` IN (@Ref10J,@Ref25J,@RefJ10H,@RefJ25H);
-INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-(@Ref10J,50791,0,1,1,1,1), -- Saronite Gargoyle Cloak
-(@Ref10J,50795,0,1,1,1,1), -- Cord of Dark Suffering
-(@Ref10J,50794,0,1,1,1,1), -- Neverending Winter
-(@Ref10J,50787,0,1,1,1,1), -- Frost Giant's Cleaver
-(@Ref10J,50793,0,1,1,1,1), -- Midnight Sun
-(@Ref10J,50788,0,1,1,1,1), -- Bone Drake's Enameled Boots
-(@Ref10J,50792,0,1,1,1,1), -- Pauldrons of Lost Hope
-(@Ref10J,50340,0,1,1,1,1), -- Muradin's Spyglass
-(@Ref10J,50797,0,1,1,1,1), -- Ice-Reinforced Vrykul Helm
-(@Ref10J,50790,0,1,1,1,1), -- Abomination's Bloody Ring
-(@Ref10J,50789,0,1,1,1,1), -- Icecrown Rampart Bracers
-(@Ref10J,50796,0,1,1,1,1), -- Bracers of Pale Illumination
--- Gunship_Armory25N_reference
-(@Ref25J,50011,0,1,1,1,1), -- Gunship Captain's Mittens
-(@Ref25J,50002,0,1,1,1,1), -- Polar Bear Claw Bracers
-(@Ref25J,50006,0,1,1,1,1), -- Corp'rethar Ceremonial Crown
-(@Ref25J,50010,0,1,1,1,1), -- Waistband of Righteous Fury
-(@Ref25J,50003,0,1,1,1,1), -- Boneguard Commander's Pauldrons
-(@Ref25J,50000,0,1,1,1,1), -- Scourge Hunter's Vambraces
-(@Ref25J,50359,0,1,1,1,1), -- Althor's Abacus
-(@Ref25J,50352,0,1,1,1,1), -- Corpse Tongue Coin
-(@Ref25J,49999,0,1,1,1,1), -- Skeleton Lord's Circle
-(@Ref25J,50009,0,1,1,1,1), -- Boots of Unnatural Growth
-(@Ref25J,50008,0,1,1,1,1), -- Ring of Rapid Ascent
-(@Ref25J,49998,0,1,1,1,1), -- Shadowvault Slayer's Cloak
-(@Ref25J,50005,0,1,1,1,1), -- Amulet of the Silent Eulogy
-(@Ref25J,50411,0,1,1,1,1), -- Scourgeborne Waraxe
-(@Ref25J,50001,0,1,1,1,1), -- Ikfirus's Sack of Wonder
--- Gunship_Armory10H_reference
-(@RefJ10H,51912,0,1,1,1,1), -- Saronite Gargoyle Cloak (heroic)
-(@RefJ10H,51908,0,1,1,1,1), -- Cord of Dark Suffering (heroic)
-(@RefJ10H,51909,0,1,1,1,1), -- Neverending Winter (heroic)
-(@RefJ10H,51916,0,1,1,1,1), -- Frost Giant's Cleaver (heroic)
-(@RefJ10H,51910,0,1,1,1,1), -- Midnight Sun (heroic)
-(@RefJ10H,51915,0,1,1,1,1), -- Bone Drake's Enameled Boots (heroic)
-(@RefJ10H,51911,0,1,1,1,1), -- Pauldrons of Lost Hope (heroic)
-(@RefJ10H,50345,0,1,1,1,1), -- Muradin's Spyglass (heroic)
-(@RefJ10H,51906,0,1,1,1,1), -- Ice-Reinforced Vrykul Helm (heroic)
-(@RefJ10H,51913,0,1,1,1,1), -- Abomination's Bloody Ring (heroic)
-(@RefJ10H,51914,0,1,1,1,1), -- Icecrown Rampart Bracers (heroic)
-(@RefJ10H,51907,0,1,1,1,1), -- Bracers of Pale Illumination (heroic)
--- Gunship_Armory25H_reference
-(@RefJ25H,50663,0,1,1,1,1), -- Gunship Captain's Mittens (heroic)
-(@RefJ25H,50659,0,1,1,1,1), -- Polar Bear Claw Bracers (heroic)
-(@RefJ25H,50661,0,1,1,1,1), -- Corp'rethar Ceremonial Crown (heroic)
-(@RefJ25H,50667,0,1,1,1,1), -- Waistband of Righteous Fury (heroic)
-(@RefJ25H,50660,0,1,1,1,1), -- Boneguard Commander's Pauldrons (heroic)
-(@RefJ25H,50655,0,1,1,1,1), -- Scourge Hunter's Vambraces (heroic)
-(@RefJ25H,50366,0,1,1,1,1), -- Althor's Abacus (heroic)
-(@RefJ25H,50349,0,1,1,1,1), -- Corpse Tongue Coin (heroic)
-(@RefJ25H,50657,0,1,1,1,1), -- Skeleton Lord's Circle (heroic)
-(@RefJ25H,50665,0,1,1,1,1), -- Boots of Unnatural Growth (heroic)
-(@RefJ25H,50664,0,1,1,1,1), -- Ring of Rapid Ascent (heroic)
-(@RefJ25H,50653,0,1,1,1,1), -- Shadowvault Slayer's Cloak (heroic)
-(@RefJ25H,50658,0,1,1,1,1), -- Amulet of the Silent Eulogy (heroic)
-(@RefJ25H,50654,0,1,1,1,1), -- Scourgeborne Waraxe (heroic)
-(@RefJ25H,50656,0,1,1,1,1); -- Ikfirus's Sack of Wonder (heroic)
--- Bind the refs to the objects
-DELETE FROM `gameobject_loot_template` WHERE `entry` IN (@Gunship10N,@Gunship10H,@Gunship25N,@Gunship25H);
-INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
--- Gunship10N
-(@Gunship10N,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 10N
-(@Gunship10N,1,100,1,0,-@Ref10J,2), -- 2 from reference 10Normal
--- Gunship25N
-(@Gunship25N,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 25N
-(@Gunship25N,1,100,1,0,-@Ref25J,2), -- 3 from reference 25Normal
-(@Gunship25N,@SfShard,-35,1,0,1,1), -- Shadowfrost Shard @ 38% chance
-(@Gunship25N,@PriSar,38,1,0,1,1), -- Primordial Saronite @ 10% chance
--- Gunship10H
-(@Gunship10H,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 10H
-(@Gunship10H,1,100,1,0,-@RefJ10H,2), -- 2 from reference 10Heroic
-(@Gunship10H,@PriSar,38,1,0,1,1), -- Primordial Saronite @ 38% chance
--- Gunship25H
-(@Gunship25H,@emblem,100,1,0,2,2), -- Gunship Armory 2xemblems 25H
-(@Gunship25H,1,100,1,0,-@RefJ25H,2), -- 3 from reference 25Heroic
-(@Gunship25H,@SfShard,-75,1,0,1,1), -- Shadowfrost Shard @ 75% chance
-(@Gunship25H,@PriSar,50,1,0,1,1); -- Primordial Saronite @ 50% chance
diff --git a/sql/updates/world/2012_05_19_06_gameobject_loot_template.sql b/sql/updates/world/2012_05_19_06_gameobject_loot_template.sql
deleted file mode 100644
index 9b2dcbb9363..00000000000
--- a/sql/updates/world/2012_05_19_06_gameobject_loot_template.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-DELETE FROM `reference_loot_template` WHERE `entry`=34172;
-DELETE FROM `creature_loot_template` WHERE `entry`=38013;
-DELETE FROM `gameobject_loot_template` WHERE `entry`=28683;
-INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
-(28683,35498,3,1,0,1,1), -- Formula: Enchant Weapon - Deathfrost
-(28683,35557,28,1,0,1,2), -- Huge Snowball
-(28683,35720,3,1,0,5,6), -- Lord of Frost's Private Label
-(28683,35723,12,1,0,1,1), -- Shards of Ahune
-(28683,54801,0,1,1,1,1), -- Icebound Cloak
-(28683,54802,0,1,1,1,1), -- The Frost Lord's War Cloak
-(28683,54803,0,1,1,1,1), -- The Frost Lord's Battle Shroud
-(28683,54804,0,1,1,1,1), -- Shroud of Winter's Chill
-(28683,54805,0,1,1,1,1); -- Cloak of the Frigid Winds
diff --git a/sql/updates/world/2012_05_28_03_waypoint_data.sql b/sql/updates/world/2012_05_28_03_waypoint_data.sql
deleted file mode 100644
index aa0e0ddd5ef..00000000000
--- a/sql/updates/world/2012_05_28_03_waypoint_data.sql
+++ /dev/null
@@ -1,3 +0,0 @@
--- correct waypointid to guid*10
-UPDATE `waypoint_data` SET `id`=2026020 WHERE `id`=2026060;
-UPDATE `creature_addon` SET `path_id`=2026020 WHERE `guid`=202602;
diff --git a/sql/updates/world/2012_07_12_00_world_version.sql b/sql/updates/world/2012_07_12_00_world_version.sql
new file mode 100644
index 00000000000..ce24fa54614
--- /dev/null
+++ b/sql/updates/world/2012_07_12_00_world_version.sql
@@ -0,0 +1 @@
+UPDATE `version` SET `db_version`='TDB 335.11.48', `cache_id`=48 LIMIT 1;
diff --git a/sql/updates/world/2012_07_13_00_world_spell_proc_event.sql b/sql/updates/world/2012_07_13_00_world_spell_proc_event.sql
new file mode 100644
index 00000000000..952a4502b30
--- /dev/null
+++ b/sql/updates/world/2012_07_13_00_world_spell_proc_event.sql
@@ -0,0 +1 @@
+UPDATE `spell_proc_event` SET `procFlags` = 16384 WHERE `entry` in (48492,48494,48495);
diff --git a/sql/updates/world/2012_07_13_00_world_spell_script_names.sql b/sql/updates/world/2012_07_13_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..64500418871
--- /dev/null
+++ b/sql/updates/world/2012_07_13_00_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE (`spell_id`='-5570');
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(-5570, 'spell_dru_insect_swarm');
diff --git a/sql/updates/world/2012_07_14_00_world_creature_loot_template.sql b/sql/updates/world/2012_07_14_00_world_creature_loot_template.sql
new file mode 100644
index 00000000000..f76e5519594
--- /dev/null
+++ b/sql/updates/world/2012_07_14_00_world_creature_loot_template.sql
@@ -0,0 +1,6 @@
+-- Gorilla Fang should always be able to drop (Exodius)
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance` = ABS(`ChanceOrQuestChance`) WHERE `item`=2799;
+-- Update "Count" Ungula's Mandible drop rate does not require quest to drop it starts one (gecko32)
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance` = ABS(`ChanceOrQuestChance`) WHERE `item`=25459;
+-- Tainted Hellboar Meat fix (ZxBiohazardZx)
+UPDATE `quest_template` SET `RequiredSourceItemId1`=23270,`RequiredSourceItemCount1`=8 WHERE `Id`=9361;
diff --git a/sql/updates/world/2012_07_14_00_world_item_template_434.sql b/sql/updates/world/2012_07_14_00_world_item_template_434.sql
new file mode 100644
index 00000000000..cf0749243ce
--- /dev/null
+++ b/sql/updates/world/2012_07_14_00_world_item_template_434.sql
@@ -0,0 +1,4 @@
+ALTER TABLE `item_template`
+ ADD `Unk430_1` float unsigned NOT NULL DEFAULT '1' AFTER `FlagsExtra`,
+ ADD `Unk430_2` float NOT NULL DEFAULT '1' AFTER `Unk430_1`,
+ ADD `BuyCount` tinyint(3) unsigned NOT NULL DEFAULT '1' AFTER `Unk430_2`;
diff --git a/sql/updates/world/2012_07_14_01_world_creature_loot_template.sql b/sql/updates/world/2012_07_14_01_world_creature_loot_template.sql
new file mode 100644
index 00000000000..1b9c4f4448c
--- /dev/null
+++ b/sql/updates/world/2012_07_14_01_world_creature_loot_template.sql
@@ -0,0 +1,33 @@
+-- Hellboar shit always drops
+UPDATE `creature_loot_template` SET `ChanceOrQuestChance`= -100 WHERE `item`=23270;
+
+-- update Al'ar loot
+SET @gear := 34053;
+SET @talon := 34377;
+SET @Alar := 19514;
+
+DELETE FROM `creature_loot_template` WHERE `entry`=@Alar;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(@Alar,29434,100,1,0,2,2), -- Badge of Justice 2x
+(@Alar,1,100,1,0,-@gear,3), -- 3x Gear Reference
+(@Alar,2,10,1,0,-34052,1), -- Pattern Reference
+(@Alar,3,2,1,0,-34052,1); -- extra Pattern Reference (small chance)
+
+DELETE FROM `reference_loot_template` WHERE `entry` IN (@gear,@talon);
+INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+-- Gear Reference:
+(@gear,29918,0,1,1,1,1), -- Mindstorm Wristbands
+(@gear,29920,0,1,1,1,1), -- Phoenix-Ring of Rebirth
+(@gear,29921,0,1,1,1,1), -- Fire Crest Breastplate
+(@gear,29922,0,1,1,1,1), -- Band of Al'ar
+(@gear,29923,0,1,1,1,1), -- Talisman of the Sun King
+(@gear,29924,0,1,1,1,1), -- Netherbane
+(@gear,29925,0,1,1,1,1), -- Phoenix-Wing Cloak
+(@gear,29947,0,1,1,1,1), -- Gloves of the Searing Grip
+(@gear,29948,0,1,1,1,1), -- Claw of the Phoenix
+(@gear,29949,0,1,1,1,1), -- Arcanite Steam-Pistol
+(@gear,30447,0,1,1,1,1), -- Tome of Fiery Redemption
+(@gear,1,0,1,1,-@talon,1), -- Talonoption
+-- either of the claws is selected
+(@talon,30448,0,1,1,1,1), -- Talon of Al'ar
+(@talon,32944,0,1,1,1,1); -- Talon of the Phoenix
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 2243734f642..c7751fc7383 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -32,7 +32,8 @@ npc_escortAI::npc_escortAI(Creature* creature) : ScriptedAI(creature),
m_bCanReturnToStart(false),
DespawnAtEnd(true),
DespawnAtFar(true),
- ScriptWP(false)
+ ScriptWP(false),
+ HasImmuneToNPCFlags(false)
{}
void npc_escortAI::AttackStart(Unit* who)
@@ -179,6 +180,8 @@ void npc_escortAI::EnterEvadeMode()
else
{
me->GetMotionMaster()->MoveTargetedHome();
+ if (HasImmuneToNPCFlags)
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
Reset();
}
}
@@ -462,6 +465,11 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
//disable npcflags
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC))
+ {
+ HasImmuneToNPCFlags = true;
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
+ }
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
index 24d15f9079b..7a7fab014dc 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
@@ -120,6 +120,7 @@ struct npc_escortAI : public ScriptedAI
bool DespawnAtEnd;
bool DespawnAtFar;
bool ScriptWP;
+ bool HasImmuneToNPCFlags;
};
#endif
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 7a146e89505..562965145bf 100755
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -112,44 +112,6 @@ ChatCommand* ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL }
};
- static ChatCommand guildCommandTable[] =
- {
- { "create", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleGuildCreateCommand>, "", NULL },
- { "delete", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleGuildDeleteCommand>, "", NULL },
- { "invite", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleGuildInviteCommand>, "", NULL },
- { "uninvite", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleGuildUninviteCommand>, "", NULL },
- { "rank", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleGuildRankCommand>, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
-
- static ChatCommand lookupPlayerCommandTable[] =
- {
- { "ip", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleLookupPlayerIpCommand>, "", NULL },
- { "account", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleLookupPlayerAccountCommand>, "", NULL },
- { "email", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleLookupPlayerEmailCommand>, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
-
- static ChatCommand lookupCommandTable[] =
- {
- { "area", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleLookupAreaCommand>, "", NULL },
- { "creature", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupCreatureCommand>, "", NULL },
- { "event", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleLookupEventCommand>, "", NULL },
- { "faction", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupFactionCommand>, "", NULL },
- { "item", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupItemCommand>, "", NULL },
- { "itemset", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupItemSetCommand>, "", NULL },
- { "object", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupObjectCommand>, "", NULL },
- { "quest", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupQuestCommand>, "", NULL },
- { "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
- { "skill", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupSkillCommand>, "", NULL },
- { "spell", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupSpellCommand>, "", NULL },
- { "taxinode", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupTaxiNodeCommand>, "", NULL },
- { "tele", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleLookupTeleCommand>, "", NULL },
- { "title", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleLookupTitleCommand>, "", NULL },
- { "map", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleLookupMapCommand>, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
-
static ChatCommand petCommandTable[] =
{
{ "create", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleCreatePetCommand>, "", NULL },
@@ -213,9 +175,7 @@ ChatCommand* ChatHandler::getCommandTable()
static ChatCommand commandTable[] =
{
- { "lookup", SEC_ADMINISTRATOR, true, NULL, "", lookupCommandTable },
{ "pdump", SEC_ADMINISTRATOR, true, NULL, "", pdumpCommandTable },
- { "guild", SEC_ADMINISTRATOR, true, NULL, "", guildCommandTable },
{ "group", SEC_ADMINISTRATOR, false, NULL, "", groupCommandTable },
{ "channel", SEC_ADMINISTRATOR, true, NULL, "", channelCommandTable },
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index bbe138b923d..77280e7ddef 100755
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -157,30 +157,6 @@ class ChatHandler
bool HandleBindSightCommand(const char* args);
bool HandleUnbindSightCommand(const char* args);
- bool HandleGuildCreateCommand(const char* args);
- bool HandleGuildInviteCommand(const char* args);
- bool HandleGuildUninviteCommand(const char* args);
- bool HandleGuildRankCommand(const char* args);
- bool HandleGuildDeleteCommand(const char* args);
-
- bool HandleLookupAreaCommand(const char* args);
- bool HandleLookupCreatureCommand(const char* args);
- bool HandleLookupEventCommand(const char* args);
- bool HandleLookupFactionCommand(const char * args);
- bool HandleLookupItemCommand(const char * args);
- bool HandleLookupItemSetCommand(const char * args);
- bool HandleLookupObjectCommand(const char* args);
- bool HandleLookupPlayerIpCommand(const char* args);
- bool HandleLookupPlayerAccountCommand(const char* args);
- bool HandleLookupPlayerEmailCommand(const char* args);
- bool HandleLookupQuestCommand(const char* args);
- bool HandleLookupSkillCommand(const char* args);
- bool HandleLookupSpellCommand(const char* args);
- bool HandleLookupTaxiNodeCommand(const char * args);
- bool HandleLookupTeleCommand(const char * args);
- bool HandleLookupMapCommand(const char* args);
- bool HandleLookupTitleCommand(const char * args);
-
bool HandlePDumpLoadCommand(const char *args);
bool HandlePDumpWriteCommand(const char *args);
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index abbc59d0114..1cf3d5c9b4e 100755
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -450,140 +450,6 @@ bool ChatHandler::HandleTaxiCheatCommand(const char* args)
return false;
}
-bool ChatHandler::HandleLookupAreaCommand(const char* args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr (namepart, wnamepart))
- return false;
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // converting string that we try to find to lower case
- wstrToLower (wnamepart);
-
- // Search in AreaTable.dbc
- for (uint32 areaflag = 0; areaflag < sAreaStore.GetNumRows(); ++areaflag)
- {
- AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(areaflag);
- if (areaEntry)
- {
- int loc = GetSessionDbcLocale();
- std::string name = areaEntry->area_name;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo (name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = areaEntry->area_name;
- if (name.empty())
- continue;
-
- if (Utf8FitTo (name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- // send area in "id - [name]" format
- std::ostringstream ss;
- if (m_session)
- ss << areaEntry->ID << " - |cffffffff|Harea:" << areaEntry->ID << "|h[" << name << ' ' << localeNames[loc]<< "]|h|r";
- else
- ss << areaEntry->ID << " - " << name << ' ' << localeNames[loc];
-
- SendSysMessage(ss.str().c_str());
-
- if (!found)
- found = true;
- }
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_NOAREAFOUND);
-
- return true;
-}
-
-//Find tele in game_tele order by name
-bool ChatHandler::HandleLookupTeleCommand(const char * args)
-{
- if (!*args)
- {
- SendSysMessage(LANG_COMMAND_TELE_PARAMETER);
- SetSentErrorMessage(true);
- return false;
- }
-
- char const* str = strtok((char*)args, " ");
- if (!str)
- return false;
-
- std::string namepart = str;
- std::wstring wnamepart;
-
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower(wnamepart);
-
- std::ostringstream reply;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
- bool limitReached = false;
-
- GameTeleContainer const & teleMap = sObjectMgr->GetGameTeleMap();
- for (GameTeleContainer::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
- {
- GameTele const* tele = &itr->second;
-
- if (tele->wnameLow.find(wnamepart) == std::wstring::npos)
- continue;
-
- if (maxResults && count++ == maxResults)
- {
- limitReached = true;
- break;
- }
-
- if (m_session)
- reply << " |cffffffff|Htele:" << itr->first << "|h[" << tele->name << "]|h|r\n";
- else
- reply << " " << itr->first << ' ' << tele->name << "\n";
- }
-
- if (reply.str().empty())
- SendSysMessage(LANG_COMMAND_TELE_NOLOCATION);
- else
- PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str().c_str());
-
- if (limitReached)
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
-
- return true;
-}
-
//Enable\Dissable accept whispers (for GM)
bool ChatHandler::HandleWhispersCommand(const char* args)
{
diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp
index b1e13b7d92d..49c40e09538 100755
--- a/src/server/game/Chat/Commands/Level2.cpp
+++ b/src/server/game/Chat/Commands/Level2.cpp
@@ -458,61 +458,6 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
return true;
}
-bool ChatHandler::HandleLookupEventCommand(const char* args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- // converting string that we try to find to lower case
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
- GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
-
- for (uint32 id = 0; id < events.size(); ++id)
- {
- GameEventData const& eventData = events[id];
-
- std::string descr = eventData.description;
- if (descr.empty())
- continue;
-
- if (Utf8FitTo(descr, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- char const* active = activeEvents.find(id) != activeEvents.end() ? GetTrinityString(LANG_ACTIVE) : "";
-
- if (m_session)
- PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description.c_str(), active);
- else
- PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description.c_str(), active);
-
- if (!found)
- found = true;
- }
- }
-
- if (!found)
- SendSysMessage(LANG_NOEVENTFOUND);
-
- return true;
-}
-
bool ChatHandler::HandleCombatStopCommand(const char* args)
{
Player* target = NULL;
@@ -541,128 +486,6 @@ bool ChatHandler::HandleCombatStopCommand(const char* args)
return true;
}
-bool ChatHandler::HandleLookupPlayerIpCommand(const char* args)
-{
- std::string ip;
- int32 limit;
- char* limit_str;
-
- Player *chr = getSelectedPlayer();
- if (!*args)
- {
- // NULL only if used from console
- if (!chr || chr == GetSession()->GetPlayer())
- return false;
-
- ip = chr->GetSession()->GetRemoteAddress();
- limit = -1;
- }
- else
- {
- ip = strtok ((char*)args, " ");
- limit_str = strtok (NULL, " ");
- limit = limit_str ? atoi (limit_str) : -1;
- }
-
- PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BY_IP);
- stmt->setString(0, ip);
- PreparedQueryResult result = LoginDatabase.Query(stmt);
-
- return LookupPlayerSearchCommand(result, limit);
-}
-
-bool ChatHandler::HandleLookupPlayerAccountCommand(const char* args)
-{
- if (!*args)
- return false;
-
- std::string account = strtok ((char*)args, " ");
- char* limit_str = strtok (NULL, " ");
- int32 limit = limit_str ? atoi (limit_str) : -1;
-
- if (!AccountMgr::normalizeString (account))
- return false;
-
- PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_NAME);
- stmt->setString(0, account);
- PreparedQueryResult result = LoginDatabase.Query(stmt);
-
- return LookupPlayerSearchCommand (result, limit);
-}
-
-bool ChatHandler::HandleLookupPlayerEmailCommand(const char* args)
-{
- if (!*args)
- return false;
-
- std::string email = strtok ((char*)args, " ");
- char* limit_str = strtok (NULL, " ");
- int32 limit = limit_str ? atoi (limit_str) : -1;
-
- PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL);
- stmt->setString(0, email);
- PreparedQueryResult result = LoginDatabase.Query(stmt);
-
- return LookupPlayerSearchCommand(result, limit);
-}
-
-bool ChatHandler::LookupPlayerSearchCommand(PreparedQueryResult result, int32 limit)
-{
- if (!result)
- {
- PSendSysMessage(LANG_NO_PLAYERS_FOUND);
- SetSentErrorMessage(true);
- return false;
- }
-
- int i = 0;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
- do
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- Field* fields = result->Fetch();
- uint32 acc_id = fields[0].GetUInt32();
- std::string acc_name = fields[1].GetString();
-
- PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_GUID_NAME_BY_ACC);
- stmt->setUInt32(0, acc_id);
- PreparedQueryResult result2 = CharacterDatabase.Query(stmt);
-
- if (result2)
- {
- PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, acc_name.c_str(), acc_id);
-
- uint64 guid = 0;
- std::string name;
-
- do
- {
- Field* charfields = result2->Fetch();
- guid = charfields[0].GetUInt64();
- name = charfields[1].GetString();
-
- PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid);
- ++i;
-
- } while (result2->NextRow() && (limit == -1 || i < limit));
- }
- } while (result->NextRow());
-
- if (i == 0) // empty accounts only
- {
- PSendSysMessage(LANG_NO_PLAYERS_FOUND);
- SetSentErrorMessage(true);
- return false;
- }
-
- return true;
-}
bool ChatHandler::HandleRepairitemsCommand(const char* args)
{
@@ -856,86 +679,3 @@ bool ChatHandler::HandlePetUnlearnCommand(const char *args)
return true;
}
-
-bool ChatHandler::HandleLookupTitleCommand(const char* args)
-{
- if (!*args)
- return false;
-
- // can be NULL in console call
- Player* target = getSelectedPlayer();
-
- // title name have single string arg for player name
- char const* targetName = target ? target->GetName() : "NAME";
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower(wnamepart);
-
- uint32 counter = 0; // Counter for figure out that we found smth.
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // Search in CharTitles.dbc
- for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++)
- {
- CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
- if (titleInfo)
- {
- int loc = GetSessionDbcLocale();
- std::string name = titleInfo->name;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = titleInfo->name[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && counter == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- char const* knownStr = target && target->HasTitle(titleInfo) ? GetTrinityString(LANG_KNOWN) : "";
-
- char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index
- ? GetTrinityString(LANG_ACTIVE)
- : "";
-
- char titleNameStr[80];
- snprintf(titleNameStr, 80, name.c_str(), targetName);
-
- // send title in "id (idx:idx) - [namedlink locale]" format
- if (m_session)
- PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, localeNames[loc], knownStr, activeStr);
- else
- PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, titleNameStr, localeNames[loc], knownStr, activeStr);
-
- ++counter;
- }
- }
- }
- if (counter == 0) // if counter == 0 then we found nth
- SendSysMessage(LANG_COMMAND_NOTITLEFOUND);
- return true;
-}
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index 0386b8786b6..7f02c7a1815 100755
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -385,1060 +385,6 @@ bool ChatHandler::HandleAddItemSetCommand(const char *args)
return true;
}
-bool ChatHandler::HandleLookupItemCommand(const char *args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- // converting string that we try to find to lower case
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // Search in `item_template`
- ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
- for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
- {
- int loc_idx = GetSessionDbLocaleIndex();
- if (loc_idx >= 0)
- {
- uint8 uloc_idx = uint8(loc_idx);
- if (ItemLocale const* il = sObjectMgr->GetItemLocale(itr->second.ItemId))
- {
- if (il->Name.size() > uloc_idx && !il->Name[uloc_idx].empty())
- {
- std::string name = il->Name[uloc_idx];
-
- if (Utf8FitTo(name, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- if (m_session)
- PSendSysMessage(LANG_ITEM_LIST_CHAT, itr->second.ItemId, itr->second.ItemId, name.c_str());
- else
- PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itr->second.ItemId, name.c_str());
-
- if (!found)
- found = true;
-
- continue;
- }
- }
- }
- }
-
- std::string name = itr->second.Name1;
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- if (m_session)
- PSendSysMessage(LANG_ITEM_LIST_CHAT, itr->second.ItemId, itr->second.ItemId, name.c_str());
- else
- PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itr->second.ItemId, name.c_str());
-
- if (!found)
- found = true;
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_NOITEMFOUND);
-
- return true;
-}
-
-bool ChatHandler::HandleLookupItemSetCommand(const char *args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // Search in ItemSet.dbc
- for (uint32 id = 0; id < sItemSetStore.GetNumRows(); id++)
- {
- ItemSetEntry const* set = sItemSetStore.LookupEntry(id);
- if (set)
- {
- int loc = GetSessionDbcLocale();
- std::string name = set->name;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = set->name[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- // send item set in "id - [namedlink locale]" format
- if (m_session)
- PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), localeNames[loc]);
- else
- PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), localeNames[loc]);
-
- if (!found)
- found = true;
- }
- }
- }
- if (!found)
- SendSysMessage(LANG_COMMAND_NOITEMSETFOUND);
- return true;
-}
-
-bool ChatHandler::HandleLookupSkillCommand(const char *args)
-{
- if (!*args)
- return false;
-
- // can be NULL in console call
- Player* target = getSelectedPlayer();
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // Search in SkillLine.dbc
- for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); id++)
- {
- SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
- if (skillInfo)
- {
- int loc = GetSessionDbcLocale();
- std::string name = skillInfo->name;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = skillInfo->name[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- char valStr[50] = "";
- char const* knownStr = "";
- if (target && target->HasSkill(id))
- {
- knownStr = GetTrinityString(LANG_KNOWN);
- uint32 curValue = target->GetPureSkillValue(id);
- uint32 maxValue = target->GetPureMaxSkillValue(id);
- uint32 permValue = target->GetSkillPermBonusValue(id);
- uint32 tempValue = target->GetSkillTempBonusValue(id);
-
- char const* valFormat = GetTrinityString(LANG_SKILL_VALUES);
- snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue);
- }
-
- // send skill in "id - [namedlink locale]" format
- if (m_session)
- PSendSysMessage(LANG_SKILL_LIST_CHAT, id, id, name.c_str(), localeNames[loc], knownStr, valStr);
- else
- PSendSysMessage(LANG_SKILL_LIST_CONSOLE, id, name.c_str(), localeNames[loc], knownStr, valStr);
-
- if (!found)
- found = true;
- }
- }
- }
- if (!found)
- SendSysMessage(LANG_COMMAND_NOSKILLFOUND);
- return true;
-}
-
-bool ChatHandler::HandleLookupSpellCommand(const char *args)
-{
- if (!*args)
- return false;
-
- // can be NULL at console call
- Player* target = getSelectedPlayer();
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // Search in Spell.dbc
- for (uint32 id = 0; id < sSpellMgr->GetSpellInfoStoreSize(); id++)
- {
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id);
- if (spellInfo)
- {
- int loc = GetSessionDbcLocale();
- std::string name = spellInfo->SpellName;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = spellInfo->SpellName[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- bool known = target && target->HasSpell(id);
- bool learn = (spellInfo->Effects[0].Effect == SPELL_EFFECT_LEARN_SPELL);
-
- SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellInfo->Effects[0].TriggerSpell);
-
- uint32 talentCost = GetTalentSpellCost(id);
-
- bool talent = (talentCost > 0);
- bool passive = spellInfo->IsPassive();
- bool active = target && target->HasAura(id);
-
- // unit32 used to prevent interpreting uint8 as char at output
- // find rank of learned spell for learning spell, or talent rank
- uint32 rank = talentCost ? talentCost : learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
-
- // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
- std::ostringstream ss;
- if (m_session)
- ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
- else
- ss << id << " - " << name;
-
- // include rank in link name
- if (rank)
- ss << GetTrinityString(LANG_SPELL_RANK) << rank;
-
- if (m_session)
- ss << ' ' << localeNames[loc] << "]|h|r";
- else
- ss << ' ' << localeNames[loc];
-
- if (talent)
- ss << GetTrinityString(LANG_TALENT);
- if (passive)
- ss << GetTrinityString(LANG_PASSIVE);
- if (learn)
- ss << GetTrinityString(LANG_LEARN);
- if (known)
- ss << GetTrinityString(LANG_KNOWN);
- if (active)
- ss << GetTrinityString(LANG_ACTIVE);
-
- SendSysMessage(ss.str().c_str());
-
- if (!found)
- found = true;
- }
- }
- }
- if (!found)
- SendSysMessage(LANG_COMMAND_NOSPELLFOUND);
- return true;
-}
-
-bool ChatHandler::HandleLookupQuestCommand(const char *args)
-{
- if (!*args)
- return false;
-
- // can be NULL at console call
- Player* target = getSelectedPlayer();
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- // converting string that we try to find to lower case
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- ObjectMgr::QuestMap const& qTemplates = sObjectMgr->GetQuestTemplates();
- for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
- {
- Quest * qinfo = iter->second;
-
- int loc_idx = GetSessionDbLocaleIndex();
- if (loc_idx >= 0)
- {
- uint8 uloc_idx = uint8(loc_idx);
- if (QuestLocale const* il = sObjectMgr->GetQuestLocale(qinfo->GetQuestId()))
- {
- if (il->Title.size() > uloc_idx && !il->Title[uloc_idx].empty())
- {
- std::string title = il->Title[uloc_idx];
-
- if (Utf8FitTo(title, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- char const* statusStr = "";
-
- if (target)
- {
- QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
-
- switch (status)
- {
- case QUEST_STATUS_COMPLETE:
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
- break;
- case QUEST_STATUS_INCOMPLETE:
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
- break;
- case QUEST_STATUS_REWARDED:
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
- break;
- default:
- break;
- }
- }
-
- if (m_session)
- PSendSysMessage(LANG_QUEST_LIST_CHAT, qinfo->GetQuestId(), qinfo->GetQuestId(), qinfo->GetQuestLevel(), title.c_str(), statusStr);
- else
- PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qinfo->GetQuestId(), title.c_str(), statusStr);
-
- if (!found)
- found = true;
-
- continue;
- }
- }
- }
- }
-
- std::string title = qinfo->GetTitle();
- if (title.empty())
- continue;
-
- if (Utf8FitTo(title, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- char const* statusStr = "";
-
- if (target)
- {
- QuestStatus status = target->GetQuestStatus(qinfo->GetQuestId());
-
- switch (status)
- {
- case QUEST_STATUS_COMPLETE:
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
- break;
- case QUEST_STATUS_INCOMPLETE:
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
- break;
- case QUEST_STATUS_REWARDED:
- statusStr = GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
- break;
- default:
- break;
- }
- }
-
- if (m_session)
- PSendSysMessage(LANG_QUEST_LIST_CHAT, qinfo->GetQuestId(), qinfo->GetQuestId(), qinfo->GetQuestLevel(), title.c_str(), statusStr);
- else
- PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qinfo->GetQuestId(), title.c_str(), statusStr);
-
- if (!found)
- found = true;
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_NOQUESTFOUND);
-
- return true;
-}
-
-bool ChatHandler::HandleLookupCreatureCommand(const char *args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- // converting string that we try to find to lower case
- if (!Utf8toWStr (namepart, wnamepart))
- return false;
-
- wstrToLower (wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
- for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
- {
- uint32 id = itr->second.Entry;
- uint8 localeIndex = GetSessionDbLocaleIndex();
- if (CreatureLocale const* cl = sObjectMgr->GetCreatureLocale(id))
- {
- if (cl->Name.size() > localeIndex && !cl->Name[localeIndex].empty())
- {
- std::string name = cl->Name[localeIndex];
-
- if (Utf8FitTo (name, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- if (m_session)
- PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
- else
- PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
-
- if (!found)
- found = true;
-
- continue;
- }
- }
- }
-
- std::string name = itr->second.Name;
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- if (m_session)
- PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
- else
- PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
-
- if (!found)
- found = true;
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_NOCREATUREFOUND);
-
- return true;
-}
-
-bool ChatHandler::HandleLookupObjectCommand(const char *args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- // converting string that we try to find to lower case
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- GameObjectTemplateContainer const* gotc = sObjectMgr->GetGameObjectTemplates();
- for (GameObjectTemplateContainer::const_iterator itr = gotc->begin(); itr != gotc->end(); ++itr)
- {
- uint8 localeIndex = GetSessionDbLocaleIndex();
- if (GameObjectLocale const* gl = sObjectMgr->GetGameObjectLocale(itr->second.entry))
- {
- if (gl->Name.size() > localeIndex && !gl->Name[localeIndex].empty())
- {
- std::string name = gl->Name[localeIndex];
-
- if (Utf8FitTo(name, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- if (m_session)
- PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, itr->second.entry, itr->second.entry, name.c_str());
- else
- PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, itr->second.entry, name.c_str());
-
- if (!found)
- found = true;
-
- continue;
- }
- }
- }
-
- std::string name = itr->second.name;
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- if (m_session)
- PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, itr->second.entry, itr->second.entry, name.c_str());
- else
- PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, itr->second.entry, name.c_str());
-
- if (!found)
- found = true;
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_NOGAMEOBJECTFOUND);
-
- return true;
-}
-
-bool ChatHandler::HandleLookupFactionCommand(const char *args)
-{
- if (!*args)
- return false;
-
- // Can be NULL at console call
- Player* target = getSelectedPlayer();
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr (namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower (wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id)
- {
- FactionEntry const* factionEntry = sFactionStore.LookupEntry (id);
- if (factionEntry)
- {
- FactionState const* repState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL;
-
- int loc = GetSessionDbcLocale();
- std::string name = factionEntry->name;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = factionEntry->name[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- // send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format
- // or "id - [faction] [no reputation]" format
- std::ostringstream ss;
- if (m_session)
- ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << ' ' << localeNames[loc] << "]|h|r";
- else
- ss << id << " - " << name << ' ' << localeNames[loc];
-
- if (repState) // and then target != NULL also
- {
- uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry);
- std::string rankName = GetTrinityString(index);
-
- ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')';
-
- if (repState->Flags & FACTION_FLAG_VISIBLE)
- ss << GetTrinityString(LANG_FACTION_VISIBLE);
- if (repState->Flags & FACTION_FLAG_AT_WAR)
- ss << GetTrinityString(LANG_FACTION_ATWAR);
- if (repState->Flags & FACTION_FLAG_PEACE_FORCED)
- ss << GetTrinityString(LANG_FACTION_PEACE_FORCED);
- if (repState->Flags & FACTION_FLAG_HIDDEN)
- ss << GetTrinityString(LANG_FACTION_HIDDEN);
- if (repState->Flags & FACTION_FLAG_INVISIBLE_FORCED)
- ss << GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
- if (repState->Flags & FACTION_FLAG_INACTIVE)
- ss << GetTrinityString(LANG_FACTION_INACTIVE);
- }
- else
- ss << GetTrinityString(LANG_FACTION_NOREPUTATION);
-
- SendSysMessage(ss.str().c_str());
-
- if (!found)
- found = true;
- }
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_FACTION_NOTFOUND);
- return true;
-}
-
-bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
-{
- if (!*args)
- return false;
-
- std::string namepart = args;
- std::wstring wnamepart;
-
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- // converting string that we try to find to lower case
- wstrToLower(wnamepart);
-
- bool found = false;
- uint32 count = 0;
- uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
-
- // Search in TaxiNodes.dbc
- for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); id++)
- {
- TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id);
- if (nodeEntry)
- {
- int loc = GetSessionDbcLocale();
- std::string name = nodeEntry->name;
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = 0;
- for (; loc < TOTAL_LOCALES; ++loc)
- {
- if (loc == GetSessionDbcLocale())
- continue;
-
- name = nodeEntry->name[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- if (maxResults && count++ == maxResults)
- {
- PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
- return true;
- }
-
- // send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format
- if (m_session)
- PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, id, id, name.c_str(), localeNames[loc],
- nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
- else
- PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, id, name.c_str(), localeNames[loc],
- nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
-
- if (!found)
- found = true;
- }
- }
- }
- if (!found)
- SendSysMessage(LANG_COMMAND_NOTAXINODEFOUND);
- return true;
-}
-
-bool ChatHandler::HandleLookupMapCommand(const char *args)
-{
- if (!*args)
- return false;
-
- /*std::string namepart = args;
- std::wstring wnamepart;
-
- // converting string that we try to find to lower case
- if (!Utf8toWStr(namepart, wnamepart))
- return false;
-
- wstrToLower(wnamepart);
-
- bool found = false;
-
- // search in Map.dbc
- for (uint32 id = 0; id < sMapStore.GetNumRows(); id++)
- {
- MapEntry const* MapInfo = sMapStore.LookupEntry(id);
- if (MapInfo)
- {
- uint8 loc = m_session ? m_session->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
-
- std::string name = MapInfo->name[loc];
- if (name.empty())
- continue;
-
- if (!Utf8FitTo(name, wnamepart))
- {
- loc = LOCALE_enUS;
- for (; loc < TOTAL_LOCALES; loc++)
- {
- if (m_session && loc == m_session->GetSessionDbcLocale())
- continue;
-
- name = MapInfo->name[loc];
- if (name.empty())
- continue;
-
- if (Utf8FitTo(name, wnamepart))
- break;
- }
- }
-
- if (loc < TOTAL_LOCALES)
- {
- // send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format
- std::ostringstream ss;
-
- if (m_session)
- ss << id << " - |cffffffff|Hmap:" << id << "|h[" << name << ']';
- else // console
- ss << id << " - [" << name << ']';
-
- if (MapInfo->IsContinent())
- ss << GetTrinityString(LANG_CONTINENT);
-
- switch (MapInfo->map_type)
- {
- case MAP_INSTANCE: ss << GetTrinityString(LANG_INSTANCE); break;
- case MAP_BATTLEGROUND: ss << GetTrinityString(LANG_BATTLEGROUND); break;
- case MAP_ARENA: ss << GetTrinityString(LANG_ARENA); break;
- }
-
- if (MapInfo->IsRaid())
- ss << GetTrinityString(LANG_RAID);
-
- if (MapInfo->SupportsHeroicMode())
- ss << GetTrinityString(LANG_HEROIC);
-
- uint32 ResetTimeRaid = MapInfo->resetTimeRaid;
-
- std::string ResetTimeRaidStr;
- if (ResetTimeRaid)
- ResetTimeRaidStr = secsToTimeString(ResetTimeRaid, true, false);
-
- uint32 ResetTimeHeroic = MapInfo->resetTimeHeroic;
- std::string ResetTimeHeroicStr;
- if (ResetTimeHeroic)
- ResetTimeHeroicStr = secsToTimeString(ResetTimeHeroic, true, false);
-
- if (MapInfo->IsMountAllowed())
- ss << GetTrinityString(LANG_MOUNTABLE);
-
- if (ResetTimeRaid && !ResetTimeHeroic)
- PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str());
- else if (!ResetTimeRaid && ResetTimeHeroic)
- PSendSysMessage(ss.str().c_str(), ResetTimeHeroicStr.c_str());
- else if (ResetTimeRaid && ResetTimeHeroic)
- PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str(), ResetTimeHeroicStr.c_str());
- else
- SendSysMessage(ss.str().c_str());
-
- if (!found)
- found = true;
- }
- }
- }
-
- if (!found)
- SendSysMessage(LANG_COMMAND_NOMAPFOUND);
- */
- return true;
-}
-
-/** \brief GM command level 3 - Create a guild.
- *
- * This command allows a GM (level 3) to create a guild.
- *
- * The "args" parameter contains the name of the guild leader
- * and then the name of the guild.
- *
- */
-bool ChatHandler::HandleGuildCreateCommand(const char *args)
-{
- if (!*args)
- return false;
-
- // if not guild name only (in "") then player name
- Player* target;
- if (!extractPlayerTarget(*args != '"' ? (char*)args : NULL, &target))
- return false;
-
- char* tailStr = *args != '"' ? strtok(NULL, "") : (char*)args;
- if (!tailStr)
- return false;
-
- char* guildStr = extractQuotedArg(tailStr);
- if (!guildStr)
- return false;
-
- std::string guildname = guildStr;
-
- if (target->GetGuildId())
- {
- SendSysMessage(LANG_PLAYER_IN_GUILD);
- return true;
- }
-
- Guild* guild = new Guild;
- if (!guild->Create(target, guildname))
- {
- delete guild;
- SendSysMessage(LANG_GUILD_NOT_CREATED);
- SetSentErrorMessage(true);
- return false;
- }
-
- sGuildMgr->AddGuild(guild);
- return true;
-}
-
-bool ChatHandler::HandleGuildInviteCommand(const char *args)
-{
- if (!*args)
- return false;
-
- // if not guild name only (in "") then player name
- uint64 target_guid;
- if (!extractPlayerTarget(*args != '"' ? (char*)args : NULL, NULL, &target_guid))
- return false;
-
- char* tailStr = *args != '"' ? strtok(NULL, "") : (char*)args;
- if (!tailStr)
- return false;
-
- char* guildStr = extractQuotedArg(tailStr);
- if (!guildStr)
- return false;
-
- std::string glName = guildStr;
- Guild* targetGuild = sGuildMgr->GetGuildByName(glName);
- if (!targetGuild)
- return false;
-
- // player's guild membership checked in AddMember before add
- return targetGuild->AddMember(target_guid);
-}
-
-bool ChatHandler::HandleGuildUninviteCommand(const char *args)
-{
- Player* target;
- uint64 target_guid;
- if (!extractPlayerTarget((char*)args, &target, &target_guid))
- return false;
-
- uint32 glId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(target_guid);
- if (!glId)
- return false;
-
- Guild* targetGuild = sGuildMgr->GetGuildById(glId);
- if (!targetGuild)
- return false;
-
- targetGuild->DeleteMember(target_guid, false, true);
- return true;
-}
-
-bool ChatHandler::HandleGuildRankCommand(const char *args)
-{
- char* nameStr;
- char* rankStr;
- extractOptFirstArg((char*)args, &nameStr, &rankStr);
- if (!rankStr)
- return false;
-
- Player* target;
- uint64 target_guid;
- std::string target_name;
- if (!extractPlayerTarget(nameStr, &target, &target_guid, &target_name))
- return false;
-
- uint32 glId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(target_guid);
- if (!glId)
- return false;
-
- Guild* targetGuild = sGuildMgr->GetGuildById(glId);
- if (!targetGuild)
- return false;
-
- uint32 newrank = uint32 (atoi (rankStr));
- return targetGuild->ChangeMemberRank(target_guid, newrank);
-}
-
-bool ChatHandler::HandleGuildDeleteCommand(const char *args)
-{
- if (!*args)
- return false;
-
- char* guildStr = extractQuotedArg((char*)args);
- if (!guildStr)
- return false;
-
- std::string gld = guildStr;
-
- Guild* targetGuild = sGuildMgr->GetGuildByName(gld);
- if (!targetGuild)
- return false;
-
- targetGuild->Disband();
-
- return true;
-}
-
bool ChatHandler::HandleGetDistanceCommand(const char *args)
{
WorldObject* obj = NULL;
diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h
index 0b7e361213a..49695659868 100755
--- a/src/server/game/Entities/Item/ItemPrototype.h
+++ b/src/server/game/Entities/Item/ItemPrototype.h
@@ -203,6 +203,7 @@ enum ItemFlagsCustom
{
ITEM_FLAGS_CU_DURATION_REAL_TIME = 0x0001, // Item duration will tick even if player is offline
ITEM_FLAGS_CU_IGNORE_QUEST_STATUS = 0x0002, // No quest status will be checked when this item drops
+ ITEM_FLAGS_CU_FOLLOW_LOOT_RULES = 0x0004, // Item will always follow group/master/need before greed looting rules
};
enum BAG_FAMILY_MASK
@@ -600,6 +601,9 @@ struct ItemTemplate
uint32 Quality;
uint32 Flags;
uint32 Flags2;
+ float Unk430_1;
+ float Unk430_2;
+ uint32 BuyCount;
int32 BuyPrice;
uint32 SellPrice;
uint32 InventoryType;
@@ -652,7 +656,6 @@ struct ItemTemplate
int32 Field131;
// extra fields, not part of db2 files
- uint32 BuyCount;
float DamageMin;
float DamageMax;
float DPS;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 0e36bdf21c1..e5df31734a4 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -16715,10 +16715,11 @@ void Player::_LoadEquipmentSets(PreparedQueryResult result)
uint8 index = fields[1].GetUInt8();
eqSet.Name = fields[2].GetString();
eqSet.IconName = fields[3].GetString();
+ eqSet.IgnoreMask = fields[4].GetUInt32();
eqSet.state = EQUIPMENT_SET_UNCHANGED;
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
- eqSet.Items[i] = fields[4+i].GetUInt32();
+ eqSet.Items[i] = fields[5+i].GetUInt32();
m_EquipmentSets[index] = eqSet;
@@ -17374,12 +17375,22 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// restore remembered power/health values (but not more max values)
uint32 savedHealth = fields[48].GetUInt32();
SetHealth(savedHealth > GetMaxHealth() ? GetMaxHealth() : savedHealth);
- for (uint8 i = 0; i < MAX_STORED_POWERS; ++i)
+ uint32 loadedPowers = 0;
+ for (uint32 i = 0; i < MAX_POWERS; ++i)
{
- uint32 savedPower = fields[49+i].GetUInt32();
- SetPower(Powers(i), savedPower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower);
+ if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
+ {
+ uint32 savedPower = fields[49+loadedPowers].GetUInt32();
+ uint32 maxPower = GetUInt32Value(UNIT_FIELD_MAXPOWER1 + loadedPowers);
+ SetPower(Powers(i), (savedPower > maxPower) ? maxPower : savedPower);
+ if (++loadedPowers >= MAX_STORED_POWERS)
+ break;
+ }
}
+ for (; loadedPowers < MAX_STORED_POWERS; ++loadedPowers)
+ SetUInt32Value(UNIT_FIELD_POWER1 + loadedPowers, 0);
+
// must be after loading spells and talents
Tokens talentTrees(fields[26].GetString(), ' ', MAX_TALENT_SPECS);
for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i)
@@ -18830,8 +18841,19 @@ void Player::SaveToDB(bool create /*=false*/)
stmt->setUInt16(index++, (uint16)(GetUInt32Value(PLAYER_BYTES_3) & 0xFFFE));
stmt->setUInt32(index++, GetHealth());
- for (uint32 i = 0; i < MAX_STORED_POWERS; ++i)
- stmt->setUInt32(index++, GetPower(Powers(i)));
+ uint32 storedPowers = 0;
+ for (uint32 i = 0; i < MAX_POWERS; ++i)
+ {
+ if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
+ {
+ stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
+ if (++storedPowers >= MAX_STORED_POWERS)
+ break;
+ }
+ }
+
+ for (; storedPowers < MAX_STORED_POWERS; ++storedPowers)
+ stmt->setUInt32(index++, 0);
stmt->setUInt32(index++, GetSession()->GetLatency());
@@ -18941,8 +18963,19 @@ void Player::SaveToDB(bool create /*=false*/)
stmt->setUInt16(index++, (uint16)(GetUInt32Value(PLAYER_BYTES_3) & 0xFFFE));
stmt->setUInt32(index++, GetHealth());
- for (uint32 i = 0; i < MAX_STORED_POWERS; ++i)
- stmt->setUInt32(index++, GetPower(Powers(i)));
+ uint32 storedPowers = 0;
+ for (uint32 i = 0; i < MAX_POWERS; ++i)
+ {
+ if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
+ {
+ stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
+ if (++storedPowers >= MAX_STORED_POWERS)
+ break;
+ }
+ }
+
+ for (; storedPowers < MAX_STORED_POWERS; ++storedPowers)
+ stmt->setUInt32(index++, 0);
stmt->setUInt32(index++, GetSession()->GetLatency());
@@ -24903,7 +24936,13 @@ void Player::SendEquipmentSetList()
data << itr->second.Name;
data << itr->second.IconName;
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
- data.appendPackGUID(MAKE_NEW_GUID(itr->second.Items[i], 0, HIGHGUID_ITEM));
+ {
+ // ignored slots stored in IgnoreMask, client wants "1" as raw GUID, so no HIGHGUID_ITEM
+ if (itr->second.IgnoreMask & (1 << i))
+ data.appendPackGUID(uint64(1));
+ else
+ data.appendPackGUID(MAKE_NEW_GUID(itr->second.Items[i], 0, HIGHGUID_ITEM));
+ }
++count; // client have limit but it checked at loading and set
}
@@ -24969,6 +25008,7 @@ void Player::_SaveEquipmentSets(SQLTransaction& trans)
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_EQUIP_SET);
stmt->setString(j++, eqset.Name.c_str());
stmt->setString(j++, eqset.IconName.c_str());
+ stmt->setUInt32(j++, eqset.IgnoreMask);
for (uint8 i=0; i<EQUIPMENT_SLOT_END; ++i)
stmt->setUInt32(j++, eqset.Items[i]);
stmt->setUInt32(j++, GetGUIDLow());
@@ -24985,6 +25025,7 @@ void Player::_SaveEquipmentSets(SQLTransaction& trans)
stmt->setUInt32(j++, index);
stmt->setString(j++, eqset.Name.c_str());
stmt->setString(j++, eqset.IconName.c_str());
+ stmt->setUInt32(j++, eqset.IgnoreMask);
for (uint8 i=0; i<EQUIPMENT_SLOT_END; ++i)
stmt->setUInt32(j++, eqset.Items[i]);
trans->Append(stmt);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 1f912902b0e..d6941406145 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -655,7 +655,7 @@ enum EquipmentSetUpdateState
struct EquipmentSet
{
- EquipmentSet() : Guid(0), state(EQUIPMENT_SET_NEW)
+ EquipmentSet() : Guid(0), IgnoreMask(0), state(EQUIPMENT_SET_NEW)
{
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
Items[i] = 0;
@@ -664,6 +664,7 @@ struct EquipmentSet
uint64 Guid;
std::string Name;
std::string IconName;
+ uint32 IgnoreMask;
uint32 Items[EQUIPMENT_SLOT_END];
EquipmentSetUpdateState state;
};
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 743431849ab..2435a403408 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -6432,7 +6432,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Effect 0 - mod damage while having Enrage
if (effIndex == 0)
{
- if (!(procSpell->SpellFamilyFlags[0] & 0x00080000))
+ if (!(procSpell->SpellFamilyFlags[0] & 0x00080000) || procSpell->SpellIconID != 916)
return false;
triggered_spell_id = 51185;
basepoints0 = triggerAmount;
@@ -6442,7 +6442,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Effect 1 - Tiger's Fury restore energy
else if (effIndex == 1)
{
- if (!(procSpell->SpellFamilyFlags[2] & 0x00000800))
+ if (!(procSpell->SpellFamilyFlags[2] & 0x00000800) || procSpell->SpellIconID != 1181)
return false;
triggered_spell_id = 51178;
basepoints0 = triggerAmount;
@@ -10691,7 +10691,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
for (AuraEffectList::const_iterator i = IgnoreResistAuras.begin(); i != IgnoreResistAuras.end(); ++i)
{
if ((*i)->GetMiscValue() & spellProto->GetSchoolMask())
- TakenTotalCasterMod += (float((*i)->GetAmount())/100);
+ TakenTotalCasterMod += (float((*i)->GetAmount()));
}
// from positive and negative SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@@ -11737,7 +11737,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
for (AuraEffectList::const_iterator i = IgnoreResistAuras.begin(); i != IgnoreResistAuras.end(); ++i)
{
if ((*i)->GetMiscValue() & attackSchoolMask)
- TakenTotalCasterMod += (float((*i)->GetAmount())/100);
+ TakenTotalCasterMod += (float((*i)->GetAmount()));
}
// ..taken
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 71ce341185e..44be40401fd 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2196,7 +2196,7 @@ uint32 FillMaxDurability(uint32 itemClass, uint32 itemSubClass, uint32 inventory
float levelPenalty = 1.0f;
if (itemLevel <= 28)
- levelPenalty = 0.966f - float(28u - itemLevel) * 1.0f / 54.0f;
+ levelPenalty = 0.966f - float(28u - itemLevel) / 54.0f;
if (itemClass == ITEM_CLASS_ARMOR)
{
@@ -2273,6 +2273,8 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.Quality = sparse->Quality;
itemTemplate.Flags = sparse->Flags;
itemTemplate.Flags2 = sparse->Flags2;
+ itemTemplate.Unk430_1 = sparse->Unk430_1;
+ itemTemplate.Unk430_2 = sparse->Unk430_2;
itemTemplate.BuyCount = std::max(sparse->BuyCount, 1u);
itemTemplate.BuyPrice = sparse->BuyPrice;
itemTemplate.SellPrice = sparse->SellPrice;
@@ -2333,7 +2335,7 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.RandomProperty = sparse->RandomProperty;
itemTemplate.RandomSuffix = sparse->RandomSuffix;
itemTemplate.ItemSet = sparse->ItemSet;
- itemTemplate.MaxDurability = FillMaxDurability(db2Data->Class, db2Data->SubClass, sparse->Quality, sparse->InventoryType, sparse->ItemLevel);
+ itemTemplate.MaxDurability = FillMaxDurability(db2Data->Class, db2Data->SubClass, sparse->InventoryType, sparse->Quality, sparse->ItemLevel);
itemTemplate.Area = sparse->Area;
itemTemplate.Map = sparse->Map;
itemTemplate.BagFamily = sparse->BagFamily;
@@ -2363,41 +2365,41 @@ void ObjectMgr::LoadItemTemplates()
}
// Load missing items from item_template AND overwrite data from Item-sparse.db2 (item_template is supposed to contain Item-sparse.adb data)
- // 0 1 2 3 4 5 6 7 8 9 10 11
- QueryResult result = WorldDatabase.Query("SELECT entry, Class, SubClass, Unk0, Name, DisplayId, Quality, Flags, FlagsExtra, BuyPrice, SellPrice, InventoryType, "
- // 12 13 14 15 16 17 18 19
- "AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredHonorRank, "
- // 20 21 22 23 24 25
- "RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, "
- // 26 27 28 29 30 31 32 33
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ QueryResult result = WorldDatabase.Query("SELECT entry, Class, SubClass, Unk0, Name, DisplayId, Quality, Flags, FlagsExtra, Unk430_1, Unk430_2, BuyCount, BuyPrice, SellPrice, "
+ // 14 15 16 17 18 19 20 21
+ "InventoryType, AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, "
+ // 22 23 24 25 26 27 28
+ "RequiredHonorRank, RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, "
+ // 29 30 31 32 33 34 35 36
"stat_type1, stat_value1, stat_unk1_1, stat_unk2_1, stat_type2, stat_value2, stat_unk1_2, stat_unk2_2, "
- // 34 35 36 37 38 39 40 41
+ // 37 38 39 40 41 42 43 44
"stat_type3, stat_value3, stat_unk1_3, stat_unk2_3, stat_type4, stat_value4, stat_unk1_4, stat_unk2_4, "
- // 42 43 44 45 46 47 48 49
+ // 45 46 47 48 49 50 51 52
"stat_type5, stat_value5, stat_unk1_5, stat_unk2_5, stat_type6, stat_value6, stat_unk1_6, stat_unk2_6, "
- // 50 51 52 53 54 55 56 57
+ // 53 54 55 56 57 58 59 60
"stat_type7, stat_value7, stat_unk1_7, stat_unk2_7, stat_type8, stat_value8, stat_unk1_8, stat_unk2_8, "
- // 58 59 60 61 62 63 64 65
+ // 61 62 63 64 65 66 67 68
"stat_type9, stat_value9, stat_unk1_9, stat_unk2_9, stat_type10, stat_value10, stat_unk1_10, stat_unk2_10, "
- // 66 67 68 69
+ // 69 70 71 72
"ScalingStatDistribution, DamageType, Delay, RangedModRange, "
- // 70 71 72 73 74 75
+ // 73 74 75 76 77 78
"spellid_1, spelltrigger_1, spellcharges_1, spellcooldown_1, spellcategory_1, spellcategorycooldown_1, "
- // 76 77 78 79 80 81
+ // 79 80 81 82 83 84
"spellid_2, spelltrigger_2, spellcharges_2, spellcooldown_2, spellcategory_2, spellcategorycooldown_2, "
- // 82 83 84 85 86 87
+ // 85 86 87 88 89 90
"spellid_3, spelltrigger_3, spellcharges_3, spellcooldown_3, spellcategory_3, spellcategorycooldown_3, "
- // 88 89 90 91 92 93
+ // 91 92 93 94 95 96
"spellid_4, spelltrigger_4, spellcharges_4, spellcooldown_4, spellcategory_4, spellcategorycooldown_4, "
- // 94 95 96 97 98 99
+ // 97 98 99 100 101 102
"spellid_5, spelltrigger_5, spellcharges_5, spellcooldown_5, spellcategory_5, spellcategorycooldown_5, "
- // 100 101 102 103 104 105 106 107
+ // 103 104 105 106 107 108 109 110
"Bonding, Description, PageText, LanguageID, PageMaterial, StartQuest, LockID, Material, "
- // 108 109 110 111 112 113 114 115 116
- "Sheath, RandomProperty, RandomSuffix, ItemSet, MaxDurability, Area, Map, BagFamily, TotemCategory, "
- // 117 118 119 120 121 122 123
+ // 111 112 113 114 115 116 117 118
+ "Sheath, RandomProperty, RandomSuffix, ItemSet, Area, Map, BagFamily, TotemCategory, "
+ // 119 120 121 122 123 124 125
"SocketColor_1, SocketContent_1, SocketColor_2, SocketContent_2, SocketColor_3, SocketContent_3, SocketBonus, "
- // 124 125 126 127 128 129 130 131
+ // 126 127 128 129 130 131 132 133
"GemProperties, ArmorDamageModifier, Duration, ItemLimitCategory, HolidayId, StatScalingFactor, Field130, Field131 "
"FROM item_template");
@@ -2421,93 +2423,96 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.Quality = uint32(fields[6].GetUInt8());
itemTemplate.Flags = uint32(fields[7].GetInt64());
itemTemplate.Flags2 = fields[8].GetUInt32();
- itemTemplate.BuyCount = 1;
- itemTemplate.BuyPrice = fields[9].GetInt64();
- itemTemplate.SellPrice = fields[10].GetUInt32();
- itemTemplate.InventoryType = fields[11].GetUInt32();
- itemTemplate.AllowableClass = fields[12].GetUInt32();
- itemTemplate.AllowableRace = fields[13].GetUInt32();
- itemTemplate.ItemLevel = fields[14].GetUInt32();
- itemTemplate.RequiredLevel = fields[15].GetUInt32();
- itemTemplate.RequiredSkill = fields[16].GetUInt32();
- itemTemplate.RequiredSkillRank = fields[17].GetUInt32();
- itemTemplate.RequiredSpell = fields[18].GetUInt32();
- itemTemplate.RequiredHonorRank = fields[19].GetUInt32();
- itemTemplate.RequiredCityRank = fields[20].GetUInt32();
- itemTemplate.RequiredReputationFaction = fields[21].GetUInt32();
- itemTemplate.RequiredReputationRank = fields[22].GetUInt32();
- itemTemplate.MaxCount = fields[23].GetInt32();
- itemTemplate.Stackable = fields[24].GetInt32();
- itemTemplate.ContainerSlots = fields[25].GetUInt32();
+ itemTemplate.Unk430_1 = fields[9].GetFloat();
+ itemTemplate.Unk430_2 = fields[10].GetFloat();
+ itemTemplate.BuyCount = uint32(fields[11].GetUInt8());
+ itemTemplate.BuyPrice = int32(fields[12].GetInt64());
+ itemTemplate.SellPrice = fields[13].GetUInt32();
+
+ itemTemplate.InventoryType = uint32(fields[14].GetUInt8());
+ itemTemplate.AllowableClass = fields[15].GetInt32();
+ itemTemplate.AllowableRace = fields[16].GetInt32();
+ itemTemplate.ItemLevel = uint32(fields[17].GetUInt16());
+ itemTemplate.RequiredLevel = uint32(fields[18].GetUInt8());
+ itemTemplate.RequiredSkill = uint32(fields[19].GetUInt16());
+ itemTemplate.RequiredSkillRank = uint32(fields[20].GetUInt16());
+ itemTemplate.RequiredSpell = fields[21].GetUInt32();
+ itemTemplate.RequiredHonorRank = fields[22].GetUInt32();
+ itemTemplate.RequiredCityRank = fields[23].GetUInt32();
+ itemTemplate.RequiredReputationFaction = uint32(fields[24].GetUInt16());
+ itemTemplate.RequiredReputationRank = uint32(fields[25].GetUInt16());
+ itemTemplate.MaxCount = fields[26].GetInt32();
+ itemTemplate.Stackable = fields[27].GetInt32();
+ itemTemplate.ContainerSlots = uint32(fields[28].GetUInt8());
for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i)
{
- itemTemplate.ItemStat[i].ItemStatType = fields[26 + i * 4].GetUInt8();
- itemTemplate.ItemStat[i].ItemStatValue = fields[26 + i * 4 + 1].GetInt16();
- itemTemplate.ItemStat[i].ItemStatUnk1 = fields[26 + i * 4 + 2].GetInt32();
- itemTemplate.ItemStat[i].ItemStatUnk2 = fields[26 + i * 4 + 3].GetInt32();
+ itemTemplate.ItemStat[i].ItemStatType = uint32(fields[28 + i * 4 + 0].GetUInt8());
+ itemTemplate.ItemStat[i].ItemStatValue = int32(fields[28 + i * 4 + 1].GetInt16());
+ itemTemplate.ItemStat[i].ItemStatUnk1 = fields[28 + i * 4 + 2].GetInt32();
+ itemTemplate.ItemStat[i].ItemStatUnk2 = fields[28 + i * 4 + 3].GetInt32();
}
- itemTemplate.ScalingStatDistribution = fields[66].GetUInt32();
+ itemTemplate.ScalingStatDistribution = uint32(fields[69].GetUInt16());
// cache item damage
FillItemDamageFields(&itemTemplate.DamageMin, &itemTemplate.DamageMax, &itemTemplate.DPS, itemTemplate.ItemLevel,
- itemTemplate.Class, itemTemplate.SubClass, itemTemplate.Quality, fields[68].GetUInt32(),
- fields[129].GetFloat(), itemTemplate.InventoryType, itemTemplate.Flags2);
+ itemTemplate.Class, itemTemplate.SubClass, itemTemplate.Quality, fields[71].GetUInt32(),
+ fields[131].GetFloat(), itemTemplate.InventoryType, itemTemplate.Flags2);
- itemTemplate.DamageType = fields[67].GetUInt32();
+ itemTemplate.DamageType = fields[70].GetUInt32();
itemTemplate.Armor = FillItemArmor(itemTemplate.ItemLevel, itemTemplate.Class,
itemTemplate.SubClass, itemTemplate.Quality,
itemTemplate.InventoryType);
- itemTemplate.Delay = fields[68].GetUInt32();
- itemTemplate.RangedModRange = fields[69].GetFloat();
+ itemTemplate.Delay = fields[71].GetUInt32();
+ itemTemplate.RangedModRange = fields[72].GetFloat();
for (uint32 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
- itemTemplate.Spells[i].SpellId = fields[70 + 6 * i].GetInt32();
- itemTemplate.Spells[i].SpellTrigger = fields[70 + 6 * i + 1].GetUInt32();
- itemTemplate.Spells[i].SpellCharges = fields[70 + 6 * i + 2].GetInt32();
- itemTemplate.Spells[i].SpellCooldown = fields[70 + 6 * i + 3].GetInt32();
- itemTemplate.Spells[i].SpellCategory = fields[70 + 6 * i + 4].GetUInt32();
- itemTemplate.Spells[i].SpellCategoryCooldown = fields[70 + 6 * i + 5].GetInt32();
+ itemTemplate.Spells[i].SpellId = fields[73 + 6 * i + 0].GetInt32();
+ itemTemplate.Spells[i].SpellTrigger = uint32(fields[73 + 6 * i + 1].GetUInt8());
+ itemTemplate.Spells[i].SpellCharges = int32(fields[73 + 6 * i + 2].GetInt16());
+ itemTemplate.Spells[i].SpellCooldown = fields[73 + 6 * i + 3].GetInt32();
+ itemTemplate.Spells[i].SpellCategory = uint32(fields[73 + 6 * i + 4].GetUInt16());
+ itemTemplate.Spells[i].SpellCategoryCooldown = fields[73 + 6 * i + 5].GetInt32();
}
itemTemplate.SpellPPMRate = 0.0f;
- itemTemplate.Bonding = fields[100].GetUInt32();
- itemTemplate.Description = fields[101].GetString();
- itemTemplate.PageText = fields[102].GetUInt32();
- itemTemplate.LanguageID = fields[103].GetUInt32();
- itemTemplate.PageMaterial = fields[104].GetUInt32();
- itemTemplate.StartQuest = fields[105].GetUInt32();
- itemTemplate.LockID = fields[106].GetUInt32();
- itemTemplate.Material = fields[107].GetInt32();
- itemTemplate.Sheath = fields[108].GetUInt32();
- itemTemplate.RandomProperty = fields[109].GetInt32();
- itemTemplate.RandomSuffix = fields[110].GetInt32();
- itemTemplate.ItemSet = fields[111].GetUInt32();
+ itemTemplate.Bonding = uint32(fields[103].GetUInt8());
+ itemTemplate.Description = fields[104].GetString();
+ itemTemplate.PageText = fields[105].GetUInt32();
+ itemTemplate.LanguageID = uint32(fields[106].GetUInt8());
+ itemTemplate.PageMaterial = uint32(fields[107].GetUInt8());
+ itemTemplate.StartQuest = fields[108].GetUInt32();
+ itemTemplate.LockID = fields[109].GetUInt32();
+ itemTemplate.Material = int32(fields[110].GetInt8());
+ itemTemplate.Sheath = uint32(fields[111].GetUInt8());
+ itemTemplate.RandomProperty = fields[112].GetUInt32();
+ itemTemplate.RandomSuffix = fields[113].GetInt32();
+ itemTemplate.ItemSet = fields[114].GetUInt32();
itemTemplate.MaxDurability = FillMaxDurability(itemTemplate.Class, itemTemplate.SubClass,
- itemTemplate.Quality, itemTemplate.InventoryType, itemTemplate.ItemLevel);
+ itemTemplate.InventoryType, itemTemplate.Quality, itemTemplate.ItemLevel);
- itemTemplate.Area = fields[113].GetUInt32();
- itemTemplate.Map = fields[114].GetUInt32();
- itemTemplate.BagFamily = fields[115].GetUInt32();
- itemTemplate.TotemCategory = fields[116].GetUInt32();
+ itemTemplate.Area = fields[115].GetUInt32();
+ itemTemplate.Map = uint32(fields[116].GetUInt16());
+ itemTemplate.BagFamily = fields[117].GetUInt32();
+ itemTemplate.TotemCategory = fields[118].GetUInt32();
for (uint32 i = 0; i < MAX_ITEM_PROTO_SOCKETS; ++i)
{
- itemTemplate.Socket[i].Color = fields[117 + i * 2].GetUInt32();
- itemTemplate.Socket[i].Content = fields[117 + i * 2 + 1].GetUInt32();
+ itemTemplate.Socket[i].Color = uint32(fields[119 + i*2].GetUInt8());
+ itemTemplate.Socket[i].Content = fields[119 + i * 2 + 1].GetUInt32();
}
- itemTemplate.socketBonus = fields[123].GetUInt32();
- itemTemplate.GemProperties = fields[124].GetUInt32();
+ itemTemplate.socketBonus = fields[125].GetUInt32();
+ itemTemplate.GemProperties = fields[126].GetUInt32();
FillDisenchantFields(&itemTemplate.DisenchantID, &itemTemplate.RequiredDisenchantSkill, itemTemplate);
- itemTemplate.ArmorDamageModifier = fields[125].GetFloat();
- itemTemplate.Duration = fields[126].GetUInt32();
- itemTemplate.ItemLimitCategory = fields[127].GetUInt32();
- itemTemplate.HolidayId = fields[128].GetUInt32();
- itemTemplate.StatScalingFactor = fields[129].GetFloat();
- itemTemplate.Field130 = fields[130].GetInt32();
- itemTemplate.Field131 = fields[131].GetInt32();
+ itemTemplate.ArmorDamageModifier = fields[127].GetFloat();
+ itemTemplate.Duration = fields[128].GetUInt32();
+ itemTemplate.ItemLimitCategory = uint32(fields[129].GetInt16());
+ itemTemplate.HolidayId = fields[130].GetUInt32();
+ itemTemplate.StatScalingFactor = fields[131].GetFloat();
+ itemTemplate.Field130 = fields[132].GetInt32();
+ itemTemplate.Field131 = fields[133].GetInt32();
itemTemplate.ScriptId = 0;
itemTemplate.FoodType = 0;
itemTemplate.MinMoneyLoot = 0;
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index da363fbbb15..1060500bda1 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -981,6 +981,64 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
else
i->is_underthreshold = true;
}
+
+ for (i = loot->quest_items.begin(); i != loot->quest_items.end(); ++i, ++itemSlot)
+ {
+ if (!i->follow_loot_rules)
+ continue;
+
+ item = sObjectMgr->GetItemTemplate(i->itemid);
+ if (!item)
+ {
+ //sLog->outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
+ continue;
+ }
+
+ uint64 newitemGUID = MAKE_NEW_GUID(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), 0, HIGHGUID_ITEM);
+ Roll* r = new Roll(newitemGUID, *i);
+
+ //a vector is filled with only near party members
+ for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ {
+ Player* member = itr->getSource();
+ if (!member || !member->GetSession())
+ continue;
+
+ if (i->AllowedForPlayer(member))
+ {
+ if (member->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
+ {
+ r->totalPlayersRolling++;
+ r->playerVote[member->GetGUID()] = NOT_EMITED_YET;
+ }
+ }
+ }
+
+ if (r->totalPlayersRolling > 0)
+ {
+ r->setLoot(loot);
+ r->itemSlot = itemSlot;
+
+ loot->quest_items[itemSlot - loot->items.size()].is_blocked = true;
+
+ SendLootStartRoll(60000, pLootedObject->GetMapId(), *r);
+
+ RollId.push_back(r);
+
+ if (Creature* creature = pLootedObject->ToCreature())
+ {
+ creature->m_groupLootTimer = 60000;
+ creature->lootingGroupLowGUID = GetLowGUID();
+ }
+ else if (GameObject* go = pLootedObject->ToGameObject())
+ {
+ go->m_groupLootTimer = 60000;
+ go->lootingGroupLowGUID = GetLowGUID();
+ }
+ }
+ else
+ delete r;
+ }
}
void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
@@ -1065,6 +1123,66 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
else
i->is_underthreshold = true;
}
+
+ for (std::vector<LootItem>::iterator i = loot->quest_items.begin(); i != loot->quest_items.end(); ++i, ++itemSlot)
+ {
+ if (!i->follow_loot_rules)
+ continue;
+
+ item = sObjectMgr->GetItemTemplate(i->itemid);
+ uint64 newitemGUID = MAKE_NEW_GUID(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), 0, HIGHGUID_ITEM);
+ Roll* r = new Roll(newitemGUID, *i);
+
+ for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ {
+ Player* playerToRoll = itr->getSource();
+ if (!playerToRoll || !playerToRoll->GetSession())
+ continue;
+
+ bool allowedForPlayer = i->AllowedForPlayer(playerToRoll);
+ if (allowedForPlayer && playerToRoll->IsWithinDistInMap(lootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
+ {
+ r->totalPlayersRolling++;
+ r->playerVote[playerToRoll->GetGUID()] = NOT_EMITED_YET;
+ }
+ }
+
+ if (r->totalPlayersRolling > 0)
+ {
+ r->setLoot(loot);
+ r->itemSlot = itemSlot;
+
+ loot->quest_items[itemSlot - loot->items.size()].is_blocked = true;
+
+ //Broadcast Pass and Send Rollstart
+ for (Roll::PlayerVote::const_iterator itr = r->playerVote.begin(); itr != r->playerVote.end(); ++itr)
+ {
+ Player* p = ObjectAccessor::FindPlayer(itr->first);
+ if (!p || !p->GetSession())
+ continue;
+
+ if (itr->second == PASS)
+ SendLootRoll(newitemGUID, p->GetGUID(), 128, ROLL_PASS, *r);
+ else
+ SendLootStartRollToPlayer(60000, lootedObject->GetMapId(), p, p->CanRollForItemInLFG(item, lootedObject) == EQUIP_ERR_OK, *r);
+ }
+
+ RollId.push_back(r);
+
+ if (Creature* creature = lootedObject->ToCreature())
+ {
+ creature->m_groupLootTimer = 60000;
+ creature->lootingGroupLowGUID = GetLowGUID();
+ }
+ else if (GameObject* go = lootedObject->ToGameObject())
+ {
+ go->m_groupLootTimer = 60000;
+ go->lootingGroupLowGUID = GetLowGUID();
+ }
+ }
+ else
+ delete r;
+ }
}
void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
@@ -1197,7 +1315,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT, roll->itemid, maxresul);
ItemPosCountVec dest;
- LootItem* item = &(roll->getLoot()->items[roll->itemSlot]);
+ LootItem* item = &(roll->itemSlot >= roll->getLoot()->items.size() ? roll->getLoot()->quest_items[roll->itemSlot - roll->getLoot()->items.size()] : roll->getLoot()->items[roll->itemSlot]);
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, roll->itemid, item->count);
if (msg == EQUIP_ERR_OK)
{
@@ -1246,7 +1364,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
{
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT, roll->itemid, maxresul);
- LootItem* item = &(roll->getLoot()->items[roll->itemSlot]);
+ LootItem* item = &(roll->itemSlot >= roll->getLoot()->items.size() ? roll->getLoot()->quest_items[roll->itemSlot - roll->getLoot()->items.size()] : roll->getLoot()->items[roll->itemSlot]);
if (rollvote == GREED)
{
@@ -1283,7 +1401,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
SendLootAllPassed(*roll);
// remove is_blocked so that the item is lootable by all players
- LootItem* item = &(roll->getLoot()->items[roll->itemSlot]);
+ LootItem* item = &(roll->itemSlot >= roll->getLoot()->items.size() ? roll->getLoot()->quest_items[roll->itemSlot - roll->getLoot()->items.size()] : roll->getLoot()->items[roll->itemSlot]);
if (item)
item->is_blocked = false;
}
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index f1e33aa708b..7fc1660bc7d 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1584,6 +1584,14 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
uint64 itemGuid;
recv_data.readPackGUID(itemGuid);
+ // equipment manager sends "1" (as raw GUID) for slots set to "ignore" (don't touch slot at equip set)
+ if (itemGuid == 1)
+ {
+ // ignored slots saved as bit mask because we have no free special values for Items[i]
+ eqSet.IgnoreMask |= 1 << i;
+ continue;
+ }
+
Item* item = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
if (!item && itemGuid) // cheating check 1
@@ -1625,6 +1633,10 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
+ // check if item slot is set to "ignored" (raw value == 1), must not be unequipped then
+ if (itemGuid == 1)
+ continue;
+
Item* item = _player->GetItemByGuid(itemGuid);
uint16 dstpos = i | (INVENTORY_SLOT_BAG_0 << 8);
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 88d2d6afc53..8128cf72e4a 100755
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -332,8 +332,8 @@ void WorldSession::SendItemSparseDb2Reply(uint32 entry)
buff << uint32(proto->Quality);
buff << uint32(proto->Flags);
buff << uint32(proto->Flags2);
- buff << float(1.0f);
- buff << float(1.0f);
+ buff << float(proto->Unk430_1);
+ buff << float(proto->Unk430_2);
buff << uint32(proto->BuyCount);
buff << int32(proto->BuyPrice);
buff << uint32(proto->SellPrice);
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index 53e589e31fd..73c8457eb66 100755
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -472,16 +472,18 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
if (!loot)
return;
- if (slotid > loot->items.size())
+ if (slotid >= loot->items.size() + loot->quest_items.size())
{
sLog->outDebug(LOG_FILTER_LOOT, "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)", GetPlayer()->GetName(), slotid, (unsigned long)loot->items.size());
return;
}
- LootItem& item = loot->items[slotid];
+ LootItem& item = slotid >= loot->items.size() ? loot->quest_items[slotid - loot->items.size()] : loot->items[slotid];
ItemPosCountVec dest;
InventoryResult msg = target->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item.itemid, item.count);
+ if (item.follow_loot_rules && !item.AllowedForPlayer(target))
+ msg = EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM;
if (msg != EQUIP_ERR_OK)
{
target->SendEquipError(msg, NULL, NULL, item.itemid);
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 24338d5f0ad..62ce976f1a8 100755
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -322,6 +322,7 @@ LootItem::LootItem(LootStoreItem const& li)
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid);
freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT);
+ follow_loot_rules = proto && (proto->FlagsCu & ITEM_FLAGS_CU_FOLLOW_LOOT_RULES);
needs_quest = li.needs_quest;
@@ -358,12 +359,7 @@ bool LootItem::AllowedForPlayer(Player const* player) const
// check quest requirements
if (!(pProto->FlagsCu & ITEM_FLAGS_CU_IGNORE_QUEST_STATUS) && ((needs_quest || (pProto->StartQuest && player->GetQuestStatus(pProto->StartQuest) != QUEST_STATUS_NONE)) && !player->HasQuestForItem(itemid)))
- if (Group const* group = player->GetGroup())
- {
- if (pProto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT || ((pProto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT) == 0 && (group->GetLootMethod() != MASTER_LOOT || group->GetLooterGuid() != player->GetGUID())))
- return false;
- }
- else return false;
+ return false;
return true;
}
@@ -517,18 +513,19 @@ QuestItemList* Loot::FillQuestLoot(Player* player)
for (uint8 i = 0; i < quest_items.size(); ++i)
{
LootItem &item = quest_items[i];
- if (!item.is_looted && item.AllowedForPlayer(player))
+
+ if (!item.is_looted && (item.AllowedForPlayer(player) || (item.follow_loot_rules && player->GetGroup() && ((player->GetGroup()->GetLootMethod() == MASTER_LOOT && player->GetGroup()->GetLooterGuid() == player->GetGUID()) || player->GetGroup()->GetLootMethod() != MASTER_LOOT ))))
{
ql->push_back(QuestItem(i));
- // questitems get blocked when they first appear in a
+ // quest items get blocked when they first appear in a
// player's quest vector
//
// increase once if one looter only, looter-times if free for all
if (item.freeforall || !item.is_blocked)
++unlootedCount;
-
- item.is_blocked = true;
+ if (!player->GetGroup() || (player->GetGroup()->GetLootMethod() != GROUP_LOOT || player->GetGroup()->GetLootMethod() != ROUND_ROBIN))
+ item.is_blocked = true;
if (items.size() + ql->size() == MAX_NR_LOOT_ITEMS)
break;
@@ -551,7 +548,7 @@ QuestItemList* Loot::FillNonQuestNonFFAConditionalLoot(Player* player, bool pres
for (uint8 i = 0; i < items.size(); ++i)
{
LootItem &item = items[i];
- if (!item.is_looted && !item.freeforall && item.AllowedForPlayer(player))
+ if (!item.is_looted && !item.freeforall && (item.AllowedForPlayer(player) || (item.follow_loot_rules && player->GetGroup() && ((player->GetGroup()->GetLootMethod() == MASTER_LOOT && player->GetGroup()->GetLooterGuid() == player->GetGUID()) || player->GetGroup()->GetLootMethod() != MASTER_LOOT ))))
{
if (presentAtLooting)
item.AddAllowedLooter(player);
@@ -895,7 +892,6 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv)
}
LootSlotType slotType = lv.permission == OWNER_PERMISSION ? LOOT_SLOT_TYPE_OWNER : LOOT_SLOT_TYPE_ALLOW_LOOT;
- LootSlotType partySlotType = lv.permission == MASTER_PERMISSION ? LOOT_SLOT_TYPE_MASTER : (lv.permission == GROUP_PERMISSION ? LOOT_SLOT_TYPE_ROLL_ONGOING : slotType);
QuestItemMap const& lootPlayerQuestItems = l.GetPlayerQuestItems();
QuestItemMap::const_iterator q_itr = lootPlayerQuestItems.find(lv.viewer->GetGUIDLow());
if (q_itr != lootPlayerQuestItems.end())
@@ -908,8 +904,25 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv)
{
b << uint8(l.items.size() + (qi - q_list->begin()));
b << item;
- if (!item.freeforall)
- b << uint8(partySlotType);
+ if (item.follow_loot_rules)
+ {
+ switch (lv.permission)
+ {
+ case MASTER_PERMISSION:
+ b << uint8(LOOT_SLOT_TYPE_MASTER);
+ break;
+ case GROUP_PERMISSION:
+ case ROUND_ROBIN_PERMISSION:
+ if (!item.is_blocked)
+ b << uint8(LOOT_SLOT_TYPE_ALLOW_LOOT);
+ else
+ b << uint8(LOOT_SLOT_TYPE_ROLL_ONGOING);
+ break;
+ default:
+ b << uint8(slotType);
+ break;
+ }
+ }
else
b << uint8(slotType);
++itemsShown;
@@ -929,10 +942,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv)
{
b << uint8(fi->index);
b << item;
- if (!item.freeforall)
- b << uint8(partySlotType);
- else
- b << uint8(slotType);
+ b << uint8(slotType);
++itemsShown;
}
}
@@ -950,8 +960,25 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv)
{
b << uint8(ci->index);
b << item;
- if (!item.freeforall)
- b << uint8(partySlotType);
+ if (item.follow_loot_rules)
+ {
+ switch (lv.permission)
+ {
+ case MASTER_PERMISSION:
+ b << uint8(LOOT_SLOT_TYPE_MASTER);
+ break;
+ case GROUP_PERMISSION:
+ case ROUND_ROBIN_PERMISSION:
+ if (!item.is_blocked)
+ b << uint8(LOOT_SLOT_TYPE_ALLOW_LOOT);
+ else
+ b << uint8(LOOT_SLOT_TYPE_ROLL_ONGOING);
+ break;
+ default:
+ b << uint8(slotType);
+ break;
+ }
+ }
else
b << uint8(slotType);
++itemsShown;
@@ -1574,9 +1601,9 @@ void LoadLootTemplates_Item()
LootTemplates_Item.ReportUnusedIds(lootIdSet);
if (count)
- sLog->outString(">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString(">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- sLog->outErrorDb(">> Loaded 0 prospecting loot templates. DB table `item_loot_template` is empty");
+ sLog->outErrorDb(">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
sLog->outString();
}
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index 4a6becc7eff..1af5bd1ea62 100755
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -140,6 +140,7 @@ struct LootItem
bool is_underthreshold : 1;
bool is_counted : 1;
bool needs_quest : 1; // quest drop
+ bool follow_loot_rules : 1;
// Constructor, copies most fields from LootStoreItem, generates random count and random suffixes/properties
// Should be called for non-reference LootStoreItem entries only (mincountOrRef > 0)
@@ -280,6 +281,7 @@ struct Loot
QuestItemMap const& GetPlayerNonQuestNonFFAConditionalItems() const { return PlayerNonQuestNonFFAConditionalItems; }
std::vector<LootItem> items;
+ std::vector<LootItem> quest_items;
uint32 gold;
uint8 unlootedCount;
uint64 roundRobinPlayer; // GUID of the player having the Round-Robin ownership for the loot. If 0, round robin owner has released.
@@ -344,7 +346,6 @@ struct Loot
QuestItemList* FillQuestLoot(Player* player);
QuestItemList* FillNonQuestNonFFAConditionalLoot(Player* player, bool presentAtLooting);
- std::vector<LootItem> quest_items;
std::set<uint64> PlayersLooting;
QuestItemMap PlayerQuestItems;
QuestItemMap PlayerFFAItems;
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 58b9c55cdd1..2b99de9d0a2 100755
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -52,10 +52,12 @@ void AddSC_event_commandscript();
void AddSC_gm_commandscript();
void AddSC_go_commandscript();
void AddSC_gobject_commandscript();
+void AddSC_guild_commandscript();
void AddSC_honor_commandscript();
void AddSC_instance_commandscript();
void AddSC_learn_commandscript();
void AddSC_list_commandscript();
+void AddSC_lookup_commandscript();
void AddSC_misc_commandscript();
void AddSC_modify_commandscript();
void AddSC_npc_commandscript();
@@ -660,9 +662,11 @@ void AddCommandScripts()
AddSC_gm_commandscript();
AddSC_go_commandscript();
AddSC_gobject_commandscript();
+ AddSC_guild_commandscript();
AddSC_honor_commandscript();
AddSC_instance_commandscript();
AddSC_learn_commandscript();
+ AddSC_lookup_commandscript();
AddSC_list_commandscript();
AddSC_misc_commandscript();
AddSC_modify_commandscript();
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 9746cac2bbf..4ca9738cfcb 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -673,7 +673,10 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
uint8 cp = caster->ToPlayer()->GetComboPoints();
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
- if (AuraEffect const* aurEff = caster->GetAuraEffect(34241, 0))
+ if (AuraEffect const* aurEff = caster->GetAuraEffect(34241, EFFECT_0))
+ amount += cp * aurEff->GetAmount();
+ // Idol of Worship. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
+ else if (AuraEffect const* aurEff = caster->GetAuraEffect(60774, EFFECT_0))
amount += cp * aurEff->GetAmount();
amount += uint32(CalculatePctU(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp
index abd7ff8f87d..0677758439f 100644
--- a/src/server/game/Warden/WardenCheckMgr.cpp
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -151,6 +151,14 @@ void WardenCheckMgr::LoadWardenChecks()
void WardenCheckMgr::LoadWardenOverrides()
{
+ // Check if Warden is enabled by config before loading anything
+ if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
+ {
+ sLog->outString(">> Warden disabled, loading check overrides skipped.");
+ sLog->outString();
+ return;
+ }
+
// 0 1
QueryResult result = CharacterDatabase.Query("SELECT wardenId, action FROM warden_action");
diff --git a/src/server/scripts/Commands/CMakeLists.txt b/src/server/scripts/Commands/CMakeLists.txt
index c27b51a1ca2..2d408e76cd6 100644
--- a/src/server/scripts/Commands/CMakeLists.txt
+++ b/src/server/scripts/Commands/CMakeLists.txt
@@ -19,10 +19,12 @@ set(scripts_STAT_SRCS
Commands/cs_gm.cpp
Commands/cs_go.cpp
Commands/cs_gobject.cpp
+ Commands/cs_guild.cpp
Commands/cs_honor.cpp
Commands/cs_instance.cpp
Commands/cs_learn.cpp
Commands/cs_list.cpp
+ Commands/cs_lookup.cpp
Commands/cs_misc.cpp
Commands/cs_modify.cpp
Commands/cs_npc.cpp
@@ -33,9 +35,7 @@ set(scripts_STAT_SRCS
Commands/cs_server.cpp
Commands/cs_titles.cpp
Commands/cs_wp.cpp
-# Commands/cs_lookup.cpp
# Commands/cs_pdump.cpp
-# Commands/cs_guild.cpp
# Commands/cs_channel.cpp
# Commands/cs_pet.cpp
# Commands/cs_ticket.cpp
diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp
new file mode 100644
index 00000000000..65e3daaaebc
--- /dev/null
+++ b/src/server/scripts/Commands/cs_guild.cpp
@@ -0,0 +1,199 @@
+/*
+ * 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/>.
+ */
+
+/* ScriptData
+Name: guild_commandscript
+%Complete: 100
+Comment: All guild related commands
+Category: commandscripts
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "Chat.h"
+#include "Guild.h"
+#include "GuildMgr.h"
+#include "ObjectAccessor.h"
+
+class guild_commandscript : public CommandScript
+{
+public:
+ guild_commandscript() : CommandScript("guild_commandscript") { }
+
+ ChatCommand* GetCommands() const
+ {
+ static ChatCommand guildCommandTable[] =
+ {
+ { "create", SEC_GAMEMASTER, true, &HandleGuildCreateCommand, "", NULL },
+ { "delete", SEC_GAMEMASTER, true, &HandleGuildDeleteCommand, "", NULL },
+ { "invite", SEC_GAMEMASTER, true, &HandleGuildInviteCommand, "", NULL },
+ { "uninvite", SEC_GAMEMASTER, true, &HandleGuildUninviteCommand, "", NULL },
+ { "rank", SEC_GAMEMASTER, true, &HandleGuildRankCommand, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
+ };
+ static ChatCommand commandTable[] =
+ {
+ { "guild", SEC_ADMINISTRATOR, true, NULL, "", guildCommandTable },
+ { NULL, 0, false, NULL, "", NULL }
+ };
+ return commandTable;
+ }
+
+ /** \brief GM command level 3 - Create a guild.
+ *
+ * This command allows a GM (level 3) to create a guild.
+ *
+ * The "args" parameter contains the name of the guild leader
+ * and then the name of the guild.
+ *
+ */
+ static bool HandleGuildCreateCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // if not guild name only (in "") then player name
+ Player* target;
+ if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : NULL, &target))
+ return false;
+
+ char* tailStr = *args != '"' ? strtok(NULL, "") : (char*)args;
+ if (!tailStr)
+ return false;
+
+ char* guildStr = handler->extractQuotedArg(tailStr);
+ if (!guildStr)
+ return false;
+
+ std::string guildName = guildStr;
+
+ if (target->GetGuildId())
+ {
+ handler->SendSysMessage(LANG_PLAYER_IN_GUILD);
+ return true;
+ }
+
+ Guild* guild = new Guild;
+ if (!guild->Create(target, guildName))
+ {
+ delete guild;
+ handler->SendSysMessage(LANG_GUILD_NOT_CREATED);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ sGuildMgr->AddGuild(guild);
+
+ return true;
+ }
+
+ static bool HandleGuildDeleteCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ char* guildStr = handler->extractQuotedArg((char*)args);
+ if (!guildStr)
+ return false;
+
+ std::string guildName = guildStr;
+
+ Guild* targetGuild = sGuildMgr->GetGuildByName(guildName);
+ if (!targetGuild)
+ return false;
+
+ targetGuild->Disband();
+
+ return true;
+ }
+
+ static bool HandleGuildInviteCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // if not guild name only (in "") then player name
+ uint64 targetGuid;
+ if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : NULL, NULL, &targetGuid))
+ return false;
+
+ char* tailStr = *args != '"' ? strtok(NULL, "") : (char*)args;
+ if (!tailStr)
+ return false;
+
+ char* guildStr = handler->extractQuotedArg(tailStr);
+ if (!guildStr)
+ return false;
+
+ std::string guildName = guildStr;
+ Guild* targetGuild = sGuildMgr->GetGuildByName(guildName);
+ if (!targetGuild)
+ return false;
+
+ // player's guild membership checked in AddMember before add
+ return targetGuild->AddMember(targetGuid);
+ }
+
+ static bool HandleGuildUninviteCommand(ChatHandler* handler, char const* args)
+ {
+ Player* target;
+ uint64 targetGuid;
+ if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid))
+ return false;
+
+ uint32 guildId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(targetGuid);
+ if (!guildId)
+ return false;
+
+ Guild* targetGuild = sGuildMgr->GetGuildById(guildId);
+ if (!targetGuild)
+ return false;
+
+ targetGuild->DeleteMember(targetGuid, false, true);
+ return true;
+ }
+
+ static bool HandleGuildRankCommand(ChatHandler* handler, char const* args)
+ {
+ char* nameStr;
+ char* rankStr;
+ handler->extractOptFirstArg((char*)args, &nameStr, &rankStr);
+ if (!rankStr)
+ return false;
+
+ Player* target;
+ uint64 targetGuid;
+ std::string target_name;
+ if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &target_name))
+ return false;
+
+ uint32 guildId = target ? target->GetGuildId() : Player::GetGuildIdFromDB(targetGuid);
+ if (!guildId)
+ return false;
+
+ Guild* targetGuild = sGuildMgr->GetGuildById(guildId);
+ if (!targetGuild)
+ return false;
+
+ uint8 newRank = uint8(atoi(rankStr));
+ return targetGuild->ChangeMemberRank(targetGuid, newRank);
+ }
+};
+
+void AddSC_guild_commandscript()
+{
+ new guild_commandscript();
+}
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 8dd7f8e2cde..5a0fd28e81a 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -80,7 +80,7 @@ public:
char* countStr = strtok(NULL, " ");
uint32 count = countStr ? atol(countStr) : 10;
- if (count < 0)
+ if (count == 0)
return false;
QueryResult result;
@@ -152,7 +152,7 @@ public:
char* countStr = strtok(NULL, " ");
uint32 count = countStr ? atol(countStr) : 10;
- if (count < 0)
+ if (count == 0)
return false;
PreparedQueryResult result;
@@ -369,7 +369,7 @@ public:
char* countStr = strtok(NULL, " ");
uint32 count = countStr ? atol(countStr) : 10;
- if (count < 0)
+ if (count == 0)
return false;
QueryResult result;
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp
new file mode 100644
index 00000000000..6d42f9b7d21
--- /dev/null
+++ b/src/server/scripts/Commands/cs_lookup.cpp
@@ -0,0 +1,1263 @@
+/*
+ * 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/>.
+ */
+
+/* ScriptData
+Name: lookup_commandscript
+%Complete: 100
+Comment: All lookup related commands
+Category: commandscripts
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "Chat.h"
+#include "AccountMgr.h"
+#include "GameEventMgr.h"
+#include "ObjectAccessor.h"
+#include "ObjectMgr.h"
+
+class lookup_commandscript : public CommandScript
+{
+public:
+ lookup_commandscript() : CommandScript("lookup_commandscript") { }
+
+ ChatCommand* GetCommands() const
+ {
+ static ChatCommand lookupPlayerCommandTable[] =
+ {
+ { "ip", SEC_GAMEMASTER, true, &HandleLookupPlayerIpCommand, "", NULL },
+ { "account", SEC_GAMEMASTER, true, &HandleLookupPlayerAccountCommand, "", NULL },
+ { "email", SEC_GAMEMASTER, true, &HandleLookupPlayerEmailCommand, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
+ };
+ static ChatCommand lookupCommandTable[] =
+ {
+ { "area", SEC_MODERATOR, true, &HandleLookupAreaCommand, "", NULL },
+ { "creature", SEC_ADMINISTRATOR, true, &HandleLookupCreatureCommand, "", NULL },
+ { "event", SEC_GAMEMASTER, true, &HandleLookupEventCommand, "", NULL },
+ { "faction", SEC_ADMINISTRATOR, true, &HandleLookupFactionCommand, "", NULL },
+ { "item", SEC_ADMINISTRATOR, true, &HandleLookupItemCommand, "", NULL },
+ { "itemset", SEC_ADMINISTRATOR, true, &HandleLookupItemSetCommand, "", NULL },
+ { "object", SEC_ADMINISTRATOR, true, &HandleLookupObjectCommand, "", NULL },
+ { "quest", SEC_ADMINISTRATOR, true, &HandleLookupQuestCommand, "", NULL },
+ { "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
+ { "skill", SEC_ADMINISTRATOR, true, &HandleLookupSkillCommand, "", NULL },
+ { "spell", SEC_ADMINISTRATOR, true, &HandleLookupSpellCommand, "", NULL },
+ { "taxinode", SEC_ADMINISTRATOR, true, &HandleLookupTaxiNodeCommand, "", NULL },
+ { "tele", SEC_MODERATOR, true, &HandleLookupTeleCommand, "", NULL },
+ { "title", SEC_GAMEMASTER, true, &HandleLookupTitleCommand, "", NULL },
+ { "map", SEC_ADMINISTRATOR, true, &HandleLookupMapCommand, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
+ };
+ static ChatCommand commandTable[] =
+ {
+ { "lookup", SEC_ADMINISTRATOR, true, NULL, "", lookupCommandTable },
+ { NULL, 0, false, NULL, "", NULL }
+ };
+ return commandTable;
+ }
+
+ static bool HandleLookupAreaCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ // Search in AreaTable.dbc
+ for (uint32 areaflag = 0; areaflag < sAreaStore.GetNumRows(); ++areaflag)
+ {
+ AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(areaflag);
+ if (areaEntry)
+ {
+ std::string name = areaEntry->area_name;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ // send area in "id - [name]" format
+ std::ostringstream ss;
+ if (handler->GetSession())
+ ss << areaEntry->ID << " - |cffffffff|Harea:" << areaEntry->ID << "|h[" << name<< "]|h|r";
+ else
+ ss << areaEntry->ID << " - " << name;
+
+ handler->SendSysMessage(ss.str().c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOAREAFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupCreatureCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ // converting string that we try to find to lower case
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
+ for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
+ {
+ uint32 id = itr->second.Entry;
+ uint8 localeIndex = handler->GetSessionDbLocaleIndex();
+ if (CreatureLocale const* creatureLocale = sObjectMgr->GetCreatureLocale(id))
+ {
+ if (creatureLocale->Name.size() > localeIndex && !creatureLocale->Name[localeIndex].empty())
+ {
+ std::string name = creatureLocale->Name[localeIndex];
+
+ if (Utf8FitTo(name, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
+ else
+ handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
+
+ if (!found)
+ found = true;
+
+ continue;
+ }
+ }
+ }
+
+ std::string name = itr->second.Name;
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
+ else
+ handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOCREATUREFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupEventCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ // converting string that we try to find to lower case
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
+ GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
+
+ for (uint32 id = 0; id < events.size(); ++id)
+ {
+ GameEventData const& eventData = events[id];
+
+ std::string descr = eventData.description;
+ if (descr.empty())
+ continue;
+
+ if (Utf8FitTo(descr, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ char const* active = activeEvents.find(id) != activeEvents.end() ? handler->GetTrinityString(LANG_ACTIVE) : "";
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description.c_str(), active);
+ else
+ handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description.c_str(), active);
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_NOEVENTFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupFactionCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // Can be NULL at console call
+ Player* target = handler->getSelectedPlayer();
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower (wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id)
+ {
+ if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(id))
+ {
+ FactionState const* factionState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL;
+
+ std::string name = factionEntry->name;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ // send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format
+ // or "id - [faction] [no reputation]" format
+ std::ostringstream ss;
+ if (handler->GetSession())
+ ss << id << " - |cffffffff|Hfaction:" << id << "|h[" << name << "]|h|r";
+ else
+ ss << id << " - " << name;
+
+ if (factionState) // and then target != NULL also
+ {
+ uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry);
+ std::string rankName = handler->GetTrinityString(index);
+
+ ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')';
+
+ if (factionState->Flags & FACTION_FLAG_VISIBLE)
+ ss << handler->GetTrinityString(LANG_FACTION_VISIBLE);
+ if (factionState->Flags & FACTION_FLAG_AT_WAR)
+ ss << handler->GetTrinityString(LANG_FACTION_ATWAR);
+ if (factionState->Flags & FACTION_FLAG_PEACE_FORCED)
+ ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED);
+ if (factionState->Flags & FACTION_FLAG_HIDDEN)
+ ss << handler->GetTrinityString(LANG_FACTION_HIDDEN);
+ if (factionState->Flags & FACTION_FLAG_INVISIBLE_FORCED)
+ ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
+ if (factionState->Flags & FACTION_FLAG_INACTIVE)
+ ss << handler->GetTrinityString(LANG_FACTION_INACTIVE);
+ }
+ else
+ ss << handler->GetTrinityString(LANG_FACTION_NOREPUTATION);
+
+ handler->SendSysMessage(ss.str().c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_FACTION_NOTFOUND);
+ return true;
+ }
+
+ static bool HandleLookupItemCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ // converting string that we try to find to lower case
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // Search in `item_template`
+ ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
+ for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
+ {
+ int localeIndex = handler->GetSessionDbLocaleIndex();
+ if (localeIndex >= 0)
+ {
+ uint8 ulocaleIndex = uint8(localeIndex);
+ if (ItemLocale const* il = sObjectMgr->GetItemLocale(itr->second.ItemId))
+ {
+ if (il->Name.size() > ulocaleIndex && !il->Name[ulocaleIndex].empty())
+ {
+ std::string name = il->Name[ulocaleIndex];
+
+ if (Utf8FitTo(name, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itr->second.ItemId, itr->second.ItemId, name.c_str());
+ else
+ handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itr->second.ItemId, name.c_str());
+
+ if (!found)
+ found = true;
+
+ continue;
+ }
+ }
+ }
+ }
+
+ std::string name = itr->second.Name1;
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itr->second.ItemId, itr->second.ItemId, name.c_str());
+ else
+ handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itr->second.ItemId, name.c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOITEMFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupItemSetCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // Search in ItemSet.dbc
+ for (uint32 id = 0; id < sItemSetStore.GetNumRows(); id++)
+ {
+ ItemSetEntry const* set = sItemSetStore.LookupEntry(id);
+ if (set)
+ {
+ std::string name = set->name;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ // send item set in "id - [namedlink locale]" format
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), "");
+ else
+ handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), "");
+
+ if (!found)
+ found = true;
+ }
+ }
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOITEMSETFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupObjectCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ // converting string that we try to find to lower case
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ GameObjectTemplateContainer const* gotc = sObjectMgr->GetGameObjectTemplates();
+ for (GameObjectTemplateContainer::const_iterator itr = gotc->begin(); itr != gotc->end(); ++itr)
+ {
+ uint8 localeIndex = handler->GetSessionDbLocaleIndex();
+ if (GameObjectLocale const* objectLocalte = sObjectMgr->GetGameObjectLocale(itr->second.entry))
+ {
+ if (objectLocalte->Name.size() > localeIndex && !objectLocalte->Name[localeIndex].empty())
+ {
+ std::string name = objectLocalte->Name[localeIndex];
+
+ if (Utf8FitTo(name, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, itr->second.entry, itr->second.entry, name.c_str());
+ else
+ handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, itr->second.entry, name.c_str());
+
+ if (!found)
+ found = true;
+
+ continue;
+ }
+ }
+ }
+
+ std::string name = itr->second.name;
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, itr->second.entry, itr->second.entry, name.c_str());
+ else
+ handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, itr->second.entry, name.c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOGAMEOBJECTFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupQuestCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // can be NULL at console call
+ Player* target = handler->getSelectedPlayer();
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ // converting string that we try to find to lower case
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ ObjectMgr::QuestMap const& qTemplates = sObjectMgr->GetQuestTemplates();
+ for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
+ {
+ Quest* qInfo = iter->second;
+
+ int localeIndex = handler->GetSessionDbLocaleIndex();
+ if (localeIndex >= 0)
+ {
+ uint8 ulocaleIndex = uint8(localeIndex);
+ if (QuestLocale const* questLocale = sObjectMgr->GetQuestLocale(qInfo->GetQuestId()))
+ {
+ if (questLocale->Title.size() > ulocaleIndex && !questLocale->Title[ulocaleIndex].empty())
+ {
+ std::string title = questLocale->Title[ulocaleIndex];
+
+ if (Utf8FitTo(title, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ char const* statusStr = "";
+
+ if (target)
+ {
+ QuestStatus status = target->GetQuestStatus(qInfo->GetQuestId());
+
+ switch (status)
+ {
+ case QUEST_STATUS_COMPLETE:
+ statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
+ break;
+ case QUEST_STATUS_INCOMPLETE:
+ statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
+ break;
+ case QUEST_STATUS_REWARDED:
+ statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
+ else
+ handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
+
+ if (!found)
+ found = true;
+
+ continue;
+ }
+ }
+ }
+ }
+
+ std::string title = qInfo->GetTitle();
+ if (title.empty())
+ continue;
+
+ if (Utf8FitTo(title, wNamePart))
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ char const* statusStr = "";
+
+ if (target)
+ {
+ QuestStatus status = target->GetQuestStatus(qInfo->GetQuestId());
+
+ switch (status)
+ {
+ case QUEST_STATUS_COMPLETE:
+ statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
+ break;
+ case QUEST_STATUS_INCOMPLETE:
+ statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
+ break;
+ case QUEST_STATUS_REWARDED:
+ statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
+ else
+ handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
+
+ if (!found)
+ found = true;
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOQUESTFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupSkillCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // can be NULL in console call
+ Player* target = handler->getSelectedPlayer();
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // Search in SkillLine.dbc
+ for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); id++)
+ {
+ SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
+ if (skillInfo)
+ {
+ std::string name = skillInfo->name;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ char valStr[50] = "";
+ char const* knownStr = "";
+ if (target && target->HasSkill(id))
+ {
+ knownStr = handler->GetTrinityString(LANG_KNOWN);
+ uint32 curValue = target->GetPureSkillValue(id);
+ uint32 maxValue = target->GetPureMaxSkillValue(id);
+ uint32 permValue = target->GetSkillPermBonusValue(id);
+ uint32 tempValue = target->GetSkillTempBonusValue(id);
+
+ char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES);
+ snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue);
+ }
+
+ // send skill in "id - [namedlink locale]" format
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, id, id, name.c_str(), "", knownStr, valStr);
+ else
+ handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, id, name.c_str(), "", knownStr, valStr);
+
+ if (!found)
+ found = true;
+ }
+ }
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOSKILLFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupSpellCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // can be NULL at console call
+ Player* target = handler->getSelectedPlayer();
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // Search in Spell.dbc
+ for (uint32 id = 0; id < sSpellMgr->GetSpellInfoStoreSize(); id++)
+ {
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id);
+ if (spellInfo)
+ {
+ std::string name = spellInfo->SpellName;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ bool known = target && target->HasSpell(id);
+ bool learn = (spellInfo->Effects[0].Effect == SPELL_EFFECT_LEARN_SPELL);
+
+ SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellInfo->Effects[0].TriggerSpell);
+
+ uint32 talentCost = GetTalentSpellCost(id);
+
+ bool talent = (talentCost > 0);
+ bool passive = spellInfo->IsPassive();
+ bool active = target && target->HasAura(id);
+
+ // unit32 used to prevent interpreting uint8 as char at output
+ // find rank of learned spell for learning spell, or talent rank
+ uint32 rank = talentCost ? talentCost : learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank();
+
+ // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
+ std::ostringstream ss;
+ if (handler->GetSession())
+ ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name;
+ else
+ ss << id << " - " << name;
+
+ // include rank in link name
+ if (rank)
+ ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
+
+ if (handler->GetSession())
+ ss << "]|h|r";
+
+ if (talent)
+ ss << handler->GetTrinityString(LANG_TALENT);
+ if (passive)
+ ss << handler->GetTrinityString(LANG_PASSIVE);
+ if (learn)
+ ss << handler->GetTrinityString(LANG_LEARN);
+ if (known)
+ ss << handler->GetTrinityString(LANG_KNOWN);
+ if (active)
+ ss << handler->GetTrinityString(LANG_ACTIVE);
+
+ handler->SendSysMessage(ss.str().c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupTaxiNodeCommand(ChatHandler* handler, const char * args)
+ {
+ if (!*args)
+ return false;
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ bool found = false;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // Search in TaxiNodes.dbc
+ for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); id++)
+ {
+ TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id);
+ if (nodeEntry)
+ {
+ std::string name = nodeEntry->name;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ // send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, id, id, name.c_str(), "",
+ nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
+ else
+ handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, id, name.c_str(), "",
+ nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
+
+ if (!found)
+ found = true;
+ }
+ }
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOTAXINODEFOUND);
+
+ return true;
+ }
+
+ // Find tele in game_tele order by name
+ static bool HandleLookupTeleCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ {
+ handler->SendSysMessage(LANG_COMMAND_TELE_PARAMETER);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ char const* str = strtok((char*)args, " ");
+ if (!str)
+ return false;
+
+ std::string namePart = str;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ std::ostringstream reply;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+ bool limitReached = false;
+
+ GameTeleContainer const & teleMap = sObjectMgr->GetGameTeleMap();
+ for (GameTeleContainer::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
+ {
+ GameTele const* tele = &itr->second;
+
+ if (tele->wnameLow.find(wNamePart) == std::wstring::npos)
+ continue;
+
+ if (maxResults && count++ == maxResults)
+ {
+ limitReached = true;
+ break;
+ }
+
+ if (handler->GetSession())
+ reply << " |cffffffff|Htele:" << itr->first << "|h[" << tele->name << "]|h|r\n";
+ else
+ reply << " " << itr->first << ' ' << tele->name << "\n";
+ }
+
+ if (reply.str().empty())
+ handler->SendSysMessage(LANG_COMMAND_TELE_NOLOCATION);
+ else
+ handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str().c_str());
+
+ if (limitReached)
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+
+ return true;
+ }
+
+ static bool HandleLookupTitleCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ // can be NULL in console call
+ Player* target = handler->getSelectedPlayer();
+
+ // title name have single string arg for player name
+ char const* targetName = target ? target->GetName() : "NAME";
+
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wNamePart);
+
+ uint32 counter = 0; // Counter for figure out that we found smth.
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ // Search in CharTitles.dbc
+ for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++)
+ {
+ CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
+ if (titleInfo)
+ {
+ std::string name = titleInfo->name;
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ continue;
+
+ if (maxResults && counter == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : "";
+
+ char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index
+ ? handler->GetTrinityString(LANG_ACTIVE)
+ : "";
+
+ char titleNameStr[80];
+ snprintf(titleNameStr, 80, name.c_str(), targetName);
+
+ // send title in "id (idx:idx) - [namedlink locale]" format
+ if (handler->GetSession())
+ handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, "", knownStr, activeStr);
+ else
+ handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, titleNameStr, "", knownStr, activeStr);
+
+ ++counter;
+ }
+ }
+ if (counter == 0) // if counter == 0 then we found nth
+ handler->SendSysMessage(LANG_COMMAND_NOTITLEFOUND);
+
+ return true;
+ }
+
+ static bool HandleLookupMapCommand(ChatHandler* /*handler*/, char const* args)
+ {
+ if (!*args)
+ return false;
+ /*
+ std::string namePart = args;
+ std::wstring wNamePart;
+
+ // converting string that we try to find to lower case
+ if (!Utf8toWStr(namePart, wNamePart))
+ return false;
+
+ wstrToLower(wNamePart);
+
+ bool found = false;
+
+ // search in Map.dbc
+ for (uint32 id = 0; id < sMapStore.GetNumRows(); id++)
+ {
+ MapEntry const* MapInfo = sMapStore.LookupEntry(id);
+ if (MapInfo)
+ {
+ uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
+
+ std::string name = MapInfo->name[locale];
+ if (name.empty())
+ continue;
+
+ if (!Utf8FitTo(name, wNamePart))
+ {
+ locale = LOCALE_enUS;
+ for (; locale < TOTAL_LOCALES; locale++)
+ {
+ if (handler->GetSession() && locale == handler->GetSession()->GetSessionDbcLocale())
+ continue;
+
+ name = MapInfo->name[locale];
+ if (name.empty())
+ continue;
+
+ if (Utf8FitTo(name, wNamePart))
+ break;
+ }
+ }
+
+ if (locale < TOTAL_LOCALES)
+ {
+ // send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format
+ std::ostringstream ss;
+
+ if (handler->GetSession())
+ ss << id << " - |cffffffff|Hmap:" << id << "|h[" << name << ']';
+ else // console
+ ss << id << " - [" << name << ']';
+
+ if (MapInfo->IsContinent())
+ ss << handler->GetTrinityString(LANG_CONTINENT);
+
+ switch (MapInfo->map_type)
+ {
+ case MAP_INSTANCE: ss << handler->GetTrinityString(LANG_INSTANCE); break;
+ case MAP_BATTLEGROUND: ss << handler->GetTrinityString(LANG_BATTLEGROUND); break;
+ case MAP_ARENA: ss << handler->GetTrinityString(LANG_ARENA); break;
+ }
+
+ if (MapInfo->IsRaid())
+ ss << handler->GetTrinityString(LANG_RAID);
+
+ if (MapInfo->SupportsHeroicMode())
+ ss << handler->GetTrinityString(LANG_HEROIC);
+
+ uint32 ResetTimeRaid = MapInfo->resetTimeRaid;
+
+ std::string ResetTimeRaidStr;
+ if (ResetTimeRaid)
+ ResetTimeRaidStr = secsToTimeString(ResetTimeRaid, true, false);
+
+ uint32 ResetTimeHeroic = MapInfo->resetTimeHeroic;
+ std::string ResetTimeHeroicStr;
+ if (ResetTimeHeroic)
+ ResetTimeHeroicStr = secsToTimeString(ResetTimeHeroic, true, false);
+
+ if (MapInfo->IsMountAllowed())
+ ss << handler->GetTrinityString(LANG_MOUNTABLE);
+
+ if (ResetTimeRaid && !ResetTimeHeroic)
+ handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str());
+ else if (!ResetTimeRaid && ResetTimeHeroic)
+ handler->PSendSysMessage(ss.str().c_str(), ResetTimeHeroicStr.c_str());
+ else if (ResetTimeRaid && ResetTimeHeroic)
+ handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str(), ResetTimeHeroicStr.c_str());
+ else
+ handler->SendSysMessage(ss.str().c_str());
+
+ if (!found)
+ found = true;
+ }
+ }
+ }
+
+ if (!found)
+ handler->SendSysMessage(LANG_COMMAND_NOMAPFOUND);
+ */
+ return true;
+ }
+
+ static bool HandleLookupPlayerIpCommand(ChatHandler* handler, char const* args)
+ {
+ std::string ip;
+ int32 limit;
+ char* limitStr;
+
+ Player* target = handler->getSelectedPlayer();
+ if (!*args)
+ {
+ // NULL only if used from console
+ if (!target || target == handler->GetSession()->GetPlayer())
+ return false;
+
+ ip = target->GetSession()->GetRemoteAddress();
+ limit = -1;
+ }
+ else
+ {
+ ip = strtok((char*)args, " ");
+ limitStr = strtok(NULL, " ");
+ limit = limitStr ? atoi(limitStr) : -1;
+ }
+
+ PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BY_IP);
+ stmt->setString(0, ip);
+ PreparedQueryResult result = LoginDatabase.Query(stmt);
+
+ return LookupPlayerSearchCommand(result, limit, handler);
+ }
+
+ static bool HandleLookupPlayerAccountCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string account = strtok((char*)args, " ");
+ char* limitStr = strtok(NULL, " ");
+ int32 limit = limitStr ? atoi(limitStr) : -1;
+
+ if (!AccountMgr::normalizeString
+ (account))
+ return false;
+
+ PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_NAME);
+ stmt->setString(0, account);
+ PreparedQueryResult result = LoginDatabase.Query(stmt);
+
+ return LookupPlayerSearchCommand(result, limit, handler);
+ }
+
+ static bool HandleLookupPlayerEmailCommand(ChatHandler* handler, char const* args)
+ {
+ if (!*args)
+ return false;
+
+ std::string email = strtok((char*)args, " ");
+ char* limitStr = strtok(NULL, " ");
+ int32 limit = limitStr ? atoi(limitStr) : -1;
+
+ PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL);
+ stmt->setString(0, email);
+ PreparedQueryResult result = LoginDatabase.Query(stmt);
+
+ return LookupPlayerSearchCommand(result, limit, handler);
+ }
+
+ static bool LookupPlayerSearchCommand(PreparedQueryResult result, int32 limit, ChatHandler* handler)
+ {
+ if (!result)
+ {
+ handler->PSendSysMessage(LANG_NO_PLAYERS_FOUND);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ int32 counter = 0;
+ uint32 count = 0;
+ uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
+
+ do
+ {
+ if (maxResults && count++ == maxResults)
+ {
+ handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
+ return true;
+ }
+
+ Field* fields = result->Fetch();
+ uint32 accountId = fields[0].GetUInt32();
+ std::string accountName = fields[1].GetString();
+
+ PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_GUID_NAME_BY_ACC);
+ stmt->setUInt32(0, accountId);
+ PreparedQueryResult result2 = CharacterDatabase.Query(stmt);
+
+ if (result2)
+ {
+ handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName.c_str(), accountId);
+
+ do
+ {
+ Field* characterFields = result2->Fetch();
+ uint64 guid = characterFields[0].GetUInt64();
+ std::string name = characterFields[1].GetString();
+
+ handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid);
+ ++counter;
+ }
+ while (result2->NextRow() && (limit == -1 || counter < limit));
+ }
+ }
+ while (result->NextRow());
+
+ if (counter == 0) // empty accounts only
+ {
+ handler->PSendSysMessage(LANG_NO_PLAYERS_FOUND);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
+ return true;
+ }
+};
+
+void AddSC_lookup_commandscript()
+{
+ new lookup_commandscript();
+}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 2bba875ad1f..d8be6ffc0ca 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -79,6 +79,12 @@ public:
void Reset()
{
+ ResetTimer = 0;
+ }
+
+ void EnterEvadeMode()
+ {
+ ScriptedAI::EnterEvadeMode();
ResetTimer = 2000;
}
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 d091a87dbfe..367240cd2df 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -1296,7 +1296,7 @@ class npc_dark_nucleus : public CreatureScript
void Reset()
{
- me->SetReactState(REACT_PASSIVE);
+ me->SetReactState(REACT_DEFENSIVE);
me->CastSpell(me, SPELL_SHADOW_RESONANCE_AURA, true);
}
@@ -1315,15 +1315,12 @@ class npc_dark_nucleus : public CreatureScript
void MoveInLineOfSight(Unit* who)
{
- if (me->GetDistance(who) >= 15.0f)
- return;
-
ScriptedAI::MoveInLineOfSight(who);
}
void DamageTaken(Unit* attacker, uint32& /*damage*/)
{
- if (attacker == me || attacker == me->getVictim())
+ if (attacker == me)
return;
me->DeleteThreatList();
@@ -1345,6 +1342,8 @@ class npc_dark_nucleus : public CreatureScript
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
me->ClearUnitState(UNIT_STATE_CASTING);
}
+ else
+ MoveInLineOfSight(me->getVictim());
}
else
_targetAuraCheck -= diff;
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 0454274401c..5b5c3ff2326 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include "the_eye.h"
@@ -501,9 +502,9 @@ 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
+ class spell_astromancer_wrath_of_the_astromancer_AuraScript : public AuraScript
{
- PrepareSpellScript(spell_astromancer_wrath_of_the_astromancer_SpellScript);
+ PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript);
bool Validate(SpellInfo const* /*SpellEntry*/)
{
@@ -512,50 +513,25 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
return true;
}
- bool Load()
+ void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- _targetCount = 0;
- return true;
- }
-
- void CountTargets(std::list<WorldObject*>& 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;
+ // Final heal only on duration end
+ if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
+ return;
- 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);
- }
+ Unit* target = GetUnitOwner();
+ target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(),false);
}
- private:
- int32 _targetCount;
-
void Register()
{
- OnEffectHitTarget += SpellEffectFn(spell_astromancer_wrath_of_the_astromancer_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_astromancer_wrath_of_the_astromancer_SpellScript::CountTargets, EFFECT_0, TARGET_DEST_CASTER_RADIUS);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_astromancer_wrath_of_the_astromancer_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
- SpellScript* GetSpellScript() const
+ AuraScript* GetAuraScript() const
{
- return new spell_astromancer_wrath_of_the_astromancer_SpellScript();
+ return new spell_astromancer_wrath_of_the_astromancer_AuraScript();
}
};
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 5095092927e..a1c48878507 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -40,7 +40,7 @@ enum DeathKnightSpells
DK_SPELL_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611,
DK_SPELL_UNHOLY_PRESENCE = 48265,
DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED = 63622,
- SPELL_DK_ITEM_T8_MALEE_4P_BONUS = 64736,
+ SPELL_DK_ITEM_T8_MELEE_4P_BONUS = 64736,
DK_SPELL_BLACK_ICE_R1 = 49140,
};
@@ -412,7 +412,7 @@ class spell_dk_scourge_strike : public SpellScriptLoader
{
multiplier = (GetEffectValue() * unitTarget->GetDiseasesByCaster(caster->GetGUID()) / 100.f);
// Death Knight T8 Melee 4P Bonus
- if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_DK_ITEM_T8_MALEE_4P_BONUS, EFFECT_0))
+ if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_DK_ITEM_T8_MELEE_4P_BONUS, EFFECT_0))
AddPctF(multiplier, aurEff->GetAmount());
}
}
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index f34e9e772f3..672e4ee96d5 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -32,7 +32,8 @@ enum DruidSpells
DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
DRUID_LIFEBLOOM_ENERGIZE = 64372,
DRUID_SURVIVAL_INSTINCTS = 50322,
- DRUID_SAVAGE_ROAR = 62071
+ DRUID_SAVAGE_ROAR = 62071,
+ SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950,
};
// 54846 Glyph of Starfire
@@ -615,6 +616,34 @@ class spell_dru_survival_instincts : public SpellScriptLoader
}
};
+class spell_dru_insect_swarm : public SpellScriptLoader
+{
+ public:
+ spell_dru_insect_swarm() : SpellScriptLoader("spell_dru_insect_swarm") { }
+
+ class spell_dru_insect_swarm_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_dru_insect_swarm_AuraScript);
+
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_DRUID_ITEM_T8_BALANCE_RELIC, EFFECT_0))
+ amount += aurEff->GetAmount();
+ }
+
+ void Register()
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_insect_swarm_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_dru_insect_swarm_AuraScript();
+ }
+};
+
void AddSC_druid_spell_scripts()
{
new spell_dru_glyph_of_starfire();
@@ -629,4 +658,5 @@ void AddSC_druid_spell_scripts()
new spell_dru_predatory_strikes();
new spell_dru_savage_roar();
new spell_dru_survival_instincts();
+ new spell_dru_insect_swarm();
}
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index e3714a22304..5648c510413 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1217,15 +1217,20 @@ class spell_q12735_song_of_cleansing : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
-
- if (caster && caster->GetAreaId() == AREA_BITTERTIDELAKE)
- caster->CastSpell(caster, SPELL_SUMMON_SPIRIT_ATAH);
-
- else if (caster && caster->GetAreaId() == AREA_RIVERSHEART)
- caster->CastSpell(caster, SPELL_SUMMON_SPIRIT_HAKHALAN);
-
- else if (caster && caster->GetAreaId() == AREA_WINTERGRASPRIVER)
- caster->CastSpell(caster, SPELL_SUMMON_SPIRIT_KOOSU);
+ switch (caster->GetAreaId())
+ {
+ case AREA_BITTERTIDELAKE:
+ caster->CastSpell(caster, SPELL_SUMMON_SPIRIT_ATAH);
+ break;
+ case AREA_RIVERSHEART:
+ caster->CastSpell(caster, SPELL_SUMMON_SPIRIT_HAKHALAN);
+ break;
+ case AREA_WINTERGRASPRIVER:
+ caster->CastSpell(caster, SPELL_SUMMON_SPIRIT_KOOSU);
+ break;
+ default:
+ break;
+ }
}
void Register()
diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp
index 52a60573eca..5b2cf7a0a93 100755
--- a/src/server/shared/Cryptography/ARC4.cpp
+++ b/src/server/shared/Cryptography/ARC4.cpp
@@ -19,14 +19,14 @@
#include "ARC4.h"
#include <openssl/sha.h>
-ARC4::ARC4(uint8 len)
+ARC4::ARC4(uint8 len) : m_ctx()
{
EVP_CIPHER_CTX_init(&m_ctx);
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
EVP_CIPHER_CTX_set_key_length(&m_ctx, len);
}
-ARC4::ARC4(uint8 *seed, uint8 len)
+ARC4::ARC4(uint8 *seed, uint8 len) : m_ctx()
{
EVP_CIPHER_CTX_init(&m_ctx);
EVP_EncryptInit_ex(&m_ctx, EVP_rc4(), NULL, NULL, NULL);
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index b5c42f560ae..880794d14d5 100755
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -94,7 +94,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_SEL_GUILD_MEMBER, "SELECT guildid, rank FROM guild_member WHERE guid = ?", CONNECTION_BOTH)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_ACHIEVEMENTS, "SELECT achievement, date FROM character_achievement WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_CRITERIAPROGRESS, "SELECT criteria, counter, date FROM character_achievement_progress WHERE guid = ?", CONNECTION_ASYNC)
- PREPARE_STATEMENT(CHAR_SEL_CHARACTER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, item0, item1, item2, item3, item4, item5, item6, item7, item8, "
+ PREPARE_STATEMENT(CHAR_SEL_CHARACTER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, ignore_mask, item0, item1, item2, item3, item4, item5, item6, item7, item8, "
"item9, item10, item11, item12, item13, item14, item15, item16, item17, item18 FROM character_equipmentsets WHERE guid = ? ORDER BY setindex", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_BGDATA, "SELECT instanceId, team, joinX, joinY, joinZ, joinO, joinMapId, taxiStart, taxiEnd, mountSpell FROM character_battleground_data WHERE guid = ?", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_SEL_CHARACTER_GLYPHS, "SELECT spec, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC)
@@ -246,8 +246,8 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_DEL_OLD_CHANNELS, "DELETE FROM channels WHERE ownership = 1 AND lastUsed + ? < UNIX_TIMESTAMP()", CONNECTION_ASYNC)
// Equipmentsets
- PREPARE_STATEMENT(CHAR_UPD_EQUIP_SET, "UPDATE character_equipmentsets SET name=?, iconname=?, item0=?, item1=?, item2=?, item3=?, item4=?, item5=?, item6=?, item7=?, item8=?, item9=?, item10=?, item11=?, item12=?, item13=?, item14=?, item15=?, item16=?, item17=?, item18=? WHERE guid=? AND setguid=? AND setindex=?", CONNECTION_ASYNC)
- PREPARE_STATEMENT(CHAR_INS_EQUIP_SET, "INSERT INTO character_equipmentsets (guid, setguid, setindex, name, iconname, item0, item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12, item13, item14, item15, item16, item17, item18) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC)
+ PREPARE_STATEMENT(CHAR_UPD_EQUIP_SET, "UPDATE character_equipmentsets SET name=?, iconname=?, ignore_mask=?, item0=?, item1=?, item2=?, item3=?, item4=?, item5=?, item6=?, item7=?, item8=?, item9=?, item10=?, item11=?, item12=?, item13=?, item14=?, item15=?, item16=?, item17=?, item18=? WHERE guid=? AND setguid=? AND setindex=?", CONNECTION_ASYNC)
+ PREPARE_STATEMENT(CHAR_INS_EQUIP_SET, "INSERT INTO character_equipmentsets (guid, setguid, setindex, name, iconname, ignore_mask, item0, item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12, item13, item14, item15, item16, item17, item18) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC)
PREPARE_STATEMENT(CHAR_DEL_EQUIP_SET, "DELETE FROM character_equipmentsets WHERE setguid=?", CONNECTION_ASYNC)
// Auras